move dashboard elements and store the order
This commit is contained in:
@@ -32,26 +32,36 @@ export class DashboardCreationData{
|
||||
constructor(public name: string, public description: string){}
|
||||
}
|
||||
|
||||
export interface HasId {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export class Dashboard{
|
||||
constructor(public id: string, public name: string, public description: string, public texts: TextWidget[], public plots: PlotWidget[]){}
|
||||
constructor(
|
||||
public id: string,
|
||||
public name: string,
|
||||
public description: string,
|
||||
public texts: TextWidget[],
|
||||
public plots: PlotWidget[],
|
||||
public arrangement: string[][]){}
|
||||
}
|
||||
|
||||
export class DashboardList{
|
||||
constructor(public dashboards: [Dashboard]){}
|
||||
}
|
||||
|
||||
export abstract class BaseWidget {
|
||||
constructor(public type: PlotType, public size: PlotSize) {}
|
||||
export abstract class BaseWidget implements HasId {
|
||||
constructor(public id: string, public type: PlotType, public size: PlotSize) {}
|
||||
}
|
||||
|
||||
export class TextWidget extends BaseWidget {
|
||||
constructor(override size: PlotSize, public text: string) {
|
||||
super('TEXT', size);
|
||||
constructor(override id: string, override size: PlotSize, public text: string) {
|
||||
super(id, 'TEXT', size);
|
||||
}
|
||||
}
|
||||
export class PlotWidget extends BaseWidget {
|
||||
constructor(override size: PlotSize, public config: PlotConfig) {
|
||||
super('PLOT', size);
|
||||
constructor(override id: string, override size: PlotSize, public config: PlotConfig) {
|
||||
super(id, 'PLOT', size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user