@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
|
@@ -4,15 +4,13 @@ const lodashEs = require("lodash-es");
|
|
|
4
4
|
const nvidiaVgpuKey = "nvidia-vgpu";
|
|
5
5
|
const nvidiaGpuKey = "nvidia-gpu";
|
|
6
6
|
const nvidiaVgpuCoreResource = "nvidia.com/vgpu";
|
|
7
|
-
const
|
|
8
|
-
[nvidiaVgpuCoreResource, i18n.t("biz.components.Gpu.nvidiaVgpuTip")],
|
|
9
|
-
["nvidia.com/gpucores", i18n.t("biz.components.Gpu.nvidiaGpucoresTip")]
|
|
10
|
-
]);
|
|
7
|
+
const hamiResOrder = ["cardNum", "cores"];
|
|
11
8
|
const getPriorityOpts = (i18n) => [
|
|
12
9
|
{ label: i18n.t("biz.components.Gpu.lowPriority"), value: "1" },
|
|
13
10
|
{ label: i18n.t("biz.components.Gpu.highPriority"), value: "0" }
|
|
14
11
|
];
|
|
15
12
|
const NividaVgpuModelAnnoKey = "nvidia.com/use-gputype";
|
|
13
|
+
const NividaVgpuDevicesAnnoKey = "nvidia.com/use-gpuuuid";
|
|
16
14
|
const NividaVgpuGpuScheduleAnnoKey = "hami.io/gpu-scheduler-policy";
|
|
17
15
|
const NividaVgpuNodeScheduleAnnoKey = "hami.io/node-scheduler-policy";
|
|
18
16
|
const nvidiaMIGKey = "nvidia-mig";
|
|
@@ -27,11 +25,19 @@ const commonProps = {
|
|
|
27
25
|
type: Object,
|
|
28
26
|
default: void 0
|
|
29
27
|
},
|
|
28
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
30
32
|
// 是否仅能选择提供的 targetType 类型的 GPU
|
|
31
33
|
targetType: {
|
|
32
34
|
type: String,
|
|
33
35
|
default: ""
|
|
34
36
|
},
|
|
37
|
+
gpuUsage: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: "quota"
|
|
40
|
+
},
|
|
35
41
|
// nvidia-gpu 显示远程调用选项
|
|
36
42
|
enableRemoteCall: {
|
|
37
43
|
type: Boolean,
|
|
@@ -51,6 +57,20 @@ const commonProps = {
|
|
|
51
57
|
type: String,
|
|
52
58
|
default: void 0
|
|
53
59
|
},
|
|
60
|
+
// Nvidia Vgpu 是否可以指定 GPU 卡
|
|
61
|
+
enableNvidiaVgpuDevices: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false
|
|
64
|
+
},
|
|
65
|
+
// 是否禁用 Nvidia vGPU 指定 GPU
|
|
66
|
+
assignGpuDisabled: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
nvidiaVgpuDevices: {
|
|
71
|
+
type: Array,
|
|
72
|
+
default: () => []
|
|
73
|
+
},
|
|
54
74
|
// Nvidia vgpu 是否可以指定优先级
|
|
55
75
|
enableNvidiaVgpuPriority: {
|
|
56
76
|
type: Boolean,
|
|
@@ -94,6 +114,11 @@ const gpuFormProps = {
|
|
|
94
114
|
type: String,
|
|
95
115
|
default: void 0
|
|
96
116
|
},
|
|
117
|
+
// 使用者根据当前命名空间生成的剩余可用量页面地址,未提供时不显示入口
|
|
118
|
+
availableQuotaLink: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: void 0
|
|
121
|
+
},
|
|
97
122
|
// 双栏模式,显示已分配的内容
|
|
98
123
|
usedQuota: {
|
|
99
124
|
type: Object,
|
|
@@ -128,9 +153,13 @@ const gpuResourceItemProps = {
|
|
|
128
153
|
default: false
|
|
129
154
|
},
|
|
130
155
|
resources: {
|
|
131
|
-
type:
|
|
156
|
+
type: Array,
|
|
132
157
|
required: true
|
|
133
158
|
},
|
|
159
|
+
gpuProvider: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: ""
|
|
162
|
+
},
|
|
134
163
|
enableRangeValidate: {
|
|
135
164
|
type: Boolean,
|
|
136
165
|
default: false
|
|
@@ -142,6 +171,10 @@ const gpuResourceItemProps = {
|
|
|
142
171
|
usedQuotaItem: {
|
|
143
172
|
type: Object,
|
|
144
173
|
default: void 0
|
|
174
|
+
},
|
|
175
|
+
gpuUsage: {
|
|
176
|
+
type: String,
|
|
177
|
+
default: "quota"
|
|
145
178
|
}
|
|
146
179
|
};
|
|
147
180
|
const gpuAdvancedFormProps = {
|
|
@@ -156,6 +189,14 @@ const gpuAdvancedFormProps = {
|
|
|
156
189
|
type: Boolean,
|
|
157
190
|
default: false
|
|
158
191
|
},
|
|
192
|
+
enableNvidiaVgpuDevices: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: false
|
|
195
|
+
},
|
|
196
|
+
assignGpuDisabled: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
default: false
|
|
199
|
+
},
|
|
159
200
|
enableNvidiaVgpuPriority: {
|
|
160
201
|
type: Boolean,
|
|
161
202
|
default: false
|
|
@@ -165,13 +206,21 @@ const gpuAdvancedFormProps = {
|
|
|
165
206
|
default: void 0
|
|
166
207
|
},
|
|
167
208
|
nvidiaGpuModels: {
|
|
168
|
-
type:
|
|
209
|
+
type: Array,
|
|
169
210
|
required: true
|
|
170
211
|
},
|
|
212
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
213
|
+
type: Object,
|
|
214
|
+
default: void 0
|
|
215
|
+
},
|
|
171
216
|
isSide: {
|
|
172
217
|
type: Boolean,
|
|
173
218
|
default: false
|
|
174
219
|
},
|
|
220
|
+
openNvidiaAssignGpu: {
|
|
221
|
+
type: Boolean,
|
|
222
|
+
default: false
|
|
223
|
+
},
|
|
175
224
|
openNvidiaVgpuModel: {
|
|
176
225
|
type: Boolean,
|
|
177
226
|
default: false
|
|
@@ -180,7 +229,7 @@ const gpuAdvancedFormProps = {
|
|
|
180
229
|
type: Boolean,
|
|
181
230
|
default: false
|
|
182
231
|
},
|
|
183
|
-
|
|
232
|
+
openNvidiaVgpuSchedulePolicy: {
|
|
184
233
|
type: Boolean,
|
|
185
234
|
default: false
|
|
186
235
|
}
|
|
@@ -195,13 +244,17 @@ const gpuFormItemProps = {
|
|
|
195
244
|
required: true
|
|
196
245
|
},
|
|
197
246
|
nvidiaGpuModels: {
|
|
198
|
-
type:
|
|
247
|
+
type: Array,
|
|
199
248
|
required: true
|
|
200
249
|
},
|
|
201
250
|
getDisplayResource: {
|
|
202
251
|
type: Function,
|
|
203
252
|
required: true
|
|
204
253
|
},
|
|
254
|
+
nvidiaGpuDevices: {
|
|
255
|
+
type: Array,
|
|
256
|
+
default: () => []
|
|
257
|
+
},
|
|
205
258
|
...lodashEs.omit(gpuResourceItemProps, "quota", "resources"),
|
|
206
259
|
...commonProps
|
|
207
260
|
};
|
|
@@ -237,16 +290,36 @@ const dynamicGpuFormItemProps = {
|
|
|
237
290
|
default: false
|
|
238
291
|
}
|
|
239
292
|
};
|
|
293
|
+
const assignGpuDevicesListProps = {
|
|
294
|
+
modelValue: {
|
|
295
|
+
type: Array,
|
|
296
|
+
default: () => []
|
|
297
|
+
},
|
|
298
|
+
disabled: {
|
|
299
|
+
type: Boolean,
|
|
300
|
+
default: false
|
|
301
|
+
},
|
|
302
|
+
id: {
|
|
303
|
+
type: String,
|
|
304
|
+
default: "assign-gpu-devices-list"
|
|
305
|
+
},
|
|
306
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
307
|
+
type: Object,
|
|
308
|
+
default: void 0
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
exports.NividaVgpuDevicesAnnoKey = NividaVgpuDevicesAnnoKey;
|
|
240
312
|
exports.NividaVgpuGpuScheduleAnnoKey = NividaVgpuGpuScheduleAnnoKey;
|
|
241
313
|
exports.NividaVgpuModelAnnoKey = NividaVgpuModelAnnoKey;
|
|
242
314
|
exports.NividaVgpuNodeScheduleAnnoKey = NividaVgpuNodeScheduleAnnoKey;
|
|
315
|
+
exports.assignGpuDevicesListProps = assignGpuDevicesListProps;
|
|
243
316
|
exports.dynamicGpuFormItemProps = dynamicGpuFormItemProps;
|
|
244
|
-
exports.getNvidiaVgpuResOrder = getNvidiaVgpuResOrder;
|
|
245
317
|
exports.getPriorityOpts = getPriorityOpts;
|
|
246
318
|
exports.gpuAdvancedFormProps = gpuAdvancedFormProps;
|
|
247
319
|
exports.gpuFormItemProps = gpuFormItemProps;
|
|
248
320
|
exports.gpuFormProps = gpuFormProps;
|
|
249
321
|
exports.gpuResourceItemProps = gpuResourceItemProps;
|
|
322
|
+
exports.hamiResOrder = hamiResOrder;
|
|
250
323
|
exports.nvidiaGpuKey = nvidiaGpuKey;
|
|
251
324
|
exports.nvidiaMIGKey = nvidiaMIGKey;
|
|
252
325
|
exports.nvidiaVgpuCoreResource = nvidiaVgpuCoreResource;
|
|
@@ -2,15 +2,13 @@ import { omit } from "lodash-es";
|
|
|
2
2
|
const nvidiaVgpuKey = "nvidia-vgpu";
|
|
3
3
|
const nvidiaGpuKey = "nvidia-gpu";
|
|
4
4
|
const nvidiaVgpuCoreResource = "nvidia.com/vgpu";
|
|
5
|
-
const
|
|
6
|
-
[nvidiaVgpuCoreResource, i18n.t("biz.components.Gpu.nvidiaVgpuTip")],
|
|
7
|
-
["nvidia.com/gpucores", i18n.t("biz.components.Gpu.nvidiaGpucoresTip")]
|
|
8
|
-
]);
|
|
5
|
+
const hamiResOrder = ["cardNum", "cores"];
|
|
9
6
|
const getPriorityOpts = (i18n) => [
|
|
10
7
|
{ label: i18n.t("biz.components.Gpu.lowPriority"), value: "1" },
|
|
11
8
|
{ label: i18n.t("biz.components.Gpu.highPriority"), value: "0" }
|
|
12
9
|
];
|
|
13
10
|
const NividaVgpuModelAnnoKey = "nvidia.com/use-gputype";
|
|
11
|
+
const NividaVgpuDevicesAnnoKey = "nvidia.com/use-gpuuuid";
|
|
14
12
|
const NividaVgpuGpuScheduleAnnoKey = "hami.io/gpu-scheduler-policy";
|
|
15
13
|
const NividaVgpuNodeScheduleAnnoKey = "hami.io/node-scheduler-policy";
|
|
16
14
|
const nvidiaMIGKey = "nvidia-mig";
|
|
@@ -25,11 +23,19 @@ const commonProps = {
|
|
|
25
23
|
type: Object,
|
|
26
24
|
default: void 0
|
|
27
25
|
},
|
|
26
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
28
30
|
// 是否仅能选择提供的 targetType 类型的 GPU
|
|
29
31
|
targetType: {
|
|
30
32
|
type: String,
|
|
31
33
|
default: ""
|
|
32
34
|
},
|
|
35
|
+
gpuUsage: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "quota"
|
|
38
|
+
},
|
|
33
39
|
// nvidia-gpu 显示远程调用选项
|
|
34
40
|
enableRemoteCall: {
|
|
35
41
|
type: Boolean,
|
|
@@ -49,6 +55,20 @@ const commonProps = {
|
|
|
49
55
|
type: String,
|
|
50
56
|
default: void 0
|
|
51
57
|
},
|
|
58
|
+
// Nvidia Vgpu 是否可以指定 GPU 卡
|
|
59
|
+
enableNvidiaVgpuDevices: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
// 是否禁用 Nvidia vGPU 指定 GPU
|
|
64
|
+
assignGpuDisabled: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
nvidiaVgpuDevices: {
|
|
69
|
+
type: Array,
|
|
70
|
+
default: () => []
|
|
71
|
+
},
|
|
52
72
|
// Nvidia vgpu 是否可以指定优先级
|
|
53
73
|
enableNvidiaVgpuPriority: {
|
|
54
74
|
type: Boolean,
|
|
@@ -92,6 +112,11 @@ const gpuFormProps = {
|
|
|
92
112
|
type: String,
|
|
93
113
|
default: void 0
|
|
94
114
|
},
|
|
115
|
+
// 使用者根据当前命名空间生成的剩余可用量页面地址,未提供时不显示入口
|
|
116
|
+
availableQuotaLink: {
|
|
117
|
+
type: String,
|
|
118
|
+
default: void 0
|
|
119
|
+
},
|
|
95
120
|
// 双栏模式,显示已分配的内容
|
|
96
121
|
usedQuota: {
|
|
97
122
|
type: Object,
|
|
@@ -126,9 +151,13 @@ const gpuResourceItemProps = {
|
|
|
126
151
|
default: false
|
|
127
152
|
},
|
|
128
153
|
resources: {
|
|
129
|
-
type:
|
|
154
|
+
type: Array,
|
|
130
155
|
required: true
|
|
131
156
|
},
|
|
157
|
+
gpuProvider: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: ""
|
|
160
|
+
},
|
|
132
161
|
enableRangeValidate: {
|
|
133
162
|
type: Boolean,
|
|
134
163
|
default: false
|
|
@@ -140,6 +169,10 @@ const gpuResourceItemProps = {
|
|
|
140
169
|
usedQuotaItem: {
|
|
141
170
|
type: Object,
|
|
142
171
|
default: void 0
|
|
172
|
+
},
|
|
173
|
+
gpuUsage: {
|
|
174
|
+
type: String,
|
|
175
|
+
default: "quota"
|
|
143
176
|
}
|
|
144
177
|
};
|
|
145
178
|
const gpuAdvancedFormProps = {
|
|
@@ -154,6 +187,14 @@ const gpuAdvancedFormProps = {
|
|
|
154
187
|
type: Boolean,
|
|
155
188
|
default: false
|
|
156
189
|
},
|
|
190
|
+
enableNvidiaVgpuDevices: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: false
|
|
193
|
+
},
|
|
194
|
+
assignGpuDisabled: {
|
|
195
|
+
type: Boolean,
|
|
196
|
+
default: false
|
|
197
|
+
},
|
|
157
198
|
enableNvidiaVgpuPriority: {
|
|
158
199
|
type: Boolean,
|
|
159
200
|
default: false
|
|
@@ -163,13 +204,21 @@ const gpuAdvancedFormProps = {
|
|
|
163
204
|
default: void 0
|
|
164
205
|
},
|
|
165
206
|
nvidiaGpuModels: {
|
|
166
|
-
type:
|
|
207
|
+
type: Array,
|
|
167
208
|
required: true
|
|
168
209
|
},
|
|
210
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
211
|
+
type: Object,
|
|
212
|
+
default: void 0
|
|
213
|
+
},
|
|
169
214
|
isSide: {
|
|
170
215
|
type: Boolean,
|
|
171
216
|
default: false
|
|
172
217
|
},
|
|
218
|
+
openNvidiaAssignGpu: {
|
|
219
|
+
type: Boolean,
|
|
220
|
+
default: false
|
|
221
|
+
},
|
|
173
222
|
openNvidiaVgpuModel: {
|
|
174
223
|
type: Boolean,
|
|
175
224
|
default: false
|
|
@@ -178,7 +227,7 @@ const gpuAdvancedFormProps = {
|
|
|
178
227
|
type: Boolean,
|
|
179
228
|
default: false
|
|
180
229
|
},
|
|
181
|
-
|
|
230
|
+
openNvidiaVgpuSchedulePolicy: {
|
|
182
231
|
type: Boolean,
|
|
183
232
|
default: false
|
|
184
233
|
}
|
|
@@ -193,13 +242,17 @@ const gpuFormItemProps = {
|
|
|
193
242
|
required: true
|
|
194
243
|
},
|
|
195
244
|
nvidiaGpuModels: {
|
|
196
|
-
type:
|
|
245
|
+
type: Array,
|
|
197
246
|
required: true
|
|
198
247
|
},
|
|
199
248
|
getDisplayResource: {
|
|
200
249
|
type: Function,
|
|
201
250
|
required: true
|
|
202
251
|
},
|
|
252
|
+
nvidiaGpuDevices: {
|
|
253
|
+
type: Array,
|
|
254
|
+
default: () => []
|
|
255
|
+
},
|
|
203
256
|
...omit(gpuResourceItemProps, "quota", "resources"),
|
|
204
257
|
...commonProps
|
|
205
258
|
};
|
|
@@ -235,17 +288,37 @@ const dynamicGpuFormItemProps = {
|
|
|
235
288
|
default: false
|
|
236
289
|
}
|
|
237
290
|
};
|
|
291
|
+
const assignGpuDevicesListProps = {
|
|
292
|
+
modelValue: {
|
|
293
|
+
type: Array,
|
|
294
|
+
default: () => []
|
|
295
|
+
},
|
|
296
|
+
disabled: {
|
|
297
|
+
type: Boolean,
|
|
298
|
+
default: false
|
|
299
|
+
},
|
|
300
|
+
id: {
|
|
301
|
+
type: String,
|
|
302
|
+
default: "assign-gpu-devices-list"
|
|
303
|
+
},
|
|
304
|
+
nvidiaVgpuDevicesAdaptor: {
|
|
305
|
+
type: Object,
|
|
306
|
+
default: void 0
|
|
307
|
+
}
|
|
308
|
+
};
|
|
238
309
|
export {
|
|
310
|
+
NividaVgpuDevicesAnnoKey,
|
|
239
311
|
NividaVgpuGpuScheduleAnnoKey,
|
|
240
312
|
NividaVgpuModelAnnoKey,
|
|
241
313
|
NividaVgpuNodeScheduleAnnoKey,
|
|
314
|
+
assignGpuDevicesListProps,
|
|
242
315
|
dynamicGpuFormItemProps,
|
|
243
|
-
getNvidiaVgpuResOrder,
|
|
244
316
|
getPriorityOpts,
|
|
245
317
|
gpuAdvancedFormProps,
|
|
246
318
|
gpuFormItemProps,
|
|
247
319
|
gpuFormProps,
|
|
248
320
|
gpuResourceItemProps,
|
|
321
|
+
hamiResOrder,
|
|
249
322
|
nvidiaGpuKey,
|
|
250
323
|
nvidiaMIGKey,
|
|
251
324
|
nvidiaVgpuCoreResource,
|