bfg-common 1.0.10 → 1.0.12

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.
@@ -322,13 +322,20 @@ const onChangeNameAndNext = (name: string, node: UI_I_TreeNode): void => {
322
322
  if (hasChanges) checkLocalChangeAndChangeStepStatus()
323
323
 
324
324
  vmForm.value.name = name
325
- vmForm.value.locationPath = $recursion.createAbsolutePathRecursion(
326
- node,
327
- 'id',
328
- 'parent'
329
- )
330
- vmForm.value.dataCenter = $recursion.findParentByValue(node, 'datacenter', 'type', 'parent')
331
- vmFormCash.value.dataCenterId = vmForm.value.dataCenter?.id || null
325
+ if (props.project === 'sphere') {
326
+ vmForm.value.locationPath = $recursion.createAbsolutePathRecursion(
327
+ node,
328
+ 'id',
329
+ 'parent'
330
+ )
331
+ vmForm.value.dataCenter = $recursion.findParentByValue(
332
+ node,
333
+ 'datacenter',
334
+ 'type',
335
+ 'parent'
336
+ )
337
+ vmFormCash.value.dataCenterId = vmForm.value.dataCenter?.id || null
338
+ }
332
339
  onNext(true)
333
340
  }
334
341
  // Для сферы
@@ -412,6 +419,11 @@ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
412
419
  virtualHardwareNetworks.value = data[2]
413
420
  }
414
421
 
422
+ watch(() => props.readyCompleteTableInfo, (newValue) => {
423
+ const localization: UI_I_Localization = useLocal()
424
+ vmForm.value.name = newValue.find(item => item.label === localization.virtualMachineName)?.value || ''
425
+ })
426
+
415
427
  const loading = ref<boolean>(false)
416
428
  const validateSendData = (): void => {
417
429
  loading.value = true
@@ -450,6 +462,8 @@ const onFinish = (): void => {
450
462
  virtualHardwareCdDvdDrives.value,
451
463
  isPowerOnByDefault.value,
452
464
  localization.value,
465
+ vmForm.value.locationPath, // для сферы
466
+ computeResourcePath.value, // для сферы
453
467
  false
454
468
  )
455
469
  .then(() => {
@@ -60,5 +60,6 @@ export type UI_T_AddVmFinishFunc<T = void> = (
60
60
  isPowerOnByDefault: boolean,
61
61
  localization: UI_I_Localization,
62
62
  locationPath?: string, // для сферы
63
- computeResourcePath?: string // для сферы
63
+ computeResourcePath?: string, // для сферы
64
+ isValidation?: boolean
64
65
  ) => Promise<T>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.0.10",
4
+ "version": "1.0.12",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",