Discovering Studio Views

Views are the primary resources of Rulex Studio. A view combines data and their graphical elements into a custom interface. In a view, users can create slides which are a series of display screens, or build interactions that open pop-up windows called dialogs, and even generate output PDFs called reports.

Views share the general features described in the Exploring Rulex Platform section. Here’s a sum-up:

  • A set of permissions can be defined to manage the resource itself (who can view, share, delete etc.).

  • Variables can be used to parametrize features and options of a view.

  • Versioning operations can also be performed on views.

To create a new view:

Procedure

  1. Click the Explore resources icon to open the Explorer pane.

  2. Hover over the Plus button.

  3. Select Create View.

  4. Enter a unique name for your view.

  5. Click Create.

Once the view has been created, you will enter automatically in the just created view to modify its internal structure. All the created views can be visualized in the Explorer pane and can also be organized into environments inheriting their specific features. If the View filter located in the top right side of the Explorer is switched on, only the primary resources, views in this case, and the environments within the current environment will be displayed in the Explorer. The internal properties of a view are controlled by a unique User Interface called stage window.

Attention

If the user has not the Modify permission set to ALLOW for a view, or it has a Viewer Studio license, the view will open directly in presentation mode.

To open an already created view, navigate through the Explorer, open the environment the view belongs to, and click on it, so the view stage opens. If the View permission for a view is set to ALLOW, then the user can open it.

Note

The view path is the path of the view within the user environment. The format of the path is "/RulexDesktop/Env_username/viewname".


View Status

When a view is selected for modification its usage is limited to a single user. The access for all the other users is prevented or limited to read-only operations. In particular, when a user opens a view through the GUI, then any other concurrent access is locked. In the Explorer pane, a lock icon next to the view entry line communicates to other users that the view cannot be opened.

Other status icons located next to the view entry line in the Explorer are used to show the versioning state of the considered resource. Refer to the versioning general overview for further information.

Status

Icon

Description

Locked

https://cdn.rulex.ai/docs/Factory/lockicon.webp

The view is already opened through Rulex Platform GUI by another user, and it can not be accessed.

Dirty

https://cdn.rulex.ai/docs/Factory/versioningAsterisk.webp

The view contains local modifications which are not pushed on the remote version.

Versioned

https://cdn.rulex.ai/docs/Factory/versioningTick.webp

The view is versioned. No local modifications are present with respect to the last pull operation.

Important

In this section the term user refers to user session. This means that a view cannot be opened simultaneously by the same physical user on two different devices.


View Modes

You can access a View either in edit mode or in presentation mode.

You are in edit mode when you open a view from the Explorer menu and the Modify permission is set to ALLOW.

In edit mode, users define the underlying structure of the view (e.g., how data should be displayed, which interactions can be performed, if data can be modified, added or deleted etc.). The view is built in edit mode as a set of custom interface which is going to be explored by the same person or a different one in presentation mode.

In presentation mode, users interact with the already constructed view as a provided custom interface. They analyze the displayed data or engage with dedicated buttons and filters, navigating through the provided screen slides.

Navigation in presentation mode can be structured in two different ways:

  • Standard navigation: view is organized as a list of subsequent slides. Users can navigate them by simply scrolling through them from the first to the last one. This is the natural behavior of a Power-point like presentation.

  • Link navigation: view slides are connected one to another through dedicated buttons, and they do not form a continuous presentation. This is the normal behavior of a custom web application.

By default, Standard navigation is enabled. In Standard navigation, hovering the mouse over the left side of the slide, users can open the Slides menu which displays the list of slides and their corresponding names, and allows navigating through the slides. Moreover, it is possible to move through the presentation slides by using the arrow keys, or by opening the slides list by placing the pointer on the left of the slide and clicking on the Slides navigation arrow to open the full slide list. Slides can be opened by clicking on them. Users can exit the presentation mode by pressing the Esc key on the keyboard or by using the presentation context menu, and they’ll go back editing the view.

Note

When the Viewer Studio license is used, or when the View permission is set to ALLOW and the Modify permission is set to DENY, users pressing the Esc key will land directly on the Studio homepage instead of entering edit mode, as they are not permitted to modify the underlying structure of the view.

In Link navigation, users will move only through integrated interactions, and they are not aware about the number or the order of the slides composing the view. They can exit the presentation mode by using the dedicated entry in the presentation context menu.

Operating on a view both in edit or in presentation mode, computation of flows can be started as a result of an event interaction. In edit mode, you can follow the ongoing computation and visualize the completed list of last runs through the Computation summary on the toolbar. In presentation mode when hovering the mouse over the right side of the slide, users can open the Computations summary menu which displays the list of computations in progress in Rulex Factory, which have been launched by the view, if any available. Computation summary can be hidden in presentation mode, by configuring an option through the presentation settings.

See also

Further information about the presentation mode and its settings are located in the dedicated page.


View Context Menu

