Commit 584231184c092ac6ec0c0928fc43f006b9d9e47f

Authored by Nathanael Jourdane
1 parent a117468a

Prompt an error message when granules can no be displayed

js/app/controllers/EpnTapModule.js
... ... @@ -405,6 +405,8 @@ Ext.define('amdaDesktop.EpnTapModule', {
405 405 var timeMax = metadataStore.max('time_max');
406 406 timeSelector.setLimits(timeMin, timeMax);
407 407 timeSelector.setInterval(timeMin, timeMax);
  408 + // console.log("Done services");
  409 + // loadMask.hide();
408 410 },
409 411  
410 412 /**
... ... @@ -433,17 +435,25 @@ Ext.define('amdaDesktop.EpnTapModule', {
433 435 fillGranules: function(granules) {
434 436 if (granules["error"] != null) {
435 437 console.log('Can not get request response:', granules["error"]);
  438 + if(granules["error"] == "no result") {
  439 + alert("There is no result for this query.");
  440 + } else {
  441 + alert("Can not display granules due to an error from the selected epn-tap service.");
  442 + }
436 443 } else {
437 444 try {
438 445 Ext.getCmp('epnTapGranulesGrid').getStore().removeAll();
439 446 Ext.getCmp('epnTapGranulesGrid').getStore().add(granules);
440 447 } catch( e ) {
441 448 console.log('Can not add granules: ' + e);
  449 + alert("Can not display granules due to an error from the selected epn-tap service.");
442 450 }
443 451 }
444 452 Ext.getCmp('epnTapServicesGrid').setDisabled(false);
445 453 Ext.getCmp('epnTapGranulesGrid').setDisabled(false);
446 454 Ext.getCmp('epnTapServicesGrid').getEl().setStyle('cursor', 'default'); // CSS is correctly changed but without visible result.
  455 + // console.log("Done granules");
  456 + // loadMask.hide();
447 457 },
448 458  
449 459 /**
... ...
php/classes/VOTableMgr.php
... ... @@ -269,7 +269,7 @@ class VOTableMgr {
269 269 $this->stream = base64_decode($query_stream->textContent);
270 270 $stream_len = strlen($this->stream);
271 271 if($stream_len == 0) {
272   - $this->votable_error = "There is no result for this query.";
  272 + $this->votable_error = "no result";
273 273 return null;
274 274 }
275 275 while($this->c < strlen($this->stream)) {
... ...