bfg-common 1.3.252 → 1.3.254

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 (38) 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/adapterManager/AdapterManager.vue +9 -8
  4. package/components/common/diagramMain/DiagramMain.vue +25 -21
  5. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +3 -3
  6. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +14 -16
  7. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +15 -32
  8. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +196 -186
  9. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +8 -12
  10. package/components/common/vm/actions/clone/Clone.vue +518 -518
  11. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
  12. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
  13. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/Location.vue +1 -0
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  16. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
  17. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  18. package/components/common/weekSelect/lib/config/options.ts +10 -10
  19. package/components/common/wizards/network/add/Add.vue +3 -17
  20. package/components/common/wizards/network/add/lib/models/interfaces.ts +3 -3
  21. package/components/common/wizards/network/add/steps/CreateStandardSwitch.vue +3 -3
  22. package/components/common/wizards/network/add/validations/networkValidation.ts +14 -18
  23. package/composables/useAppVersion.ts +21 -21
  24. package/composables/useEnvLanguage.ts +20 -20
  25. package/lib/utils/sendTask.ts +72 -72
  26. package/minify.js +146 -146
  27. package/modules/fixContentBuild/index.ts +0 -1
  28. package/modules/fixContentBuild/lib/utils/methods.ts +1 -1
  29. package/package.json +1 -1
  30. package/public/spice-console/application/codec.js +257 -257
  31. package/public/spice-console/lib/rasterEngine.js +907 -907
  32. package/public/spice-console/network/spicechannel.js +369 -369
  33. package/store/main/lib/interfaces.ts +9 -9
  34. package/store/tasks/actions.ts +133 -133
  35. package/store/tasks/getters.ts +25 -25
  36. package/store/tasks/lib/models/interfaces.ts +18 -18
  37. package/store/tasks/mutations.ts +58 -58
  38. package/store/tasks/state.ts +16 -16
@@ -175,7 +175,6 @@ const props = withDefaults(
175
175
  selectedStandardSwitchId?: string
176
176
  selectedSwitchId?: string
177
177
  tcpStacks?: UI_I_TCPStack[]
178
- tcpStackLoading?: boolean
179
178
  diagramsData?: UI_I_DiagramData[]
180
179
  isNetworkingLoading?: boolean
181
180
  }>(),
@@ -187,7 +186,6 @@ const props = withDefaults(
187
186
  selectedStandardSwitchId: '',
188
187
  selectedSwitchId: '',
189
188
  tcpStacks: () => [],
190
- tcpStackLoading: false,
191
189
  diagramsData: [],
192
190
  isNetworkingLoading: false,
193
191
  }
@@ -352,21 +350,13 @@ watch(
352
350
  )
353
351
 
354
352
  const onGetExistingStandardSwitches = (): void => {
355
- wizard.setLoader(true)
356
- emits('get-existing-standard-switches', () => wizard.setLoader(false))
353
+ emits('get-existing-standard-switches')
357
354
  }
358
355
 
359
356
  const onGetTcpStacks = (): void => {
360
357
  emits('get-tcp-stacks')
361
358
  }
362
359
 