When right-clicking on a single view or on a set of views (press SHIFT or CTRL to select multiple views), a context menu opens. The context menu entries are:

  • Delete: it deletes the selected views (also available on multiple view selection).

  • Rename: it renames the selected view.

  • Permissions: it opens the permissions panel where the permissions of the view can be modified.

  • Preferences: it defines the layout options of the view (also available on multiple view selection).

  • Presentation settings: it opens the Presentation settings menu where the presentation settings of the view can be modified (also available on multiple view selection).

  • Export: it exports the selected views to the chosen destination (also available on multiple view selection). Available only if the user has Share permission on the resource.

  • Versioning: it opens the available versioning options for the selected view. The available versioning options change according to the versioning status of the selected view.

  • Copy: it copies the selected view, and allows to subsequently paste it in a different environment location (also available on multiple view selection).

  • Cut: it cuts the selected view, and allows to subsequently paste it in a different environment location (also available on multiple view selection).

A view can be imported in an environment by clicking on the plus button in the Explorer panel as described in its general introduction.

In Rulex Studio, the presence of the primary resource view leads to some modifications in the environment context menu adding some view dedicated entries. Here’s a general overview about context menu actions of environments in Rulex Platform.

The additional available entry is Export views, which exports the views belonging to the selected environment in a single bulk operation each one on a different file.


Importing Views

Instead of creating views from scratch, you can also import them into Rulex Studio. This is useful when you want to work on views that have been previously created by other users on different machines.

The import process is very easy and user-friendly, but you must have the Create permission set to ALLOW on the selected environment.

Prerequisites

  • You must have created an environment (or use the default environment) and have the Create permission on it.

  • You must have a supported view file.

In Rulex Studio you can import files in RVW format, which are views exported from Rulex Studio.

Open the environment where you want to import your view, click on the plus button at the bottom right-side of the Explorer panel, select Import View, and the Import View pane opens allowing specific configuration options for the current import process.

Views can be imported from two different sources:

  • Filesystem local or remote containing a view in one of the supported file formats.

  • Repository where a remote version of the view file representation is selected and cloned into the system.

Once the connection to the filesystem has been established, the user needs to insert the desired connection to be used, which could be Saved or Custom as well as the relative path to the imported view file.

Once the connection to the repository has been imposed, you need to provide the unique hash name corresponding to the desired remote view to be imported and an optional tag name, if you do not want to import the latest version.

In the Import View panel, once the view has been selected, users can configure:

  • Desired View Name: in case of single importation - if more than one file is considered, the name will be automatically assigned by the system - you can define the name of the view once imported in the environment.

  • Import in current view - this checkbox is available only when importing a view while another view is open. If selected, it merges the open view with the incoming one. Values are not overwritten; however, names of widgets, datasets, variables, or events of the incoming view are automatically changed if they conflict with names in the current view.

Summarizing, to import a view in a selected environment you can follow this:

Procedure

  1. Click the Explore resources icon to open the Explorer pane.

  2. Hover over the Plus icon.

  3. Select Import View.

  4. Select if you want to import a view from a Filesystem or a Repository.

  5. In the Filesystem case:

    • From the SOURCE slider, select whether the imported view is coming from a previously saved location, or from a custom location you are going to specify following the instructions at this page.

    • Click the SELECT button and browse to the location of the view file you want to import.

  6. In the Repository case provide the hash name and eventually the tag name of the desired view remote version.

  7. Enter a new name for the view, if required, in the Insert desired view name text box.

  8. Click Import to complete the import operation.


Exporting Views

If you want to save a copy of your view to send it to other users or to store it, you can export an entire view in RVW format.

This exported file can then be imported on any machine where Rulex Platform is installed.

The Export View panel, opened from the Explorer context menu or directly from the toolbar for the current opened view, allows the configuration of export options, e.g. to decide its destination.

Exporting operations can be performed both to Local filesystem (i.e. your machine disk) or to any Remote filesystem supported. To configure the selected destination, you need to insert the desired connection you want to use (further information about Filesystem connection configuration available at this link), which could be Saved or Custom as well as the relative path of the destination folder.

Other important options you can configure from the Export View panel are:

  • Desired file name: the base name of the file you want to create (if empty, the view name will be used).

  • Additional options: it defines which additional information related to the exported view needs to be included in the final file. It accepts only Variables.

  • Export options: it defines the following general export options:

    • Only current slide: instead of exporting the whole set of views, it considers only the selection performed on the stage when exporting.

    • Add current date and time as prefix: it adds a timestamp prefix to the file name produced.

    • Add current date and time as suffix: it adds a timestamp suffix to the file name produced.

    • Add the last tag if the view has been versioned: it adds the tag name (if present in the latest commit) as suffix to the file name produced.

    • Export externally used resources (share permissions on external resources are required): it converts all Saved connections to Custom connections before the exportation on file.

Note

