Welcome to ViUR Vi

_images/viur-vi.jpg

Administrativ viusal interface for the ViUR Information System

About

soon…

Getting started

Systemrequirements

soon…

Setup and Installation

Linux or WSL

soon…

Mac OS

soon…

Reference Guide

Overview

soon…

Handlers

soon…

Acionbars

soon…

Tutorials

Create a Actionbar Plugin

soon…

Create a Handler Plugin

soon…

Create a Navigation Plugin

soon…

API Reference

This page contains auto-generated API reference documentation [1].

vi

Subpackages
vi.actions
Submodules
vi.actions.context
Module Contents
Classes

ContextAction

class vi.actions.context.ContextAction(module, handler, actionName, *args, **kwargs)

Bases: flare.button.Button

onAttach()
onDetach()
onSelectionChanged(table, selection, *args, **kwargs)
onClick(sender=None)
openModule(data, title=None)
static isSuitableFor(module, handler, actionName)
vi.actions.edit
Module Contents
Classes

SaveContinue

SaveSingleton

ExecuteSingleton

SaveClose

Refresh

CancelClose

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()
class vi.actions.edit.Refresh(*args, **kwargs)

Bases: flare.button.Button

static isSuitableFor(module, handler, actionName)
onClick(sender=None)
performReload(sender=None)
resetLoadingState()
class vi.actions.edit.CancelClose(*args, **kwargs)

Bases: flare.button.Button

static isSuitableFor(module, handler, actionName)
onClick(sender=None)
resetLoadingState()
vi.actions.file
Module Contents
Classes

FileSelectUploader

Small wrapper around <input type="file">.

AddNodeAction

Adds a new directory to a tree.simple application.

AddLeafAction

Allows uploading of files using the file dialog.

EditAction

Provides editing in a tree.simple application.

DownloadAction

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

AddAction

Adds a new node in a hierarchy application.

EditAction

Edits a node in a hierarchy application.

CloneAction

Allows cloning an entry (including its subentries) in a hierarchy application.

DeleteAction

Deletes a node from a hierarchy application.

ReloadAction

Allows adding an entry in a list-module.

ListViewAction

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()
class vi.actions.hierarchy.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.hierarchy.ListViewAction(*args, **kwargs)

Bases: flare.button.Button

Allows adding an entry in a list-module.

static isSuitableFor(module, handler, actionName)
onClick(sender=None)
resetLoadingState()
vi.actions.list
Module Contents
Classes

AddAction

Allows adding an entry in a list-module.

EditAction

Allows editing an entry in a list-module.

CloneAction

Allows cloning an entry in a list-module.

DeleteAction

Allows deleting an entry in a list-module.

ListPreviewAction

ListPreviewInlineAction

CloseAction

SelectAction

SelectFieldsPopup

SelectFieldsAction

ReloadAction

Allows Reloading

TableNextPage

TablePrevPage

TableItems

SetPageRowAmountAction

Load a bunch of pages

LoadNextBatchAction

Load a bunch of pages

LoadAllAction

Allows Loading all Entries in a list

PageFindAction

Allows Loading all Entries in a list

ListSelectFilterAction

CreateRecurrentAction

ExportCsvAction

SelectAllAction

UnSelectAllAction

SelectInvertAction

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)
class vi.actions.list.UnSelectAllAction(*args, **kwargs)

Bases: flare.button.Button

