@oneuptime/common 7.0.3237 → 7.0.3240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +22 -0
- package/Types/Dashboard/DashboardComponents/DashboardBaseComponent.ts +7 -1
- package/Types/Dashboard/DashboardComponents/DashboardChartComponent.ts +6 -4
- package/Types/Dashboard/DashboardComponents/DashboardTextComponent.ts +8 -6
- package/Types/Dashboard/DashboardComponents/DashboardValueComponent.ts +6 -2
- package/Types/Dashboard/DashboardComponents/Index.ts +7 -0
- package/Types/JSON.ts +1 -5
- package/Types/Metrics/MetricAliasData.ts +5 -0
- package/Types/Metrics/MetricFormulaConfigData.ts +7 -0
- package/Types/Metrics/MetricFormulaData.ts +3 -0
- package/Types/Metrics/MetricQueryConfigData.ts +13 -0
- package/Types/Metrics/MetricQueryData.ts +9 -0
- package/Types/Metrics/MetricsViewConfig.ts +7 -0
- package/Utils/Dashboard/Components/DashboardBaseComponent.ts +5 -0
- package/Utils/Dashboard/Components/DashboardChartComponent.ts +28 -3
- package/Utils/Dashboard/Components/DashboardTextComponent.ts +60 -5
- package/Utils/Dashboard/Components/DashboardValueComponent.ts +28 -1
- package/Utils/Dashboard/Components/Index.ts +35 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +12 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/Index.js +8 -0
- package/build/dist/Types/Dashboard/DashboardComponents/Index.js.map +1 -0
- package/build/dist/Types/JSON.js +1 -4
- package/build/dist/Types/JSON.js.map +1 -1
- package/build/dist/Types/Metrics/MetricAliasData.js +2 -0
- package/build/dist/Types/Metrics/MetricAliasData.js.map +1 -0
- package/build/dist/Types/Metrics/MetricFormulaConfigData.js +2 -0
- package/build/dist/Types/Metrics/MetricFormulaConfigData.js.map +1 -0
- package/build/dist/Types/Metrics/MetricFormulaData.js +2 -0
- package/build/dist/Types/Metrics/MetricFormulaData.js.map +1 -0
- package/build/dist/Types/Metrics/MetricQueryConfigData.js +2 -0
- package/build/dist/Types/Metrics/MetricQueryConfigData.js.map +1 -0
- package/build/dist/Types/Metrics/MetricQueryData.js +2 -0
- package/build/dist/Types/Metrics/MetricQueryData.js.map +1 -0
- package/build/dist/Types/Metrics/MetricsViewConfig.js +2 -0
- package/build/dist/Types/Metrics/MetricsViewConfig.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardBaseComponent.js +3 -0
- package/build/dist/Utils/Dashboard/Components/DashboardBaseComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js +18 -3
- package/build/dist/Utils/Dashboard/Components/DashboardChartComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js +48 -5
- package/build/dist/Utils/Dashboard/Components/DashboardTextComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js +18 -1
- package/build/dist/Utils/Dashboard/Components/DashboardValueComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/Index.js +20 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import DashboardBaseComponent from "./DashboardBaseComponent";
|
|
2
|
+
|
|
3
|
+
export enum ComponentInputType {
|
|
4
|
+
Text = "Text",
|
|
5
|
+
Date = "Date",
|
|
6
|
+
DateTime = "Date Time",
|
|
7
|
+
Boolean = "True or False",
|
|
8
|
+
Number = "Number",
|
|
9
|
+
Decimal = "Decimal",
|
|
10
|
+
MetricsEditor = "MetricsEditor",
|
|
11
|
+
LongText = "Long Text",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ComponentArgument<T extends DashboardBaseComponent> {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
required: boolean;
|
|
18
|
+
type: ComponentInputType;
|
|
19
|
+
id: keyof T["arguments"];
|
|
20
|
+
isAdvanced?: boolean | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import GenericObject from "../../GenericObject";
|
|
1
2
|
import { ObjectType } from "../../JSON";
|
|
2
3
|
import ObjectID from "../../ObjectID";
|
|
4
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
5
|
|
|
4
6
|
export default interface DashboardBaseComponent {
|
|
5
|
-
_type: ObjectType;
|
|
7
|
+
_type: ObjectType.DashboardComponent;
|
|
6
8
|
componentId: ObjectID;
|
|
9
|
+
componentType: DashboardComponentType;
|
|
7
10
|
topInDashboardUnits: number;
|
|
8
11
|
leftInDashboardUnits: number;
|
|
9
12
|
widthInDashboardUnits: number;
|
|
10
13
|
heightInDashboardUnits: number;
|
|
14
|
+
minWidthInDashboardUnits: number;
|
|
15
|
+
minHeightInDashboardUnits: number;
|
|
16
|
+
arguments?: GenericObject | undefined;
|
|
11
17
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import MetricsViewConfig from "../../Metrics/MetricsViewConfig";
|
|
2
2
|
import ObjectID from "../../ObjectID";
|
|
3
|
-
import
|
|
3
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
4
4
|
import BaseComponent from "./DashboardBaseComponent";
|
|
5
5
|
|
|
6
6
|
export default interface DashboardChartComponent extends BaseComponent {
|
|
7
|
-
|
|
7
|
+
componentType: DashboardComponentType.Chart;
|
|
8
8
|
componentId: ObjectID;
|
|
9
|
-
|
|
9
|
+
arguments: {
|
|
10
|
+
metricsViewConfig?: MetricsViewConfig | undefined;
|
|
11
|
+
};
|
|
10
12
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ObjectType } from "../../JSON";
|
|
2
1
|
import ObjectID from "../../ObjectID";
|
|
2
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
3
|
import BaseComponent from "./DashboardBaseComponent";
|
|
4
4
|
|
|
5
5
|
export default interface DashboardTextComponent extends BaseComponent {
|
|
6
|
-
|
|
6
|
+
componentType: DashboardComponentType.Text;
|
|
7
7
|
componentId: ObjectID;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
arguments: {
|
|
9
|
+
text: string;
|
|
10
|
+
isBold: boolean;
|
|
11
|
+
isItalic: boolean;
|
|
12
|
+
isUnderline: boolean;
|
|
13
|
+
};
|
|
12
14
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import MetricsViewConfig from "../../Metrics/MetricsViewConfig";
|
|
2
2
|
import ObjectID from "../../ObjectID";
|
|
3
|
+
import DashboardComponentType from "../DashboardComponentType";
|
|
3
4
|
import BaseComponent from "./DashboardBaseComponent";
|
|
4
5
|
|
|
5
6
|
export default interface DashboardValueComponent extends BaseComponent {
|
|
6
|
-
|
|
7
|
+
componentType: DashboardComponentType.Value;
|
|
7
8
|
componentId: ObjectID;
|
|
9
|
+
arguments: {
|
|
10
|
+
metricsViewConfig?: MetricsViewConfig | undefined;
|
|
11
|
+
};
|
|
8
12
|
}
|
package/Types/JSON.ts
CHANGED
|
@@ -65,12 +65,8 @@ export enum ObjectType {
|
|
|
65
65
|
IsNull = "IsNull",
|
|
66
66
|
Includes = "Includes",
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
DashboardComponent = "DashboardComponent",
|
|
70
69
|
DashboardViewConfig = "DashboardViewConfig",
|
|
71
|
-
DashboardTextComponent = "DashboardTextComponent",
|
|
72
|
-
DashboardValueComponent = "DashboardValueComponent",
|
|
73
|
-
DashboardChartComponent = "DashboardChartComponent",
|
|
74
70
|
}
|
|
75
71
|
|
|
76
72
|
export type JSONValue =
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AggregatedModel from "../BaseDatabase/AggregatedModel";
|
|
2
|
+
import MetricAliasData from "./MetricAliasData";
|
|
3
|
+
import MetricQueryData from "./MetricQueryData";
|
|
4
|
+
|
|
5
|
+
export interface ChartSeries {
|
|
6
|
+
title: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export default interface MetricQueryConfigData {
|
|
10
|
+
metricAliasData: MetricAliasData;
|
|
11
|
+
metricQueryData: MetricQueryData;
|
|
12
|
+
getSeries?: ((data: AggregatedModel) => ChartSeries) | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Metric from "../../Models/AnalyticsModels/Metric";
|
|
2
|
+
import FilterData from "../../UI/Components/Filters/Types/FilterData";
|
|
3
|
+
import GroupBy from "../../UI/Utils/BaseDatabase/GroupBy";
|
|
4
|
+
import MetricsQuery from "./MetricsQuery";
|
|
5
|
+
|
|
6
|
+
export default interface MetricQueryData {
|
|
7
|
+
filterData: FilterData<MetricsQuery>;
|
|
8
|
+
groupBy?: GroupBy<Metric> | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import MetricFormulaConfigData from "./MetricFormulaConfigData";
|
|
2
|
+
import MetricQueryConfigData from "./MetricQueryConfigData";
|
|
3
|
+
|
|
4
|
+
export default interface MetricsViewConfig {
|
|
5
|
+
queryConfigs: Array<MetricQueryConfigData>;
|
|
6
|
+
formulaConfigs: Array<MetricFormulaConfigData>;
|
|
7
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
1
2
|
import DashboardBaseComponent from "../../../Types/Dashboard/DashboardComponents/DashboardBaseComponent";
|
|
2
3
|
import NotImplementedException from "../../../Types/Exception/NotImplementedException";
|
|
3
4
|
|
|
@@ -5,4 +6,8 @@ export default class DashboardBaseComponentUtil {
|
|
|
5
6
|
public static getDefaultComponent(): DashboardBaseComponent {
|
|
6
7
|
throw new NotImplementedException();
|
|
7
8
|
}
|
|
9
|
+
|
|
10
|
+
public static getComponentConfigArguments(): Array<ComponentArgument<any>> {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
8
13
|
}
|
|
@@ -2,18 +2,43 @@ import DashboardChartComponent from "../../../Types/Dashboard/DashboardComponent
|
|
|
2
2
|
import { ObjectType } from "../../../Types/JSON";
|
|
3
3
|
import ObjectID from "../../../Types/ObjectID";
|
|
4
4
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
6
10
|
|
|
7
11
|
export default class DashboardChartComponentUtil extends DashboardBaseComponentUtil {
|
|
8
12
|
public static override getDefaultComponent(): DashboardChartComponent {
|
|
9
13
|
return {
|
|
10
|
-
_type: ObjectType.
|
|
14
|
+
_type: ObjectType.DashboardComponent,
|
|
15
|
+
componentType: DashboardComponentType.Chart,
|
|
11
16
|
widthInDashboardUnits: 12,
|
|
12
17
|
heightInDashboardUnits: 6,
|
|
13
18
|
topInDashboardUnits: 0,
|
|
14
19
|
leftInDashboardUnits: 0,
|
|
15
20
|
componentId: ObjectID.generate(),
|
|
16
|
-
|
|
21
|
+
minHeightInDashboardUnits: 3,
|
|
22
|
+
minWidthInDashboardUnits: 6,
|
|
23
|
+
arguments: {},
|
|
17
24
|
};
|
|
18
25
|
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardChartComponent>
|
|
29
|
+
> {
|
|
30
|
+
const componentArguments: Array<
|
|
31
|
+
ComponentArgument<DashboardChartComponent>
|
|
32
|
+
> = [];
|
|
33
|
+
|
|
34
|
+
componentArguments.push({
|
|
35
|
+
name: "Metrics",
|
|
36
|
+
description: "Please select the metrics to display on the chart",
|
|
37
|
+
required: true,
|
|
38
|
+
type: ComponentInputType.MetricsEditor,
|
|
39
|
+
id: "metricsViewConfig",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return componentArguments;
|
|
43
|
+
}
|
|
19
44
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentArgument,
|
|
3
|
+
ComponentInputType,
|
|
4
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
1
5
|
import DashboardTextComponent from "../../../Types/Dashboard/DashboardComponents/DashboardTextComponent";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
2
7
|
import { ObjectType } from "../../../Types/JSON";
|
|
3
8
|
import ObjectID from "../../../Types/ObjectID";
|
|
4
9
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
@@ -6,16 +11,66 @@ import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
|
6
11
|
export default class DashboardTextComponentUtil extends DashboardBaseComponentUtil {
|
|
7
12
|
public static override getDefaultComponent(): DashboardTextComponent {
|
|
8
13
|
return {
|
|
9
|
-
_type: ObjectType.
|
|
14
|
+
_type: ObjectType.DashboardComponent,
|
|
15
|
+
componentType: DashboardComponentType.Text,
|
|
10
16
|
widthInDashboardUnits: 6,
|
|
11
17
|
heightInDashboardUnits: 1,
|
|
12
18
|
topInDashboardUnits: 0,
|
|
13
19
|
leftInDashboardUnits: 0,
|
|
14
|
-
|
|
20
|
+
arguments: {
|
|
21
|
+
text: "Hello, World!",
|
|
22
|
+
isBold: false,
|
|
23
|
+
isItalic: false,
|
|
24
|
+
isUnderline: false,
|
|
25
|
+
},
|
|
15
26
|
componentId: ObjectID.generate(),
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
isUnderline: false,
|
|
27
|
+
minHeightInDashboardUnits: 1,
|
|
28
|
+
minWidthInDashboardUnits: 3,
|
|
19
29
|
};
|
|
20
30
|
}
|
|
31
|
+
|
|
32
|
+
public static override getComponentConfigArguments(): Array<
|
|
33
|
+
ComponentArgument<DashboardTextComponent>
|
|
34
|
+
> {
|
|
35
|
+
const componentArguments: Array<ComponentArgument<DashboardTextComponent>> =
|
|
36
|
+
[];
|
|
37
|
+
|
|
38
|
+
componentArguments.push({
|
|
39
|
+
name: "Text",
|
|
40
|
+
description: "The text to display",
|
|
41
|
+
required: true,
|
|
42
|
+
type: ComponentInputType.LongText,
|
|
43
|
+
id: "text",
|
|
44
|
+
placeholder: "Hello, World!",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
componentArguments.push({
|
|
48
|
+
name: "Bold",
|
|
49
|
+
description: "Whether the text should be bold",
|
|
50
|
+
required: false,
|
|
51
|
+
type: ComponentInputType.Boolean,
|
|
52
|
+
id: "isBold",
|
|
53
|
+
placeholder: "false",
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
componentArguments.push({
|
|
57
|
+
name: "Italic",
|
|
58
|
+
description: "Whether the text should be italic",
|
|
59
|
+
required: false,
|
|
60
|
+
type: ComponentInputType.Boolean,
|
|
61
|
+
id: "isItalic",
|
|
62
|
+
placeholder: "false",
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
componentArguments.push({
|
|
66
|
+
name: "Underline",
|
|
67
|
+
description: "Whether the text should be underlined",
|
|
68
|
+
required: false,
|
|
69
|
+
type: ComponentInputType.Boolean,
|
|
70
|
+
id: "isUnderline",
|
|
71
|
+
placeholder: "false",
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return componentArguments;
|
|
75
|
+
}
|
|
21
76
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentArgument,
|
|
3
|
+
ComponentInputType,
|
|
4
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
1
5
|
import DashboardValueComponent from "../../../Types/Dashboard/DashboardComponents/DashboardValueComponent";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
2
7
|
import { ObjectType } from "../../../Types/JSON";
|
|
3
8
|
import ObjectID from "../../../Types/ObjectID";
|
|
4
9
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
@@ -6,12 +11,34 @@ import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
|
6
11
|
export default class DashboardValueComponentUtil extends DashboardBaseComponentUtil {
|
|
7
12
|
public static override getDefaultComponent(): DashboardValueComponent {
|
|
8
13
|
return {
|
|
9
|
-
_type: ObjectType.
|
|
14
|
+
_type: ObjectType.DashboardComponent,
|
|
15
|
+
componentType: DashboardComponentType.Value,
|
|
10
16
|
widthInDashboardUnits: 3,
|
|
11
17
|
heightInDashboardUnits: 1,
|
|
12
18
|
topInDashboardUnits: 0,
|
|
13
19
|
leftInDashboardUnits: 0,
|
|
14
20
|
componentId: ObjectID.generate(),
|
|
21
|
+
minHeightInDashboardUnits: 1,
|
|
22
|
+
minWidthInDashboardUnits: 1,
|
|
23
|
+
arguments: {},
|
|
15
24
|
};
|
|
16
25
|
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardValueComponent>
|
|
29
|
+
> {
|
|
30
|
+
const componentArguments: Array<
|
|
31
|
+
ComponentArgument<DashboardValueComponent>
|
|
32
|
+
> = [];
|
|
33
|
+
|
|
34
|
+
componentArguments.push({
|
|
35
|
+
name: "Metrics",
|
|
36
|
+
description: "Please select the metrics to display on the chart",
|
|
37
|
+
required: true,
|
|
38
|
+
type: ComponentInputType.MetricsEditor,
|
|
39
|
+
id: "metricsViewConfig",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return componentArguments;
|
|
43
|
+
}
|
|
17
44
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
2
|
+
import DashboardBaseComponent from "../../../Types/Dashboard/DashboardComponents/DashboardBaseComponent";
|
|
3
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
4
|
+
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
5
|
+
import DashboardChartComponentUtil from "./DashboardChartComponent";
|
|
6
|
+
import DashboardTextComponentUtil from "./DashboardTextComponent";
|
|
7
|
+
import DashboardValueComponentUtil from "./DashboardValueComponent";
|
|
8
|
+
|
|
9
|
+
export default class DashboardComponentsUtil {
|
|
10
|
+
public static getComponentSettingsArguments(
|
|
11
|
+
dashboardComponentType: DashboardComponentType,
|
|
12
|
+
): Array<ComponentArgument<DashboardBaseComponent>> {
|
|
13
|
+
if (dashboardComponentType === DashboardComponentType.Chart) {
|
|
14
|
+
return DashboardChartComponentUtil.getComponentConfigArguments() as Array<
|
|
15
|
+
ComponentArgument<DashboardBaseComponent>
|
|
16
|
+
>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (dashboardComponentType === DashboardComponentType.Text) {
|
|
20
|
+
return DashboardTextComponentUtil.getComponentConfigArguments() as Array<
|
|
21
|
+
ComponentArgument<DashboardBaseComponent>
|
|
22
|
+
>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (dashboardComponentType === DashboardComponentType.Value) {
|
|
26
|
+
return DashboardValueComponentUtil.getComponentConfigArguments() as Array<
|
|
27
|
+
ComponentArgument<DashboardBaseComponent>
|
|
28
|
+
>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
throw new BadDataException(
|
|
32
|
+
`Unknown dashboard component type: ${dashboardComponentType}`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export var ComponentInputType;
|
|
2
|
+
(function (ComponentInputType) {
|
|
3
|
+
ComponentInputType["Text"] = "Text";
|
|
4
|
+
ComponentInputType["Date"] = "Date";
|
|
5
|
+
ComponentInputType["DateTime"] = "Date Time";
|
|
6
|
+
ComponentInputType["Boolean"] = "True or False";
|
|
7
|
+
ComponentInputType["Number"] = "Number";
|
|
8
|
+
ComponentInputType["Decimal"] = "Decimal";
|
|
9
|
+
ComponentInputType["MetricsEditor"] = "MetricsEditor";
|
|
10
|
+
ComponentInputType["LongText"] = "Long Text";
|
|
11
|
+
})(ComponentInputType || (ComponentInputType = {}));
|
|
12
|
+
//# sourceMappingURL=ComponentArgument.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentArgument.js","sourceRoot":"","sources":["../../../../../Types/Dashboard/DashboardComponents/ComponentArgument.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,mCAAa,CAAA;IACb,4CAAsB,CAAA;IACtB,+CAAyB,CAAA;IACzB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;IACnB,qDAA+B,CAAA;IAC/B,4CAAsB,CAAA;AACxB,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var DashboardComponentType;
|
|
2
|
+
(function (DashboardComponentType) {
|
|
3
|
+
DashboardComponentType["Chart"] = "Chart";
|
|
4
|
+
DashboardComponentType["Value"] = "Value";
|
|
5
|
+
DashboardComponentType["Text"] = "Text";
|
|
6
|
+
})(DashboardComponentType || (DashboardComponentType = {}));
|
|
7
|
+
export default DashboardComponentType;
|
|
8
|
+
//# sourceMappingURL=Index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../Types/Dashboard/DashboardComponents/Index.ts"],"names":[],"mappings":"AAAA,IAAK,sBAIJ;AAJD,WAAK,sBAAsB;IACzB,yCAAe,CAAA;IACf,yCAAe,CAAA;IACf,uCAAa,CAAA;AACf,CAAC,EAJI,sBAAsB,KAAtB,sBAAsB,QAI1B;AAED,eAAe,sBAAsB,CAAC"}
|
package/build/dist/Types/JSON.js
CHANGED
|
@@ -35,10 +35,7 @@ export var ObjectType;
|
|
|
35
35
|
ObjectType["NotNull"] = "NotNull";
|
|
36
36
|
ObjectType["IsNull"] = "IsNull";
|
|
37
37
|
ObjectType["Includes"] = "Includes";
|
|
38
|
-
|
|
38
|
+
ObjectType["DashboardComponent"] = "DashboardComponent";
|
|
39
39
|
ObjectType["DashboardViewConfig"] = "DashboardViewConfig";
|
|
40
|
-
ObjectType["DashboardTextComponent"] = "DashboardTextComponent";
|
|
41
|
-
ObjectType["DashboardValueComponent"] = "DashboardValueComponent";
|
|
42
|
-
ObjectType["DashboardChartComponent"] = "DashboardChartComponent";
|
|
43
40
|
})(ObjectType || (ObjectType = {}));
|
|
44
41
|
//# sourceMappingURL=JSON.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSON.js","sourceRoot":"","sources":["../../../Types/JSON.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"JSON.js","sourceRoot":"","sources":["../../../Types/JSON.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAN,IAAY,UAuCX;AAvCD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,6CAA+B,CAAA;IAC/B,2CAA6B,CAAA;IAC7B,yCAA2B,CAAA;IAC3B,qCAAuB,CAAA;IACvB,mDAAqC,CAAA;IACrC,iDAAmC,CAAA;IACnC,+CAAiC,CAAA;IACjC,iEAAmD,CAAA;IACnD,mCAAqB,CAAA;IACrB,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,uBAAS,CAAA;IACT,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,uCAAyB,CAAA;IACzB,+BAAiB,CAAA;IACjB,yCAA2B,CAAA;IAC3B,uDAAyC,CAAA;IACzC,mCAAqB,CAAA;IACrB,iDAAmC,CAAA;IACnC,2BAAa,CAAA;IACb,mCAAqB,CAAA;IACrB,2CAA6B,CAAA;IAC7B,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IAErB,uDAAyC,CAAA;IACzC,yDAA2C,CAAA;AAC7C,CAAC,EAvCW,UAAU,KAAV,UAAU,QAuCrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricAliasData.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricAliasData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricFormulaConfigData.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricFormulaConfigData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricFormulaData.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricFormulaData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricQueryConfigData.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricQueryConfigData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricQueryData.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricQueryData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricsViewConfig.js","sourceRoot":"","sources":["../../../../Types/Metrics/MetricsViewConfig.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardBaseComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardBaseComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardBaseComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardBaseComponent.ts"],"names":[],"mappings":"AAEA,OAAO,uBAAuB,MAAM,kDAAkD,CAAC;AAEvF,MAAM,CAAC,OAAO,OAAO,0BAA0B;IACtC,MAAM,CAAC,mBAAmB;QAC/B,MAAM,IAAI,uBAAuB,EAAE,CAAC;IACtC,CAAC;IAEM,MAAM,CAAC,2BAA2B;QACvC,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { ObjectType } from "../../../Types/JSON";
|
|
2
2
|
import ObjectID from "../../../Types/ObjectID";
|
|
3
3
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
|
-
import
|
|
4
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
5
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
5
6
|
export default class DashboardChartComponentUtil extends DashboardBaseComponentUtil {
|
|
6
7
|
static getDefaultComponent() {
|
|
7
8
|
return {
|
|
8
|
-
_type: ObjectType.
|
|
9
|
+
_type: ObjectType.DashboardComponent,
|
|
10
|
+
componentType: DashboardComponentType.Chart,
|
|
9
11
|
widthInDashboardUnits: 12,
|
|
10
12
|
heightInDashboardUnits: 6,
|
|
11
13
|
topInDashboardUnits: 0,
|
|
12
14
|
leftInDashboardUnits: 0,
|
|
13
15
|
componentId: ObjectID.generate(),
|
|
14
|
-
|
|
16
|
+
minHeightInDashboardUnits: 3,
|
|
17
|
+
minWidthInDashboardUnits: 6,
|
|
18
|
+
arguments: {},
|
|
15
19
|
};
|
|
16
20
|
}
|
|
21
|
+
static getComponentConfigArguments() {
|
|
22
|
+
const componentArguments = [];
|
|
23
|
+
componentArguments.push({
|
|
24
|
+
name: "Metrics",
|
|
25
|
+
description: "Please select the metrics to display on the chart",
|
|
26
|
+
required: true,
|
|
27
|
+
type: ComponentInputType.MetricsEditor,
|
|
28
|
+
id: "metricsViewConfig",
|
|
29
|
+
});
|
|
30
|
+
return componentArguments;
|
|
31
|
+
}
|
|
17
32
|
}
|
|
18
33
|
//# sourceMappingURL=DashboardChartComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardChartComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardChartComponent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,0BAA0B,MAAM,0BAA0B,CAAC;AAClE,OAAO,kBAAkB,MAAM,
|
|
1
|
+
{"version":3,"file":"DashboardChartComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardChartComponent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,0BAA0B,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAEL,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AAErF,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,0BAA0B;IAC1E,MAAM,CAAU,mBAAmB;QACxC,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,kBAAkB;YACpC,aAAa,EAAE,sBAAsB,CAAC,KAAK;YAC3C,qBAAqB,EAAE,EAAE;YACzB,sBAAsB,EAAE,CAAC;YACzB,mBAAmB,EAAE,CAAC;YACtB,oBAAoB,EAAE,CAAC;YACvB,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAChC,yBAAyB,EAAE,CAAC;YAC5B,wBAAwB,EAAE,CAAC;YAC3B,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAEM,MAAM,CAAU,2BAA2B;QAGhD,MAAM,kBAAkB,GAEpB,EAAE,CAAC;QAEP,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,kBAAkB,CAAC,aAAa;YACtC,EAAE,EAAE,mBAAmB;SACxB,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,20 +1,63 @@
|
|
|
1
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
2
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
1
3
|
import { ObjectType } from "../../../Types/JSON";
|
|
2
4
|
import ObjectID from "../../../Types/ObjectID";
|
|
3
5
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
6
|
export default class DashboardTextComponentUtil extends DashboardBaseComponentUtil {
|
|
5
7
|
static getDefaultComponent() {
|
|
6
8
|
return {
|
|
7
|
-
_type: ObjectType.
|
|
9
|
+
_type: ObjectType.DashboardComponent,
|
|
10
|
+
componentType: DashboardComponentType.Text,
|
|
8
11
|
widthInDashboardUnits: 6,
|
|
9
12
|
heightInDashboardUnits: 1,
|
|
10
13
|
topInDashboardUnits: 0,
|
|
11
14
|
leftInDashboardUnits: 0,
|
|
12
|
-
|
|
15
|
+
arguments: {
|
|
16
|
+
text: "Hello, World!",
|
|
17
|
+
isBold: false,
|
|
18
|
+
isItalic: false,
|
|
19
|
+
isUnderline: false,
|
|
20
|
+
},
|
|
13
21
|
componentId: ObjectID.generate(),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
isUnderline: false,
|
|
22
|
+
minHeightInDashboardUnits: 1,
|
|
23
|
+
minWidthInDashboardUnits: 3,
|
|
17
24
|
};
|
|
18
25
|
}
|
|
26
|
+
static getComponentConfigArguments() {
|
|
27
|
+
const componentArguments = [];
|
|
28
|
+
componentArguments.push({
|
|
29
|
+
name: "Text",
|
|
30
|
+
description: "The text to display",
|
|
31
|
+
required: true,
|
|
32
|
+
type: ComponentInputType.LongText,
|
|
33
|
+
id: "text",
|
|
34
|
+
placeholder: "Hello, World!",
|
|
35
|
+
});
|
|
36
|
+
componentArguments.push({
|
|
37
|
+
name: "Bold",
|
|
38
|
+
description: "Whether the text should be bold",
|
|
39
|
+
required: false,
|
|
40
|
+
type: ComponentInputType.Boolean,
|
|
41
|
+
id: "isBold",
|
|
42
|
+
placeholder: "false",
|
|
43
|
+
});
|
|
44
|
+
componentArguments.push({
|
|
45
|
+
name: "Italic",
|
|
46
|
+
description: "Whether the text should be italic",
|
|
47
|
+
required: false,
|
|
48
|
+
type: ComponentInputType.Boolean,
|
|
49
|
+
id: "isItalic",
|
|
50
|
+
placeholder: "false",
|
|
51
|
+
});
|
|
52
|
+
componentArguments.push({
|
|
53
|
+
name: "Underline",
|
|
54
|
+
description: "Whether the text should be underlined",
|
|
55
|
+
required: false,
|
|
56
|
+
type: ComponentInputType.Boolean,
|
|
57
|
+
id: "isUnderline",
|
|
58
|
+
placeholder: "false",
|
|
59
|
+
});
|
|
60
|
+
return componentArguments;
|
|
61
|
+
}
|
|
19
62
|
}
|
|
20
63
|
//# sourceMappingURL=DashboardTextComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTextComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardTextComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardTextComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardTextComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AAExE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,0BAA0B,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,0BAA0B;IACzE,MAAM,CAAU,mBAAmB;QACxC,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,kBAAkB;YACpC,aAAa,EAAE,sBAAsB,CAAC,IAAI;YAC1C,qBAAqB,EAAE,CAAC;YACxB,sBAAsB,EAAE,CAAC;YACzB,mBAAmB,EAAE,CAAC;YACtB,oBAAoB,EAAE,CAAC;YACvB,SAAS,EAAE;gBACT,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,KAAK;aACnB;YACD,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAChC,yBAAyB,EAAE,CAAC;YAC5B,wBAAwB,EAAE,CAAC;SAC5B,CAAC;IACJ,CAAC;IAEM,MAAM,CAAU,2BAA2B;QAGhD,MAAM,kBAAkB,GACtB,EAAE,CAAC;QAEL,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,kBAAkB,CAAC,QAAQ;YACjC,EAAE,EAAE,MAAM;YACV,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,OAAO;YAChC,EAAE,EAAE,QAAQ;YACZ,WAAW,EAAE,OAAO;SACrB,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,OAAO;YAChC,EAAE,EAAE,UAAU;YACd,WAAW,EAAE,OAAO;SACrB,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,OAAO;YAChC,EAAE,EAAE,aAAa;YACjB,WAAW,EAAE,OAAO;SACrB,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -1,16 +1,33 @@
|
|
|
1
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
2
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
1
3
|
import { ObjectType } from "../../../Types/JSON";
|
|
2
4
|
import ObjectID from "../../../Types/ObjectID";
|
|
3
5
|
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
6
|
export default class DashboardValueComponentUtil extends DashboardBaseComponentUtil {
|
|
5
7
|
static getDefaultComponent() {
|
|
6
8
|
return {
|
|
7
|
-
_type: ObjectType.
|
|
9
|
+
_type: ObjectType.DashboardComponent,
|
|
10
|
+
componentType: DashboardComponentType.Value,
|
|
8
11
|
widthInDashboardUnits: 3,
|
|
9
12
|
heightInDashboardUnits: 1,
|
|
10
13
|
topInDashboardUnits: 0,
|
|
11
14
|
leftInDashboardUnits: 0,
|
|
12
15
|
componentId: ObjectID.generate(),
|
|
16
|
+
minHeightInDashboardUnits: 1,
|
|
17
|
+
minWidthInDashboardUnits: 1,
|
|
18
|
+
arguments: {},
|
|
13
19
|
};
|
|
14
20
|
}
|
|
21
|
+
static getComponentConfigArguments() {
|
|
22
|
+
const componentArguments = [];
|
|
23
|
+
componentArguments.push({
|
|
24
|
+
name: "Metrics",
|
|
25
|
+
description: "Please select the metrics to display on the chart",
|
|
26
|
+
required: true,
|
|
27
|
+
type: ComponentInputType.MetricsEditor,
|
|
28
|
+
id: "metricsViewConfig",
|
|
29
|
+
});
|
|
30
|
+
return componentArguments;
|
|
31
|
+
}
|
|
15
32
|
}
|
|
16
33
|
//# sourceMappingURL=DashboardValueComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardValueComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardValueComponent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DashboardValueComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardValueComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AAExE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,0BAA0B,MAAM,0BAA0B,CAAC;AAElE,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,0BAA0B;IAC1E,MAAM,CAAU,mBAAmB;QACxC,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,kBAAkB;YACpC,aAAa,EAAE,sBAAsB,CAAC,KAAK;YAC3C,qBAAqB,EAAE,CAAC;YACxB,sBAAsB,EAAE,CAAC;YACzB,mBAAmB,EAAE,CAAC;YACtB,oBAAoB,EAAE,CAAC;YACvB,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;YAChC,yBAAyB,EAAE,CAAC;YAC5B,wBAAwB,EAAE,CAAC;YAC3B,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAEM,MAAM,CAAU,2BAA2B;QAGhD,MAAM,kBAAkB,GAEpB,EAAE,CAAC;QAEP,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,kBAAkB,CAAC,aAAa;YACtC,EAAE,EAAE,mBAAmB;SACxB,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
2
|
+
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
3
|
+
import DashboardChartComponentUtil from "./DashboardChartComponent";
|
|
4
|
+
import DashboardTextComponentUtil from "./DashboardTextComponent";
|
|
5
|
+
import DashboardValueComponentUtil from "./DashboardValueComponent";
|
|
6
|
+
export default class DashboardComponentsUtil {
|
|
7
|
+
static getComponentSettingsArguments(dashboardComponentType) {
|
|
8
|
+
if (dashboardComponentType === DashboardComponentType.Chart) {
|
|
9
|
+
return DashboardChartComponentUtil.getComponentConfigArguments();
|
|
10
|
+
}
|
|
11
|
+
if (dashboardComponentType === DashboardComponentType.Text) {
|
|
12
|
+
return DashboardTextComponentUtil.getComponentConfigArguments();
|
|
13
|
+
}
|
|
14
|
+
if (dashboardComponentType === DashboardComponentType.Value) {
|
|
15
|
+
return DashboardValueComponentUtil.getComponentConfigArguments();
|
|
16
|
+
}
|
|
17
|
+
throw new BadDataException(`Unknown dashboard component type: ${dashboardComponentType}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=Index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/Index.ts"],"names":[],"mappings":"AAEA,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AACrF,OAAO,gBAAgB,MAAM,2CAA2C,CAAC;AACzE,OAAO,2BAA2B,MAAM,2BAA2B,CAAC;AACpE,OAAO,0BAA0B,MAAM,0BAA0B,CAAC;AAClE,OAAO,2BAA2B,MAAM,2BAA2B,CAAC;AAEpE,MAAM,CAAC,OAAO,OAAO,uBAAuB;IACnC,MAAM,CAAC,6BAA6B,CACzC,sBAA8C;QAE9C,IAAI,sBAAsB,KAAK,sBAAsB,CAAC,KAAK,EAAE,CAAC;YAC5D,OAAO,2BAA2B,CAAC,2BAA2B,EAE7D,CAAC;QACJ,CAAC;QAED,IAAI,sBAAsB,KAAK,sBAAsB,CAAC,IAAI,EAAE,CAAC;YAC3D,OAAO,0BAA0B,CAAC,2BAA2B,EAE5D,CAAC;QACJ,CAAC;QAED,IAAI,sBAAsB,KAAK,sBAAsB,CAAC,KAAK,EAAE,CAAC;YAC5D,OAAO,2BAA2B,CAAC,2BAA2B,EAE7D,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,gBAAgB,CACxB,qCAAqC,sBAAsB,EAAE,CAC9D,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneuptime/common",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3240",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"airtable": "^0.12.2",
|
|
78
78
|
"axios": "^1.7.2",
|
|
79
79
|
"bullmq": "^5.3.3",
|
|
80
|
-
"Common": "npm:@oneuptime/common@7.0.
|
|
80
|
+
"Common": "npm:@oneuptime/common@7.0.3240",
|
|
81
81
|
"cookie-parser": "^1.4.7",
|
|
82
82
|
"cors": "^2.8.5",
|
|
83
83
|
"cron-parser": "^4.8.1",
|