When importing a view which has specific Saved sources used for its external connection, and it has been exported from another environment, make sure to have the same Saved source within your environment, otherwise the next computation is going to return en error. If you want to produce an environment-independent view, please select Export externally used resources during exporting process. Take into account that to complete correctly the exporting operation, the Share permissions need to be available on any Saved resource used in the view.

To export a view to a file make sure to have the following:

Prerequisites

  • You must have created an environment (or use the default environment).

  • You must have a view within your environment, and own the Share permission.

Then follow these steps.

Procedure

  1. Click on the Explore Resources icon to open the Explorer panel.

  2. Select the view you want to export.

  3. Right-click the view you want to export or click on the three-dotted icon next to it.

  4. Click Export.

  5. From the DESTINATION slider, select whether the exported view should be sent to a previously saved location, or to a custom location you are going to specify following instructions at this page.

  6. Choose from the DESTINATION drop-down list if you want to export the view to your computer or to a remote connection (see filesystem description). If you are exporting to a remote connection, choose it from the list and then click on the pencil button to set the connection information required.

  7. Click SELECT button and browse to the location of the folder where you want to export.

  8. Write the file name in the Insert the desired file name edit box, define the Additional options and the Export options according to the description above.

  9. Click Export. When the progress bar reaches 100%, your exported view will be saved in the specified location.


View Preferences

From the View Layout Preferences menu, users can customize the layout settings of the selected view(s). These options can be accessed by right-clicking on the view from the Explorer pane, or you can click on the Preferences icon in the toolbar of the view.

Here it is possible to customize the following options:

  • Aspect ratio: the monitor’s aspect ratio. Possible values are:
    • 16:9 (default value)

    • 16:10

    • 4:3

    • Custom

  • Orientation: it defines the orientation of the view. This option is only available when Aspect ratio is Custom. Possible values of the orientation are:
    • Landscape

    • Portrait

  • Lock aspect ratio: if selected, the aspect ratio always remains the same. This option is only available when Aspect ratio is Custom.

  • Height (px): it defines the height of the view.

  • Width (px): it defines the wight of the view.

  • Scale content if dimensions change: if selected, when inserting a specific value in Height or Width the value scales accordingly and vice versa.

  • Background color: it defines the background color of the slide. By clicking it, users can select Standard colors, otherwise they can use the color picker or choose the color code, which can be: Hex, Rgb, Hsl, Hsv. The default color is white.

  • Image opacity (%): it defines the opacity level of the image.

  • Background image: it allows defining a background image for the view which can be set by clicking the Select button and browsing through your local folder.

  • Palette: it allows to create color palettes, which will be used in the widgets contained in the view. To know more on color palettes, go to the corresponding page.

  • Show grid: if selected, gridlines are displayed in the main slide.

  • Snap to grid: if selected, views will be moved following the lines of the underlying grid and users will be able to line up the widgets in their views.

  • X axis step: it defines the width of columns on the slide grid.

  • Y axis step: it defines the height of rows on the slide grid.

  • Show guided lines: if selected, guided lines are visible to allow you to align widgets on your slide.

  • Max number of computations: define the maximum number of computations which can be triggered by a Compute Flow event.

  • Propagate Action: if selected (default), filters on a table are automatically propagated to all tables with columns of the same name (see filter propagation). If not selected, filters affect only the current table. This option is available only by accessing the View Preferences from the toolbar in an opened view.

  • Mapbox token: paste here your Mapbox token, which will be used in the Geographic chart.


View GOLD Reference

Here the GOLD reference for the View class:

class studio.view.View(name, id=None, settings=None, instancename=None, editing_mode=False, info=None, layout_params=None, loadfields=True, env_id=None, isimport=False, user=None)

GOLD class view. Inherit from BaseVariable class.

Property id:

the identifier of the view

Property label:

the name of the view

Property db:

a reference of the working Database expressed as a Database instance

Property dashboard:

the Dashboard instance which represents the base slides and dialogs

Property dataset:

the Dataset instance which contains the set of data

Property report:

the Report instance which represents the list of reports

Property bookmark_list:

a dictionary with keys the table_id and values the name of the table

Property bookmark_list_reverse:

a dictionary with keys the table names and values the corresponding identifier

Property instancename:

the name of the parser if imposed

Property __preview__:

private field to manage table preview

Property oldattributes:

private field to manage backup operation

Property env_id:

the identifier of the environment the view belongs to

Property inrepo:

if True the view is versioned

Property relations:

dictionary containing the relations between tables in the form {<table_id>: [vector of identifier of connected tables, ...], ...}

Property edited_tables:

vector of tables with active editing

Property inmemory:

if True the view is loaded in-memory and not connected to a working database

add(branchname=None, filename=None, **source)

Function to start the versioning of a flow/view

Parameters:
  • commitname (text) – the author name, defaults to None

  • branchname (text) – the name of the branch, defaults to None

  • filename (text) – the name of the file, defaults to None

Returns:

a dictionary with the name of the new branch and the name of the file

