Commit 85f3ac36404467811d9e86fccfa54e3d58bf20d3
Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS
Showing
2 changed files
with
18 additions
and
5 deletions
controllets/dataset-selection-controllet/dataset-selection-controllet.html
... | ... | @@ -305,7 +305,7 @@ |
305 | 305 | $("#info_s_dataset")[0].setAttribute("disabled", "true"); |
306 | 306 | } |
307 | 307 | |
308 | - this.dataUrl = e.detail.url; | |
308 | + this.dataUrl = this._addlimitUrl(e.detail.url); | |
309 | 309 | this.selected=0; |
310 | 310 | }, |
311 | 311 | |
... | ... | @@ -318,7 +318,7 @@ |
318 | 318 | |
319 | 319 | var dataset = this.filteredDatasets[parseInt(e.target.id)] |
320 | 320 | |
321 | - this.dataUrl = dataset.url; | |
321 | + this.dataUrl = this._addlimitUrl(dataset.url); | |
322 | 322 | |
323 | 323 | if(dataset.description != ""){ |
324 | 324 | $("#info_dataset")[0].removeAttribute("disabled"); |
... | ... | @@ -336,7 +336,7 @@ |
336 | 336 | |
337 | 337 | var dataset = this.suggestedDatasets[parseInt(e.target.id)] |
338 | 338 | |
339 | - this.dataUrl = dataset.url; | |
339 | + this.dataUrl = this._addlimitUrl(dataset.url); | |
340 | 340 | |
341 | 341 | if(dataset.description != ""){ |
342 | 342 | $("#info_s_dataset")[0].removeAttribute("disabled"); |
... | ... | @@ -363,6 +363,19 @@ |
363 | 363 | this.fire('dataset-selection-controllet_data-url', {url: this.dataUrl}); |
364 | 364 | }, |
365 | 365 | |
366 | + _addlimitUrl : function(url){ | |
367 | + //CKAN --> action no limit | |
368 | + if((url.indexOf("api/action") > -1) && !(url.indexOf("limit") > -1)) | |
369 | + { | |
370 | + url += "&limit=99999"; | |
371 | + } | |
372 | + //OpenDataSoft --> action no limit | |
373 | + if((url.indexOf("api/records") > -1) && !(url.indexOf("rows") > -1)){ | |
374 | + url += "&rows=10000"; | |
375 | + } | |
376 | + return url; | |
377 | + }, | |
378 | + | |
366 | 379 | _resize : function(){ |
367 | 380 | var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; |
368 | 381 | h = h - 64 - 8; //height with page scroller | ... | ... |
datalets/datasetexplorer-datalet/js/buildtreemap2.js
... | ... | @@ -50,7 +50,6 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
50 | 50 | var data = ["top", "", "#000000", "", "", "", ""]; |
51 | 51 | //data[3] = OW.getLanguageText('ode', 'back'); |
52 | 52 | data[3] = datasetexplorer_ln["ode+back_"+datasetexplorer_ln["ln"]]; |
53 | - console.log(data[3]); | |
54 | 53 | |
55 | 54 | return "showTooltip(evt, '" + data + "')"; |
56 | 55 | }) |
... | ... | @@ -80,7 +79,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
80 | 79 | // the children being overwritten when when layout is computed. |
81 | 80 | function accumulate(d) { |
82 | 81 | return (d._children = d.children) |
83 | - ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 5) | |
82 | + ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 0) | |
84 | 83 | : d.value; |
85 | 84 | } |
86 | 85 | |
... | ... | @@ -141,6 +140,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
141 | 140 | .attr("onmousemove", function(d) { |
142 | 141 | //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"]; |
143 | 142 | var data = ["", d.name, d.color, "", "", d.value, ""]; |
143 | + console.log(d); | |
144 | 144 | data[2] = ["#000000"]; |
145 | 145 | var id = d.name.split(':')[1]; |
146 | 146 | if (d.depth == 1) { | ... | ... |