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,235 +1,235 @@
1
- <template>
2
- <div class="select-name">
3
- <atoms-alert
4
- v-show="errors.length"
5
- status="alert-danger"
6
- :items="errors"
7
- test-id="name-alert"
8
- @remove="onRemoveValidationErrors"
9
- />
10
-
11
- <form id="virtual-machine-form" @submit.prevent>
12
- <label for="virtual-machine-name"
13
- >{{ localization.virtualMachineName }}:</label
14
- >
15
- <input
16
- id="virtual-machine-name"
17
- v-model.trim="vmName"
18
- data-id="virtual-machine-name-input"
19
- type="text"
20
- />
21
- <div id="vm-name-help-icon" class="content-signpost relative">
22
- <atoms-the-icon
23
- data-id="show-vm-name-help-icon"
24
- class="icon-show-help"
25
- fill="#0072a3"
26
- width="24px"
27
- height="24px"
28
- name="info-circle"
29
- @click="isShowHelp = !isShowHelp"
30
- />
31
- <atoms-tooltip-signpost
32
- v-if="isShowHelp"
33
- test-id="help-signpost"
34
- elem-id="vm-name-help-icon"
35
- @hide="isShowHelp = false"
36
- >
37
- <p>
38
- {{ localization.vmNameValidationDescription }}
39
- </p>
40
- </atoms-tooltip-signpost>
41
- </div>
42
- </form>
43
-
44
- <template v-if="props.project === 'sphere'">
45
- <p class="new-vm-name-and-folder-instructions mt-1">
46
- {{ localization.selectLocationVirtualMachine }}
47
- </p>
48
- <div class="tree-view-wrap">
49
- <common-vm-actions-add-folder-tree-view
50
- :data-center="props.dataCenter"
51
- @select-node="onSelectNode"
52
- />
53
- </div>
54
- </template>
55
- </div>
56
- </template>
57
-
58
- <script setup lang="ts">
59
- // import { API_UI_I_Error } from '~/lib/models/store/interfaces'
60
- import { UI_I_Localization } from '~/lib/models/interfaces'
61
- import { UI_T_Project } from '~/lib/models/types'
62
- import { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
63
-
64
- const props = defineProps<{
65
- nameFormSubmit: null | Function
66
- show: boolean
67
- project: UI_T_Project
68
- dataCenter?: UI_I_TreeNode // для сферы
69
- }>()
70
- const emits = defineEmits<{
71
- (event: 'submit', value: [string, UI_I_TreeNode | null]): void
72
- (event: 'loading', value: boolean): void
73
- (
74
- event: 'check-name',
75
- value: [[string, UI_I_TreeNode | null], (error: any) => void]
76
- ): void
77
- }>()
78
-
79
- const localization = computed<UI_I_Localization>(() => useLocal())
80
-
81
- const vmName = ref<string>('')
82
-
83
- const selectedNode = ref<UI_I_TreeNode | null>(null)
84
- const onSelectNode = (node: UI_I_TreeNode): void => {
85
- selectedNode.value = node
86
- }
87
-
88
- watch(
89
- () => props.nameFormSubmit,
90
- (newValue) => {
91
- newValue && submit(newValue)
92
- }
93
- )
94
-
95
- const isParentDatacenter = (node: UI_I_TreeNode | null): boolean => {
96
- if (!node) return false
97
-
98
- if (node.parent?.type === 'datacenter') return true
99
- if (node.parent?.type === 'folder') return isParentDatacenter(node.parent)
100
- return false
101
- }
102
- const submit = async (cb: Function): Promise<void> => {
103
- const name = vmName.value
104
-
105
- if (name !== '') {
106
- const isNameValid = await checkNameIsValid(name)
107
- if (!isNameValid) {
108
- cb(false)
109
- return
110
- }
111
- }
112
-
113
- if (props.project === 'sphere') {
114
- // const isDatacenterFolder = isParentDatacenter(selectedNode.value)
115
-
116
- if (
117
- // selectedNode.value?.type !== 'datacenter' &&
118
- // selectedNode.value?.type === 'folder' &&
119
- // !isDatacenterFolder
120
- // TODO рефакторинг, здесь сейчас проверяем является ли выбранный элемент датацентром или папкой(вм)
121
- ![3, 7].includes(selectedNode.value?.kind)
122
- ) {
123
- showValidationErrors([
124
- localization.value.enterValidLocationVirtualMachine,
125
- ])
126
- cb(false)
127
- return
128
- }
129
- }
130
-
131
- onRemoveValidationErrors()
132
- emits('submit', [name, selectedNode.value])
133
- cb(true)
134
- }
135
- const checkNameIsValid = async (name: string): Promise<boolean> => {
136
- emits('loading', true)
137
-
138
- return new Promise((resolve) => {
139
- emits('check-name', [
140
- [name, selectedNode.value],
141
- (error) => {
142
- emits('loading', false)
143
-
144
- const status = error?.statusCode || 200
145
- switch (status) {
146
- case 405: // Invalid kind
147
- showValidationErrors([
148
- localization.value.kindValidationDescription,
149
- ])
150
- resolve(false)
151
- break
152
- case 406: // Invalid name
153
- showValidationErrors([
154
- localization.value.vmNameValidationDescription,
155
- ])
156
- resolve(false)
157
- break
158
- case 409: // Name exist
159
- showValidationErrors([
160
- localization.value.vmNameExistInSelectedLocation,
161
- ])
162
- resolve(false)
163
- break
164
- }
165
-
166
- resolve(true)
167
- },
168
- ])
169
- })
170
- }
171
-
172
- const errors = ref<string[]>([])
173
- const showValidationErrors = (data: string[]): void => {
174
- errors.value = data
175
- }
176
- const onRemoveValidationErrors = (): void => {
177
- errors.value = []
178
- }
179
-
180
- watch(
181
- () => props.show,
182
- (newValue) => {
183
- if (!newValue) return
184
-
185
- const input = document.getElementById('virtual-machine-name')
186
- if (!input) return
187
-
188
- setTimeout(() => {
189
- input.focus()
190
- }, 0)
191
- }
192
- )
193
-
194
- const isShowHelp = ref<boolean>(false)
195
- </script>
196
-
197
- <style scoped lang="scss">
198
- .select-name {
199
- form {
200
- display: flex;
201
- align-items: center;
202
- padding-top: 20px;
203
-
204
- label {
205
- width: 216px;
206
- }
207
- input {
208
- width: 345px;
209
- }
210
- }
211
-
212
- .tree-view-wrap {
213
- position: relative;
214
- border: 1px solid #000;
215
- padding: 5px;
216
- max-height: 300px;
217
- min-height: 200px;
218
- overflow: auto;
219
- margin-bottom: 10px;
220
- }
221
- }
222
- .content-signpost {
223
- .icon-show-help {
224
- cursor: pointer;
225
- }
226
-
227
- .help-title {
228
- font-size: 22px;
229
- margin-bottom: 24px;
230
- }
231
- .signpost {
232
- max-width: 360px;
233
- }
234
- }
235
- </style>
1
+ <template>
2
+ <div class="select-name">
3
+ <atoms-alert
4
+ v-show="errors.length"
5
+ status="alert-danger"
6
+ :items="errors"
7
+ test-id="name-alert"
8
+ @remove="onRemoveValidationErrors"
9
+ />
10
+
11
+ <form id="virtual-machine-form" @submit.prevent>
12
+ <label for="virtual-machine-name"
13
+ >{{ localization.virtualMachineName }}:</label
14
+ >
15
+ <input
16
+ id="virtual-machine-name"
17
+ v-model.trim="vmName"
18
+ data-id="virtual-machine-name-input"
19
+ type="text"
20
+ />
21
+ <div id="vm-name-help-icon" class="content-signpost relative">
22
+ <atoms-the-icon
23
+ data-id="show-vm-name-help-icon"
24
+ class="icon-show-help"
25
+ fill="#0072a3"
26
+ width="24px"
27
+ height="24px"
28
+ name="info-circle"
29
+ @click="isShowHelp = !isShowHelp"
30
+ />
31
+ <atoms-tooltip-signpost
32
+ v-if="isShowHelp"
33
+ test-id="help-signpost"
34
+ elem-id="vm-name-help-icon"
35
+ @hide="isShowHelp = false"
36
+ >
37
+ <p>
38
+ {{ localization.vmNameValidationDescription }}
39
+ </p>
40
+ </atoms-tooltip-signpost>
41
+ </div>
42
+ </form>
43
+
44
+ <template v-if="props.project === 'sphere'">
45
+ <p class="new-vm-name-and-folder-instructions mt-1">
46
+ {{ localization.selectLocationVirtualMachine }}
47
+ </p>
48
+ <div class="tree-view-wrap">
49
+ <common-vm-actions-add-folder-tree-view
50
+ :data-center="props.dataCenter"
51
+ @select-node="onSelectNode"
52
+ />
53
+ </div>
54
+ </template>
55
+ </div>
56
+ </template>
57
+
58
+ <script setup lang="ts">
59
+ // import { API_UI_I_Error } from '~/lib/models/store/interfaces'
60
+ import { UI_I_Localization } from '~/lib/models/interfaces'
61
+ import { UI_T_Project } from '~/lib/models/types'
62
+ import { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
63
+
64
+ const props = defineProps<{
65
+ nameFormSubmit: null | Function
66
+ show: boolean
67
+ project: UI_T_Project
68
+ dataCenter?: UI_I_TreeNode // для сферы
69
+ }>()
70
+ const emits = defineEmits<{
71
+ (event: 'submit', value: [string, UI_I_TreeNode | null]): void
72
+ (event: 'loading', value: boolean): void
73
+ (
74
+ event: 'check-name',
75
+ value: [[string, UI_I_TreeNode | null], (error: any) => void]
76
+ ): void
77
+ }>()
78
+
79
+ const localization = computed<UI_I_Localization>(() => useLocal())
80
+
81
+ const vmName = ref<string>('')
82
+
83
+ const selectedNode = ref<UI_I_TreeNode | null>(null)
84
+ const onSelectNode = (node: UI_I_TreeNode): void => {
85
+ selectedNode.value = node
86
+ }
87
+
88
+ watch(
89
+ () => props.nameFormSubmit,
90
+ (newValue) => {
91
+ newValue && submit(newValue)
92
+ }
93
+ )
94
+
95
+ const isParentDatacenter = (node: UI_I_TreeNode | null): boolean => {
96
+ if (!node) return false
97
+
98
+ if (node.parent?.type === 'datacenter') return true
99
+ if (node.parent?.type === 'folder') return isParentDatacenter(node.parent)
100
+ return false
101
+ }
102
+ const submit = async (cb: Function): Promise<void> => {
103
+ const name = vmName.value
104
+
105
+ if (name !== '') {
106
+ const isNameValid = await checkNameIsValid(name)
107
+ if (!isNameValid) {
108
+ cb(false)
109
+ return
110
+ }
111
+ }
112
+
113
+ if (props.project === 'sphere') {
114
+ // const isDatacenterFolder = isParentDatacenter(selectedNode.value)
115
+
116
+ if (
117
+ // selectedNode.value?.type !== 'datacenter' &&
118
+ // selectedNode.value?.type === 'folder' &&
119
+ // !isDatacenterFolder
120
+ // TODO рефакторинг, здесь сейчас проверяем является ли выбранный элемент датацентром или папкой(вм)
121
+ ![3, 7].includes(selectedNode.value?.kind)
122
+ ) {
123
+ showValidationErrors([
124
+ localization.value.enterValidLocationVirtualMachine,
125
+ ])
126
+ cb(false)
127
+ return
128
+ }
129
+ }
130
+
131
+ onRemoveValidationErrors()
132
+ emits('submit', [name, selectedNode.value])
133
+ cb(true)
134
+ }
135
+ const checkNameIsValid = async (name: string): Promise<boolean> => {
136
+ emits('loading', true)
137
+
138
+ return new Promise((resolve) => {
139
+ emits('check-name', [
140
+ [name, selectedNode.value],
141
+ (error) => {
142
+ emits('loading', false)
143
+
144
+ const status = error?.statusCode || 200
145
+ switch (status) {
146
+ case 405: // Invalid kind
147
+ showValidationErrors([
148
+ localization.value.kindValidationDescription,
149
+ ])
150
+ resolve(false)
151
+ break
152
+ case 406: // Invalid name
153
+ showValidationErrors([
154
+ localization.value.vmNameValidationDescription,
155
+ ])
156
+ resolve(false)
157
+ break
158
+ case 409: // Name exist
159
+ showValidationErrors([
160
+ localization.value.vmNameExistInSelectedLocation,
161
+ ])
162
+ resolve(false)
163
+ break
164
+ }
165
+
166
+ resolve(true)
167
+ },
168
+ ])
169
+ })
170
+ }
171
+
172
+ const errors = ref<string[]>([])
173
+ const showValidationErrors = (data: string[]): void => {
174
+ errors.value = data
175
+ }
176
+ const onRemoveValidationErrors = (): void => {
177
+ errors.value = []
178
+ }
179
+
180
+ watch(
181
+ () => props.show,
182
+ (newValue) => {
183
+ if (!newValue) return
184
+
185
+ const input = document.getElementById('virtual-machine-name')
186
+ if (!input) return
187
+
188
+ setTimeout(() => {
189
+ input.focus()
190
+ }, 0)
191
+ }
192
+ )
193
+
194
+ const isShowHelp = ref<boolean>(false)
195
+ </script>
196
+
197
+ <style scoped lang="scss">
198
+ .select-name {
199
+ form {
200
+ display: flex;
201
+ align-items: center;
202
+ padding-top: 20px;
203
+
204
+ label {
205
+ width: 216px;
206
+ }
207
+ input {
208
+ width: 345px;
209
+ }
210
+ }
211
+
212
+ .tree-view-wrap {
213
+ position: relative;
214
+ border: 1px solid #000;
215
+ padding: 5px;
216
+ max-height: 300px;
217
+ min-height: 200px;
218
+ overflow: auto;
219
+ margin-bottom: 10px;
220
+ }
221
+ }
222
+ .content-signpost {
223
+ .icon-show-help {
224
+ cursor: pointer;
225
+ }
226
+
227
+ .help-title {
228
+ font-size: 22px;
229
+ margin-bottom: 24px;
230
+ }
231
+ .signpost {
232
+ max-width: 360px;
233
+ }
234
+ }
235
+ </style>