Type:

dict

addBookmark(vec_label_table, vec_path_source, vec_type, vec_params, vec_id_table=None)

Function to add tables

Parameters:
  • vec_label_table (vector of text type) – a vector of names of table to add

  • vec_path_source (vector of text type) – vector of paths of saved source to use to add the table

  • vec_type (vector of text type) – vector of table origin

  • vec_params (list) – list of dictionaries with the parameters of the import

addRelations(id, rel)

Function to add a relations between the table

Parameters:
  • id (text) – the identifier of the original table

  • rel (vector of text type) – the vector of table to connect

alignDashboard(scope)

Function to change the current slide in the internal Dashboard instance

Parameters:

scope (text) – the name of the slide to select

alignDataset(scope)

Function to change the current dataset in the internal Dataset instance

Parameters:

scope (text) – the name of the table to set

Returns:

True if the scope has been correctly changed, False otherwise

Return type:

binary

alignReport(scope)

Function to change the current Report in the internal Report instance

Parameters:

scope (text) – the name of the Report to select

alignReportPage(scope)

Function to change the current page in the current Report

Parameters:

scope (text) – the name of the page to select

changeSessionlike(value)

Function to change the editing mode

Parameters:

value (binary) – the new editing mode

checkTable(table, attributes=[])

Function to check if a table is used

Parameters:
  • table (text) – the name of the table

  • attributes (vector of text type) – possible vector of attributes to restrict the check to only that attributes, defaults to []

Returns:

True if the table is used, False otherwise

Return type:

binary

checkVariableUsed(name, update=None, alsomultiple=False)

Function to check if a set of variables is used or not in the primary resource

Parameters:
  • name (vector of text type) – the name of the variables to test

  • update (dict) – FIXME, defaults to None

Returns:

a dictionary of results

Return type:

dict

copyDashboard(dashlist, isdialog=False)

Function to copy slides

Parameters:
  • dashlist (vector of text type) – the name of the slides to move

  • isdialog (binary) – if True slides are dialog slides, defaults to False

Returns:

dictionary in the form {"label": vector of slide names, "get" : vector of information about the copied slides}

Return type:

dict

copyPage(copydict, report_dest=None)

Function to copy pages

Parameters:
  • copydict (dict) – a dictionary selecting the page to copy in the form {<report name> : [vector of page names]}

  • report_dest (text) – name of the destination report, None for the current one, defaults to None

Returns:

dictionary in the form {<report_name>: {"label": vector of page names, "get" : vector of information about the copied pages}, ...}

Return type:

dict

copyReport(reportlist, reportidlist)

Function to copy reports

Parameters:

reportlist (vector of text type) – the name of the reports to move

Returns:

dictionary in the form {"label": vector of `Report <../stage/leftpanel/reports#report-and-page-gold-reference>`__ names, "get" : vector of information about the copied reports}

Return type:

dict

createDashboard(label_dash, layout_dash, order_dash=None, id_dash=None)

Function to add a new slide on the view

Parameters:
  • label_dash (text) – the name of the slide

  • layout_dash (dict) – the layout of the slide

  • order_dash (integer) – the order of the slide, None for the bottom, defaults to None

  • id_dash (text) – the identifier of the slide, None to generate it internally, defaults to None

Returns:

the identifier of the new slide

Return type:

text

createMultiVariable(varname, type, value, issensitive, local, updatevariable=False)

Function to create a set of variables

Parameters:
  • varname (vector of text type) – the vector of variable names to create

  • type (vector of text type) – the vector of variable types to create

  • value (vector of text type) – the value of the created variables

  • issensitive (vector of binaries) – if True the variable created are sensitive

  • local (vector of binaries) – if True the variable is not inherited by the environment

  • updatevariable (binary) – if True a message of update is sent to the interface to update eventual cached value, defaults to False

createReport(label_report, layout_report, order_report=None, id_report=None)

Function to add a new report

Parameters:

label_report (text) – the name of the new report

:param layout_report. the layout of the new report :type layout_report: dict

Parameters:
  • order_report (integer) – the position of the new report, use None to place it at the bottom of the list, defaults to None

  • id_report (text) – the identifier of the new report, use None to generate it internally, defaults to None

Returns:

the identifier of the new report

Return type:

text

createTag(tagname, tagmessage)

Function to create a tag in a flow/view version history

Parameters:
  • tagname (text) – the tag name

  • tagmessage (text) – the tag message

delete()

Function to delete the view from the current Database

deleteDashboard(dashlist, force=False)

Function to delete slides

Parameters:
  • dashlist (vector of text type) – the name of the slides to delete

  • force (binary) – if True use checks are disable, defaults to False

deleteDashboardOrder(id_dashboard)

Function to delete a slide given its identifier

Parameters:

id_dashboard (text) – the identifier of the slide to delete

deleteDocumentation()

Function to remove all the view documentation

deleteMultiVariable(name, vartype)

