bfg-common 1.3.447 → 1.3.448
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/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
-
import {
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
4
4
|
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
5
5
|
// import { UI_I_ReadyDataForLocal } from '~/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces'
|
|
6
6
|
|
|
7
|
-
const constructLunDiskItems = (
|
|
8
|
-
|
|
7
|
+
const constructLunDiskItems = (
|
|
8
|
+
disks: UI_I_CreateStorageLunDiskItem[]
|
|
9
|
+
): string => {
|
|
10
|
+
const { $binary } = useNuxtApp() as any
|
|
9
11
|
|
|
10
12
|
let result = ''
|
|
11
|
-
disks.forEach((disk:
|
|
12
|
-
const capacity = $binary.round(disk.
|
|
13
|
+
disks.forEach((disk: UI_I_CreateStorageLunDiskItem) => {
|
|
14
|
+
const capacity = $binary.round(disk.capacity_mb)
|
|
13
15
|
result += `${disk.name} - ${capacity} \n`
|
|
14
16
|
})
|
|
15
17
|
return result
|
|
@@ -108,7 +110,7 @@ const localDetailsFunc = (
|
|
|
108
110
|
|
|
109
111
|
const sharedStormDetailsFunc = (
|
|
110
112
|
localization: UI_I_Localization,
|
|
111
|
-
data: { name: string; lunDisk:
|
|
113
|
+
data: { name: string; lunDisk: UI_I_CreateStorageLunDiskItem[] } // пока так ставляем тип но надо будет поменять когда будем добавлять осталние настройки
|
|
112
114
|
): UI_I_DetailsItem[] => {
|
|
113
115
|
const { name, lunDisk } = data
|
|
114
116
|
|
|
@@ -40,9 +40,9 @@ import {
|
|
|
40
40
|
UI_T_DatastoreType,
|
|
41
41
|
UI_T_VmfsType,
|
|
42
42
|
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
43
|
-
import {
|
|
43
|
+
import type {
|
|
44
44
|
UI_I_SelectHostOptions,
|
|
45
|
-
|
|
45
|
+
UI_I_CreateStorageLunDiskItem,
|
|
46
46
|
} from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
47
47
|
|
|
48
48
|
const props = defineProps<{
|
|
@@ -57,7 +57,6 @@ const props = defineProps<{
|
|
|
57
57
|
}>()
|
|
58
58
|
const model = defineModel<any>()
|
|
59
59
|
const emits = defineEmits<{
|
|
60
|
-
// (event: 'submit', value: { name: string; lunDisk: string[] }): void
|
|
61
60
|
(event: 'hide-alert', value: boolean): void
|
|
62
61
|
(event: 'main-filter', value: string): void
|
|
63
62
|
}>()
|
|
@@ -70,7 +69,7 @@ const lunDiskTotalCapacity = computed<number>(() => {
|
|
|
70
69
|
if (!model.value.lunDisk.length) return 0
|
|
71
70
|
|
|
72
71
|
return +model.value.lunDisk
|
|
73
|
-
.map((disk) => disk.capacity_mb)
|
|
72
|
+
.map((disk: UI_I_CreateStorageLunDiskItem) => disk.capacity_mb)
|
|
74
73
|
.reduce((acc, cur) => acc + cur)
|
|
75
74
|
})
|
|
76
75
|
</script>
|