@oneuptime/common 10.0.86 → 10.0.89
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/Models/DatabaseModels/EnterpriseLicense.ts +54 -0
- package/Models/DatabaseModels/GlobalConfig.ts +51 -0
- package/Server/API/EnterpriseLicenseAPI.ts +83 -0
- package/Server/API/GlobalConfigAPI.ts +59 -0
- package/Server/API/MetricAPI.ts +149 -0
- package/Server/API/TelemetryAPI.ts +24 -0
- package/Server/EnvironmentConfig.ts +10 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1777629313843-MigrationName.ts +59 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +2 -0
- package/Server/Infrastructure/Queue.ts +4 -4
- package/Server/Services/AnalyticsDatabaseService.ts +21 -0
- package/Server/Services/MetricService.ts +193 -1
- package/Server/Services/TelemetryAttributeService.ts +37 -3
- package/Server/Utils/AnalyticsDatabase/StatementGenerator.ts +174 -7
- package/Tests/Types/Date.test.ts +46 -0
- package/Types/Dashboard/DashboardComponentType.ts +3 -0
- package/Types/Dashboard/DashboardComponents/DashboardAlertListComponent.ts +13 -0
- package/Types/Dashboard/DashboardComponents/DashboardIncidentListComponent.ts +13 -0
- package/Types/Dashboard/DashboardComponents/DashboardMonitorListComponent.ts +13 -0
- package/Types/Date.ts +9 -4
- package/Types/JSONFunctions.ts +61 -1
- package/UI/Components/AutocompleteTextInput/AutocompleteTextInput.tsx +60 -21
- package/UI/Components/Dictionary/Dictionary.tsx +188 -26
- package/UI/Components/Dictionary/DictionaryFilterOperator.ts +357 -0
- package/UI/Components/Dictionary/DictionaryOfStrings.tsx +12 -7
- package/UI/Components/EditionLabel/EditionLabel.tsx +224 -10
- package/UI/Components/Filters/FilterViewer.tsx +81 -16
- package/UI/Components/Filters/FiltersForm.tsx +18 -3
- package/UI/Components/Filters/JSONFilter.tsx +11 -2
- package/UI/Components/Filters/Types/Filter.ts +3 -0
- package/UI/Components/Forms/Fields/FormField.tsx +6 -1
- package/UI/Components/Forms/Types/Field.ts +5 -0
- package/UI/Components/LogsViewer/LogsViewer.tsx +73 -4
- package/UI/Components/LogsViewer/components/LogSearchBar.tsx +77 -31
- package/UI/Components/LogsViewer/components/LogSearchSuggestions.tsx +44 -1
- package/UI/Components/LogsViewer/components/LogsFilterCard.tsx +7 -5
- package/UI/Components/TelemetryViewer/TelemetryViewer.tsx +6 -0
- package/UI/Components/TelemetryViewer/components/TelemetrySearchBar.tsx +84 -25
- package/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.tsx +44 -1
- package/Utils/Dashboard/Components/DashboardAlertListComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardIncidentListComponent.ts +86 -0
- package/Utils/Dashboard/Components/DashboardMonitorListComponent.ts +85 -0
- package/Utils/Dashboard/Components/Index.ts +21 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js +57 -0
- package/build/dist/Models/DatabaseModels/EnterpriseLicense.js.map +1 -1
- package/build/dist/Models/DatabaseModels/GlobalConfig.js +54 -0
- package/build/dist/Models/DatabaseModels/GlobalConfig.js.map +1 -1
- package/build/dist/Server/API/EnterpriseLicenseAPI.js +64 -1
- package/build/dist/Server/API/EnterpriseLicenseAPI.js.map +1 -1
- package/build/dist/Server/API/GlobalConfigAPI.js +47 -0
- package/build/dist/Server/API/GlobalConfigAPI.js.map +1 -1
- package/build/dist/Server/API/MetricAPI.js +123 -0
- package/build/dist/Server/API/MetricAPI.js.map +1 -0
- package/build/dist/Server/API/TelemetryAPI.js +9 -0
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/EnvironmentConfig.js +3 -0
- package/build/dist/Server/EnvironmentConfig.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777629313843-MigrationName.js +26 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777629313843-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +2 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Queue.js +3 -3
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/Server/Services/AnalyticsDatabaseService.js +18 -0
- package/build/dist/Server/Services/AnalyticsDatabaseService.js.map +1 -1
- package/build/dist/Server/Services/MetricService.js +151 -1
- package/build/dist/Server/Services/MetricService.js.map +1 -1
- package/build/dist/Server/Services/TelemetryAttributeService.js +36 -7
- package/build/dist/Server/Services/TelemetryAttributeService.js.map +1 -1
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js +135 -5
- package/build/dist/Server/Utils/AnalyticsDatabase/StatementGenerator.js.map +1 -1
- package/build/dist/Tests/Types/Date.test.js +40 -0
- package/build/dist/Tests/Types/Date.test.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +3 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardAlertListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardAlertListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardIncidentListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardIncidentListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardMonitorListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardMonitorListComponent.js.map +1 -0
- package/build/dist/Types/Date.js +7 -2
- package/build/dist/Types/Date.js.map +1 -1
- package/build/dist/Types/JSONFunctions.js +47 -1
- package/build/dist/Types/JSONFunctions.js.map +1 -1
- package/build/dist/UI/Components/AutocompleteTextInput/AutocompleteTextInput.js +21 -10
- package/build/dist/UI/Components/AutocompleteTextInput/AutocompleteTextInput.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/Dictionary.js +109 -16
- package/build/dist/UI/Components/Dictionary/Dictionary.js.map +1 -1
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js +263 -0
- package/build/dist/UI/Components/Dictionary/DictionaryFilterOperator.js.map +1 -0
- package/build/dist/UI/Components/Dictionary/DictionaryOfStrings.js +10 -6
- package/build/dist/UI/Components/Dictionary/DictionaryOfStrings.js.map +1 -1
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js +124 -6
- package/build/dist/UI/Components/EditionLabel/EditionLabel.js.map +1 -1
- package/build/dist/UI/Components/Filters/FilterViewer.js +50 -12
- package/build/dist/UI/Components/Filters/FilterViewer.js.map +1 -1
- package/build/dist/UI/Components/Filters/FiltersForm.js +5 -4
- package/build/dist/UI/Components/Filters/FiltersForm.js.map +1 -1
- package/build/dist/UI/Components/Filters/JSONFilter.js +1 -1
- package/build/dist/UI/Components/Filters/JSONFilter.js.map +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js +1 -1
- package/build/dist/UI/Components/Forms/Fields/FormField.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +54 -5
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js +59 -29
- package/build/dist/UI/Components/LogsViewer/components/LogSearchBar.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogSearchSuggestions.js +10 -2
- package/build/dist/UI/Components/LogsViewer/components/LogSearchSuggestions.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/components/LogsFilterCard.js +2 -5
- package/build/dist/UI/Components/LogsViewer/components/LogsFilterCard.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js +1 -1
- package/build/dist/UI/Components/TelemetryViewer/TelemetryViewer.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js +59 -22
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchBar.js.map +1 -1
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.js +10 -2
- package/build/dist/UI/Components/TelemetryViewer/components/TelemetrySearchSuggestions.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js +70 -0
- package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js +69 -0
- package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/Index.js +12 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
2
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
3
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
5
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
6
|
+
const DisplaySection = {
|
|
7
|
+
name: "Display Options",
|
|
8
|
+
description: "Configure the widget title and row limit",
|
|
9
|
+
order: 1,
|
|
10
|
+
};
|
|
11
|
+
const FiltersSection = {
|
|
12
|
+
name: "Filters",
|
|
13
|
+
description: "Narrow down which alerts are shown",
|
|
14
|
+
order: 2,
|
|
15
|
+
defaultCollapsed: true,
|
|
16
|
+
};
|
|
17
|
+
export default class DashboardAlertListComponentUtil extends DashboardBaseComponentUtil {
|
|
18
|
+
static getDefaultComponent() {
|
|
19
|
+
return {
|
|
20
|
+
_type: ObjectType.DashboardComponent,
|
|
21
|
+
componentType: DashboardComponentType.AlertList,
|
|
22
|
+
widthInDashboardUnits: 6,
|
|
23
|
+
heightInDashboardUnits: 4,
|
|
24
|
+
topInDashboardUnits: 0,
|
|
25
|
+
leftInDashboardUnits: 0,
|
|
26
|
+
componentId: ObjectID.generate(),
|
|
27
|
+
minHeightInDashboardUnits: 3,
|
|
28
|
+
minWidthInDashboardUnits: 6,
|
|
29
|
+
arguments: {
|
|
30
|
+
maxRows: 25,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static getComponentConfigArguments() {
|
|
35
|
+
const componentArguments = [];
|
|
36
|
+
componentArguments.push({
|
|
37
|
+
name: "Title",
|
|
38
|
+
description: "Header shown above the alert list",
|
|
39
|
+
required: false,
|
|
40
|
+
type: ComponentInputType.Text,
|
|
41
|
+
id: "title",
|
|
42
|
+
section: DisplaySection,
|
|
43
|
+
});
|
|
44
|
+
componentArguments.push({
|
|
45
|
+
name: "Max Rows",
|
|
46
|
+
description: "Maximum number of alerts to show",
|
|
47
|
+
required: false,
|
|
48
|
+
type: ComponentInputType.Number,
|
|
49
|
+
id: "maxRows",
|
|
50
|
+
placeholder: "25",
|
|
51
|
+
section: DisplaySection,
|
|
52
|
+
});
|
|
53
|
+
componentArguments.push({
|
|
54
|
+
name: "State",
|
|
55
|
+
description: "Filter alerts by lifecycle state",
|
|
56
|
+
required: false,
|
|
57
|
+
type: ComponentInputType.Dropdown,
|
|
58
|
+
id: "stateFilter",
|
|
59
|
+
section: FiltersSection,
|
|
60
|
+
dropdownOptions: [
|
|
61
|
+
{ label: "All", value: "" },
|
|
62
|
+
{ label: "Unresolved (open)", value: "unresolved" },
|
|
63
|
+
{ label: "Acknowledged", value: "acknowledged" },
|
|
64
|
+
{ label: "Resolved", value: "resolved" },
|
|
65
|
+
],
|
|
66
|
+
});
|
|
67
|
+
return componentArguments;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=DashboardAlertListComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardAlertListComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardAlertList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BAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,MAAM;YAC/B,EAAE,EAAE,SAAS;YACb,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,QAAQ;YACjC,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE,cAAc;YACvB,eAAe,EAAE;gBACf,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;gBAC3B,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE;gBACnD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;gBAChD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;aACzC;SACF,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
2
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
3
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
5
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
6
|
+
const DisplaySection = {
|
|
7
|
+
name: "Display Options",
|
|
8
|
+
description: "Configure the widget title and row limit",
|
|
9
|
+
order: 1,
|
|
10
|
+
};
|
|
11
|
+
const FiltersSection = {
|
|
12
|
+
name: "Filters",
|
|
13
|
+
description: "Narrow down which incidents are shown",
|
|
14
|
+
order: 2,
|
|
15
|
+
defaultCollapsed: true,
|
|
16
|
+
};
|
|
17
|
+
export default class DashboardIncidentListComponentUtil extends DashboardBaseComponentUtil {
|
|
18
|
+
static getDefaultComponent() {
|
|
19
|
+
return {
|
|
20
|
+
_type: ObjectType.DashboardComponent,
|
|
21
|
+
componentType: DashboardComponentType.IncidentList,
|
|
22
|
+
widthInDashboardUnits: 6,
|
|
23
|
+
heightInDashboardUnits: 4,
|
|
24
|
+
topInDashboardUnits: 0,
|
|
25
|
+
leftInDashboardUnits: 0,
|
|
26
|
+
componentId: ObjectID.generate(),
|
|
27
|
+
minHeightInDashboardUnits: 3,
|
|
28
|
+
minWidthInDashboardUnits: 6,
|
|
29
|
+
arguments: {
|
|
30
|
+
maxRows: 25,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static getComponentConfigArguments() {
|
|
35
|
+
const componentArguments = [];
|
|
36
|
+
componentArguments.push({
|
|
37
|
+
name: "Title",
|
|
38
|
+
description: "Header shown above the incident list",
|
|
39
|
+
required: false,
|
|
40
|
+
type: ComponentInputType.Text,
|
|
41
|
+
id: "title",
|
|
42
|
+
section: DisplaySection,
|
|
43
|
+
});
|
|
44
|
+
componentArguments.push({
|
|
45
|
+
name: "Max Rows",
|
|
46
|
+
description: "Maximum number of incidents to show",
|
|
47
|
+
required: false,
|
|
48
|
+
type: ComponentInputType.Number,
|
|
49
|
+
id: "maxRows",
|
|
50
|
+
placeholder: "25",
|
|
51
|
+
section: DisplaySection,
|
|
52
|
+
});
|
|
53
|
+
componentArguments.push({
|
|
54
|
+
name: "State",
|
|
55
|
+
description: "Filter incidents by lifecycle state",
|
|
56
|
+
required: false,
|
|
57
|
+
type: ComponentInputType.Dropdown,
|
|
58
|
+
id: "stateFilter",
|
|
59
|
+
section: FiltersSection,
|
|
60
|
+
dropdownOptions: [
|
|
61
|
+
{ label: "All", value: "" },
|
|
62
|
+
{ label: "Unresolved (open)", value: "unresolved" },
|
|
63
|
+
{ label: "Acknowledged", value: "acknowledged" },
|
|
64
|
+
{ label: "Resolved", value: "resolved" },
|
|
65
|
+
],
|
|
66
|
+
});
|
|
67
|
+
return componentArguments;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=DashboardIncidentListComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardIncidentListComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardIncidentListComponent.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,EAGL,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AAErF,MAAM,cAAc,GAA6B;IAC/C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,cAAc,GAA6B;IAC/C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE,CAAC;IACR,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,0BAA0B;IACjF,MAAM,CAAU,mBAAmB;QACxC,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,kBAAkB;YACpC,aAAa,EAAE,sBAAsB,CAAC,YAAY;YAClD,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;gBACT,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;IACJ,CAAC;IAEM,MAAM,CAAU,2BAA2B;QAGhD,MAAM,kBAAkB,GAEpB,EAAE,CAAC;QAEP,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,IAAI;YAC7B,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,MAAM;YAC/B,EAAE,EAAE,SAAS;YACb,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,cAAc;SACxB,CAAC,CAAC;QAEH,kBAAkB,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,kBAAkB,CAAC,QAAQ;YACjC,EAAE,EAAE,aAAa;YACjB,OAAO,EAAE,cAAc;YACvB,eAAe,EAAE;gBACf,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;gBAC3B,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,YAAY,EAAE;gBACnD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;gBAChD,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;aACzC;SACF,CAAC,CAAC;QAEH,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
2
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
3
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
4
|
+
import { ComponentInputType, } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
5
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
6
|
+
const DisplaySection = {
|
|
7
|
+
name: "Display Options",
|
|
8
|
+
description: "Configure the widget title and row limit",
|
|
9
|
+
order: 1,
|
|
10
|
+
};
|
|
11
|
+
const FiltersSection = {
|
|
12
|
+
name: "Filters",
|
|
13
|
+
description: "Narrow down which monitors are shown",
|
|
14
|
+
order: 2,
|
|
15
|
+
defaultCollapsed: true,
|
|
16
|
+
};
|
|
17
|
+
export default class DashboardMonitorListComponentUtil extends DashboardBaseComponentUtil {
|
|
18
|
+
static getDefaultComponent() {
|
|
19
|
+
return {
|
|
20
|
+
_type: ObjectType.DashboardComponent,
|
|
21
|
+
componentType: DashboardComponentType.MonitorList,
|
|
22
|
+
widthInDashboardUnits: 6,
|
|
23
|
+
heightInDashboardUnits: 4,
|
|
24
|
+
topInDashboardUnits: 0,
|
|
25
|
+
leftInDashboardUnits: 0,
|
|
26
|
+
componentId: ObjectID.generate(),
|
|
27
|
+
minHeightInDashboardUnits: 3,
|
|
28
|
+
minWidthInDashboardUnits: 6,
|
|
29
|
+
arguments: {
|
|
30
|
+
maxRows: 25,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static getComponentConfigArguments() {
|
|
35
|
+
const componentArguments = [];
|
|
36
|
+
componentArguments.push({
|
|
37
|
+
name: "Title",
|
|
38
|
+
description: "Header shown above the monitor list",
|
|
39
|
+
required: false,
|
|
40
|
+
type: ComponentInputType.Text,
|
|
41
|
+
id: "title",
|
|
42
|
+
section: DisplaySection,
|
|
43
|
+
});
|
|
44
|
+
componentArguments.push({
|
|
45
|
+
name: "Max Rows",
|
|
46
|
+
description: "Maximum number of monitors to show",
|
|
47
|
+
required: false,
|
|
48
|
+
type: ComponentInputType.Number,
|
|
49
|
+
id: "maxRows",
|
|
50
|
+
placeholder: "25",
|
|
51
|
+
section: DisplaySection,
|
|
52
|
+
});
|
|
53
|
+
componentArguments.push({
|
|
54
|
+
name: "Status",
|
|
55
|
+
description: "Filter monitors by current status",
|
|
56
|
+
required: false,
|
|
57
|
+
type: ComponentInputType.Dropdown,
|
|
58
|
+
id: "statusFilter",
|
|
59
|
+
section: FiltersSection,
|
|
60
|
+
dropdownOptions: [
|
|
61
|
+
{ label: "All", value: "" },
|
|
62
|
+
{ label: "Operational only", value: "operational" },
|
|
63
|
+
{ label: "Not operational only", value: "non-operational" },
|
|
64
|
+
],
|
|
65
|
+
});
|
|
66
|
+
return componentArguments;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=DashboardMonitorListComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DashboardMonitorListComponent.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/DashboardMonitorListComponent.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,EAGL,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,sBAAsB,MAAM,iDAAiD,CAAC;AAErF,MAAM,cAAc,GAA6B;IAC/C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,0CAA0C;IACvD,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,MAAM,cAAc,GAA6B;IAC/C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sCAAsC;IACnD,KAAK,EAAE,CAAC;IACR,gBAAgB,EAAE,IAAI;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,iCAAkC,SAAQ,0BAA0B;IAChF,MAAM,CAAU,mBAAmB;QACxC,OAAO;YACL,KAAK,EAAE,UAAU,CAAC,kBAAkB;YACpC,aAAa,EAAE,sBAAsB,CAAC,WAAW;YACjD,qBAAqB,EAAE,CAAC;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CACF"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
2
2
|
import BadDataException from "../../../Types/Exception/BadDataException";
|
|
3
|
+
import DashboardAlertListComponentUtil from "./DashboardAlertListComponent";
|
|
3
4
|
import DashboardChartComponentUtil from "./DashboardChartComponent";
|
|
4
5
|
import DashboardGaugeComponentUtil from "./DashboardGaugeComponent";
|
|
6
|
+
import DashboardIncidentListComponentUtil from "./DashboardIncidentListComponent";
|
|
5
7
|
import DashboardLogStreamComponentUtil from "./DashboardLogStreamComponent";
|
|
8
|
+
import DashboardMonitorListComponentUtil from "./DashboardMonitorListComponent";
|
|
6
9
|
import DashboardTableComponentUtil from "./DashboardTableComponent";
|
|
7
10
|
import DashboardTextComponentUtil from "./DashboardTextComponent";
|
|
8
11
|
import DashboardTraceListComponentUtil from "./DashboardTraceListComponent";
|
|
@@ -30,6 +33,15 @@ export default class DashboardComponentsUtil {
|
|
|
30
33
|
if (dashboardComponentType === DashboardComponentType.TraceList) {
|
|
31
34
|
return DashboardTraceListComponentUtil.getComponentConfigArguments();
|
|
32
35
|
}
|
|
36
|
+
if (dashboardComponentType === DashboardComponentType.IncidentList) {
|
|
37
|
+
return DashboardIncidentListComponentUtil.getComponentConfigArguments();
|
|
38
|
+
}
|
|
39
|
+
if (dashboardComponentType === DashboardComponentType.AlertList) {
|
|
40
|
+
return DashboardAlertListComponentUtil.getComponentConfigArguments();
|
|
41
|
+
}
|
|
42
|
+
if (dashboardComponentType === DashboardComponentType.MonitorList) {
|
|
43
|
+
return DashboardMonitorListComponentUtil.getComponentConfigArguments();
|
|
44
|
+
}
|
|
33
45
|
throw new BadDataException(`Unknown dashboard component type: ${dashboardComponentType}`);
|
|
34
46
|
}
|
|
35
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Index.js","sourceRoot":"","sources":["../../../../../Utils/Dashboard/Components/Index.ts"],"names":[],"mappings":"AAEA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