Function to delete a set of variables

Parameters:
  • name (vector of text type) – variables to be deleted

  • vartype (vector of text type) – type of the variables to be deleted

deletePage(deletedict)

Function to delete pages

Parameters:

deletedict (dict) – a dictionary selecting the page to delete in the form {<report name> : [vector of page names]}

deleteReport(reportlist, force=False)

Function to delete reports

Parameters:
  • reportlist – the name of the reports to delete

  • force (binary) – if True use checks are disable, defaults to False

deleteReportOrder(id_report)

Function to delete a Report given its identifier

Parameters:

id_report (text) – the identifier of the Report to delete

disableAllAction()

Functon to disable all action effects

disableAllSelection(label_dash=None)

Function to disable all selections on a slide

Parameters:

label_dash (text) – the name of the slide to consider, None for the current one, defaults to None

draw(withdata=True, alsoactions=True, withrestore=True, objectids=None, tablelist=None, currdash=None)

Function to draw a view

Parameters:
  • withdata (binary) – if True data are loaded, defaults to True

  • alsoactions (binary) – if True actions are then evaluated at the end of the draw, defaults to True

  • withrestore (binary) – if True previous operations in the undo stack and not saved modifications are discarded, defaults to True

evaluateVariable(fixedvars=None, mode='list', evaluate=True, db=None, noload=None, cachevault=1, raiserror=False, reloadvar=False, alsosensitive=True, sensitivevars=None)

Function to load the variable

Parameters:
  • fixedvars (dict) – in loading variable in case of module it contains the list of variables set through the module option procvar, default to None

  • mode – the type of desired output, list or dict

  • evaluate (binary) – if True the result will contain the evaluated value and not the code string, defaults to True

  • db – the working database, expressed as a Database instance

  • noload (vector of text type) – vector of variable names which needs to be skipped from the evaluation, defaults to None

  • cachevault (integer) – if True or 1 the variable from vault are cached, defaults to 1

  • raiseerror (binary) – if True an error is raised in case of error in the evaluation, defaults to False

  • reloadvar (binary) – if True variables are reloaded and all precedent values discarded, defaults to False

Typa mode:

text

Typa db:

Database

execute(withtables=True, tablelist=None, alsoflow=False, sendrefresh=False, withrestore=True, currdash=None)

Function to execute a view, triggered when refresh button on tables is clicked

Parameters:

withtables (binary) – if True tables are reloaded at the beginning of the execute, defaults to True

export(path=None, name=None, fields=None, writefile=True, source_custom=True, addsuffix=False, addprefix=False, addtag=False, zipfile=True, addsens=False, dashlist=None, reportlist=None, env_path=None)

Function to export a view

Parameters:
  • path (text) – the path of the destination folder, defaults to None

  • name (text) – the name of the view, defaults to None

  • diz_export (dict) – dictionary to control view components to export, None for all, defaults to None

  • source_custom (binary) – if True the saved source are converted to custom source in the exported file, defaults to True

  • addsuffix (binary) – if True a timestamp is added as a suffix of the exported basename, defaults to False

  • addprefix (binary) – if True a timestamp is added as a prefix of the exported basename, defaults to False

  • addtag (binary) – if True for versioned view, the latest tag is added as suffix of the exported basename, defaults to False

  • addsens (binary) – if True sensitivity label is added to the final name, defaults to False

  • dashlist (vector of text type) – the vector of slides you want to export, None for all, defaults to None

  • reportlist (vector of text type) – the vector of reports you want to export, None for all, defaults to None

exportTables(tableslist)

Function to export tables on the external sources

Parameters:

tableslist (vector of text type) – the name of the tables to export

fork(name, id=None, tagname=None, fields=None, env_id=None, user=None)

Function to create a new branched flow/view from an original flow/view

Parameters:
  • name (text) – the name of the new branched flow/view

  • id (text) – the identifier to be used for the new branched flow/view, None to generate it internally, defaults to None

  • tagname (text) – the optional tag to fork from, defaults to None

  • fields (dict) – the dictionary to not fork part of the flow/view description, None to fork the whole flow/view, defaults to None

  • env_id (text) – the optional identifier of the environment of the new branched flow/view, None for the same one of the original flow/view, defaults to None

  • branchname (text) – the optional identifier for the new branchname of the forked flow, defaults to None

  • filename (text) – the optional identifier for the filename of the forked flow, defaults to None

Returns:

a dictionary containing the id of the new branched flow/view and a list containing the hashes of the newly created branches

Return type:

dict

getBookmarkInfo(listBookmark)

Function to get information about tables

Parameters:

listBookmark (vector of text type) – vector of table names

Returns:

dictionary of information with keys the names of the tables and values their associated characteristic

Return type:

dict

getDashboard(label_dash=None)

Function to retrieve information about a slide

Parameters:

label (text) – the name of the slide to retrieve, None for the current one, defaults to None

Returns:

