mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
Preserve local clock offsets on mode switch, fall back to defaults (#5217)
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
ref="startOffset"
|
||||
class="c-button c-conductor__delta-button"
|
||||
title="Set the time offset after now"
|
||||
data-testid="conductor-start-offset-button"
|
||||
@click.prevent.stop="showTimePopupStart"
|
||||
>
|
||||
{{ offsets.start }}
|
||||
@ -61,6 +62,7 @@
|
||||
ref="endOffset"
|
||||
class="c-button c-conductor__delta-button"
|
||||
title="Set the time offset preceding now"
|
||||
data-testid="conductor-end-offset-button"
|
||||
@click.prevent.stop="showTimePopupEnd"
|
||||
>
|
||||
{{ offsets.end }}
|
||||
|
@ -105,6 +105,7 @@ export default {
|
||||
name: 'Fixed Timespan',
|
||||
description: 'Query and explore data that falls between two fixed datetimes.',
|
||||
cssClass: 'icon-tabular',
|
||||
testId: 'conductor-modeOption-fixed',
|
||||
onItemClicked: () => this.setOption(key)
|
||||
};
|
||||
} else {
|
||||
@ -116,6 +117,7 @@ export default {
|
||||
description: "Monitor streaming data in real-time. The Time "
|
||||
+ "Conductor and displays will automatically advance themselves based on this clock. " + clock.description,
|
||||
cssClass: clock.cssClass || 'icon-clock',
|
||||
testId: 'conductor-modeOption-realtime',
|
||||
onItemClicked: () => this.setOption(key)
|
||||
};
|
||||
}
|
||||
@ -148,7 +150,8 @@ export default {
|
||||
if (clockKey === undefined) {
|
||||
this.openmct.time.stopClock();
|
||||
} else {
|
||||
this.openmct.time.clock(clockKey, configuration.clockOffsets);
|
||||
const offsets = this.openmct.time.clockOffsets() || configuration.clockOffsets;
|
||||
this.openmct.time.clock(clockKey, offsets);
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user