Commit a1dedcfa4d1f70911d7d7f19856c50e24e4b3410
1 parent
2f01c2f6
worning x gg
Showing
4 changed files
with
36 additions
and
28 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
| @@ -49,7 +49,8 @@ | @@ -49,7 +49,8 @@ | ||
| 49 | 'page-slider-controllet_selected' : '_updateSlider', | 49 | 'page-slider-controllet_selected' : '_updateSlider', |
| 50 | 'dataset-selection-controllet_data-url' : '_allowSecondStep', | 50 | 'dataset-selection-controllet_data-url' : '_allowSecondStep', |
| 51 | 'select-fields-controllet_selected-fields' : '_allowThirdStep', | 51 | 'select-fields-controllet_selected-fields' : '_allowThirdStep', |
| 52 | - 'filters-controllet_filters': '_allowThirdStep' | 52 | + 'filters-controllet_filters': '_allowThirdStep', |
| 53 | + 'data-ready': '_dataReady' | ||
| 53 | }, | 54 | }, |
| 54 | 55 | ||
| 55 | properties : { | 56 | properties : { |
| @@ -114,33 +115,25 @@ | @@ -114,33 +115,25 @@ | ||
| 114 | }, | 115 | }, |
| 115 | 116 | ||
| 116 | _allowSecondStep : function(e){ | 117 | _allowSecondStep : function(e){ |
| 117 | - if(e.detail.url == "") { | ||
| 118 | - this.$.slider.chevronRight(false); | 118 | + this.$.slider.chevronRight(false); |
| 119 | +// | ||
| 120 | + var f = Object.create(providerFactory); | ||
| 121 | + var provider = f.getProvider(e.detail.url); | ||
| 122 | + var dataUrl = provider.addLimit(e.detail.url); | ||
| 123 | + | ||
| 124 | + this.$.select_data.dataUrl = dataUrl; | ||
| 125 | + this.$.select_data.init(); | ||
| 126 | + this.$.select_visualization.dataUrl = dataUrl; | ||
| 127 | + this.$.select_visualization.init(); | ||
| 128 | + }, | ||
| 129 | + | ||
| 130 | + _dataReady : function(e){ | ||
| 131 | + if(e.detail.ready) { | ||
| 132 | + this.$.slider.chevronRight(true); | ||
| 119 | this.$.select_dataset.$.selected_url.invalid = false; | 133 | this.$.select_dataset.$.selected_url.invalid = false; |
| 120 | - return; | ||
| 121 | } | 134 | } |
| 122 | - | ||
| 123 | - var that = this; | ||
| 124 | - | ||
| 125 | - $.ajax({ | ||
| 126 | - url: e.detail.url, | ||
| 127 | - dataType: "json", | ||
| 128 | - success: function(){ | ||
| 129 | - that.$.select_dataset.$.selected_url.invalid = false; | ||
| 130 | - var f = Object.create(providerFactory); | ||
| 131 | - var provider = f.getProvider(e.detail.url); | ||
| 132 | - var dataUrl = provider.addLimit(e.detail.url); | ||
| 133 | - that.$.select_data.dataUrl = dataUrl; | ||
| 134 | - that.$.select_data.init(); | ||
| 135 | - that.$.select_visualization.dataUrl = dataUrl; | ||
| 136 | - that.$.select_visualization.init(); | ||
| 137 | - that.$.slider.chevronRight(true); | ||
| 138 | - }, | ||
| 139 | - error: function(){ | ||
| 140 | - that.$.slider.chevronRight(false); | ||
| 141 | - that.$.select_dataset.$.selected_url.invalid = true; | ||
| 142 | - } | ||
| 143 | - }); | 135 | + else |
| 136 | + this.$.select_dataset.$.selected_url.invalid = true; | ||
| 144 | }, | 137 | }, |
| 145 | 138 | ||
| 146 | _allowThirdStep : function(){ | 139 | _allowThirdStep : function(){ |
controllets/data-table-controllet/data-table-controllet.html
| @@ -69,6 +69,7 @@ | @@ -69,6 +69,7 @@ | ||
| 69 | padding: 12px; | 69 | padding: 12px; |
| 70 | text-align: center; | 70 | text-align: center; |
| 71 | font-weight: 700; | 71 | font-weight: 700; |
| 72 | + cursor: help; | ||
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | #data_table_container table { | 75 | #data_table_container table { |
| @@ -181,6 +182,16 @@ | @@ -181,6 +182,16 @@ | ||
| 181 | 182 | ||
| 182 | <div id="header"><span id="selected_data"></span></div> | 183 | <div id="header"><span id="selected_data"></span></div> |
| 183 | 184 | ||
| 185 | + <paper-tooltip id="tooltip_wornings" for="header" offset="56"> | ||
| 186 | + <template is="dom-repeat" items="{{fields}}"> | ||
| 187 | + <template is="dom-if" if={{item.errorsDescription.length}}> | ||
| 188 | + <p> | ||
| 189 | + <span class="warning">{{_warning()}}:</span> {{item.errorsDescription}} | ||
| 190 | + </p> | ||
| 191 | + </template> | ||
| 192 | + </template> | ||
| 193 | + </paper-tooltip> | ||
| 194 | + | ||
| 184 | <table> | 195 | <table> |
| 185 | <tbody id="tbody"> | 196 | <tbody id="tbody"> |
| 186 | <tr> | 197 | <tr> |
| @@ -304,6 +315,8 @@ | @@ -304,6 +315,8 @@ | ||
| 304 | this.shownData = this.data.slice(this.prev-1, this.next); | 315 | this.shownData = this.data.slice(this.prev-1, this.next); |
| 305 | 316 | ||
| 306 | this._resize(); | 317 | this._resize(); |
| 318 | + | ||
| 319 | + this.$.tooltip_wornings.show(); | ||
| 307 | }, | 320 | }, |
| 308 | 321 | ||
| 309 | reset : function(){ | 322 | reset : function(){ |
controllets/providers-utility-controllet/providers-utility-controllet.html
| @@ -29,7 +29,6 @@ | @@ -29,7 +29,6 @@ | ||
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | utility_getSelectedIndices = function(fields, selectedFileds) { | 31 | utility_getSelectedIndices = function(fields, selectedFileds) { |
| 32 | - console.log("we"); | ||
| 33 | var selectedIndices = []; | 32 | var selectedIndices = []; |
| 34 | for (var i = 0; i < selectedFileds.length; i++) | 33 | for (var i = 0; i < selectedFileds.length; i++) |
| 35 | if($.inArray(selectedFileds[i], fields) > -1) | 34 | if($.inArray(selectedFileds[i], fields) > -1) |
controllets/select-data-controllet/select-data-controllet.html
| @@ -202,7 +202,10 @@ | @@ -202,7 +202,10 @@ | ||
| 202 | that.$.select_fields.setFields(that.fields); | 202 | that.$.select_fields.setFields(that.fields); |
| 203 | that.$.filters.setFields(that.fields); | 203 | that.$.filters.setFields(that.fields); |
| 204 | 204 | ||
| 205 | - that.fire('data-ready'); | 205 | + that.fire('data-ready', {ready : true}); |
| 206 | + }, | ||
| 207 | + error: function(){ | ||
| 208 | + that.fire('data-ready', {ready : false}); | ||
| 206 | } | 209 | } |
| 207 | }); | 210 | }); |
| 208 | } | 211 | } |