bfg-common 1.6.3 → 1.6.4

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 (65) hide show
  1. package/assets/localization/local_be.json +56 -4
  2. package/assets/localization/local_en.json +61 -9
  3. package/assets/localization/local_hy.json +57 -5
  4. package/assets/localization/local_kk.json +56 -4
  5. package/assets/localization/local_ru.json +60 -8
  6. package/assets/localization/local_zh.json +56 -4
  7. package/assets/scss/common/theme.scss +2 -2
  8. package/components/atoms/stack/StackBlock.vue +1 -1
  9. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
  10. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +0 -1
  11. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +1 -0
  12. package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +6 -0
  13. package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +219 -192
  14. package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +6 -4
  15. package/components/common/configure/physicalAdapters/buttons/Buttons.vue +1 -0
  16. package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +26 -1
  17. package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +30 -1
  18. package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +5 -0
  19. package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +19 -0
  20. package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +12 -1
  21. package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
  22. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +12 -5
  23. package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +4 -1
  24. package/components/common/diagramMain/DiagramMain.vue +6 -0
  25. package/components/common/diagramMain/modals/Modals.vue +4 -0
  26. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +2 -2
  27. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
  28. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
  29. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
  30. package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +5 -9
  31. package/components/common/monitor/utilization/New.vue +5 -0
  32. package/components/common/monitor/utilization/Old.vue +79 -0
  33. package/components/common/monitor/utilization/Utilization.vue +51 -0
  34. package/components/common/monitor/utilization/infoBlock/InfoBlock.vue +23 -0
  35. package/components/common/monitor/utilization/infoBlock/New.vue +5 -0
  36. package/components/common/monitor/utilization/infoBlock/Old.vue +185 -0
  37. package/components/common/monitor/utilization/lib/models/enums.ts +4 -0
  38. package/components/common/monitor/utilization/lib/models/interfaces.ts +25 -0
  39. package/components/common/monitor/utilization/lib/utils/index.ts +31 -0
  40. package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
  41. package/components/common/pages/tasks/Tasks.vue +4 -1
  42. package/components/common/split/vertical/New.vue +11 -6
  43. package/components/common/vm/actions/add/New.vue +21 -6
  44. package/components/common/vm/actions/common/select/options/New.vue +10 -19
  45. package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +13 -15
  46. package/components/common/vm/snapshots/DetailView.vue +6 -6
  47. package/components/common/wizards/common/steps/name/New.vue +1 -1
  48. package/components/common/wizards/datastore/add/New.vue +6 -0
  49. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  50. package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
  51. package/components/common/wizards/network/add/Add.vue +13 -2
  52. package/components/common/wizards/network/add/AddNew.vue +22 -26
  53. package/components/common/wizards/network/add/lib/config/initialData.ts +4 -4
  54. package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
  55. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +2 -8
  56. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +2 -8
  57. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +10 -3
  58. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +5 -1
  59. package/components/common/wizards/network/add/validations/common.ts +1 -1
  60. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +31 -13
  61. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +340 -0
  62. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +3 -1
  63. package/lib/models/store/tasks/enums.ts +2 -0
  64. package/package.json +2 -2
  65. package/store/tasks/actions.ts +26 -8
@@ -44,22 +44,21 @@
44
44
  >
45
45
  <template #subTitle>
46
46
  <div ref="selectTargetDeviceBlock">
47
- <div class="subtitle-block flex flex-col">
47
+ <div class="alert-block flex flex-col">
48
48
  <template
49
49
  v-for="(message, field, key) in selectedStep.fields"
50
50
  :key="key"
51
51
  >
52
52
  <ui-alert
53
+ v-if="!!message.alert"
53
54
  :messages="[message.alert]"
54
55
  test-id="select-target-device-alert"
55
- :class="{
56
- 'mb-4':
57
- props.alertMessages[selectedStep.id].length - 1 === key,
58
- }"
59
56
  size="md"
60
57
  @hide="emits('hide-alert', selectedStep.id, field)"
61
58
  />
62
59
  </template>
60
+ </div>
61
+ <div class="subtitle-block flex flex-col">
63
62
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
64
63
  <ui-line margin="12px 0 0" />
65
64
  </div>
@@ -89,22 +88,21 @@
89
88
  >
90
89
  <template #subTitle>
91
90
  <div ref="createStandardSwitchBlock">
