@oneuptime/common 10.0.93 → 10.0.94

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.
Files changed (136) hide show
  1. package/Models/DatabaseModels/DockerResource.ts +497 -0
  2. package/Models/DatabaseModels/Index.ts +2 -0
  3. package/Models/DatabaseModels/Monitor.ts +83 -0
  4. package/Server/API/MonitorTemplateAPI.ts +182 -0
  5. package/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.ts +41 -0
  6. package/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.ts +69 -0
  7. package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +4 -0
  8. package/Server/Services/BillingInvoiceService.ts +18 -29
  9. package/Server/Services/DockerResourceService.ts +310 -0
  10. package/Server/Services/MonitorTemplateService.ts +359 -0
  11. package/Types/Dashboard/DashboardComponentType.ts +13 -0
  12. package/Types/Dashboard/DashboardComponents/ComponentArgument.ts +16 -0
  13. package/Types/Dashboard/DashboardComponents/DashboardAlertListComponent.ts +4 -0
  14. package/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.ts +15 -0
  15. package/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.ts +14 -0
  16. package/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.ts +15 -0
  17. package/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.ts +14 -0
  18. package/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.ts +14 -0
  19. package/Types/Dashboard/DashboardComponents/DashboardIncidentListComponent.ts +4 -0
  20. package/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.ts +15 -0
  21. package/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.ts +15 -0
  22. package/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.ts +15 -0
  23. package/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.ts +15 -0
  24. package/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.ts +14 -0
  25. package/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.ts +15 -0
  26. package/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.ts +16 -0
  27. package/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.ts +15 -0
  28. package/Types/Dashboard/DashboardComponents/DashboardMonitorListComponent.ts +3 -0
  29. package/Types/Docker/DockerInventoryExtractor.ts +343 -0
  30. package/Utils/Dashboard/Components/DashboardAlertListComponent.ts +47 -2
  31. package/Utils/Dashboard/Components/DashboardDockerContainerListComponent.ts +93 -0
  32. package/Utils/Dashboard/Components/DashboardDockerHostListComponent.ts +83 -0
  33. package/Utils/Dashboard/Components/DashboardDockerImageListComponent.ts +92 -0
  34. package/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.ts +82 -0
  35. package/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.ts +82 -0
  36. package/Utils/Dashboard/Components/DashboardIncidentListComponent.ts +47 -2
  37. package/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.ts +36 -0
  38. package/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.ts +36 -0
  39. package/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.ts +36 -0
  40. package/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.ts +34 -0
  41. package/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.ts +36 -0
  42. package/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.ts +57 -0
  43. package/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.ts +60 -0
  44. package/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.ts +75 -0
  45. package/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.ts +36 -0
  46. package/Utils/Dashboard/Components/DashboardMonitorListComponent.ts +59 -2
  47. package/Utils/Dashboard/Components/Index.ts +102 -0
  48. package/build/dist/Models/DatabaseModels/DockerResource.js +525 -0
  49. package/build/dist/Models/DatabaseModels/DockerResource.js.map +1 -0
  50. package/build/dist/Models/DatabaseModels/Index.js +2 -0
  51. package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
  52. package/build/dist/Models/DatabaseModels/Monitor.js +82 -0
  53. package/build/dist/Models/DatabaseModels/Monitor.js.map +1 -1
  54. package/build/dist/Server/API/MonitorTemplateAPI.js +108 -0
  55. package/build/dist/Server/API/MonitorTemplateAPI.js.map +1 -0
  56. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.js +20 -0
  57. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777933061000-MigrationName.js.map +1 -0
  58. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.js +30 -0
  59. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1777972687018-MigrationName.js.map +1 -0
  60. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +4 -0
  61. package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
  62. package/build/dist/Server/Services/BillingInvoiceService.js +22 -25
  63. package/build/dist/Server/Services/BillingInvoiceService.js.map +1 -1
  64. package/build/dist/Server/Services/DockerResourceService.js +196 -0
  65. package/build/dist/Server/Services/DockerResourceService.js.map +1 -0
  66. package/build/dist/Server/Services/MonitorTemplateService.js +290 -0
  67. package/build/dist/Server/Services/MonitorTemplateService.js.map +1 -1
  68. package/build/dist/Types/Dashboard/DashboardComponentType.js +13 -0
  69. package/build/dist/Types/Dashboard/DashboardComponentType.js.map +1 -1
  70. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js +15 -0
  71. package/build/dist/Types/Dashboard/DashboardComponents/ComponentArgument.js.map +1 -1
  72. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.js +2 -0
  73. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent.js.map +1 -0
  74. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.js +2 -0
  75. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent.js.map +1 -0
  76. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.js +2 -0
  77. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent.js.map +1 -0
  78. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.js +2 -0
  79. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerNetworkListComponent.js.map +1 -0
  80. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.js +2 -0
  81. package/build/dist/Types/Dashboard/DashboardComponents/DashboardDockerVolumeListComponent.js.map +1 -0
  82. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.js +2 -0
  83. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesCronJobListComponent.js.map +1 -0
  84. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.js +2 -0
  85. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDaemonSetListComponent.js.map +1 -0
  86. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.js +2 -0
  87. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesDeploymentListComponent.js.map +1 -0
  88. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.js +2 -0
  89. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesJobListComponent.js.map +1 -0
  90. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.js +2 -0
  91. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNamespaceListComponent.js.map +1 -0
  92. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.js +2 -0
  93. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesNodeListComponent.js.map +1 -0
  94. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.js +2 -0
  95. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesPodListComponent.js.map +1 -0
  96. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.js +2 -0
  97. package/build/dist/Types/Dashboard/DashboardComponents/DashboardKubernetesStatefulSetListComponent.js.map +1 -0
  98. package/build/dist/Types/Docker/DockerInventoryExtractor.js +293 -0
  99. package/build/dist/Types/Docker/DockerInventoryExtractor.js.map +1 -0
  100. package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js +43 -3
  101. package/build/dist/Utils/Dashboard/Components/DashboardAlertListComponent.js.map +1 -1
  102. package/build/dist/Utils/Dashboard/Components/DashboardDockerContainerListComponent.js +75 -0
  103. package/build/dist/Utils/Dashboard/Components/DashboardDockerContainerListComponent.js.map +1 -0
  104. package/build/dist/Utils/Dashboard/Components/DashboardDockerHostListComponent.js +69 -0
  105. package/build/dist/Utils/Dashboard/Components/DashboardDockerHostListComponent.js.map +1 -0
  106. package/build/dist/Utils/Dashboard/Components/DashboardDockerImageListComponent.js +75 -0
  107. package/build/dist/Utils/Dashboard/Components/DashboardDockerImageListComponent.js.map +1 -0
  108. package/build/dist/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.js +66 -0
  109. package/build/dist/Utils/Dashboard/Components/DashboardDockerNetworkListComponent.js.map +1 -0
  110. package/build/dist/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.js +66 -0
  111. package/build/dist/Utils/Dashboard/Components/DashboardDockerVolumeListComponent.js.map +1 -0
  112. package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js +43 -3
  113. package/build/dist/Utils/Dashboard/Components/DashboardIncidentListComponent.js.map +1 -1
  114. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.js +29 -0
  115. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesCronJobListComponent.js.map +1 -0
  116. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.js +29 -0
  117. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDaemonSetListComponent.js.map +1 -0
  118. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.js +29 -0
  119. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesDeploymentListComponent.js.map +1 -0
  120. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.js +29 -0
  121. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesJobListComponent.js.map +1 -0
  122. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.js +29 -0
  123. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNamespaceListComponent.js.map +1 -0
  124. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.js +44 -0
  125. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesNodeListComponent.js.map +1 -0
  126. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.js +47 -0
  127. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesPodListComponent.js.map +1 -0
  128. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.js +55 -0
  129. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesResourceListShared.js.map +1 -0
  130. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.js +29 -0
  131. package/build/dist/Utils/Dashboard/Components/DashboardKubernetesStatefulSetListComponent.js.map +1 -0
  132. package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js +46 -3
  133. package/build/dist/Utils/Dashboard/Components/DashboardMonitorListComponent.js.map +1 -1
  134. package/build/dist/Utils/Dashboard/Components/Index.js +53 -0
  135. package/build/dist/Utils/Dashboard/Components/Index.js.map +1 -1
  136. package/package.json +1 -1
