various stuff
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { PlotConfig } from './plot.service';
|
||||
import { PlotConfig, PlotResponse } from './plot.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -41,20 +41,29 @@ export class DashboardList{
|
||||
}
|
||||
|
||||
export abstract class BaseWidget {
|
||||
constructor(public type: 'TEXT'|'PLOT', public size: 'SMALL'|'MEDIUM'|'LARGE') {}
|
||||
constructor(public type: PlotType, public size: PlotSize) {}
|
||||
}
|
||||
|
||||
export class TextWidget extends BaseWidget {
|
||||
constructor(override size: 'SMALL'|'MEDIUM'|'LARGE', public text: string) {
|
||||
constructor(override size: PlotSize, public text: string) {
|
||||
super('TEXT', size);
|
||||
}
|
||||
}
|
||||
export class PlotWidget extends BaseWidget {
|
||||
constructor(override size: 'SMALL'|'MEDIUM'|'LARGE', public config: PlotConfig) {
|
||||
constructor(override size: PlotSize, public config: PlotConfig) {
|
||||
super('PLOT', size);
|
||||
}
|
||||
}
|
||||
|
||||
export type PlotSize = 'SMALL'|'MEDIUM'|'LARGE';
|
||||
|
||||
export type PlotType = 'TEXT'|'PLOT';
|
||||
|
||||
export class PlotWidgetRenderData {
|
||||
constructor(public widget: PlotWidget, public plotResponse?: PlotResponse) {
|
||||
}
|
||||
}
|
||||
|
||||
export class WidgetDimensions{
|
||||
constructor(public width: number, public height: number){}
|
||||
}
|
||||
Reference in New Issue
Block a user