92
- <div class="subtitle-block flex flex-col">
91
+ <div class="alert-block flex flex-col">
93
92
  <template
94
93
  v-for="(message, field, key) in selectedStep.fields"
95
94
  :key="key"
96
95
  >
97
96
  <ui-alert
97
+ v-if="!!message.alert"
98
98
  :messages="[message.alert]"
99
99
  test-id="create-standard-switch-alert"
100
- :class="{
101
- 'mb-4':
102
- props.alertMessages[selectedStep.id].length - 1 === key,
103
- }"
104
100
  size="md"
105
101
  @hide="emits('hide-alert', selectedStep.id, field)"
106
102
  />
107
103
  </template>
104
+ </div>
105
+ <div class="subtitle-block flex flex-col">
108
106
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
109
107
  <ui-line margin="12px 0 0" />
110
108
  </div>
@@ -146,22 +144,21 @@
146
144
  >
147
145
  <template #subTitle>
148
146
  <div ref="portPropertiesBlock">
149
- <div class="subtitle-block flex flex-col">
147
+ <div class="alert-block flex flex-col">
150
148
  <template
151
149
  v-for="(message, field, key) in selectedStep.fields"
152
150
  :key="key"
153
151
  >
154
152
  <ui-alert
153
+ v-if="!!message.alert"
155
154
  :messages="[message.alert]"
156
155
  test-id="port-properties-alert"
157
- :class="{
158
- 'mb-4':
159
- props.alertMessages[selectedStep.id].length - 1 === key,
160
- }"
161
156
  size="md"
162
157
  @hide="emits('hide-alert', selectedStep.id, field)"
163
158
  />
164
159
  </template>
160
+ </div>
161
+ <div class="subtitle-block flex flex-col">
165
162
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
166
163
  <ui-line margin="12px 0 0" />
167
164
  </div>
@@ -190,22 +187,21 @@
190
187
  >
191
188
  <template #subTitle>
192
189
  <div ref="ipFourSettingsBlock">
193
- <div class="subtitle-block flex flex-col">
190
+ <div class="alert-block flex flex-col">
194
191
  <template
195
192
  v-for="(message, field, key) in selectedStep.fields"
196
193
  :key="key"
197
194
  >
198
195
  <ui-alert
196
+ v-if="!!message.alert"
199
197
  :messages="[message.alert]"
200
198
  test-id="ip-four-settings-alert"
201
- :class="{
202
- 'mb-4':
203
- props.alertMessages[selectedStep.id].length - 1 === key,
204
- }"
205
199
  size="md"
206
200
  @hide="emits('hide-alert', selectedStep.id, field)"
207
201
  />
208
202
  </template>
203
+ </div>
204
+ <div class="subtitle-block flex flex-col">
209
205
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
210
206
  <ui-line margin="12px 0 0" />
211
207
  </div>
@@ -233,22 +229,21 @@
233
229
  >
234
230
  <template #subTitle>
235
231
  <div ref="connectionSettingsBlock">
236
- <div class="subtitle-block flex flex-col">
232
+ <div class="alert-block flex flex-col">
237
233
  <template
238
234
  v-for="(message, field, key) in selectedStep.fields"
239
235
  :key="key"
240
236
  >
241
237
  <ui-alert
238
+ v-if="!!message.alert"
242
239
  :messages="[message.alert]"
243
240
  test-id="connection-settings-alert"
244
- :class="{
245
- 'mb-4':
246
- props.alertMessages[selectedStep.id].length - 1 === key,
247
- }"
248
241
  size="md"
249
242
  @hide="emits('hide-alert', selectedStep.id, field)"
250
243
  />
251
244
  </template>
245
+ </div>
246
+ <div class="subtitle-block flex flex-col">
252
247
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
253
248
  <ui-line margin="12px 0 0" />
254
249
  </div>
@@ -463,6 +458,7 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
463
458
  }
464
459
  :deep(.ui-wizard-content-with-subtitle) {
465
460
  padding-right: 0;
461
+ scrollbar-gutter: unset;
466
462
  }
467
463
  }
468
464
 
@@ -477,7 +473,7 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
477
473
  :deep(.ui-alert-item) {
478
474
  margin-bottom: 12px;
479
475
 
480
- &.mb-4 {
476
+ &:last-of-type {
481
477
  margin-bottom: 16px;
482
478
  }
483
479
  }
@@ -37,7 +37,7 @@ export const portPropertiesInitial = (
37
37
  localization: UI_I_Localization
38
38
  ): UI_I_PortProperties => ({
39
39
  networkLabel: '',
40
- vlanId: `${localization.common.none} (0)`,
40
+ vlanId: `${localization.common.none2} (0)`,
41
41
  mtu: {
42
42
  option: '0',
43
43
  size: 1500,
@@ -62,15 +62,15 @@ export const connectionSettingsInitial = (
62
62
  localization: UI_I_Localization
63
63
  ): UI_I_ConnectionSettings => ({
64
64
  networkLabel: 'VM Network',
65
- vlanId: `${localization.common.none} (0)`,
65
+ vlanId: `${localization.common.none2} (0)`,
66
66
  })
67
67
 
68
68
  export const vlanIdSelectDataFunc = (
69
69
  localization: UI_I_Localization
70
70
  ): UI_I_VlanIdData[] => [
71
71
  {
72
- text: `${localization.common.none} (0)`,
73
- value: `${localization.common.none} (0)`,
72
+ text: `${localization.common.none2} (0)`,
73
+ value: `${localization.common.none2} (0)`,
74
74
  },
75
75
  {
76
76
  text: `${localization.common.all} (4095)`,
@@ -5,5 +5,5 @@ export const getVlanId = (
5
5
  localization: UI_I_Localization
6
6
  ): string =>
7
7
  (vlanId === `${localization.common.all} (4095)` && '4095') ||
8
- (vlanId === `${localization.common.none} (0)` && '0') ||
8
+ (vlanId === `${localization.common.none2} (0)` && '0') ||
9
9
  vlanId
@@ -281,14 +281,8 @@ const fields = computed({
281
281
  }
282
282
  }
283
283
  :deep(.ui-checkbox-label) {
284
- text-overflow: ellipsis;
285
- white-space: nowrap;
286
- overflow: hidden;
287
-
288
- .ui-checkbox-label-text {
289
- text-overflow: ellipsis;
290
- white-space: nowrap;
291
- overflow: hidden;
284
+ &.md {
285
+ height: unset;
292
286
  }
293
287
  }
294
288
  .tooltip-text {
@@ -299,14 +299,8 @@ const portPropertiesEnabledServices = computed<
299
299
  padding: 0 8px 0 12px;
300
300
  }
301
301
  :deep(.ui-checkbox-label) {
302
- text-overflow: ellipsis;
303
- white-space: nowrap;
304
- overflow: hidden;
305
-
306
- .ui-checkbox-label-text {
307
- text-overflow: ellipsis;
308
- white-space: nowrap;
309
- overflow: hidden;
302
+ &.md {
303
+ height: unset;
310
304
  }
311
305
  }
312
306
  </style>
@@ -103,7 +103,7 @@
103
103
  <template #row="{ item }">
104
104
  <div v-if="item.iconName" class="browse-btn">
105
105
  <ui-button
106
- test-id="button-1"
106
+ test-id="browse-network"
107
107
  type="primary"
108
108
  variant="text"
109
109
  size="lg"
@@ -154,7 +154,7 @@
154
154
  <template #row="{ item }">
155
155
  <div v-if="item.iconName" class="browse-btn">
156
156
  <ui-button
157
- test-id="button-1"
157
+ test-id="browse-standard-switch"
158
158
  type="primary"
159
159
  variant="text"
160
160
  size="lg"
@@ -203,7 +203,7 @@
203
203
  <template #row="{ item }">
204
204
  <div v-if="item.iconName" class="browse-btn">
205
205
  <ui-button
206
- test-id="button-1"
206
+ test-id="browse-switch"
207
207
  type="primary"
208
208
  variant="text"
209
209
  size="lg"
@@ -357,10 +357,17 @@ watch(
357
357
  :deep(.ui-btn) {
358
358
  justify-content: flex-start;
359
359
  height: 32px;
360
+ overflow: hidden;
361
+ text-overflow: ellipsis;
362
+ white-space: nowrap;
363
+ width: 100%;
360
364
 
361
365
  span {
362
366
  text-align: left;
363
367
  color: var(--select-text);
368
+ overflow: hidden;
369
+ text-overflow: ellipsis;
370
+ white-space: nowrap;
364
371
  }
365
372
 
366
373
  &:hover {
@@ -46,7 +46,7 @@ import type {
46
46
  UI_I_DataTable,
47
47
  UI_I_DataTableHeader,
48
48
  UI_I_DataTableBody,
49
- UI_I_TableTexts
49
+ UI_I_TableTexts,
50
50
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/lib/models/interfaces'
51
51
  import type { UI_I_Localization } from '~/lib/models/interfaces'
52
52
  import type {
@@ -147,6 +147,10 @@ const onSelectNetwork = (): void => {
147
147
  <style scoped lang="scss">
148
148
  :deep(.table-container) {
149
149
  padding: 8px 32px !important;
150
+
151
+ .column-manager-button span {
152
+ font-weight: 500;
153
+ }
150
154
  }
151
155
 
152
156
  .row-container {
@@ -21,7 +21,7 @@ export const checkVlanId = (
21
21
  vlanId: string,
22
22
  localization: UI_I_Localization
23
23
  ): boolean =>
24
- vlanId !== `${localization.common.none} (0)` &&
24
+ vlanId !== `${localization.common.none2} (0)` &&
25
25
  vlanId !== `${localization.common.all} (4095)` &&
26
26
  (isIntegerNumberInRange(vlanId, 0, 4095) || vlanId.trim() === '')
27
27
 
@@ -2,7 +2,7 @@
2
2
  <div class="device-table-container">
3
3
  <ui-data-table
4
4
  :data="data"
5
- :options="options"
5
+ :options="tableConfig.options"
6
6
  :loading="props.isLoading"
7
7
  :total-pages="props.totalPages"
8
8
  :total-items="props.totalItems"
@@ -79,13 +79,10 @@ import type {
79
79
  UI_I_TableTexts,
80
80
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
81
81
  import type { UI_I_DataTableSkeleton } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
82
- import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
82
+ import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/steps/selectStorage/lib/models/types'
83
83
  import type { UI_T_ComputeResourceTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/lib/models/types'
84
- import {
85
- options,
86
- getHeaderDataFunc,
87
- getBodyDataFunc,
88
- } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
84
+ import * as hostTable from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
85
+ import * as clusterTable from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable'
89
86
 
90
87
  const selectedDataLocal = defineModel<number | null>({ required: true })
91
88
  const props = defineProps<{
@@ -120,15 +117,33 @@ const tableSkeleton = ref<UI_I_DataTableSkeleton>({
120
117
  withoutPagination: true,
121
118
  })
122
119
 
120
+ const tableTitleMap = {
121
+ host: localization.value.common.hosts,
122
+ cluster: localization.value.common.clusters,
123
+ } as const
124
+ const tableConfigMap = {
125
+ host: hostTable,
126
+ cluster: clusterTable,
127
+ } as const
128
+
129
+ const tableConfig = computed(
130
+ () => tableConfigMap[props.type as keyof typeof tableConfigMap]
131
+ )
132
+
123
133
  const data = computed<UI_I_DataTable>(() => ({
124
- id: 'compute-resource-host-table',
125
- title: `${localization.value.common.hosts} (${props.totalItems})`,
134
+ id: `compute-resource-${props.type}-table`,
135
+ title: tableDataTitle.value,
126
136
  header: deviceHeadItems.value,
127
137
  body: deviceBodyItems.value,
128
138
  }))
129
-
139
+ const tableDataTitle = computed<string>(
140
+ () =>
141
+ `${tableTitleMap[props.type as keyof typeof tableConfigMap]} (${
142
+ props.totalItems
143
+ })`
144
+ )
130
145
  const deviceHeadItems = computed<UI_I_DataTableHeader[]>(() =>
131
- getHeaderDataFunc(localization.value)
146
+ tableConfig.value.getHeaderDataFunc(localization.value)
132
147
  )
133
148
 
134
149
  const deviceBodyItems = ref<UI_I_DataTableBody[]>([])
@@ -140,13 +155,16 @@ watch(
140
155
  return
141
156
  }
142
157
 
143
- deviceBodyItems.value = getBodyDataFunc(newValue, localization.value)
158
+ deviceBodyItems.value = tableConfig.value.getBodyDataFunc(
159
+ newValue,
160
+ localization.value
161
+ )
144
162
  },
145
163
  { deep: true, immediate: true }
146
164
  )
147
165
 
148
166
  const onSelectRow = (value: UI_I_DataTableBody[]): void => {
149
- selectedDataLocal.value = value?.[0].row
167
+ selectedDataLocal.value = value?.[0].row as number
150
168
  }
151
169
  </script>
152
170