static isSuitableFor(module, handler, actionName)
onClick(sender=None)
onAttach()
onDetach()
onTableChanged(table, count, *args, **kwargs)
class vi.actions.list.SelectInvertAction(*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

ShopMarkAction

ShopMarkPayedAction

ShopMarkSentAction

ShopMarkCanceledAction

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

AddLeafAction

Creates a new leaf (ie. a file) for a tree application

AddNodeOnlyAction

Adds a new node in a hierarchy application.

AddNodeAction

Creates a new node (ie. a directory) for a tree application

EditAction

Edits an entry inside a tree application.

DeleteAction

Allows deleting an entry in a tree-module.

ReloadAction

Allows adding an entry in a list-module.

SelectRootNode

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

ActionBar

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

SelectTable

Provides an Html-Table which allows for row selections.

DataTable

ViewportDataTable

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.sidebarwidgets
Submodules
vi.sidebarwidgets.filterselector
Module Contents
Classes

CompoundFilter

FilterSelector

class vi.sidebarwidgets.filterselector.CompoundFilter(view, module, embed=False, *args, **kwargs)

Bases: flare.html5.Div

onFilterChanged(*args, **kwargs)
reevaluate(*args, **kwargs)
focus()
class vi.sidebarwidgets.filterselector.FilterSelector(module, *args, **kwargs)

Bases: flare.html5.Div

onClick(event)

Handle event on filter selection (fold current active filter, expand selected filter and execute, if possible) :param event: :return:

onAttach()
onDetach()
onStartSearch(searchTxt=None)
setView(btn)
applyFilter(filter, filterID, filterName)
vi.sidebarwidgets.internalpreview
Module Contents
Classes

InternalPreview

class vi.sidebarwidgets.internalpreview.InternalPreview(module, structure, item, *args, **kwargs)

Bases: flare.html5.Ul

onCopyKey(btn)
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

editHandler

editHandlerWidget

class vi.views.edit.editHandler

Bases: flare.views.view.View

class vi.views.edit.editHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.views.hierarchy
Module Contents
Classes

hierarchyHandler

hierarchyHandlerWidget

class vi.views.hierarchy.hierarchyHandler

Bases: flare.views.view.View

static canHandle(moduleName, moduleInfo)
class vi.views.hierarchy.hierarchyHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.views.list
Module Contents
Classes

listHandler

listHandlerWidget

class vi.views.list.listHandler

Bases: flare.views.view.View

static canHandle(moduleName, moduleInfo)
class vi.views.list.listHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

onViewfocusedChanged(viewname, *args, **kwargs)
vi.views.log
Module Contents
Classes

logHandler

logHandlerWidget

class vi.views.log.logHandler

Bases: flare.views.view.View

class vi.views.log.logHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.views.notfound
Module Contents
Classes

NotFound

NotFoundWidget

class vi.views.notfound.NotFound

Bases: flare.views.view.View

class vi.views.notfound.NotFoundWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.views.overview
Module Contents
Classes

Overview

OverviewWidget

class vi.views.overview.Overview

Bases: flare.views.view.View

class vi.views.overview.OverviewWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.views.singleton
Module Contents
Classes

singletonHandler

singletonHandlerWidget

class vi.views.singleton.singletonHandler

Bases: flare.views.view.View

static canHandle(moduleName, moduleInfo)
class vi.views.singleton.singletonHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

onViewfocusedChanged(viewname, *args, **kwargs)
vi.views.tree
Module Contents
Classes

treeHandler

treeHandlerWidget

class vi.views.tree.treeHandler

Bases: flare.views.view.View

static canHandle(moduleName, moduleInfo)
class vi.views.tree.treeHandlerWidget

Bases: flare.views.view.ViewWidget

initWidget()

Here we start!

vi.widgets
Submodules
vi.widgets.accordion
Module Contents
Classes

AccordionSegment

Accordion

class vi.widgets.accordion.AccordionSegment(ident, title=None)

Bases: flare.html5.Fieldset

checkVisibility()
activate()
deactivate()
isActive()
toggle()
onClick(event)
addWidget(widget)
class vi.widgets.accordion.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:

vi.widgets.appnavigation
Module Contents
Classes

NavigationElement

NavigationSeperator

Navigationblock

AppNavigation

class vi.widgets.appnavigation.NavigationElement(name, icon=None, view=None, nav=None, closeable=False, opened=False)

Bases: flare.html5.Div

tpl = Multiline-String
Show Value
"""
             <div [name]="item" class="item has-hover">
                     <a class="item-link" @click="navigationAction">
                             <div class="item-image">
                                     <flare-icon value="{{icon}}" title="{{name}}"></flare-icon>
                             </div>

                             <div class="item-content">
                                     <div class="item-headline">{{name}}</div>
                             </div>
                     </a>

                     <span [name]="itemArrow" class="item-open is-hidden" @click="ArrowAction">
                             <flare-svg-icon value="icon-arrow-left"></flare-svg-icon>
                     </span>
                     <span [name]="itemRemove" class="item-pin is-hidden" @click="RemoveAction">
                             <flare-svg-icon value="icon-cancel"></flare-svg-icon>
                     </span>

             </div>
             <div [name]="subItem" class="list list--sub">
             </div>
             """
onActiveViewChanged(e, wdg, *args, **kwargs)
navigationAction(e=None, wdg=None)

Handle Click on Navigation Button

RemoveAction(e=None)

remove this Nav Element

ArrowAction(e, wdg=None)
onActiveNavigationChanged(e, wdg, *args, **kwargs)

What should happen if the State from the surrounding Navigation gets an update

onHasSubItemsChanged(e, wdg, *args, **kwargs)

If subChild is added, show itemArrow, hide if no subitem present

appendSubChild(element)
class vi.widgets.appnavigation.NavigationSeperator(name=None)

Bases: flare.html5.Div

buildSeperator()
_setValue(value)
class vi.widgets.appnavigation.Navigationblock(name, nav)

Bases: flare.html5.Div

addSeperator()
seperatorAction(e, wdg=None)
class vi.widgets.appnavigation.AppNavigation

Bases: flare.html5.Nav

getPreviousNavigationPoint(view)
getNavigationPoint(view)
addNavigationBlock(name)
addNavigationPoint(name, icon, view=None, parent=None, closeable=False, opened=False)
addNavigationPointAfter(name, icon, view=None, beforeElement=None, closeable=False, opened=False)
removeNavigationPoint(view)
vi.widgets.code
Module Contents
Classes

CodeHelpPopup

CodePopup

Codemirror

PythonCode

Scripter

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)
class vi.widgets.code.PythonCode(logger, scripter)