363
- watch(
364
- () => props.tcpStackLoading,
365
- (newValue: boolean) => {
366
- wizard.setLoader(newValue)
367
- }
368
- )
369
-
370
360
  watch(
371
361
  () => wizard.selectedStepId,
372
362
  (newSelectedStep: number) => {
@@ -481,12 +471,8 @@ const onConfirmNoActiveAdaptersModal = (): void => {
481
471
  wizard.selectStepHard(wizard.waitingStepId)
482
472
  }
483
473
 
484
- const onGetFreeAdapters = (showAddAdapterModal: () => void): void => {
485
- wizard.setLoader(true)
486
- emits('get-free-adapters', () => {
487
- wizard.setLoader(false)
488
- showAddAdapterModal()
489
- })
474
+ const onGetFreeAdapters = (showModal: () => void): void => {
475
+ emits('get-free-adapters', showModal)
490
476
  }
491
477
 
492
478
  const checkFinal = async (): Promise<UI_I_ArbitraryObject<string>> => {
@@ -216,12 +216,12 @@ export interface UI_I_AddNetworkingEmits {
216
216
  type: string,
217
217
  hideModal: () => void
218
218
  ): void
219
- (event: 'get-existing-standard-switches', cb: () => void): void
219
+ (event: 'get-existing-standard-switches'): void
220
220
  (event: 'get-free-adapters', cb: () => void): void
221
221
  (
222
222
  event: 'check-network-label',
223
- networkLabel: string,
224
- cb: (error_message: string) => void
223
+ label: string,
224
+ sendMessage: (message: string) => void
225
225
  ): void
226
226
  (event: 'get-tcp-stacks'): void
227
227
  }
@@ -57,7 +57,7 @@ const props = defineProps<{
57
57
  }>()
58
58
 
59
59
  const emits = defineEmits<{
60
- (event: 'get-free-adapters', showAddAdapterModal: () => void): void
60
+ (event: 'get-free-adapters', showModal: () => void): void
61
61
  (event: 'change-added-adapters', addedAdapters: string[]): void
62
62
  (event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
63
63
  (event: 'confirm-no-active-adapters-modal'): void
@@ -68,8 +68,8 @@ const emits = defineEmits<{
68
68
  // UI_I_Localization
69
69
  const localization = computed<UI_I_Localization>(() => useLocal())
70
70
 
71
- const onGetFreeAdapters = (showAddAdapterModal: () => void): void =>
72
- emits('get-free-adapters', showAddAdapterModal)
71
+ const onGetFreeAdapters = (showModal: () => void): void =>
72
+ emits('get-free-adapters', showModal)
73
73
 
74
74
  const onChangeAddedAdapters = (addedAdapters: string[]): void =>
75
75
  emits('change-added-adapters', addedAdapters)
@@ -8,24 +8,24 @@ import {
8
8
  } from '~/components/atoms/wizard/lib/models/interfaces'
9
9
 
10
10
  const checkNetwork = async (
11
- networkLabel: string,
11
+ label: string,
12
12
  localization: UI_I_Localization,
13
13
  emits: UI_I_AddNetworkingEmits
14
14
  ): Promise<UI_I_AsyncCheckReturn> => {
15
- if (networkLabel) {
15
+ if (label) {
16
16
  return new Promise((resolve, _reject) =>
17
- emits('check-network-label', networkLabel, (error_message: string) => {
18
- if (error_message === '') {
17
+ emits('check-network-label', label, (message: string) => {
18
+ if (message === '') {
19
19
  resolve({
20
20
  isValid: true,
21
21
  message: '',
22
22
  })
23
23
  }
24
24
 
25
- if (error_message !== '') {
25
+ if (message !== '') {
26
26
  resolve({
27
27
  isValid: false,
28
- message: error_message,
28
+ message,
29
29
  })
30
30
  }
31
31
  })
@@ -40,7 +40,7 @@ const checkNetwork = async (
40
40
 
41
41
  export const checkNetworkAsync = async (
42
42
  value: UI_I_WizardStep[],
43
- networkLabel: string,
43
+ label: string,
44
44
  stepId: number,
45
45
  fieldName: string,
46
46
  emits: UI_I_AddNetworkingEmits,
@@ -49,21 +49,17 @@ export const checkNetworkAsync = async (
49
49
  ): Promise<UI_I_ValidationReturn> => {
50
50
  let stepHasError = false
51
51
 
52
- wizard.setLoader(true)
53
-
54
52
  const labelValidation: {
55
53
  isValid: boolean
56
54
  message: string
57
- } = await checkNetwork(networkLabel, localization, emits)
58
-
59
- wizard.setLoader(false)
55
+ } = await checkNetwork(label, localization, emits)
60
56
 
61
- if (labelValidation.message === 'onHideLoader') {
62
- return {
63
- newValue: value,
64
- stepHasError: true,
65
- }
66
- }
57
+ // if (labelValidation.message === '$hasError') {
58
+ // return {
59
+ // newValue: value,
60
+ // stepHasError: true,
61
+ // }
62
+ // }
67
63
 
68
64
  if (!labelValidation.isValid) {
69
65
  stepHasError = wizard.setValidation(stepId, fieldName, {
@@ -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
+ }