abort plotting on dashboards

This commit is contained in:
2023-03-19 09:16:50 +01:00
parent 6d2e8da805
commit a3aa62aee2
6 changed files with 100 additions and 23 deletions

View File

@@ -68,7 +68,7 @@ export class PlotWidget extends BaseWidget {
super(id, 'PLOT', size);
}
public static createPlotRequest(widget: PlotWidget): PlotRequest {
public static createPlotRequest(widget: PlotWidget, submitterId: string): PlotRequest {
const height = this.height(widget.size);
const width = this.width(widget.size);
@@ -77,7 +77,7 @@ export class PlotWidget extends BaseWidget {
const fullHeight = window.innerHeight-30;
const request = new PlotRequest(
(<any>window).submitterId+(<any>window).randomId(),
submitterId,
widget.config,
{
'main': new RenderOptions(height,width, false, true),
@@ -115,7 +115,9 @@ export type PlotSize = 'SMALL'|'MEDIUM'|'LARGE';
export type PlotType = 'TEXT'|'PLOT';
export class PlotWidgetRenderData {
constructor(public widget: PlotWidget, public plotResponse?: PlotResponse) {
public isAborted = false;
public error: string|boolean = false;
constructor(public widget: PlotWidget, public submitterId: string, public plotResponse?: PlotResponse) {
}
}