bfg-common 1.2.127 → 1.2.128

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 (27) hide show
  1. package/assets/localization/local_be.json +5 -1
  2. package/assets/localization/local_en.json +5 -1
  3. package/assets/localization/local_hy.json +5 -1
  4. package/assets/localization/local_kk.json +5 -1
  5. package/assets/localization/local_ru.json +5 -1
  6. package/assets/localization/local_zh.json +5 -1
  7. package/components/common/diagramMain/DiagramMain.vue +1 -0
  8. package/components/common/diagramMain/modals/MigrateVmkernelAdapter.vue +69 -1
  9. package/components/common/diagramMain/modals/steps/ConnectionSettings.vue +16 -1
  10. package/components/common/diagramMain/modals/steps/Header.vue +60 -0
  11. package/components/common/diagramMain/modals/steps/SelectVmkernelAdapter.vue +2 -3
  12. package/components/common/diagramMain/modals/steps/VmkernelAdapterReadyComplete.vue +14 -11
  13. package/components/common/diagramMain/modals/viewSettings/Info.vue +29 -2
  14. package/components/common/wizards/vm/common/{Tooltip.vue → tooltip/Tooltip.vue} +1 -1
  15. package/components/common/wizards/vm/common/validation/compatibility/Compatibility.vue +53 -0
  16. package/components/common/wizards/vm/migrate/Migrate.vue +12 -0
  17. package/components/common/wizards/vm/migrate/models/interfaces.ts +3 -0
  18. package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +38 -0
  19. package/components/common/wizards/vm/migrate/select/computeResource/config/tabsPannel.ts +28 -0
  20. package/components/common/wizards/vm/migrate/select/network/Network.vue +9 -0
  21. package/components/common/wizards/vm/migrate/select/priority/Priority.vue +38 -0
  22. package/components/common/wizards/vm/migrate/select/priority/config/typeOptions.ts +21 -0
  23. package/components/common/wizards/vm/migrate/select/storage/Storage.vue +3 -25
  24. package/components/common/wizards/vm/migrate/select/storage/models/types.ts +6 -0
  25. package/components/common/wizards/vm/migrate/select/type/config/typeOptions.ts +1 -1
  26. package/components/common/wizards/vm/migrate/utils.ts +13 -58
  27. package/package.json +1 -1
@@ -2105,5 +2105,9 @@
2105
2105
  "changeComputeResourceOriginalStorage": "Змяніць вылічальны рэсурс. ",
2106
2106
  "changeStorageComputeResource": "Змяніць сховішча. ",
2107
2107
  "changeComputeResourceAndStorage": "Змяніць вылічальны рэсурс і сховішча",
2108
- "vmOrigin": "Паходжанне ВМ"
2108
+ "vmOrigin": "Паходжанне ВМ",
2109
+ "scheduleVMotionWithHighPriority": "Запланаваць vMotion з высокім прыярытэтам (рэкамендуецца)",
2110
+ "scheduleVMotionWithHighPriorityDesc": "vMotion атрымлівае больш высокія перавагі планавання працэсара ў параўнанні са звычайнымі прыярытэтнымі міграцыямі. ",
2111
+ "scheduleNormalVMotion": "Расклад звычайнага vMotion",
2112
+ "scheduleNormalVMotionDesc": "vMotion атрымлівае больш нізкія перавагі планавання працэсара ў параўнанні з высокапрыярытэтнымі міграцыямі. "
2109
2113
  }
@@ -2108,5 +2108,9 @@
2108
2108
  "changeComputeResourceOriginalStorage": "Change compute resource. Leave VM on the original storage",
2109
2109
  "changeStorageComputeResource": "Change storage. Leave VM on the original compute resource",
2110
2110
  "changeComputeResourceAndStorage": "Change compute resource and storage",
