bfg-common 1.6.22 → 1.6.24

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 (84) hide show
  1. package/assets/localization/local_be.json +5 -65
  2. package/assets/localization/local_en.json +12 -72
  3. package/assets/localization/local_hy.json +6 -66
  4. package/assets/localization/local_kk.json +5 -65
  5. package/assets/localization/local_ru.json +11 -71
  6. package/assets/localization/local_zh.json +5 -65
  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 +1 -0
  11. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +0 -1
  12. package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +0 -6
  13. package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +192 -219
  14. package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +4 -6
  15. package/components/common/configure/physicalAdapters/buttons/Buttons.vue +0 -1
  16. package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +1 -26
  17. package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +1 -30
  18. package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +0 -5
  19. package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +1 -12
  20. package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
  21. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +5 -12
  22. package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +1 -4
  23. package/components/common/diagramMain/DiagramMain.vue +0 -6
  24. package/components/common/diagramMain/modals/Modals.vue +0 -4
  25. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +2 -2
  26. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
  27. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
  28. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
  29. package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
  30. package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +9 -8
  31. package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +0 -4
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +2 -9
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +7 -11
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +1 -7
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +5 -8
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +5 -9
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +9 -5
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +6 -9
  39. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -3
  40. package/components/common/monitor/lib/utils/local_be.json +698 -690
  41. package/components/common/monitor/lib/utils/local_en.json +698 -690
  42. package/components/common/monitor/lib/utils/local_hy.json +698 -690
  43. package/components/common/monitor/lib/utils/local_kk.json +698 -690
  44. package/components/common/monitor/lib/utils/local_ru.json +698 -690
  45. package/components/common/monitor/lib/utils/local_zh.json +698 -690
  46. package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
  47. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
  48. package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
  49. package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -9
  50. package/components/common/pages/scheduledTasks/table/new/New.vue +10 -12
  51. package/components/common/pages/tasks/Tasks.vue +1 -4
  52. package/components/common/pages/tasks/table/Table.vue +22 -24
  53. package/components/common/split/vertical/New.vue +6 -11
  54. package/components/common/vm/actions/add/New.vue +6 -21
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +0 -1
  56. package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +15 -13
  57. package/components/common/vm/actions/confirm/Confirm.vue +0 -3
  58. package/components/common/vm/snapshots/DetailView.vue +6 -6
  59. package/components/common/wizards/datastore/add/New.vue +0 -6
  60. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  61. package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
  62. package/components/common/wizards/network/add/Add.vue +2 -13
  63. package/components/common/wizards/network/add/AddNew.vue +26 -22
  64. package/components/common/wizards/network/add/lib/config/initialData.ts +4 -4
  65. package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
  66. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +8 -2
  67. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +8 -2
  68. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +3 -10
  69. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +1 -5
  70. package/components/common/wizards/network/add/validations/common.ts +1 -1
  71. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +13 -31
  72. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +1 -3
  73. package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +4 -5
  74. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +0 -4
  75. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +1 -3
  76. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +3 -8
  77. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -7
  78. package/lib/models/store/tasks/enums.ts +0 -3
  79. package/lib/models/store/tasks/types.ts +6 -7
  80. package/package.json +2 -2
  81. package/store/tasks/actions.ts +8 -26
  82. package/store/tasks/mappers/recentTasks.ts +0 -1
  83. package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +0 -19
  84. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +0 -340
@@ -44,21 +44,22 @@
44
44
  >
45
45
  <template #subTitle>
46
46
  <div ref="selectTargetDeviceBlock">
47
- <div class="alert-block flex flex-col">
47
+ <div class="subtitle-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"
54
53
  :messages="[message.alert]"
55
54
  test-id="select-target-device-alert"
55
+ :class="{
56
+ 'mb-4':
57
+ props.alertMessages[selectedStep.id].length - 1 === key,
58
+ }"
56
59
  size="md"
57
60
  @hide="emits('hide-alert', selectedStep.id, field)"
58
61
  />
59
62
  </template>
60
- </div>
61
- <div class="subtitle-block flex flex-col">
62
63
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
63
64
  <ui-line margin="12px 0 0" />
64
65
  </div>
@@ -88,21 +89,22 @@
88
89
  >
89
90
  <template #subTitle>
90
91
  <div ref="createStandardSwitchBlock">
91
- <div class="alert-block flex flex-col">
92
+ <div class="subtitle-block flex flex-col">
92
93
  <template
93
94
  v-for="(message, field, key) in selectedStep.fields"
94
95
  :key="key"
95
96
  >