Bases: flare.html5.Div

addToLog(data, type='normal')

allowed types: normal, info, warn, error

workerFeedback(e)
run()
stop()
class vi.widgets.code.Scripter(coder=PythonCode, exampleCode=None, executable=True)

Bases: flare.html5.Div

runClick(event)
killClick(event)
openHelp(event)
startFullscreen(event)
vi.widgets.csvexport
Module Contents
Classes

ExportCsv

ExportCsvStarter

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')
class vi.widgets.csvexport.ExportCsvStarter(widget, *args, **kwargs)

Bases: flare.popup.Popup

onExportBtnClick(*args, **kwargs)
vi.widgets.edit
Module Contents
Classes

EditWidget

Functions

parseHashParameters(src[, prefix])

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

FileImagePopup

FilePreviewImage

Uploader

Uploads a file to the server while providing visual feedback of the progress.

MultiUploader

FileLeafWidget

FileNodeWidget

FileWidget

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.FileNodeWidget

Bases: vi.widgets.tree.TreeNodeWidget

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

HierarchyWidget

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

ParsedErrorItem

PassiveErrorItem

InternalEdit

Functions

checkErrors(→ Tuple[bool, List[str]])

class vi.widgets.internaledit.ParsedErrorItem(error)

Bases: flare.html5.Li

style = []
class vi.widgets.internaledit.PassiveErrorItem(error)

Bases: flare.html5.Li

style = []
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

ListWidget

Provides the interface to list-applications.

ViewportListWidget

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

Search

class vi.widgets.search.Search(*args, **kwargs)

Bases: flare.html5.Div

doSearch(*args, **kwargs)
resetSearch()
onKeyDown(event)
resetLoadingState()
reevaluate()
focus()
vi.widgets.sidebar
Module Contents
Classes

SideBar

class vi.widgets.sidebar.SideBar(*args, **kwargs)

Bases: flare.html5.Div

onAttach()
onDetach()
setWidget(widget)
getWidget()
close(*args, **kwargs)
vi.widgets.table
Module Contents
Classes

SelectTable

Provides an Html-Table which allows for row selections.

DataTable

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

TaskWidget

ServerTaskWidget

TaskSelectWidget

class vi.widgets.task.TaskWidget(title)

Bases: flare.popup.Popup

class vi.widgets.task.ServerTaskWidget(title, key)

Bases: TaskWidget

class vi.widgets.task.TaskSelectWidget

Bases: TaskWidget

getSelectedTask()
setActiveTask()
onChange(event)
invokeTask(*args, **kwargs)
vi.widgets.tooltip
Module Contents
Classes

ToolTip

Small utility class for providing tooltips

class vi.widgets.tooltip.ToolTip(shortText='', longText='', *args, **kwargs)

Bases: flare.html5.Div

Small utility class for providing tooltips

onClick(event)
_setDisabled(disabled)
_getDisabled()
vi.widgets.topbar
Module Contents
Classes

TopBarWidget

Provides the top-bar of VI

UserState

Tasks

Logout

Scripter

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)
class vi.widgets.topbar.Logout(*args, **kwargs)

