mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 21:27:52 +00:00
ensure metadata exists on events
This commit is contained in:
parent
aaa2e43796
commit
2ba6bc9c73
@ -41,7 +41,10 @@ class EventMetadataProvider {
|
||||
{
|
||||
key: 'message',
|
||||
name: 'Message',
|
||||
format: 'string'
|
||||
format: 'string',
|
||||
hints: {
|
||||
label: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class EventTelemetryProvider {
|
||||
|
||||
generateData(firstObservedTime, count, startTime, duration, name) {
|
||||
const millisecondsSinceStart = startTime - firstObservedTime;
|
||||
const randomFewSeconds = Math.floor(Math.random() * 10000);
|
||||
const randomFewSeconds = Math.floor(Math.random() * 1000);
|
||||
const utc = startTime + count + randomFewSeconds * duration;
|
||||
const ind = count % messages.length;
|
||||
const message = messages[ind] + ' - [' + millisecondsSinceStart + ']';
|
||||
|
@ -283,14 +283,11 @@ export default {
|
||||
return evenObj.time <= this.viewBounds.end && evenObj.time >= this.viewBounds.start;
|
||||
},
|
||||
getEventsContainer() {
|
||||
const containerHeight = 100;
|
||||
const containerWidth = this.eventHistory.length ? this.width : 200;
|
||||
let eventContainer;
|
||||
|
||||
let existingContainer = this.$el.querySelector(`.${CONTAINER_CLASS}`);
|
||||
if (existingContainer) {
|
||||
eventContainer = existingContainer;
|
||||
// eventContainer.style.maxWidth = `${containerWidth}px`;
|
||||
} else {
|
||||
if (this.destroyEventsContainer) {
|
||||
this.destroyEventsContainer();
|
||||
@ -324,8 +321,6 @@ export default {
|
||||
this.$refs.events.appendChild(component.$el);
|
||||
|
||||
eventContainer = component.$el.querySelector(`.${CONTAINER_CLASS}`);
|
||||
// eventContainer.style.maxWidth = `${containerWidth}px`;
|
||||
// eventContainer.style.height = `${containerHeight}px`;
|
||||
}
|
||||
|
||||
return eventContainer;
|
||||
@ -485,7 +480,6 @@ export default {
|
||||
}
|
||||
},
|
||||
toggleEventSelection(clickedEvent) {
|
||||
console.log(clickedEvent);
|
||||
this.selectedEvent?.classList.remove(EVENT_SELECTED_CLASS);
|
||||
clickedEvent.classList.add(EVENT_SELECTED_CLASS);
|
||||
this.selectedEvent = clickedEvent;
|
||||
|
Loading…
Reference in New Issue
Block a user