void;
onRemoveWidget?: ($event: Event, widget: Widget) => void;
onWidgetMouseDown?: ($event: Event, widget: Widget) => void;
+ onDashboardMouseDown?: ($event: Event) => void;
onWidgetClicked?: ($event: Event, widget: Widget) => void;
prepareDashboardContextMenu?: ($event: Event) => Array;
prepareWidgetContextMenu?: ($event: Event, widget: Widget) => Array;
diff --git a/ui-ngx/src/app/shared/models/dashboard.models.ts b/ui-ngx/src/app/shared/models/dashboard.models.ts
index 282f87ade3..cb7bf891b1 100644
--- a/ui-ngx/src/app/shared/models/dashboard.models.ts
+++ b/ui-ngx/src/app/shared/models/dashboard.models.ts
@@ -18,7 +18,7 @@ import { BaseData, ExportableEntity } from '@shared/models/base-data';
import { DashboardId } from '@shared/models/id/dashboard-id';
import { TenantId } from '@shared/models/id/tenant-id';
import { ShortCustomerInfo } from '@shared/models/customer.model';
-import { Widget } from './widget.models';
+import { LegendPosition, Widget } from './widget.models';
import { Timewindow } from '@shared/models/time/time.models';
import { EntityAliases } from './alias.models';
import { Filters } from '@shared/models/query/query.models';
@@ -49,7 +49,22 @@ export interface WidgetLayouts {
[id: string]: WidgetLayout;
}
+export enum LayoutType {
+ default = 'default',
+ scada = 'scada'
+}
+
+export const layoutTypes = Object.keys(LayoutType) as LayoutType[];
+
+export const layoutTypeTranslationMap = new Map(
+ [
+ [ LayoutType.default, 'dashboard.layout-type-default' ],
+ [ LayoutType.scada, 'dashboard.layout-type-scada' ]
+ ]
+);
+
export interface GridSettings {
+ layoutType?: LayoutType;
backgroundColor?: string;
columns?: number;
minColumns?: number;
@@ -62,7 +77,6 @@ export interface GridSettings {
mobileRowHeight?: number;
mobileDisplayLayoutFirst?: boolean;
layoutDimension?: LayoutDimension;
- isScada?: boolean;
[key: string]: any;
}
@@ -78,7 +92,7 @@ export interface DashboardLayoutInfo {
}
export interface LayoutDimension {
- type?: LayoutType;
+ type?: LayoutDimensionType;
fixedWidth?: number;
fixedLayout?: DashboardLayoutId;
leftWidthPercentage?: number;
@@ -86,7 +100,7 @@ export interface LayoutDimension {
export declare type DashboardLayoutId = 'main' | 'right';
-export declare type LayoutType = 'percentage' | 'fixed';
+export declare type LayoutDimensionType = 'percentage' | 'fixed';
export declare type DashboardStateLayouts = {[key in DashboardLayoutId]?: DashboardLayout};
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 097931232a..19c05bcc65 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -1167,7 +1167,9 @@
"move-by": "Move by",
"cols": "cols",
"rows": "rows",
- "scada-layout": "SCADA layout",
+ "layout": "Layout",
+ "layout-type-default": "Default",
+ "layout-type-scada": "SCADA",
"layout-settings": "Layout settings",
"columns-count": "Columns count",
"columns-count-required": "Columns count is required.",