Compare commits

...

7 Commits

Author SHA1 Message Date
Deep Tailor
716a736448 simplify check for equal filters 2020-01-05 21:08:27 -08:00
Deep Tailor
f409e92f77 only call fetch if filters are different on a series per series level 2020-01-05 20:16:58 -08:00
Deep Tailor
3f4fe5d447 fixes plots refetching when filters are initialized 2019-12-26 11:00:49 -08:00
David Tsay
92c628e389 by default add new frame to end of container (#2601) 2019-12-19 16:20:58 -08:00
Deep Tailor
1205e6977c enable import-export 2019-12-11 11:31:37 -08:00
Deep Tailor
cee8b5ce1f port minmax filter fix to vista-4.3.0 2019-12-11 10:49:20 -08:00
Deep Tailor
8d45d86d7a fix bugs caused by shouldUseMinMax reported by VISTA 2019-12-03 15:41:11 -08:00
4 changed files with 28 additions and 36 deletions

View File

@@ -72,6 +72,8 @@ define([
]
}
});
openmct.legacyRegistry.enable('platform/import-export');
};
};
});

View File

@@ -540,18 +540,16 @@ export default {
this.newFrameLocation = [containerIndex, insertFrameIndex];
},
addFrame(domainObject) {
if (this.newFrameLocation.length) {
let containerIndex = this.newFrameLocation[0],
frameIndex = this.newFrameLocation[1],
frame = new Frame(domainObject.identifier),
container = this.containers[containerIndex];
let containerIndex = this.newFrameLocation.length ? this.newFrameLocation[0] : 0;
let container = this.containers[containerIndex];
let frameIndex = this.newFrameLocation.length ? this.newFrameLocation[1] : container.frames.length;
let frame = new Frame(domainObject.identifier);
container.frames.splice(frameIndex + 1, 0, frame);
sizeItems(container.frames, frame);
container.frames.splice(frameIndex + 1, 0, frame);
sizeItems(container.frames, frame);
this.newFrameLocation = [];
this.persist(containerIndex);
}
this.newFrameLocation = [];
this.persist(containerIndex);
},
deleteFrame(frameId) {
let container = this.containers

View File

@@ -140,8 +140,14 @@ define([
* @returns {Promise}
*/
fetch: function (options) {
const strategy = options.shouldUseMinMax ? 'minMax' : undefined;
let strategy;
if (this.model.interpolate !== 'none') {
strategy = 'minMax';
}
options = _.extend({}, { size: 1000, strategy, filters: this.filters }, options || {});
if (!this.unsubscribe) {
this.unsubscribe = this.openmct
.telemetry
@@ -371,26 +377,17 @@ define([
* @public
*/
updateFiltersAndRefresh: function (updatedFilters) {
this.filters = updatedFilters;
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
delete this.unsubscribe;
if (this.filters && !_.isEqual(this.filters, updatedFilters)) {
this.filters = updatedFilters;
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
delete this.unsubscribe;
}
this.fetch();
} else {
this.filters = updatedFilters;
}
this.fetch();
},
/**
* Clears the plot series, unsubscribes and resubscribes
* @public
*/
refresh: function () {
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
delete this.unsubscribe;
}
this.fetch();
}
});

View File

@@ -102,8 +102,7 @@ define([
this.startLoading();
var options = {
size: this.$element[0].offsetWidth,
domain: this.config.xAxis.get('key'),
shouldUseMinMax: this.shouldUseMinMax(series)
domain: this.config.xAxis.get('key')
};
series.load(options)
@@ -161,10 +160,6 @@ define([
return config;
};
PlotController.prototype.shouldUseMinMax = function (series) {
return series.model.interpolate !== 'none';
};
PlotController.prototype.onTimeSystemChange = function (timeSystem) {
this.config.xAxis.set('key', timeSystem.key);
};