a dictionary in the form {"order": <integer>, "layout": <dict>, "id": <text>}

Return type:

dict

getDashboardOrder(id_dashboard)

Function to get the position of the slide

Parameters:

id_dashboard (text) – the identifier of the slide

Returns:

the position of the slide

Return type:

integer

getDocumentation()

Function to obtain the view documentattion

getEditingMode()

Function to return the editing mode of the view

Returns:

the editing mode expressed as True/False

Return type:

binary

getHierarchyOrder(tables=None, index=False)

Function to order a set of tables according to their topology hierarchy

Parameters:
  • tables (vector of text type) – the name of the tables to consider, None for all, defaults to None

  • index (binary) – if True the order is returned indirect, otherwise the names are sorted, defaults to False

Returns:

the index of the tables sorted, or directly the sorted vector of task names

Return type:

vector of integers or of text type

getInfo()

Function to obtain the general information about the view

Returns:

dictionary of information

Return type:

dict

getNumTables()

Function to objtain the number of tables

Returns:

the number of tables

Return type:

integer

getPath(onlyEnv=True)

Function to get the path of the view resource

Parameters:

onlyEnv (binary) – if True the path up to the parent environment is returned, defaults to True

Returns:

the desired path

Return type:

text

getReport(label_report=None)

Function to retrieve information about a report

Parameters:

label_report (text) – the name of the Report to retrieve, None for the current one, defaults to None

Returns:

a dictionary in the form {"order": <integer>, "layout": <dict>, "id": <text>}

Return type:

dict

getReportOrder(label_report)

Function to get the position of the report

Parameters:

label_report (text) – the name of the report

Returns:

the position of the slide

Return type:

integer

importIncurrView(filepath, absolute=True)

Function to import a view and merge it with the current one

Parameters:

filepath (text) – the path to the rvw file to import

importTable(category, info, nToLoad=None, id_table=None, store=False, path_source=None, source_type=None)

Function to import a table

Parameters:
  • category (text) – the type of task category to be execute to import the table

  • info (dict) – dictionary of task options to configure the import

  • nToLoad (number) – number of rows to load, None for all, defaults to None

  • id_table (text) – the identifier of the imported table, None to generate it internally, defaults to None

  • store (binary) – if True the imported table is then stored on the working Database and added to the internal Dataset instance, otherwise it is returned as separate Dataset instance, defaults to False

Returns:

if store is False the imported Dataset instance

Return type:

Dataset

importTable_flow(path_source, id_table, info_table, store=False)

Function to import a table from a flow

Parameters:
  • path_source (text) – path of saved source to use to add the table

  • id_table (text) – the identifier of the imported table

  • info (dict) – dictionary of options to configure the import

  • store (binary) – if True the imported table is then stored on the working Database and added to the internal Dataset instance, otherwise it is returned as separate Dataset instance, defaults to False

importTable_view(path_source, id_table, info_table, store=False)

Function to import a table from a view

Parameters:
  • path_source (text) – path of saved source to use to add the table

  • id_table (text) – the identifier of the imported table

  • info (dict) – dictionary of options to configure the import

  • store (binary) – if True the imported table is then stored on the working Database and added to the internal Dataset instance, otherwise it is returned as separate Dataset instance, defaults to False

importView(id=None, name=None, db=None, env_id=None, fields=None, defaultdash=None, user=None)

Function to import a view

Parameters:
  • path (text) – the path of the view .rvw file

  • id (text) – the identifier of the imported view, None to internally generate it, defaults to None

  • name (text) – the name of the view to import, None to derive it from the file basename, defaults to None

  • db (Database) – the working database, expressed as a Database instance

  • env_id (text) – the identifier of the environment id, None for the current one, defaults to None

  • fields (dict) – a dictionary to control the components of a view to import

  • defaultdash (text) – the slide to be set as the default one, None for the first, defaults to None

Returns:

the import View instance

Return type:

View

insertDashboardOrder(id_dashboard, order)

Function to insert a slide in a particular position

Parameters:
  • id_dashboard (text) – the identifier of the inserted slide

  • order (integer) – the position of the new slide

insertReportOrder(id_report, order)

Function to insert a Report in a particular position

Parameters:
  • id_report (text) – the identifier of the inserted report

  • order (integer) – the position of the new report

listBookmark(aslist=False)

Function to list tables

Parameters:

aslist (binary) – if True a vector of table names is returned otherwise a list of dictionaries in the form ({"name": <table name>, "type": <table type>}, ...), defaults to False

Returns:

the list of all the tables

Return type:

list or vector of text type

listDashboard(aslist=False, evalpar=True)

Function to list all the slides

Parameters:
  • aslist (binary) – if True output is returned as a list of dictionary, otherwise as a dictionary with key the name of the slides, defaults to False

  • evalpar (binary) – if True, the parametrization is evaluated taking into consideration eventual presence of variables in slide layout, defaults to False

Returns:

