bfg-common 1.3.467 → 1.3.468

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 (109) hide show
  1. package/assets/scss/common/normalize.scss +340 -340
  2. package/components/atoms/TheIcon2.vue +1353 -1353
  3. package/components/atoms/loader/Loader.vue +30 -30
  4. package/components/atoms/loader/PreLoader.vue +38 -38
  5. package/components/atoms/switch/Switch.vue +111 -111
  6. package/components/atoms/table/compact/Compact.vue +526 -526
  7. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  8. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  9. package/components/common/context/Context.vue +99 -99
  10. package/components/common/layout/theHeader/LanguageSwitch.vue +102 -0
  11. package/components/common/layout/theHeader/TheHeader.vue +91 -0
  12. package/components/common/layout/theHeader/TheHeaderNew.vue +229 -0
  13. package/components/common/layout/theHeader/TheHeaderOld.vue +241 -0
  14. package/components/common/layout/theHeader/feedback/Feedback.vue +104 -0
  15. package/components/common/layout/theHeader/feedback/FeedbackNew.vue +63 -0
  16. package/components/common/layout/theHeader/feedback/FeedbackOld.vue +73 -0
  17. package/components/common/layout/theHeader/helpMenu/About.vue +110 -0
  18. package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +45 -0
  19. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +112 -0
  20. package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +25 -0
  21. package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +69 -0
  22. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/config/dropMenu.ts +22 -0
  23. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/models/types.ts +1 -0
  24. package/components/common/layout/theHeader/lib/models/types.ts +5 -0
  25. package/components/common/layout/theHeader/modals/Reconnect.vue +98 -0
  26. package/components/common/layout/theHeader/modals/RedirectLogin.vue +60 -0
  27. package/components/common/layout/theHeader/userMenu/UserMenu.vue +95 -0
  28. package/components/common/layout/theHeader/userMenu/lib/models/interfaces.ts +32 -0
  29. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +210 -0
  30. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/config/form.ts +31 -0
  31. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces.ts +12 -0
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/Inventory.vue +43 -0
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +119 -0
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/View.vue +113 -0
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +148 -0
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang.ts +10 -0
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions.ts +22 -0
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums.ts +9 -0
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces.ts +11 -0
  40. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types.ts +1 -0
  41. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +66 -0
  42. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +30 -0
  43. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces.ts +5 -0
  44. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts +68 -0
  45. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +1 -0
  46. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +67 -0
  47. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +27 -0
  48. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types.ts +1 -0
  49. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +114 -0
  50. package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +28 -0
  51. package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +36 -0
  52. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/config/dropMenu.ts +36 -0
  53. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/models/types.ts +5 -0
  54. package/components/common/lib/config/states.ts +160 -160
  55. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +142 -142
  56. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +248 -248
  57. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +288 -288
  58. package/components/common/readyToComplete/ReadyToComplete.vue +15 -15
  59. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  60. package/components/common/split/horizontal/Horizontal.vue +70 -70
  61. package/components/common/vm/actions/clone/Clone.vue +511 -511
  62. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +400 -400
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +329 -329
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +305 -305
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +168 -168
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +114 -114
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +192 -192
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +72 -72
  74. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  75. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  76. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  77. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  78. package/components/common/weekSelect/lib/config/options.ts +10 -10
  79. package/components/common/wizards/datastore/add/Add.vue +436 -436
  80. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  81. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  82. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  83. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  84. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  85. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  86. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  87. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  88. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  89. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  90. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  91. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  92. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  93. package/composables/useAppVersion.ts +22 -22
  94. package/composables/useEnvLanguage.ts +20 -20
  95. package/lib/utils/sendTask.ts +73 -73
  96. package/minify.js +146 -146
  97. package/package.json +2 -1
  98. package/plugins/spice-console/spice.console.ts +147 -147
  99. package/public/spice-console/application/codec.js +263 -263
  100. package/public/spice-console/lib/rasterEngine.js +907 -907
  101. package/public/spice-console/network/spicechannel.js +375 -375
  102. package/store/main/lib/interfaces.ts +9 -9
  103. package/store/tasks/actions.ts +133 -133
  104. package/store/tasks/getters.ts +25 -25
  105. package/store/tasks/lib/models/interfaces.ts +18 -18
  106. package/store/tasks/mutations.ts +58 -58
  107. package/store/tasks/state.ts +16 -16
  108. /package/components/{layout → common/layout}/theHeader/lib/models/enums.ts +0 -0
  109. /package/components/{layout → common/layout}/theHeader/lib/utils/localization.ts +0 -0
