CTT - Chart English

From PlcWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with '== Installation == Versions can be downloaded in maven http://192.168.1.111:8080/maven/repository/cz/clever/ctt-chart/ repository The application is distributed in the form…')
 
(One intermediate revision not shown)
Line 11: Line 11:
<pre>
<pre>
{
{
-
"autoplay": true,
+
        "autoplay": true,
-
"storage": "ctt",
+
        "storage": "ctt",
-
"query": "call chart_index_availability ('$ sender')",
+
        "query": "call chart_index_availability ('$ sender')",
-
"index":[],
+
        "index":[],
-
"indexDetail": "index-detail",
+
        "indexDetail": "index-detail",
-
"cols": 2,
+
        "cols": 2,
-
"tagEditor": true
+
        "tagEditor": true
}
}
</pre>
</pre>
Line 33: Line 33:
<pre>
<pre>
[
[
-
{"label": "availability", "index": "index"},
+
        {"label": "availability", "index": "index"},
-
{"label": "all-in-one", "index": "index-detail"},
+
        {"label": "all-in-one", "index": "index-detail"},
-
{"label": "rx-tx", "index": "index-rxtx"},
+
        {"label": "rx-tx", "index": "index-rxtx"},
-
{"label": "temperature", "index": "index-temperature"}
+
        {"label": "temperature", "index": "index-temperature"}
]
]
</pre>
</pre>
Line 47: Line 47:
<pre>
<pre>
-
  "chartHeight": "128px",
+
     "chartHeight": "128px",
-
  "configLabel": "AVAILABILITY",
+
     "configLabel": "AVAILABILITY",
-
"storage": "ctt",
+
      "storage": "ctt",
-
"transform": "",
+
      "transform": "",
-
"template": "call chart_availability ('$ from', '$ to', '$ Sensor', '$ Sender')",
+
      "template": "call chart_availability ('$ from', '$ to', '$ Sensor', '$ Sender')",
-
"params": [{"name": "Sensor", "type": "hidden", "value": ""}, {"name": "Sender", "type": "hidden", "value" : ""}],
+
      "params": [{"name": "Sensor", "type": "hidden", "value": ""}, {"name": "Sender", "type": "hidden", "value" : ""}],
</pre>
</pre>

Current revision as of 09:07, 25 May 2020

Contents

Installation

Versions can be downloaded in maven [repository]

The application is distributed in the form of a web archive for the Tomcat server.

Index configuration

The application starts with a predefined list of graphs (default URL parameter index = index).

{
        "autoplay": true,
        "storage": "ctt",
        "query": "call chart_index_availability ('$ sender')",
        "index":[],
        "indexDetail": "index-detail",
        "cols": 2,
        "tagEditor": true
}

Legend:

  • autoplay - automatically loads graph data, otherwise displays a dialog for entering a time range
  • query - SQL query returning a list (json configuration) of graphs
  • index - static list of graphs to which you can add more using "guery"
  • index-detail - index for displaying the detail of the sender graph (s) (sender_id)
  • cols - display in columns

List of available indexes (index.list.json):

[
        {"label": "availability", "index": "index"},
        {"label": "all-in-one", "index": "index-detail"},
        {"label": "rx-tx", "index": "index-rxtx"},
        {"label": "temperature", "index": "index-temperature"}
]

Graph configuration

See amCharts for configuration.

Configuration extensions for application needs:

      "chartHeight": "128px",
      "configLabel": "AVAILABILITY",
      "storage": "ctt",
      "transform": "",
      "template": "call chart_availability ('$ from', '$ to', '$ Sensor', '$ Sender')",
      "params": [{"name": "Sensor", "type": "hidden", "value": ""}, {"name": "Sender", "type": "hidden", "value" : ""}],

Legend:

  • storage - matches the Tomcat server datasource definition
  • "transform": "shift" - shifts the drawing of individual lines (graphs) on top of each other (intended for employee attendance)
  • template - SQL select returning graph data
  • params - definition of parameters that are inserted into the "template" (correspond to the html input element)

User settings

HTML5 localStorage is used.

Personal tools