bfg-common 1.2.156 → 1.2.157

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.
@@ -2122,5 +2122,5 @@
2122
2122
  "saveVCenterServerAddress": "Захаваць адрас сервера vCenter",
2123
2123
  "discard": "Адкідаць",
2124
2124
  "ioControl": "Io Control",
2125
- "selectValidDestinationComputeResource.": "Выберыце сапраўдны вылічальны рэсурс прызначэння."
2125
+ "selectValidDestinationComputeResource": "Выберыце сапраўдны вылічальны рэсурс прызначэння."
2126
2126
  }
@@ -2125,5 +2125,5 @@
2125
2125
  "saveVCenterServerAddress": "Save vCenter Server address",
2126
2126
  "discard": "Discard",
2127
2127
  "ioControl": "Io Control",
2128
- "selectValidDestinationComputeResource.": "Select a valid destination compute resource."
2128
+ "selectValidDestinationComputeResource": "Select a valid destination compute resource."
2129
2129
  }
@@ -2125,5 +2125,5 @@
2125
2125
  "saveVCenterServerAddress": "Պահպանեք vCenter սերվերի հասցեն",
2126
2126
  "discard": "Հրաժարվել",
2127
2127
  "ioControl": "Io Control",
2128
- "selectValidDestinationComputeResource.": "Ընտրեք վավեր նպատակակետ հաշվարկային ռեսուրս:"
2128
+ "selectValidDestinationComputeResource": "Ընտրեք վավեր նպատակակետ հաշվարկային ռեսուրս:"
2129
2129
  }
@@ -2125,5 +2125,5 @@
2125
2125
  "saveVCenterServerAddress": "vCenter серверінің мекенжайын сақтаңыз",
2126
2126
  "discard": "Жою",
2127
2127
  "ioControl": "Io басқару",
2128
- "selectValidDestinationComputeResource.": "Жарамды тағайындалған есептеу ресурсын таңдаңыз."
2128
+ "selectValidDestinationComputeResource": "Жарамды тағайындалған есептеу ресурсын таңдаңыз."
2129
2129
  }
@@ -2125,5 +2125,5 @@
2125
2125
  "saveVCenterServerAddress": "Сохранить адрес сервера vCenter",
2126
2126
  "discard": "Отказаться",
2127
2127
  "ioControl": "Ио-контроль",
2128
- "selectValidDestinationComputeResource.": "Выберите допустимый целевой вычислительный ресурс."
2128
+ "selectValidDestinationComputeResource": "Выберите допустимый целевой вычислительный ресурс."
2129
2129
  }
@@ -2125,5 +2125,5 @@
2125
2125
  "saveVCenterServerAddress": "保存 vCenter Server 地址",
2126
2126
  "discard": "丢弃",
2127
2127
  "ioControl": "IO控制",
2128
- "selectValidDestinationComputeResource.": "选择有效的目标计算资源。"
2128
+ "selectValidDestinationComputeResource": "选择有效的目标计算资源。"
2129
2129
  }
@@ -34,8 +34,10 @@
34
34
 
35
35
  <common-wizards-vm-migrate-select-compute-resource
36
36
  v-show="currentBlockId === 'select-compute-resource'"
37
+ :submit="selectComputeResourceSubmit"
37
38
  :migrate-type="vmMigrateType"
38
39
  :compute-resource-tree="props.computeResourceTree"
40
+ @next-step="onSelectComputeResourceAndNext"
39
41
  />
40
42
 
41
43
  <common-wizards-vm-migrate-select-storage
@@ -105,6 +107,7 @@ const stepPosition = ref<number>(0)
105
107
  const loading = ref<boolean>(false)
106
108
 
107
109
  const selectStorageSubmit = ref<number>(0)
110
+ const selectComputeResourceSubmit = ref<number>(0)
108
111
 
109
112
  const selectedVMotionPriority = ref<UI_T_SelectVMotionPriority>('high-priority')
110
113
 
@@ -128,6 +131,9 @@ const dataFormLocal = ref<UI_I_CollectedDataFormLocal>({
128
131
  selectStorage: null,
129
132
  })
130
133
 
134
+ const onSelectComputeResourceAndNext = (_event: any): void => {
135
+ onNextStep(true)
136
+ }
131
137
  const onSelectStorageAndNext = (event: UI_I_SelectStorageReadyData): void => {
132
138
  dataFormLocal.value.selectStorage = event
133
139
  // dataReadyView.value = constructDataReadyViewFunc<UI_I_SelectStorageReadyData>(
@@ -182,6 +188,11 @@ const checkSubmit = (force = false): boolean => {
182
188
  return false
183
189
  }
184
190
 
191
+ if (currentBlockId.value === 'select-compute-resource' && !force) {
192
+ selectComputeResourceSubmit.value++
193
+ return false
194
+ }
195
+
185
196
  return true
186
197
  }
187
198
  const onBack = (): void => {
@@ -1,5 +1,13 @@
1
1
  <template>
2
2
  <div class="compute-resource">
3
+ <atoms-alert
4
+ v-if="errorMessages.length"
5
+ test-id="compute-resource-alert"
6
+ status="alert-danger"
7
+ :items="errorMessages"
8
+ @remove="onHideErrorMessageAlert"
9
+ />
10
+
3
11
  <div
4
12
  v-if="props.migrateType === 'resource-storage'"
5
13
  class="tree-view-wrap mt-1"
@@ -45,9 +53,13 @@ import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/
45
53
  import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/config/tabsPannel'
46
54
 
47
55
  const props = defineProps<{
56
+ submit: number
48
57
  migrateType: UI_T_VmMigrateType
49
58
  computeResourceTree: UI_I_TreeNode
50
59
  }>()
60
+ const emits = defineEmits<{
61
+ (event: 'next-step', value: any): void
62
+ }>()
51
63
 
52
64
  const localization = computed<UI_I_Localization>(() => useLocal())
53
65
  const { $recursion } = useNuxtApp()
@@ -123,7 +135,29 @@ const compatibilityText = computed<[string, string]>(() => {
123
135
  return res
124
136
  })
125
137
 
138
+ const errorMessages = ref<string[]>([])
139
+ const onHideErrorMessageAlert = (): void => {
140
+ errorMessages.value = []
141
+ }
142
+
126
143
  const selectedData = ref([])
144
+
145
+ const checkValidityBlock = (): boolean => {
146
+ if (!selectedData.value) {
147
+ const errorText = localization.value.selectValidDestinationComputeResource
148
+ //
149
+ errorMessages.value = [errorText]
150
+ return false
151
+ }
152
+ emits('next-step', {})
153
+ return true
154
+ }
155
+ watch(
156
+ () => props.submit,
157
+ () => {
158
+ checkValidityBlock()
159
+ }
160
+ )
127
161
  </script>
128
162
 
129
163
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.156",
4
+ "version": "1.2.157",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",