@@ -0,0 +1,93 @@
1
+ import DashboardDockerContainerListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardDockerContainerListComponent";
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 containers are shown",
22
+ order: 2,
23
+ defaultCollapsed: true,
24
+ };
25
+
26
+ export default class DashboardDockerContainerListComponentUtil extends DashboardBaseComponentUtil {
27
+ public static override getDefaultComponent(): DashboardDockerContainerListComponent {
28
+ return {
29
+ _type: ObjectType.DashboardComponent,
30
+ componentType: DashboardComponentType.DockerContainerList,
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<DashboardDockerContainerListComponent>
46
+ > {
47
+ const args: Array<
48
+ ComponentArgument<DashboardDockerContainerListComponent>
49
+ > = [];
50
+
51
+ args.push({
52
+ name: "Title",
53
+ description: "Header shown above the container list",
54
+ required: false,
55
+ type: ComponentInputType.Text,
56
+ id: "title",
57
+ section: DisplaySection,
58
+ });
59
+
60
+ args.push({
61
+ name: "Max Rows",
62
+ description: "Maximum number of containers to show",
63
+ required: false,
64
+ type: ComponentInputType.Number,
65
+ id: "maxRows",
66
+ placeholder: "25",
67
+ section: DisplaySection,
68
+ });
69
+
70
+ args.push({
71
+ name: "Hosts",
72
+ description: "Show only containers from the selected hosts",
73
+ required: false,
74
+ type: ComponentInputType.EntityMultiSelectDropdown,
75
+ id: "dockerHostIds",
76
+ placeholder: "All hosts",
77
+ section: FiltersSection,
78
+ entityFilterModelType: EntityFilterModelType.DockerHost,
79
+ });
80
+
81
+ args.push({
82
+ name: "Image Name",
83
+ description: "Substring of the container image to match (e.g. nginx)",
84
+ required: false,
85
+ type: ComponentInputType.Text,
86
+ id: "imageName",
87
+ placeholder: "nginx",
88
+ section: FiltersSection,
89
+ });
90
+
91
+ return args;
92
+ }
93
+ }
@@ -0,0 +1,83 @@
1
+ import DashboardDockerHostListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardDockerHostListComponent";
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
+ } from "../../../Types/Dashboard/DashboardComponents/ComponentArgument";
10
+ import DashboardComponentType from "../../../Types/Dashboard/DashboardComponentType";
11
+
12
+ const DisplaySection: ComponentArgumentSection = {
13
+ name: "Display Options",
14
+ description: "Configure the widget title and row limit",
15
+ order: 1,
16
+ };
17
+
18
+ const FiltersSection: ComponentArgumentSection = {
19
+ name: "Filters",
20
+ description: "Narrow down which Docker hosts are shown",
21
+ order: 2,
22
+ defaultCollapsed: true,
23
+ };
24
+
25
+ export default class DashboardDockerHostListComponentUtil extends DashboardBaseComponentUtil {
26
+ public static override getDefaultComponent(): DashboardDockerHostListComponent {
27
+ return {
28
+ _type: ObjectType.DashboardComponent,
29
+ componentType: DashboardComponentType.DockerHostList,
30
+ widthInDashboardUnits: 6,
31
+ heightInDashboardUnits: 4,
32
+ topInDashboardUnits: 0,
33
+ leftInDashboardUnits: 0,
34
+ componentId: ObjectID.generate(),
35
+ minHeightInDashboardUnits: 3,
36
+ minWidthInDashboardUnits: 6,
37
+ arguments: {
38
+ maxRows: 25,
39
+ },
40
+ };
41
+ }
42
+
43
+ public static override getComponentConfigArguments(): Array<
44
+ ComponentArgument<DashboardDockerHostListComponent>
45
+ > {
46
+ const args: Array<ComponentArgument<DashboardDockerHostListComponent>> = [];
47
+
48
+ args.push({
49
+ name: "Title",
50
+ description: "Header shown above the host list",
51
+ required: false,
52
+ type: ComponentInputType.Text,
53
+ id: "title",
54
+ section: DisplaySection,
55
+ });
56
+
57
+ args.push({
58
+ name: "Max Rows",
59
+ description: "Maximum number of hosts to show",
60
+ required: false,
61
+ type: ComponentInputType.Number,
62
+ id: "maxRows",
63
+ placeholder: "25",
64
+ section: DisplaySection,
65
+ });
66
+
67
+ args.push({
68
+ name: "Connection Status",
69
+ description: "Quick filter by OTel collector status",
70
+ required: false,
71
+ type: ComponentInputType.Dropdown,
72
+ id: "statusFilter",
73
+ section: FiltersSection,
74
+ dropdownOptions: [
75
+ { label: "All", value: "" },
76
+ { label: "Connected only", value: "connected" },
77
+ { label: "Disconnected only", value: "disconnected" },
78
+ ],
79
+ });
80
+
81
+ return args;
82
+ }
83
+ }
@@ -0,0 +1,92 @@
1
+ import DashboardDockerImageListComponent from "../../../Types/Dashboard/DashboardComponents/DashboardDockerImageListComponent";
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 images are shown",
22
+ order: 2,
23
+ defaultCollapsed: true,
24
+ };
25
+
26
+ export default class DashboardDockerImageListComponentUtil extends DashboardBaseComponentUtil {
27
+ public static override getDefaultComponent(): DashboardDockerImageListComponent {
28
+ return {
29
+ _type: ObjectType.DashboardComponent,
30
+ componentType: DashboardComponentType.DockerImageList,
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<DashboardDockerImageListComponent>
46
+ > {
47
+ const args: Array<ComponentArgument<DashboardDockerImageListComponent>> =
48
+ [];
49
+
50
+ args.push({
51
+ name: "Title",
52
+ description: "Header shown above the image 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 images 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 images 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
+ args.push({
81
+ name: "Name Contains",
82
+ description: "Show only images whose name contains this substring",
83
+ required: false,
84
+ type: ComponentInputType.Text,
85
+ id: "nameSearch",
86
+ placeholder: "nginx",
87
+ section: FiltersSection,
88
+ });
89
+
90
+ return args;
91
+ }
92
+ }
@@ -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: "Filter incidents by lifecycle state",
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
+ }