@dao-style/biz 0.6.0 → 0.7.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/cjs/components/gpu/style/assign-gpu-devices-list.js +1 -0
- package/dist/cjs/components/gpu/style/gpu-form.js +1 -0
- package/dist/components/form-block/FormBlock.d.ts +27 -1
- package/dist/components/form-block/props.d.ts +4 -0
- package/dist/components/form-block/props.js +4 -0
- package/dist/components/form-block/props.mjs +4 -0
- package/dist/components/form-block/src/FormBlock.vue.d.ts +11 -0
- package/dist/components/form-block/src/FormBlock.vue.js +4 -4
- package/dist/components/form-block/src/FormBlock.vue.mjs +4 -4
- package/dist/components/form-block/src/FormBlock.vue2.js +12 -1
- package/dist/components/form-block/src/FormBlock.vue2.mjs +12 -1
- package/dist/components/gpu/props.d.ts +121 -3
- package/dist/components/gpu/props.js +82 -9
- package/dist/components/gpu/props.mjs +82 -9
- package/dist/components/gpu/src/GpuForm.vue.d.ts +283 -50
- package/dist/components/gpu/src/GpuForm.vue.js +25 -24
- package/dist/components/gpu/src/GpuForm.vue.mjs +26 -25
- package/dist/components/gpu/src/GpuForm.vue2.js +115 -218
- package/dist/components/gpu/src/GpuForm.vue2.mjs +116 -219
- package/dist/components/gpu/src/components/AssignGpuDevicesList.vue.d.ts +77 -0
- package/dist/components/gpu/src/components/AssignGpuDevicesList.vue.js +40 -0
- package/dist/components/gpu/src/components/AssignGpuDevicesList.vue.mjs +41 -0
- package/dist/components/gpu/src/components/AssignGpuDevicesList.vue2.js +191 -0
- package/dist/components/gpu/src/components/AssignGpuDevicesList.vue2.mjs +192 -0
- package/dist/components/gpu/src/components/GpuAdvancedForm.vue.d.ts +180 -0
- package/dist/components/gpu/src/{GpuAdvancedForm.vue.js → components/GpuAdvancedForm.vue.js} +92 -37
- package/dist/components/gpu/src/{GpuAdvancedForm.vue.mjs → components/GpuAdvancedForm.vue.mjs} +93 -38
- package/dist/components/gpu/src/components/GpuAdvancedForm.vue2.js +169 -0
- package/dist/components/gpu/src/components/GpuAdvancedForm.vue2.mjs +153 -0
- package/dist/components/gpu/src/{GpuFormDynamicItem.vue.d.ts → components/GpuFormDynamicItem.vue.d.ts} +4 -4
- package/dist/components/gpu/src/{GpuFormDynamicItem.vue.js → components/GpuFormDynamicItem.vue.js} +1 -1
- package/dist/components/gpu/src/{GpuFormDynamicItem.vue.mjs → components/GpuFormDynamicItem.vue.mjs} +1 -1
- package/dist/components/gpu/src/{GpuFormDynamicItem.vue2.js → components/GpuFormDynamicItem.vue2.js} +1 -1
- package/dist/components/gpu/src/{GpuFormDynamicItem.vue2.mjs → components/GpuFormDynamicItem.vue2.mjs} +1 -1
- package/dist/components/gpu/src/components/GpuFormItem.vue.d.ts +310 -0
- package/dist/components/gpu/src/{GpuFormItem.vue.js → components/GpuFormItem.vue.js} +22 -26
- package/dist/components/gpu/src/{GpuFormItem.vue.mjs → components/GpuFormItem.vue.mjs} +23 -27
- package/dist/components/gpu/src/components/GpuFormItem.vue2.js +61 -0
- package/dist/components/gpu/src/components/GpuFormItem.vue2.mjs +45 -0
- package/dist/components/gpu/src/{GpuResources.vue.d.ts → components/GpuResources.vue.d.ts} +38 -18
- package/dist/components/gpu/src/components/GpuResources.vue.js +153 -0
- package/dist/components/gpu/src/components/GpuResources.vue.mjs +154 -0
- package/dist/components/gpu/src/components/GpuResources.vue2.js +278 -0
- package/dist/components/gpu/src/components/GpuResources.vue2.mjs +262 -0
- package/dist/components/gpu/src/gpuForm.constants.d.ts +3 -0
- package/dist/components/gpu/src/gpuForm.constants.js +10 -0
- package/dist/components/gpu/src/gpuForm.constants.mjs +10 -0
- package/dist/components/gpu/src/gpuForm.internal-types.d.ts +49 -0
- package/dist/components/gpu/src/gpuForm.mapper.d.ts +16 -0
- package/dist/components/gpu/src/gpuForm.mapper.js +199 -0
- package/dist/components/gpu/src/gpuForm.mapper.mjs +199 -0
- package/dist/components/gpu/src/gpuFormItem.mapper.d.ts +38 -0
- package/dist/components/gpu/src/gpuFormItem.mapper.js +153 -0
- package/dist/components/gpu/src/gpuFormItem.mapper.mjs +153 -0
- package/dist/components/gpu/src/useGPUOptions.d.ts +2 -2
- package/dist/components/gpu/src/useGPUOptions.js +15 -20
- package/dist/components/gpu/src/useGPUOptions.mjs +16 -21
- package/dist/components/gpu/src/useGpuFormItemState.d.ts +42 -0
- package/dist/components/gpu/src/useGpuFormItemState.js +178 -0
- package/dist/components/gpu/src/useGpuFormItemState.mjs +178 -0
- package/dist/components/gpu/src/useGpuFormSideState.d.ts +52 -0
- package/dist/components/gpu/src/useGpuFormSideState.js +71 -0
- package/dist/components/gpu/src/useGpuFormSideState.mjs +71 -0
- package/dist/components/gpu/src/useGpuFormState.d.ts +560 -0
- package/dist/components/gpu/src/useGpuFormState.js +52 -0
- package/dist/components/gpu/src/useGpuFormState.mjs +52 -0
- package/dist/components/gpu/src/validations/nvidiaVgpuMemoryDecimal.d.ts +5 -1
- package/dist/components/gpu/style/assign-gpu-devices-list.d.ts +1 -0
- package/dist/components/gpu/style/assign-gpu-devices-list.scss.js +3 -0
- package/dist/components/gpu/style/assign-gpu-devices-list.scss.mjs +4 -0
- package/dist/components/gpu/style/gpu-form.d.ts +1 -0
- package/dist/components/gpu/types.d.ts +6 -0
- package/dist/components/gpu/types.js +2 -0
- package/dist/components/gpu/types.mjs +2 -0
- package/dist/components/gpu/utils.d.ts +4 -0
- package/dist/components/gpu/utils.js +14 -0
- package/dist/components/gpu/utils.mjs +14 -0
- package/dist/components/instance-cluster/src/InstanceCluster.vue.d.ts +1 -1
- package/dist/components/instance-namespace/src/InstanceNamespace.vue.d.ts +1 -1
- package/dist/components/instance-storage-class/src/InstanceStorageClass.vue.d.ts +1 -1
- package/dist/components/network-config/src/NetworkConfig.vue.d.ts +1 -1
- package/dist/components/network-config/src/NetworkConfig.vue.js +13 -6
- package/dist/components/network-config/src/NetworkConfig.vue.mjs +14 -7
- package/dist/dialogs/create-network-config-dialog/src/CreateNetworkConfigDialog.vue.d.ts +1 -1
- package/dist/es/components/gpu/style/assign-gpu-devices-list.mjs +1 -0
- package/dist/es/components/gpu/style/gpu-form.mjs +1 -0
- package/dist/forms/import-parameter-template/props.d.ts +8 -8
- package/dist/forms/import-parameter-template/src/ImportParameterTemplate.vue.d.ts +24 -24
- package/dist/group-mapping.json +1 -1
- package/dist/index.js +34 -23
- package/dist/index.mjs +15 -4
- package/dist/locales/en-US/components/Gpu.json.js +36 -9
- package/dist/locales/en-US/components/Gpu.json.mjs +37 -10
- package/dist/locales/en-US/index.js +2 -0
- package/dist/locales/en-US/index.mjs +2 -0
- package/dist/locales/en-US/uses/UseCancelFormDialog.json.js +11 -0
- package/dist/locales/en-US/uses/UseCancelFormDialog.json.mjs +11 -0
- package/dist/locales/ja/components/Gpu.json.js +36 -9
- package/dist/locales/ja/components/Gpu.json.mjs +37 -10
- package/dist/locales/ja/components/InstancePassword.json.js +1 -1
- package/dist/locales/ja/components/InstancePassword.json.mjs +1 -1
- package/dist/locales/ja/components/MatchExpressionsEditor.json.js +1 -1
- package/dist/locales/ja/components/MatchExpressionsEditor.json.mjs +1 -1
- package/dist/locales/ja/components/NetworkConfig.json.js +1 -1
- package/dist/locales/ja/components/NetworkConfig.json.mjs +1 -1
- package/dist/locales/ja/index.js +2 -0
- package/dist/locales/ja/index.mjs +2 -0
- package/dist/locales/ja/uses/UseCancelFormDialog.json.js +11 -0
- package/dist/locales/ja/uses/UseCancelFormDialog.json.mjs +11 -0
- package/dist/locales/ja/workloads/DnsConfig.json.js +1 -1
- package/dist/locales/ja/workloads/DnsConfig.json.mjs +1 -1
- package/dist/locales/ja/workloads/workload-advanced/NetworkConfig.json.js +1 -1
- package/dist/locales/ja/workloads/workload-advanced/NetworkConfig.json.mjs +1 -1
- package/dist/locales/zh-CN/components/Gpu.json.js +36 -9
- package/dist/locales/zh-CN/components/Gpu.json.mjs +37 -10
- package/dist/locales/zh-CN/index.js +2 -0
- package/dist/locales/zh-CN/index.mjs +2 -0
- package/dist/locales/zh-CN/uses/UseCancelFormDialog.json.js +11 -0
- package/dist/locales/zh-CN/uses/UseCancelFormDialog.json.mjs +11 -0
- package/dist/style.css +692 -664
- package/dist/styles/components/gpu/assign-gpu-devices-list.css +10 -0
- package/dist/styles/components/gpu/gpu-form-item.css +16 -0
- package/dist/styles/components/gpu/gpu-form.css +4 -0
- package/dist/styles/components/network-config/network-config.css +3 -0
- package/dist/styles/components/resource-config/resource-config.css +0 -8
- package/dist/styles/styles/common.css +4 -0
- package/dist/uses/index.d.ts +1 -0
- package/dist/uses/useCancelFormDialog/index.d.ts +11 -0
- package/dist/uses/useCancelFormDialog/index.js +40 -0
- package/dist/uses/useCancelFormDialog/index.mjs +40 -0
- package/dist/uses/useCancelFormDialog/src/CancelFormDialog.vue.d.ts +8 -0
- package/dist/uses/useCancelFormDialog/src/CancelFormDialog.vue.js +25 -0
- package/dist/uses/useCancelFormDialog/src/CancelFormDialog.vue.mjs +26 -0
- package/dist/uses/useCancelFormDialog/src/CancelFormDialog.vue2.js +3 -0
- package/dist/uses/useCancelFormDialog/src/CancelFormDialog.vue2.mjs +4 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/injectWithSelf.d.ts +6 -0
- package/dist/utils/injectWithSelf.js +8 -0
- package/dist/utils/injectWithSelf.mjs +8 -0
- package/dist/utils/multiRowEditorValidate.d.ts +5 -5
- package/dist/utils/useResetFieldValue.d.ts +13 -0
- package/dist/utils/useResetFieldValue.js +28 -0
- package/dist/utils/useResetFieldValue.mjs +28 -0
- package/dist/utils/useSetFieldValue.d.ts +6 -0
- package/dist/utils/useSetFieldValue.js +2 -5
- package/dist/utils/useSetFieldValue.mjs +2 -5
- package/dist/workloads/container-basic-info/props.d.ts +13 -0
- package/dist/workloads/container-basic-info/props.js +4 -0
- package/dist/workloads/container-basic-info/props.mjs +4 -0
- package/dist/workloads/container-basic-info/src/ContainerBasicInfo.vue.d.ts +10 -0
- package/dist/workloads/container-basic-info/src/ContainerBasicInfo.vue.js +54 -29
- package/dist/workloads/container-basic-info/src/ContainerBasicInfo.vue.mjs +54 -29
- package/dist/workloads/container-basic-info/src/ContainerBasicInfo.vue2.js +18 -8
- package/dist/workloads/container-basic-info/src/ContainerBasicInfo.vue2.mjs +19 -9
- package/dist/workloads/container-image/src/dialogs/SelectImageDialog.vue.d.ts +1 -1
- package/dist/workloads/containers/demo/data.d.ts +8 -1
- package/dist/workloads/containers/src/ContainerItem.vue.d.ts +23 -0
- package/dist/workloads/containers/src/Containers.vue.d.ts +4 -0
- package/dist/workloads/containers/src/Containers.vue2.js +18 -1
- package/dist/workloads/containers/src/Containers.vue2.mjs +19 -2
- package/dist/workloads/health-check/props.d.ts +4 -0
- package/dist/workloads/health-check/props.js +4 -0
- package/dist/workloads/health-check/props.mjs +4 -0
- package/dist/workloads/health-check/src/HealthCheck.vue.d.ts +9 -0
- package/dist/workloads/health-check/src/HealthCheck.vue.js +6 -6
- package/dist/workloads/health-check/src/HealthCheck.vue.mjs +6 -6
- package/dist/workloads/health-check/src/HealthCheckHandler.vue.js +3 -1
- package/dist/workloads/health-check/src/HealthCheckHandler.vue.mjs +3 -1
- package/dist/workloads/http-get-action/src/HttpGetAction.vue.js +1 -1
- package/dist/workloads/http-get-action/src/HttpGetAction.vue.mjs +1 -1
- package/dist/workloads/workload-annotations/props.d.ts +1 -0
- package/dist/workloads/workload-annotations/props.js +1 -0
- package/dist/workloads/workload-annotations/props.mjs +2 -1
- package/package.json +12 -13
- package/dist/components/gpu/src/GpuAdvancedForm.vue.d.ts +0 -131
- package/dist/components/gpu/src/GpuAdvancedForm.vue2.js +0 -92
- package/dist/components/gpu/src/GpuAdvancedForm.vue2.mjs +0 -76
- package/dist/components/gpu/src/GpuFormItem.vue.d.ts +0 -232
- package/dist/components/gpu/src/GpuFormItem.vue2.js +0 -235
- package/dist/components/gpu/src/GpuFormItem.vue2.mjs +0 -219
- package/dist/components/gpu/src/GpuResources.vue.js +0 -125
- package/dist/components/gpu/src/GpuResources.vue.mjs +0 -126
- package/dist/components/gpu/src/GpuResources.vue2.js +0 -197
- package/dist/components/gpu/src/GpuResources.vue2.mjs +0 -181
- package/dist/components/gpu/src/validations/nvidiaVgpuMemoryDecimal.js +0 -19
- package/dist/components/gpu/src/validations/nvidiaVgpuMemoryDecimal.mjs +0 -20
|
@@ -16,8 +16,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16
16
|
createVNode(_component_dao_switch, {
|
|
17
17
|
modelValue: _ctx.enableLivenessProbe,
|
|
18
18
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.enableLivenessProbe = $event),
|
|
19
|
-
"show-text":
|
|
20
|
-
}, null, 8, ["modelValue"]),
|
|
19
|
+
"show-text": _ctx.showText
|
|
20
|
+
}, null, 8, ["modelValue", "show-text"]),
|
|
21
21
|
_ctx.enableLivenessProbe ? (openBlock(), createBlock(_component_dao_health_check_handler, {
|
|
22
22
|
key: 0,
|
|
23
23
|
"field-prefix": _ctx.actualFields.livenessProbe
|
|
@@ -33,8 +33,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
33
33
|
createVNode(_component_dao_switch, {
|
|
34
34
|
modelValue: _ctx.enableReadinessProbe,
|
|
35
35
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.enableReadinessProbe = $event),
|
|
36
|
-
"show-text":
|
|
37
|
-
}, null, 8, ["modelValue"]),
|
|
36
|
+
"show-text": _ctx.showText
|
|
37
|
+
}, null, 8, ["modelValue", "show-text"]),
|
|
38
38
|
_ctx.enableReadinessProbe ? (openBlock(), createBlock(_component_dao_health_check_handler, {
|
|
39
39
|
key: 0,
|
|
40
40
|
"field-prefix": _ctx.actualFields.readinessProbe
|
|
@@ -50,8 +50,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
50
50
|
createVNode(_component_dao_switch, {
|
|
51
51
|
modelValue: _ctx.enableStartupProbe,
|
|
52
52
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.enableStartupProbe = $event),
|
|
53
|
-
"show-text":
|
|
54
|
-
}, null, 8, ["modelValue"]),
|
|
53
|
+
"show-text": _ctx.showText
|
|
54
|
+
}, null, 8, ["modelValue", "show-text"]),
|
|
55
55
|
_ctx.enableStartupProbe ? (openBlock(), createBlock(_component_dao_health_check_handler, {
|
|
56
56
|
key: 0,
|
|
57
57
|
"field-prefix": _ctx.actualFields.startupProbe
|
|
@@ -59,7 +59,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
59
59
|
required: "",
|
|
60
60
|
"control-props": {
|
|
61
61
|
type: "number",
|
|
62
|
-
class: "default-form-width"
|
|
62
|
+
class: "default-port-form-width"
|
|
63
63
|
}
|
|
64
64
|
}, null, 8, ["label", "name"]),
|
|
65
65
|
vue.createVNode(_component_dao_form_item_validate, {
|
|
@@ -72,6 +72,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
72
72
|
], 64)) : _ctx.probeType === "exec" ? (vue.openBlock(), vue.createBlock(_component_dao_form_item_validate, {
|
|
73
73
|
key: 2,
|
|
74
74
|
label: _ctx.$t("biz.workloads.HealthCheck.label.command"),
|
|
75
|
+
required: "",
|
|
75
76
|
name: `${_ctx.actualFields.exec}.command`,
|
|
76
77
|
"yup-type": _ctx.yup.array(),
|
|
77
78
|
helper: _ctx.$t("biz.workloads.HealthCheck.label.commandHelper"),
|
|
@@ -83,6 +84,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
83
84
|
ref: componentRef,
|
|
84
85
|
modelValue: value.value,
|
|
85
86
|
"onUpdate:modelValue": ($event) => value.value = $event,
|
|
87
|
+
min: 1,
|
|
86
88
|
type: "textarea",
|
|
87
89
|
placeholder: _ctx.$t("biz.workloads.HealthCheck.label.commandPlaceholder")
|
|
88
90
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
@@ -58,7 +58,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
58
58
|
required: "",
|
|
59
59
|
"control-props": {
|
|
60
60
|
type: "number",
|
|
61
|
-
class: "default-form-width"
|
|
61
|
+
class: "default-port-form-width"
|
|
62
62
|
}
|
|
63
63
|
}, null, 8, ["label", "name"]),
|
|
64
64
|
createVNode(_component_dao_form_item_validate, {
|
|
@@ -71,6 +71,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
71
71
|
], 64)) : _ctx.probeType === "exec" ? (openBlock(), createBlock(_component_dao_form_item_validate, {
|
|
72
72
|
key: 2,
|
|
73
73
|
label: _ctx.$t("biz.workloads.HealthCheck.label.command"),
|
|
74
|
+
required: "",
|
|
74
75
|
name: `${_ctx.actualFields.exec}.command`,
|
|
75
76
|
"yup-type": _ctx.yup.array(),
|
|
76
77
|
helper: _ctx.$t("biz.workloads.HealthCheck.label.commandHelper"),
|
|
@@ -82,6 +83,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
82
83
|
ref: componentRef,
|
|
83
84
|
modelValue: value.value,
|
|
84
85
|
"onUpdate:modelValue": ($event) => value.value = $event,
|
|
86
|
+
min: 1,
|
|
85
87
|
type: "textarea",
|
|
86
88
|
placeholder: _ctx.$t("biz.workloads.HealthCheck.label.commandPlaceholder")
|
|
87
89
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
@@ -15,6 +15,7 @@ export declare const workloadAnnotationsHiddenKeys: {
|
|
|
15
15
|
readonly aliasName: "kpanda.io/alias-name";
|
|
16
16
|
readonly vGpuQuotas: "quota.kpanda.io/vgpu";
|
|
17
17
|
readonly nvidiaVgpuModel: "nvidia.com/use-gputype";
|
|
18
|
+
readonly nvidiaVgpuDevices: "nvidia.com/use-gpuuuid";
|
|
18
19
|
readonly nvidiaVgpuGpuShedule: "hami.io/gpu-scheduler-policy";
|
|
19
20
|
readonly nvidiaVgpuNodeShedule: "hami.io/node-scheduler-policy";
|
|
20
21
|
readonly imageSelector: "image-selectors";
|
|
@@ -10,6 +10,7 @@ const workloadAnnotationsHiddenKeys = {
|
|
|
10
10
|
aliasName: "kpanda.io/alias-name",
|
|
11
11
|
vGpuQuotas: "quota.kpanda.io/vgpu",
|
|
12
12
|
nvidiaVgpuModel: props.NividaVgpuModelAnnoKey,
|
|
13
|
+
nvidiaVgpuDevices: props.NividaVgpuDevicesAnnoKey,
|
|
13
14
|
nvidiaVgpuGpuShedule: props.NividaVgpuGpuScheduleAnnoKey,
|
|
14
15
|
nvidiaVgpuNodeShedule: props.NividaVgpuNodeScheduleAnnoKey,
|
|
15
16
|
imageSelector: props$1.ImageSelectorKey
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageSelectorKey } from "../containers/props.mjs";
|
|
2
|
-
import { NividaVgpuModelAnnoKey, NividaVgpuGpuScheduleAnnoKey, NividaVgpuNodeScheduleAnnoKey } from "../../components/gpu/props.mjs";
|
|
2
|
+
import { NividaVgpuModelAnnoKey, NividaVgpuDevicesAnnoKey, NividaVgpuGpuScheduleAnnoKey, NividaVgpuNodeScheduleAnnoKey } from "../../components/gpu/props.mjs";
|
|
3
3
|
const workloadAnnotationsDefaultFields = () => ({
|
|
4
4
|
annotations: "metadata.annotations",
|
|
5
5
|
podAnnotations: "spec.template.metadata.annotations"
|
|
@@ -8,6 +8,7 @@ const workloadAnnotationsHiddenKeys = {
|
|
|
8
8
|
aliasName: "kpanda.io/alias-name",
|
|
9
9
|
vGpuQuotas: "quota.kpanda.io/vgpu",
|
|
10
10
|
nvidiaVgpuModel: NividaVgpuModelAnnoKey,
|
|
11
|
+
nvidiaVgpuDevices: NividaVgpuDevicesAnnoKey,
|
|
11
12
|
nvidiaVgpuGpuShedule: NividaVgpuGpuScheduleAnnoKey,
|
|
12
13
|
nvidiaVgpuNodeShedule: NividaVgpuNodeScheduleAnnoKey,
|
|
13
14
|
imageSelector: ImageSelectorKey
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dao-style/biz",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
|
+
"packageManager": "pnpm@10.34.4",
|
|
5
6
|
"sideEffects": [
|
|
6
7
|
"dist/cjs/**/*.js",
|
|
7
8
|
"dist/es/**/*.mjs",
|
|
@@ -15,22 +16,22 @@
|
|
|
15
16
|
"build:base": "vite build",
|
|
16
17
|
"build:types": "vue-tsc -d --emitDeclarationOnly -p tsconfig.build.json --outDir dist",
|
|
17
18
|
"build:volar": "node scripts/gen-volar-dts.mjs",
|
|
18
|
-
"build": "
|
|
19
|
+
"build": "pnpm run build:base && pnpm run build:types && pnpm run build:volar",
|
|
19
20
|
"preview": "vite preview",
|
|
20
21
|
"dev": "vitepress dev docs",
|
|
21
22
|
"test": "vitest",
|
|
22
23
|
"docs:serve": "vitepress serve docs",
|
|
23
24
|
"build:docs": "vitepress build docs",
|
|
24
25
|
"typecheck:base": "vue-tsc --noEmit",
|
|
25
|
-
"typecheck": "
|
|
26
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.build.json",
|
|
26
27
|
"lint:eslint": "eslint \"src/**/*.{ts,tsx,js,jsx,vue}\" --max-warnings=0 --fix",
|
|
27
|
-
"lint:style": "
|
|
28
|
-
"lint:docs": "prettier \"**/*.md\" --write &&
|
|
29
|
-
"lint": "
|
|
28
|
+
"lint:style": "pnpm run lint:style:ci -- --fix",
|
|
29
|
+
"lint:docs": "prettier \"**/*.md\" --write && pnpm exec textlint \"src/locales/**/*.json\" --config .textlintrc.json --fix",
|
|
30
|
+
"lint": "pnpm run lint:style && pnpm run lint:docs && pnpm run typecheck && pnpm run lint:eslint",
|
|
30
31
|
"lint:eslint:ci": "eslint --ignore-path \".eslintignore.ci\" \"src/**/*.{ts,tsx,js,jsx,vue}\" --max-warnings=0",
|
|
31
32
|
"lint:docs:ci": "prettier \"**/*.md\" --check",
|
|
32
33
|
"lint:style:ci": "stylelint \"src/**/*.{vue,css,scss}\" --config .stylelintrc.js",
|
|
33
|
-
"lint:ci": "
|
|
34
|
+
"lint:ci": "pnpm run lint:style:ci && pnpm run lint:docs:ci && pnpm run typecheck && pnpm run lint:eslint:ci",
|
|
34
35
|
"release": "node scripts/release.js && git push --follow-tags",
|
|
35
36
|
"publish:ci": "node scripts/publish.js",
|
|
36
37
|
"sync:registry": "node scripts/registry-sync.js"
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"@vue/test-utils": "2.3.0",
|
|
55
56
|
"@vueuse/core": "^9.4.0",
|
|
56
57
|
"autoprefixer": "^10.4.16",
|
|
58
|
+
"bumpp": "^7.1.1",
|
|
57
59
|
"c8": "7.13.0",
|
|
58
60
|
"commitizen": "^4.3.0",
|
|
59
61
|
"conventional-changelog-cli": "^2.2.2",
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
"eslint-plugin-markdown": "^2.2.1",
|
|
68
70
|
"eslint-plugin-sort-exports": "^0.9.1",
|
|
69
71
|
"eslint-plugin-vue": "^9.9.0",
|
|
72
|
+
"gray-matter": "^4.0.3",
|
|
70
73
|
"ip-matching": "^2.1.2",
|
|
71
74
|
"jsdom": "21.1.0",
|
|
72
75
|
"kubernetes-types": "^1.26.0",
|
|
@@ -128,13 +131,9 @@
|
|
|
128
131
|
"commit-msg": "commitlint -E GIT_PARAMS"
|
|
129
132
|
},
|
|
130
133
|
"engines": {
|
|
131
|
-
"node": ">=
|
|
132
|
-
"
|
|
134
|
+
"node": ">=22",
|
|
135
|
+
"pnpm": ">=10.34.4"
|
|
133
136
|
},
|
|
134
|
-
"workspaces": [
|
|
135
|
-
"docs",
|
|
136
|
-
"playground"
|
|
137
|
-
],
|
|
138
137
|
"main": "./index.js",
|
|
139
138
|
"module": "./dist/index.mjs",
|
|
140
139
|
"types": "./dist/index.d.ts",
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import * as yup from 'yup';
|
|
2
|
-
import { VgpuSchedulePolicy } from '../types';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{
|
|
4
|
-
quota: {
|
|
5
|
-
type: import("vue").PropType<import("../types").GpuQuotaItem>;
|
|
6
|
-
};
|
|
7
|
-
enableRemoteCall: {
|
|
8
|
-
type: BooleanConstructor;
|
|
9
|
-
default: boolean;
|
|
10
|
-
};
|
|
11
|
-
enableNvidiaVgpuModel: {
|
|
12
|
-
type: BooleanConstructor;
|
|
13
|
-
default: boolean;
|
|
14
|
-
};
|
|
15
|
-
enableNvidiaVgpuPriority: {
|
|
16
|
-
type: BooleanConstructor;
|
|
17
|
-
default: boolean;
|
|
18
|
-
};
|
|
19
|
-
nvidiaVgpuModelsAdaptor: {
|
|
20
|
-
type: import("vue").PropType<{
|
|
21
|
-
data: import("../types").GPUSummary[];
|
|
22
|
-
loading: boolean;
|
|
23
|
-
refresh: () => import("../types").GPUSummary[] | Promise<import("../types").GPUSummary[]>;
|
|
24
|
-
}>;
|
|
25
|
-
default: undefined;
|
|
26
|
-
};
|
|
27
|
-
nvidiaGpuModels: {
|
|
28
|
-
type: import("vue").PropType<string[]>;
|
|
29
|
-
required: boolean;
|
|
30
|
-
};
|
|
31
|
-
isSide: {
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
openNvidiaVgpuModel: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
default: boolean;
|
|
38
|
-
};
|
|
39
|
-
enableNvidiaVgpuSchedulePolicy: {
|
|
40
|
-
type: BooleanConstructor;
|
|
41
|
-
default: boolean;
|
|
42
|
-
};
|
|
43
|
-
openNvidiaVgpuScheulePolicy: {
|
|
44
|
-
type: BooleanConstructor;
|
|
45
|
-
default: boolean;
|
|
46
|
-
};
|
|
47
|
-
}, {
|
|
48
|
-
gpuCallValue: import("vue").Ref<string>;
|
|
49
|
-
priorityOpts: {
|
|
50
|
-
label: string;
|
|
51
|
-
value: string;
|
|
52
|
-
}[];
|
|
53
|
-
openNvidiaVgpuModelRef: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
|
|
54
|
-
handleNvidiaVgpuModelChange: (open: boolean) => void;
|
|
55
|
-
nvidiaVgpuModelKey: string;
|
|
56
|
-
nvidiaVgpuPriorityKey: string;
|
|
57
|
-
isNvidiaVgpu: (key?: string | undefined) => boolean;
|
|
58
|
-
isNvidiaGpu: (key?: string | undefined) => boolean;
|
|
59
|
-
scheduleOps: {
|
|
60
|
-
label: string;
|
|
61
|
-
value: VgpuSchedulePolicy;
|
|
62
|
-
}[];
|
|
63
|
-
openNvidiaVgpuScheulePolicyRef: import("vue").Ref<boolean> | import("vue").WritableComputedRef<boolean>;
|
|
64
|
-
handleNvidiaVgpuScheulePolicyChange: (open: boolean) => void;
|
|
65
|
-
nvidiaVgpuGpuScheduleKey: string;
|
|
66
|
-
nvidiaVgpuNodeScheduleKey: string;
|
|
67
|
-
nodeScheduleHelper: import("vue").ComputedRef<string>;
|
|
68
|
-
gpuScheduleHelper: import("vue").ComputedRef<string>;
|
|
69
|
-
yup: typeof yup;
|
|
70
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:openNvidiaVgpuModel" | "update:openNvidiaVgpuScheulePolicy")[], "update:openNvidiaVgpuModel" | "update:openNvidiaVgpuScheulePolicy", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
71
|
-
quota: {
|
|
72
|
-
type: import("vue").PropType<import("../types").GpuQuotaItem>;
|
|
73
|
-
};
|
|
74
|
-
enableRemoteCall: {
|
|
75
|
-
type: BooleanConstructor;
|
|
76
|
-
default: boolean;
|
|
77
|
-
};
|
|
78
|
-
enableNvidiaVgpuModel: {
|
|
79
|
-
type: BooleanConstructor;
|
|
80
|
-
default: boolean;
|
|
81
|
-
};
|
|
82
|
-
enableNvidiaVgpuPriority: {
|
|
83
|
-
type: BooleanConstructor;
|
|
84
|
-
default: boolean;
|
|
85
|
-
};
|
|
86
|
-
nvidiaVgpuModelsAdaptor: {
|
|
87
|
-
type: import("vue").PropType<{
|
|
88
|
-
data: import("../types").GPUSummary[];
|
|
89
|
-
loading: boolean;
|
|
90
|
-
refresh: () => import("../types").GPUSummary[] | Promise<import("../types").GPUSummary[]>;
|
|
91
|
-
}>;
|
|
92
|
-
default: undefined;
|
|
93
|
-
};
|
|
94
|
-
nvidiaGpuModels: {
|
|
95
|
-
type: import("vue").PropType<string[]>;
|
|
96
|
-
required: boolean;
|
|
97
|
-
};
|
|
98
|
-
isSide: {
|
|
99
|
-
type: BooleanConstructor;
|
|
100
|
-
default: boolean;
|
|
101
|
-
};
|
|
102
|
-
openNvidiaVgpuModel: {
|
|
103
|
-
type: BooleanConstructor;
|
|
104
|
-
default: boolean;
|
|
105
|
-
};
|
|
106
|
-
enableNvidiaVgpuSchedulePolicy: {
|
|
107
|
-
type: BooleanConstructor;
|
|
108
|
-
default: boolean;
|
|
109
|
-
};
|
|
110
|
-
openNvidiaVgpuScheulePolicy: {
|
|
111
|
-
type: BooleanConstructor;
|
|
112
|
-
default: boolean;
|
|
113
|
-
};
|
|
114
|
-
}>> & {
|
|
115
|
-
"onUpdate:openNvidiaVgpuModel"?: ((...args: any[]) => any) | undefined;
|
|
116
|
-
"onUpdate:openNvidiaVgpuScheulePolicy"?: ((...args: any[]) => any) | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
nvidiaVgpuModelsAdaptor: {
|
|
119
|
-
data: import("../types").GPUSummary[];
|
|
120
|
-
loading: boolean;
|
|
121
|
-
refresh: () => import("../types").GPUSummary[] | Promise<import("../types").GPUSummary[]>;
|
|
122
|
-
};
|
|
123
|
-
enableRemoteCall: boolean;
|
|
124
|
-
enableNvidiaVgpuModel: boolean;
|
|
125
|
-
enableNvidiaVgpuPriority: boolean;
|
|
126
|
-
enableNvidiaVgpuSchedulePolicy: boolean;
|
|
127
|
-
isSide: boolean;
|
|
128
|
-
openNvidiaVgpuModel: boolean;
|
|
129
|
-
openNvidiaVgpuScheulePolicy: boolean;
|
|
130
|
-
}>;
|
|
131
|
-
export default _default;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const vue = require("vue");
|
|
3
|
-
const yup = require("yup");
|
|
4
|
-
const vueI18n = require("vue-i18n");
|
|
5
|
-
const index = require("../../../node_modules/@vueuse/core/index.js");
|
|
6
|
-
const extend = require("@dao-style/extend");
|
|
7
|
-
const veeValidate = require("vee-validate");
|
|
8
|
-
const props = require("../props.js");
|
|
9
|
-
const types = require("../types.js");
|
|
10
|
-
const utils = require("../utils.js");
|
|
11
|
-
const useSetFieldValue = require("../../../utils/useSetFieldValue.js");
|
|
12
|
-
function _interopNamespaceDefault(e) {
|
|
13
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
14
|
-
if (e) {
|
|
15
|
-
for (const k in e) {
|
|
16
|
-
if (k !== "default") {
|
|
17
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: () => e[k]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
const yup__namespace = /* @__PURE__ */ _interopNamespaceDefault(yup);
|
|
29
|
-
const _sfc_main = vue.defineComponent({
|
|
30
|
-
name: "DaoGpuAdvancedForm",
|
|
31
|
-
components: {
|
|
32
|
-
DaoFormItemValidate: extend.DaoFormItemValidate
|
|
33
|
-
},
|
|
34
|
-
props: props.gpuAdvancedFormProps,
|
|
35
|
-
emits: ["update:openNvidiaVgpuModel", "update:openNvidiaVgpuScheulePolicy"],
|
|
36
|
-
setup(props$1, { emit }) {
|
|
37
|
-
const openNvidiaVgpuModelRef = index.useVModel(props$1, "openNvidiaVgpuModel", emit);
|
|
38
|
-
const openNvidiaVgpuScheulePolicyRef = index.useVModel(props$1, "openNvidiaVgpuScheulePolicy", emit);
|
|
39
|
-
const i18nInstance = vueI18n.useI18n();
|
|
40
|
-
const gpuCallValue = vue.ref("local");
|
|
41
|
-
const priorityOpts = props.getPriorityOpts(i18nInstance);
|
|
42
|
-
const nodeScheduleModel = veeValidate.useFieldValue(types.nvidiaVgpuNodeScheduleKey);
|
|
43
|
-
const gpuScheduleModel = veeValidate.useFieldValue(types.nvidiaVgpuGpuScheduleKey);
|
|
44
|
-
const scheduleOps = [
|
|
45
|
-
{
|
|
46
|
-
label: "Binpack",
|
|
47
|
-
value: "binpack"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
label: "Spread",
|
|
51
|
-
value: "spread"
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
const nodeScheduleHelper = vue.computed(() => nodeScheduleModel.value && nodeScheduleModel.value === "spread" ? i18nInstance.t("biz.components.Gpu.baseNodeSchedule.spreadHelper") : i18nInstance.t("biz.components.Gpu.baseNodeSchedule.binpackHelper"));
|
|
55
|
-
const gpuScheduleHelper = vue.computed(() => gpuScheduleModel.value && gpuScheduleModel.value === "spread" ? i18nInstance.t("biz.components.Gpu.baseGpuSchedule.spreadHelper") : i18nInstance.t("biz.components.Gpu.baseGpuSchedule.binpackHelper"));
|
|
56
|
-
const setModelValue = useSetFieldValue.useSetFieldValue(types.nvidiaVgpuModelKey);
|
|
57
|
-
const handleNvidiaVgpuModelChange = (open) => {
|
|
58
|
-
var _a;
|
|
59
|
-
const { quota } = props$1;
|
|
60
|
-
if (open && quota) {
|
|
61
|
-
setModelValue((_a = props$1.nvidiaGpuModels) == null ? void 0 : _a[0]);
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const setGpuScheduleValue = useSetFieldValue.useSetFieldValue(types.nvidiaVgpuGpuScheduleKey);
|
|
65
|
-
const setNodeScheduleValue = useSetFieldValue.useSetFieldValue(types.nvidiaVgpuNodeScheduleKey);
|
|
66
|
-
const handleNvidiaVgpuScheulePolicyChange = (open) => {
|
|
67
|
-
if (open) {
|
|
68
|
-
setGpuScheduleValue("binpack");
|
|
69
|
-
setNodeScheduleValue("spread");
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return {
|
|
73
|
-
gpuCallValue,
|
|
74
|
-
priorityOpts,
|
|
75
|
-
openNvidiaVgpuModelRef,
|
|
76
|
-
handleNvidiaVgpuModelChange,
|
|
77
|
-
nvidiaVgpuModelKey: types.nvidiaVgpuModelKey,
|
|
78
|
-
nvidiaVgpuPriorityKey: types.nvidiaVgpuPriorityKey,
|
|
79
|
-
isNvidiaVgpu: utils.isNvidiaVgpu,
|
|
80
|
-
isNvidiaGpu: utils.isNvidiaGpu,
|
|
81
|
-
scheduleOps,
|
|
82
|
-
openNvidiaVgpuScheulePolicyRef,
|
|
83
|
-
handleNvidiaVgpuScheulePolicyChange,
|
|
84
|
-
nvidiaVgpuGpuScheduleKey: types.nvidiaVgpuGpuScheduleKey,
|
|
85
|
-
nvidiaVgpuNodeScheduleKey: types.nvidiaVgpuNodeScheduleKey,
|
|
86
|
-
nodeScheduleHelper,
|
|
87
|
-
gpuScheduleHelper,
|
|
88
|
-
yup: yup__namespace
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
module.exports = _sfc_main;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent, ref, computed } from "vue";
|
|
2
|
-
import * as yup from "yup";
|
|
3
|
-
import { useI18n } from "vue-i18n";
|
|
4
|
-
import { useVModel } from "../../../node_modules/@vueuse/core/index.mjs";
|
|
5
|
-
import { DaoFormItemValidate } from "@dao-style/extend";
|
|
6
|
-
import { useFieldValue } from "vee-validate";
|
|
7
|
-
import { gpuAdvancedFormProps, getPriorityOpts } from "../props.mjs";
|
|
8
|
-
import { nvidiaVgpuNodeScheduleKey, nvidiaVgpuGpuScheduleKey, nvidiaVgpuModelKey, nvidiaVgpuPriorityKey } from "../types.mjs";
|
|
9
|
-
import { isNvidiaVgpu, isNvidiaGpu } from "../utils.mjs";
|
|
10
|
-
import { useSetFieldValue } from "../../../utils/useSetFieldValue.mjs";
|
|
11
|
-
const _sfc_main = defineComponent({
|
|
12
|
-
name: "DaoGpuAdvancedForm",
|
|
13
|
-
components: {
|
|
14
|
-
DaoFormItemValidate
|
|
15
|
-
},
|
|
16
|
-
props: gpuAdvancedFormProps,
|
|
17
|
-
emits: ["update:openNvidiaVgpuModel", "update:openNvidiaVgpuScheulePolicy"],
|
|
18
|
-
setup(props, { emit }) {
|
|
19
|
-
const openNvidiaVgpuModelRef = useVModel(props, "openNvidiaVgpuModel", emit);
|
|
20
|
-
const openNvidiaVgpuScheulePolicyRef = useVModel(props, "openNvidiaVgpuScheulePolicy", emit);
|
|
21
|
-
const i18nInstance = useI18n();
|
|
22
|
-
const gpuCallValue = ref("local");
|
|
23
|
-
const priorityOpts = getPriorityOpts(i18nInstance);
|
|
24
|
-
const nodeScheduleModel = useFieldValue(nvidiaVgpuNodeScheduleKey);
|
|
25
|
-
const gpuScheduleModel = useFieldValue(nvidiaVgpuGpuScheduleKey);
|
|
26
|
-
const scheduleOps = [
|
|
27
|
-
{
|
|
28
|
-
label: "Binpack",
|
|
29
|
-
value: "binpack"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "Spread",
|
|
33
|
-
value: "spread"
|
|
34
|
-
}
|
|
35
|
-
];
|
|
36
|
-
const nodeScheduleHelper = computed(() => nodeScheduleModel.value && nodeScheduleModel.value === "spread" ? i18nInstance.t("biz.components.Gpu.baseNodeSchedule.spreadHelper") : i18nInstance.t("biz.components.Gpu.baseNodeSchedule.binpackHelper"));
|
|
37
|
-
const gpuScheduleHelper = computed(() => gpuScheduleModel.value && gpuScheduleModel.value === "spread" ? i18nInstance.t("biz.components.Gpu.baseGpuSchedule.spreadHelper") : i18nInstance.t("biz.components.Gpu.baseGpuSchedule.binpackHelper"));
|
|
38
|
-
const setModelValue = useSetFieldValue(nvidiaVgpuModelKey);
|
|
39
|
-
const handleNvidiaVgpuModelChange = (open) => {
|
|
40
|
-
var _a;
|
|
41
|
-
const { quota } = props;
|
|
42
|
-
if (open && quota) {
|
|
43
|
-
setModelValue((_a = props.nvidiaGpuModels) == null ? void 0 : _a[0]);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const setGpuScheduleValue = useSetFieldValue(nvidiaVgpuGpuScheduleKey);
|
|
47
|
-
const setNodeScheduleValue = useSetFieldValue(nvidiaVgpuNodeScheduleKey);
|
|
48
|
-
const handleNvidiaVgpuScheulePolicyChange = (open) => {
|
|
49
|
-
if (open) {
|
|
50
|
-
setGpuScheduleValue("binpack");
|
|
51
|
-
setNodeScheduleValue("spread");
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
gpuCallValue,
|
|
56
|
-
priorityOpts,
|
|
57
|
-
openNvidiaVgpuModelRef,
|
|
58
|
-
handleNvidiaVgpuModelChange,
|
|
59
|
-
nvidiaVgpuModelKey,
|
|
60
|
-
nvidiaVgpuPriorityKey,
|
|
61
|
-
isNvidiaVgpu,
|
|
62
|
-
isNvidiaGpu,
|
|
63
|
-
scheduleOps,
|
|
64
|
-
openNvidiaVgpuScheulePolicyRef,
|
|
65
|
-
handleNvidiaVgpuScheulePolicyChange,
|
|
66
|
-
nvidiaVgpuGpuScheduleKey,
|
|
67
|
-
nvidiaVgpuNodeScheduleKey,
|
|
68
|
-
nodeScheduleHelper,
|
|
69
|
-
gpuScheduleHelper,
|
|
70
|
-
yup
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
export {
|
|
75
|
-
_sfc_main as default
|
|
76
|
-
};
|