96
97
  <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
+ }"
100
104
  size="md"
101
105
  @hide="emits('hide-alert', selectedStep.id, field)"
102
106
  />
103
107
  </template>
104
- </div>
105
- <div class="subtitle-block flex flex-col">
106
108
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
107
109
  <ui-line margin="12px 0 0" />
108
110
  </div>
@@ -144,21 +146,22 @@
144
146
  >
145
147
  <template #subTitle>
146
148
  <div ref="portPropertiesBlock">
147
- <div class="alert-block flex flex-col">
149
+ <div class="subtitle-block flex flex-col">
148
150
  <template
149
151
  v-for="(message, field, key) in selectedStep.fields"
150
152
  :key="key"
151
153
  >
152
154
  <ui-alert
153
- v-if="!!message.alert"
154
155
  :messages="[message.alert]"
155
156
  test-id="port-properties-alert"
157
+ :class="{
158
+ 'mb-4':
159
+ props.alertMessages[selectedStep.id].length - 1 === key,
160
+ }"
156
161
  size="md"
157
162
  @hide="emits('hide-alert', selectedStep.id, field)"
158
163
  />
159
164
  </template>
160
- </div>
161
- <div class="subtitle-block flex flex-col">
162
165
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
163
166
  <ui-line margin="12px 0 0" />
164
167
  </div>
@@ -187,21 +190,22 @@
187
190
  >
188
191
  <template #subTitle>
189
192
  <div ref="ipFourSettingsBlock">
190
- <div class="alert-block flex flex-col">
193
+ <div class="subtitle-block flex flex-col">
191
194
  <template
192
195
  v-for="(message, field, key) in selectedStep.fields"
193
196
  :key="key"
194
197
  >
195
198
  <ui-alert
196
- v-if="!!message.alert"
197
199
  :messages="[message.alert]"
198
200
  test-id="ip-four-settings-alert"
201
+ :class="{
202
+ 'mb-4':
203
+ props.alertMessages[selectedStep.id].length - 1 === key,
204
+ }"
199
205
  size="md"
200
206
  @hide="emits('hide-alert', selectedStep.id, field)"
201
207
  />
202
208
  </template>
203
- </div>
204
- <div class="subtitle-block flex flex-col">
205
209
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
206
210
  <ui-line margin="12px 0 0" />
207
211
  </div>
@@ -229,21 +233,22 @@
229
233
  >
230
234
  <template #subTitle>
231
235
  <div ref="connectionSettingsBlock">
232
- <div class="alert-block flex flex-col">
236
+ <div class="subtitle-block flex flex-col">
233
237
  <template
234
238
  v-for="(message, field, key) in selectedStep.fields"
235
239
  :key="key"
236
240
  >
237
241
  <ui-alert
238
- v-if="!!message.alert"
239
242
  :messages="[message.alert]"
240
243
  test-id="connection-settings-alert"
244
+ :class="{
245
+ 'mb-4':
246
+ props.alertMessages[selectedStep.id].length - 1 === key,
247
+ }"
241
248
  size="md"
242
249
  @hide="emits('hide-alert', selectedStep.id, field)"
243
250
  />
244
251
  </template>
245
- </div>
246
- <div class="subtitle-block flex flex-col">
247
252
  <ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
248
253
  <ui-line margin="12px 0 0" />
249
254
  </div>
@@ -458,7 +463,6 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
458
463
  }
459
464
  :deep(.ui-wizard-content-with-subtitle) {
460
465
  padding-right: 0;
461
- scrollbar-gutter: unset;
462
466
  }
463
467
  }
464
468
 
@@ -473,7 +477,7 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
473
477
  :deep(.ui-alert-item) {
474
478
  margin-bottom: 12px;
475
479
 
476
- &:last-of-type {
480
+ &.mb-4 {
477
481
  margin-bottom: 16px;
478
482
  }
479
483
  }
@@ -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.none2} (0)`,
40
+ vlanId: `${localization.common.none} (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.none2} (0)`,
65
+ vlanId: `${localization.common.none} (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.none2} (0)`,
73
- value: `${localization.common.none2} (0)`,
72
+ text: `${localization.common.none} (0)`,
73
+ value: `${localization.common.none} (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.none2} (0)` && '0') ||
8
+ (vlanId === `${localization.common.none} (0)` && '0') ||
9
9
  vlanId
@@ -281,8 +281,14 @@ const fields = computed({
281
281
  }
282
282
  }
283
283
  :deep(.ui-checkbox-label) {
284
- &.md {
285
- height: unset;
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;
286
292
  }
287
293
  }
288
294
  .tooltip-text {
@@ -299,8 +299,14 @@ const portPropertiesEnabledServices = computed<
299
299
  padding: 0 8px 0 12px;
300
300
  }
301
301
  :deep(.ui-checkbox-label) {
302
- &.md {
303
- height: unset;
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;
304
310
  }
305
311
  }
306
312
  </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="browse-network"
106
+ test-id="button-1"
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="browse-standard-switch"
157
+ test-id="button-1"
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="browse-switch"
206
+ test-id="button-1"
207
207
  type="primary"
208
208
  variant="text"
209
209
  size="lg"
@@ -357,17 +357,10 @@ 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%;
364
360
 
365
361
  span {
366
362
  text-align: left;
367
363
  color: var(--select-text);
368
- overflow: hidden;
369
- text-overflow: ellipsis;
370
- white-space: nowrap;
371
364
  }
372
365
 
373
366
  &: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,10 +147,6 @@ 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
- }
154
150
  }
155
151
 
156
152
  .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.none2} (0)` &&