a list or a dictionary with base information about all the slides

Return type:

list or dict

listReport(aslist=False, evalpar=True)

Function to list all the reports

Parameters:

aslist (binary) – if True output is returned as a list of dictionary, otherwise as a dictionary with key the name of the reports, defaults to False

Returns:

a list or a dictionary with base information about all the reports

Return type:

list or dict

listVariables(aslist=False, currtype=None)

Function to list the variables

Parameters:
  • aslist (binary) – if True the output will be returned as a list of 5 vector: name, type, value, issensitive and source, False as a dictionary with key the variable name and value the information about it, defaults to False

  • currtype (text) – the type to filter. One of code or vault, use None for all, defaults to None

Returns:

the variables defined

Type:

list or dict

load(loadfields=True, env_id=None)

Function to load the View from the Database

Parameters:
  • loadfields (binary) – if True relations are loaded, defaults to True

  • env_id (text) – the identifier of the environment the view belongs to, defaults to None

loadVariables()

Function to load variables from the database

log(revision=None, limit=10, showdiff=False, showlogsize=False)

Function to show the version history of a flow/view

Parameters:
  • revision (text) – the starting commit, None for the latest, defaults to None

  • limit (integer) – the number of history row to be shown, defaults to 10

  • showdiff (binary) – if True the number of addition, deletion is shown next to each log entry, defaults to False

  • showlogsize (binary) – if True the number of file modified is shown next to each log entry, defaults to False

merge(branchname, filename=None, tagname=None, mergepolicy=None)

Function to merge a remote branch into the current flow/view

Parameters:
  • branchname (text) – the branch name we want to merge

  • filename (text) – the specific file in branchname we want to merge

  • tagname (text) – the eventual tag we want to consider as starting point, None for the latest, defaults to None

  • mergepolicy (text) – the type of mergepolicy to use, defaults to None

modifyMultiVariable(deletevars, deletetypes, createvars, createtypes, createvalues, createissensitive)

Function to modify a set of variables

Parameters:
  • deletevars (vector of text type) – the name of the variables to be deleted

  • deletetypes (vector of text type) – the type of the variables to be deleted

  • createvars (vector of text type) – the name of the variables to be created

  • createtypes (vector of text type) – the type of the variables to be created

  • createvalues (vector of text type) – the values of the created variables

  • createissensitive (vector of binaries) – the issensitive property of the created variables

moveDashboard(dashlist, index=None, before=False)

Function to move slides

Parameters:
  • dashlist (vector of text type) – the name of the slides to move

  • index (vector of integers) – the new positions of the slides or None to put them at the beginning or at the end of the whole list, defaults to None

  • before (binary) – if True slides are put right before the selected position or before the whole list, otherwise after, defaults to False

movePage(movedict, report_dest=None)

Function to move pages

Parameters:
  • movedict (dict) – a dictionary selecting the page to move in the form {<report name> : {"pagelist": [vector of page names], "indexes": [vector of final positions]}}

  • report_dest (text) – name of the destination report, None for the current one, defaults to None

moveReport(reportlist, indexes)

Function to move reports

Parameters:
  • reportlist (vector of text type) – the name of the reports to move

  • indexes (vector of integers) – the new positions of the reports

pull(mergepolicy=None)

Function to pull a versioned flow/view

Parameters:

mergepolicy (text) – the merge policy to be used in case, one of ours or theirs, defaults to None

push(message, mergepolicy=None)

Function to pull a versioned view

Parameters:
  • message (text) – the commit message to use

  • mergepolicy (text) – the merge policy to be used in case, one of ours or theirs, defaults to None

refreshTables(tablelist=None, alsoflow=False)

Function to refresh a list of tables

Parameters:

tablelist (vector of text type) – the name of the tables to refresh, None for all, defaults to None

Returns:

True if any table has changed, False otherwise

Return type:

binary

reloadInteractions()

Function to reload all the interactions (relations, indrow) of a view

removeBookmark(vec_label_table)

Function to delete tables

Parameters:

vec_label_table (vector of text type) – a vector of names of table to delete

removeFromRepo()

Function to remove a flow/view from the version control system without removing the remote branch

removeVariable(name, type)

Function to remove a variable

Parameters:
  • name (vector of text type) – the names of the variables to be deleted

  • type (vector of text type) – the types of the variables to be deleted. Possible values are: code or vault

rename(newlabel)

Function to rename the view

Parameters:

newlabel (text) – the new name of the view

renameBookmark(oldname, newname)

Function to rename a table

Parameters:
  • oldname (text) – the old name of the table

  • newname (text) – the new name of the table

renameDashboard(newname, oldname=None)

Function to rename a slide

Parameters:
  • newname (text) – the new name of the slide

  • oldname (text) – the name of the slide to rename, None for the current one, defaults to None

renameReport(newname, oldname=None)

Function to rename a report

Parameters:
  • newname (text) – the new name of the report

  • oldname (text) – the name of the Report to rename, None for the current one, defaults to None

