Merge pull request #2073 from nasa/table-spinners

Added digest after showing / hiding spinner. Fix #1882
This commit is contained in:
Pete Richards 2018-06-15 11:26:46 -07:00 committed by GitHub
commit 163043635e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,7 +295,7 @@ define(
function finishProcessing() { function finishProcessing() {
telemetryCollection.add(rowData); telemetryCollection.add(rowData);
scope.rows = telemetryCollection.telemetry; scope.rows = telemetryCollection.telemetry;
scope.loading = false; self.loading(false);
resolve(scope.rows); resolve(scope.rows);
} }
@ -349,7 +349,7 @@ define(
if (objects.length > 0) { if (objects.length > 0) {
objects.forEach(requestData); objects.forEach(requestData);
} else { } else {
scope.loading = false; self.loading(false);
resolve([]); resolve([]);
} }
}.bind(this)); }.bind(this));
@ -437,20 +437,23 @@ define(
this.telemetry.clear(); this.telemetry.clear();
this.telemetry.bounds(this.openmct.time.bounds()); this.telemetry.bounds(this.openmct.time.bounds());
this.$scope.loading = true; this.loading(true);
function error(e) {
scope.loading = false;
console.error(e.stack);
}
scope.rows = []; scope.rows = [];
return this.getTelemetryObjects() return this.getTelemetryObjects()
.then(this.loadColumns) .then(this.loadColumns)
.then(this.subscribeToNewData) .then(this.subscribeToNewData)
.then(this.getHistoricalData) .then(this.getHistoricalData)
.catch(error); .catch(function error(e) {
this.loading(false);
console.error(e.stack || e);
}.bind(this));
};
TelemetryTableController.prototype.loading = function (loading) {
this.$timeout(function () {
this.$scope.loading = loading;
}.bind(this));
}; };
/** /**