Visual Console Refactor: added the events history item to the visual console container
Former-commit-id: 0105d2cc1a93a24e0d53df8fe057ef233d8a2843
This commit is contained in:
parent
ae0ca5a204
commit
8c1076453f
|
@ -15,6 +15,9 @@ import Box, { boxPropsDecoder } from "./items/Box";
|
|||
import Line, { linePropsDecoder } from "./items/Line";
|
||||
import Label, { labelPropsDecoder } from "./items/Label";
|
||||
import SimpleValue, { simpleValuePropsDecoder } from "./items/SimpleValue";
|
||||
import EventsHistory, {
|
||||
eventsHistoryPropsDecoder
|
||||
} from "./items/EventsHistory";
|
||||
|
||||
// Base properties.
|
||||
export interface VisualConsoleProps extends Size {
|
||||
|
@ -101,7 +104,7 @@ function itemInstanceFrom(data: UnknownObject) {
|
|||
case ItemType.LINE_ITEM:
|
||||
return new Line(linePropsDecoder(data));
|
||||
case ItemType.AUTO_SLA_GRAPH:
|
||||
throw new TypeError("item not found");
|
||||
return new EventsHistory(eventsHistoryPropsDecoder(data));
|
||||
case ItemType.CIRCULAR_PROGRESS_BAR:
|
||||
case ItemType.CIRCULAR_INTERIOR_PROGRESS_BAR:
|
||||
case ItemType.DONUT_GRAPH:
|
||||
|
@ -247,6 +250,7 @@ export default class VisualConsole {
|
|||
public remove(): void {
|
||||
this.elements.forEach(e => e.remove()); // Arrow function.
|
||||
this.elements = [];
|
||||
// TODO: Clean container.
|
||||
// Clean container.
|
||||
this.containerRef.innerHTML = "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue