bfg-common 1.5.537 → 1.5.539

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.
Files changed (30) hide show
  1. package/assets/localization/local_be.json +1 -1
  2. package/assets/localization/local_en.json +1 -1
  3. package/assets/localization/local_hy.json +1 -1
  4. package/assets/localization/local_kk.json +1 -1
  5. package/assets/localization/local_ru.json +1 -1
  6. package/assets/localization/local_zh.json +1 -1
  7. package/assets/scss/clarity/local_ar.json +1 -1
  8. package/components/common/pages/backups/modals/restore/networks/Networks.vue +1 -1
  9. package/components/common/vm/actions/add/Add.vue +3 -2
  10. package/components/common/vm/actions/add/New.vue +3 -2
  11. package/components/common/vm/actions/add/Old.vue +5 -3
  12. package/components/common/vm/actions/clone/Clone.vue +3 -2
  13. package/components/common/vm/actions/clone/new/New.vue +50 -47
  14. package/components/common/vm/actions/clone/old/Old.vue +3 -3
  15. package/components/common/vm/actions/common/select/storage/Old.vue +125 -132
  16. package/components/common/vm/actions/common/select/storage/Storage.vue +178 -167
  17. package/components/common/vm/actions/common/select/storage/new/New.vue +311 -330
  18. package/components/common/vm/actions/register/Register.vue +5 -5
  19. package/components/common/wizards/common/{steps/computeResource/compatibility → compatibility}/Compatibility.vue +7 -3
  20. package/components/common/wizards/common/{steps/computeResource/compatibility → compatibility}/New.vue +2 -1
  21. package/components/common/wizards/common/{steps/computeResource/compatibility → compatibility}/Old.vue +4 -5
  22. package/components/common/wizards/common/{steps/computeResource/compatibility → compatibility}/lib/models/enums.ts +1 -1
  23. package/components/common/wizards/common/compatibility/lib/models/types.ts +1 -0
  24. package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +2 -1
  25. package/components/common/wizards/common/steps/computeResource/New.vue +3 -2
  26. package/components/common/wizards/common/steps/computeResource/Old.vue +3 -2
  27. package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -195
  28. package/components/common/wizards/vm/migrate/select/network/Network.vue +1 -1
  29. package/components/common/wizards/vm/migrate/select/storage/Storage.vue +1 -1
  30. package/package.json +1 -1
@@ -72,6 +72,7 @@ import type { UI_T_Project } from '~/lib/models/types'
72
72
  import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
73
73
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
74
74
  import type { UI_I_NameTestIds } from '~/components/common/wizards/common/steps/name/lib/models/interfaces'
75
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
75
76
  import {
76
77
  dynamicSteps,
77
78
  stepsFunc,
@@ -87,7 +88,6 @@ const props = withDefaults(
87
88
  nameRequestUrl: string
88
89
  isLoadingComputeTree?: boolean // для сферы
89
90
  computeResourceAlert?: string[] // для сферы
90
- compatibilityText?: [string, string] // для сферы
91
91
  dataCenter?: UI_I_TreeNode | null // для сферы
92
92
  computeResourceTree?: UI_I_TreeNode[] // для сферы
93
93
  locationNodes?: UI_I_TreeNode[] // для сферы
@@ -95,7 +95,6 @@ const props = withDefaults(
95
95
  {
96
96
  isLoadingComputeTree: false,
97
97
  computeResourceAlert: () => [],
98
- compatibilityText: () => [],
99
98
  dataCenter: null,
100
99
  computeResourceTree: undefined,
101
100
  locationNodes: () => [],
@@ -216,7 +215,7 @@ const onCheckName = async (
216
215
  }
217
216
  })
218
217
  }
219
- const compatibilityText = computed<[string, string]>(() => {
218
+ const compatibilityText = computed<[UI_T_CompatibilityStatus, string]>(() => {
220
219
  const { computeResource } = vmForm.value
221
220
 
222
221
  if (!computeResource)
@@ -225,7 +224,7 @@ const compatibilityText = computed<[string, string]>(() => {
225
224
  localization.value.vmWizard.noDestinationComputeResourceSelected,
226
225
  ]
227
226
 
228
- let res: [string, string] = [
227
+ let res: [UI_T_CompatibilityStatus, string] = [
229
228
  'success',
230
229
  localization.value.common.compatibilityChecksSucceeded,
231
230
  ]
@@ -334,7 +333,8 @@ const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
334
333
  emits('select-compute-resource-tree', node)
335
334
  }
336
335
 
337
- const computeResourceTreeLocal = computed<UI_I_TreeNode | null>(() => { // для сферы
336
+ const computeResourceTreeLocal = computed<UI_I_TreeNode | null>(() => {
337
+ // для сферы
338
338
  return props.computeResourceTree?.[0] || null
339
339
  })
340
340
  </script>
@@ -1,11 +1,11 @@
1
1
  <template>
2
- <common-wizards-common-steps-compute-resource-compatibility-new
2
+ <common-wizards-common-compatibility-new
3
3
  v-if="isNewView"
4
4
  :status="props.status"
5
5
  :text="props.text"
6
6
  :loading="props.loading"
7
7
  />
8
- <common-wizards-common-steps-compute-resource-compatibility-old
8
+ <common-wizards-common-compatibility-old
9
9
  v-else
10
10
  :status="props.status"
11
11
  :text="props.text"
@@ -13,10 +13,14 @@
13
13
  </template>
14
14
 
15
15
  <script lang="ts" setup>
16
+ import type {
17
+ UI_T_CompatibilityStatus
18
+ } from "~/components/common/wizards/common/compatibility/lib/models/types";
19
+
16
20
  const props = withDefaults(
17
21
  defineProps<{
18
22
  text: string
19
- status: 'success' | 'warning' | 'error' | 'none'
23
+ status: UI_T_CompatibilityStatus
20
24
  loading?: boolean
21
25
  }>(),
22
26
  {
@@ -35,11 +35,12 @@
35
35
 
36
36
  <script lang="ts" setup>
37
37
  import type { UI_I_Localization } from '~/lib/models/interfaces'
38
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
38
39
 
39
40
  const props = withDefaults(
40
41
  defineProps<{
41
42
  text: string
42
- status: 'success' | 'warning' | 'error' | 'none'
43
+ status: UI_T_CompatibilityStatus
43
44
  loading?: boolean
44
45
  }>(),
45
46
  {
@@ -16,18 +16,17 @@
16
16
 
17
17
  <script lang="ts" setup>
18
18
  import type { UI_I_Localization } from '~/lib/models/interfaces'
19
- import {
20
- UI_E_ValidationCompatibilityStatusIcon
21
- } from "~/components/common/wizards/common/steps/computeResource/compatibility/lib/models/enums";
19
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
20
+ import { UI_E_CompatibilityStatusIcon } from '~/components/common/wizards/common/compatibility/lib/models/enums'
22
21
 
23
22
  const props = defineProps<{
24
23
  text: string
25
- status: 'success' | 'warning' | 'error' | 'none'
24
+ status: UI_T_CompatibilityStatus
26
25
  }>()
27
26
 
28
27
  const localization = computed<UI_I_Localization>(() => useLocal())
29
28
  const iconStatus = computed<string>(
30
- () => UI_E_ValidationCompatibilityStatusIcon[props.status]
29
+ () => UI_E_CompatibilityStatusIcon[props.status]
31
30
  )
32
31
  </script>
33
32
 
@@ -1,4 +1,4 @@
1
- export enum UI_E_ValidationCompatibilityStatusIcon {
1
+ export enum UI_E_CompatibilityStatusIcon {
2
2
  success = 'icon-status-ok',
3
3
  warning = 'vsphere-icon-status-warning',
4
4
  error = 'vsphere-icon-status-error',
@@ -0,0 +1 @@
1
+ export type UI_T_CompatibilityStatus = 'success' | 'warning' | 'error' | 'none';
@@ -21,6 +21,7 @@
21
21
 
22
22
  <script lang="ts" setup>
23
23
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
24
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
24
25
 
25
26
  const { $store, $recursion }: any = useNuxtApp()
26
27
 
@@ -30,7 +31,7 @@ const computeResourceLocal = defineModel<UI_I_TreeNode | null>({
30
31
  const props = defineProps<{
31
32
  node: UI_I_TreeNode | null
32
33
  alertMessages: string[]
33
- compatibilityText: [string, string]
34
+ compatibilityText: [UI_T_CompatibilityStatus, string]
34
35
  isLoading: boolean
35
36
  }>()
36
37
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
@@ -18,7 +18,7 @@
18
18
  </ui-tree>
19
19
  </div>
20
20
 
21
- <common-wizards-common-steps-compute-resource-compatibility
21
+ <common-wizards-common-compatibility
22
22
  :loading="props.isLoading"
23
23
  :status="props.compatibility[0]"
24
24
  :text="props.compatibility[1]"
@@ -28,11 +28,12 @@
28
28
 
29
29
  <script setup lang="ts">
30
30
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
31
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
31
32
 
32
33
  const props = withDefaults(
33
34
  defineProps<{
34
35
  nodes: UI_I_TreeNode[]
35
- compatibility: [string, string]
36
+ compatibility: [UI_T_CompatibilityStatus, string]
36
37
  isLoading?: boolean
37
38
  }>(),
38
39
  {
@@ -25,7 +25,7 @@
25
25
  />
26
26
  </div>
27
27
 
28
- <common-wizards-common-steps-compute-resource-compatibility
28
+ <common-wizards-common-compatibility
29
29
  :loading="props.isLoading"
30
30
  :status="props.compatibility[0]"
31
31
  :text="props.compatibility[1]"
@@ -35,12 +35,13 @@
35
35
 
36
36
  <script setup lang="ts">
37
37
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
38
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
38
39
 
39
40
  const props = withDefaults(
40
41
  defineProps<{
41
42
  nodes: UI_I_TreeNode[]
42
43
  alertMessages: string[]
43
- compatibility: [string, string]
44
+ compatibility: [UI_T_CompatibilityStatus, string]
44
45
  isLoading?: boolean
45
46
  }>(),
46
47
  {
@@ -1,195 +1,205 @@
1
- <template>
2
- <div class="compute-resource">
3
- <atoms-alert
4
- v-show="props.alertMessages?.length"
5
- :items="props.alertMessages"
6
- test-id="compute-resource-alert"
7
- status="alert-danger"
8
- @remove="onHideAlert"
9
- />
10
-
11
- <div
12
- v-if="model.migrate_type === 'resource-storage'"
13
- class="tree-view-wrap mt-1"
14
- >
15
- <common-wizards-vm-common-compute-resource-tree-view
16
- v-model="model.resource.selectedNode"
17
- :compute-resource-tree="nodes"
18
- @show-compute-resource-tree="onShowComputeResourceTree"
19
- @select-compute-resource-tree="onSelectComputeResourceTree"
20
- />
21
- </div>
22
-
23
- <template v-else>
24
- <atoms-tabs
25
- v-model="activeTab"
26
- :items="selectStorageTabs"
27
- test-id="migrate-select-storage-tabs"
28
- size="small"
29
- class="compute-resource__tabs"
30
- />
31
-
32
- <common-wizards-vm-migrate-select-compute-resource-table-view
33
- v-model="selectedTableDataKeys[activeTab]"
34
- :type="activeTab"
35
- :data-table="props.computeResourceData?.items || []"
36
- :total-items="props.computeResourceData?.total_items || 0"
37
- :total-pages="props.computeResourceData?.total_pages || 1"
38
- :get-compute-resource-data="props.getComputeResourceData"
39
- />
40
- </template>
41
-
42
- <common-wizards-common-steps-compute-resource-compatibility
43
- :loading="!model.resource.selectedNode"
44
- :status="compatibilityText[0]"
45
- :text="compatibilityText[1]"
46
- />
47
- </div>
48
- </template>
49
-
50
- <script lang="ts" setup>
51
- import type { UI_I_Localization } from '~/lib/models/interfaces'
52
- import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
53
- import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
54
- import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
55
- import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
56
- import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
57
- import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
58
- import { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/enums'
59
- import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel'
60
-
61
- const props = withDefaults(
62
- defineProps<{
63
- alertMessages: string[]
64
- getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
65
- computeResourceData: any
66
- computeResourceTree: UI_I_TreeNode | null
67
- vmState?: number
68
- }>(),
69
- {
70
- vmState: undefined,
71
- }
72
- )
73
- const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
74
- const emits = defineEmits<{
75
- (event: 'hide-alert', value: number): void
76
- (event: 'next-step', value: any): void
77
- }>()
78
-
79
- const localization = computed<UI_I_Localization>(() => useLocal())
80
- const { $recursion }: any = useNuxtApp()
81
-
82
- const activeTab = ref<UI_T_SelectComputeResourceTabType>('host')
83
- const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
84
- vmMigrateComputeResourceTabsFunc(localization.value, props.vmState || -1)
85
- )
86
-
87
- const selectedTableDataKeys = ref<UI_I_SelectedTableDataKeys>({
88
- host: null,
89
- cluster: null,
90
- 'resource-pool': null,
91
- 'v-apps': null,
92
- })
93
- watch(
94
- selectedTableDataKeys,
95
- (newValue) => {
96
- if (!props.computeResourceData?.items.length) return
97
-
98
- const data = props.computeResourceData.items.find(
99
- (_: never, key: number) => newValue[activeTab.value] === key
100
- )
101
- if (data) {
102
- const dataKeys = UI_E_ComputeResourceTabKamelKeys[activeTab.value]
103
- model.value.resource[dataKeys] = data
104
- model.value.resource.selectedNode = data
105
- }
106
- },
107
- { immediate: true, deep: true }
108
- )
109
-
110
- const nodes = ref<UI_I_TreeNode[]>([])
111
- watch(
112
- props.computeResourceTree,
113
- (newValue) => {
114
- if (nodes.value.length) return
115
-
116
- nodes.value = useDeepCopy([newValue])
117
- },
118
- { immediate: true, deep: true }
119
- )
120
-
121
- const onShowComputeResourceTree = ({
122
- node,
123
- cb,
124
- }: {
125
- node: UI_I_TreeNode
126
- cb: () => void
127
- }): void => {
128
- $recursion.findAndShow(
129
- nodes.value,
130
- [node.id, node.type],
131
- ['id', 'type'],
132
- 'nodes'
133
- )
134
- cb()
135
- }
136
- const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
137
- $recursion.findAndActivate(
138
- nodes.value,
139
- [node.type, node.id],
140
- ['type', 'id'],
141
- 'nodes'
142
- )
143
- }
144
- const compatibilityText = computed<[string, string]>(() => {
145
- const { selectedNode } = model.value.resource
146
-
147
- if (!selectedNode) return ['none', '']
148
-
149
- let res: [string, string] = ['success', localization.value.common.compatibilityChecksSucceeded]
150
-
151
- if (selectedNode.type === 'datacenter' || selectedNode.type === 'folder') {
152
- res = ['error', localization.value.common.selectValidClusterOrHostDestination]
153
- }
154
- if (selectedNode.type === 'cluster') {
155
- const hasHost = !!selectedNode.nodes.length
156
- if (!hasHost) {
157
- res = ['error', localization.value.common.clusterNotContainAnyHosts]
158
- }
159
- }
160
-
161
- if (selectedNode.type === 'host') {
162
- if (selectedNode.state === 'Error') {
163
- // TODO check Maintenance Mode
164
- res = ['error', localization.value.common.selectedHostDisconnectedMaintenanceMode]
165
- }
166
- }
167
-
168
- return res
169
- })
170
- const onHideAlert = (): void => {
171
- emits('hide-alert', 3)
172
- }
173
- </script>
174
-
175
- <style lang="scss" scoped>
176
- @import 'assets/scss/common/mixins';
177
- .compute-resource {
178
- @include flex($dir: column);
179
- height: inherit;
180
- .tree-view-wrap {
181
- max-height: 250px;
182
- min-height: 200px;
183
- position: relative;
184
- border: 1px solid #000;
185
- padding: 5px 0 0 5px;
186
- overflow: auto;
187
- }
188
- &__tabs {
189
- width: 100%;
190
- :deep(.nav) {
191
- margin-top: 0;
192
- }
193
- }
194
- }
195
- </style>
1
+ <template>
2
+ <div class="compute-resource">
3
+ <atoms-alert
4
+ v-show="props.alertMessages?.length"
5
+ :items="props.alertMessages"
6
+ test-id="compute-resource-alert"
7
+ status="alert-danger"
8
+ @remove="onHideAlert"
9
+ />
10
+
11
+ <div
12
+ v-if="model.migrate_type === 'resource-storage'"
13
+ class="tree-view-wrap mt-1"
14
+ >
15
+ <common-wizards-vm-common-compute-resource-tree-view
16
+ v-model="model.resource.selectedNode"
17
+ :compute-resource-tree="nodes"
18
+ @show-compute-resource-tree="onShowComputeResourceTree"
19
+ @select-compute-resource-tree="onSelectComputeResourceTree"
20
+ />
21
+ </div>
22
+
23
+ <template v-else>
24
+ <atoms-tabs
25
+ v-model="activeTab"
26
+ :items="selectStorageTabs"
27
+ test-id="migrate-select-storage-tabs"
28
+ size="small"
29
+ class="compute-resource__tabs"
30
+ />
31
+
32
+ <common-wizards-vm-migrate-select-compute-resource-table-view
33
+ v-model="selectedTableDataKeys[activeTab]"
34
+ :type="activeTab"
35
+ :data-table="props.computeResourceData?.items || []"
36
+ :total-items="props.computeResourceData?.total_items || 0"
37
+ :total-pages="props.computeResourceData?.total_pages || 1"
38
+ :get-compute-resource-data="props.getComputeResourceData"
39
+ />
40
+ </template>
41
+
42
+ <common-wizards-common-compatibility
43
+ :loading="!model.resource.selectedNode"
44
+ :status="compatibilityText[0]"
45
+ :text="compatibilityText[1]"
46
+ />
47
+ </div>
48
+ </template>
49
+
50
+ <script lang="ts" setup>
51
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
52
+ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
53
+ import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
54
+ import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
55
+ import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
56
+ import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
57
+ import type { UI_I_SelectedTableDataKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
58
+ import type { UI_T_CompatibilityStatus } from '~/components/common/wizards/common/compatibility/lib/models/types'
59
+ import { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/enums'
60
+ import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/config/tabsPannel'
61
+
62
+ const props = withDefaults(
63
+ defineProps<{
64
+ alertMessages: string[]
65
+ getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
66
+ computeResourceData: any
67
+ computeResourceTree: UI_I_TreeNode | null
68
+ vmState?: number
69
+ }>(),
70
+ {
71
+ vmState: undefined,
72
+ }
73
+ )
74
+ const model = defineModel<UI_I_MigrateFormLocal>({ required: true })
75
+ const emits = defineEmits<{
76
+ (event: 'hide-alert', value: number): void
77
+ (event: 'next-step', value: any): void
78
+ }>()
79
+
80
+ const localization = computed<UI_I_Localization>(() => useLocal())
81
+ const { $recursion }: any = useNuxtApp()
82
+
83
+ const activeTab = ref<UI_T_SelectComputeResourceTabType>('host')
84
+ const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
85
+ vmMigrateComputeResourceTabsFunc(localization.value, props.vmState || -1)
86
+ )
87
+
88
+ const selectedTableDataKeys = ref<UI_I_SelectedTableDataKeys>({
89
+ host: null,
90
+ cluster: null,
91
+ 'resource-pool': null,
92
+ 'v-apps': null,
93
+ })
94
+ watch(
95
+ selectedTableDataKeys,
96
+ (newValue) => {
97
+ if (!props.computeResourceData?.items.length) return
98
+
99
+ const data = props.computeResourceData.items.find(
100
+ (_: never, key: number) => newValue[activeTab.value] === key
101
+ )
102
+ if (data) {
103
+ const dataKeys = UI_E_ComputeResourceTabKamelKeys[activeTab.value]
104
+ model.value.resource[dataKeys] = data
105
+ model.value.resource.selectedNode = data
106
+ }
107
+ },
108
+ { immediate: true, deep: true }
109
+ )
110
+
111
+ const nodes = ref<UI_I_TreeNode[]>([])
112
+ watch(
113
+ props.computeResourceTree,
114
+ (newValue) => {
115
+ if (nodes.value.length) return
116
+
117
+ nodes.value = useDeepCopy([newValue])
118
+ },
119
+ { immediate: true, deep: true }
120
+ )
121
+
122
+ const onShowComputeResourceTree = ({
123
+ node,
124
+ cb,
125
+ }: {
126
+ node: UI_I_TreeNode
127
+ cb: () => void
128
+ }): void => {
129
+ $recursion.findAndShow(
130
+ nodes.value,
131
+ [node.id, node.type],
132
+ ['id', 'type'],
133
+ 'nodes'
134
+ )
135
+ cb()
136
+ }
137
+ const onSelectComputeResourceTree = (node: UI_I_TreeNode): void => {
138
+ $recursion.findAndActivate(
139
+ nodes.value,
140
+ [node.type, node.id],
141
+ ['type', 'id'],
142
+ 'nodes'
143
+ )
144
+ }
145
+ const compatibilityText = computed<[UI_T_CompatibilityStatus, string]>(() => {
146
+ const { selectedNode } = model.value.resource
147
+
148
+ if (!selectedNode) return ['none', '']
149
+
150
+ let res: [UI_T_CompatibilityStatus, string] = [
151
+ 'success',
152
+ localization.value.common.compatibilityChecksSucceeded,
153
+ ]
154
+
155
+ if (selectedNode.type === 'datacenter' || selectedNode.type === 'folder') {
156
+ res = [
157
+ 'error',
158
+ localization.value.common.selectValidClusterOrHostDestination,
159
+ ]
160
+ }
161
+ if (selectedNode.type === 'cluster') {
162
+ const hasHost = !!selectedNode.nodes.length
163
+ if (!hasHost) {
164
+ res = ['error', localization.value.common.clusterNotContainAnyHosts]
165
+ }
166
+ }
167
+
168
+ if (selectedNode.type === 'host') {
169
+ if (selectedNode.state === 'Error') {
170
+ // TODO check Maintenance Mode
171
+ res = [
172
+ 'error',
173
+ localization.value.common.selectedHostDisconnectedMaintenanceMode,
174
+ ]
175
+ }
176
+ }
177
+
178
+ return res
179
+ })
180
+ const onHideAlert = (): void => {
181
+ emits('hide-alert', 3)
182
+ }
183
+ </script>
184
+
185
+ <style lang="scss" scoped>
186
+ @import 'assets/scss/common/mixins';
187
+ .compute-resource {
188
+ @include flex($dir: column);
189
+ height: inherit;
190
+ .tree-view-wrap {
191
+ max-height: 250px;
192
+ min-height: 200px;
193
+ position: relative;
194
+ border: 1px solid #000;
195
+ padding: 5px 0 0 5px;
196
+ overflow: auto;
197
+ }
198
+ &__tabs {
199
+ width: 100%;
200
+ :deep(.nav) {
201
+ margin-top: 0;
202
+ }
203
+ }
204
+ }
205
+ </style>
@@ -10,7 +10,7 @@
10
10
  :source-networks="sourceNetworks"
11
11
  />
12
12
 
13
- <common-wizards-common-steps-compute-resource-compatibility
13
+ <common-wizards-common-compatibility
14
14
  :loading="false"
15
15
  :text="localization.common.compatibilityChecksSucceeded"
16
16
  status="success"
@@ -54,7 +54,7 @@
54
54
  @update-selected-per-disks="onChangePerDiskStorage"
55
55
  />
56
56
 
57
- <common-wizards-common-steps-compute-resource-compatibility
57
+ <common-wizards-common-compatibility
58
58
  :loading="!model.storage"
59
59
  :text="localization.common.compatibilityChecksSucceeded"
60
60
  status="success"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.537",
4
+ "version": "1.5.539",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",