@oneuptime/common 10.0.93 → 10.0.96
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/DockerResource.ts +497 -0
- package/Models/DatabaseModels/Index.ts +2 -0
- package/Models/DatabaseModels/Monitor.ts +83 -0
- package/Server/API/MonitorTemplateAPI.ts +182 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.ts +41 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.ts +69 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
- package/Server/Services/BillingInvoiceService.ts +18 -29
- package/Server/Services/DockerResourceService.ts +310 -0
- package/Server/Services/MonitorTemplateService.ts +367 -0
- package/Server/Utils/VM/VMRunner.ts +62 -0
- package/Types/Dashboard/DashboardComponentType.ts +13 -0
- package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardAlertListComponent.ts +4 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardIncidentListComponent.ts +4 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.ts +14 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.ts +16 -0
- package/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.ts +15 -0
- package/Types/Dashboard/DashboardComponents/DashboardMonitorListComponent.ts +3 -0
- package/Types/Docker/DockerInventoryExtractor.ts +343 -0
- package/Utils/Dashboard/Components/DashboardAlertListComponent.ts +47 -2
- package/Utils/Dashboard/Components/DashboardDockerContainerListComponent.ts +93 -0
- package/Utils/Dashboard/Components/DashboardDockerHostListComponent.ts +83 -0
- package/Utils/Dashboard/Components/DashboardDockerImageListComponent.ts +92 -0
- package/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.ts +82 -0
- package/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.ts +82 -0
- package/Utils/Dashboard/Components/DashboardIncidentListComponent.ts +47 -2
- package/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.ts +36 -0
- package/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.ts +36 -0
- package/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.ts +36 -0
- package/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.ts +34 -0
- package/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.ts +36 -0
- package/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.ts +57 -0
- package/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.ts +60 -0
- package/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.ts +75 -0
- package/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.ts +36 -0
- package/Utils/Dashboard/Components/DashboardMonitorListComponent.ts +59 -2
- package/Utils/Dashboard/Components/Index.ts +102 -0
- package/build/dist/Models/DatabaseModels/DockerResource.js +525 -0
- package/build/dist/Models/DatabaseModels/DockerResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +2 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Monitor.js +82 -0
- package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
- package/build/dist/Server/API/MonitorTemplateAPI.js +108 -0
- package/build/dist/Server/API/MonitorTemplateAPI.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.js +20 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.js +30 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/BillingInvoiceService.js +22 -25
- package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
- package/build/dist/Server/Services/DockerResourceService.js +196 -0
- package/build/dist/Server/Services/DockerResourceService.js.map +1 -0
- package/build/dist/Server/Services/MonitorTemplateService.js +297 -0
- package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
- package/build/dist/Server/Utils/VM/VMRunner.js +61 -0
- package/build/dist/Server/Utils/VM/VMRunner.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponentType.js +13 -0
- package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +15 -0
- package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.js.map +1 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.js +2 -0
- package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.js.map +1 -0
- package/build/dist/Types/Docker/DockerInventoryExtractor.js +293 -0
- package/build/dist/Types/Docker/DockerInventoryExtractor.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js +43 -3
- package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardDockerContainerListComponent.js +75 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerContainerListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerHostListComponent.js +69 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerHostListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerImageListComponent.js +75 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerImageListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.js +66 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.js +66 -0
- package/build/dist/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js +43 -3
- package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.js +44 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.js +47 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.js +55 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.js +29 -0
- package/build/dist/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.js.map +1 -0
- package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js +46 -3
- package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js.map +1 -1
- package/build/dist/Utils/Dashboard/Components/Index.js +53 -0
- package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import DashboardDockerNetworkListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentArgumentSection,
|
|
8
|
+
ComponentInputType,
|
|
9
|
+
EntityFilterModelType,
|
|
10
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
11
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
12
|
+
|
|
13
|
+
const DisplaySection: ComponentArgumentSection = {
|
|
14
|
+
name: "Display Options",
|
|
15
|
+
description: "Configure the widget title and row limit",
|
|
16
|
+
order: 1,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const FiltersSection: ComponentArgumentSection = {
|
|
20
|
+
name: "Filters",
|
|
21
|
+
description: "Narrow down which networks are shown",
|
|
22
|
+
order: 2,
|
|
23
|
+
defaultCollapsed: true,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default class DashboardDockerNetworkListComponentUtil extends DashboardBaseComponentUtil {
|
|
27
|
+
public static override getDefaultComponent(): DashboardDockerNetworkListComponent {
|
|
28
|
+
return {
|
|
29
|
+
_type: ObjectType.DashboardComponent,
|
|
30
|
+
componentType: DashboardComponentType.DockerNetworkList,
|
|
31
|
+
widthInDashboardUnits: 6,
|
|
32
|
+
heightInDashboardUnits: 4,
|
|
33
|
+
topInDashboardUnits: 0,
|
|
34
|
+
leftInDashboardUnits: 0,
|
|
35
|
+
componentId: ObjectID.generate(),
|
|
36
|
+
minHeightInDashboardUnits: 3,
|
|
37
|
+
minWidthInDashboardUnits: 6,
|
|
38
|
+
arguments: {
|
|
39
|
+
maxRows: 25,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public static override getComponentConfigArguments(): Array<
|
|
45
|
+
ComponentArgument<DashboardDockerNetworkListComponent>
|
|
46
|
+
> {
|
|
47
|
+
const args: Array<ComponentArgument<DashboardDockerNetworkListComponent>> =
|
|
48
|
+
[];
|
|
49
|
+
|
|
50
|
+
args.push({
|
|
51
|
+
name: "Title",
|
|
52
|
+
description: "Header shown above the network list",
|
|
53
|
+
required: false,
|
|
54
|
+
type: ComponentInputType.Text,
|
|
55
|
+
id: "title",
|
|
56
|
+
section: DisplaySection,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
args.push({
|
|
60
|
+
name: "Max Rows",
|
|
61
|
+
description: "Maximum number of networks to show",
|
|
62
|
+
required: false,
|
|
63
|
+
type: ComponentInputType.Number,
|
|
64
|
+
id: "maxRows",
|
|
65
|
+
placeholder: "25",
|
|
66
|
+
section: DisplaySection,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
args.push({
|
|
70
|
+
name: "Hosts",
|
|
71
|
+
description: "Show only networks from the selected hosts",
|
|
72
|
+
required: false,
|
|
73
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
74
|
+
id: "dockerHostIds",
|
|
75
|
+
placeholder: "All hosts",
|
|
76
|
+
section: FiltersSection,
|
|
77
|
+
entityFilterModelType: EntityFilterModelType.DockerHost,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return args;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import DashboardDockerVolumeListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentArgumentSection,
|
|
8
|
+
ComponentInputType,
|
|
9
|
+
EntityFilterModelType,
|
|
10
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
11
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
12
|
+
|
|
13
|
+
const DisplaySection: ComponentArgumentSection = {
|
|
14
|
+
name: "Display Options",
|
|
15
|
+
description: "Configure the widget title and row limit",
|
|
16
|
+
order: 1,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const FiltersSection: ComponentArgumentSection = {
|
|
20
|
+
name: "Filters",
|
|
21
|
+
description: "Narrow down which volumes are shown",
|
|
22
|
+
order: 2,
|
|
23
|
+
defaultCollapsed: true,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default class DashboardDockerVolumeListComponentUtil extends DashboardBaseComponentUtil {
|
|
27
|
+
public static override getDefaultComponent(): DashboardDockerVolumeListComponent {
|
|
28
|
+
return {
|
|
29
|
+
_type: ObjectType.DashboardComponent,
|
|
30
|
+
componentType: DashboardComponentType.DockerVolumeList,
|
|
31
|
+
widthInDashboardUnits: 6,
|
|
32
|
+
heightInDashboardUnits: 4,
|
|
33
|
+
topInDashboardUnits: 0,
|
|
34
|
+
leftInDashboardUnits: 0,
|
|
35
|
+
componentId: ObjectID.generate(),
|
|
36
|
+
minHeightInDashboardUnits: 3,
|
|
37
|
+
minWidthInDashboardUnits: 6,
|
|
38
|
+
arguments: {
|
|
39
|
+
maxRows: 25,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public static override getComponentConfigArguments(): Array<
|
|
45
|
+
ComponentArgument<DashboardDockerVolumeListComponent>
|
|
46
|
+
> {
|
|
47
|
+
const args: Array<ComponentArgument<DashboardDockerVolumeListComponent>> =
|
|
48
|
+
[];
|
|
49
|
+
|
|
50
|
+
args.push({
|
|
51
|
+
name: "Title",
|
|
52
|
+
description: "Header shown above the volume list",
|
|
53
|
+
required: false,
|
|
54
|
+
type: ComponentInputType.Text,
|
|
55
|
+
id: "title",
|
|
56
|
+
section: DisplaySection,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
args.push({
|
|
60
|
+
name: "Max Rows",
|
|
61
|
+
description: "Maximum number of volumes to show",
|
|
62
|
+
required: false,
|
|
63
|
+
type: ComponentInputType.Number,
|
|
64
|
+
id: "maxRows",
|
|
65
|
+
placeholder: "25",
|
|
66
|
+
section: DisplaySection,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
args.push({
|
|
70
|
+
name: "Hosts",
|
|
71
|
+
description: "Show only volumes from the selected hosts",
|
|
72
|
+
required: false,
|
|
73
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
74
|
+
id: "dockerHostIds",
|
|
75
|
+
placeholder: "All hosts",
|
|
76
|
+
section: FiltersSection,
|
|
77
|
+
entityFilterModelType: EntityFilterModelType.DockerHost,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return args;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ComponentArgument,
|
|
7
7
|
ComponentArgumentSection,
|
|
8
8
|
ComponentInputType,
|
|
9
|
+
EntityFilterModelType,
|
|
9
10
|
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
10
11
|
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
11
12
|
|
|
@@ -67,8 +68,8 @@ export default class DashboardIncidentListComponentUtil extends DashboardBaseCom
|
|
|
67
68
|
});
|
|
68
69
|
|
|
69
70
|
componentArguments.push({
|
|
70
|
-
name: "State",
|
|
71
|
-
description: "
|
|
71
|
+
name: "Lifecycle State",
|
|
72
|
+
description: "Quick filter by lifecycle state",
|
|
72
73
|
required: false,
|
|
73
74
|
type: ComponentInputType.Dropdown,
|
|
74
75
|
id: "stateFilter",
|
|
@@ -81,6 +82,50 @@ export default class DashboardIncidentListComponentUtil extends DashboardBaseCom
|
|
|
81
82
|
],
|
|
82
83
|
});
|
|
83
84
|
|
|
85
|
+
componentArguments.push({
|
|
86
|
+
name: "Severity",
|
|
87
|
+
description: "Show only incidents matching the selected severities",
|
|
88
|
+
required: false,
|
|
89
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
90
|
+
id: "severityIds",
|
|
91
|
+
placeholder: "All severities",
|
|
92
|
+
section: FiltersSection,
|
|
93
|
+
entityFilterModelType: EntityFilterModelType.IncidentSeverity,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
componentArguments.push({
|
|
97
|
+
name: "State",
|
|
98
|
+
description: "Show only incidents in the selected states",
|
|
99
|
+
required: false,
|
|
100
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
101
|
+
id: "stateIds",
|
|
102
|
+
placeholder: "All states",
|
|
103
|
+
section: FiltersSection,
|
|
104
|
+
entityFilterModelType: EntityFilterModelType.IncidentState,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
componentArguments.push({
|
|
108
|
+
name: "Monitors",
|
|
109
|
+
description: "Show only incidents linked to the selected monitors",
|
|
110
|
+
required: false,
|
|
111
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
112
|
+
id: "monitorIds",
|
|
113
|
+
placeholder: "All monitors",
|
|
114
|
+
section: FiltersSection,
|
|
115
|
+
entityFilterModelType: EntityFilterModelType.Monitor,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
componentArguments.push({
|
|
119
|
+
name: "Labels",
|
|
120
|
+
description: "Show only incidents tagged with the selected labels",
|
|
121
|
+
required: false,
|
|
122
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
123
|
+
id: "labelIds",
|
|
124
|
+
placeholder: "All labels",
|
|
125
|
+
section: FiltersSection,
|
|
126
|
+
entityFilterModelType: EntityFilterModelType.Label,
|
|
127
|
+
});
|
|
128
|
+
|
|
84
129
|
return componentArguments;
|
|
85
130
|
}
|
|
86
131
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DashboardKubernetesCronJobListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesCronJobListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesCronJobListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesCronJobList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesCronJobListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesCronJobListComponent>(
|
|
31
|
+
{
|
|
32
|
+
includeNamespaceFilter: true,
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DashboardKubernetesDaemonSetListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesDaemonSetListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesDaemonSetListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesDaemonSetList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesDaemonSetListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesDaemonSetListComponent>(
|
|
31
|
+
{
|
|
32
|
+
includeNamespaceFilter: true,
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DashboardKubernetesDeploymentListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesDeploymentListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesDeploymentListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesDeploymentList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesDeploymentListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesDeploymentListComponent>(
|
|
31
|
+
{
|
|
32
|
+
includeNamespaceFilter: true,
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import DashboardKubernetesJobListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesJobListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesJobListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesJobList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesJobListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesJobListComponent>({
|
|
31
|
+
includeNamespaceFilter: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DashboardKubernetesNamespaceListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesNamespaceListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesNamespaceListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesNamespaceList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesNamespaceListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesNamespaceListComponent>(
|
|
31
|
+
{
|
|
32
|
+
includeNamespaceFilter: false,
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import DashboardKubernetesNodeListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
|
+
import {
|
|
11
|
+
KubernetesFiltersSection,
|
|
12
|
+
getKubernetesCommonArguments,
|
|
13
|
+
} from "./DashboardKubernetesResourceListShared";
|
|
14
|
+
|
|
15
|
+
export default class DashboardKubernetesNodeListComponentUtil extends DashboardBaseComponentUtil {
|
|
16
|
+
public static override getDefaultComponent(): DashboardKubernetesNodeListComponent {
|
|
17
|
+
return {
|
|
18
|
+
_type: ObjectType.DashboardComponent,
|
|
19
|
+
componentType: DashboardComponentType.KubernetesNodeList,
|
|
20
|
+
widthInDashboardUnits: 6,
|
|
21
|
+
heightInDashboardUnits: 4,
|
|
22
|
+
topInDashboardUnits: 0,
|
|
23
|
+
leftInDashboardUnits: 0,
|
|
24
|
+
componentId: ObjectID.generate(),
|
|
25
|
+
minHeightInDashboardUnits: 3,
|
|
26
|
+
minWidthInDashboardUnits: 6,
|
|
27
|
+
arguments: {
|
|
28
|
+
maxRows: 25,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static override getComponentConfigArguments(): Array<
|
|
34
|
+
ComponentArgument<DashboardKubernetesNodeListComponent>
|
|
35
|
+
> {
|
|
36
|
+
const args: Array<ComponentArgument<DashboardKubernetesNodeListComponent>> =
|
|
37
|
+
getKubernetesCommonArguments<DashboardKubernetesNodeListComponent>({
|
|
38
|
+
includeNamespaceFilter: false,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
args.push({
|
|
42
|
+
name: "Readiness",
|
|
43
|
+
description: "Quick filter by node readiness",
|
|
44
|
+
required: false,
|
|
45
|
+
type: ComponentInputType.Dropdown,
|
|
46
|
+
id: "readinessFilter",
|
|
47
|
+
section: KubernetesFiltersSection,
|
|
48
|
+
dropdownOptions: [
|
|
49
|
+
{ label: "All", value: "" },
|
|
50
|
+
{ label: "Ready only", value: "ready" },
|
|
51
|
+
{ label: "Not ready only", value: "not-ready" },
|
|
52
|
+
],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return args;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import DashboardKubernetesPodListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import {
|
|
6
|
+
ComponentArgument,
|
|
7
|
+
ComponentInputType,
|
|
8
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
9
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
10
|
+
import {
|
|
11
|
+
KubernetesFiltersSection,
|
|
12
|
+
getKubernetesCommonArguments,
|
|
13
|
+
} from "./DashboardKubernetesResourceListShared";
|
|
14
|
+
|
|
15
|
+
export default class DashboardKubernetesPodListComponentUtil extends DashboardBaseComponentUtil {
|
|
16
|
+
public static override getDefaultComponent(): DashboardKubernetesPodListComponent {
|
|
17
|
+
return {
|
|
18
|
+
_type: ObjectType.DashboardComponent,
|
|
19
|
+
componentType: DashboardComponentType.KubernetesPodList,
|
|
20
|
+
widthInDashboardUnits: 6,
|
|
21
|
+
heightInDashboardUnits: 4,
|
|
22
|
+
topInDashboardUnits: 0,
|
|
23
|
+
leftInDashboardUnits: 0,
|
|
24
|
+
componentId: ObjectID.generate(),
|
|
25
|
+
minHeightInDashboardUnits: 3,
|
|
26
|
+
minWidthInDashboardUnits: 6,
|
|
27
|
+
arguments: {
|
|
28
|
+
maxRows: 25,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public static override getComponentConfigArguments(): Array<
|
|
34
|
+
ComponentArgument<DashboardKubernetesPodListComponent>
|
|
35
|
+
> {
|
|
36
|
+
const args: Array<ComponentArgument<DashboardKubernetesPodListComponent>> =
|
|
37
|
+
getKubernetesCommonArguments<DashboardKubernetesPodListComponent>({
|
|
38
|
+
includeNamespaceFilter: true,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
args.push({
|
|
42
|
+
name: "Pod Phases",
|
|
43
|
+
description: "Show only pods in the selected phases",
|
|
44
|
+
required: false,
|
|
45
|
+
type: ComponentInputType.MultiSelectDropdown,
|
|
46
|
+
id: "podPhases",
|
|
47
|
+
placeholder: "All phases",
|
|
48
|
+
section: KubernetesFiltersSection,
|
|
49
|
+
dropdownOptions: [
|
|
50
|
+
{ label: "Running", value: "Running" },
|
|
51
|
+
{ label: "Pending", value: "Pending" },
|
|
52
|
+
{ label: "Succeeded", value: "Succeeded" },
|
|
53
|
+
{ label: "Failed", value: "Failed" },
|
|
54
|
+
{ label: "Unknown", value: "Unknown" },
|
|
55
|
+
],
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return args;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ComponentArgument,
|
|
3
|
+
ComponentArgumentSection,
|
|
4
|
+
ComponentInputType,
|
|
5
|
+
EntityFilterModelType,
|
|
6
|
+
} from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
7
|
+
import DashboardBaseComponent from "../../../Types/Dashboard/DashboardComponents/DashboardBaseComponent";
|
|
8
|
+
|
|
9
|
+
export const KubernetesDisplaySection: ComponentArgumentSection = {
|
|
10
|
+
name: "Display Options",
|
|
11
|
+
description: "Configure the widget title and row limit",
|
|
12
|
+
order: 1,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const KubernetesFiltersSection: ComponentArgumentSection = {
|
|
16
|
+
name: "Filters",
|
|
17
|
+
description: "Narrow down which resources are shown",
|
|
18
|
+
order: 2,
|
|
19
|
+
defaultCollapsed: true,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export interface KubernetesCommonArgumentsOptions {
|
|
23
|
+
includeNamespaceFilter: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function getKubernetesCommonArguments<T extends DashboardBaseComponent>(
|
|
27
|
+
options: KubernetesCommonArgumentsOptions,
|
|
28
|
+
): Array<ComponentArgument<T>> {
|
|
29
|
+
const args: Array<ComponentArgument<T>> = [];
|
|
30
|
+
|
|
31
|
+
args.push({
|
|
32
|
+
name: "Title",
|
|
33
|
+
description: "Header shown above the list",
|
|
34
|
+
required: false,
|
|
35
|
+
type: ComponentInputType.Text,
|
|
36
|
+
id: "title" as keyof T["arguments"],
|
|
37
|
+
section: KubernetesDisplaySection,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
args.push({
|
|
41
|
+
name: "Max Rows",
|
|
42
|
+
description: "Maximum number of rows to show",
|
|
43
|
+
required: false,
|
|
44
|
+
type: ComponentInputType.Number,
|
|
45
|
+
id: "maxRows" as keyof T["arguments"],
|
|
46
|
+
placeholder: "25",
|
|
47
|
+
section: KubernetesDisplaySection,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
args.push({
|
|
51
|
+
name: "Clusters",
|
|
52
|
+
description: "Show only resources from the selected clusters",
|
|
53
|
+
required: false,
|
|
54
|
+
type: ComponentInputType.EntityMultiSelectDropdown,
|
|
55
|
+
id: "kubernetesClusterIds" as keyof T["arguments"],
|
|
56
|
+
placeholder: "All clusters",
|
|
57
|
+
section: KubernetesFiltersSection,
|
|
58
|
+
entityFilterModelType: EntityFilterModelType.KubernetesCluster,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (options.includeNamespaceFilter) {
|
|
62
|
+
args.push({
|
|
63
|
+
name: "Namespaces",
|
|
64
|
+
description:
|
|
65
|
+
"Comma-separated list of namespaces to include. Leave blank for all.",
|
|
66
|
+
required: false,
|
|
67
|
+
type: ComponentInputType.Text,
|
|
68
|
+
id: "namespaces" as keyof T["arguments"],
|
|
69
|
+
placeholder: "default, kube-system",
|
|
70
|
+
section: KubernetesFiltersSection,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return args;
|
|
75
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import DashboardKubernetesStatefulSetListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent";
|
|
2
|
+
import { ObjectType } from "../../../Types/JSON";
|
|
3
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
4
|
+
import DashboardBaseComponentUtil from "./DashboardBaseComponent";
|
|
5
|
+
import { ComponentArgument } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
|
|
6
|
+
import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
|
|
7
|
+
import { getKubernetesCommonArguments } from "./DashboardKubernetesResourceListShared";
|
|
8
|
+
|
|
9
|
+
export default class DashboardKubernetesStatefulSetListComponentUtil extends DashboardBaseComponentUtil {
|
|
10
|
+
public static override getDefaultComponent(): DashboardKubernetesStatefulSetListComponent {
|
|
11
|
+
return {
|
|
12
|
+
_type: ObjectType.DashboardComponent,
|
|
13
|
+
componentType: DashboardComponentType.KubernetesStatefulSetList,
|
|
14
|
+
widthInDashboardUnits: 6,
|
|
15
|
+
heightInDashboardUnits: 4,
|
|
16
|
+
topInDashboardUnits: 0,
|
|
17
|
+
leftInDashboardUnits: 0,
|
|
18
|
+
componentId: ObjectID.generate(),
|
|
19
|
+
minHeightInDashboardUnits: 3,
|
|
20
|
+
minWidthInDashboardUnits: 6,
|
|
21
|
+
arguments: {
|
|
22
|
+
maxRows: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static override getComponentConfigArguments(): Array<
|
|
28
|
+
ComponentArgument<DashboardKubernetesStatefulSetListComponent>
|
|
29
|
+
> {
|
|
30
|
+
return getKubernetesCommonArguments<DashboardKubernetesStatefulSetListComponent>(
|
|
31
|
+
{
|
|
32
|
+
includeNamespaceFilter: true,
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|