X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fdebug%2Fsrc%2FcrashStore.js;h=0b04445be855cc1f7c472b7887fd891526eed986;hp=51857d51fc7774967565a60a22df09dee2935a60;hb=d2c96111c45346c47d4a7d105324781c0c501e81;hpb=93bac8fefb064dbefb2cc08d3ae3aa84e84f0320 diff --git a/skyquake/plugins/debug/src/crashStore.js b/skyquake/plugins/debug/src/crashStore.js index 51857d51f..0b04445be 100644 --- a/skyquake/plugins/debug/src/crashStore.js +++ b/skyquake/plugins/debug/src/crashStore.js @@ -20,18 +20,29 @@ import Alt from 'widgets/skyquake_container/skyquakeAltInstance'; function crashStore () { this.exportAsync(require('./crashSource.js')); this.bindActions(require('./crashActions.js')); + this.isLoading = false; + this.crashList = null; } crashStore.prototype.getCrashDetailsSuccess = function(list) { this.setState({ - crashList:list + isLoading: false, + crashList: list }) - console.log('success', list) + console.log('Crash details load success', list) }; crashStore.prototype.getCrashDetailsLoading = function(info) { + this.setState({ + isLoading: true, + crashList: null, + }) console.log('Loading crash details...', info) }; crashStore.prototype.getCrashDetailsFailure = function(info) { + this.setState({ + isLoading: false, + error: info + }) console.log('Failed to retrieve crash/debug details', info) };