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 | 49 | 'page-slider-controllet_selected' : '_updateSlider', |
| 50 | 50 | 'dataset-selection-controllet_data-url' : '_allowSecondStep', |
| 51 | 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 | 56 | properties : { |
| ... | ... | @@ -114,33 +115,25 @@ |
| 114 | 115 | }, |
| 115 | 116 | |
| 116 | 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 | 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 | 139 | _allowThirdStep : function(){ | ... | ... |
controllets/data-table-controllet/data-table-controllet.html
| ... | ... | @@ -69,6 +69,7 @@ |
| 69 | 69 | padding: 12px; |
| 70 | 70 | text-align: center; |
| 71 | 71 | font-weight: 700; |
| 72 | + cursor: help; | |
| 72 | 73 | } |
| 73 | 74 | |
| 74 | 75 | #data_table_container table { |
| ... | ... | @@ -181,6 +182,16 @@ |
| 181 | 182 | |
| 182 | 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 | 195 | <table> |
| 185 | 196 | <tbody id="tbody"> |
| 186 | 197 | <tr> |
| ... | ... | @@ -304,6 +315,8 @@ |
| 304 | 315 | this.shownData = this.data.slice(this.prev-1, this.next); |
| 305 | 316 | |
| 306 | 317 | this._resize(); |
| 318 | + | |
| 319 | + this.$.tooltip_wornings.show(); | |
| 307 | 320 | }, |
| 308 | 321 | |
| 309 | 322 | reset : function(){ | ... | ... |
controllets/providers-utility-controllet/providers-utility-controllet.html
controllets/select-data-controllet/select-data-controllet.html
| ... | ... | @@ -202,7 +202,10 @@ |
| 202 | 202 | that.$.select_fields.setFields(that.fields); |
| 203 | 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 | } | ... | ... |