annotate queryconf.json @ 301:665370cb9d09

Added label attribute to the filter configuration
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 16 Aug 2013 12:27:12 +0200
parents dd0dec2609ad
children 82bea32eddb7
rev   line source
270
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 /* Beispieldatei einer Konfiguration einer Abfrage */
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
2 [{
270
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
3 "id": 1,
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
4 "name": "Kein Filter",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
5 "description": "Abfrage der Proben ohne Filter",
270
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 /* Die Definiton des SQL wie es später an den Server gesendet wird. ggf.
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 * werden einige Werte zuvor durch den Server ersetzt. Siehe Filter */
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
8 "sql": "select probe_id, mst_id, umw_id from l_probe",
270
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 "result": [
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
10 {"dataIndex": "mstId", "header": "MST", "width": 100},
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
11 {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
12 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}
270
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
13 ],
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
14 /* Filter für die Abfrage. Der Server empfängt hier Daten vom Clienten,
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
15 * die dann in das oben definierte sql eingebaut werden. Hier muss für den
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 * produktiven Einsatz noch eine strenge Überprüfung der Werte
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 * stattfinden.
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 * "type" gibt an, Welche Art von Feld im Clienten angezeigt werden soll.
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 * Hier müssen wir verschiedene Typen definieren. "listmst" könnte z.B
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 * eine Liste aller Messstationen sein. */
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
21 "filters": [
a6185d60c2a1 Added example of a query configuration.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
22 ]
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
23 }, {
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
24 "id": 2,
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
25 "name": "MST und UMW",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
26 "description": "Abfrage der Proben gefiltert nach Messtellen ID und ID des Umweltbereichs",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
27 "sql": "select probe_id, mst_id, umw_id from l_probe where mst_id = %(mstId)% and umw_id = %(umwId)%",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
28 "result": [
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
29 {"dataIndex": "mstId", "header": "MST", "width": 100},
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
30 {"dataIndex": "probeId", "header": "ProbeId", "flex": 1},
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
31 {"dataIndex": "umwId", "header": "Umweltbereich", "width": 100}
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
32 ],
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
33 "filters": [
301
665370cb9d09 Added label attribute to the filter configuration
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 300
diff changeset
34 {"dataIndex": "mstId", "type": "listmst", "label": "Messstelle"},
665370cb9d09 Added label attribute to the filter configuration
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 300
diff changeset
35 {"dataIndex": "umwId", "type": "listumw", "label": "Umweltbereich"}
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
36 ]
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
37 }, {
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
38 "id": 3,
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
39 "name": "3. Abfrage",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
40 "description": "Detailiertere Beschreibung der Abfrage",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
41 "sql": "select probe_id, mst_id, umw_id from l_probe where mst_id = %(mstId)s",
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
42 "result": [
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
43 {"dataIndex": "mstId", "header": "MST", "width": 100},
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
44 {"dataIndex": "probeId", "header": "ProbeId", "flex": 1}
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
45 ],
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
46 "filters": [
301
665370cb9d09 Added label attribute to the filter configuration
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 300
diff changeset
47 {"dataIndex": "mstId", "type": "listmst", "label": "Messstelle"}
300
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
48 ]
dd0dec2609ad Changed example queryconf
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 270
diff changeset
49 }]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)