Bases: flare.button.Button

onClick(event)
logout()
static canHandle(action)
class vi.widgets.topbar.Scripter(*args, **kwargs)

Bases: flare.button.Button

onCurrentUserAvailable(req)
updateUser()
onClick(event=None)
static canHandle(action)
vi.widgets.tree
Module Contents
Classes

TreeWidget

Base Widget that renders a tree.

BrowserLeafWidget

BrowserNodeWidget

BreadcrumbNodeWidget

TreeBrowserWidget

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.BrowserLeafWidget

Bases: flare.viur.widgets.tree.TreeLeafWidget

setStyle()
class vi.widgets.tree.BrowserNodeWidget

Bases: flare.viur.widgets.tree.TreeNodeWidget

setStyle()
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

UserLogoutMsg

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

Accordion

TopBarWidget

Provides the top-bar of VI

ListWidget

Provides the interface to list-applications.

EditWidget

ToolTip

Small utility class for providing tooltips

DataTable

Provides kind of MVC on top of SelectTable.

Search

SideBar

UserLogoutMsg

TaskWidget

TaskSelectWidget

InternalEdit

ExportCsv

ExportCsvStarter

TreeWidget

Base Widget that renders a tree.

TreeBrowserWidget

Base Widget that renders a tree.

HierarchyWidget

A Hierarchy is a Tree without leaf distinction!

FileWidget

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

AdminScreen

This is the screen superclass.

Attributes

viInitializedEvent

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()
appendNavList(NavList, target, parentInfo=())
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

updateConf(_conf)

getConf()

Attributes

vi_conf

conf

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

logEntry

PopOut Elements

logA

click handler for loglist

logWidget

LogButton

Log

Provides the "messaging" center displayed at the bottom of VI

Attributes

iddbTableName

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.logWidget(logList)

Bases: flare.html5.Div

builDataTable()
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

LoginInputField

BaseLoginHandler

UserPasswordLoginHandler

GoogleAccountLoginHandler

OAuthAccountLoginHandler

LoginScreen

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

Pane

Base class for Panes.

GroupPane

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()
class vi.pane.GroupPane(*args, **kwargs)

Bases: Pane

This pane groups subpanes; it cannot have direct childrens

loadChildren()
DeferredLoadChildren(delay=1000)
onClick(event=None, *args, **kwargs)
expand()
collapse()
onFocus(event)
vi.priorityqueue
Module Contents
Classes

StartupQueue

Attributes

HandlerClassSelector

actionDelegateSelector

initialHashHandler

extendedSearchWidgetSelector

toplevelActionSelector

loginHandlerSelector

startupQueue

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

Screen

This is the screen superclass.

class vi.screen.Screen(*args, **kwargs)

Bases: flare.html5.Div

This is the screen superclass.

It represents a basic screen and its functionality.

lock()
unlock()
invoke()

Is called to show the screen

remove()

Remove the screen from its parent

setTitle(title=None)
vi.serversideaction
Module Contents
Classes

ServerSideActionWdg

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

indexeddbConnector

indexeddb

Functions

render_url(url, module[, entry])

Renders a URL that contains {{variables}}, e.g. for previews.

formatString(format, data[, structure, language])

Parses a string given by format and substitutes placeholders using values specified by data.

getImagePreview(data[, cropped, size])

setPreventUnloading([mode])

mergeDict(original, target)

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

LoginScreen

This is the screen superclass.

AdminScreen

This is the screen superclass.

Application

Functions

preloadIcons()

start()

Attributes

vi_conf

conf

s

a

d

sc

scinv

s

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()
appendNavList(NavList, target, parentInfo=())
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

requestList

csvWriter

weblog

HTTPRequest

Wrapper around XMLHttpRequest

SimpleNetwork

Functions

request(url[, params, jsonResult, whitelist])

A very simple version of the NetworkService to request synchronous data

Attributes

log

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')
class webworker_scripts.weblog
static info(text)
static warn(text)
static error(text)
webworker_scripts.log
class webworker_scripts.HTTPRequest(method, url, callbackSuccess=None, callbackFailure=None, payload=None, content_type=None, asynchronous=True)

Bases: object

Wrapper around XMLHttpRequest

onReadyStateChange(*args, **kwargs)

Internal callback.

class webworker_scripts.SimpleNetwork

Bases: object

genReqStr(params)
request(url, params)
onCompletion(text)
onError(text, code)