#4197 - make time conductor history more readable (#4287)

This commit is contained in:
Mariusz Rosinski
2021-10-14 02:02:47 +02:00
committed by GitHub
parent b64ee10812
commit 4c9c084eec
3 changed files with 40 additions and 42 deletions

View File

@ -40,7 +40,7 @@ const LOCAL_STORAGE_HISTORY_KEY_FIXED = 'tcHistory';
const LOCAL_STORAGE_HISTORY_KEY_REALTIME = 'tcHistoryRealtime';
const DEFAULT_RECORDS = 10;
import { getDuration } from "utils/duration";
import { millisecondsToDHMS } from "utils/duration";
export default {
inject: ['openmct', 'configuration'],
@ -142,7 +142,7 @@ export default {
let description = `${startTime} - ${this.formatTime(timespan.end)}`;
if (this.timeSystem.isUTCBased && !this.openmct.time.clock()) {
name = `${startTime} ${getDuration(timespan.end - timespan.start)}`;
name = `${startTime} ${millisecondsToDHMS(timespan.end - timespan.start)}`;
} else {
name = description;
}
@ -263,7 +263,7 @@ export default {
format: format
}).formatter;
return (isNegativeOffset ? '-' : '') + formatter.format(time);
return (isNegativeOffset ? '-' : '') + formatter.format(time, 'YYYY-MM-DD HH:mm:ss');
},
showHistoryMenu() {
const elementBoundingClientRect = this.$refs.historyButton.getBoundingClientRect();