Compare commits

...

11 Commits

Author SHA1 Message Date
Shefali Joshi
2e02b51241 Merge branch 'master' into plots-independent-time 2022-01-07 10:07:37 -08:00
Joshi
03f5615029 Add timeContext to bar graphs 2022-01-06 06:18:20 -08:00
Joshi
929d4296d7 Add independent time conductor to bar graphs 2022-01-06 06:09:17 -08:00
Charles Hacskaylo
1f9c602d4d Merge branch 'plots-independent-time' of github.com:nasa/openmct into plots-independent-time 2022-01-05 14:50:22 -08:00
Charles Hacskaylo
65a2b64835 Fixes for #4503 and #4606
- Added `flex: 0 0 auto` to toggle switch when in ITC to prevent
element from being crunched when window or frame is very small;
2022-01-05 14:50:16 -08:00
Joshi
09160ce38d Lint fixes 2022-01-05 14:34:45 -08:00
Shefali Joshi
b661d10fb4 Merge branch 'master' into plots-independent-time 2022-01-05 14:27:20 -08:00
Joshi
5bffb7c84c Merge branch 'master' of https://github.com/nasa/openmct into plots-independent-time 2022-01-05 11:56:32 -08:00
Shefali Joshi
dc8b7af497 Merge branch 'master' into plots-independent-time 2022-01-03 13:43:03 -08:00
Shefali Joshi
3915e5085d Merge branch 'master' into plots-independent-time 2021-12-30 14:31:23 -08:00
Joshi
c1e13e4d0c Enable independent time conductor for stacked plot and overlay plot. 2021-12-30 14:30:23 -08:00
3 changed files with 39 additions and 6 deletions

View File

@@ -62,12 +62,14 @@ export default {
}
},
mounted() {
this.refreshData = this.refreshData.bind(this);
this.setTimeContext();
this.loadComposition();
this.openmct.time.on('bounds', this.refreshData);
},
beforeDestroy() {
this.openmct.time.off('bounds', this.refreshData);
this.stopFollowingTimeContext();
this.removeAllSubscriptions();
@@ -79,6 +81,21 @@ export default {
this.composition.off('remove', this.removeTelemetryObject);
},
methods: {
setTimeContext() {
this.stopFollowingTimeContext();
this.timeContext = this.openmct.time.getContextForView(this.path);
this.followTimeContext();
},
followTimeContext() {
this.timeContext.on('bounds', this.refreshData);
},
stopFollowingTimeContext() {
if (this.timeContext) {
this.timeContext.off('bounds', this.refreshData);
}
},
addTelemetryObject(telemetryObject) {
// grab information we need from the added telmetry object
const key = this.openmct.objects.makeKeyString(telemetryObject.identifier);
@@ -147,7 +164,7 @@ export default {
};
},
getOptions() {
const { start, end } = this.openmct.time.bounds();
const { start, end } = this.timeContext.bounds();
return {
end,
@@ -247,10 +264,10 @@ export default {
this.addTrace(trace, key);
},
isDataInTimeRange(datum, key) {
const timeSystemKey = this.openmct.time.timeSystem().key;
const timeSystemKey = this.timeContext.timeSystem().key;
let currentTimestamp = this.parse(key, timeSystemKey, datum);
return currentTimestamp && this.openmct.time.bounds().end >= currentTimestamp;
return currentTimestamp && this.timeContext.bounds().end >= currentTimestamp;
},
format(telemetryObjectKey, metadataKey, data) {
const formats = this.telemetryObjectFormats[telemetryObjectKey];

View File

@@ -185,6 +185,11 @@
&__inputs,
&__time-bounds {
display: flex;
.c-toggle-switch {
// Used in independent Time Conductor
flex: 0 0 auto;
}
}
&__inputs {

View File

@@ -1,6 +1,6 @@
<template>
<div>
<div v-if="domainObject && domainObject.type === 'time-strip'"
<div v-if="supportsIndependentTime"
class="c-conductor-holder--compact l-shell__main-independent-time-conductor"
>
<independent-time-conductor :domain-object="domainObject"
@@ -20,6 +20,12 @@ import StyleRuleManager from "@/plugins/condition/StyleRuleManager";
import {STYLE_CONSTANTS} from "@/plugins/condition/utils/constants";
import IndependentTimeConductor from '@/plugins/timeConductor/independent/IndependentTimeConductor.vue';
const SupportedViewTypes = [
'plot-stacked',
'plot-overlay',
'bar-graph.view',
'time-strip.view'
];
export default {
components: {
IndependentTimeConductor
@@ -64,6 +70,11 @@ export default {
},
font() {
return this.objectFontStyle ? this.objectFontStyle.font : this.layoutFont;
},
supportsIndependentTime() {
const viewKey = this.getViewKey();
return this.domainObject && SupportedViewTypes.includes(viewKey);
}
},
destroyed() {