Commit eef4e0f6 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polish the user guide documentation.

parent 031af941
.. include:: hyperlinks.txt
.. _Appendix A:
Appendix A: Database fields
......
.. include:: hyperlinks.txt
.. _Appendix B:
Appendix B: Virtual fields
......
.. _JSON: http://www.json.org/
.. include:: hyperlinks.txt
.. _Appendix C:
......
.. include:: hyperlinks.txt
.. _Appendix D:
Appendix D: Plot configuration
......
.. _smart_query: http://web2py.com/books/default/chapter/29/06/the-database-
abstraction-layer#smart_query--experimental
.. _Web2py: http://web2py.com/
.. include:: hyperlinks.txt
The fitler conditions is defined in the ``General`` tab.
......@@ -16,5 +13,20 @@ select history related changelog events, enter::
history.id_events = 7
The operator ``contain``, ``greater then``, ... as well as the logical operator
``and``, ``or`` can be used.
The following operators are understood:
* ``&``, ``and``
* ``|``, ``or``
* ``~``
* ``==``, ``=``, ``equal to``, ``equal``, ``equals``, ``is``
* ``<``, ``less than``
* ``>``, ``greater than``
* ``<=``, ``=<``, ``less or equal than``, ``equal or less than``,
``less or equal``, ``equal or less``
* ``>=``, ``=>``, ``greater or equal than``, ``equal or greater than``,
``greater or equal``, ``equal or greater``
* ``<>``, ``not equal to``, ``not equal``
* ``starts with``
* ``ends with``
* ``not in``
Addressing database fields
===============================
.. include:: hyperlinks.txt
.. _Fig 1:
.. figure:: ../../database.png
......@@ -9,23 +11,29 @@ Addressing database fields
Figure 1
*Overview of the database fields.*
The fields of the database and their relations are shown in the
:ref:`Fig 1` and summarized in the :ref:`Appendix A`. The ``history`` and
``people`` table contains also virtual fields. Their values are not stored in
the database but computed, on-demand, for each request. Their definitions are
given in the :ref:`Appendix B`.
The database fields ``events.data`` and ``history.data`` are very peculiar
since they contains a python dictionary encoded as a JSON string. The structure
of the dictionary is defined by the user and it depends on the *event*. Reports
have to access to any dictionary key. In order to illustrate the addressing of
such field, we take the event *CHANGELOG*. The associated dictionary has only
one key: ``log``. The address ``history.data.log`` allows to access to its
content.
Basic field type
----------------
The basic field contains ``blob``, ``boolean``, ``date``, ``datetime``,
``double``, ``float``, ``integer``, ``string``, ``text`` and ``time`` values.
The addressing of these field follows the usual rules::
In summary, the addressing of the database fields are::
tablename.fieldname
JSON field type
----------------
The Web2py_ framework introduces the additional type ``json`` which can store
JSON_ serializable object. It is used, in this application, to store python
dictionary. This is the case of ``events.data`` and ``history.data`` fields.
Reports have to access to any dictionary key. In that case, the address is
given by::
tablename.fieldname.keyname
.. include:: hyperlinks.txt
How to configure a graph
======================================
==========================
..
The collection of hyperlinks used in the different section
.. _ExtJS: http://docs-origin.sencha.com/extjs/4.2.1/#!/api
.. _JSON: http://www.json.org/
.. _Pandas: http://pandas.pydata.org/pandas-docs/stable/
.. _smart_query: http://web2py.com/books/default/chapter/29/06/the-database-
abstraction-layer#smart_query--experimental
.. _Web2py: http://web2py.com/
How to configure a list
=======================
.. _ExtJS: http://docs-origin.sencha.com/extjs/4.2.1/#!/api
.. _JSON: http://www.json.org/
.. _smart_query: http://web2py.com/books/default/chapter/29/06/the-database-
abstraction-layer#smart_query--experimental
.. _Web2py: http://web2py.com/
.. include:: hyperlinks.txt
.. _Fig 2:
......@@ -18,14 +11,14 @@ How to configure a list
Figure 2
*An example of list in which rows are grouped per year and sorted
by institutes, people categories and name. The first group is expanded while
the second one is collapsed.*
A list is a table in which each column shows the values of one database
field. The table contains heterogeneous values since the type a of the
column is the one of the database field. The table is rendered through a grid
widget has shown in the :ref:`Fig 2`.
field. The table contains heterogeneous values since it merges different types
of database field.
The table is rendered through a grid widget has shown in the :ref:`Fig 2`.
In that figure, the list shows a *changelog* in which the rows are grouped per
year and sorted per date. The first group is collapsed while the second one is
expanded.
The grid provides a lot of flexibility to manipulate interactively the data.
The rows can be grouped per value of a given column. A group can be
......
How to configure a 1-dimension metric
=====================================
.. _JSON: http://www.json.org/
.. _Pandas: http://pandas.pydata.org/pandas-docs/stable/
.. include:: hyperlinks.txt
.. _Fig 4:
......@@ -17,7 +15,7 @@ A ``metric`` is the result of an *aggregation function* applied on the values
of a given database field.
A 1-dimension metric is a table displaying several metrics when records are
aggregated by value for a given database field. This peculiar field is defined
aggregated by value for a given database field. This latter field is defined
as *group field*.
Each column is associated to a database field. The first one shows the value of
......@@ -40,7 +38,9 @@ A summary information can also be computed for each column. In the
current implementation only the functions ``count``, ``sum``, ``min``,
``max`` and ``average`` are available.
In order to create a ``metric 1d``:
The configuration of the 1-dimension metric is stored in the database. It
defines the group field, the metrics as well as the summary information.
In order to create a new one:
#. open the leaf ``configure > the metrics 1d`` in the left panel of the
viewport.
......
.. include:: hyperlinks.txt
How to configure a 2-dimension metric
======================================
Filter conditions
-----------------
.. include:: conditions.txt
Aggregate
---------
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment