@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _sfc_main from "./GpuFormItem.vue2.mjs";
|
|
2
|
-
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createSlots, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
3
|
-
import _export_sfc from "
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createSlots, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode, renderSlot, normalizeProps, guardReactiveProps, mergeProps } from "vue";
|
|
3
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
4
|
const _hoisted_1 = { class: "gpu-quotas-item__type-select-wrap" };
|
|
5
5
|
const _hoisted_2 = { key: 0 };
|
|
6
6
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
@@ -9,7 +9,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
9
9
|
const _component_dao_select = resolveComponent("dao-select");
|
|
10
10
|
const _component_dao_action_icon = resolveComponent("dao-action-icon");
|
|
11
11
|
const _component_dao_history_link = resolveComponent("dao-history-link");
|
|
12
|
-
const _component_dao_message = resolveComponent("dao-message");
|
|
13
12
|
const _component_dao_helper_text = resolveComponent("dao-helper-text");
|
|
14
13
|
const _component_dao_form_item_validate = resolveComponent("dao-form-item-validate");
|
|
15
14
|
const _component_gpu_form_dynamic_item = resolveComponent("gpu-form-dynamic-item");
|
|
@@ -91,20 +90,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
91
90
|
})
|
|
92
91
|
]),
|
|
93
92
|
key: "0"
|
|
94
|
-
} : _ctx.
|
|
93
|
+
} : _ctx.isShowHamiGpuHelper ? {
|
|
95
94
|
name: "helper",
|
|
96
95
|
fn: withCtx(() => [
|
|
97
96
|
createVNode(_component_dao_helper_text, null, {
|
|
98
97
|
default: withCtx(() => [
|
|
99
|
-
|
|
100
|
-
simple: "",
|
|
101
|
-
type: "info"
|
|
102
|
-
}, {
|
|
103
|
-
default: withCtx(() => [
|
|
104
|
-
createTextVNode(toDisplayString(_ctx.$t("biz.components.Gpu.hashrateTip")), 1)
|
|
105
|
-
]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
98
|
+
createTextVNode(toDisplayString(_ctx.$t("biz.components.Gpu.hashrateTip")), 1)
|
|
108
99
|
]),
|
|
109
100
|
_: 1
|
|
110
101
|
})
|
|
@@ -158,7 +149,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
158
149
|
"available-quota-item": _ctx.availableQuotaItem,
|
|
159
150
|
"is-side": _ctx.isSide,
|
|
160
151
|
"enable-range-validate": _ctx.enableRangeValidate,
|
|
161
|
-
"quota-item": _ctx.quotaItem
|
|
152
|
+
"quota-item": _ctx.quotaItem,
|
|
153
|
+
"gpu-provider": _ctx.currentGpuProvider,
|
|
154
|
+
"gpu-usage": _ctx.gpuUsage
|
|
162
155
|
}, createSlots({ _: 2 }, [
|
|
163
156
|
renderList(_ctx.gpuResourceHelperSlot, (resourceKey) => {
|
|
164
157
|
return {
|
|
@@ -168,21 +161,24 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
168
161
|
])
|
|
169
162
|
};
|
|
170
163
|
})
|
|
171
|
-
]), 1032, ["resources", "quota", "used-quota-item", "available-quota-item", "is-side", "enable-range-validate", "quota-item"])),
|
|
172
|
-
createVNode(_component_gpu_advanced_form, {
|
|
164
|
+
]), 1032, ["resources", "quota", "used-quota-item", "available-quota-item", "is-side", "enable-range-validate", "quota-item", "gpu-provider", "gpu-usage"])),
|
|
165
|
+
createVNode(_component_gpu_advanced_form, mergeProps({
|
|
173
166
|
"open-nvidia-vgpu-model": _ctx.openNvidiaVgpuModel,
|
|
174
167
|
"onUpdate:openNvidiaVgpuModel": _cache[2] || (_cache[2] = ($event) => _ctx.openNvidiaVgpuModel = $event),
|
|
175
|
-
"open-nvidia-
|
|
176
|
-
"onUpdate:
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
"
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
168
|
+
"open-nvidia-assign-gpu": _ctx.openNvidiaAssignGpu,
|
|
169
|
+
"onUpdate:openNvidiaAssignGpu": _cache[3] || (_cache[3] = ($event) => _ctx.openNvidiaAssignGpu = $event),
|
|
170
|
+
"open-nvidia-vgpu-schedule-policy": _ctx.openNvidiaVgpuSchedulePolicy,
|
|
171
|
+
"onUpdate:openNvidiaVgpuSchedulePolicy": _cache[4] || (_cache[4] = ($event) => _ctx.openNvidiaVgpuSchedulePolicy = $event),
|
|
172
|
+
quota: _ctx.quotaItem
|
|
173
|
+
}, _ctx.gpuAdvancedFormProps), createSlots({ _: 2 }, [
|
|
174
|
+
_ctx.$slots["assign-gpu-disabled-message"] ? {
|
|
175
|
+
name: "assign-gpu-disabled-message",
|
|
176
|
+
fn: withCtx(() => [
|
|
177
|
+
renderSlot(_ctx.$slots, "assign-gpu-disabled-message")
|
|
178
|
+
]),
|
|
179
|
+
key: "0"
|
|
180
|
+
} : void 0
|
|
181
|
+
]), 1040, ["open-nvidia-vgpu-model", "open-nvidia-assign-gpu", "open-nvidia-vgpu-schedule-policy", "quota"])
|
|
186
182
|
], 64))
|
|
187
183
|
]),
|
|
188
184
|
_: 3
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const yup = require("yup");
|
|
4
|
+
const vueI18n = require("vue-i18n");
|
|
5
|
+
const extend = require("@dao-style/extend");
|
|
6
|
+
const props = require("../../props.js");
|
|
7
|
+
const types = require("../../types.js");
|
|
8
|
+
const GpuResources = require("./GpuResources.vue.js");
|
|
9
|
+
const GpuAdvancedForm = require("./GpuAdvancedForm.vue.js");
|
|
10
|
+
const utils = require("../../utils.js");
|
|
11
|
+
const GpuFormDynamicItem = require("./GpuFormDynamicItem.vue.js");
|
|
12
|
+
const useGpuFormItemState = require("../useGpuFormItemState.js");
|
|
13
|
+
require("../../style/gpu-form-item.scss.js");
|
|
14
|
+
function _interopNamespaceDefault(e) {
|
|
15
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
16
|
+
if (e) {
|
|
17
|
+
for (const k in e) {
|
|
18
|
+
if (k !== "default") {
|
|
19
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
20
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: () => e[k]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
n.default = e;
|
|
28
|
+
return Object.freeze(n);
|
|
29
|
+
}
|
|
30
|
+
const yup__namespace = /* @__PURE__ */ _interopNamespaceDefault(yup);
|
|
31
|
+
const _sfc_main = vue.defineComponent({
|
|
32
|
+
name: "DaoGpuFormItem",
|
|
33
|
+
components: {
|
|
34
|
+
GpuFormDynamicItem,
|
|
35
|
+
DaoFormItemValidate: extend.DaoFormItemValidate,
|
|
36
|
+
GpuResources,
|
|
37
|
+
GpuAdvancedForm,
|
|
38
|
+
DaoHistoryLink: extend.DaoHistoryLink
|
|
39
|
+
},
|
|
40
|
+
props: props.gpuFormItemProps,
|
|
41
|
+
emits: [
|
|
42
|
+
"change",
|
|
43
|
+
"refreshGpuOptionsMap"
|
|
44
|
+
],
|
|
45
|
+
setup(props2, {
|
|
46
|
+
emit: emits,
|
|
47
|
+
slots
|
|
48
|
+
}) {
|
|
49
|
+
const i18nInstance = vueI18n.useI18n();
|
|
50
|
+
const state = useGpuFormItemState.useGpuFormItemState(props2, emits, slots, i18nInstance);
|
|
51
|
+
return {
|
|
52
|
+
...state,
|
|
53
|
+
nvidiaVgpuModelKey: types.nvidiaVgpuModelKey,
|
|
54
|
+
nvidiaVgpuPriorityKey: types.nvidiaVgpuPriorityKey,
|
|
55
|
+
yup: yup__namespace,
|
|
56
|
+
isNvidiaVgpu: utils.isNvidiaVgpu,
|
|
57
|
+
isNvidiaMig: utils.isNvidiaMig
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
module.exports = _sfc_main;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent } from "vue";
|
|
2
|
+
import * as yup from "yup";
|
|
3
|
+
import { useI18n } from "vue-i18n";
|
|
4
|
+
import { DaoFormItemValidate, DaoHistoryLink } from "@dao-style/extend";
|
|
5
|
+
import { gpuFormItemProps } from "../../props.mjs";
|
|
6
|
+
import { nvidiaVgpuModelKey, nvidiaVgpuPriorityKey } from "../../types.mjs";
|
|
7
|
+
import GpuResources from "./GpuResources.vue.mjs";
|
|
8
|
+
import GpuAdvancedForm from "./GpuAdvancedForm.vue.mjs";
|
|
9
|
+
import { isNvidiaVgpu, isNvidiaMig } from "../../utils.mjs";
|
|
10
|
+
import GpuFormDynamicItem from "./GpuFormDynamicItem.vue.mjs";
|
|
11
|
+
import { useGpuFormItemState } from "../useGpuFormItemState.mjs";
|
|
12
|
+
import "../../style/gpu-form-item.scss.mjs";
|
|
13
|
+
const _sfc_main = defineComponent({
|
|
14
|
+
name: "DaoGpuFormItem",
|
|
15
|
+
components: {
|
|
16
|
+
GpuFormDynamicItem,
|
|
17
|
+
DaoFormItemValidate,
|
|
18
|
+
GpuResources,
|
|
19
|
+
GpuAdvancedForm,
|
|
20
|
+
DaoHistoryLink
|
|
21
|
+
},
|
|
22
|
+
props: gpuFormItemProps,
|
|
23
|
+
emits: [
|
|
24
|
+
"change",
|
|
25
|
+
"refreshGpuOptionsMap"
|
|
26
|
+
],
|
|
27
|
+
setup(props, {
|
|
28
|
+
emit: emits,
|
|
29
|
+
slots
|
|
30
|
+
}) {
|
|
31
|
+
const i18nInstance = useI18n();
|
|
32
|
+
const state = useGpuFormItemState(props, emits, slots, i18nInstance);
|
|
33
|
+
return {
|
|
34
|
+
...state,
|
|
35
|
+
nvidiaVgpuModelKey,
|
|
36
|
+
nvidiaVgpuPriorityKey,
|
|
37
|
+
yup,
|
|
38
|
+
isNvidiaVgpu,
|
|
39
|
+
isNvidiaMig
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
_sfc_main as default
|
|
45
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { GPUResourceSetting } from '
|
|
2
|
+
import { GPUResourceSetting } from '../../types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
quota: {
|
|
5
|
-
type: import("vue").PropType<import("
|
|
5
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
6
6
|
};
|
|
7
7
|
quotaItem: {
|
|
8
|
-
type: import("vue").PropType<import("
|
|
8
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
9
9
|
default: () => {};
|
|
10
10
|
};
|
|
11
11
|
isSide: {
|
|
@@ -16,40 +16,50 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
16
|
type: import("vue").PropType<GPUResourceSetting[]>;
|
|
17
17
|
required: boolean;
|
|
18
18
|
};
|
|
19
|
+
gpuProvider: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
19
23
|
enableRangeValidate: {
|
|
20
24
|
type: BooleanConstructor;
|
|
21
25
|
default: boolean;
|
|
22
26
|
};
|
|
23
27
|
availableQuotaItem: {
|
|
24
|
-
type: import("vue").PropType<import("
|
|
28
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
25
29
|
default: undefined;
|
|
26
30
|
};
|
|
27
31
|
usedQuotaItem: {
|
|
28
|
-
type: import("vue").PropType<import("
|
|
32
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
29
33
|
default: undefined;
|
|
30
34
|
};
|
|
35
|
+
gpuUsage: {
|
|
36
|
+
type: import("vue").PropType<import("../../types").GpuUsage>;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
31
39
|
}, {
|
|
32
40
|
getIsIluvatarMemory: (alias?: string) => boolean | undefined;
|
|
33
|
-
|
|
41
|
+
isVgpuMemoryResource: (resource: GPUResourceSetting) => boolean | undefined;
|
|
34
42
|
getResHelper: (available: GPUResourceSetting['available'], key?: string, alias?: string) => string;
|
|
35
|
-
|
|
43
|
+
getSideResUnit: (resource: GPUResourceSetting) => string | undefined;
|
|
36
44
|
resourcePlaceholder: import("vue").ComputedRef<string>;
|
|
37
45
|
getResRequired: (resource: GPUResourceSetting) => boolean;
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
nvidiaVgpuMemory: import("vue").WritableComputedRef<string | number | undefined>;
|
|
47
|
+
vgpuMemoryUnits: readonly ["Gi", "Mi"];
|
|
48
|
+
nvidiaVgpuMemoryUnit: import("vue").WritableComputedRef<"Gi" | "Mi">;
|
|
40
49
|
sanitizeGPUKey: (key?: string | undefined) => string | undefined;
|
|
50
|
+
getResLabel: (resource: GPUResourceSetting) => string;
|
|
51
|
+
getResIconMessage: (resource: GPUResourceSetting) => string;
|
|
52
|
+
isHamiQuota: import("vue").ComputedRef<boolean>;
|
|
41
53
|
yup: typeof yup;
|
|
42
54
|
getResourceYup: (resource: GPUResourceSetting) => yup.default<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
|
|
43
55
|
getNvidiaVgpuMemoryResourceYup: (resource: GPUResourceSetting) => yup.default<number | undefined, import("yup/lib/types").AnyObject, number | undefined>;
|
|
44
|
-
nvidiaVgpuMemoryResource: import("vue").ComputedRef<GPUResourceSetting | undefined>;
|
|
45
|
-
nvidiaVgpuMemoryField: import("vue").ComputedRef<string>;
|
|
46
56
|
getSideValue: (resource: GPUResourceSetting) => string | number;
|
|
47
57
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
48
58
|
quota: {
|
|
49
|
-
type: import("vue").PropType<import("
|
|
59
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
50
60
|
};
|
|
51
61
|
quotaItem: {
|
|
52
|
-
type: import("vue").PropType<import("
|
|
62
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
53
63
|
default: () => {};
|
|
54
64
|
};
|
|
55
65
|
isSide: {
|
|
@@ -60,23 +70,33 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
60
70
|
type: import("vue").PropType<GPUResourceSetting[]>;
|
|
61
71
|
required: boolean;
|
|
62
72
|
};
|
|
73
|
+
gpuProvider: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
default: string;
|
|
76
|
+
};
|
|
63
77
|
enableRangeValidate: {
|
|
64
78
|
type: BooleanConstructor;
|
|
65
79
|
default: boolean;
|
|
66
80
|
};
|
|
67
81
|
availableQuotaItem: {
|
|
68
|
-
type: import("vue").PropType<import("
|
|
82
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
69
83
|
default: undefined;
|
|
70
84
|
};
|
|
71
85
|
usedQuotaItem: {
|
|
72
|
-
type: import("vue").PropType<import("
|
|
86
|
+
type: import("vue").PropType<import("../../types").GpuQuotaItem>;
|
|
73
87
|
default: undefined;
|
|
74
88
|
};
|
|
89
|
+
gpuUsage: {
|
|
90
|
+
type: import("vue").PropType<import("../../types").GpuUsage>;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
75
93
|
}>>, {
|
|
94
|
+
gpuUsage: import("../../types").GpuUsage;
|
|
76
95
|
enableRangeValidate: boolean;
|
|
77
|
-
quotaItem: import("
|
|
96
|
+
quotaItem: import("../../types").GpuQuotaItem;
|
|
78
97
|
isSide: boolean;
|
|
79
|
-
|
|
80
|
-
|
|
98
|
+
gpuProvider: string;
|
|
99
|
+
availableQuotaItem: import("../../types").GpuQuotaItem;
|
|
100
|
+
usedQuotaItem: import("../../types").GpuQuotaItem;
|
|
81
101
|
}>;
|
|
82
102
|
export default _default;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const GpuResources_vue_vue_type_script_lang = require("./GpuResources.vue2.js");
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
5
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
|
+
const _component_dao_icon = vue.resolveComponent("dao-icon");
|
|
7
|
+
const _component_dao_input = vue.resolveComponent("dao-input");
|
|
8
|
+
const _component_dao_option = vue.resolveComponent("dao-option");
|
|
9
|
+
const _component_dao_select = vue.resolveComponent("dao-select");
|
|
10
|
+
const _component_dao_form_item_validate = vue.resolveComponent("dao-form-item-validate");
|
|
11
|
+
const _component_dao_form_item = vue.resolveComponent("dao-form-item");
|
|
12
|
+
return vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.resources, (res) => {
|
|
13
|
+
return vue.openBlock(), vue.createElementBlock(vue.Fragment, {
|
|
14
|
+
key: res.key
|
|
15
|
+
}, [
|
|
16
|
+
!(_ctx.isHamiQuota && res.type === "cardNum") ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
17
|
+
!_ctx.isSide ? (vue.openBlock(), vue.createBlock(_component_dao_form_item_validate, {
|
|
18
|
+
key: 0,
|
|
19
|
+
label: _ctx.getResLabel(res),
|
|
20
|
+
class: vue.normalizeClass(res.unit || _ctx.isVgpuMemoryResource(res) ? "" : "input-without-append"),
|
|
21
|
+
name: `resources.${_ctx.sanitizeGPUKey(res.key)}`,
|
|
22
|
+
"control-props": {
|
|
23
|
+
type: "number",
|
|
24
|
+
append: res.unit,
|
|
25
|
+
placeholder: _ctx.resourcePlaceholder
|
|
26
|
+
},
|
|
27
|
+
helper: _ctx.getResHelper(res.available, res.key, res.alias),
|
|
28
|
+
"icon-message": _ctx.getResIconMessage(res),
|
|
29
|
+
"yup-type": _ctx.yup.number(),
|
|
30
|
+
"yup-concat": _ctx.isVgpuMemoryResource(res) ? _ctx.getNvidiaVgpuMemoryResourceYup(res) : _ctx.getResourceYup(res),
|
|
31
|
+
required: _ctx.getResRequired(res)
|
|
32
|
+
}, vue.createSlots({ _: 2 }, [
|
|
33
|
+
_ctx.getIsIluvatarMemory(res.alias) ? {
|
|
34
|
+
name: "control-content",
|
|
35
|
+
fn: vue.withCtx(({ value, status }) => [
|
|
36
|
+
vue.createVNode(_component_dao_input, {
|
|
37
|
+
modelValue: value.value,
|
|
38
|
+
"onUpdate:modelValue": ($event) => value.value = $event,
|
|
39
|
+
modelModifiers: { number: true },
|
|
40
|
+
type: "number",
|
|
41
|
+
"root-attrs": {
|
|
42
|
+
class: "gpu-quotas-item__iluvatar-memory-input"
|
|
43
|
+
},
|
|
44
|
+
append: "MB",
|
|
45
|
+
status,
|
|
46
|
+
placeholder: _ctx.resourcePlaceholder
|
|
47
|
+
}, {
|
|
48
|
+
prefix: vue.withCtx(() => [
|
|
49
|
+
vue.createTextVNode(" 256 "),
|
|
50
|
+
vue.createVNode(_component_dao_icon, { name: "icon-asterisk" })
|
|
51
|
+
]),
|
|
52
|
+
_: 2
|
|
53
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "status", "placeholder"])
|
|
54
|
+
]),
|
|
55
|
+
key: "0"
|
|
56
|
+
} : _ctx.isVgpuMemoryResource(res) ? {
|
|
57
|
+
name: "control-content",
|
|
58
|
+
fn: vue.withCtx(({ status }) => [
|
|
59
|
+
vue.createVNode(_component_dao_input, {
|
|
60
|
+
modelValue: _ctx.nvidiaVgpuMemory,
|
|
61
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.nvidiaVgpuMemory = $event),
|
|
62
|
+
modelModifiers: { number: true },
|
|
63
|
+
type: "number",
|
|
64
|
+
min: "1",
|
|
65
|
+
step: "1",
|
|
66
|
+
block: "",
|
|
67
|
+
"root-attrs": {
|
|
68
|
+
class: "gpu-quotas-item__vgpu-memory-input"
|
|
69
|
+
},
|
|
70
|
+
status,
|
|
71
|
+
placeholder: _ctx.resourcePlaceholder
|
|
72
|
+
}, {
|
|
73
|
+
append: vue.withCtx(() => [
|
|
74
|
+
vue.createVNode(_component_dao_select, {
|
|
75
|
+
modelValue: _ctx.nvidiaVgpuMemoryUnit,
|
|
76
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.nvidiaVgpuMemoryUnit = $event),
|
|
77
|
+
class: "gpu-quotas-item__vgpu-memory-unit"
|
|
78
|
+
}, {
|
|
79
|
+
default: vue.withCtx(() => [
|
|
80
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.vgpuMemoryUnits, (unit) => {
|
|
81
|
+
return vue.openBlock(), vue.createBlock(_component_dao_option, {
|
|
82
|
+
key: unit,
|
|
83
|
+
value: unit
|
|
84
|
+
}, null, 8, ["value"]);
|
|
85
|
+
}), 128))
|
|
86
|
+
]),
|
|
87
|
+
_: 1
|
|
88
|
+
}, 8, ["modelValue"])
|
|
89
|
+
]),
|
|
90
|
+
_: 2
|
|
91
|
+
}, 1032, ["modelValue", "status", "placeholder"])
|
|
92
|
+
]),
|
|
93
|
+
key: "1"
|
|
94
|
+
} : void 0,
|
|
95
|
+
_ctx.$slots[`helper-${res.key}`] ? {
|
|
96
|
+
name: "helper",
|
|
97
|
+
fn: vue.withCtx(() => [
|
|
98
|
+
vue.renderSlot(_ctx.$slots, `helper-${res.key}`, {
|
|
99
|
+
resource: res,
|
|
100
|
+
quota: _ctx.quota,
|
|
101
|
+
isSide: _ctx.isSide,
|
|
102
|
+
gpuOptions: _ctx.resources
|
|
103
|
+
})
|
|
104
|
+
]),
|
|
105
|
+
key: "2"
|
|
106
|
+
} : void 0
|
|
107
|
+
]), 1032, ["label", "class", "name", "control-props", "helper", "icon-message", "yup-type", "yup-concat", "required"])) : (vue.openBlock(), vue.createBlock(_component_dao_form_item, {
|
|
108
|
+
key: 1,
|
|
109
|
+
label: _ctx.getResLabel(res),
|
|
110
|
+
class: vue.normalizeClass(res.unit || _ctx.isVgpuMemoryResource(res) ? "" : "input-without-append")
|
|
111
|
+
}, vue.createSlots({
|
|
112
|
+
default: vue.withCtx(() => [
|
|
113
|
+
vue.createVNode(_component_dao_input, {
|
|
114
|
+
"model-value": _ctx.getSideValue(res),
|
|
115
|
+
type: "number",
|
|
116
|
+
disabled: "",
|
|
117
|
+
"root-attrs": {
|
|
118
|
+
class: _ctx.getIsIluvatarMemory(res.alias) && "gpu-quotas-item__iluvatar-memory-input"
|
|
119
|
+
},
|
|
120
|
+
append: _ctx.getSideResUnit(res),
|
|
121
|
+
placeholder: _ctx.resourcePlaceholder
|
|
122
|
+
}, vue.createSlots({ _: 2 }, [
|
|
123
|
+
_ctx.getIsIluvatarMemory(res.alias) ? {
|
|
124
|
+
name: "prefix",
|
|
125
|
+
fn: vue.withCtx(() => [
|
|
126
|
+
vue.createTextVNode(" 256 "),
|
|
127
|
+
vue.createVNode(_component_dao_icon, { name: "icon-asterisk" })
|
|
128
|
+
]),
|
|
129
|
+
key: "0"
|
|
130
|
+
} : void 0
|
|
131
|
+
]), 1032, ["model-value", "root-attrs", "append", "placeholder"])
|
|
132
|
+
]),
|
|
133
|
+
_: 2
|
|
134
|
+
}, [
|
|
135
|
+
_ctx.$slots[`helper-${res.key}`] ? {
|
|
136
|
+
name: "helper",
|
|
137
|
+
fn: vue.withCtx(() => [
|
|
138
|
+
vue.renderSlot(_ctx.$slots, `helper-${res.key}`, {
|
|
139
|
+
resource: res,
|
|
140
|
+
quota: _ctx.quota,
|
|
141
|
+
isSide: _ctx.isSide,
|
|
142
|
+
gpuOptions: _ctx.resources
|
|
143
|
+
})
|
|
144
|
+
]),
|
|
145
|
+
key: "0"
|
|
146
|
+
} : void 0
|
|
147
|
+
]), 1032, ["label", "class"]))
|
|
148
|
+
], 64)) : vue.createCommentVNode("", true)
|
|
149
|
+
], 64);
|
|
150
|
+
}), 128);
|
|
151
|
+
}
|
|
152
|
+
const GpuResources = /* @__PURE__ */ _pluginVue_exportHelper(GpuResources_vue_vue_type_script_lang, [["render", _sfc_render]]);
|
|
153
|
+
module.exports = GpuResources;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import _sfc_main from "./GpuResources.vue2.mjs";
|
|
2
|
+
import { resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, normalizeClass, createSlots, withCtx, createVNode, createTextVNode, renderSlot, createCommentVNode } from "vue";
|
|
3
|
+
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_dao_icon = resolveComponent("dao-icon");
|
|
6
|
+
const _component_dao_input = resolveComponent("dao-input");
|
|
7
|
+
const _component_dao_option = resolveComponent("dao-option");
|
|
8
|
+
const _component_dao_select = resolveComponent("dao-select");
|
|
9
|
+
const _component_dao_form_item_validate = resolveComponent("dao-form-item-validate");
|
|
10
|
+
const _component_dao_form_item = resolveComponent("dao-form-item");
|
|
11
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.resources, (res) => {
|
|
12
|
+
return openBlock(), createElementBlock(Fragment, {
|
|
13
|
+
key: res.key
|
|
14
|
+
}, [
|
|
15
|
+
!(_ctx.isHamiQuota && res.type === "cardNum") ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
16
|
+
!_ctx.isSide ? (openBlock(), createBlock(_component_dao_form_item_validate, {
|
|
17
|
+
key: 0,
|
|
18
|
+
label: _ctx.getResLabel(res),
|
|
19
|
+
class: normalizeClass(res.unit || _ctx.isVgpuMemoryResource(res) ? "" : "input-without-append"),
|
|
20
|
+
name: `resources.${_ctx.sanitizeGPUKey(res.key)}`,
|
|
21
|
+
"control-props": {
|
|
22
|
+
type: "number",
|
|
23
|
+
append: res.unit,
|
|
24
|
+
placeholder: _ctx.resourcePlaceholder
|
|
25
|
+
},
|
|
26
|
+
helper: _ctx.getResHelper(res.available, res.key, res.alias),
|
|
27
|
+
"icon-message": _ctx.getResIconMessage(res),
|
|
28
|
+
"yup-type": _ctx.yup.number(),
|
|
29
|
+
"yup-concat": _ctx.isVgpuMemoryResource(res) ? _ctx.getNvidiaVgpuMemoryResourceYup(res) : _ctx.getResourceYup(res),
|
|
30
|
+
required: _ctx.getResRequired(res)
|
|
31
|
+
}, createSlots({ _: 2 }, [
|
|
32
|
+
_ctx.getIsIluvatarMemory(res.alias) ? {
|
|
33
|
+
name: "control-content",
|
|
34
|
+
fn: withCtx(({ value, status }) => [
|
|
35
|
+
createVNode(_component_dao_input, {
|
|
36
|
+
modelValue: value.value,
|
|
37
|
+
"onUpdate:modelValue": ($event) => value.value = $event,
|
|
38
|
+
modelModifiers: { number: true },
|
|
39
|
+
type: "number",
|
|
40
|
+
"root-attrs": {
|
|
41
|
+
class: "gpu-quotas-item__iluvatar-memory-input"
|
|
42
|
+
},
|
|
43
|
+
append: "MB",
|
|
44
|
+
status,
|
|
45
|
+
placeholder: _ctx.resourcePlaceholder
|
|
46
|
+
}, {
|
|
47
|
+
prefix: withCtx(() => [
|
|
48
|
+
createTextVNode(" 256 "),
|
|
49
|
+
createVNode(_component_dao_icon, { name: "icon-asterisk" })
|
|
50
|
+
]),
|
|
51
|
+
_: 2
|
|
52
|
+
}, 1032, ["modelValue", "onUpdate:modelValue", "status", "placeholder"])
|
|
53
|
+
]),
|
|
54
|
+
key: "0"
|
|
55
|
+
} : _ctx.isVgpuMemoryResource(res) ? {
|
|
56
|
+
name: "control-content",
|
|
57
|
+
fn: withCtx(({ status }) => [
|
|
58
|
+
createVNode(_component_dao_input, {
|
|
59
|
+
modelValue: _ctx.nvidiaVgpuMemory,
|
|
60
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.nvidiaVgpuMemory = $event),
|
|
61
|
+
modelModifiers: { number: true },
|
|
62
|
+
type: "number",
|
|
63
|
+
min: "1",
|
|
64
|
+
step: "1",
|
|
65
|
+
block: "",
|
|
66
|
+
"root-attrs": {
|
|
67
|
+
class: "gpu-quotas-item__vgpu-memory-input"
|
|
68
|
+
},
|
|
69
|
+
status,
|
|
70
|
+
placeholder: _ctx.resourcePlaceholder
|
|
71
|
+
}, {
|
|
72
|
+
append: withCtx(() => [
|
|
73
|
+
createVNode(_component_dao_select, {
|
|
74
|
+
modelValue: _ctx.nvidiaVgpuMemoryUnit,
|
|
75
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.nvidiaVgpuMemoryUnit = $event),
|
|
76
|
+
class: "gpu-quotas-item__vgpu-memory-unit"
|
|
77
|
+
}, {
|
|
78
|
+
default: withCtx(() => [
|
|
79
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.vgpuMemoryUnits, (unit) => {
|
|
80
|
+
return openBlock(), createBlock(_component_dao_option, {
|
|
81
|
+
key: unit,
|
|
82
|
+
value: unit
|
|
83
|
+
}, null, 8, ["value"]);
|
|
84
|
+
}), 128))
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
}, 8, ["modelValue"])
|
|
88
|
+
]),
|
|
89
|
+
_: 2
|
|
90
|
+
}, 1032, ["modelValue", "status", "placeholder"])
|
|
91
|
+
]),
|
|
92
|
+
key: "1"
|
|
93
|
+
} : void 0,
|
|
94
|
+
_ctx.$slots[`helper-${res.key}`] ? {
|
|
95
|
+
name: "helper",
|
|
96
|
+
fn: withCtx(() => [
|
|
97
|
+
renderSlot(_ctx.$slots, `helper-${res.key}`, {
|
|
98
|
+
resource: res,
|
|
99
|
+
quota: _ctx.quota,
|
|
100
|
+
isSide: _ctx.isSide,
|
|
101
|
+
gpuOptions: _ctx.resources
|
|
102
|
+
})
|
|
103
|
+
]),
|
|
104
|
+
key: "2"
|
|
105
|
+
} : void 0
|
|
106
|
+
]), 1032, ["label", "class", "name", "control-props", "helper", "icon-message", "yup-type", "yup-concat", "required"])) : (openBlock(), createBlock(_component_dao_form_item, {
|
|
107
|
+
key: 1,
|
|
108
|
+
label: _ctx.getResLabel(res),
|
|
109
|
+
class: normalizeClass(res.unit || _ctx.isVgpuMemoryResource(res) ? "" : "input-without-append")
|
|
110
|
+
}, createSlots({
|
|
111
|
+
default: withCtx(() => [
|
|
112
|
+
createVNode(_component_dao_input, {
|
|
113
|
+
"model-value": _ctx.getSideValue(res),
|
|
114
|
+
type: "number",
|
|
115
|
+
disabled: "",
|
|
116
|
+
"root-attrs": {
|
|
117
|
+
class: _ctx.getIsIluvatarMemory(res.alias) && "gpu-quotas-item__iluvatar-memory-input"
|
|
118
|
+
},
|
|
119
|
+
append: _ctx.getSideResUnit(res),
|
|
120
|
+
placeholder: _ctx.resourcePlaceholder
|
|
121
|
+
}, createSlots({ _: 2 }, [
|
|
122
|
+
_ctx.getIsIluvatarMemory(res.alias) ? {
|
|
123
|
+
name: "prefix",
|
|
124
|
+
fn: withCtx(() => [
|
|
125
|
+
createTextVNode(" 256 "),
|
|
126
|
+
createVNode(_component_dao_icon, { name: "icon-asterisk" })
|
|
127
|
+
]),
|
|
128
|
+
key: "0"
|
|
129
|
+
} : void 0
|
|
130
|
+
]), 1032, ["model-value", "root-attrs", "append", "placeholder"])
|
|
131
|
+
]),
|
|
132
|
+
_: 2
|
|
133
|
+
}, [
|
|
134
|
+
_ctx.$slots[`helper-${res.key}`] ? {
|
|
135
|
+
name: "helper",
|
|
136
|
+
fn: withCtx(() => [
|
|
137
|
+
renderSlot(_ctx.$slots, `helper-${res.key}`, {
|
|
138
|
+
resource: res,
|
|
139
|
+
quota: _ctx.quota,
|
|
140
|
+
isSide: _ctx.isSide,
|
|
141
|
+
gpuOptions: _ctx.resources
|
|
142
|
+
})
|
|
143
|
+
]),
|
|
144
|
+
key: "0"
|
|
145
|
+
} : void 0
|
|
146
|
+
]), 1032, ["label", "class"]))
|
|
147
|
+
], 64)) : createCommentVNode("", true)
|
|
148
|
+
], 64);
|
|
149
|
+
}), 128);
|
|
150
|
+
}
|
|
151
|
+
const GpuResources = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
152
|
+
export {
|
|
153
|
+
GpuResources as default
|
|
154
|
+
};
|