24
+ vlanId !== `${localization.common.none} (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="tableConfig.options"
5
+ :options="options"
6
6
  :loading="props.isLoading"
7
7
  :total-pages="props.totalPages"
8
8
  :total-items="props.totalItems"
@@ -79,10 +79,13 @@ 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/steps/selectStorage/lib/models/types'
82
+ import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
83
83
  import type { UI_T_ComputeResourceTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/lib/models/types'
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'
84
+ import {
85
+ options,
86
+ getHeaderDataFunc,
87
+ getBodyDataFunc,
88
+ } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
86
89
 
87
90
  const selectedDataLocal = defineModel<number | null>({ required: true })
88
91
  const props = defineProps<{
@@ -117,33 +120,15 @@ const tableSkeleton = ref<UI_I_DataTableSkeleton>({
117
120
  withoutPagination: true,
118
121
  })
119
122
 
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
-
133
123
  const data = computed<UI_I_DataTable>(() => ({
134
- id: `compute-resource-${props.type}-table`,
135
- title: tableDataTitle.value,
124
+ id: 'compute-resource-host-table',
125
+ title: `${localization.value.common.hosts} (${props.totalItems})`,
136
126
  header: deviceHeadItems.value,
137
127
  body: deviceBodyItems.value,
138
128
  }))
139
- const tableDataTitle = computed<string>(
140
- () =>
141
- `${tableTitleMap[props.type as keyof typeof tableConfigMap]} (${
142
- props.totalItems
143
- })`
144
- )
129
+
145
130
  const deviceHeadItems = computed<UI_I_DataTableHeader[]>(() =>
146
- tableConfig.value.getHeaderDataFunc(localization.value)
131
+ getHeaderDataFunc(localization.value)
147
132
  )
148
133
 
149
134
  const deviceBodyItems = ref<UI_I_DataTableBody[]>([])
@@ -155,16 +140,13 @@ watch(
155
140
  return
156
141
  }
157
142
 
158
- deviceBodyItems.value = tableConfig.value.getBodyDataFunc(
159
- newValue,
160
- localization.value
161
- )
143
+ deviceBodyItems.value = getBodyDataFunc(newValue, localization.value)
162
144
  },
163
145
  { deep: true, immediate: true }
164
146
  )
165
147
 
166
148
  const onSelectRow = (value: UI_I_DataTableBody[]): void => {
167
- selectedDataLocal.value = value?.[0].row as number
149
+ selectedDataLocal.value = value?.[0].row
168
150
  }
169
151
  </script>
170
152
 
@@ -222,9 +222,7 @@ export const getBodyDataFunc = (
222
222
  key: 'icon',
223
223
  col: 'col0',
224
224
  text: host.name,
225
- data: {
226
- iconClassName: `vsphere-icon-${hostIconByState[host.state]}`,
227
- },
225
+ data: `vsphere-icon-${hostIconByState[host.state]}`,
228
226
  testId: `migrate-host-table-item-${index}`,
229
227
  },
230
228
 
@@ -27,14 +27,13 @@
27
27
  :is-hide-select-disk-format="props.isHideSelectDiskFormat"
28
28
  >
29
29
  <template v-if="isShowSelectedPerDisks" #buttonConfirm>
30
- <ui-button
31
- test-id="apply-selected-per-disks-button"
32
- type="primary"
33
- size="sm"
30
+ <button
31
+ class="btn btn-sm btn-primary"
32
+ data-id="apply-selected-per-disks-button"
34
33
  @click="onApplyChanges"
35
34
  >
36
35
  {{ localization.common.confirm }}
37
- </ui-button>
36
+ </button>
38
37
  </template>
39
38
  </common-wizards-vm-migrate-steps-select-storage-configure-batch>
40
39
 
@@ -69,9 +69,5 @@ const selectOptionsLocal = computed<UI_I_Dropdown[]>(() =>
69
69
  font-size: 13px;
70
70
  }
71
71
  }
72
- &__button {
73
- display: flex;
74
- justify-content: flex-end;
75
- }
76
72
  }
77
73
  </style>
@@ -118,11 +118,9 @@ watch(
118
118
  const onSorting = (value: string): void => {
119
119
  emits('sort', value)
120
120
  }
121
-
122
- /* TODO: если передать в emit selectedStorageKeyLocal.value, то не работает */
123
121
  const onSelectRow = (value: UI_I_DataTableBody[]): void => {
124
122
  selectedStorageKeyLocal.value = value?.[0].row as number
125
- emits('select-storage', value?.[0].row as number)
123
+ emits('select-storage', selectedStorageKeyLocal.value)
126
124
  }
127
125
  </script>
128
126
 
@@ -158,6 +158,7 @@ export const getBodyDataFunc = (
158
158
  bodyData: UI_I_StorageConfigurePerDiskItem[],
159
159
  localization: UI_I_Localization
160
160
  ): UI_I_DataTableBody[] => {
161
+
161
162
  return bodyData.map((disk, index: number) => {
162
163
  const diskFormat =
163
164
  index === 0 ? 'N/A' : UI_E_SelectStorageDiskFormat[disk.disk_format]
@@ -183,12 +184,6 @@ export const getBodyDataFunc = (
183
184
  : 'False'
184
185
  : localization.common[diskSharingKey]
185
186
 
186
- const diskCache = disk.extra.cache
187
- const diskCacheValue =
188
- !diskCache || ['none', 'n/a'].includes(diskCache.toLowerCase())
189
- ? '--'
190
- : disk.extra.cache
191
-
192
187
  return {
193
188
  row: index,
194
189
  collapse: false,
@@ -226,10 +221,10 @@ export const getBodyDataFunc = (
226
221
  data: diskSharingData,
227
222
  },
228
223
 
229
- { col: 'col6', text: disk.extra.target || '--' },
224
+ { col: 'col6', text: disk.extra.target },
230
225
  {
231
226
  col: 'col7',
232
- text: diskCacheValue,
227
+ text: disk.extra.cache,
233
228
  },
234
229
  { col: 'col8', text: disk.extra.io_control },
235
230
  {
@@ -79,12 +79,6 @@ export const bodyItems = (
79
79
  ? disk[vmMigrateDiskTableItemKeys[2]]
80
80
  : `${disk.extra.disk_source} (${disk.extra.disk_size} ${localization.common.mb} )`
81
81
 
82
- const diskCache = disk.extra[vmMigrateDiskTableItemKeys[7]]
83
- const diskCacheValue =
84
- !diskCache || ['none', 'n/a'].includes(diskCache.toLowerCase())
85
- ? '--'
86
- : disk.extra[vmMigrateDiskTableItemKeys[7]]
87
-
88
82
  bodyItems.push([
89
83
  {
90
84
  key: 'col0',
@@ -130,7 +124,7 @@ export const bodyItems = (
130
124
  },
131
125
  {
132
126
  key: 'col7',
133
- text: diskCacheValue,
127
+ text: disk.extra[vmMigrateDiskTableItemKeys[7]],
134
128
  id: key,
135
129
  testId: `disk-table-${key}`,
136
130
  },
@@ -3,9 +3,6 @@ export enum UI_E_RecentTaskStatus {
3
3
  'running',
4
4
  'completed',
5
5
  'failed',
6
- 'canceled',
7
- 'retrying',
8
- 'warning',
9
6
  }
10
7
 
11
8
  export enum UI_E_IconNameByRecentTaskStatus {
@@ -1,9 +1,8 @@
1
1
  export type UI_T_TasksStateLoading = 'tasks' | 'recentTasks'
2
2
  export type UI_T_TaskStatus =
3
- | 0 // queued
4
- | 1 // running
5
- | 2 // completed
6
- | 3 // failed
7
- | 4 // canceled
8
- | 5 // retrying
9
- | 6 // warning
3
+ 0 | // queued
4
+ 1 | // running
5
+ 2 | // completed
6
+ 3 | // failed
7
+ 4 | // canceled
8
+ 5 // retrying
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.6.22",
4
+ "version": "1.6.24",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -18,7 +18,7 @@
18
18
  "@vueuse/core": "10.1.2",
19
19
  "@vueuse/nuxt": "10.1.2",
20
20
  "bfg-nuxt-3-graph": "1.0.27",
21
- "bfg-uikit": "1.1.25",
21
+ "bfg-uikit": "1.1.9",
22
22
  "eslint-config-prettier": "^8.5.0",
23
23
  "eslint-plugin-myrules": "file:./eslint",
24
24
  "nuxt": "3.11.2",
@@ -18,7 +18,6 @@ import type {
18
18
  } from '~/lib/models/store/tasks/interfaces'
19
19
  import type { UI_I_TasksState } from '~/store/tasks/lib/models/interfaces'
20
20
  import type { UI_I_RefreshStack } from '~/store/main/lib/interfaces'
21
- import type { UI_T_Project } from '~/lib/models/types'
22
21
  import { tasksConstructor } from '~/store/tasks/mappers/tasks'
23
22
  import { recentTasks } from '~/store/tasks/mappers/recentTasks'
24
23
 
@@ -29,13 +28,9 @@ export default {
29
28
  state: UI_I_TasksState
30
29
  dispatch: <T>(arg0: string, arg1: T, arg2: UI_I_CommitOptions) => void
31
30
  },
32
- payload: {
33
- data: UI_I_DataTableQuery
34
- project: UI_T_Project
35
- }
31
+ payload: UI_I_DataTableQuery
36
32
  ): Promise<API_UI_I_Error | void> {
37
- const { data, project } = payload
38
- const { page, pageSize, sortBy, filter } = data
33
+ const { page, pageSize, sortBy, filter } = payload
39
34
 
40
35
  const query: UI_I_TableQuery = {
41
36
  page_size: pageSize,
@@ -43,21 +38,7 @@ export default {
43
38
  }
44
39
 
45
40
  if (sortBy) query.sortBy = sortBy
46
- if (filter) {
47
- if (project === 'procurator') {
48
- query.filter = filter
49
- } else {
50
- const filters = filter.split(',')
51
- filters.forEach((item) => {
52
- const [field, value] = item.split('.')
53
-
54
- if (field && value) {
55
- // @ts-ignore
56
- query[field] = value
57
- }
58
- })
59
- }
60
- }
41
+ if (filter) query.filter = filter
61
42
 
62
43
  const queryJson: string = JSON.stringify({ type: 'tasks', ...query })
63
44
  const lastQuery: string = context.state.taskQuery || ''
@@ -82,9 +63,7 @@ export default {
82
63
  value: true,
83
64
  })
84
65
  },
85
- onResponse({
86
- response,
87
- }: API_UI_I_Response<API_UI_I_Task<string> | null>) {
66
+ onResponse({ response }: API_UI_I_Response<API_UI_I_Task<string> | null>) {
88
67
  const tasks = tasksConstructor(response._data)
89
68
 
90
69
  context.commit('M_SET_TASKS_LIST', tasks)
@@ -161,7 +140,10 @@ export default {
161
140
  payload: string
162
141
  ): Promise<void> {
163
142
  // Скрываем кнопку cancel
164
- context.commit('M_HIDE_CANCEL_RECENT_TASK_BY_ID', payload)
143
+ context.commit(
144
+ 'M_HIDE_CANCEL_RECENT_TASK_BY_ID',
145
+ payload
146
+ )
165
147
  const { error } = await useMyFetch<
166
148
  API_UI_I_RecentTask<string>,
167
149
  API_UI_I_Error
@@ -82,7 +82,6 @@ export const recentTasks = (
82
82
  statusIcon = 'error-outline'
83
83
  break
84
84
  case 5:
85
- case 6:
86
85
  statusIcon = 'warning-outline'
87
86
  break
88
87
  }
@@ -1,19 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
-
3
- export const vfNumberValidationFunc = (
4
- vfNumber: number,
5
- localization: UI_I_Localization,
6
- isAlert = false
7
- ): string => {
8
- if (vfNumber !== 0 && !vfNumber) {
9
- return isAlert
10
- ? localization.inventoryConfigure.vfRequiredMessage
11
- : localization.common.fieldRequired
12
- } else if (vfNumber < 1 || vfNumber > 63) {
13
- return isAlert
14
- ? localization.inventoryConfigure.vfNotNegativeMessage
15
- : localization.inventoryConfigure.vfNotNegativeMessage
16
- }
17
-
18
- return ''
19
- }