Commit be2bb3ab462f549eb85c4b2335f4119bfc214a73

Authored by isisadmin
1 parent 5cce5b3c

test index refactory

Showing 1 changed file with 55 additions and 34 deletions
index.html
@@ -20,12 +20,19 @@ @@ -20,12 +20,19 @@
20 FIELDS = Array("result,records,descrizione","result,records,movimento"); 20 FIELDS = Array("result,records,descrizione","result,records,movimento");
21 FIELDS1 = Array("result,records,titolo","result,records,categoria","result,records,descrizione","result,records,movimento");*/ 21 FIELDS1 = Array("result,records,titolo","result,records,categoria","result,records,descrizione","result,records,movimento");*/
22 22
  23 + //ROUTE-TO-PA CKAN DUBLIN
  24 + DATAURL1 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&limit=5000";
  25 + FIELDS2 = Array("result,records,Lat","result,records,Lng","result,records,Link");
23 26
  27 + //ROUTE-TO-PA CKAN TREEMAP
  28 + DATAURL2 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=10000";
  29 + FIELDS3 = Array("result,records,categoria","result,records,capitolo","result,records,movimento");
24 30
25 jQuery(document).ready(function($) { 31 jQuery(document).ready(function($) {
26 var table_params ={ 32 var table_params ={
27 component : "datatable-datalet", 33 component : "datatable-datalet",
28 - params :{ 34 + params :
  35 + {
29 'data-url' : DATAURL 36 'data-url' : DATAURL
30 }, 37 },
31 fields : FIELDS1, 38 fields : FIELDS1,
@@ -33,47 +40,71 @@ @@ -33,47 +40,71 @@
33 }; 40 };
34 var linechart_params ={ 41 var linechart_params ={
35 component : "linechart-datalet", 42 component : "linechart-datalet",
36 - params :{  
37 - 'data-url' : DATAURL,  
38 - 'fields-order' : "0,1" 43 + params :
  44 + {
  45 + 'data-url' : DATAURL
39 }, 46 },
40 fields : FIELDS, 47 fields : FIELDS,
41 placeHolder : "linechart_component_place_holder" 48 placeHolder : "linechart_component_place_holder"
42 }; 49 };
43 var barchart_params ={ 50 var barchart_params ={
44 component : "barchart-datalet", 51 component : "barchart-datalet",
45 - params :{  
46 - 'data-url' : DATAURL,  
47 - 'fields-order' : "0,1" 52 + params :
  53 + {
  54 + 'data-url' : DATAURL
48 }, 55 },
49 fields : FIELDS, 56 fields : FIELDS,
50 placeHolder : "barchart_component_place_holder" 57 placeHolder : "barchart_component_place_holder"
51 }; 58 };
52 var columnchart_params ={ 59 var columnchart_params ={
53 component : "columnchart-datalet", 60 component : "columnchart-datalet",
54 - params :{  
55 - 'data-url' : DATAURL,  
56 - 'fields-order' : "0,1" 61 + params :
  62 + {
  63 + 'data-url' : DATAURL
57 }, 64 },
58 fields : FIELDS, 65 fields : FIELDS,
59 placeHolder : "columnchart_component_place_holder" 66 placeHolder : "columnchart_component_place_holder"
60 }; 67 };
61 - /*var column3dchart_params ={ 68 +
  69 + var column3dchart_params ={
62 component : "column3Dchart-datalet", 70 component : "column3Dchart-datalet",
63 - params :{  
64 - 'data-url' : DATAURL,  
65 - 'fields-order' : "0,1" 71 + params :
  72 + {
  73 + 'data-url' : DATAURL1
66 }, 74 },
67 - fields : FIELDS, 75 + fields : FIELDS2,
68 placeHolder : "column3dchart_component_place_holder" 76 placeHolder : "column3dchart_component_place_holder"
69 - };*/ 77 + };
  78 +
  79 + var leafletjs_params ={
  80 + component : "leafletjs-datalet",
  81 + params :{
  82 + 'data-url' : DATAURL1
  83 + },
  84 + fields : FIELDS2,
  85 + placeHolder : "leafletjs_component_place_holder"
  86 + };
  87 +
  88 + var treemap_params = {
  89 + component : "treemap-datalet",
  90 + params :{
  91 + 'data-url' : DATAURL2
  92 + },
  93 + fields : FIELDS3,
  94 + placeHolder : "treemap_component_place_holder"
  95 + };
  96 +
  97 +
  98 +
  99 + ComponentService.deep_url = 'http://192.168.232.128/DEEalerProvider/DEEP/';
  100 + ComponentService.getComponent(table_params);
  101 + ComponentService.getComponent(linechart_params);
  102 + ComponentService.getComponent(barchart_params);
  103 + ComponentService.getComponent(columnchart_params);
  104 + ComponentService.getComponent(column3dchart_params);
  105 + ComponentService.getComponent(leafletjs_params);
  106 + ComponentService.getComponent(treemap_params);
70 107
71 - ComponentService.deep_url = 'http://service.routetopa.eu/WebComponentsDEV/DEEP/';  
72 - ComponentService.getComponent(table_params);  
73 - ComponentService.getComponent(linechart_params);  
74 - ComponentService.getComponent(barchart_params);  
75 - ComponentService.getComponent(columnchart_params);  
76 - /*ComponentService.getComponent(column3dchart_params);*/  
77 }); 108 });
78 </script> 109 </script>
79 </head> 110 </head>
@@ -82,9 +113,8 @@ @@ -82,9 +113,8 @@
82 <div class="container"> 113 <div class="container">
83 <h2>Open Data Datalets</h2> 114 <h2>Open Data Datalets</h2>
84 <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. 115 <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.
85 - The only things you have to know is the data source url, the fields that component need to visualize the chart, the componet you want to use and the place holder in witch the component will be 116 + 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
86 injected. 117 injected.
87 - </p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>  
88 </div> 118 </div>
89 </div> 119 </div>
90 <div class="container"> 120 <div class="container">
@@ -137,9 +167,6 @@ @@ -137,9 +167,6 @@
137 </div> 167 </div>
138 <div class="panel-body"> 168 <div class="panel-body">
139 <div id="column3dchart_component_place_holder"> 169 <div id="column3dchart_component_place_holder">
140 - <link rel="import" href="http://service.routetopa.eu/WebComponentsDEV/COMPONENTS/datalets/column3Dchart-datalet/column3Dchart-datalet.html">  
141 - <column3dchart-datalet data-url="http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=722b6cbd-28d3-4151-ac50-9c4261298168&amp;limit=500" query="$['result']['records'][*]['Capitolo']###$['result']['records'][*]['Previsione Competenza']">  
142 - </column3dchart-datalet>  
143 </div> 170 </div>
144 </div> 171 </div>
145 </div> 172 </div>
@@ -151,9 +178,6 @@ @@ -151,9 +178,6 @@
151 </div> 178 </div>
152 <div class="panel-body"> 179 <div class="panel-body">
153 <div id="leafletjs_component_place_holder"> 180 <div id="leafletjs_component_place_holder">
154 - <link rel="import" href="http://service.routetopa.eu/WebComponentsDEV/COMPONENTS/datalets/leafletjs-datalet/leafletjs-datalet.html">  
155 - <leafletjs-datalet data-url="http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&amp;limit=500" query="$['result']['records'][*]['Lat']###$['result']['records'][*]['Lng']###$['result']['records'][*]['Link']">  
156 - </leafletjs-datalet>  
157 </div> 181 </div>
158 </div> 182 </div>
159 </div> 183 </div>
@@ -162,13 +186,10 @@ @@ -162,13 +186,10 @@
162 <div class="col-md-12"> 186 <div class="col-md-12">
163 <div class="panel panel-default"> 187 <div class="panel panel-default">
164 <div class="panel-heading"> 188 <div class="panel-heading">
165 - <h3 class="panel-title">Leafletjs Map Datalet</h3> 189 + <h3 class="panel-title">Treemap Datalet</h3>
166 </div> 190 </div>
167 <div class="panel-body"> 191 <div class="panel-body">
168 <div id="treemap_component_place_holder"> 192 <div id="treemap_component_place_holder">
169 - <link rel="import" href="http://service.routetopa.eu/WebComponentsDEV/COMPONENTS/datalets/treemap-datalet/treemap-datalet.html">  
170 - <treemap-datalet data-url="http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=722b6cbd-28d3-4151-ac50-9c4261298168&amp;limit=500" query="$['result']['records'][*]['Descr. missione']###$['result']['records'][*]['Descr. capitolo']###$['result']['records'][*]['Previsione Competenza']">  
171 - </treemap-datalet>  
172 </div> 193 </div>
173 </div> 194 </div>
174 </div> 195 </div>