import { WidgetConfiguration } from './WidgetConfiguration'; import { Subscription } from 'rxjs/Subscription'; /** * Base interface for the widget view component to implement. */ export interface WidgetComponent { /** * The configuration object of the widget for the component to work with. */ configuration: WidgetConfiguration; /** * Initialization function, called when widget is created or when the configuraiton object changes. */ init(): void; /** * Update function, called based on a timer, that is started when the dashboard loads. */ update(): void; /** * Utility function used to collect all series addresses, associated with the widget. */ collectAddresses(): string[]; /** * Utility function used to collect all data subscriptions that the widget started. */ collectSubscriptions(): Subscription[]; }