bfg-common 1.3.254 → 1.3.255

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 (56) hide show
  1. package/components/atoms/switch/Switch.vue +111 -111
  2. package/components/atoms/table/compact/Compact.vue +526 -526
  3. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +1 -1
  4. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -0
  5. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +1 -0
  6. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +1 -0
  7. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +1 -0
  8. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +1 -0
  9. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +1 -0
  10. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +1 -0
  11. package/components/common/home/alertsTable/AlertsTable.vue +1 -0
  12. package/components/common/home/servicesTable/ServicesTable.vue +1 -0
  13. package/components/common/monitor/advanced/table/Table.vue +1 -0
  14. package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +1 -0
  15. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +1 -0
  16. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +1 -0
  17. package/components/common/vm/actions/add/Add.vue +1 -0
  18. package/components/common/vm/actions/clone/Clone.vue +518 -518
  19. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +270 -269
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/Location.vue +1 -0
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  24. package/components/common/vm/actions/common/select/name/Name.vue +1 -0
  25. package/components/common/vm/actions/common/select/storage/Storage.vue +6 -1
  26. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +191 -166
  27. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  28. package/components/common/weekSelect/lib/config/options.ts +10 -10
  29. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +1 -1
  30. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +1 -1
  31. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +1 -1
  32. package/components/common/wizards/network/add/modals/SelectNetwork.vue +1 -0
  33. package/components/common/wizards/network/add/modals/SelectStandardSwitch.vue +1 -0
  34. package/components/common/wizards/network/add/modals/SelectSwitch.vue +1 -0
  35. package/components/common/wizards/network/add/steps/ConnectionSettings.vue +1 -0
  36. package/components/common/wizards/network/add/steps/IpFourSettings.vue +1 -0
  37. package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +1 -0
  38. package/components/common/wizards/vm/migrate/select/network/table/network/Network.vue +1 -0
  39. package/components/common/wizards/vm/migrate/select/network/table/useAt/UseAt.vue +1 -0
  40. package/components/common/wizards/vm/migrate/select/storage/table/datastore/Datastore.vue +1 -0
  41. package/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config.ts +27 -2
  42. package/components/common/wizards/vm/migrate/select/storage/table/disk/Disk.vue +1 -0
  43. package/composables/useAppVersion.ts +21 -21
  44. package/composables/useEnvLanguage.ts +20 -20
  45. package/lib/utils/sendTask.ts +72 -72
  46. package/minify.js +146 -146
  47. package/package.json +1 -1
  48. package/public/spice-console/application/codec.js +257 -257
  49. package/public/spice-console/lib/rasterEngine.js +907 -907
  50. package/public/spice-console/network/spicechannel.js +369 -369
  51. package/store/main/lib/interfaces.ts +9 -9
  52. package/store/tasks/actions.ts +133 -133
  53. package/store/tasks/getters.ts +25 -25
  54. package/store/tasks/lib/models/interfaces.ts +18 -18
  55. package/store/tasks/mutations.ts +58 -58
  56. package/store/tasks/state.ts +16 -16
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <div class="servers-list">
3
3
  <atoms-table-data-grid
4
- test-id="servers-list-table"
5
4
  v-model:selected-row="selectedDisk"
6
5
  v-model:page-size="pagination.pageSize"
7
6
  v-model:page="pagination.page"
8
7
  type="any"
9
8
  class="data-table"
9
+ test-id="servers-list-table"
10
10
  :head-items="headItems"
11
11
  :body-items="bodyItems"
12
12
  :total-items="1"
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="data-table-view">
3
3
  <atoms-table-data-grid
4
- test-id="host-table"
5
4
  v-model:selected-row="selectedDisk"
6
5
  v-model:column-keys="columnKeys"
7
6
  v-model:page-size="pagination.pageSize"
8
7
  v-model:page="pagination.page"
9
8
  type="checkbox"
10
9
  class="data-table"
10
+ test-id="host-table"
11
11
  :head-items="headItems"
12
12
  :body-items="bodyItems"
13
13
  :total-items="props.totalItems"
@@ -12,6 +12,7 @@
12
12
  v-if="isShowErrorMessageAlert"
13
13
  status="alert-danger"
14
14
  :items="[localization.noSwitchIsSelectedSelectSwitchToContinue]"
15
+ test-id="select-network-alert"
15
16
  @remove="onHideErrorMessageAlert"
16
17
  />
17
18
  <div class="network-select-dialog-content">
@@ -12,6 +12,7 @@
12
12
  v-if="isShowErrorMessageAlert"
13
13
  status="alert-danger"
14
14
  :items="[localization.noSwitchIsSelectedSelectSwitchToContinue]"
15
+ test-id="select-standard-switch-alert"
15
16
  @remove="onHideErrorMessageAlert"
