@dovetail-v2/refine 0.0.60 → 0.0.61-alpha.0
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/dist/{MonacoYamlDiffEditor-a6a2c099.js → MonacoYamlDiffEditor-e5cfbfbd.js} +1 -1
- package/dist/{index-2c6b45ea.js → index-f46a38ea.js} +343 -182
- package/dist/refine.js +175 -158
- package/dist/refine.umd.cjs +186 -25
- package/lib/src/components/Form/type.d.ts +4 -3
- package/lib/src/components/K8sDropdown/index.d.ts +1 -1
- package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +2 -1
- package/lib/src/components/PodDropdown/index.d.ts +9 -0
- package/lib/src/components/PodShellModal/index.d.ts +7 -0
- package/lib/src/components/ResourceSelect/index.d.ts +12 -0
- package/lib/src/components/ValueDisplay/index.d.ts +1 -1
- package/lib/src/components/YamlForm/index.d.ts +4 -0
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/constants/k8s.d.ts +18 -0
- package/lib/src/hooks/useEagleForm.d.ts +2 -1
- package/lib/src/hooks/useEagleTable/columns.d.ts +8 -1
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
- package/lib/src/model/cronjob-model.d.ts +9 -0
- package/lib/src/model/index.d.ts +6 -0
- package/lib/src/model/job-model.d.ts +10 -0
- package/lib/src/model/pod-metrics-model.d.ts +7 -0
- package/lib/src/model/pod-model.d.ts +15 -0
- package/lib/src/model/resource-model.d.ts +17 -0
- package/lib/src/model/workload-model.d.ts +17 -0
- package/lib/src/models/index.d.ts +4 -0
- package/lib/src/models/ingress-model.d.ts +0 -1
- package/lib/src/models/node-model.d.ts +15 -0
- package/lib/src/models/persistent-volume-claim.d.ts +10 -0
- package/lib/src/models/persistent-volume.d.ts +10 -0
- package/lib/src/models/storage-class.d.ts +10 -0
- package/lib/src/models/workload-base-model.d.ts +2 -2
- package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +17 -0
- package/lib/src/pages/{pods/index.js → nodes/index.d.ts} +0 -1
- package/lib/src/pages/nodes/list/index.d.ts +3 -0
- package/lib/src/pages/nodes/show/index.d.ts +3 -0
- package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
- package/lib/src/pages/storageclasses/index.d.ts +44 -0
- package/lib/src/pages/storageclasses/list/index.d.ts +3 -0
- package/lib/src/pages/storageclasses/show/index.d.ts +3 -0
- package/lib/src/types/metric.d.ts +25 -0
- package/lib/src/types/resource.d.ts +3 -1
- package/lib/src/utils/shell.d.ts +5 -0
- package/package.json +1 -1
- package/lib/src/App.js +0 -91
- package/lib/src/Dovetail.js +0 -45
- package/lib/src/components/Breadcrumb/index.js +0 -20
- package/lib/src/components/ConditionsTable/ConditionsTable.js +0 -56
- package/lib/src/components/ConditionsTable/index.js +0 -1
- package/lib/src/components/CreateButton/index.js +0 -10
- package/lib/src/components/CronJobDropdown/index.js +0 -26
- package/lib/src/components/CronjobJobsTable/index.js +0 -49
- package/lib/src/components/DeleteButton/index.js +0 -13
- package/lib/src/components/DeleteManyButton/index.js +0 -16
- package/lib/src/components/DrawerShow/DrawerShow.js +0 -13
- package/lib/src/components/DrawerShow/index.js +0 -1
- package/lib/src/components/EditButton/index.js +0 -13
- package/lib/src/components/EditField/index.js +0 -47
- package/lib/src/components/ErrorContent/index.js +0 -36
- package/lib/src/components/EventsTable/EventsTable.js +0 -59
- package/lib/src/components/EventsTable/index.js +0 -1
- package/lib/src/components/Form/KeyValueListWidget.js +0 -56
- package/lib/src/components/Form/MetadataForm.js +0 -9
- package/lib/src/components/Form/NameInputWidget.js +0 -50
- package/lib/src/components/Form/NamespaceSelectWidget.js +0 -21
- package/lib/src/components/Form/index.js +0 -4
- package/lib/src/components/Form/widget.js +0 -1
- package/lib/src/components/FormErrorAlert/index.js +0 -8
- package/lib/src/components/FormLayout/index.js +0 -21
- package/lib/src/components/FormModal/index.js +0 -51
- package/lib/src/components/ImageNames/index.js +0 -14
- package/lib/src/components/IngressRulesComponent/index.js +0 -11
- package/lib/src/components/IngressRulesTable/IngressRulesTable.js +0 -51
- package/lib/src/components/IngressRulesTable/index.js +0 -1
- package/lib/src/components/K8sDropdown/index.js +0 -31
- package/lib/src/components/KeyValue/KeyValue.js +0 -27
- package/lib/src/components/KeyValue/index.js +0 -1
- package/lib/src/components/KeyValueData/index.js +0 -50
- package/lib/src/components/Layout/index.js +0 -39
- package/lib/src/components/ListPage/index.js +0 -25
- package/lib/src/components/Menu/index.js +0 -36
- package/lib/src/components/NamespacesFilter/index.js +0 -34
- package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +0 -77
- package/lib/src/components/NetworkPolicyRulesTable/index.js +0 -1
- package/lib/src/components/PageShow/PageShow.js +0 -11
- package/lib/src/components/PageShow/index.js +0 -1
- package/lib/src/components/PodContainersTable/PodContainersTable.js +0 -78
- package/lib/src/components/PodContainersTable/index.js +0 -1
- package/lib/src/components/PodLog/index.js +0 -136
- package/lib/src/components/ReferenceLink/index.js +0 -17
- package/lib/src/components/RefineForm/RefineFormContent.d.ts +0 -10
- package/lib/src/components/RefineForm/RefineFormModal.d.ts +0 -8
- package/lib/src/components/RefineForm/RefineFormPage.d.ts +0 -7
- package/lib/src/components/RefineForm/index.d.ts +0 -3
- package/lib/src/components/RefineForm/type.d.ts +0 -20
- package/lib/src/components/RefineForm/useRefineForm.d.ts +0 -10
- package/lib/src/components/ResourceCRUD/ResourceCRUD.js +0 -15
- package/lib/src/components/ResourceCRUD/create/index.js +0 -13
- package/lib/src/components/ResourceCRUD/index.js +0 -4
- package/lib/src/components/ResourceCRUD/list/index.js +0 -19
- package/lib/src/components/ResourceCRUD/show/index.js +0 -6
- package/lib/src/components/ResourceLink/index.js +0 -21
- package/lib/src/components/ResourceUsageBar/index.js +0 -81
- package/lib/src/components/Separator/index.js +0 -11
- package/lib/src/components/ShowContent/ShowContent.js +0 -157
- package/lib/src/components/ShowContent/fields.js +0 -157
- package/lib/src/components/ShowContent/index.js +0 -2
- package/lib/src/components/StateTag/StateTag.js +0 -22
- package/lib/src/components/StateTag/index.js +0 -1
- package/lib/src/components/Table/ErrorContent.js +0 -36
- package/lib/src/components/Table/TableToolBar.js +0 -14
- package/lib/src/components/Table/TableWidgets.js +0 -28
- package/lib/src/components/Table/index.js +0 -69
- package/lib/src/components/Tags/index.js +0 -22
- package/lib/src/components/Time/index.js +0 -14
- package/lib/src/components/WorkloadDropdown/index.js +0 -24
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +0 -39
- package/lib/src/components/WorkloadPodsTable/index.js +0 -1
- package/lib/src/components/WorkloadReplicas/index.js +0 -50
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.js +0 -34
- package/lib/src/components/YamlEditor/MonacoYamlEditor.js +0 -149
- package/lib/src/components/YamlEditor/YamlEditorComponent.js +0 -90
- package/lib/src/components/YamlEditor/index.js +0 -1
- package/lib/src/components/YamlEditor/style.js +0 -102
- package/lib/src/components/YamlEditor/yaml.worker.js +0 -1
- package/lib/src/components/YamlForm/index.js +0 -61
- package/lib/src/components/index.js +0 -38
- package/lib/src/constants/index.js +0 -2
- package/lib/src/constants/k8s.js +0 -203
- package/lib/src/constants/state.js +0 -15
- package/lib/src/contexts/component.js +0 -3
- package/lib/src/contexts/configs.js +0 -3
- package/lib/src/contexts/global-store.js +0 -3
- package/lib/src/contexts/index.js +0 -3
- package/lib/src/hooks/index.js +0 -7
- package/lib/src/hooks/useDeleteModal/index.js +0 -1
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +0 -31
- package/lib/src/hooks/useDeleteModal/useDeleteModal.js +0 -38
- package/lib/src/hooks/useDownloadYAML.js +0 -10
- package/lib/src/hooks/useEagleForm.js +0 -177
- package/lib/src/hooks/useEagleTable/columns.js +0 -246
- package/lib/src/hooks/useEagleTable/index.js +0 -2
- package/lib/src/hooks/useEagleTable/useEagleTable.js +0 -63
- package/lib/src/hooks/useEdit.js +0 -19
- package/lib/src/hooks/useGlobalStore.js +0 -5
- package/lib/src/hooks/useK8sYamlEditor.js +0 -37
- package/lib/src/hooks/useOpenForm.js +0 -43
- package/lib/src/hooks/useSchema.js +0 -37
- package/lib/src/hooks/useSubmitForm.js +0 -42
- package/lib/src/i18n.js +0 -19
- package/lib/src/index.js +0 -13
- package/lib/src/locales/en-US/dovetail.json +0 -18
- package/lib/src/locales/en-US/index.js +0 -4
- package/lib/src/locales/index.js +0 -6
- package/lib/src/locales/zh-CN/dovetail.json +0 -91
- package/lib/src/locales/zh-CN/index.js +0 -4
- package/lib/src/main.js +0 -12
- package/lib/src/models/cronjob-model.js +0 -32
- package/lib/src/models/daemonset-model.js +0 -17
- package/lib/src/models/deployment-model.js +0 -17
- package/lib/src/models/event-model.js +0 -11
- package/lib/src/models/index.js +0 -14
- package/lib/src/models/ingress-model.js +0 -24
- package/lib/src/models/job-model.js +0 -56
- package/lib/src/models/network-policy-model.js +0 -10
- package/lib/src/models/pod-metrics-model.js +0 -34
- package/lib/src/models/pod-model.js +0 -78
- package/lib/src/models/resource-model.js +0 -34
- package/lib/src/models/server-instance-model.d.ts +0 -10
- package/lib/src/models/service-model.js +0 -17
- package/lib/src/models/statefulset-model.js +0 -17
- package/lib/src/models/types/index.js +0 -1
- package/lib/src/models/types/metric.js +0 -1
- package/lib/src/models/workload-base-model.js +0 -22
- package/lib/src/models/workload-model.js +0 -51
- package/lib/src/pages/configmaps/index.js +0 -15
- package/lib/src/pages/cronjobs/create/index.js +0 -6
- package/lib/src/pages/cronjobs/index.js +0 -3
- package/lib/src/pages/cronjobs/list/index.js +0 -42
- package/lib/src/pages/cronjobs/show/index.js +0 -16
- package/lib/src/pages/daemonsets/create/index.js +0 -6
- package/lib/src/pages/daemonsets/index.js +0 -3
- package/lib/src/pages/daemonsets/list/index.js +0 -32
- package/lib/src/pages/daemonsets/show/index.js +0 -16
- package/lib/src/pages/deployments/create/index.js +0 -7
- package/lib/src/pages/deployments/index.js +0 -3
- package/lib/src/pages/deployments/list/index.js +0 -26
- package/lib/src/pages/deployments/show/index.js +0 -16
- package/lib/src/pages/ingresses/index.js +0 -26
- package/lib/src/pages/jobs/index.js +0 -34
- package/lib/src/pages/networkPolicies/index.js +0 -67
- package/lib/src/pages/pods/create/index.js +0 -6
- package/lib/src/pages/pods/list/index.js +0 -81
- package/lib/src/pages/pods/show/index.js +0 -54
- package/lib/src/pages/secrets/index.js +0 -15
- package/lib/src/pages/services/index.js +0 -26
- package/lib/src/pages/statefulsets/create/index.js +0 -6
- package/lib/src/pages/statefulsets/index.js +0 -3
- package/lib/src/pages/statefulsets/list/index.js +0 -26
- package/lib/src/pages/statefulsets/show/index.js +0 -16
- package/lib/src/plugins/index.js +0 -3
- package/lib/src/plugins/model-plugin.js +0 -46
- package/lib/src/plugins/relation-plugin.js +0 -81
- package/lib/src/plugins/type.js +0 -1
- package/lib/src/providers/index.js +0 -1
- package/lib/src/providers/router-provider/index.js +0 -100
- package/lib/src/types/index.js +0 -1
- package/lib/src/types/resource.js +0 -12
- package/lib/src/utils/addId.js +0 -8
- package/lib/src/utils/download.js +0 -9
- package/lib/src/utils/error.js +0 -53
- package/lib/src/utils/form.js +0 -9
- package/lib/src/utils/k8s.js +0 -6
- package/lib/src/utils/labels.js +0 -15
- package/lib/src/utils/match-selector.js +0 -12
- package/lib/src/utils/openapi.js +0 -33
- package/lib/src/utils/schema.js +0 -117
- package/lib/src/utils/selector.js +0 -12
- package/lib/src/utils/string.js +0 -6
- package/lib/src/utils/time.js +0 -46
- package/lib/src/utils/unit.js +0 -69
- package/lib/src/utils/yaml.js +0 -44
- package/lib/vite.config.js +0 -60
package/dist/refine.umd.cjs
CHANGED
|
@@ -8981,46 +8981,34 @@ var __publicField = (obj, key, value) => {
|
|
|
8981
8981
|
}
|
|
8982
8982
|
class IngressModel extends ResourceModel {
|
|
8983
8983
|
constructor(_rawYaml, _globalStore) {
|
|
8984
|
+
var _a;
|
|
8984
8985
|
super(_rawYaml, _globalStore);
|
|
8985
|
-
__publicField(this, "flattenedRules"
|
|
8986
|
+
__publicField(this, "flattenedRules");
|
|
8986
8987
|
this._rawYaml = _rawYaml;
|
|
8987
8988
|
this._globalStore = _globalStore;
|
|
8988
|
-
|
|
8989
|
-
async init() {
|
|
8990
|
-
var _a, _b, _c, _d;
|
|
8991
|
-
const services = await this._globalStore.get("services", {
|
|
8992
|
-
resourceBasePath: "/api/v1",
|
|
8993
|
-
kind: "Service"
|
|
8994
|
-
});
|
|
8995
|
-
const protocal = !!this._rawYaml.spec.tls ? "https" : "http";
|
|
8996
|
-
const servicePort = (_c = (_b = (_a = services.items.find((s2) => {
|
|
8997
|
-
var _a2, _b2;
|
|
8998
|
-
return ((_a2 = s2.metadata) == null ? void 0 : _a2.name) === "contour-envoy" && ((_b2 = s2.spec) == null ? void 0 : _b2.type) === "NodePort";
|
|
8999
|
-
})) == null ? void 0 : _a.spec) == null ? void 0 : _b.ports) == null ? void 0 : _c.find((p) => p.name === protocal);
|
|
9000
|
-
this.flattenedRules = ((_d = this._rawYaml.spec.rules) == null ? void 0 : _d.reduce((res, rule2) => {
|
|
8989
|
+
this.flattenedRules = ((_a = this._rawYaml.spec.rules) == null ? void 0 : _a.reduce((res, rule2) => {
|
|
9001
8990
|
var _a2;
|
|
9002
8991
|
const paths = (_a2 = rule2.http) == null ? void 0 : _a2.paths.map((p) => {
|
|
9003
|
-
var _a3,
|
|
8992
|
+
var _a3, _b, _c, _d, _e, _f;
|
|
9004
8993
|
return {
|
|
9005
8994
|
resourceName: ((_a3 = p.backend.resource) == null ? void 0 : _a3.name) || "",
|
|
9006
|
-
serviceName: ((
|
|
9007
|
-
fullPath: this.getFullPath(rule2, p.path
|
|
8995
|
+
serviceName: ((_b = p.backend.service) == null ? void 0 : _b.name) || "",
|
|
8996
|
+
fullPath: this.getFullPath(rule2, p.path),
|
|
9008
8997
|
pathType: p.pathType,
|
|
9009
|
-
servicePort: ((
|
|
8998
|
+
servicePort: ((_d = (_c = p.backend.service) == null ? void 0 : _c.port) == null ? void 0 : _d.number) || ((_f = (_e = p.backend.service) == null ? void 0 : _e.port) == null ? void 0 : _f.name),
|
|
9010
8999
|
host: rule2.host
|
|
9011
9000
|
};
|
|
9012
9001
|
});
|
|
9013
9002
|
return [...res, ...paths || []];
|
|
9014
9003
|
}, [])) || [];
|
|
9015
9004
|
}
|
|
9016
|
-
getFullPath(rule2, path2 = ""
|
|
9005
|
+
getFullPath(rule2, path2 = "") {
|
|
9017
9006
|
if (!rule2.host) {
|
|
9018
9007
|
return path2 || "";
|
|
9019
9008
|
}
|
|
9020
9009
|
const hostValue = rule2.host || "";
|
|
9021
9010
|
const protocal = this._rawYaml.spec.tls ? "https://" : "http://";
|
|
9022
|
-
|
|
9023
|
-
return `${protocal}${hostValue}${portText}${path2}`;
|
|
9011
|
+
return `${protocal}${hostValue}${path2}`;
|
|
9024
9012
|
}
|
|
9025
9013
|
}
|
|
9026
9014
|
class NetworkPolicyModel extends ResourceModel {
|
|
@@ -9550,6 +9538,24 @@ var __publicField = (obj, key, value) => {
|
|
|
9550
9538
|
"type": "",
|
|
9551
9539
|
"data": {}
|
|
9552
9540
|
};
|
|
9541
|
+
const NODE_INIT_VALUE = {
|
|
9542
|
+
"apiVersion": "v1",
|
|
9543
|
+
"kind": "Node",
|
|
9544
|
+
"metadata": {
|
|
9545
|
+
"name": "example",
|
|
9546
|
+
"namespace": "default"
|
|
9547
|
+
},
|
|
9548
|
+
"spec": {}
|
|
9549
|
+
};
|
|
9550
|
+
const STORAGE_CLASS_INIT_VALUE = {
|
|
9551
|
+
"apiVersion": "storage.k8s.io/v1",
|
|
9552
|
+
"kind": "StorageClass",
|
|
9553
|
+
"metadata": {
|
|
9554
|
+
"name": "example",
|
|
9555
|
+
"namespace": "default"
|
|
9556
|
+
},
|
|
9557
|
+
"spec": {}
|
|
9558
|
+
};
|
|
9553
9559
|
var WorkloadState = /* @__PURE__ */ ((WorkloadState2) => {
|
|
9554
9560
|
WorkloadState2["Terminated"] = "terminated";
|
|
9555
9561
|
WorkloadState2["UPDATING"] = "updating";
|
|
@@ -10035,6 +10041,42 @@ var __publicField = (obj, key, value) => {
|
|
|
10035
10041
|
});
|
|
10036
10042
|
}
|
|
10037
10043
|
}
|
|
10044
|
+
var NodeRole = /* @__PURE__ */ ((NodeRole2) => {
|
|
10045
|
+
NodeRole2["ControlPlane"] = "Control Plane";
|
|
10046
|
+
NodeRole2["Worker"] = "Worker";
|
|
10047
|
+
return NodeRole2;
|
|
10048
|
+
})(NodeRole || {});
|
|
10049
|
+
class NodeModel extends WorkloadBaseModel {
|
|
10050
|
+
constructor(_rawYaml, _globalStore) {
|
|
10051
|
+
super(_rawYaml, _globalStore);
|
|
10052
|
+
this._rawYaml = _rawYaml;
|
|
10053
|
+
this._globalStore = _globalStore;
|
|
10054
|
+
}
|
|
10055
|
+
get role() {
|
|
10056
|
+
return "node-role.kubernetes.io/control-plane" in (this.metadata.labels || {}) ? "Control Plane" : "Worker";
|
|
10057
|
+
}
|
|
10058
|
+
}
|
|
10059
|
+
class StorageClassModel extends ResourceModel {
|
|
10060
|
+
constructor(_rawYaml, _globalStore) {
|
|
10061
|
+
super(_rawYaml, _globalStore);
|
|
10062
|
+
this._rawYaml = _rawYaml;
|
|
10063
|
+
this._globalStore = _globalStore;
|
|
10064
|
+
}
|
|
10065
|
+
}
|
|
10066
|
+
class PersistentVolumeModel extends ResourceModel {
|
|
10067
|
+
constructor(_rawYaml, _globalStore) {
|
|
10068
|
+
super(_rawYaml, _globalStore);
|
|
10069
|
+
this._rawYaml = _rawYaml;
|
|
10070
|
+
this._globalStore = _globalStore;
|
|
10071
|
+
}
|
|
10072
|
+
}
|
|
10073
|
+
class PersistentVolumeClaimModel extends ResourceModel {
|
|
10074
|
+
constructor(_rawYaml, _globalStore) {
|
|
10075
|
+
super(_rawYaml, _globalStore);
|
|
10076
|
+
this._rawYaml = _rawYaml;
|
|
10077
|
+
this._globalStore = _globalStore;
|
|
10078
|
+
}
|
|
10079
|
+
}
|
|
10038
10080
|
const index_1lzkrja = "";
|
|
10039
10081
|
const ServiceInClusterAccessComponent = ({
|
|
10040
10082
|
service
|
|
@@ -10431,6 +10473,8 @@ var __publicField = (obj, key, value) => {
|
|
|
10431
10473
|
RESOURCE_GROUP2["CLUSTER"] = "CLUSTER";
|
|
10432
10474
|
RESOURCE_GROUP2["SERVICE"] = "SERVICE";
|
|
10433
10475
|
RESOURCE_GROUP2["SERVICE_AND_NETWORK"] = "SERVICE_AND_NETWORK";
|
|
10476
|
+
RESOURCE_GROUP2["CONFIG"] = "CONFIG";
|
|
10477
|
+
RESOURCE_GROUP2["NODE_MANAGEMENT"] = "NODE_MANAGEMENT";
|
|
10434
10478
|
return RESOURCE_GROUP2;
|
|
10435
10479
|
})(RESOURCE_GROUP || {});
|
|
10436
10480
|
var FormType = /* @__PURE__ */ ((FormType2) => {
|
|
@@ -22239,6 +22283,9 @@ var __publicField = (obj, key, value) => {
|
|
|
22239
22283
|
children: value2
|
|
22240
22284
|
});
|
|
22241
22285
|
}
|
|
22286
|
+
if (c2 == null ? void 0 : c2.render) {
|
|
22287
|
+
ele = c2.render(value2, onChange, formValue, onBlur, action, control);
|
|
22288
|
+
}
|
|
22242
22289
|
if (c2.helperText) {
|
|
22243
22290
|
ele = /* @__PURE__ */ jsxRuntimeExports.jsxs(eagle.Space, {
|
|
22244
22291
|
size: 4,
|
|
@@ -22250,9 +22297,6 @@ var __publicField = (obj, key, value) => {
|
|
|
22250
22297
|
})]
|
|
22251
22298
|
});
|
|
22252
22299
|
}
|
|
22253
|
-
if (c2 == null ? void 0 : c2.render) {
|
|
22254
|
-
ele = c2.render(value2, onChange, formValue, onBlur, action);
|
|
22255
|
-
}
|
|
22256
22300
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Form.Item, {
|
|
22257
22301
|
label: c2.label,
|
|
22258
22302
|
colon: false,
|
|
@@ -24109,6 +24153,32 @@ var __publicField = (obj, key, value) => {
|
|
|
24109
24153
|
});
|
|
24110
24154
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: tags });
|
|
24111
24155
|
};
|
|
24156
|
+
function ResourceSelect(props) {
|
|
24157
|
+
const { resource, resourceBasePath, kind, selectProps, value: value2, onChange } = props;
|
|
24158
|
+
const { data: data2, isLoading, isError } = core.useList({
|
|
24159
|
+
resource,
|
|
24160
|
+
meta: {
|
|
24161
|
+
resourceBasePath,
|
|
24162
|
+
kind
|
|
24163
|
+
},
|
|
24164
|
+
pagination: {
|
|
24165
|
+
mode: "off"
|
|
24166
|
+
}
|
|
24167
|
+
});
|
|
24168
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
24169
|
+
eagle.Select,
|
|
24170
|
+
{
|
|
24171
|
+
input: {
|
|
24172
|
+
value: value2,
|
|
24173
|
+
onChange
|
|
24174
|
+
},
|
|
24175
|
+
loading: isLoading,
|
|
24176
|
+
error: isError,
|
|
24177
|
+
...selectProps,
|
|
24178
|
+
children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.AntdOption, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name))
|
|
24179
|
+
}
|
|
24180
|
+
);
|
|
24181
|
+
}
|
|
24112
24182
|
const IngressRulesComponent = ({ ingress }) => {
|
|
24113
24183
|
const kit = eagle.useUIKit();
|
|
24114
24184
|
const result = ingress.flattenedRules.map((r2) => {
|
|
@@ -24668,6 +24738,76 @@ var __publicField = (obj, key, value) => {
|
|
|
24668
24738
|
}
|
|
24669
24739
|
};
|
|
24670
24740
|
};
|
|
24741
|
+
const ProvisionerColumnRenderer = (i18n2) => {
|
|
24742
|
+
return {
|
|
24743
|
+
key: "provisioner",
|
|
24744
|
+
display: true,
|
|
24745
|
+
dataIndex: ["provisioner"],
|
|
24746
|
+
title: i18n2.t("dovetail.provisioner"),
|
|
24747
|
+
width: 120,
|
|
24748
|
+
sortable: true
|
|
24749
|
+
};
|
|
24750
|
+
};
|
|
24751
|
+
const FsTypeColumnRenderer = (i18n2) => {
|
|
24752
|
+
return {
|
|
24753
|
+
key: "fstype",
|
|
24754
|
+
display: true,
|
|
24755
|
+
dataIndex: ["parameters", "csi.storage.k8s.io/fstype"],
|
|
24756
|
+
title: i18n2.t("dovetail.file_system"),
|
|
24757
|
+
width: 120,
|
|
24758
|
+
sortable: true
|
|
24759
|
+
};
|
|
24760
|
+
};
|
|
24761
|
+
const PVCapacityColumnRenderer = (i18n2) => {
|
|
24762
|
+
return {
|
|
24763
|
+
key: "capacity",
|
|
24764
|
+
display: true,
|
|
24765
|
+
dataIndex: ["spec", "capacity", "storage"],
|
|
24766
|
+
title: i18n2.t("dovetail.capacity"),
|
|
24767
|
+
width: 120,
|
|
24768
|
+
sortable: true
|
|
24769
|
+
};
|
|
24770
|
+
};
|
|
24771
|
+
const PVStorageClassColumnRenderer = (i18n2) => {
|
|
24772
|
+
return {
|
|
24773
|
+
key: "storageClass",
|
|
24774
|
+
display: true,
|
|
24775
|
+
dataIndex: ["spec", "storageClassName"],
|
|
24776
|
+
title: i18n2.t("dovetail.storage_class"),
|
|
24777
|
+
width: 120,
|
|
24778
|
+
sortable: true
|
|
24779
|
+
};
|
|
24780
|
+
};
|
|
24781
|
+
const PVPhaseColumnRenderer = (i18n2) => {
|
|
24782
|
+
return {
|
|
24783
|
+
key: "phase",
|
|
24784
|
+
display: true,
|
|
24785
|
+
dataIndex: ["status", "phase"],
|
|
24786
|
+
title: i18n2.t("dovetail.phase"),
|
|
24787
|
+
width: 120,
|
|
24788
|
+
sortable: true
|
|
24789
|
+
};
|
|
24790
|
+
};
|
|
24791
|
+
const PVModeColumnRenderer = (i18n2) => {
|
|
24792
|
+
return {
|
|
24793
|
+
key: "mode",
|
|
24794
|
+
display: true,
|
|
24795
|
+
dataIndex: ["spec", "volumeMode"],
|
|
24796
|
+
title: i18n2.t("dovetail.volume_mode"),
|
|
24797
|
+
width: 120,
|
|
24798
|
+
sortable: true
|
|
24799
|
+
};
|
|
24800
|
+
};
|
|
24801
|
+
const PVAccessModeColumnRenderer = (i18n2) => {
|
|
24802
|
+
return {
|
|
24803
|
+
key: "accessMode",
|
|
24804
|
+
display: true,
|
|
24805
|
+
dataIndex: ["spec", "accessModes"],
|
|
24806
|
+
title: i18n2.t("dovetail.access_mode"),
|
|
24807
|
+
width: 120,
|
|
24808
|
+
sortable: true
|
|
24809
|
+
};
|
|
24810
|
+
};
|
|
24671
24811
|
const styles = "";
|
|
24672
24812
|
const Dovetail = (props) => {
|
|
24673
24813
|
const {
|
|
@@ -24755,7 +24895,11 @@ var __publicField = (obj, key, value) => {
|
|
|
24755
24895
|
Event: EventModel,
|
|
24756
24896
|
Ingress: IngressModel,
|
|
24757
24897
|
NetworkPolicy: NetworkPolicyModel,
|
|
24758
|
-
Service: ServiceModel
|
|
24898
|
+
Service: ServiceModel,
|
|
24899
|
+
Node: NodeModel,
|
|
24900
|
+
StorageClass: StorageClassModel,
|
|
24901
|
+
PersistentVolume: PersistentVolumeModel,
|
|
24902
|
+
PersistentVolumeClaim: PersistentVolumeClaimModel
|
|
24759
24903
|
};
|
|
24760
24904
|
class ModelPlugin {
|
|
24761
24905
|
constructor() {
|
|
@@ -24963,6 +25107,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24963
25107
|
exports2.EventsTableTabField = EventsTableTabField;
|
|
24964
25108
|
exports2.FormModal = FormModal;
|
|
24965
25109
|
exports2.FormType = FormType;
|
|
25110
|
+
exports2.FsTypeColumnRenderer = FsTypeColumnRenderer;
|
|
24966
25111
|
exports2.GlobalStoreContext = GlobalStoreContext;
|
|
24967
25112
|
exports2.INGRESS_INIT_VALUE = INGRESS_INIT_VALUE;
|
|
24968
25113
|
exports2.ImageField = ImageField;
|
|
@@ -24978,6 +25123,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24978
25123
|
exports2.JobModel = JobModel;
|
|
24979
25124
|
exports2.JobsField = JobsField;
|
|
24980
25125
|
exports2.JobsGroup = JobsGroup;
|
|
25126
|
+
exports2.K8sDropdown = K8sDropdown;
|
|
24981
25127
|
exports2.KeyValue = KeyValue;
|
|
24982
25128
|
exports2.KeyValueAnnotation = KeyValueAnnotation;
|
|
24983
25129
|
exports2.KeyValueListWidget = KeyValueListWidget;
|
|
@@ -24989,6 +25135,7 @@ var __publicField = (obj, key, value) => {
|
|
|
24989
25135
|
exports2.MetadataForm = MetadataForm;
|
|
24990
25136
|
exports2.ModalStyle = ModalStyle;
|
|
24991
25137
|
exports2.NETWORK_POLICY_INIT_VALUE = NETWORK_POLICY_INIT_VALUE;
|
|
25138
|
+
exports2.NODE_INIT_VALUE = NODE_INIT_VALUE;
|
|
24992
25139
|
exports2.NS_STORE_KEY = NS_STORE_KEY;
|
|
24993
25140
|
exports2.NameColumnRenderer = NameColumnRenderer;
|
|
24994
25141
|
exports2.NameInputWidget = NameInputWidget;
|
|
@@ -25000,9 +25147,18 @@ var __publicField = (obj, key, value) => {
|
|
|
25000
25147
|
exports2.NetworkPolicyIngressRulesGroup = NetworkPolicyIngressRulesGroup;
|
|
25001
25148
|
exports2.NetworkPolicyModel = NetworkPolicyModel;
|
|
25002
25149
|
exports2.NetworkPolicyRulesViewer = NetworkPolicyRulesViewer;
|
|
25150
|
+
exports2.NodeModel = NodeModel;
|
|
25003
25151
|
exports2.NodeNameColumnRenderer = NodeNameColumnRenderer;
|
|
25152
|
+
exports2.NodeRole = NodeRole;
|
|
25004
25153
|
exports2.POD_INIT_VALUE = POD_INIT_VALUE;
|
|
25154
|
+
exports2.PVAccessModeColumnRenderer = PVAccessModeColumnRenderer;
|
|
25155
|
+
exports2.PVCapacityColumnRenderer = PVCapacityColumnRenderer;
|
|
25156
|
+
exports2.PVModeColumnRenderer = PVModeColumnRenderer;
|
|
25157
|
+
exports2.PVPhaseColumnRenderer = PVPhaseColumnRenderer;
|
|
25158
|
+
exports2.PVStorageClassColumnRenderer = PVStorageClassColumnRenderer;
|
|
25005
25159
|
exports2.PageShow = PageShow;
|
|
25160
|
+
exports2.PersistentVolumeClaimModel = PersistentVolumeClaimModel;
|
|
25161
|
+
exports2.PersistentVolumeModel = PersistentVolumeModel;
|
|
25006
25162
|
exports2.PlainTextNameColumnRenderer = PlainTextNameColumnRenderer;
|
|
25007
25163
|
exports2.PodContainersGroup = PodContainersGroup;
|
|
25008
25164
|
exports2.PodContainersNumColumnRenderer = PodContainersNumColumnRenderer;
|
|
@@ -25020,6 +25176,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25020
25176
|
exports2.PortsGroup = PortsGroup;
|
|
25021
25177
|
exports2.PortsTableField = PortsTableField;
|
|
25022
25178
|
exports2.ProviderPlugins = ProviderPlugins;
|
|
25179
|
+
exports2.ProvisionerColumnRenderer = ProvisionerColumnRenderer;
|
|
25023
25180
|
exports2.RESOURCE_GROUP = RESOURCE_GROUP;
|
|
25024
25181
|
exports2.ReferenceLink = ReferenceLink;
|
|
25025
25182
|
exports2.RefineFormContent = RefineFormContent;
|
|
@@ -25032,6 +25189,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25032
25189
|
exports2.ResourceLink = ResourceLink;
|
|
25033
25190
|
exports2.ResourceList = ResourceList;
|
|
25034
25191
|
exports2.ResourceModel = ResourceModel;
|
|
25192
|
+
exports2.ResourceSelect = ResourceSelect;
|
|
25035
25193
|
exports2.ResourceShow = ResourceShow;
|
|
25036
25194
|
exports2.ResourceUsageBar = ResourceUsageBar;
|
|
25037
25195
|
exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
|
|
@@ -25048,6 +25206,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25048
25206
|
exports2.SERVICE_LOAD_BALANCER_INIT_VALUE = SERVICE_LOAD_BALANCER_INIT_VALUE;
|
|
25049
25207
|
exports2.SERVICE_NODE_PORT_INIT_VALUE = SERVICE_NODE_PORT_INIT_VALUE;
|
|
25050
25208
|
exports2.STATEFULSET_INIT_VALUE = STATEFULSET_INIT_VALUE;
|
|
25209
|
+
exports2.STORAGE_CLASS_INIT_VALUE = STORAGE_CLASS_INIT_VALUE;
|
|
25051
25210
|
exports2.SchemaStrategy = SchemaStrategy;
|
|
25052
25211
|
exports2.SecretDataField = SecretDataField;
|
|
25053
25212
|
exports2.SecretDataGroup = SecretDataGroup;
|
|
@@ -25074,11 +25233,13 @@ var __publicField = (obj, key, value) => {
|
|
|
25074
25233
|
exports2.StateTag = StateTag;
|
|
25075
25234
|
exports2.StateTagStyle = StateTagStyle;
|
|
25076
25235
|
exports2.StatefulSetModel = StatefulSetModel;
|
|
25236
|
+
exports2.StorageClassModel = StorageClassModel;
|
|
25077
25237
|
exports2.TIMESTAMP_LABEL = TIMESTAMP_LABEL;
|
|
25078
25238
|
exports2.Tabs = Tabs;
|
|
25079
25239
|
exports2.Tags = Tags;
|
|
25080
25240
|
exports2.TextTags = TextTags;
|
|
25081
25241
|
exports2.Time = Time;
|
|
25242
|
+
exports2.ValueDisplay = ValueDisplay;
|
|
25082
25243
|
exports2.WorkloadBaseModel = WorkloadBaseModel;
|
|
25083
25244
|
exports2.WorkloadDropdown = WorkloadDropdown;
|
|
25084
25245
|
exports2.WorkloadImageColumnRenderer = WorkloadImageColumnRenderer;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
2
3
|
export type RefineFormValidator = (value: unknown, formValue: unknown) => {
|
|
3
4
|
isValid: boolean;
|
|
4
5
|
errorMsg: string;
|
|
@@ -8,9 +9,9 @@ export type RefineFormField = {
|
|
|
8
9
|
key: string;
|
|
9
10
|
label: string;
|
|
10
11
|
placeholder?: string;
|
|
11
|
-
helperText?:
|
|
12
|
+
helperText?: React.ReactNode;
|
|
12
13
|
type?: 'number';
|
|
13
14
|
validators?: RefineFormValidator[];
|
|
14
15
|
disabledWhenEdit?: boolean;
|
|
15
|
-
render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create') => React.ReactElement;
|
|
16
|
+
render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create', control: Control) => React.ReactElement;
|
|
16
17
|
};
|
|
@@ -5,5 +5,5 @@ interface K8sDropdownProps {
|
|
|
5
5
|
record: ResourceModel;
|
|
6
6
|
size?: DropdownSize;
|
|
7
7
|
}
|
|
8
|
-
declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
|
|
8
|
+
export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
|
|
9
9
|
export default K8sDropdown;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ModalInfo {
|
|
3
|
+
resource: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
}
|
|
6
|
+
type ModalContextValue = ModalInfo & {
|
|
7
|
+
open: (info: ModalInfo) => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const ModalContext: React.Context<ModalContextValue>;
|
|
11
|
+
declare function ModalContextProvider(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
|
|
12
|
+
export default ModalContextProvider;
|
|
@@ -2,6 +2,7 @@ import type { NetworkPolicyIngressRule, NetworkPolicyEgressRule } from 'kubernet
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type Props = {
|
|
4
4
|
ingressOrEgress: NetworkPolicyIngressRule[] | NetworkPolicyEgressRule[];
|
|
5
|
+
kind?: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const
|
|
7
|
+
export declare const NetworkPolicyRulesViewer: React.FC<Props>;
|
|
7
8
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PodModel } from '../../models';
|
|
3
|
+
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
+
type Props<Model extends PodModel> = {
|
|
5
|
+
record: Model;
|
|
6
|
+
size?: DropdownSize;
|
|
7
|
+
};
|
|
8
|
+
export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { KitSelectProps } from '@cloudtower/eagle';
|
|
3
|
+
type ResourceSelectProps = {
|
|
4
|
+
resource: string;
|
|
5
|
+
resourceBasePath: string;
|
|
6
|
+
kind: string;
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (...params: unknown[]) => void;
|
|
9
|
+
selectProps?: KitSelectProps;
|
|
10
|
+
};
|
|
11
|
+
export declare function ResourceSelect(props: ResourceSelectProps): JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { FormAction } from '@refinedev/core';
|
|
2
3
|
import useEagleForm from 'src/hooks/useEagleForm';
|
|
3
4
|
export declare enum SchemaStrategy {
|
|
4
5
|
Required = "Required",
|
|
@@ -7,7 +8,9 @@ export declare enum SchemaStrategy {
|
|
|
7
8
|
}
|
|
8
9
|
export interface YamlFormProps {
|
|
9
10
|
id?: string;
|
|
11
|
+
action?: FormAction;
|
|
10
12
|
initialValues?: Record<string, unknown>;
|
|
13
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
11
14
|
schemaStrategy?: SchemaStrategy;
|
|
12
15
|
isShowLayout?: boolean;
|
|
13
16
|
useFormProps?: Parameters<typeof useEagleForm>[0];
|
|
@@ -15,6 +18,7 @@ export interface YamlFormProps {
|
|
|
15
18
|
disabled?: boolean;
|
|
16
19
|
onClick: () => void;
|
|
17
20
|
}) => void;
|
|
21
|
+
onErrorsChange?: (errors: string[]) => void;
|
|
18
22
|
onFinish?: () => void;
|
|
19
23
|
}
|
|
20
24
|
declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
@@ -467,3 +467,21 @@ export declare const SECRET_CUSTOM_INIT_VALUE: {
|
|
|
467
467
|
type: string;
|
|
468
468
|
data: {};
|
|
469
469
|
};
|
|
470
|
+
export declare const NODE_INIT_VALUE: {
|
|
471
|
+
apiVersion: string;
|
|
472
|
+
kind: string;
|
|
473
|
+
metadata: {
|
|
474
|
+
name: string;
|
|
475
|
+
namespace: string;
|
|
476
|
+
};
|
|
477
|
+
spec: {};
|
|
478
|
+
};
|
|
479
|
+
export declare const STORAGE_CLASS_INIT_VALUE: {
|
|
480
|
+
apiVersion: string;
|
|
481
|
+
kind: string;
|
|
482
|
+
metadata: {
|
|
483
|
+
name: string;
|
|
484
|
+
namespace: string;
|
|
485
|
+
};
|
|
486
|
+
spec: {};
|
|
487
|
+
};
|
|
@@ -20,6 +20,7 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
20
20
|
isSkipSchema?: boolean;
|
|
21
21
|
};
|
|
22
22
|
initialValuesForCreate?: Record<string, unknown>;
|
|
23
|
+
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
23
24
|
};
|
|
24
25
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
25
26
|
form: FormInstance;
|
|
@@ -43,5 +44,5 @@ declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured &
|
|
|
43
44
|
[prop: string]: unknown;
|
|
44
45
|
} = {
|
|
45
46
|
[prop: string]: unknown;
|
|
46
|
-
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
|
+
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
47
48
|
export default useEagleForm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { i18n as I18nType } from 'i18next';
|
|
3
3
|
import { Column } from '../../components/Table';
|
|
4
|
-
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel } from '../../models';
|
|
4
|
+
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel } from '../../models';
|
|
5
5
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
6
6
|
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
|
|
7
7
|
export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
@@ -33,3 +33,10 @@ export declare const IngressTlsColumnRenderer: <Model extends IngressModel>(i18n
|
|
|
33
33
|
export declare const PodContainersNumColumnRenderer: <Model extends PodModel>(i18n: I18nType) => Column<Model>;
|
|
34
34
|
export declare const DataKeysColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
|
|
35
35
|
export declare const PortMappingColumnRenderer: <Model extends ServiceModel>(i18n: I18nType, clusterVip: string) => Column<Model>;
|
|
36
|
+
export declare const ProvisionerColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
37
|
+
export declare const FsTypeColumnRenderer: <Model extends StorageClassModel>(i18n: I18nType) => Column<Model>;
|
|
38
|
+
export declare const PVCapacityColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
39
|
+
export declare const PVStorageClassColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
40
|
+
export declare const PVPhaseColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
41
|
+
export declare const PVModeColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
42
|
+
export declare const PVAccessModeColumnRenderer: <Model extends PersistentVolumeModel>(i18n: I18nType) => Column<Model>;
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CronJob } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class CronJobModel extends WorkloadModel<CronJob> {
|
|
5
|
+
data: WithId<CronJob>;
|
|
6
|
+
constructor(data: WithId<CronJob>);
|
|
7
|
+
suspend(): WithId<CronJob>;
|
|
8
|
+
resume(): WithId<CronJob>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Job } from 'kubernetes-types/batch/v1';
|
|
2
|
+
import { WithId } from '../types';
|
|
3
|
+
import { WorkloadModel } from './workload-model';
|
|
4
|
+
export declare class JobModel extends WorkloadModel<Job> {
|
|
5
|
+
rawYaml: WithId<Job>;
|
|
6
|
+
constructor(rawYaml: WithId<Job>);
|
|
7
|
+
get duration(): number;
|
|
8
|
+
get durationDisplay(): string | undefined;
|
|
9
|
+
get completionsDisplay(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Pod } from 'kubernetes-types/core/v1';
|
|
2
|
+
import { ResourceQuantity } from 'src/types/metric';
|
|
3
|
+
import { WithId } from '../types';
|
|
4
|
+
import { WorkloadModel } from './workload-model';
|
|
5
|
+
export declare class PodModel extends WorkloadModel<Pod> {
|
|
6
|
+
rawYaml: WithId<Pod>;
|
|
7
|
+
request: ResourceQuantity;
|
|
8
|
+
limit: ResourceQuantity;
|
|
9
|
+
constructor(rawYaml: WithId<Pod>);
|
|
10
|
+
get imageNames(): string[];
|
|
11
|
+
get restartCount(): number;
|
|
12
|
+
get readyDisplay(): string;
|
|
13
|
+
get readyContainerCount(): number | undefined;
|
|
14
|
+
get containerCount(): number | undefined;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Resource } from '../types';
|
|
2
|
+
export declare class ResourceModel implements Resource {
|
|
3
|
+
rawYaml: Resource;
|
|
4
|
+
id: Resource['id'];
|
|
5
|
+
apiVersion: Resource['apiVersion'];
|
|
6
|
+
kind: Resource['kind'];
|
|
7
|
+
metadata: Resource['metadata'];
|
|
8
|
+
constructor(rawYaml: Resource);
|
|
9
|
+
get name(): string | undefined;
|
|
10
|
+
get namespace(): string | undefined;
|
|
11
|
+
get labels(): {
|
|
12
|
+
[name: string]: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
get annotations(): {
|
|
15
|
+
[name: string]: string;
|
|
16
|
+
} | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DaemonSet, Deployment, StatefulSet } from 'kubernetes-types/apps/v1';
|
|
2
|
+
import type { CronJob, Job } from 'kubernetes-types/batch/v1';
|
|
3
|
+
import { Pod } from 'kubernetes-types/core/v1';
|
|
4
|
+
import { WithId } from '../types';
|
|
5
|
+
import { ResourceModel } from './resource-model';
|
|
6
|
+
type WorkloadTypes = Deployment | StatefulSet | Job | DaemonSet | CronJob | Pod;
|
|
7
|
+
export declare class WorkloadModel<T extends WorkloadTypes = WorkloadTypes> extends ResourceModel {
|
|
8
|
+
rawYaml: WithId<T>;
|
|
9
|
+
constructor(rawYaml: WithId<T>);
|
|
10
|
+
get status(): T['status'];
|
|
11
|
+
get spec(): T['spec'];
|
|
12
|
+
get imageNames(): string[];
|
|
13
|
+
get restartCount(): number;
|
|
14
|
+
redeploy(): WithId<T>;
|
|
15
|
+
scale(value: number): WithId<T>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -13,3 +13,7 @@ export * from './deployment-model';
|
|
|
13
13
|
export * from './daemonset-model';
|
|
14
14
|
export * from './statefulset-model';
|
|
15
15
|
export * from './service-model';
|
|
16
|
+
export * from './node-model';
|
|
17
|
+
export * from './storage-class';
|
|
18
|
+
export * from './persistent-volume';
|
|
19
|
+
export * from './persistent-volume-claim';
|
|
@@ -15,7 +15,6 @@ export declare class IngressModel extends ResourceModel<IngressTypes> {
|
|
|
15
15
|
_globalStore: GlobalStore;
|
|
16
16
|
flattenedRules: RuleItem[];
|
|
17
17
|
constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
|
|
18
|
-
init(): Promise<void>;
|
|
19
18
|
private getFullPath;
|
|
20
19
|
}
|
|
21
20
|
export {};
|