Compare commits
6 Commits
example-im
...
vista-4.3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f409e92f77 | ||
|
|
3f4fe5d447 | ||
|
|
92c628e389 | ||
|
|
1205e6977c | ||
|
|
cee8b5ce1f | ||
|
|
8d45d86d7a |
@@ -72,6 +72,8 @@ define([
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
openmct.legacyRegistry.enable('platform/import-export');
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
@@ -273,7 +268,9 @@ define([
|
||||
|
||||
PlotController.prototype.updateFiltersAndResubscribe = function (updatedFilters) {
|
||||
this.config.series.forEach(function (series) {
|
||||
series.updateFiltersAndRefresh(updatedFilters[series.keyString]);
|
||||
if (!_.isEqual(series.filters, updatedFilters[series.keyString])) {
|
||||
series.updateFiltersAndRefresh(updatedFilters[series.keyString]);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user