16
17
  />
17
18
  <div class="table-top-margin-container">
@@ -12,6 +12,7 @@
12
12
  v-if="isShowErrorMessageAlert"
13
13
  status="alert-danger"
14
14
  :items="[localization.noSwitchIsSelectedSelectSwitchToContinue]"
15
+ test-id="select-switch-alert"
15
16
  @remove="onHideErrorMessageAlert"
16
17
  />
17
18
  <div class="table-top-margin-container">
@@ -5,6 +5,7 @@
5
5
  v-if="props.alertMessages.length"
6
6
  status="alert-danger"
7
7
  :items="props.alertMessages"
8
+ test-id="connection-settings-alert"
8
9
  @remove="onHideAlert"
9
10
  />
10
11
  <form>
@@ -5,6 +5,7 @@
5
5
  v-if="props.alertMessages.length"
6
6
  status="alert-danger"
7
7
  :items="props.alertMessages"
8
+ test-id="ip-four-settings-alert"
8
9
  @remove="onHideAlert"
9
10
  />
10
11
  <form>
@@ -11,6 +11,7 @@
11
11
  :total-pages="props.totalPages"
12
12
  :loading="loading"
13
13
  class="data-table"
14
+ test-id="compute-resource-table"
14
15
  server-off
15
16
  hide-page-size
16
17
  hide-pagination
@@ -10,6 +10,7 @@
10
10
  :total-items="bodyItems.length"
11
11
  :total-pages="1"
12
12
  class="select-network"
13
+ test-id="network-table"
13
14
  :off-select-by-row="props.type === 'advanced'"
14
15
  server-off
15
16
  hide-footer
@@ -8,6 +8,7 @@
8
8
  :page="1"
9
9
  :total-pages="1"
10
10
  class="select-network"
11
+ test-id="use-at-table"
11
12
  server-off
12
13
  off-select-by-row
13
14
  hide-footer
@@ -6,6 +6,7 @@
6
6
  v-model:page-size="pagination.pageSize"
7
7
  v-model:page="pagination.page"
8
8
  type="radio"
9
+ test-id="datastore-table"
9
10
  :head-items="headItems"
10
11
  :body-items="bodyItems"
11
12
  :total-items="bodyItems.length"
@@ -57,7 +57,9 @@ export const columnKeys = (
57
57
  const result: UI_I_ColumnKey[] = []
58
58
  getItems(localization).forEach((item, i) => {
59
59
  const col = i === 0 ? 'icon' : `col${i}`
60
- result.push(constructColumnKey(col, item[0], item[1]))
60
+ result.push(
61
+ constructColumnKey(col, item[0], item[1], `show-column-${item[3]}`)
62
+ )
61
63
  })
62
64
  return result
63
65
  }
@@ -66,7 +68,17 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
66
68
  const result: UI_I_HeadItem[] = []
67
69
  getItems(localization).forEach((item, i) => {
68
70
  const col = i === 0 ? 'icon' : `col${i}`
69
- result.push(constructHeadItem(col, item[0], item[3], true, item[2]))
71
+ result.push(
72
+ constructHeadItem(
73
+ col,
74
+ item[0],
75
+ item[3],
76
+ true,
77
+ item[2],
78
+ undefined,
79
+ item[3]
80
+ )
81
+ )
70
82
  })
71
83
  return result
72
84
  }
@@ -87,66 +99,79 @@ export const bodyItems = (
87
99
  text: storage[storageTableKeys[0]].toString(),
88
100
  data: `vsphere-icon-${datastoreIconByState[storage.state]}`,
89
101
  id: key,
102
+ testId: `storage-table-item-${key}`,
90
103
  },
91
104
  {
92
105
  key: 'col1',
93
106
  text: state,
94
107
  id: key,
108
+ testId: `storage-table-item-${key}`,
95
109
  },
96
110
  {
97
111
  key: 'col2',
98
112
  text: $binary.round(storage.capacity[storageTableKeys[2]]),
99
113
  id: key,
114
+ testId: `storage-table-item-${key}`,
100
115
  },
101
116
  {
102
117
  key: 'col3',
103
118
  text: $binary.round(storage.capacity[storageTableKeys[3]].toString()),
104
119
  id: key,
120
+ testId: `storage-table-item-${key}`,
105
121
  },
106
122
  {
107
123
  key: 'col4',
108
124
  text: $binary.round(storage.capacity[storageTableKeys[4]].toString()),
109
125
  id: key,
126
+ testId: `storage-table-item-${key}`,
110
127
  },
111
128
  {
112
129
  key: 'col5',
113
130
  text: $binary.round(storage.capacity[storageTableKeys[5]].toString()),
114
131
  id: key,
132
+ testId: `storage-table-item-${key}`,
115
133
  },
