Blame view

index.html 8.49 KB
00b508a0   luigser   DEEPCLIENT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <!DOCTYPE html>

  <html>

    <head>

    <!-- style -->

    <link rel="stylesheet" href="js/bootstrap-3.3.4-dist/css/bootstrap.css">

    <!-- Js imports -->

    <script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>

    <script type="text/javascript" src="../COMPONENTS/bower_components/webcomponentsjs/webcomponents.js"></script>

    <script type="text/javascript" src="js/deepClient.js"></script>

    <script src="js/bootstrap-3.3.4-dist/js/bootstrap.min.js"></script>

    <script type="text/javascript">

  

      //Bilancio preventivo regione Lazio

      DATAURL  = "http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=722b6cbd-28d3-4151-ac50-9c4261298168&limit=1000";

      FIELDS   = Array("result,records,Capitolo","result,records,Previsione Competenza");

      FIELDS1  = Array("result,records,Capitolo","result,records,Descr. capitolo","result,records,Previsione Competenza");

  

      //Bilancio prato 2014

      /*DATAURL  = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=1000";

      FIELDS   = Array("result,records,descrizione","result,records,movimento");

      FIELDS1  = Array("result,records,titolo","result,records,categoria","result,records,descrizione","result,records,movimento");*/

  

be2bb3ab   isisadmin   test index refactory
23
24
25
      //ROUTE-TO-PA CKAN DUBLIN

      DATAURL1 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&limit=5000";

      FIELDS2   = Array("result,records,Lat","result,records,Lng","result,records,Link");

00b508a0   luigser   DEEPCLIENT
26
  

be2bb3ab   isisadmin   test index refactory
27
28
29
      //ROUTE-TO-PA CKAN TREEMAP

      DATAURL2 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&amp;limit=10000";

      FIELDS3  = Array("result,records,categoria","result,records,capitolo","result,records,movimento");

00b508a0   luigser   DEEPCLIENT
30
31
32
33
  

  	jQuery(document).ready(function($) {

  	   var table_params ={

  	      component   : "datatable-datalet",

be2bb3ab   isisadmin   test index refactory
34
35
            params      :

            {

00b508a0   luigser   DEEPCLIENT
36
37
38
39
40
41
42
               'data-url' : DATAURL

            },

  		  fields      : FIELDS1,

  		  placeHolder : "table_component_place_holder"

  	   };

         var linechart_params ={

              component   : "linechart-datalet",

be2bb3ab   isisadmin   test index refactory
43
44
              params      :

              {

284a96d4   Luigi Serra   client update
45
46
47
48
                  'data-url' : DATAURL,

                  'title'    : 'Linechart example',

                  'x-axis-label' : 'x-axis',

                  'y-axis-label' : 'y-axis'

00b508a0   luigser   DEEPCLIENT
49
50
51
52
53
54
              },

              fields      : FIELDS,

              placeHolder : "linechart_component_place_holder"

          };

          var barchart_params ={

              component   : "barchart-datalet",

be2bb3ab   isisadmin   test index refactory
55
56
57
              params      :

              {

                  'data-url' : DATAURL

00b508a0   luigser   DEEPCLIENT
58
59
60
61
62
63
              },

              fields      : FIELDS,

              placeHolder : "barchart_component_place_holder"

          };

          var columnchart_params ={

              component   : "columnchart-datalet",

be2bb3ab   isisadmin   test index refactory
64
65
66
              params      :

              {

                  'data-url' : DATAURL

00b508a0   luigser   DEEPCLIENT
67
68
69
70
              },

              fields      : FIELDS,

              placeHolder : "columnchart_component_place_holder"

          };

be2bb3ab   isisadmin   test index refactory
71
72
  

          var column3dchart_params ={

00b508a0   luigser   DEEPCLIENT
73
              component   : "column3Dchart-datalet",

be2bb3ab   isisadmin   test index refactory
74
75
76
              params      :

              {

                  'data-url' : DATAURL1

00b508a0   luigser   DEEPCLIENT
77
              },

be2bb3ab   isisadmin   test index refactory
78
              fields      : FIELDS2,

00b508a0   luigser   DEEPCLIENT
79
              placeHolder : "column3dchart_component_place_holder"

be2bb3ab   isisadmin   test index refactory
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
          };

  

          var leafletjs_params ={

              component   : "leafletjs-datalet",

              params      :{

                  'data-url' : DATAURL1

              },

              fields      : FIELDS2,

              placeHolder : "leafletjs_component_place_holder"

          };

  

          var treemap_params = {

              component   : "treemap-datalet",

              params      :{

                  'data-url' : DATAURL2

              },

              fields      : FIELDS3,

              placeHolder : "treemap_component_place_holder"

          };

  

284a96d4   Luigi Serra   client update
100
101
102
103
104
105
106
107
108
109
          var preview_params = {

              component   : "preview-datalet",

              params      :{

                  'data-url' : "http://spod.routetopa.eu/",

                  'url' : "http://spod.routetopa.eu/"

              },

              fields      : [],

              placeHolder : "preview_component_place_holder"

          };

  

be2bb3ab   isisadmin   test index refactory
110
111
  

  

29e34ccd   Luigi Serra   license updates
112
  	    ComponentService.deep_url = 'http://192.168.214.128/DatalEts-Ecosystem-Provider/DEEP/';

be2bb3ab   isisadmin   test index refactory
113
114
115
116
117
118
119
          ComponentService.getComponent(table_params);

          ComponentService.getComponent(linechart_params);

          ComponentService.getComponent(barchart_params);

          ComponentService.getComponent(columnchart_params);

          ComponentService.getComponent(column3dchart_params);

          ComponentService.getComponent(leafletjs_params);

          ComponentService.getComponent(treemap_params);

284a96d4   Luigi Serra   client update
120
          ComponentService.getComponent(preview_params);

00b508a0   luigser   DEEPCLIENT
121
  

00b508a0   luigser   DEEPCLIENT
122
123
124
125
126
127
128
129
      });

    </script> 

   </head>

    <body>

    <div class="jumbotron">

        <div class="container">

            <h2>Open Data Datalets</h2>

            <p class="small text-info">In this page you can see several containers with opendata Datalets. To do this the page uses the DEEPCLIENT js library.

be2bb3ab   isisadmin   test index refactory
130
                The only things you have to know is the data source url, the fields that component need to visualize the chart, the component you want to use and the place holder in witch the component will be

00b508a0   luigser   DEEPCLIENT
131
                injected.

00b508a0   luigser   DEEPCLIENT
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
        </div>

    </div>

    <div class="container">

       <div class="row">

            <div class="col-md-12">

                <div class="panel panel-default">

                    <div class="panel-heading">

                        <h3 class="panel-title"> Datatable Datalet</h3>

                    </div>

                    <div class="panel-body">

                        <div id="table_component_place_holder"></div>

                    </div>

                </div>

            </div>

            <div class="col-md-12">

  		      <div class="panel panel-default">

                    <div class="panel-heading">

                        <h3 class="panel-title">Linechart Datalet</h3>

                    </div>

                    <div class="panel-body">

                        <div id="linechart_component_place_holder"></div>

                    </div>

                </div>

            </div>

            <div class="col-md-12">

                <div class="panel panel-default">

                    <div class="panel-heading">

                        <h3 class="panel-title">Barchart Datalet</h3>

                    </div>

                    <div class="panel-body">

                        <div id="barchart_component_place_holder"></div>

                    </div>

                </div>

            </div>

           <div class="col-md-12">

                <div class="panel panel-default">

                    <div class="panel-heading">

                        <h3 class="panel-title">Columnchart Datalet</h3>

                    </div>

                    <div class="panel-body">

                        <div id="columnchart_component_place_holder"></div>

                    </div>

                </div>

            </div>

        </div>

        <div class="col-md-12">

            <div class="panel panel-default">

                <div class="panel-heading">

                    <h3 class="panel-title">Column3Dchart Datalet</h3>

                </div>

                <div class="panel-body">

                    <div id="column3dchart_component_place_holder">

00b508a0   luigser   DEEPCLIENT
184
185
186
187
188
189
190
191
192
193
194
                    </div>

                </div>

            </div>

        </div>

        <div class="col-md-12">

            <div class="panel panel-default">

                <div class="panel-heading">

                    <h3 class="panel-title">Leafletjs Map Datalet</h3>

                </div>

                <div class="panel-body">

                    <div id="leafletjs_component_place_holder">

00b508a0   luigser   DEEPCLIENT
195
196
197
198
199
200
201
202
                    </div>

                </div>

            </div>

        </div>

  

        <div class="col-md-12">

            <div class="panel panel-default">

                <div class="panel-heading">

be2bb3ab   isisadmin   test index refactory
203
                    <h3 class="panel-title">Treemap Datalet</h3>

00b508a0   luigser   DEEPCLIENT
204
205
206
                </div>

                <div class="panel-body">

                    <div id="treemap_component_place_holder">

00b508a0   luigser   DEEPCLIENT
207
208
209
210
211
                    </div>

                </div>

            </div>

        </div>

  

284a96d4   Luigi Serra   client update
212
213
214
215
216
217
218
219
220
221
222
223
        <div class="col-md-12">

            <div class="panel panel-default">

                <div class="panel-heading">

                    <h3 class="panel-title">Preview Datalet</h3>

                </div>

                <div class="panel-body">

                    <div id="preview_component_place_holder">

                    </div>

                </div>

            </div>

        </div>

  

00b508a0   luigser   DEEPCLIENT
224
225
226
227
    </div>

  

    </body>

  </html>