2111
- "vmOrigin": "VM origin"
2111
+ "vmOrigin": "VM origin",
2112
+ "scheduleVMotionWithHighPriority": "Schedule vMotion with high priority (recommended)",
2113
+ "scheduleVMotionWithHighPriorityDesc": "vMotion receives higher CPU scheduling preference relative to normal priority migrations. vMotion might complete more quickly.",
2114
+ "scheduleNormalVMotion": "Schedule normal vMotion",
2115
+ "scheduleNormalVMotionDesc": "vMotion receives lower CPU scheduling preference relative to high priority migrations. You can extend vMotion duration."
2112
2116
  }
@@ -2108,5 +2108,9 @@
2108
2108
  "changeComputeResourceOriginalStorage": "Փոխել հաշվողական ռեսուրսը: ",
2109
2109
  "changeStorageComputeResource": "Փոխել պահեստը: ",
2110
2110
  "changeComputeResourceAndStorage": "Փոխել հաշվողական ռեսուրսը և պահեստը",
2111
- "vmOrigin": "VM ծագումը"
2111
+ "vmOrigin": "VM ծագումը",
2112
+ "scheduleVMotionWithHighPriority": "Պլանավորեք vMotion-ը բարձր առաջնահերթությամբ (խորհուրդ է տրվում)",
2113
+ "scheduleVMotionWithHighPriorityDesc": "vMotion-ը ստանում է պրոցեսորի պլանավորման ավելի բարձր նախապատվություն՝ համեմատած սովորական առաջնահերթ միգրացիայի հետ: ",
2114
+ "scheduleNormalVMotion": "Պլանավորեք նորմալ vMotion",
2115
+ "scheduleNormalVMotionDesc": "vMotion-ը ստանում է ավելի ցածր պրոցեսորի պլանավորման նախապատվություն՝ համեմատած բարձր առաջնահերթ միգրացիայի հետ: "
2112
2116
  }
@@ -2108,5 +2108,9 @@
2108
2108
  "changeComputeResourceOriginalStorage": "Есептеу ресурсын өзгерту. ",
2109
2109
  "changeStorageComputeResource": "Жадты өзгерту. ",
2110
2110
  "changeComputeResourceAndStorage": "Есептеу ресурсын және жадын өзгерту",
2111
- "vmOrigin": "VM шығу тегі"
2111
+ "vmOrigin": "VM шығу тегі",
2112
+ "scheduleVMotionWithHighPriority": "vMotion бағдарламасын жоғары басымдықпен жоспарлаңыз (ұсынылады)",
2113
+ "scheduleVMotionWithHighPriorityDesc": "vMotion қалыпты басымдықты тасымалдауларға қатысты жоғары CPU жоспарлау артықшылығын алады. ",
2114
+ "scheduleNormalVMotion": "Қалыпты vMotion кестесін жасаңыз",
2115
+ "scheduleNormalVMotionDesc": "vMotion жоғары басымдықты тасымалдауларға қатысты төменірек CPU жоспарлау артықшылығын алады. "
2112
2116
  }
@@ -2108,5 +2108,9 @@
2108
2108
  "changeComputeResourceOriginalStorage": "Измените вычислительный ресурс. ",
2109
2109
  "changeStorageComputeResource": "Измените хранилище. ",
2110
2110
  "changeComputeResourceAndStorage": "Изменение вычислительного ресурса и хранилища",
2111
- "vmOrigin": "Происхождение виртуальной машины"
2111
+ "vmOrigin": "Происхождение виртуальной машины",
2112
+ "scheduleVMotionWithHighPriority": "Запланируйте vMotion с высоким приоритетом (рекомендуется)",
2113
+ "scheduleVMotionWithHighPriorityDesc": "vMotion получает более высокий приоритет планирования ЦП по сравнению с миграциями с обычным приоритетом. ",
2114
+ "scheduleNormalVMotion": "Расписание обычного vMotion",
2115
+ "scheduleNormalVMotionDesc": "vMotion получает более низкое предпочтение планирования ЦП по сравнению с миграциями с высоким приоритетом. "
2112
2116
  }
@@ -2108,5 +2108,9 @@
2108
2108
  "changeComputeResourceOriginalStorage": "更改计算资源。",
2109
2109
  "changeStorageComputeResource": "改变存储。",
2110
2110
  "changeComputeResourceAndStorage": "更改计算资源和存储",
2111
- "vmOrigin": "虚拟机起源"
2111
+ "vmOrigin": "虚拟机起源",
2112
+ "scheduleVMotionWithHighPriority": "以高优先级安排 vMotion(推荐)",
2113
+ "scheduleVMotionWithHighPriorityDesc": "相对于正常优先级迁移,vMotion 接收更高的 CPU 调度优先级。 ",
2114
+ "scheduleNormalVMotion": "安排正常 vMotion",
2115
+ "scheduleNormalVMotionDesc": "相对于高优先级迁移,vMotion 接收较低的 CPU 调度首选项。"
2112
2116
  }
@@ -224,6 +224,7 @@
224
224
  :networks-list="props.networksList"
225
225
  :switch-networks="diagramData.networks"
226
226
  :show="isShowMigrateVmkernelAdapterModal"
227
+ :is-dark-mode="props.isDarkMode"
227
228
  @hide="onHideMigrateVmkernelAdapterModal"
228
229
  />
229
230
  </template>
@@ -5,7 +5,12 @@
5
5
  :height="props.height || '420px'"
6
6
  :show="props.show"
7
7
  :title="props.title"
8
- class="with-underline"
8
+ :class="[
9
+ 'with-underline migrate-vm-kernel-modal',
10
+ {
11
+ 'is-dark': props.isDarkMode,
12
+ },
13
+ ]"
9
14
  @hide="onHideViewSettingsModal"
10
15
  >
11
16
  <template #modalBody>
@@ -124,6 +129,7 @@ const props = withDefaults(
124
129
  switchName?: string
125
130
  networksList?: UI_I_NetworkFull[]
126
131
  switchNetworks?: UI_I_NetworkFull[]
132
+ isDarkMode: boolean
127
133
  }>(),
128
134
  {
129
135
  switchName: '',
@@ -532,4 +538,66 @@ const onHideViewSettingsModal = (): void => {
532
538
  display: inline;
533
539
  }
534
540
  }
541
+
542
+ .migrate-vm-kernel-modal.is-dark {
543
+ :deep(.wizard-content-container) {
544
+ .ready-complete-container {
545
+ background-color: var(--pannel-bg-color);
546
+ margin-top: 12px;
547
+
548
+ span {
549
+ color: var(--description-color);
550
+ }
551
+ }
552
+
553
+ .property-label-group {
554
+ color: var(--main-color-mode2);
555
+ }
556
+ .flex-property-label-group {
557
+ color: var(--main-color-mode2);
558
+ }
559
+ .flex-property-value-group {
560
+ select {
561
+ color: #fff;
562
+ }
563
+ }
564
+ .wizard-content-header-area .title {
565
+ color: #adbbc4;
566
+ }
567
+ }
568
+ }
569
+
570
+ :root.dark-theme {
571
+ .step-item {
572
+ // 1-Selected
573
+ &.status-1 {
574
+ background-color: var(--vertical-nav-active-bg-color);
575
+ color: var(--vertical-steps-active-color);
576
+ }
577
+ // 2-Active
578
+ &.status-2 {
579
+ color: var(--vertical-steps-active-color);
580
+ &:hover {
581
+ color: var(--vertical-nav-item-color);
582
+ background-color: var(--vertical-nav-hover-bg-color);
583
+ border-bottom: 1px solid var(--vertical-nav-hover-border-color);
584
+ }
585
+ }
586
+ // 3-Complete
587
+ &.status-3 {
588
+ color: var(--vertical-steps-active-color);
589
+ &:hover {
590
+ color: var(--vertical-nav-item-color);
591
+ background-color: var(--vertical-nav-hover-bg-color);
592
+ border-bottom: 1px solid var(--vertical-nav-hover-border-color);
593
+ }
594
+ }
595
+ // 4-ActiveSelected
596
+ &.status-4 {
597
+ background-color: var(--vertical-nav-active-bg-color);
598
+ color: var(--vertical-steps-active-color);
599
+ border-bottom: 1px solid transparent;
600
+ }
601
+ }
602
+ }
535
603
  </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="wizard-content-container add-networking-step">
3
- <common-add-networking-steps-header
3
+ <common-diagram-main-modals-steps-header
4
4
  :title="props.title"
5
5
  :text="props.text"
6
6
  />
@@ -204,3 +204,18 @@ onUnmounted(() => {
204
204
  emits('hide-error-message-alert')
205
205
  })
206
206
  </script>
207
+
208
+ <style scoped lang="scss">
209
+ .wizard-content-container {
210
+ display: flex;
211
+ flex-direction: column;
212
+ align-items: stretch;
213
+ flex: 1 1 100%;
214
+ box-sizing: border-box;
215
+ padding: 16px 15px 10px 10px;
216
+ overflow-y: auto;
217
+ color: #333;
218
+ order: 2;
219
+ width: 100%;
220
+ }
221
+ </style>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div class="wizard-content-header-area">
3
+ <div>
4
+ <div class="title">
5
+ {{ props.title }}
6
+ </div>
7
+ <div class="description">
8
+ {{ props.text }}
9
+ </div>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ // Props from up
16
+
17
+ const props = defineProps<{
18
+ title: string
19
+ text: string
20
+ }>()
21
+ </script>
22
+
23
+ <style scoped lang="scss">
24
+ .wizard-content-header-area {
25
+ flex-shrink: 0;
26
+ width: inherit;
27
+ height: auto;
28
+ background-color: transparent;
29
+ padding-bottom: 3px;
30
+ border-bottom: 1px solid #a6a6a6;
31
+ }
32
+
33
+ .wizard-content-header-area {
34
+ display: flex;
35
+ //padding-top: 12px;
36
+
37
+ .description {
38
+ color: #333333;
39
+ font-size: 13px;
40
+ }
41
+
42
+ .title {
43
+ font-weight: 700;
44
+ font-size: 13px;
45
+ margin: 0;
46
+ color: #333;
47
+ }
48
+
49
+ .description,
50
+ .select {
51
+ flex: 1 1 100%;
52
+ margin-right: 5px;
53
+ }
54
+
55
+ :deep(select) {
56
+ background-color: transparent;
57
+ border-color: var(--type-list-border-color);
58
+ }
59
+ }
60
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <div class="wizard-content-container add-networking-step">
3
- <common-add-networking-steps-header
2
+ <div class="wizard-content-container">
3
+ <common-diagram-main-modals-steps-header
4
4
  :title="props.title"
5
5
  :text="props.text"
6
6
  />
@@ -195,7 +195,6 @@ onUnmounted(() => {
195
195
  box-sizing: border-box;
196
196
  padding: 16px 15px 10px 10px;
197
197
  overflow-y: auto;
198
- background-color: #fff;
199
198
  color: #333;
200
199
  order: 2;
201
200
  width: 100%;
@@ -1,17 +1,19 @@
1
1
  <template>
2
2
  <div class="wizard-content-container">
3
- <common-add-networking-steps-header
3
+ <common-diagram-main-modals-steps-header
4
4
  :title="props.title"
5
5
  :text="props.text"
6
6
  />
7
- <template
8
- v-for="viewSettingsField in viewSettingsFields"
9
- :key="viewSettingsField.id"
10
- >
11
- <common-diagram-main-modals-view-settings
12
- :view-settings-field="viewSettingsField"
13
- />
14
- </template>
7
+ <div class="ready-complete-container">
8
+ <template
9
+ v-for="viewSettingsField in viewSettingsFields"
10
+ :key="viewSettingsField.id"
11
+ >
12
+ <common-diagram-main-modals-view-settings
13
+ :view-settings-field="viewSettingsField"
14
+ />
15
+ </template>
16
+ </div>
15
17
  </div>
16
18
  </template>
17
19
 
@@ -30,7 +32,9 @@ const props = defineProps<{
30
32
  const localization = computed<UI_I_Localization>(() => useLocal())
31
33
 
32
34
  // View settings fields data
33
- const viewSettingsFields = computed(() => createMigrateVmkernelAdapterSchemeReadyCompleteFunc(localization.value))
35
+ const viewSettingsFields = computed(() =>
36
+ createMigrateVmkernelAdapterSchemeReadyCompleteFunc(localization.value)
37
+ )
34
38
  </script>
35
39
 
36
40
  <style scoped lang="scss">
@@ -42,7 +46,6 @@ const viewSettingsFields = computed(() => createMigrateVmkernelAdapterSchemeRead
42
46
  box-sizing: border-box;
43
47
  padding: 16px 15px 10px 10px;
44
48
  overflow-y: auto;
45
- background-color: #fff;
46
49
  color: #333;
47
50
  order: 2;
48
51
  width: 100%;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div v-if="props.show">
2
+ <div v-if="props.show" class="info-container">
3
3
  <atoms-nav-bar
4
4
  v-if="props.modalTabs && props.modalTabs.length > 0"
5
5
  v-model="selectedTabViewSettings"
@@ -83,7 +83,7 @@ const viewSettingsTabContent = (tab: number): UI_I_ViewSettingsFields[] =>
83
83
  )
84
84
  </script>
85
85
 
86
- <style scoped lang="scss">
86
+ <style lang="scss">
87
87
  .table-fixed-height {
88
88
  min-height: 287px;
89
89
  max-height: 287px;
@@ -93,4 +93,31 @@ const viewSettingsTabContent = (tab: number): UI_I_ViewSettingsFields[] =>
93
93
  max-height: 312px;
94
94
  }
95
95
  }
96
+
97
+ :root.dark-theme {
98
+ .info-container {
99
+ background-color: var(--pannel-bg-color);
100
+ color: var(--main-color-mode2);
101
+
102
+ &:has(.no-items-selected-container) {
103
+ background-color: transparent;
104
+ }
105
+
106
+ td span {
107
+ color: var(--main-color-mode2);
108
+ }
109
+
110
+ button span {
111
+ color: var(--main-color-mode2);
112
+
113
+ &:hover:not(.disabled) {
114
+ background-color: transparent;
115
+ }
116
+ }
117
+
118
+ button.active span {
119
+ color: #fff;
120
+ }
121
+ }
122
+ }
96
123
  </style>
@@ -48,7 +48,7 @@ const isShowFindHelp = ref<boolean>(false)
48
48
  </script>
49
49
 
50
50
  <style lang="scss" scoped>
51
- @import 'assets/scss/common/mixins';
51
+ @import '../../../../../../assets/scss/common/mixins';
52
52
  .sign-post {
53
53
  @include flex($align: center);
54
54
  padding-left: 6px;
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <div class="compatibility">
3
+ <p class="compatibility__title">{{ localization.compatibility }}</p>
4
+ <div class="flex-align-center compatibility__content">
5
+ <template v-if="!props.loading">
6
+ <div class="compatibility__message">
7
+ <div class="icon icon-status-ok" />
8
+ <span>{{ localization.compatibilityChecksSucceeded }}</span>
9
+ </div>
10
+ </template>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import type { UI_I_Localization } from '~/models/interfaces'
17
+
18
+ const props = withDefaults(
19
+ defineProps<{
20
+ loading?: boolean
21
+ }>(),
22
+ {
23
+ loading: true,
24
+ }
25
+ )
26
+
27
+ const localization = computed<UI_I_Localization>(() => useLocal())
28
+ </script>
29
+
30
+ <style lang="scss" scoped>
31
+ @import 'assets/scss/common/mixins';
32
+ .compatibility {
33
+ padding-top: 10px;
34
+
35
+ &__title {
36
+ }
37
+
38
+ &__content {
39
+ align-items: self-start;
40
+ border: 1px solid #000;
41
+ padding-top: 5px;
42
+ padding-left: 5px;
43
+ overflow: auto;
44
+ min-height: 75px;
45
+ }
46
+ &__message {
47
+ @include flex($align: center);
48
+ .icon {
49
+ margin-right: 5px;
50
+ }
51
+ }
52
+ }
53
+ </style>
@@ -28,6 +28,10 @@
28
28
  :project="props.project"
29
29
  />
30
30
 
31
+ <common-wizards-vm-migrate-select-compute-resource
32
+ v-show="currentBlockId === 'select-compute-resource'"
33
+ />
34
+
31
35
  <common-wizards-vm-migrate-select-storage
32
36
  v-show="currentBlockId === 'select-storage'"
33
37
  :submit="selectStorageSubmit"
@@ -37,6 +41,14 @@
37
41
  :configure-per-disks="props.configurePerDisks"
38
42
  @next-step="onSelectStorageAndNext"
39
43
  />
44
+
45
+ <common-wizards-vm-migrate-select-network
46
+ v-show="currentBlockId === 'select-networks'"
47
+ />
48
+
49
+ <common-wizards-vm-migrate-select-priority
50
+ v-show="currentBlockId === 'select-motion-priority'"
51
+ />
40
52
  </div>
41
53
 
42
54
  <common-wizards-vm-common-ready-complete
@@ -2,9 +2,12 @@ import type { UI_I_VerticalStepItem } from '~/components/atoms/models/interfaces
2
2
  import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/models/interfaces'
3
3
  import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/models/types'
4
4
  import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
5
+ import type { UI_T_Project } from '~/models/types'
5
6
 
6
7
  export interface UI_I_MigrateVerticalStepItem extends UI_I_VerticalStepItem {
7
8
  id: string
9
+ project: UI_T_Project[]
10
+
8
11
  permissions?: UI_T_VmMigrateType[]
9
12
  }
10
13
 
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="compute-resource">
3
+ <atoms-tabs
4
+ v-model="activeTab"
5
+ test-id="migrate-select-storage-tabs"
6
+ :items="selectStorageTabs"
7
+ size="small"
8
+ class="compute-resource__tabs"
9
+ />
10
+
11
+ <common-wizards-vm-common-validation-compatibility />
12
+ </div>
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import type { UI_I_Localization } from '~/models/interfaces'
17
+ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
18
+ import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
19
+ import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/config/tabsPannel'
20
+
21
+ const localization = computed<UI_I_Localization>(() => useLocal())
22
+
23
+ const activeTab = ref<UI_T_SelectComputeResourceTabType>('host')
24
+ const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
25
+ vmMigrateComputeResourceTabsFunc(localization.value)
26
+ )
27
+ </script>
28
+
29
+ <style lang="scss" scoped>
30
+ .compute-resource {
31
+ &__tabs {
32
+ width: 100%;
33
+ :deep(.nav) {
34
+ margin-top: 0;
35
+ }
36
+ }
37
+ }
38
+ </style>
@@ -0,0 +1,28 @@
1
+ import type { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
3
+ export const vmMigrateComputeResourceTabsFunc = (
4
+ localization: UI_I_Localization
5
+ ): UI_I_CollapseNavItem[] => {
6
+ return [
7
+ {
8
+ text: localization.hosts,
9
+ value: 'host',
10
+ disabled: false,
11
+ },
12
+ {
13
+ text: localization.clusters,
14
+ value: 'cluster',
15
+ disabled: false,
16
+ },
17
+ {
18
+ text: localization.resourcePools,
19
+ value: 'resource-pool',
20
+ disabled: false,
21
+ },
22
+ {
23
+ text: localization.vApps,
24
+ value: 'v-apps',
25
+ disabled: false,
26
+ },
27
+ ]
28
+ }
@@ -0,0 +1,9 @@
1
+ <template>
2
+ <div class="select-network">
3
+ <common-wizards-vm-common-validation-compatibility />
4
+ </div>
5
+ </template>
6
+
7
+ <script lang="ts" setup></script>
8
+
9
+ <style lang="scss" scoped></style>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="select-priority">
3
+ <common-select-radio-group
4
+ v-model="selectedPriorityType"
5
+ :options="vmMigrationPriorityTypes"
6
+ />
7
+ </div>
8
+ </template>
9
+
10
+ <script lang="ts" setup>
11
+ import type { UI_I_Localization } from '~/models/interfaces'
12
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/models/interfaces'
13
+ import { vmMigrateSelectPriorityTypesFunc } from '~/components/common/wizards/vm/migrate/select/priority/config/typeOptions'
14
+
15
+ const props = defineProps<{
16
+ modelValue: string
17
+ }>()
18
+ const emits = defineEmits<{
19
+ (event: 'update:model-value', value: string | number): void
20
+ }>()
21
+
22
+ const localization = computed<UI_I_Localization>(() => useLocal())
23
+
24
+ const vmMigrationPriorityTypes = computed<UI_I_RadioOption[]>(() =>
25
+ vmMigrateSelectPriorityTypesFunc(localization.value)
26
+ )
27
+
28
+ const selectedPriorityType = computed<string>({
29
+ get() {
30
+ return props.modelValue
31
+ },
32
+ set(newValue: string) {
33
+ emits('update:model-value', newValue)
34
+ },
35
+ })
36
+ </script>
37
+
38
+ <style lang="scss" scoped></style>
@@ -0,0 +1,21 @@
1
+ import type { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/models/interfaces'
3
+
4
+ export const vmMigrateSelectPriorityTypesFunc = (
5
+ localization: UI_I_Localization
6
+ ): UI_I_RadioOption[] => {
7
+ return [
8
+ {
9
+ label: localization.scheduleVMotionWithHighPriority,
10
+ value: 'high-priority',
11
+ disabled: false,
12
+ description: localization.scheduleVMotionWithHighPriorityDesc,
13
+ },
14
+ {
15
+ label: localization.scheduleNormalVMotion,
16
+ value: 'schedule-normal',
17
+ disabled: false,
18
+ description: localization.scheduleNormalVMotionDesc,
19
+ },
20
+ ]
21
+ }
@@ -33,20 +33,9 @@
33
33
  @update-selected-per-disks="selectedPerDisks = $event"
34
34
  />
35
35
 
36
- <div class="compatibility-wrap">
37
- <p class="compatibility">
38
- {{ localization.compatibility }}
39
- </p>
40
- <div class="compatibility-message flex-align-center">
41
- <template v-if="dataLocal.storage">
42
- <div class="icon-status-ok" />
43
- <span>{{ localization.compatibilityChecksSucceeded }}</span>
44
- </template>
45
- <div v-else>
46
- <br />
47
- </div>
48
- </div>
49
- </div>
36
+ <common-wizards-vm-common-validation-compatibility
37
+ :loading="!dataLocal.storage"
38
+ />
50
39
  </div>
51
40
  </template>
52
41
 
@@ -122,15 +111,4 @@ watch(
122
111
  }
123
112
  }
124
113
  }
125
-
126
- .compatibility-wrap {
127
- padding-top: 10px;
128
-
129
- .compatibility-message {
130
- border: 1px solid #000;
131
- padding-top: 5px;
132
- padding-left: 5px;
133
- overflow: auto;
134
- }
135
- }
136
114
  </style>
@@ -1,3 +1,9 @@
1
1
  export type UI_T_VmMigrateSelectStorageTab =
2
2
  | 'batch-configure'
3
3
  | 'configure-disk'
4
+
5
+ export type UI_T_SelectComputeResourceTabType =
6
+ | 'host'
7
+ | 'cluster'
8
+ | 'resource-pool'
9
+ | 'v-apps'
@@ -31,7 +31,7 @@ export const vmMigrateTypesFunc = (
31
31
  {
32
32
  label: localization.crossVCenterServerExport,
33
33
  value: 'server',
34
- disabled: true,
34
+ disabled: false,
35
35
  description: localization.crossVCenterServerExportDesc,
36
36
  permissions: ['sphere'],
37
37
  },
@@ -7,60 +7,6 @@ export const stepItemsFunc = (
7
7
  localization: UI_I_Localization,
8
8
  type: UI_T_VmMigrateType,
9
9
  project: UI_T_Project
10
- ): UI_I_MigrateVerticalStepItem[] => {
11
- const stepsType = {
12
- sphere: stepForSphere,
13
- procurator: stepForProcurator,
14
- }
15
-
16
- return stepsType[project](localization, type)
17
- }
18
-
19
- const stepForSphere = (
20
- localization: UI_I_Localization
21
- ): UI_I_MigrateVerticalStepItem[] => {
22
- return [
23
- {
24
- text: localization.selectName,
25
- disabled: false,
26
- complete: false,
27
- description: '',
28
- id: '',
29
- },
30
- {
31
- text: localization.selectStorage,
32
- disabled: true,
33
- complete: false,
34
- description: '',
35
- id: '',
36
- },
37
- {
38
- text: localization.selectCloneOptions,
39
- disabled: true,
40
- complete: false,
41
- description: '',
42
- id: '',
43
- },
44
- {
45
- text: localization.customizeHardware,
46
- disabled: true,
47
- complete: false,
48
- description: '',
49
- id: '',
50
- },
51
- {
52
- text: localization.readyComplete,
53
- disabled: true,
54
- complete: false,
55
- description: '',
56
- id: '',
57
- },
58
- ]
59
- }
60
-
61
- const stepForProcurator = (
62
- localization: UI_I_Localization,
63
- type: UI_T_VmMigrateType
64
10
  ): UI_I_MigrateVerticalStepItem[] => {
65
11
  const stepItems: UI_I_MigrateVerticalStepItem[] = [
66
12
  {
@@ -68,6 +14,7 @@ const stepForProcurator = (
68
14
  disabled: false,
69
15
  complete: false,
70
16
  description: localization.selectMigrationTypeDesc,
17
+ project: ['sphere', 'procurator'],
71
18
  id: 'select-migration-type',
72
19
  },
73
20
  {
@@ -75,6 +22,7 @@ const stepForProcurator = (
75
22
  disabled: true,
76
23
  complete: false,
77
24
  description: localization.selectComputeResourceDesc,
25
+ project: ['sphere'],
78
26
  permissions: ['server'],
79
27
  id: 'select-target-center',
80
28
  },
@@ -83,6 +31,7 @@ const stepForProcurator = (
83
31
  disabled: true,
84
32
  complete: false,
85
33
  description: localization.selectComputeResourceDesc,
34
+ project: ['sphere'],
86
35
  permissions: ['resource', 'resource-storage', 'server'],
87
36
  id: 'select-compute-resource',
88
37
  },
@@ -91,6 +40,7 @@ const stepForProcurator = (
91
40
  disabled: true,
92
41
  complete: false,
93
42
  description: localization.selectStorageDesc,
43
+ project: ['sphere', 'procurator'],
94
44
  permissions: ['storage', 'resource-storage', 'server'],
95
45
  id: 'select-storage',
96
46
  },
@@ -99,6 +49,7 @@ const stepForProcurator = (
99
49
  disabled: true,
100
50
  complete: false,
101
51
  description: localization.selectNetworksDesc,
52
+ project: ['sphere'],
102
53
  permissions: ['resource', 'resource-storage', 'server'],
103
54
  id: 'select-networks',
104
55
  },
@@ -107,6 +58,7 @@ const stepForProcurator = (
107
58
  disabled: true,
108
59
  complete: false,
109
60
  description: localization.selectVMotionPriorityDesc,
61
+ project: ['sphere'],
110
62
  permissions: ['resource', 'resource-storage', 'server'],
111
63
  id: 'select-motion-priority',
112
64
  },
@@ -114,12 +66,15 @@ const stepForProcurator = (
114
66
  text: localization.readyComplete,
115
67
  disabled: true,
116
68
  complete: false,
69
+ project: ['sphere', 'procurator'],
117
70
  id: 'ready-complete',
118
71
  },
119
72
  ]
120
73
 
121
- return stepItems.filter((item) => {
122
- // Если свойства permissions нет, возвращаем элемент
123
- return !item.permissions || item.permissions.includes(type)
124
- })
74
+ return stepItems
75
+ .filter((item) => item.project.includes(project)) // фильтрация по значению project
76
+ .filter((item) => {
77
+ // Если свойства permissions нет, возвращаем элемент
78
+ return !item.permissions || item.permissions.includes(type)
79
+ })
125
80
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.127",
4
+ "version": "1.2.128",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",