116
134
  {
117
135
  key: 'col6',
118
136
  text: storage[storageTableKeys[6]].toString(),
119
137
  id: key,
138
+ testId: `storage-table-item-${key}`,
120
139
  },
121
140
  {
122
141
  key: 'col7',
123
142
  text: storage[storageTableKeys[7]] ? localization.yes : localization.no,
124
143
  id: key,
144
+ testId: `storage-table-item-${key}`,
125
145
  },
126
146
  {
127
147
  key: 'col8',
128
148
  text: storage[storageTableKeys[8]].toString(),
129
149
  id: key,
150
+ testId: `storage-table-item-${key}`,
130
151
  },
131
152
  {
132
153
  key: 'col9',
133
154
  text: storage[storageTableKeys[9]].toString(),
134
155
  id: key,
156
+ testId: `storage-table-item-${key}`,
135
157
  },
136
158
  {
137
159
  key: 'col10',
138
160
  text: storage[storageTableKeys[10]].toString(),
139
161
  id: key,
162
+ testId: `storage-table-item-${key}`,
140
163
  },
141
164
  {
142
165
  key: 'col11',
143
166
  text: storage[storageTableKeys[11]].toString(),
144
167
  id: key,
168
+ testId: `storage-table-item-${key}`,
145
169
  },
146
170
  {
147
171
  key: 'col12',
148
172
  text: storage[storageTableKeys[12]].toString(),
149
173
  id: key,
174
+ testId: `storage-table-item-${key}`,
150
175
  },
151
176
  ])
152
177
  })
@@ -7,6 +7,7 @@
7
7
  v-model:page="pagination.page"
8
8
  type="checkbox"
9
9
  class="data-table"
10
+ test-id="disk-table"
10
11
  :head-items="headItems"
11
12
  :body-items="bodyItems"
12
13
  :total-items="bodyItems.length"
@@ -1,21 +1,21 @@
1
- import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
2
-
3
- export function useAppVersion(): UI_I_UseAppVersionReturnType {
4
- const config = useRuntimeConfig()
5
- const version = config.public.APP_VERSION
6
-
7
- const regexHasDot = /\./
8
- const regexHasDotAndB = /\..*b/
9
- const regexHasDotAndD = /\..*d/
10
-
11
- const isBeta = regexHasDotAndB.test(version)
12
- const isDev =
13
- regexHasDotAndD.test(version) ||
14
- (!regexHasDot.test(version) && version.length < 8)
15
-
16
- return {
17
- version,
18
- isBeta,
19
- isDev,
20
- }
21
- }
1
+ import type { UI_I_UseAppVersionReturnType } from '~/lib/models/composables/useAppVersion/interfaces'
2
+
3
+ export function useAppVersion(): UI_I_UseAppVersionReturnType {
4
+ const config = useRuntimeConfig()
5
+ const version = config.public.APP_VERSION
6
+
7
+ const regexHasDot = /\./
8
+ const regexHasDotAndB = /\..*b/
9
+ const regexHasDotAndD = /\..*d/
10
+
11
+ const isBeta = regexHasDotAndB.test(version)
12
+ const isDev =
13
+ regexHasDotAndD.test(version) ||
14
+ (!regexHasDot.test(version) && version.length < 8)
15
+
16
+ return {
17
+ version,
18
+ isBeta,
19
+ isDev,
20
+ }
21
+ }
@@ -1,20 +1,20 @@
1
- export function useEnvLanguage(): string {
2
- const { $store }: any = useNuxtApp()
3
-
4
- let localizationCode = 'en_US'
5
- const langFromLocalStorage =
6
- useLocalStorage('lang') || $store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
7
- if (langFromLocalStorage) {
8
- if (
9
- langFromLocalStorage === 'en_US' ||
10
- langFromLocalStorage === 'ru_RU' ||
11
- langFromLocalStorage === 'hy_AM'
12
- ) {
13
- localizationCode = langFromLocalStorage
14
- }
15
- }
16
-
17
- localizationCode = localizationCode.slice(0, 2).toUpperCase()
18
-
19
- return localizationCode
20
- }
1
+ export function useEnvLanguage(): string {
2
+ const { $store }: any = useNuxtApp()
3
+
4
+ let localizationCode = 'en_US'
5
+ const langFromLocalStorage =
6
+ useLocalStorage('lang') || $store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
7
+ if (langFromLocalStorage) {
8
+ if (
9
+ langFromLocalStorage === 'en_US' ||
10
+ langFromLocalStorage === 'ru_RU' ||
11
+ langFromLocalStorage === 'hy_AM'
12
+ ) {
13
+ localizationCode = langFromLocalStorage
14
+ }
15
+ }
16
+
17
+ localizationCode = localizationCode.slice(0, 2).toUpperCase()
18
+
19
+ return localizationCode
20
+ }
@@ -1,72 +1,72 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type {
3
- API_UI_I_Error,
4
- UI_I_RequestBody,
5
- } from '~/lib/models/store/interfaces'
6
- import type {
7
- UI_I_NotifyBodyMessage,
8
- UI_I_SendTaskParams,
9
- } from '~/lib/models/interfaces'
10
- import { base64 } from './base64'
11
-
12
- const localization = computed<UI_I_Localization>(() => useLocal())
13
-
14
- const showNotification = (message: UI_I_NotifyBodyMessage): void => {
15
- const { title, desc, status } = message
16
- const { $store } = useNuxtApp()
17
-
18
- // @ts-ignore
19
- $store.dispatch('main/A_SHOW_NOTIFICATION', {
20
- status,
21
- messages: [
22
- {
23
- title,
24
- descriptions: [desc],
25
- },
26
- ],
27
- headline: '',
28
- timeout: status === 'success' ? 3000 : '',
29
- })
30
- }
31
- const msgError: UI_I_NotifyBodyMessage = {
32
- status: 'error',
33
- title: localization.value.error,
34
- desc: '',
35
- }
36
- const handleErrors = (error: Ref<API_UI_I_Error>): void => {
37
- if (error.value.data?.error_message) {
38
- msgError.desc = error.value.data?.error_message
39
- showNotification(msgError)
40
- }
41
- }
42
-
43
- export const handleRequest = async (
44
- url: string,
45
- body: UI_I_RequestBody
46
- ): Promise<void> => {
47
- // @ts-ignore
48
- const { error } = await useMyFetch<never, API_UI_I_Error>(url, {
49
- body,
50
- method: 'POST',
51
- key: Date.now().toString(),
52
- })
53
-
54
- if (error.value && error.value.data.error_code !== 0) {
55
- handleErrors(error)
56
- }
57
- }
58
-
59
- export async function sendTask({
60
- method,
61
- target,
62
- args,
63
- }: UI_I_SendTaskParams): Promise<void> {
64
- const argsToBase64 = args ? base64.encode(args) : ''
65
- await handleRequest('/ui/tasks', {
66
- method,
67
- params: {
68
- target,
69
- args: argsToBase64,
70
- },
71
- })
72
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type {
3
+ API_UI_I_Error,
4
+ UI_I_RequestBody,
5
+ } from '~/lib/models/store/interfaces'
6
+ import type {
7
+ UI_I_NotifyBodyMessage,
8
+ UI_I_SendTaskParams,
9
+ } from '~/lib/models/interfaces'
10
+ import { base64 } from './base64'
11
+
12
+ const localization = computed<UI_I_Localization>(() => useLocal())
13
+
14
+ const showNotification = (message: UI_I_NotifyBodyMessage): void => {
15
+ const { title, desc, status } = message
16
+ const { $store } = useNuxtApp()
17
+
18
+ // @ts-ignore
19
+ $store.dispatch('main/A_SHOW_NOTIFICATION', {
20
+ status,
21
+ messages: [
22
+ {
23
+ title,
24
+ descriptions: [desc],
25
+ },
26
+ ],
27
+ headline: '',
28
+ timeout: status === 'success' ? 3000 : '',
29
+ })
30
+ }
31
+ const msgError: UI_I_NotifyBodyMessage = {
32
+ status: 'error',
33
+ title: localization.value.error,
34
+ desc: '',
35
+ }
36
+ const handleErrors = (error: Ref<API_UI_I_Error>): void => {
37
+ if (error.value.data?.error_message) {
38
+ msgError.desc = error.value.data?.error_message
39
+ showNotification(msgError)
40
+ }
41
+ }
42
+
43
+ export const handleRequest = async (
44
+ url: string,
45
+ body: UI_I_RequestBody
46
+ ): Promise<void> => {
47
+ // @ts-ignore
48
+ const { error } = await useMyFetch<never, API_UI_I_Error>(url, {
49
+ body,
50
+ method: 'POST',
51
+ key: Date.now().toString(),
52
+ })
53
+
54
+ if (error.value && error.value.data.error_code !== 0) {
55
+ handleErrors(error)
56
+ }
57
+ }
58
+
59
+ export async function sendTask({
60
+ method,
61
+ target,
62
+ args,
63
+ }: UI_I_SendTaskParams): Promise<void> {
64
+ const argsToBase64 = args ? base64.encode(args) : ''
65
+ await handleRequest('/ui/tasks', {
66
+ method,
67
+ params: {
68
+ target,
69
+ args: argsToBase64,
70
+ },
71
+ })
72
+ }