Commit 5c96a7bc81c8f93b016024c6234f29b30151f690
1 parent
1b4d04a6
controllet invalid url
Showing
3 changed files
with
12 additions
and
6 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
... | ... | @@ -158,9 +158,6 @@ |
158 | 158 | _allowSecondStep : function(e){ |
159 | 159 | this.dataUrl = e.detail.url; |
160 | 160 | |
161 | - var wrongUrl = ln["wrongUrl_" + this.localization]; | |
162 | - console.log(ln["wrongUrl_en"]); | |
163 | - | |
164 | 161 | $.ajax({ |
165 | 162 | url: e.detail.url, |
166 | 163 | dataType: "json", |
... | ... | @@ -168,11 +165,12 @@ |
168 | 165 | // this.dataUrl = e.detail.url |
169 | 166 | // this.jsonData = JSON.stringify(data); |
170 | 167 | slider.chevronRight(true); |
168 | + dataset_selection.$.selected_url.invalid = false; | |
171 | 169 | }, |
172 | 170 | error: function(){ |
173 | 171 | // this.jsonData = undefined; |
174 | 172 | slider.chevronRight(false); |
175 | - dataset_selection.dataUrl = wrongUrl; | |
173 | + dataset_selection.$.selected_url.invalid = true; | |
176 | 174 | } |
177 | 175 | }); |
178 | 176 | ... | ... |
controllets/dataset-selection-controllet/dataset-selection-controllet.html
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | |
170 | 170 | </template> |
171 | 171 | |
172 | - <paper-textarea id="selected_url" label="Selected url" value={{dataUrl}}></paper-textarea> | |
172 | + <paper-textarea id="selected_url" label="Selected url" value={{dataUrl}} error-message={{errorMessage}}></paper-textarea> | |
173 | 173 | |
174 | 174 | <paper-dialog id="dialog_info"> |
175 | 175 | <h2 id="dialog_name"></h2> |
... | ... | @@ -230,6 +230,11 @@ |
230 | 230 | type : String, |
231 | 231 | value : undefined, |
232 | 232 | observer : '_fireDataUrl' |
233 | + }, | |
234 | + | |
235 | + errorMessage : { | |
236 | + type : String, | |
237 | + value : "", | |
233 | 238 | } |
234 | 239 | |
235 | 240 | }, |
... | ... | @@ -242,6 +247,8 @@ |
242 | 247 | ready : function(){ |
243 | 248 | $(this.$.material_container).perfectScrollbar(); |
244 | 249 | $(this.$.dialog_info).perfectScrollbar(); |
250 | + | |
251 | + this.errorMessage = ln["wrongUrl_" + ln["localization"]]; | |
245 | 252 | }, |
246 | 253 | |
247 | 254 | attached : function(){ | ... | ... |
datalets/datasetexplorer-datalet/js/buildtreemap2.js
... | ... | @@ -211,7 +211,8 @@ function build2(root, meta, place_holder, select_listener, width, height) { |
211 | 211 | if (!d._children[0]._children) { |
212 | 212 | if (select_listener) { |
213 | 213 | var url = d._children[0].name; |
214 | - var ret = "Data provider not supported yet." | |
214 | + //var ret = "Data provider not supported yet." | |
215 | + var ret = url; | |
215 | 216 | |
216 | 217 | // Check if CKAN |
217 | 218 | var strDatasetPos = url.indexOf('/dataset/'); | ... | ... |