@@ -1,182 +1,182 @@
1
- <template>
2
- <div class="hardware-video-card">
3
- <atoms-stack-block :has-children="true" test-id="video-card-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-video-card"
7
- data-id="vm-wizard-toggle-block-video-card"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
11
- <atoms-the-icon
12
- v-show="invalid"
13
- width="24px"
14
- height="24px"
15
- class="is-error tooltip-trigger"
16
- name="info"
17
- />
18
- </div>
19
- </template>
20
- <template #stackBlockContent>
21
- <atoms-tooltip-error
22
- :has-error="!!apiError"
23
- selector=".vm-wizard-video-card"
24
- @remove="onRemoveValidationError"
25
- >
26
- <template #elem>
27
- <div class="select">
28
- <select
29
- id="vm-wizard-video-card"
30
- v-model="selectedVideoCard"
31
- data-id="vm-wizard-video-card-select"
32
- class="vm-wizard-video-card input-text-color"
33
- :disabled="props.isEdit && props.state !== 1"
34
- @click.stop
35
- >
36
- <option
37
- v-for="(item, key) in videoCardOptions"
38
- :key="key"
39
- :value="item.value"
40
- >
41
- {{ item.text }}
42
- </option>
43
- </select>
44
- </div>
45
- </template>
46
- <template #content>{{ apiError }}</template>
47
- </atoms-tooltip-error>
48
- </template>
49
- <template #stackChildren>
50
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
51
- v-model:number-displays="numberDisplays"
52
- :disabled="isDisabled"
53
- :error-validation-fields="props.errorValidationFields"
54
- @remove-error-by-title="emits('remove-error-by-title', $event)"
55
- />
56
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-total-video-memory
57
- v-model:total-video-memory="totalVideoMemory"
58
- :disabled="isDisabled"
59
- :is-edit="props.isEdit"
60
- :error-validation-fields="props.errorValidationFields"
61
- @invalid="invalid = $event"
62
- @remove-error-by-title="emits('remove-error-by-title', $event)"
63
- />
64
- <!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
65
- <!-- v-models:graphics="graphics"-->
66
- <!-- />-->
67
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
68
- v-model:video-card-model="videoCardModel"
69
- :disabled="isDisabled"
70
- />
71
- </template>
72
- </atoms-stack-block>
73
- </div>
74
- </template>
75
-
76
- <script setup lang="ts">
77
- import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
78
- import { UI_I_Localization } from '~/lib/models/interfaces'
79
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
80
- import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
81
- import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
82
- import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
83
-
84
- const props = defineProps<{
85
- isEdit: boolean
86
- errorValidationFields: UI_I_ErrorValidationField[]
87
- videoCard?: UI_I_SendDataVideoCard
88
- state?: string | number
89
- }>()
90
- const emits = defineEmits<{
91
- (event: 'send-data', value: UI_I_SendDataVideoCard): void
92
- (event: 'invalid', value: boolean): void
93
- (event: 'remove-error-by-title', value: string): void
94
- }>()
95
-
96
- const localization = computed<UI_I_Localization>(() => useLocal())
97
-
98
- const selectedVideoCard = ref<number>(1)
99
- const videoCardOptions = ref<UI_I_OptionItem[]>(
100
- videoCardOptionsFunc(localization.value)
101
- )
102
-
103
- const isDisabled = computed<boolean>(
104
- () => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
105
- )
106
- watch(isDisabled, (val) => {
107
- if (!val) {
108
- return
109
- }
110
-
111
- numberDisplays.value = '1'
112
- })
113
- const numberDisplays = ref<string>('1')
114
-
115
- const totalVideoMemory = ref<number>(8)
116
- const invalid = ref<boolean>(false)
117
- watch(
118
- invalid,
119
- (newValue) => {
120
- emits('invalid', newValue)
121
- },
122
- { immediate: true }
123
- )
124
-
125
- // const graphics = ref(false)
126
-
127
- const videoCardModel = ref<string>('qxl')
128
- const videoCardModelOptions = ref<UI_I_OptionItem[]>(
129
- videoCardModelOptionsConfig
130
- )
131
- const videoCardModelName = computed<string>(
132
- () =>
133
- videoCardModelOptions.value.find(
134
- (videoCard) => videoCard.value === videoCardModel.value
135
- )?.text || ''
136
- )
137
-
138
- watch(
139
- [numberDisplays, totalVideoMemory, videoCardModel],
140
- () => {
141
- emits('send-data', {
142
- adapter: videoCardModel.value,
143
- displays: +numberDisplays.value,
144
- memory_mb: totalVideoMemory.value,
145
- })
146
- },
147
- { immediate: true }
148
- )
149
-
150
- // Добавляем данные для редактирования
151
- watch(
152
- () => props.videoCard,
153
- (newValue) => {
154
- if (!newValue) return
155
-
156
- selectedVideoCard.value = 1
157
- videoCardModel.value = newValue.adapter
158
- numberDisplays.value = '' + newValue.displays
159
- totalVideoMemory.value = newValue.memory_mb
160
- },
161
- { immediate: true }
162
- )
163
-
164
- const typeError = 'video_card.adapter'
165
-
166
- const apiError = computed<string>(() => {
167
- return (
168
- props.errorValidationFields?.find((message) => message.field === typeError)
169
- ?.error_message || ''
170
- )
171
- })
172
-
173
- const onRemoveValidationError = (): void => {
174
- emits('remove-error-by-title', typeError)
175
- }
176
- </script>
177
-
178
- <style scoped lang="scss">
179
- #network-connect {
180
- margin-right: 4px;
181
- }
182
- </style>
1
+ <template>
2
+ <div class="hardware-video-card">
3
+ <atoms-stack-block :has-children="true" test-id="video-card-stack-block">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-video-card"
7
+ data-id="vm-wizard-toggle-block-video-card"
8
+ class="flex-align-center"
9
+ >
10
+ <span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
11
+ <atoms-the-icon
12
+ v-show="invalid"
13
+ width="24px"
14
+ height="24px"
15
+ class="is-error tooltip-trigger"
16
+ name="info"
17
+ />
18
+ </div>
19
+ </template>
20
+ <template #stackBlockContent>
21
+ <atoms-tooltip-error
22
+ :has-error="!!apiError"
23
+ selector=".vm-wizard-video-card"
24
+ @remove="onRemoveValidationError"
25
+ >
26
+ <template #elem>
27
+ <div class="select">
28
+ <select
29
+ id="vm-wizard-video-card"
30
+ v-model="selectedVideoCard"
31
+ data-id="vm-wizard-video-card-select"
32
+ class="vm-wizard-video-card input-text-color"
33
+ :disabled="props.isEdit && props.state !== 1"
34
+ @click.stop
35
+ >
36
+ <option
37
+ v-for="(item, key) in videoCardOptions"
38
+ :key="key"
39
+ :value="item.value"
40
+ >
41
+ {{ item.text }}
42
+ </option>
43
+ </select>
44
+ </div>
45
+ </template>
46
+ <template #content>{{ apiError }}</template>
47
+ </atoms-tooltip-error>
48
+ </template>
49
+ <template #stackChildren>
50
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
51
+ v-model:number-displays="numberDisplays"
52
+ :disabled="isDisabled"
53
+ :error-validation-fields="props.errorValidationFields"
54
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
55
+ />
56
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-total-video-memory
57
+ v-model:total-video-memory="totalVideoMemory"
58
+ :disabled="isDisabled"
59
+ :is-edit="props.isEdit"
60
+ :error-validation-fields="props.errorValidationFields"
61
+ @invalid="invalid = $event"
62
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
63
+ />
64
+ <!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
65
+ <!-- v-models:graphics="graphics"-->
66
+ <!-- />-->
67
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
68
+ v-model:video-card-model="videoCardModel"
69
+ :disabled="isDisabled"
70
+ />
71
+ </template>
72
+ </atoms-stack-block>
73
+ </div>
74
+ </template>
75
+
76
+ <script setup lang="ts">
77
+ import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
78
+ import { UI_I_Localization } from '~/lib/models/interfaces'
79
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
80
+ import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
81
+ import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
82
+ import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
83
+
84
+ const props = defineProps<{
85
+ isEdit: boolean
86
+ errorValidationFields: UI_I_ErrorValidationField[]
87
+ videoCard?: UI_I_SendDataVideoCard
88
+ state?: string | number
89
+ }>()
90
+ const emits = defineEmits<{
91
+ (event: 'send-data', value: UI_I_SendDataVideoCard): void
92
+ (event: 'invalid', value: boolean): void
93
+ (event: 'remove-error-by-title', value: string): void
94
+ }>()
95
+
96
+ const localization = computed<UI_I_Localization>(() => useLocal())
97
+
98
+ const selectedVideoCard = ref<number>(1)
99
+ const videoCardOptions = ref<UI_I_OptionItem[]>(
100
+ videoCardOptionsFunc(localization.value)
101
+ )
102
+
103
+ const isDisabled = computed<boolean>(
104
+ () => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
105
+ )
106
+ watch(isDisabled, (val) => {
107
+ if (!val) {
108
+ return
109
+ }
110
+
111
+ numberDisplays.value = '1'
112
+ })
113
+ const numberDisplays = ref<string>('1')
114
+
115
+ const totalVideoMemory = ref<number>(8)
116
+ const invalid = ref<boolean>(false)
117
+ watch(
118
+ invalid,
119
+ (newValue) => {
120
+ emits('invalid', newValue)
121
+ },
122
+ { immediate: true }
123
+ )
124
+
125
+ // const graphics = ref(false)
126
+
127
+ const videoCardModel = ref<string>('qxl')
128
+ const videoCardModelOptions = ref<UI_I_OptionItem[]>(
129
+ videoCardModelOptionsConfig
130
+ )
131
+ const videoCardModelName = computed<string>(
132
+ () =>
133
+ videoCardModelOptions.value.find(
134
+ (videoCard) => videoCard.value === videoCardModel.value
135
+ )?.text || ''
136
+ )
137
+
138
+ watch(
139
+ [numberDisplays, totalVideoMemory, videoCardModel],
140
+ () => {
141
+ emits('send-data', {
142
+ adapter: videoCardModel.value,
143
+ displays: +numberDisplays.value,
144
+ memory_mb: totalVideoMemory.value,
145
+ })
146
+ },
147
+ { immediate: true }
148
+ )
149
+
150
+ // Добавляем данные для редактирования
151
+ watch(
152
+ () => props.videoCard,
153
+ (newValue) => {
154
+ if (!newValue) return
155
+
156
+ selectedVideoCard.value = 1
157
+ videoCardModel.value = newValue.adapter
158
+ numberDisplays.value = '' + newValue.displays
159
+ totalVideoMemory.value = newValue.memory_mb
160
+ },
161
+ { immediate: true }
162
+ )
163
+
164
+ const typeError = 'video_card.adapter'
165
+
166
+ const apiError = computed<string>(() => {
167
+ return (
168
+ props.errorValidationFields?.find((message) => message.field === typeError)
169
+ ?.error_message || ''
170
+ )
171
+ })
172
+
173
+ const onRemoveValidationError = (): void => {
174
+ emits('remove-error-by-title', typeError)
175
+ }
176
+ </script>
177
+
178
+ <style scoped lang="scss">
179
+ #network-connect {
180
+ margin-right: 4px;
181
+ }
182
+ </style>
@@ -1,114 +1,114 @@
1
- <template>
2
- <div class="boot-options">
3
- <atoms-stack-block :has-children="true" test-id="boot-options-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-boot-option"
7
- data-id="vm-wizard-toggle-block-boot-option"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.bootOptions }}</span>
11
- </div>
12
- </template>
13
- <template #stackChildren>
14
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-firmware
15
- v-model:firmware="firmware"
16
- :error-validation-fields="props.errorValidationFields"
17
- :is-edit="props.isEdit"
18
- @remove-error-by-title="emits('remove-error-by-title', $event)"
19
- />
20
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-secure
21
- v-if="firmware === 'uefi'"
22
- v-model:secure-boot="secureBoot"
23
- />
24
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-menu
25
- v-model:boot-menu="bootMenu"
26
- />
27
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-delay
28
- v-model:boot-delay="bootDelay"
29
- />
30
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-order
31
- :hard-disks="props.hardDisks"
32
- :cd-dvd-drives="props.cdDvdDrives"
33
- :networks="props.networks"
34
- @change="onChangeBootOrder"
35
- />
36
- </template>
37
- </atoms-stack-block>
38
- </div>
39
- </template>
40
-
41
- <script setup lang="ts">
42
- import { UI_I_SendDataBootOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
43
- import {
44
- UI_I_SendDataNewCdDvdDrive,
45
- UI_I_SendDataNewHardDisk,
46
- UI_I_SendDataNewNetwork,
47
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
48
- import { UI_I_Localization } from '~/lib/models/interfaces'
49
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
50
- import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
51
-
52
- const emits = defineEmits<{
53
- (
54
- event: 'change-boot-order',
55
- value: [
56
- UI_I_SendDataNewHardDisk[],
57
- UI_I_SendDataNewCdDvdDrive[],
58
- UI_I_SendDataNewNetwork[]
59
- ]
60
- ): void
61
- (event: 'send-data', value: UI_I_SendDataBootOptions): void
62
- (event: 'remove-error-by-title', value: string): void
63
- }>()
64
-
65
- const localization = computed<UI_I_Localization>(() => useLocal())
66
-
67
- const props = defineProps<{
68
- errorValidationFields: UI_I_ErrorValidationField[]
69
- hardDisks: UI_I_SendDataNewHardDisk[] | null
70
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
71
- networks: UI_I_SendDataNewNetwork[] | null
72
- bootOptions?: UI_I_SendDataBootOptions
73
- isEdit: boolean
74
- }>()
75
-
76
- const firmware = ref<string>('efi')
77
-
78
- const secureBoot = ref<boolean>(true)
79
-
80
- const bootMenu = ref<boolean>(true)
81
-
82
- const bootDelay = ref<number>(1000)
83
-
84
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
85
- emits('change-boot-order', data)
86
- }
87
-
88
- watch(
89
- [firmware, secureBoot, bootMenu, bootDelay],
90
- () => {
91
- emits('send-data', {
92
- firmware: firmware.value,
93
- boot_delay_ms: bootDelay.value,
94
- boot_menu: bootMenu.value,
95
- })
96
- },
97
- { immediate: true }
98
- )
99
-
100
- // Добавляем данные для редактирования
101
- watch(
102
- () => props.bootOptions,
103
- (newValue) => {
104
- if (!newValue || !props.bootOptions) return
105
-
106
- firmware.value = props.bootOptions.firmware
107
- bootDelay.value = props.bootOptions.boot_delay_ms
108
- bootMenu.value = props.bootOptions.boot_menu
109
- },
110
- { immediate: true }
111
- )
112
- </script>
113
-
114
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div class="boot-options">
3
+ <atoms-stack-block :has-children="true" test-id="boot-options-stack-block">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-boot-option"
7
+ data-id="vm-wizard-toggle-block-boot-option"
8
+ class="flex-align-center"
9
+ >
10
+ <span>{{ localization.bootOptions }}</span>
11
+ </div>
12
+ </template>
13
+ <template #stackChildren>
14
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options-firmware
15
+ v-model:firmware="firmware"
16
+ :error-validation-fields="props.errorValidationFields"
17
+ :is-edit="props.isEdit"
18
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
19
+ />
20
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options-secure
21
+ v-if="firmware === 'uefi'"
22
+ v-model:secure-boot="secureBoot"
23
+ />
24
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options-menu
25
+ v-model:boot-menu="bootMenu"
26
+ />
27
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options-delay
28
+ v-model:boot-delay="bootDelay"
29
+ />
30
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options-order
31
+ :hard-disks="props.hardDisks"
32
+ :cd-dvd-drives="props.cdDvdDrives"
33
+ :networks="props.networks"
34
+ @change="onChangeBootOrder"
35
+ />
36
+ </template>
37
+ </atoms-stack-block>
38
+ </div>
39
+ </template>
40
+
41
+ <script setup lang="ts">
42
+ import { UI_I_SendDataBootOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
43
+ import {
44
+ UI_I_SendDataNewCdDvdDrive,
45
+ UI_I_SendDataNewHardDisk,
46
+ UI_I_SendDataNewNetwork,
47
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
48
+ import { UI_I_Localization } from '~/lib/models/interfaces'
49
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
50
+ import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
51
+
52
+ const emits = defineEmits<{
53
+ (
54
+ event: 'change-boot-order',
55
+ value: [
56
+ UI_I_SendDataNewHardDisk[],
57
+ UI_I_SendDataNewCdDvdDrive[],
58
+ UI_I_SendDataNewNetwork[]
59
+ ]
60
+ ): void
61
+ (event: 'send-data', value: UI_I_SendDataBootOptions): void
62
+ (event: 'remove-error-by-title', value: string): void
63
+ }>()
64
+
65
+ const localization = computed<UI_I_Localization>(() => useLocal())
66
+
67
+ const props = defineProps<{
68
+ errorValidationFields: UI_I_ErrorValidationField[]
69
+ hardDisks: UI_I_SendDataNewHardDisk[] | null
70
+ cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
71
+ networks: UI_I_SendDataNewNetwork[] | null
72
+ bootOptions?: UI_I_SendDataBootOptions
73
+ isEdit: boolean
74
+ }>()
75
+
76
+ const firmware = ref<string>('efi')
77
+
78
+ const secureBoot = ref<boolean>(true)
79
+
80
+ const bootMenu = ref<boolean>(true)
81
+
82
+ const bootDelay = ref<number>(1000)
83
+
84
+ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
85
+ emits('change-boot-order', data)
86
+ }
87
+
88
+ watch(
89
+ [firmware, secureBoot, bootMenu, bootDelay],
90
+ () => {
91
+ emits('send-data', {
92
+ firmware: firmware.value,
93
+ boot_delay_ms: bootDelay.value,
94
+ boot_menu: bootMenu.value,
95
+ })
96
+ },
97
+ { immediate: true }
98
+ )
99
+
100
+ // Добавляем данные для редактирования
101
+ watch(
102
+ () => props.bootOptions,
103
+ (newValue) => {
104
+ if (!newValue || !props.bootOptions) return
105
+
106
+ firmware.value = props.bootOptions.firmware
107
+ bootDelay.value = props.bootOptions.boot_delay_ms
108
+ bootMenu.value = props.bootOptions.boot_menu
109
+ },
110
+ { immediate: true }
111
+ )
112
+ </script>
113
+
114
+ <style scoped lang="scss"></style>