mirror of
https://github.com/nasa/openmct.git
synced 2025-06-28 03:42:21 +00:00
Compare commits
17 Commits
persistenc
...
test-data
Author | SHA1 | Date | |
---|---|---|---|
044a4c5bae | |||
a6c841b46c | |||
9cffe376cd | |||
ad929ce411 | |||
98e61ad43a | |||
f30d56be21 | |||
2bc327db95 | |||
ec8117fc8b | |||
dd94251ca7 | |||
961aa028bf | |||
1922269f0e | |||
3ff1576cbb | |||
5c67414f4e | |||
f162573874 | |||
1084c360a7 | |||
9f25eb68d9 | |||
b215f00c03 |
@ -339,6 +339,8 @@ define([
|
||||
|
||||
return provider.request.apply(provider, arguments)
|
||||
.catch((rejected) => {
|
||||
console.log('telemetryAPI rejected!!!!!');
|
||||
console.log(rejected);
|
||||
if (rejected.name !== 'AbortError') {
|
||||
this.openmct.notifications.error('Error requesting telemetry data, see console for details');
|
||||
console.error(rejected);
|
||||
|
@ -87,6 +87,7 @@
|
||||
:highlights="highlights"
|
||||
:show-limit-line-labels="showLimitLineLabels"
|
||||
@plotReinitializeCanvas="initCanvas"
|
||||
@chartLoaded="initialize"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@ -359,11 +360,6 @@ export default {
|
||||
this.setTimeContext();
|
||||
|
||||
this.loaded = true;
|
||||
|
||||
//We're referencing the canvas elements from the mct-chart in the initialize method.
|
||||
// So we need $nextTick to ensure the component is fully mounted before we can initialize stuff.
|
||||
this.$nextTick(this.initialize);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('keydown', this.handleKeyDown);
|
||||
|
@ -105,9 +105,8 @@ export default {
|
||||
let canvasEls = this.$parent.$refs.chartContainer.querySelectorAll("canvas");
|
||||
const mainCanvas = canvasEls[1];
|
||||
const overlayCanvas = canvasEls[0];
|
||||
if (this.initializeCanvas(mainCanvas, overlayCanvas)) {
|
||||
this.draw();
|
||||
}
|
||||
|
||||
const initialized = this.initializeCanvas(mainCanvas, overlayCanvas);
|
||||
|
||||
this.listenTo(this.config.series, 'add', this.onSeriesAdd, this);
|
||||
this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this);
|
||||
@ -115,6 +114,12 @@ export default {
|
||||
this.listenTo(this.config.yAxis, 'change', this.updateLimitsAndDraw);
|
||||
this.listenTo(this.config.xAxis, 'change', this.updateLimitsAndDraw);
|
||||
this.config.series.forEach(this.onSeriesAdd, this);
|
||||
|
||||
if (initialized) {
|
||||
this.draw();
|
||||
}
|
||||
|
||||
this.$emit('chartLoaded');
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy();
|
||||
|
@ -26,13 +26,13 @@
|
||||
class="c-plot c-plot--stacked holder holder-plot has-control-bar"
|
||||
:class="[plotLegendExpandedStateClass, plotLegendPositionClass]"
|
||||
>
|
||||
<plot-legend
|
||||
:cursor-locked="!!lockHighlightPoint"
|
||||
:series="seriesModels"
|
||||
:highlights="highlights"
|
||||
:legend="legend"
|
||||
@legendHoverChanged="legendHoverChanged"
|
||||
/>
|
||||
<!-- <plot-legend-->
|
||||
<!-- :cursor-locked="!!lockHighlightPoint"-->
|
||||
<!-- :series="seriesModels"-->
|
||||
<!-- :highlights="highlights"-->
|
||||
<!-- :legend="legend"-->
|
||||
<!-- @legendHoverChanged="legendHoverChanged"-->
|
||||
<!-- />-->
|
||||
<div class="l-view-section">
|
||||
<stacked-plot-item
|
||||
v-for="object in compositionObjects"
|
||||
@ -244,11 +244,13 @@ export default {
|
||||
this.highlights = data;
|
||||
},
|
||||
registerSeriesListeners(configId) {
|
||||
this.seriesConfig[configId] = this.getConfig(configId);
|
||||
this.listenTo(this.seriesConfig[configId].series, 'add', this.addSeries, this);
|
||||
this.listenTo(this.seriesConfig[configId].series, 'remove', this.removeSeries, this);
|
||||
// const config = this.getConfig(configId);
|
||||
// config.series.models.forEach(this.addSeries, this);
|
||||
|
||||
this.seriesConfig[configId].series.models.forEach(this.addSeries, this);
|
||||
// if (config.series.models.length === 0 || config.series.models[0].keyString !== configId) {
|
||||
// this.listenTo(config.series, 'add', this.addSeries, this);
|
||||
// this.listenTo(config.series, 'remove', this.removeSeries, this);
|
||||
// }
|
||||
},
|
||||
addSeries(series) {
|
||||
const index = this.seriesModels.length;
|
||||
|
@ -227,28 +227,25 @@ export default {
|
||||
return this.openmct.objects.areIdsEqual(seriesConfig.identifier, this.childObject.identifier);
|
||||
});
|
||||
|
||||
if (!persistedSeriesConfig) {
|
||||
persistedSeriesConfig = {
|
||||
series: {},
|
||||
yAxis: {}
|
||||
let domainObject = {
|
||||
...this.childObject
|
||||
};
|
||||
if (persistedSeriesConfig) {
|
||||
domainObject.configuration = {
|
||||
series: [
|
||||
{
|
||||
identifier: this.childObject.identifier,
|
||||
...persistedSeriesConfig.series
|
||||
}
|
||||
],
|
||||
yAxis: persistedSeriesConfig.yAxis
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
config = new PlotConfigurationModel({
|
||||
id: configId,
|
||||
domainObject: {
|
||||
...this.childObject,
|
||||
configuration: {
|
||||
series: [
|
||||
{
|
||||
identifier: this.childObject.identifier,
|
||||
...persistedSeriesConfig.series
|
||||
}
|
||||
],
|
||||
yAxis: persistedSeriesConfig.yAxis
|
||||
|
||||
}
|
||||
},
|
||||
domainObject,
|
||||
openmct: this.openmct,
|
||||
palette: this.colorPalette,
|
||||
callback: (data) => {
|
||||
|
@ -54,6 +54,9 @@ const config = {
|
||||
"utils": path.join(__dirname, "src/utils")
|
||||
}
|
||||
},
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
__OPENMCT_VERSION__: `'${packageDefinition.version}'`,
|
||||
|
Reference in New Issue
Block a user