renameVariable(vartype, oldname, newname)

Function to rename a variable

Parameters:
  • vartype (vector of text type) – the type of the variables to rename

  • oldname (vector of text type) – the old name of the variables

  • newname (vector of text type) – the new name of the variables

revert(commitsha, iscommit=False)

Function to revert a flow/view

Parameters:
  • commitsha (text) – the SHA1 of the commit you want to revert or the reference name

  • iscommit (binary) – if True the commitsha parameter is a SHA1 of a commit, otherwise it is supposed to be a reference name, defaults to False

save(last_modified=None, info=None, storebook=True, layout_params=None, isimport=False)

Function to save the View instance on Database

Parameters:
  • last_modified (binary) – the value of last_modified to store on the Database, None to generate it internally, defaults to None

  • info (dict) – general view info to store, defaults to None

  • storebook (binary) – if True the tables are stored too, defaults to True

  • layout_params (dict) – the parameter of the layout of the view, defaults to None

saveTab(listtab)

Function to save tables contained in the Dataset instance to the working database

Parameters:

listtab (vector of text type) – the vector of table to save

setCloseDialog(dialog)

Function to close the dialog

Parameters:

dialog (text) – the dialog to close

setDashboard(layout=None, order=None, label=None, label_dash=None)

Function to modify the layout or the position or the name of a slide

Parameters:
  • layout (dict) – if present, the new layout of the slide, defaults to None

  • order (integer) – if present, the new position of the slide, defaults to None

  • label (text) – if present, the new name of the slide, defaults to None

  • label_dash (text) – the name of the slide to modify, None for the current one, defaults to None

setDirtyStatus(dirty=True)

Function to set dirty status on the primary resource

Parameters:

dirty (binary) – the status to set, defaults to True

setDirtyStatusView(dirty=True)

Function to set a view as dirty

Parameters:

dirty (binary) – the dirty status, defaults to True

setDocumentation(documentation, withencrypt=True)

Function to modify the view documentation

Parameters:

documentation (text) – the view documentation

setEditedTables(vec_tab)

Function to set a list of tables which are edited

Parameters:

vec_tab (vector) – the vector of table with active editing

setOpenDialog(orig_dashboard, dialog, withfilter=False)

Function to draw a dialog

Parameters:
  • orig_dashboard (text) – the original slide opening the dialog

  • dialog (text) – the dialog to open

  • withfilter (binary) – if True the dialog inherits the indrows evaluated on the table of the slides, defaults to False

Returns:

the graphical representation as GOLD dictionary of the dialog slide

Return type:

dict

setReport(layout=None, order=None, label=None, label_report=None)

Function to modify the layout or the position or the name of a report

Parameters:
  • layout (dict) – if present, the new layout of the report, defaults to None

  • order (integer) – if present, the new position of the report, defaults to None

  • label (text) – if present, the new name of the report, defaults to None

  • label_report (text) – the name of the Report to modify, None for the current one, defaults to None

setVariable(varname, vartype, value, issensitive)

Function to modify a set of variables

Parameters:
  • varname (vector of text type) – the name of the variables to be modified

  • vartype (vector of text type) – the type of the variables to be modified

  • value (vector of text type) – the values of the modified variables

  • issensitive (vector of binaries) – the issensitive property of the modified variables

toggleDialogDashboard(dashlist, isdialog)

Function to convert a list of slides into dialogs

Parameters:
  • dashlist (vector of text type) – the name of the slides to move

  • isdialog (binary) – if the slides are to become dialogs or not

Returns:

dictionary in the form {"label": vector of slide names, "get" : vector of information about the changed slides}

Return type:

dict

toggleVariableSource(varname, vartype, source)

Function to change the source of a set of variables

Parameters:
  • varname (vector of text type) – the name of the variables to be changed

  • vartype (vector of text type) – the type of the variables to be changed

  • source (vector of binaries) – the new source to set, True for local

updateBookmark(vec_path_source, vec_type, vec_id_table, vec_string_info)

Function to update an existing table

Parameters:
  • vec_path_source (vector of text type) – vector of paths of saved source to use to add the table

  • vec_type (vector of text type) – vector of table origin

  • vec_id_table (vector of text type) – vector of identifiers of the table to modify

  • vec_string_info (vector of text type) – vector of JSON string containing the information about table import options

updateRepository(**source)

Function to change the repository the flow is connected to

Parameters:
  • type (text) – the type of repository, None for git, defaults to None

  • url (text) – the url of repository, defaults to None

  • username (text) – the username of repository, defaults to None

:param password. the password of repository, defaults to None :type password: text

Parameters:
  • local (text) – the local path of the repository, defaults to None

  • mail (text) – the mail used for the commit, defaults to None

  • commitname (text) – the author name, defaults to None

updateVersionStatus(status='ready')

Function to update the version status of the flow

Parameters:

status (text) – the status of the flow