move history out of form

remove unused gear icon
remove debugging code
This commit is contained in:
David Tsay 2024-08-21 15:23:51 -07:00
parent 5cce8d747c
commit a0291879e9
4 changed files with 25 additions and 56 deletions

View File

@ -48,12 +48,11 @@
@pan-axis="pan" @pan-axis="pan"
@zoom-axis="zoom" @zoom-axis="zoom"
/> />
<div <ConductorHistory
role="button" v-if="!isIndependent"
class="c-not-button c-not-button--compact c-compact-tc__gear icon-gear" class="c-conductor__history-select"
aria-label="Time Conductor Settings" title="Select and apply previously entered time intervals."
></div> />
<ConductorPopUp <ConductorPopUp
v-if="showConductorPopup" v-if="showConductorPopup"
ref="conductorPopup" ref="conductorPopup"
@ -71,6 +70,7 @@ import { inject, provide } from 'vue';
import ConductorAxis from './ConductorAxis.vue'; import ConductorAxis from './ConductorAxis.vue';
import ConductorClock from './ConductorClock.vue'; import ConductorClock from './ConductorClock.vue';
import ConductorHistory from './ConductorHistory.vue';
import ConductorInputsFixed from './ConductorInputsFixed.vue'; import ConductorInputsFixed from './ConductorInputsFixed.vue';
import ConductorInputsRealtime from './ConductorInputsRealtime.vue'; import ConductorInputsRealtime from './ConductorInputsRealtime.vue';
import ConductorMode from './ConductorMode.vue'; import ConductorMode from './ConductorMode.vue';
@ -90,6 +90,7 @@ export default {
ConductorTimeSystem, ConductorTimeSystem,
ConductorClock, ConductorClock,
ConductorMode, ConductorMode,
ConductorHistory,
ConductorInputsRealtime, ConductorInputsRealtime,
ConductorInputsFixed, ConductorInputsFixed,
ConductorAxis, ConductorAxis,

View File

@ -24,11 +24,9 @@
<div class="c-menu-button c-ctrl-wrapper c-ctrl-wrapper--menus-left"> <div class="c-menu-button c-ctrl-wrapper c-ctrl-wrapper--menus-left">
<button <button
aria-label="Time Conductor History" aria-label="Time Conductor History"
class="c-button--menu c-history-button icon-history c-icon-button" class="c-button--minor c-history-button icon-history c-icon-button"
@click.prevent.stop="showHistoryMenu" @click.prevent.stop="showHistoryMenu"
> />
<span class="c-button__label">History</span>
</button>
</div> </div>
</div> </div>
</template> </template>

View File

@ -27,11 +27,6 @@
class="c-conductor__time-system-select" class="c-conductor__time-system-select"
title="Sets the Time Conductor's time system." title="Sets the Time Conductor's time system."
/> />
<ConductorHistory
v-if="!isIndependent"
class="c-conductor__history-select"
title="Select and apply previously entered time intervals."
/>
</div> </div>
<ConductorInputsFixed v-if="isFixedTimeMode" @dismiss-inputs-fixed="dismiss" /> <ConductorInputsFixed v-if="isFixedTimeMode" @dismiss-inputs-fixed="dismiss" />
<ConductorInputsRealtime v-else @dismiss-inputs-realtime="dismiss" /> <ConductorInputsRealtime v-else @dismiss-inputs-realtime="dismiss" />
@ -40,7 +35,6 @@
<script> <script>
import ConductorClock from './ConductorClock.vue'; import ConductorClock from './ConductorClock.vue';
import ConductorHistory from './ConductorHistory.vue';
import ConductorInputsFixed from './ConductorInputsFixed.vue'; import ConductorInputsFixed from './ConductorInputsFixed.vue';
import ConductorInputsRealtime from './ConductorInputsRealtime.vue'; import ConductorInputsRealtime from './ConductorInputsRealtime.vue';
import ConductorMode from './ConductorMode.vue'; import ConductorMode from './ConductorMode.vue';
@ -55,7 +49,6 @@ export default {
IndependentMode, IndependentMode,
IndependentClock, IndependentClock,
ConductorTimeSystem, ConductorTimeSystem,
ConductorHistory,
ConductorInputsFixed, ConductorInputsFixed,
ConductorInputsRealtime ConductorInputsRealtime
}, },

View File

