Welcome to ViUR Vi

Administrativ viusal interface for the ViUR Information System
About
soon…
Getting started
Reference Guide
Tutorials
API Reference
This page contains auto-generated API reference documentation [1].
vi
Subpackages
vi.actions
Submodules
vi.actions.context
Module Contents
Classes
vi.actions.edit
Module Contents
Classes
- class vi.actions.edit.SaveContinue(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.edit.SaveSingleton(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.edit.ExecuteSingleton(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.edit.SaveClose(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
vi.actions.file
Module Contents
Classes
Small wrapper around <input type="file">. |
|
Adds a new directory to a tree.simple application. |
|
Allows uploading of files using the file dialog. |
|
Provides editing in a tree.simple application. |
|
Allows downloading files from the server. |
- class vi.actions.file.FileSelectUploader(*args, **kwargs)
Bases:
flare.html5.Input
Small wrapper around <input type=”file”>. Creates the element; executes the click (=opens the file dialog); runs the callback if a file has been selected and removes itself from its parent.
- onChange(event)
- class vi.actions.file.AddNodeAction(*args, **kwargs)
Bases:
flare.button.Button
Adds a new directory to a tree.simple application.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- createDir(dialog, dirName)
- onMkDir(req)
- resetLoadingState()
- class vi.actions.file.AddLeafAction(*args, **kwargs)
Bases:
flare.button.Button
Allows uploading of files using the file dialog.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.file.EditAction(*args, **kwargs)
Bases:
flare.button.Button
Provides editing in a tree.simple application. If a directory is selected, it opens a dialog for renaming that directory, otherwise the full editWidget is used.
- onAttach()
- onDetach()
- onSelectionActivated(table, selection)
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- editDir(dialog, dirName)
- resetLoadingState()
- class vi.actions.file.DownloadAction(*args, **kwargs)
Bases:
flare.button.Button
Allows downloading files from the server.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- disableViUnloadingWarning(*args, **kwargs)
- enableViUnloadingWarning(*args, **kwargs)
- doDownload(fileData)
- resetLoadingState()
vi.actions.hierarchy
Module Contents
Classes
Adds a new node in a hierarchy application. |
|
Edits a node in a hierarchy application. |
|
Allows cloning an entry (including its subentries) in a hierarchy application. |
|
Deletes a node from a hierarchy application. |
|
Allows adding an entry in a list-module. |
|
Allows adding an entry in a list-module. |
- class vi.actions.hierarchy.AddAction(*args, **kwargs)
Bases:
flare.button.Button
Adds a new node in a hierarchy application.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.hierarchy.EditAction(*args, **kwargs)
Bases:
flare.button.Button
Edits a node in a hierarchy application.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- onSelectionActivated(table, selection)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- openEditor(key)
- resetLoadingState()
- class vi.actions.hierarchy.CloneAction(*args, **kwargs)
Bases:
flare.button.Button
Allows cloning an entry (including its subentries) in a hierarchy application.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- openEditor(key)
- resetLoadingState()
- class vi.actions.hierarchy.DeleteAction(*args, **kwargs)
Bases:
flare.button.Button
Deletes a node from a hierarchy application.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- doDelete(dialog)
- allDeletedSuccess(success)
- resetLoadingState()
vi.actions.list
Module Contents
Classes
Allows adding an entry in a list-module. |
|
Allows editing an entry in a list-module. |
|
Allows cloning an entry in a list-module. |
|
Allows deleting an entry in a list-module. |
|
Allows Reloading |
|
Load a bunch of pages |
|
Load a bunch of pages |
|
Allows Loading all Entries in a list |
|
Allows Loading all Entries in a list |
|
- class vi.actions.list.AddAction(*args, **kwargs)
Bases:
flare.button.Button
Allows adding an entry in a list-module.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.list.EditAction(*args, **kwargs)
Bases:
flare.button.Button
Allows editing an entry in a list-module.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- onSelectionActivated(table, selection)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- openEditor(key)
- resetLoadingState()
- class vi.actions.list.CloneAction(*args, **kwargs)
Bases:
flare.button.Button
Allows cloning an entry in a list-module.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- openEditor(key)
- resetLoadingState()
- class vi.actions.list.DeleteAction(*args, **kwargs)
Bases:
flare.button.Button
Allows deleting an entry in a list-module.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- doDelete(dialog)
- allDeletedSuccess(success)
- deletedSuccess(req=None, code=None)
- deletedFailed(req=None, code=None)
- resetLoadingState()
- class vi.actions.list.ListPreviewAction(module, handler, actionName, *args, **kwargs)
Bases:
flare.html5.Span
- onChange(event)
- rebuildCB(*args, **kwargs)
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.ListPreviewInlineAction(*args, **kwargs)
Bases:
flare.button.Button
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- onClick(sender=None)
- toggleIntPrev()
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.CloseAction(*args, **kwargs)
Bases:
flare.button.Button
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.SelectAction(*args, **kwargs)
Bases:
flare.button.Button
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.SelectFieldsPopup(listWdg, *args, **kwargs)
Bases:
flare.popup.Popup
- doApply(*args, **kwargs)
- doSetFields(*args, **kwargs)
- doCancel(*args, **kwargs)
- doSelectAll(*args, **kwargs)
- doUnselectAll(*args, **kwargs)
- doInvertSelection(*args, **kwargs)
- class vi.actions.list.SelectFieldsAction(*args, **kwargs)
Bases:
flare.button.Button
- onClick(sender=None)
- onAttach()
- onDetach()
- onTableChanged(table, count, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.ReloadAction(*args, **kwargs)
Bases:
flare.button.Button
Allows Reloading
- static isSuitableFor(module, handler, actionName)
- onClick(event=None)
- resetLoadingState()
- class vi.actions.list.TableNextPage(*args, **kwargs)
Bases:
flare.button.Button
- postInit(widget=None)
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- resetLoadingState()
- class vi.actions.list.TablePrevPage(*args, **kwargs)
Bases:
flare.button.Button
- postInit(widget=None)
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.TableItems(*args, **kwargs)
Bases:
flare.html5.Div
- postInit(widget=None)
- onTableChanged(table, rowCount, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.SetPageRowAmountAction(*args, **kwargs)
Bases:
flare.html5.Div
Load a bunch of pages
- onClick(sender=None)
- onChange(sender=None)
- setPageAmount()
- static isSuitableFor(module, handler, actionName)
- resetLoadingState()
- class vi.actions.list.LoadNextBatchAction(*args, **kwargs)
Bases:
flare.html5.Div
Load a bunch of pages
- registerScroll()
- onScroll(sender=None)
- onClick(sender=None)
- onChange(sender=None)
- loadnextPages(*args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- resetLoadingState()
- class vi.actions.list.LoadAllAction(*args, **kwargs)
Bases:
flare.button.Button
Allows Loading all Entries in a list
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- loadAllRows()
- resetLoadingState()
- class vi.actions.list.PageFindAction(*args, **kwargs)
Bases:
flare.html5.Div
Allows Loading all Entries in a list
- onKeyPress(event)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- startFind()
- findText()
- resetLoadingState()
- class vi.actions.list.ListSelectFilterAction(*args, **kwargs)
Bases:
flare.button.Button
- onAttach()
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.CreateRecurrentAction(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- class vi.actions.list.ExportCsvAction(*args, **kwargs)
Bases:
flare.button.Button
- onClick(sender=None)
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list.SelectAllAction(*args, **kwargs)
Bases:
flare.button.Button
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- onAttach()
- onDetach()
- onTableChanged(table, count, *args, **kwargs)
vi.actions.list_order
Module Contents
Classes
- class vi.actions.list_order.ShopMarkAction(action, title, cls='', txtQuestion=None, txtSuccess=None, txtFailure=None, *args, **kwargs)
Bases:
flare.button.Button
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- setPayed(order)
- setPayedSucceeded(response)
- setPayedFailed(response)
- doMarkPayed(*args, **kwargs)
- onClick(sender=None)
- class vi.actions.list_order.ShopMarkPayedAction(*args, **kwargs)
Bases:
ShopMarkAction
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list_order.ShopMarkSentAction(*args, **kwargs)
Bases:
ShopMarkAction
- static isSuitableFor(module, handler, actionName)
- class vi.actions.list_order.ShopMarkCanceledAction(*args, **kwargs)
Bases:
ShopMarkAction
- static isSuitableFor(module, handler, actionName)
vi.actions.tree
Module Contents
Classes
Creates a new leaf (ie. a file) for a tree application |
|
Adds a new node in a hierarchy application. |
|
Creates a new node (ie. a directory) for a tree application |
|
Edits an entry inside a tree application. |
|
Allows deleting an entry in a tree-module. |
|
Allows adding an entry in a list-module. |
|
Selector for hierarchy root nodes. |
- class vi.actions.tree.AddLeafAction(*args, **kwargs)
Bases:
flare.button.Button
Creates a new leaf (ie. a file) for a tree application
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.tree.AddNodeOnlyAction(*args, **kwargs)
Bases:
flare.button.Button
Adds a new node in a hierarchy application.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.tree.AddNodeAction(*args, **kwargs)
Bases:
flare.button.Button
Creates a new node (ie. a directory) for a tree application
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.tree.EditAction(*args, **kwargs)
Bases:
flare.button.Button
Edits an entry inside a tree application. The type (node or leaf) of the entry is determined dynamically
- onAttach()
- onDetach()
- onSelectionActivated(table, selection)
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.tree.DeleteAction(*args, **kwargs)
Bases:
flare.button.Button
Allows deleting an entry in a tree-module. The type (node or leaf) of the entry is determined dynamically.
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- doDelete(dialog)
- allDeletedSuccess(success)
- resetLoadingState()
- class vi.actions.tree.ReloadAction(*args, **kwargs)
Bases:
flare.button.Button
Allows adding an entry in a list-module.
- static isSuitableFor(module, handler, actionName)
- onClick(sender=None)
- resetLoadingState()
- class vi.actions.tree.SelectRootNode(module, handler, actionName, *args, **kwargs)
Bases:
flare.html5.Select
Selector for hierarchy root nodes.
- onAttach()
- onDetach()
- update()
- onRootNodeChanged(newNode, *args, **kwargs)
- onRootNodesAvailable(req)
- onChange(event)
- static isSuitableFor(module, handler, actionName)
vi.framework
Subpackages
vi.framework.components
Submodules
vi.framework.components.actionbar
Module Contents
Classes
Provides the container for actions (add,edit,..) suitable for one module (eg. for lists). |
- class vi.framework.components.actionbar.ActionBar(module=None, appType=None, currentAction=None, *args, **kwargs)
Bases:
flare.html5.Div
Provides the container for actions (add,edit,..) suitable for one module (eg. for lists).
- setActions(actions, widget=None, view=None)
Sets the list of valid actions for this module. This function tries to resolve a suitable action-widget for each given action-name and adds them on success. All previous actions are removed. :param actions: List of names of actions which should be available. :type actions: list of str
- getActions()
Returns the list of action-names currently active for this module. May also contain action-names which couldn’t be resolved and therefore not displayed. :returns: List of str
- resetLoadingState()
Resets the loading-state of each child. Each child has the ability to provide visual feedback once it has been clicked and started working. This function is called from our parent once that action has finished, so we can tell our children to return to a sane state.
vi.framework.components.datatable
Module Contents
Classes
Provides an Html-Table which allows for row selections. |
|
- class vi.framework.components.datatable.SelectTable(checkboxes=False, indexes=False, *args, **kwargs)
Bases:
flare.ignite.Table
Provides an Html-Table which allows for row selections.
Parent widgets can register for certain events:
- selectionChanged: called if the current _multi_ selection changes. (Ie the user
holds ctrl and clicks a row). The selection might contain no, one or multiple rows. Its also called if the cursor moves. Its called if the user simply double clicks a row. So its possible to receive a selectionActivated event without an selectionChanged Event.
- selectionActivated: called if a selection is activated, ie. a row is double-clicked or Return
is pressed.
- cursorMoved: called when the currently active row changes. The user can select the current row
with a single click or by moving the cursor up and down using the arrow keys.
- onAttach()
- setHeader(headers)
Sets the table-headers to ‘headers’ :param headers: list of strings :type headers: list
- getTrByIndex(idx)
Retrieves the TR element by the given row number :param idx: Rownumber to retrieve the tr of :type idx: int :returns: HTMLTableRowElement
- getIndexByTr(tr)
Returns the rowNumber for the given tr element or None if the given tr element is invalid. :param tr: A HTMLTableRowElement of this table :type tr: HTMLTableRowElement :returns: int or None
- _rowForEvent(event)
Determines the row number for the given event
- onChange(event)
- onMouseDown(event)
- onMouseOut(event)
- onMouseUp(event)
- onKeyDown(event)
- onKeyUp(event)
- onDblClick(event)
- addSelectedRow(row)
Marks a row as selected
- removeSelectedRow(row)
Removes ‘row’ from the current selection (if any) :param row: Number of the row to unselect :type row: int
- selectRow(newRow)
Sets the current selection to ‘row’. Any previous selection is removed. :param newRow: Number of the row to select :type newRow: int
- setCursorRow(row, removeExistingSelection=True)
Move the cursor to row ‘row’. If removeExistingSelection is True, the current selection (if any) is invalidated.
- focusRow(row)
- getCurrentSelection()
Returns a list of currently selected row-numbers :returns: list
- clear()
Hook the clear() method so we can reset some internal states, too
- removeRow(row)
Hook the removeRow method so we can reset some internal states, too
- _extraCols()
- prepareCol(row, col)
Lets hook up the original removeRow function to optionally provide index and checkbox columns.
- dropTableContent()
Drops content from the table, structure remains unchanged
- setCell(row, col, val)
Interface for self[“cell”] that directs to the correct cell if extra columns are configured for this SelectTable.
- selectAll()
Selects all entries of the table.
- unSelectAll()
Unselects all entries of the table.
- invertSelection()
Inverts the current selection on the whole table currently displayed.
- class vi.framework.components.datatable.DataTable(_loadOnDisplay=False, *args, **kwargs)
Bases:
flare.html5.Div
- setDataProvider(obj)
Register’s ‘obj’ as the provider for this table. It must provide a onNextBatchNeeded function, which must fetch and feed new rows using add() or reset the dataProvider to None if no more rows are available. Notice: If the bottom of the table is reached, onNextBatchNeeded will only be called once. No further calls will be made until add() or setDataProvider() has been called afterwards.
- onCursorMoved(table, row)
Ensure the table scrolls according to the position of its cursor
- getRowCount()
Returns the total amount of rows currently known. :returns: int
- add(obj)
Adds an row to the model :param obj: Dictionary of values for this row :type obj: dict
- update(objList, writeToModel=True)
Adds multiple rows at once. Much faster than calling add() multiple times.
- extend(objList, writeToModel=True)
- remove(objOrIndex)
Removes ‘obj’ from the table. ‘obj’ may be an row-index or an object recieved by any eventListener. It _cannot_ be any original object passed to ‘add’ - it _must_ be recived by an eventListener!
- clear(keepModel=False)
Flushes the whole table.
- _renderObject(obj, tableIsPrepared=False, recalculate=True)
Renders the object to into the table. Does nothing if the list of _shownFields is empty. :param obj: Dictionary of values for this row :type obj: dict
- rebuildTable(recalculate=True)
Rebuilds the entire table. Useful if something fundamental changed (ie. the cell renderer or the list of visible fields)
- setShownFields(fields)
Sets the list of _shownFields. This causes the whole table to be rebuild. Be careful if calling this function often on a large table! :param fields: List of model-keys which will be displayed. :type fields: list
- onSelectionChanged(table, rows, *args, **kwargs)
Re-emit the event. Maps row-numbers to actual models.
- onSelectionActivated(table, rows)
Re-emit the event. Maps row-numbers to actual models.
- onTableChanged(table, rowCount, *args, **kwargs)
Re-emit the event.
- getCurrentSelection()
Override the getCurrentSelection method to yield actual models, not row-numbers.
- setCellRender(field, render)
Sets the render for cells of ‘field’ to render. A cell render receives the data for a given cell and returns the appropriate widget to display that data for the table.
- setCellRenders(renders)
Like setCellRender, but sets multiple renders at one. Much faster than calling setCellRender repeatedly.
- activateCurrentSelection()
Emits the selectionActivated event if there’s currently a selection
- class vi.framework.components.datatable.ViewportDataTable(_loadOnDisplay=False, rows=99, *args, **kwargs)
Bases:
DataTable
- clear(keepModel=False)
Flushes the whole table. Override explanation - replaced clear with dropTableContent
- rebuildTable(recalculate=True)
Rebuilds the entire table. Useful if something fundamental changed (ie. the cell renderer or the list of visible fields)#
Override explanation - uses the predefined _rows to prepare the grid - only load first rows from model
- add(obj)
Adds an row to the model :param obj: Dictionary of values for this row :type obj: dict
Override explanation - _renderObject call is always prepared
- extend(objList, writeToModel=True)
- update(objList, writeToModel=True)
Adds multiple rows at once. Much faster than calling add() multiple times.
Override explanation - removed grid preparation
- _renderObject(obj, tableIsPrepared=True, recalculate=True)
Renders the object to into the table. Does nothing if the list of _shownFields is empty. :param obj: Dictionary of values for this row :type obj: dict
Override explanation - removed Table preperation - rowIndex modulo shownrows
vi.translations
Submodules
vi.translations.de
Module Contents
- vi.translations.de.lngDe
vi.translations.en
Module Contents
- vi.translations.en.lngEn
Package Contents
- vi.translations.lngDe
- vi.translations.lngEn
vi.views
Submodules
vi.views.edit
Module Contents
Classes
- class vi.views.edit.editHandler
Bases:
flare.views.view.View
vi.views.hierarchy
Module Contents
Classes
vi.views.list
Module Contents
Classes
vi.views.log
Module Contents
Classes
- class vi.views.log.logHandler
Bases:
flare.views.view.View
vi.views.notfound
Module Contents
Classes
- class vi.views.notfound.NotFound
Bases:
flare.views.view.View
vi.views.overview
Module Contents
Classes
- class vi.views.overview.Overview
Bases:
flare.views.view.View
vi.views.singleton
Module Contents
Classes
vi.views.tree
Module Contents
Classes
vi.widgets
Submodules
vi.widgets.accordion
Module Contents
Classes
vi.widgets.code
Module Contents
Classes
- class vi.widgets.code.CodeHelpPopup(title='Code Hilfe')
Bases:
flare.popup.Popup
- class vi.widgets.code.CodePopup(title='🐍Editor')
Bases:
flare.popup.Popup
- class vi.widgets.code.Codemirror(syntax='python')
Bases:
flare.html5.Textarea
- _attachCodemirror()
- onAttach()
- onDetach()
- _getValue()
- _setValue(val)
- insertText(text)
- setCursor(line, char)
vi.widgets.csvexport
Module Contents
Classes
- class vi.widgets.csvexport.ExportCsv(widget, selection, encoding=None, language=None, separator=None, lineSeparator=None, *args, **kwargs)
Bases:
flare.html5.Progress
- nextChunk(cursor=None)
- nextChunkComplete(req)
- exportToFile()
- nextChunkFailure(req, code)
- replaceWithMessage(message, logClass='success')
vi.widgets.edit
Module Contents
Classes
Functions
|
Converts a flat dictionary containing dotted properties into a multi-dimensional one. |
- vi.widgets.edit.parseHashParameters(src, prefix='')
Converts a flat dictionary containing dotted properties into a multi-dimensional one.
- Example:
{ “a”:”a”, “b.a”:”ba”,”b.b”:”bb” } -> { “a”:”a”, “b”:{“a”:”ba”,”b”:”bb”} }
- If a dictionary contains only numeric indexes, it will be converted to a list:
{ “a.0.a”:”a0a”, “a.0.b”:”a0b”,a.1.a”:”a1a” } -> { “a”:[{“a”:”a0a”,”b”:”a0b”},{“a”:”a1a”}] }
- class vi.widgets.edit.EditWidget(module, applicationType, key=0, node=None, skelType=None, clone=False, hashArgs=None, context=None, logAction='Entry saved!', skel=None, *args, **kwargs)
Bases:
flare.html5.Div
- appList = 'list'
- appHierarchy = 'hierarchy'
- appTree = 'tree'
- appSingleton = 'singleton'
- __editIdx_ = 0
- onDetach()
- onAttach()
- onChange(event)
- onBoneChange(bone)
- showErrorMsg(req=None, code=None)
Removes all currently visible elements and displays an error message
- reloadData()
- _save(data)
Creates the actual NetworkService request used to transmit our data. If data is None, it fetches a clean add/edit form.
- Parameters:
data (dict or None) – The values to transmit or None to fetch a new, clean add/edit form.
- clear()
Removes all visible bones/forms/fieldsets.
- closeOrContinue(sender=None)
- doCloneHierarchy(sender=None)
- cloneComplete(req)
- setData(request=None, data=None, askHierarchyCloning=True)
Rebuilds the UI according to the skeleton received from server
- Parameters:
request (NetworkService) – A finished NetworkService request
data (dict) – The data received
- doSave(closeOnSuccess=False, *args, **kwargs)
Starts serializing and transmitting values to the server.
vi.widgets.file
Module Contents
Classes
Uploads a file to the server while providing visual feedback of the progress. |
|
Base Widget that renders a tree. |
- class vi.widgets.file.FileImagePopup(preview, *args, **kwargs)
Bases:
flare.popup.Popup
- onClick(event)
- onDownloadBtnClick(sender=None)
- class vi.widgets.file.FilePreviewImage(file=None, size=150, *args, **kwargs)
Bases:
flare.html5.Div
- setFile(file)
- download()
- onClick(sender=None)
- class vi.widgets.file.Uploader(file, node, context=None, module='file', *args, **kwargs)
Bases:
flare.html5.Div
Uploads a file to the server while providing visual feedback of the progress.
- onUploadUrlAvailable(req)
Internal callback - the actual upload url (retrieved by calling /file/getUploadURL) is known.
- onLoad(*args, **kwargs)
Internal callback - The state of our upload changed.
- onUploadAdded(req)
- onProgress(event)
Internal callback - further bytes have been transmitted
- onSuccess(*args, **kwargs)
Internal callback - The upload succeeded.
- onFailed(errorCode, *args, **kwargs)
- replaceWithMessage(message, isSuccess)
- class vi.widgets.file.MultiUploader(files, node, context=None, module='file', *args, **kwargs)
Bases:
flare.html5.Div
- handleFile(file)
- onUploadUrlAvailable(req)
Internal callback - the actual upload url (retrieved by calling /file/getUploadURL) is known.
- onLoad(*args, **kwargs)
Internal callback - The state of our upload changed.
- onUploadAdded(req)
- onSuccess(*args, **kwargs)
Internal callback - The upload succeeded.
- onFailed(errorCode, *args, **kwargs)
- replaceWithMessage(message, isSuccess)
- closeMessage()
- class vi.widgets.file.FileLeafWidget
Bases:
vi.widgets.tree.TreeLeafWidget
- EntryIcon()
- setStyle()
- class vi.widgets.file.FileWidget(module, rootNode=None, selectMode=None, node=None, context=None, *args, **kwargs)
Bases:
vi.widgets.tree.TreeBrowserWidget
Base Widget that renders a tree.
- leafWidget
- nodeWidget
- searchWidget()
- onStartSearch(searchStr, *args, **kwargs)
- getChildKey(widget)
Derives a string used to sort the entries on each level
- onDrop(event)
We got a drop event. Make that item a direct child of our rootNode
- static canHandle(module, moduleInfo)
vi.widgets.hierarchy
Module Contents
Classes
A Hierarchy is a Tree without leaf distinction! |
- class vi.widgets.hierarchy.HierarchyWidget(*args, **kwargs)
Bases:
vi.widgets.tree.TreeWidget
A Hierarchy is a Tree without leaf distinction!
- leafWidget
- getActions()
Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.
- reloadData()
Reload the data were displaying.
- reloadListWidget()
- toggleListView()
- setListView(visible=False)
- showListView()
- hideListView()
- onSelectionChanged(widget, selection, *args, **kwargs)
- static canHandle(moduleName, moduleInfo)
vi.widgets.internaledit
Module Contents
Classes
Functions
|
- vi.widgets.internaledit.checkErrors(bone) Tuple[bool, List[str]]
- class vi.widgets.internaledit.InternalEdit(skelStructure, values=None, errorInformation=None, readOnly=False, context=None, defaultCat='', module=None, boneparams=None, errorQueue=None, prefix=None)
Bases:
flare.html5.Div
- renderStructure(readOnly=False)
- serializeForPost(validityCheck=False)
- serializeForDocument()
- doSave(closeOnSuccess=False, *args, **kwargs)
Starts serializing and transmitting our values to the server.
- unserialize(data=None)
Applies the actual data to the bones.
- onChange(event)
- onKeyDown(event)
- performLogics()
vi.widgets.list
Module Contents
Classes
Provides the interface to list-applications. |
|
Provides the interface to list-applications. |
- class vi.widgets.list.ListWidget(module, filter=None, columns=None, filterID=None, filterDescr=None, batchSize=None, context=None, autoload=True, *args, **kwargs)
Bases:
flare.html5.Div
Provides the interface to list-applications. It acts as a data-provider for a DataTable and binds an action-bar to this table.
- setSelector(callback, multi=True, allow=None)
Configures the widget as selector for a relationalBone and shows it.
- selectorReturn()
Returns the current selection to the callback configured with setSelector.
- tableInitialization(*args, **kwargs)
Instantiates the table :param args: ListWidget Parameter :param kwargs: ListWidget Parameter :return:
- setAmount(amount)
- setPage(page=0)
sets targetpage. if not enougth loadedpages this pages will be requested :param page: sets targetpage :return:
- onRequestingFinished(*args, **kwargs)
- onClick(event)
- setTableActionBar()
- getDefaultEntryActions()
Returns the list of actions available in our actionBar
- getActions()
Returns the list of actions available in our actionBar
- getAllActions(view=None)
Returns the list of actions available in the action bar.
- showErrorMsg(req=None, code=None)
Removes all currently visible elements and displayes an error message
- onNextBatchNeeded()
Requests the next rows from the server and feed them to the table.
- onAttach()
- onDetach()
- onDataChanged(module, *args, **kwargs)
Refresh our view if element(s) in this module have changed
- requestStructure()
- receivedStructure(resp)
- reloadData()
Removes all currently displayed data and refetches the first batch from the server.
- setFilter(filter, filterID=None, filterDescr=None)
Applies a new filter.
- setContext(context)
Applies a new context.
- getFilter()
- updateEmptyNotification()
- onCompletion(req)
Pass the rows received to the datatable. :param req: The network request that succeed.
- setFields(fields)
- getFields()
- onSelectionActivated(table, selection)
- activateSelection()
- static canHandle(moduleName, moduleInfo)
- class vi.widgets.list.ViewportListWidget(module, filter=None, columns=None, filterID=None, filterDescr=None, batchSize=None, context=None, autoload=True, *args, **kwargs)
Bases:
ListWidget
Provides the interface to list-applications. It acts as a data-provider for a DataTable and binds an action-bar to this table.
- tableInitialization(*args, **kwargs)
Instantiates the table :param args: ListWidget Parameter :param kwargs: ListWidget Parameter
- Override explanation
use ViewPort DataTable with rows parameter
- setAmount(amount)
- setPage(page=0)
sets targetpage. if not enougth loadedpages this pages will be requested else
- Parameters:
page – sets targetpage
- Returns:
- _setPage(page=0)
render page to table :param page: :return:
- onRequestingFinished(*args, **kwargs)
- setTableActionBar()
- static canHandle(moduleName, moduleInfo)
vi.widgets.search
Module Contents
Classes
vi.widgets.table
Module Contents
Classes
Provides an Html-Table which allows for row selections. |
|
Provides kind of MVC on top of SelectTable. |
- class vi.widgets.table.SelectTable(checkboxes=False, indexes=False, *args, **kwargs)
Bases:
flare.ignite.Table
Provides an Html-Table which allows for row selections.
Parent widgets can register for certain events:
- selectionChanged: called if the current _multi_ selection changes. (Ie the user
holds ctrl and clicks a row). The selection might contain no, one or multiple rows. Its also called if the cursor moves. Its called if the user simply double clicks a row. So its possible to receive a selectionActivated event without an selectionChanged Event.
- selectionActivated: called if a selection is activated, ie. a row is double-clicked or Return
is pressed.
- cursorMoved: called when the currently active row changes. The user can select the current row
with a single click or by moving the cursor up and down using the arrow keys.
- onAttach()
- setHeader(headers)
Sets the table-headers to ‘headers’ :param headers: list of strings :type headers: list
- getTrByIndex(idx)
Retrieves the TR element by the given row number :param idx: Rownumber to retrieve the tr of :type idx: int :returns: HTMLTableRowElement
- getIndexByTr(tr)
Returns the rowNumber for the given tr element or None if the given tr element is invalid. :param tr: A HTMLTableRowElement of this table :type tr: HTMLTableRowElement :returns: int or None
- _rowForEvent(event)
Determines the row number for the given event
- onChange(event)
- onMouseDown(event)
- onMouseOut(event)
- onMouseUp(event)
- onKeyDown(event)
- onKeyUp(event)
- onDblClick(event)
- addSelectedRow(row)
Marks a row as selected
- removeSelectedRow(row)
Removes ‘row’ from the current selection (if any) :param row: Number of the row to unselect :type row: int
- selectRow(newRow)
Sets the current selection to ‘row’. Any previous selection is removed. :param newRow: Number of the row to select :type newRow: int
- setCursorRow(row, removeExistingSelection=True)
Move the cursor to row ‘row’. If removeExistingSelection is True, the current selection (if any) is invalidated.
- focusRow(row)
- getCurrentSelection()
Returns a list of currently selected row-numbers :returns: list
- clear()
Hook the clear() method so we can reset some internal states, too
- removeRow(row)
Hook the removeRow method so we can reset some internal states, too
- _extraCols()
- prepareCol(row, col)
Lets hook up the original removeRow function to optionally provide index and checkbox columns.
- setCell(row, col, val)
Interface for self[“cell”] that directs to the correct cell if extra columns are configured for this SelectTable.
- selectAll()
Selects all entries of the table.
- unSelectAll()
Unselects all entries of the table.
- invertSelection()
Inverts the current selection on the whole table currently displayed.
- class vi.widgets.table.DataTable(_loadOnDisplay=False, *args, **kwargs)
Bases:
flare.html5.Div
Provides kind of MVC on top of SelectTable.
- recalcHeight(*args, **kwargs)
- setDataProvider(obj)
Register’s ‘obj’ as the provider for this table. It must provide a onNextBatchNeeded function, which must fetch and feed new rows using add() or reset the dataProvider to None if no more rows are available. Notice: If the bottom of the table is reached, onNextBatchNeeded will only be called once. No further calls will be made until add() or setDataProvider() has been called afterwards.
- onCursorMoved(table, row)
Ensure the table scrolls according to the position of its cursor
- getRowCount()
Returns the total amount of rows currently known. :returns: int
- add(obj)
Adds an row to the model :param obj: Dictionary of values for this row :type obj: dict
- extend(objList)
Adds multiple rows at once. Much faster than calling add() multiple times.
- testIfNextBatchNeededImmediately()
Test if we display enough entries so that our contents are scrollable. Otherwise, we’ll never request a second batch
- remove(objOrIndex)
Removes ‘obj’ from the table. ‘obj’ may be an row-index or an object recieved by any eventListener. It _cannot_ be any original object passed to ‘add’ - it _must_ be recived by an eventListener!
- clear(keepModel=False)
Flushes the whole table.
- _renderObject(obj, tableIsPrepared=False)
Renders the object to into the table. Does nothing if the list of _shownFields is empty. :param obj: Dictionary of values for this row :type obj: dict
- rebuildTable()
Rebuilds the entire table. Useful if something fundamental changed (ie. the cell renderer or the list of visible fields)
- setShownFields(fields)
Sets the list of _shownFields. This causes the whole table to be rebuild. Be careful if calling this function often on a large table! :param fields: List of model-keys which will be displayed. :type fields: list
- onScroll(event)
Check if we got a scroll event and need to fetch another set of rows from our dataProvider
- onSelectionChanged(table, rows, *args, **kwargs)
Re-emit the event. Maps row-numbers to actual models.
- onSelectionActivated(table, rows)
Re-emit the event. Maps row-numbers to actual models.
- onTableChanged(table, rowCount, *args, **kwargs)
Re-emit the event.
- getCurrentSelection()
Override the getCurrentSelection method to yield actual models, not row-numbers.
- setCellRender(field, render)
Sets the render for cells of ‘field’ to render. A cell render receives the data for a given cell and returns the appropriate widget to display that data for the table.
- setCellRenders(renders)
Like setCellRender, but sets multiple renders at one. Much faster than calling setCellRender repeatedly.
- activateSelection()
Emits the selectionActivated event if there’s currently a selection
vi.widgets.task
Module Contents
Classes
- class vi.widgets.task.TaskWidget(title)
Bases:
flare.popup.Popup
- class vi.widgets.task.ServerTaskWidget(title, key)
Bases:
TaskWidget
vi.widgets.tooltip
Module Contents
Classes
Small utility class for providing tooltips |
vi.widgets.topbar
Module Contents
Classes
Provides the top-bar of VI |
|
- class vi.widgets.topbar.TopBarWidget
Bases:
flare.html5.Header
Provides the top-bar of VI
- invoke()
- setTitle(title=None)
- onClick(event)
- setCurrentModulDescr(descr='', iconURL=None, iconClasses=None, path=None)
- class vi.widgets.topbar.UserState(*args, **kwargs)
Bases:
flare.html5.Div
- onCurrentUserAvailable(req)
- update()
- static canHandle(action)
- onClick(sender=None)
- openEdit(key)
- class vi.widgets.topbar.Tasks(*args, **kwargs)
Bases:
flare.html5.Div
- onTaskListAvailable(req)
- onTaskListFailure()
- onCurrentUserAvailable(req)
- update()
- onClick(event)
- static canHandle(action)
vi.widgets.tree
Module Contents
Classes
Base Widget that renders a tree. |
|
Base Widget that renders a tree. |
- class vi.widgets.tree.TreeWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)
Bases:
flare.html5.Div
Base Widget that renders a tree.
- nodeWidget
- leafWidget
- requestStructure()
- receivedStructure(resp)
- setSelector(callback, multi=True, allow=None)
Configures the widget as selector for a relationalBone and shows it.
- setContext(context)
- selectorReturn()
Returns the current selection to the callback configured with setSelector.
- onKeyDown(event)
- onKeyUp(event)
- getActions()
Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.
- clearSelection()
Empties the current selection.
- extendSelection(element)
Extends the current selection to element.
This is normally done by clicking or tabbing on an element.
- activateSelection(element)
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- requestChildren(element)
- _showErrorMsg(req=None, code=None)
Removes all currently visible elements and displayes an error message
- onDataChanged(module, *args, **kwargs)
- onAttach()
- onDetach()
- itemForKey(key, elem=None)
Returns the HierarchyWidget displaying the entry with the given key. :param key: The key (id) of the item. :type key: str :returns: HierarchyItem
- onSetDefaultRootNode(req)
We requested the list of rootNodes for that module and that request just finished. Parse the respone and set our rootNode to the first rootNode received.
- setRootNode(rootNode, node=None)
Set the currently displayed hierarchy to ‘rootNode’. :param rootNode: Key of the rootNode which children we shall display :type rootNode: str
- reloadData()
Reload the data were displaying.
- loadNode(node, skelType=None, cursor=None, overrideParams=None)
Fetch the (direct) children of the given node. Once the list is received, append them to their parent node. :param node: Key of the node to fetch :type node: str
- _onRequestSucceded(req)
The NetworkRequest for a (sub)node finished. Create a new HierarchyItem for each entry received and add them to our view
- onDrop(event)
We got a drop event. Make that item a direct child of our rootNode
- onDragOver(event)
Allow dropping children on the rootNode
- getChildKey(widget)
Order by sortindex
- static canHandle(moduleName, moduleInfo)
- class vi.widgets.tree.BreadcrumbNodeWidget
Bases:
flare.viur.widgets.tree.TreeNodeWidget
- setStyle()
- class vi.widgets.tree.TreeBrowserWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)
Bases:
TreeWidget
Base Widget that renders a tree.
- leafWidget
- nodeWidget
- reloadData()
Reload the data were displaying.
- rebuildPath()
Rebuild the displayed path-list.
- onPathRequestSucceded(req)
Rebuild the displayed path-list according to request data
- activateSelection(element)
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- static canHandle(module, moduleInfo)
vi.widgets.userlogoutmsg
Module Contents
Classes
- class vi.widgets.userlogoutmsg.UserLogoutMsg(*args, **kwargs)
Bases:
flare.popup.Popup
- pollInterval = 120
- checkInterval
- visibilityChanged(e)
- stopInterval()
- hideMessage()
Make this popup invisible
- showMessage()
Show this popup
- showLoginWindow(*args, **kwargs)
Return to the login window.
- checkForSuspendResume(*args, **kwargs)
Test if at least self.pollIntervall seconds have passed and query the server if
- startPolling(*args, **kwargs)
Start querying the server
- onUserTestSuccess(req)
We received a response from the server
- onUserTestFail(text, ns)
Error retrieving the current user response from the server
Package Contents
Classes
Provides the top-bar of VI |
|
Provides the interface to list-applications. |
|
Small utility class for providing tooltips |
|
Provides kind of MVC on top of SelectTable. |
|
Base Widget that renders a tree. |
|
Base Widget that renders a tree. |
|
A Hierarchy is a Tree without leaf distinction! |
|
Base Widget that renders a tree. |
- class vi.widgets.Accordion
Bases:
flare.html5.Form
- addSegment(ident, title=None, directAdd=False, *args)
- clear()
- buildAccordion(order=None)
- Parameters:
sort – None: sorted by Bones, “asc”:ascending, “desc”:descending, dict: {“category”:index,…}
- Returns:
- class vi.widgets.TopBarWidget
Bases:
flare.html5.Header
Provides the top-bar of VI
- invoke()
- setTitle(title=None)
- onClick(event)
- setCurrentModulDescr(descr='', iconURL=None, iconClasses=None, path=None)
- class vi.widgets.ListWidget(module, filter=None, columns=None, filterID=None, filterDescr=None, batchSize=None, context=None, autoload=True, *args, **kwargs)
Bases:
flare.html5.Div
Provides the interface to list-applications. It acts as a data-provider for a DataTable and binds an action-bar to this table.
- setSelector(callback, multi=True, allow=None)
Configures the widget as selector for a relationalBone and shows it.
- selectorReturn()
Returns the current selection to the callback configured with setSelector.
- tableInitialization(*args, **kwargs)
Instantiates the table :param args: ListWidget Parameter :param kwargs: ListWidget Parameter :return:
- setAmount(amount)
- setPage(page=0)
sets targetpage. if not enougth loadedpages this pages will be requested :param page: sets targetpage :return:
- onRequestingFinished(*args, **kwargs)
- onClick(event)
- setTableActionBar()
- getDefaultEntryActions()
Returns the list of actions available in our actionBar
- getActions()
Returns the list of actions available in our actionBar
- getAllActions(view=None)
Returns the list of actions available in the action bar.
- showErrorMsg(req=None, code=None)
Removes all currently visible elements and displayes an error message
- onNextBatchNeeded()
Requests the next rows from the server and feed them to the table.
- onAttach()
- onDetach()
- onDataChanged(module, *args, **kwargs)
Refresh our view if element(s) in this module have changed
- requestStructure()
- receivedStructure(resp)
- reloadData()
Removes all currently displayed data and refetches the first batch from the server.
- setFilter(filter, filterID=None, filterDescr=None)
Applies a new filter.
- setContext(context)
Applies a new context.
- getFilter()
- updateEmptyNotification()
- onCompletion(req)
Pass the rows received to the datatable. :param req: The network request that succeed.
- setFields(fields)
- getFields()
- onSelectionActivated(table, selection)
- activateSelection()
- static canHandle(moduleName, moduleInfo)
- class vi.widgets.EditWidget(module, applicationType, key=0, node=None, skelType=None, clone=False, hashArgs=None, context=None, logAction='Entry saved!', skel=None, *args, **kwargs)
Bases:
flare.html5.Div
- appList = 'list'
- appHierarchy = 'hierarchy'
- appTree = 'tree'
- appSingleton = 'singleton'
- __editIdx_ = 0
- onDetach()
- onAttach()
- onChange(event)
- onBoneChange(bone)
- showErrorMsg(req=None, code=None)
Removes all currently visible elements and displays an error message
- reloadData()
- _save(data)
Creates the actual NetworkService request used to transmit our data. If data is None, it fetches a clean add/edit form.
- Parameters:
data (dict or None) – The values to transmit or None to fetch a new, clean add/edit form.
- clear()
Removes all visible bones/forms/fieldsets.
- closeOrContinue(sender=None)
- doCloneHierarchy(sender=None)
- cloneComplete(req)
- setData(request=None, data=None, askHierarchyCloning=True)
Rebuilds the UI according to the skeleton received from server
- Parameters:
request (NetworkService) – A finished NetworkService request
data (dict) – The data received
- doSave(closeOnSuccess=False, *args, **kwargs)
Starts serializing and transmitting values to the server.
- class vi.widgets.ToolTip(shortText='', longText='', *args, **kwargs)
Bases:
flare.html5.Div
Small utility class for providing tooltips
- onClick(event)
- _setDisabled(disabled)
- _getDisabled()
- class vi.widgets.DataTable(_loadOnDisplay=False, *args, **kwargs)
Bases:
flare.html5.Div
Provides kind of MVC on top of SelectTable.
- recalcHeight(*args, **kwargs)
- setDataProvider(obj)
Register’s ‘obj’ as the provider for this table. It must provide a onNextBatchNeeded function, which must fetch and feed new rows using add() or reset the dataProvider to None if no more rows are available. Notice: If the bottom of the table is reached, onNextBatchNeeded will only be called once. No further calls will be made until add() or setDataProvider() has been called afterwards.
- onCursorMoved(table, row)
Ensure the table scrolls according to the position of its cursor
- getRowCount()
Returns the total amount of rows currently known. :returns: int
- add(obj)
Adds an row to the model :param obj: Dictionary of values for this row :type obj: dict
- extend(objList)
Adds multiple rows at once. Much faster than calling add() multiple times.
- testIfNextBatchNeededImmediately()
Test if we display enough entries so that our contents are scrollable. Otherwise, we’ll never request a second batch
- remove(objOrIndex)
Removes ‘obj’ from the table. ‘obj’ may be an row-index or an object recieved by any eventListener. It _cannot_ be any original object passed to ‘add’ - it _must_ be recived by an eventListener!
- clear(keepModel=False)
Flushes the whole table.
- _renderObject(obj, tableIsPrepared=False)
Renders the object to into the table. Does nothing if the list of _shownFields is empty. :param obj: Dictionary of values for this row :type obj: dict
- rebuildTable()
Rebuilds the entire table. Useful if something fundamental changed (ie. the cell renderer or the list of visible fields)
- setShownFields(fields)
Sets the list of _shownFields. This causes the whole table to be rebuild. Be careful if calling this function often on a large table! :param fields: List of model-keys which will be displayed. :type fields: list
- onScroll(event)
Check if we got a scroll event and need to fetch another set of rows from our dataProvider
- onSelectionChanged(table, rows, *args, **kwargs)
Re-emit the event. Maps row-numbers to actual models.
- onSelectionActivated(table, rows)
Re-emit the event. Maps row-numbers to actual models.
- onTableChanged(table, rowCount, *args, **kwargs)
Re-emit the event.
- getCurrentSelection()
Override the getCurrentSelection method to yield actual models, not row-numbers.
- setCellRender(field, render)
Sets the render for cells of ‘field’ to render. A cell render receives the data for a given cell and returns the appropriate widget to display that data for the table.
- setCellRenders(renders)
Like setCellRender, but sets multiple renders at one. Much faster than calling setCellRender repeatedly.
- activateSelection()
Emits the selectionActivated event if there’s currently a selection
- class vi.widgets.Search(*args, **kwargs)
Bases:
flare.html5.Div
- doSearch(*args, **kwargs)
- resetSearch()
- onKeyDown(event)
- resetLoadingState()
- reevaluate()
- focus()
- class vi.widgets.SideBar(*args, **kwargs)
Bases:
flare.html5.Div
- onAttach()
- onDetach()
- setWidget(widget)
- getWidget()
- close(*args, **kwargs)
- class vi.widgets.UserLogoutMsg(*args, **kwargs)
Bases:
flare.popup.Popup
- pollInterval = 120
- checkInterval
- visibilityChanged(e)
- stopInterval()
- hideMessage()
Make this popup invisible
- showMessage()
Show this popup
- showLoginWindow(*args, **kwargs)
Return to the login window.
- checkForSuspendResume(*args, **kwargs)
Test if at least self.pollIntervall seconds have passed and query the server if
- startPolling(*args, **kwargs)
Start querying the server
- onUserTestSuccess(req)
We received a response from the server
- onUserTestFail(text, ns)
Error retrieving the current user response from the server
- class vi.widgets.TaskWidget(title)
Bases:
flare.popup.Popup
- class vi.widgets.TaskSelectWidget
Bases:
TaskWidget
- getSelectedTask()
- setActiveTask()
- onChange(event)
- invokeTask(*args, **kwargs)
- class vi.widgets.InternalEdit(skelStructure, values=None, errorInformation=None, readOnly=False, context=None, defaultCat='', module=None, boneparams=None, errorQueue=None, prefix=None)
Bases:
flare.html5.Div
- renderStructure(readOnly=False)
- serializeForPost(validityCheck=False)
- serializeForDocument()
- doSave(closeOnSuccess=False, *args, **kwargs)
Starts serializing and transmitting our values to the server.
- unserialize(data=None)
Applies the actual data to the bones.
- onChange(event)
- onKeyDown(event)
- performLogics()
- class vi.widgets.ExportCsv(widget, selection, encoding=None, language=None, separator=None, lineSeparator=None, *args, **kwargs)
Bases:
flare.html5.Progress
- nextChunk(cursor=None)
- nextChunkComplete(req)
- exportToFile()
- nextChunkFailure(req, code)
- replaceWithMessage(message, logClass='success')
- class vi.widgets.ExportCsvStarter(widget, *args, **kwargs)
Bases:
flare.popup.Popup
- onExportBtnClick(*args, **kwargs)
- class vi.widgets.TreeWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)
Bases:
flare.html5.Div
Base Widget that renders a tree.
- nodeWidget
- leafWidget
- requestStructure()
- receivedStructure(resp)
- setSelector(callback, multi=True, allow=None)
Configures the widget as selector for a relationalBone and shows it.
- setContext(context)
- selectorReturn()
Returns the current selection to the callback configured with setSelector.
- onKeyDown(event)
- onKeyUp(event)
- getActions()
Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.
- clearSelection()
Empties the current selection.
- extendSelection(element)
Extends the current selection to element.
This is normally done by clicking or tabbing on an element.
- activateSelection(element)
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- requestChildren(element)
- _showErrorMsg(req=None, code=None)
Removes all currently visible elements and displayes an error message
- onDataChanged(module, *args, **kwargs)
- onAttach()
- onDetach()
- itemForKey(key, elem=None)
Returns the HierarchyWidget displaying the entry with the given key. :param key: The key (id) of the item. :type key: str :returns: HierarchyItem
- onSetDefaultRootNode(req)
We requested the list of rootNodes for that module and that request just finished. Parse the respone and set our rootNode to the first rootNode received.
- setRootNode(rootNode, node=None)
Set the currently displayed hierarchy to ‘rootNode’. :param rootNode: Key of the rootNode which children we shall display :type rootNode: str
- reloadData()
Reload the data were displaying.
- loadNode(node, skelType=None, cursor=None, overrideParams=None)
Fetch the (direct) children of the given node. Once the list is received, append them to their parent node. :param node: Key of the node to fetch :type node: str
- _onRequestSucceded(req)
The NetworkRequest for a (sub)node finished. Create a new HierarchyItem for each entry received and add them to our view
- onDrop(event)
We got a drop event. Make that item a direct child of our rootNode
- onDragOver(event)
Allow dropping children on the rootNode
- getChildKey(widget)
Order by sortindex
- static canHandle(moduleName, moduleInfo)
- class vi.widgets.TreeBrowserWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)
Bases:
TreeWidget
Base Widget that renders a tree.
- leafWidget
- nodeWidget
- reloadData()
Reload the data were displaying.
- rebuildPath()
Rebuild the displayed path-list.
- onPathRequestSucceded(req)
Rebuild the displayed path-list according to request data
- activateSelection(element)
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- static canHandle(module, moduleInfo)
- class vi.widgets.HierarchyWidget(*args, **kwargs)
Bases:
vi.widgets.tree.TreeWidget
A Hierarchy is a Tree without leaf distinction!
- leafWidget
- getActions()
Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.
- reloadData()
Reload the data were displaying.
- reloadListWidget()
- toggleListView()
- setListView(visible=False)
- showListView()
- hideListView()
- onSelectionChanged(widget, selection, *args, **kwargs)
- static canHandle(moduleName, moduleInfo)
- class vi.widgets.FileWidget(module, rootNode=None, selectMode=None, node=None, context=None, *args, **kwargs)
Bases:
vi.widgets.tree.TreeBrowserWidget
Base Widget that renders a tree.
- leafWidget
- nodeWidget
- searchWidget()
- onStartSearch(searchStr, *args, **kwargs)
- getChildKey(widget)
Derives a string used to sort the entries on each level
- onDrop(event)
We got a drop event. Make that item a direct child of our rootNode
- static canHandle(module, moduleInfo)
Submodules
vi.admin
Module Contents
Classes
This is the screen superclass. |
Attributes
- class vi.admin.AdminScreen(*args, **kwargs)
Bases:
vi.screen.Screen
This is the screen superclass.
It represents a basic screen and its functionality.
- onClick(event)
- reset()
- invoke()
Is called to show the screen
- getCurrentUser()
- getCurrentUserSuccess(req)
- getCurrentUserFailure(req, code)
- refresh()
- refreshConfig(req)
- startup()
- initializeViews()
- initializeConfig()
- openView(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False, target='mainNav')
- openNewMainView(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False)
- openNewPopup(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False)
- log(type, msg, icon=None, modul=None, action=None, key=None, data=None)
- checkInitialHash(*args, **kwargs)
- execCall(path, params=None)
Performs an execution call.
- Parameters:
path – Path to the module and action
params – Parameters passed to the module
- stackWidget(widget, title='', icon=None)
We dont stack widgets anymore. We use now Popups.
- removeWidget(widget)
- switchFullscreen(fullscreen=True)
- isFullscreen()
- onError(req, code)
- vi.admin.viInitializedEvent
vi.config
Module Contents
Functions
|
|
|
Attributes
- vi.config.vi_conf
- vi.config.updateConf(_conf)
- vi.config.getConf()
- vi.config.conf
vi.exception
Module Contents
- exception vi.exception.InvalidBoneValueException
Bases:
ValueError
Inappropriate argument value (of correct type).
vi.log
Module Contents
Classes
PopOut Elements |
|
click handler for loglist |
|
Provides the "messaging" center displayed at the bottom of VI |
Attributes
- vi.log.iddbTableName = 'vi_log3'
- class vi.log.logEntry(logObj=None)
Bases:
flare.html5.Span
PopOut Elements
- class vi.log.logA(logObj=None)
Bases:
flare.html5.A
click handler for loglist
- onClick(sender=None)
- openEditor(key)
- class vi.log.LogButton
Bases:
flare.html5.Div
- idbdata(event)
- cleanLog()
- cleanLogAction(event)
- renderPopOut()
- onClick(sender=None)
- openLog()
- apane = Pane(
translate(“Log”), closeable=True, iconClasses=[ “apptype_list”], collapseable=True
)
wg = logWidget(self.logsList )
apane.addWidget(wg)
conf[“mainWindow”].addPane(apane) conf[“mainWindow”].focusPane(apane)
- log(type, msg, icon=None, modul=None, action=None, key=None, data=None, date=None, onlyLoad=False)
- msgOverlay(logObj)
- removeInfo(wrap)
- reset()
- static canHandle(action)
- class vi.log.Log
Bases:
flare.html5.Div
Provides the “messaging” center displayed at the bottom of VI
- toggleMsgCenter(*args, **kwargs)
- log(type, msg, icon=None, date=None)
Adds a message to the log :param type: The type of the message. :type type: “success”, “error”, “warning”, “info”, “progress” :param msg: The message to append :type msg: str
- removeNewCls(span)
- reset()
vi.login
Module Contents
Classes
This is the screen superclass. |
- class vi.login.LoginInputField(notifier, *args, **kwargs)
Bases:
flare.html5.Input
- onKeyPress(event)
- class vi.login.BaseLoginHandler(loginScreen, *args, **kwargs)
Bases:
flare.html5.Li
- onClick(event)
- enable()
- disable()
- lock()
- unlock()
- login()
- reset()
- parseAnswer(req)
- class vi.login.UserPasswordLoginHandler(loginScreen, *args, **kwargs)
Bases:
BaseLoginHandler
- cssname = 'userpassword'
- onKeyPress(event)
- onLoginClick(sender=None)
- doLoginSuccess(req)
- doLoginFailure(req, code, *args, **kwargs)
- onVerifyClick(sender=None)
- doVerifySuccess(req)
- doVerifyFailure(*args, **kwargs)
- onSendClick(sender=None)
- reset()
- enable()
- focusLaterIdiot()
- static canHandle(method, secondFactor)
- class vi.login.GoogleAccountLoginHandler(loginScreen, *args, **kwargs)
Bases:
BaseLoginHandler
- cssname = 'googleaccount'
- onLoginClick(sender=None)
- static canHandle(method, secondFactor)
- class vi.login.OAuthAccountLoginHandler(loginScreen, *args, **kwargs)
Bases:
BaseLoginHandler
- cssname = 'oauthaccount'
- onLoginClick(sender=None)
- doSkeySuccess(req)
- static canHandle(method, secondFactor)
- class vi.login.LoginScreen(*args, **kwargs)
Bases:
vi.screen.Screen
This is the screen superclass.
It represents a basic screen and its functionality.
- invoke(logout=False)
Is called to show the screen
- onLogoutSuccess(*args, **kwargs)
- doShowLogin(req, code, *args, **kwargs)
- insufficientRights()
- doSkipLogin(req)
- onGetAuthMethodsSuccess(req)
- selectHandler(handler=None)
- onGetAuthMethodsFailure(*args, **kwargs)
- redirectNoAdmin()
vi.pane
Module Contents
Classes
Base class for Panes. |
|
This pane groups subpanes; it cannot have direct childrens |
- class vi.pane.Pane(descr=None, iconURL=None, iconClasses=None, closeable=False, collapseable=True, focusable=True, path=None)
Bases:
flare.html5.Div
Base class for Panes.
A pane represents a entry in the module list as well as a list of widgets associated with this pane.
It is possible to stack panes on-top of each other. If a pane is active, _all_ its child widgets are visible (through they might overlap).
- __setattr__(key, value)
- setImage(loading=False)
- lock()
- unlock()
- setText(descr=None, iconURL=None, loading=False)
- onBtnCloseReleased(*args, **kwargs)
- addChildPane(pane)
Stack a pane under this one. It gets displayed as a subpane. :param pane: Another pane :type pane: pane
- removeChildPane(pane)
Removes a subpane. :param pane: The pane to remove. Must be a direct child of this pane :type pane: Pane
- onDetach()
- addWidget(widget, disableOtherWidgets=True)
Adds a widget to this pane. Note: all widgets of a pane are visible at the same time! :param widget: The widget to add :type widget: Widget
- rebuildChildrenClassInfo()
- removeWidget(widget)
Removes a widget. :param widget: The widget to remove. Must be a direct child of this pane. :type widget: Widget
- containsWidget(widget)
Tests wherever widget is a direct child of this pane. :returns: bool
- onClick(event=None, *args, **kwargs)
- expand()
- collapse()
- focus()
vi.priorityqueue
Module Contents
Classes
Attributes
- vi.priorityqueue.HandlerClassSelector
- vi.priorityqueue.actionDelegateSelector
- vi.priorityqueue.initialHashHandler
- vi.priorityqueue.extendedSearchWidgetSelector
- vi.priorityqueue.toplevelActionSelector
- vi.priorityqueue.loginHandlerSelector
- class vi.priorityqueue.StartupQueue
Bases:
object
- reset()
- setFinalElem(elem)
- insertElem(priority, elem)
- run()
- next()
- vi.priorityqueue.startupQueue
vi.screen
Module Contents
Classes
This is the screen superclass. |
vi.serversideaction
Module Contents
Classes
- class vi.serversideaction.ServerSideActionWdg(module, handler, actionName, actionData)
Bases:
flare.button.Button
- switchDisabledState(disabled)
- onAttach()
- onDetach()
- onSelectionChanged(table, selection, *args, **kwargs)
- onClick(sender=None)
- apply(sender=None)
- fetchNext()
- fetchSucceeded(req)
- fetchFailed()
- resetLoadingState()
vi.utils
Module Contents
Classes
Functions
|
Renders a URL that contains {{variables}}, e.g. for previews. |
|
Parses a string given by format and substitutes placeholders using values specified by data. |
|
|
|
|
|
- vi.utils.render_url(url, module, entry=None, **kwargs)
Renders a URL that contains {{variables}}, e.g. for previews.
- vi.utils.formatString(format, data, structure=None, language=None)
Parses a string given by format and substitutes placeholders using values specified by data.
- vi.utils.getImagePreview(data, cropped=False, size=150)
- vi.utils.setPreventUnloading(mode=True)
- class vi.utils.indexeddbConnector(dbName, version=None)
- dbResult
- dbTransaction
- connect()
- db_error(event)
- db_blocked(events)
- db_version(event)
- db_onupgradeneeded(event)
- db_success(event)
- class vi.utils.indexeddb(dbName, dbVersion=None)
- queue = []
- dbqueue = []
- connect()
- getList(name)
- _getList(event)
- getListKeys(name)
- _getListKey(event)
- db_success(event)
- dbAction(action, name, key=None, obj=None)
- _processDbUpdate(event)
- _processQueue(event)
- _writeToStore(item, dbResult, dbTransaction)
- _deleteFromStore(item, dbResult, dbTransaction)
- _updateToStore(item, dbResult, dbTransaction)
- _deleteObjectStore(item, dbResult, dbTransaction)
- _registerObjectStore(item, dbResult, dbTransaction)
- vi.utils.mergeDict(original, target)
Package Contents
Classes
This is the screen superclass. |
|
This is the screen superclass. |
|
Functions
|
Attributes
- vi.vi_conf
- class vi.LoginScreen(*args, **kwargs)
Bases:
vi.screen.Screen
This is the screen superclass.
It represents a basic screen and its functionality.
- invoke(logout=False)
Is called to show the screen
- onLogoutSuccess(*args, **kwargs)
- doShowLogin(req, code, *args, **kwargs)
- insufficientRights()
- doSkipLogin(req)
- onGetAuthMethodsSuccess(req)
- selectHandler(handler=None)
- onGetAuthMethodsFailure(*args, **kwargs)
- redirectNoAdmin()
- class vi.AdminScreen(*args, **kwargs)
Bases:
vi.screen.Screen
This is the screen superclass.
It represents a basic screen and its functionality.
- onClick(event)
- reset()
- invoke()
Is called to show the screen
- getCurrentUser()
- getCurrentUserSuccess(req)
- getCurrentUserFailure(req, code)
- refresh()
- refreshConfig(req)
- startup()
- initializeViews()
- initializeConfig()
- openView(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False, target='mainNav')
- openNewMainView(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False)
- openNewPopup(name, icon, viewName, moduleName, actionName, data, focusView=True, append=False)
- log(type, msg, icon=None, modul=None, action=None, key=None, data=None)
- checkInitialHash(*args, **kwargs)
- execCall(path, params=None)
Performs an execution call.
- Parameters:
path – Path to the module and action
params – Parameters passed to the module
- stackWidget(widget, title='', icon=None)
We dont stack widgets anymore. We use now Popups.
- removeWidget(widget)
- switchFullscreen(fullscreen=True)
- isFullscreen()
- onError(req, code)
- vi.conf
- class vi.Application
Bases:
flare.html5.Div
- startup(*args, **kwargs)
- getVersionSuccess(req)
- getConfigSuccess(req)
- startupFailure(req, err)
- login(logout=False)
- admin()
- logout()
- setTitle(title=None)
- setPath(path='')
- vi.preloadIcons()
- vi.start()
- vi.s
- vi.a
- vi.d
- vi.sc
- vi.scinv
- vi.s
webworker_scripts
WARNING! THIS SCRIPTS ARE USED IN A SANDBOX SO ALL DEPENDENCIES SHOULD BE HANDELED HERE!
THIS USES PYODIDE V0.17!
Module Contents
Classes
Wrapper around XMLHttpRequest |
|
Functions
|
A very simple version of the NetworkService to request synchronous data |
Attributes
- webworker_scripts.request(url, params=None, jsonResult=True, whitelist=('/list', '/view'))
A very simple version of the NetworkService to request synchronous data
- class webworker_scripts.requestList(url, params=None, maxRequests=999)
- requestData()
- next()
- running()
- class webworker_scripts.csvWriter(delimiter=';')
- delimiter = ';'
- writeRow(row)
- writeRows(rows)
- download(name='export.csv')
- webworker_scripts.log