{% extends 'admin/master.html' %} {% block body %}

Site Administration

The pages here let you directly edit the database of the site. The editing interface is somewhat low-level, so before you use it you should probably know more about the internals of the site.

The MeieRaha database consists of four tables, which you might or might not need to edit: Settings, Users, Datasets and Visualizations.


Settings

The Settings table currently contains some global parameters used in the application:


Users

The Users table is what you expect it to be - a list of users. The user credentials are only checked when this administration interface is accessed, and no matter what username you log in under, you will have full access. Hence, although you may in principle add users, a single admin user should suffice. You may want use the interface to edit the password, though.

Note that the password is stored in the database in encrypted form. However, when you edit the record, you should enter it in plaintext, and it will be automatically encrypted as necessary.


Datasets

The entries of the Datasets table represent separate panels in the MeieRaha visualization. A single visualization references three Datasets: the left panel, the right panel and the "comparison bubbles".

The Dataset record contains two fields: title and data. The first one is just a descriptive string, that is useful to identify the meaning of the dataset in the table of the admin interface (it is not displayed anywhere else). The second stores the content of a dataset is stored as a JSON record. The record must contain the fields:

The record may in addition, optionally contain the fields:

Revisions

A dataset may contain several "revisions". If it is the case, all the fields of the record except children may contain instead of a single value a list of values or an object of values. For example, suppose that the visualization has revisions "R1", "R2", and "R3". In this case, the following are valid examples of an amount field:

Special logic is used to interpret revisioned values of the actualFillAmount and plannedFillAmount. As noted above, actualFillAmount is used to determine the displayed "filling" of the bubble, however if for some revision it is not specified, value of plannedFillAmount will be used if available.

You can also use revisions for label and color fields, however note that if you specify label: {"R2": "Something"}, the system will not be able to guess a reasonable value for the label at revision R1.

The list of revisions of a multi-revision visualization must be specified within the meta field of the Visualization object (see below).

The Dataset database entry also has a title field, which is only used to identify the meaning of the dataset in the database for convenience.


Visualization

The entries in Visualization correspond to actual visualizations, available on the site. Each entry is specified by providing references to three Dataset entries (the left, the right and the comparison panels) a title (to help identify the record in the admin interface for the DB administrator) and a meta_data JSON record.

The meta_data record must have the field title which will be shown on the website to identify the visualization. In addition, the following optional fields are supported:


Back to the site Logout

{% endblock %}