@ -52,12 +52,6 @@
:read-only="true" :read-only="true"
:compact="true" :compact="true"
/> />
<div
v-if="independentTCEnabled"
role="button"
class="c-not-button c-not-button--compact c-compact-tc__gear icon-gear"
aria-label="Independent Time Conductor Settings"
></div>
<ConductorPopUp <ConductorPopUp
v-if="showConductorPopup" v-if="showConductorPopup"
@ -73,7 +67,7 @@
</template> </template>
<script> <script>
import { inject, provide, watch } from 'vue'; import { inject, provide, toRaw } from 'vue';
import ConductorModeIcon from '@/plugins/timeConductor/ConductorModeIcon.vue'; import ConductorModeIcon from '@/plugins/timeConductor/ConductorModeIcon.vue';
@ -121,22 +115,6 @@ export default {
const { clock, getAllClockMetadata, getClockMetadata } = useClock(openmct, timeContext); const { clock, getAllClockMetadata, getClockMetadata } = useClock(openmct, timeContext);
const { offsets } = useClockOffsets(openmct, timeContext); const { offsets } = useClockOffsets(openmct, timeContext);
watch(timeContext, () => {
console.log('context changed setup');
});
watch(() => props.domainObject, () => {
console.log('domainObject changed setup');
});
watch(() => props.domainObject.configuration.useIndependentTime, () => {
console.log('domainObject configuration changed setup');
});
watch(() => props.objectPath, () => {
console.log('objectPath changed setup');
});
provide('timeContext', timeContext); provide('timeContext', timeContext);
provide('timeSystemFormatter', timeSystemFormatter); provide('timeSystemFormatter', timeSystemFormatter);
provide('timeSystemDurationFormatter', timeSystemDurationFormatter); provide('timeSystemDurationFormatter', timeSystemDurationFormatter);
@ -153,10 +131,6 @@ export default {
provide('getAllClockMetadata', getAllClockMetadata); provide('getAllClockMetadata', getAllClockMetadata);
provide('getClockMetadata', getClockMetadata); provide('getClockMetadata', getClockMetadata);
function getReactiveObjectPath() {
return props.objectPath;
}
return { return {
timeContext, timeContext,
timeMode, timeMode,
@ -172,7 +146,7 @@ export default {
data() { data() {
return { return {
keyString: this.openmct.objects.makeKeyString(this.domainObject.identifier), keyString: this.openmct.objects.makeKeyString(this.domainObject.identifier),
independentTCEnabled: this.domainObject.configuration.useIndependentTime === true, independentTCEnabled: this.domainObject.configuration.useIndependentTime === true
}; };
}, },
computed: { computed: {
@ -280,10 +254,13 @@ export default {
); );
}, },
setTimeOptions() { setTimeOptions() {
this.timeOptions = this.domainObject.configuration.timeOptions ?? { this.timeOptions = toRaw(this.domainObject.configuration.timeOptions);
clockOffsets: this.offsets, if (!this.timeOptions) {
fixedOffsets: this.bounds this.timeOptions = {
}; clockOffsets: this.offsets,
fixedOffsets: this.bounds
};
}
if (!this.timeOptions.clock) { if (!this.timeOptions.clock) {
// can remove openmct.time.getClock() if timeContexts have clock in fixed time // can remove openmct.time.getClock() if timeContexts have clock in fixed time
@ -312,7 +289,7 @@ export default {
this.updateTimeOptions(); this.updateTimeOptions();
}, },
saveClock() { saveClock() {
this.timeOptions.clock = this.clock.key; this.timeOptions.clock = this.clock?.key;
this.updateTimeOptions(); this.updateTimeOptions();
}, },
updateTimeOptions() { updateTimeOptions() {
@ -322,7 +299,7 @@ export default {
registerIndependentTimeContext() { registerIndependentTimeContext() {
const bounds = this.timeOptions.fixedOffsets ?? this.bounds; const bounds = this.timeOptions.fixedOffsets ?? this.bounds;
const offsets = this.timeOptions.clockOffsets ?? this.offsets; const offsets = this.timeOptions.clockOffsets ?? this.offsets;
const clockKey = this.timeOptions.clock?.key || this.clock.key; const clockKey = this.timeOptions.clock || this.clock.key;
const independentTimeContextBoundsOrOffsets = this.isFixedTimeMode ? bounds : offsets; const independentTimeContextBoundsOrOffsets = this.isFixedTimeMode ? bounds : offsets;
const independentTimeContextClockKey = this.isFixedTimeMode ? undefined : clockKey; const independentTimeContextClockKey = this.isFixedTimeMode ? undefined : clockKey;
@ -336,16 +313,16 @@ export default {
independentTimeContextClockKey independentTimeContextClockKey
); );
} else { } else {
if (this.isRealTimeMode) { // if (this.isRealTimeMode) {
independentTimeContext.setClock(this.timeOptions.clock); // independentTimeContext.setClock(this.timeOptions.clock);
} // }
independentTimeContext.setMode(this.timeOptions.mode, independentTimeContextBoundsOrOffsets); // independentTimeContext.setMode(this.timeOptions.mode, independentTimeContextBoundsOrOffsets);
} }
}, },
registerIndependentTimeOffsets() { registerIndependentTimeOffsets() {
// const timeContext = this.openmct.time.getIndependentContext(this.keyString); // const timeContext = this.openmct.time.getIndependentContext(this.keyString);
const clockKey = this.timeOptions.clock?.key || this.clock.key; const clockKey = this.timeOptions.clock || this.clock.key;
let offsets; let offsets;
if (this.isFixedTimeMode) { if (this.isFixedTimeMode) {