mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
Squash merge no-realtime branch
This commit is contained in:
parent
38457fd262
commit
5cc3cd4310
@ -356,7 +356,7 @@ export class MCT extends EventEmitter {
|
||||
|
||||
this.element = domElement;
|
||||
|
||||
if (!this.time.getClock()) {
|
||||
if (this.time.clocks.size !== 0 && !this.time.getClock()) {
|
||||
this.time.setClock(this.defaultClock);
|
||||
}
|
||||
|
||||
|
@ -33,11 +33,11 @@
|
||||
<ConductorModeIcon class="c-conductor__mode-icon" />
|
||||
<div class="c-compact-tc__setting-value u-fade-truncate">
|
||||
<ConductorMode :read-only="true" />
|
||||
<ConductorClock :read-only="true" />
|
||||
<ConductorClock v-if="hasRegisteredClocks" :read-only="true" />
|
||||
<ConductorTimeSystem :read-only="true" />
|
||||
</div>
|
||||
<ConductorInputsFixed v-if="isFixedTimeMode" :input-bounds="viewBounds" :read-only="true" />
|
||||
<ConductorInputsRealtime v-else :input-bounds="viewBounds" :read-only="true" />
|
||||
<ConductorInputsRealtime v-else-if="hasRegisteredClocks" :input-bounds="viewBounds" :read-only="true" />
|
||||
<ConductorAxis
|
||||
v-if="isFixedTimeMode"
|
||||
class="c-conductor__ticks"
|
||||
@ -138,6 +138,8 @@ export default {
|
||||
};
|
||||
},
|
||||
data() {
|
||||
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
|
||||
|
||||
return {
|
||||
viewBounds: {
|
||||
start: this.bounds.start,
|
||||
@ -147,7 +149,8 @@ export default {
|
||||
showConductorPopup: false,
|
||||
altPressed: false,
|
||||
isPanning: false,
|
||||
isZooming: false
|
||||
isZooming: false,
|
||||
hasRegisteredClocks
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -12,12 +12,12 @@
|
||||
title="Sets the Time Conductor's mode."
|
||||
/>
|
||||
<IndependentClock
|
||||
v-if="isIndependent"
|
||||
v-if="isIndependent && hasRegisteredClocks"
|
||||
class="c-conductor__mode-select"
|
||||
title="Sets the Time Conductor's clock."
|
||||
/>
|
||||
<ConductorClock
|
||||
v-else
|
||||
v-else-if="hasRegisteredClocks"
|
||||
class="c-conductor__mode-select"
|
||||
title="Sets the Time Conductor's clock."
|
||||
/>
|
||||
@ -76,6 +76,13 @@ export default {
|
||||
}
|
||||
},
|
||||
emits: ['popup-loaded', 'dismiss'],
|
||||
data() {
|
||||
const hasRegisteredClocks = this.openmct.time.clocks.size > 0;
|
||||
|
||||
return {
|
||||
hasRegisteredClocks
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
position() {
|
||||
const position = {
|
||||
|
@ -3,7 +3,14 @@ import { FIXED_MODE_KEY, REALTIME_MODE_KEY } from '../../api/time/constants.js';
|
||||
export default {
|
||||
methods: {
|
||||
loadModes() {
|
||||
this.modes = [FIXED_MODE_KEY, REALTIME_MODE_KEY].map(this.getModeMetadata);
|
||||
const modes = [FIXED_MODE_KEY];
|
||||
const clockCount = this.openmct.time.clocks.size;
|
||||
|
||||
if (clockCount > 0) {
|
||||
modes.push(REALTIME_MODE_KEY);
|
||||
}
|
||||
|
||||
this.modes = modes.map(this.getModeMetadata);
|
||||
},
|
||||
getModeMetadata(mode, testIds = false) {
|
||||
let modeOptions;
|
||||
|
@ -65,7 +65,14 @@ export function useTimeMode(openmct, timeContext) {
|
||||
}
|
||||
|
||||
function getAllModeMetadata() {
|
||||
return [FIXED_MODE_KEY, REALTIME_MODE_KEY].map(getModeMetadata);
|
||||
const clockCount = openmct.time.clocks.size;
|
||||
const modes = [FIXED_MODE_KEY];
|
||||
|
||||
if (clockCount > 0) {
|
||||
modes.push(REALTIME_MODE_KEY);
|
||||
}
|
||||
|
||||
return modes.map(getModeMetadata);
|
||||
}
|
||||
|
||||
function getModeMetadata(key) {
|
||||
|
Loading…
Reference in New Issue
Block a user