bfg-common 1.0.30 → 1.0.32

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 (61) hide show
  1. package/assets/localization/local_be.json +2011 -2010
  2. package/assets/localization/local_en.json +2011 -2010
  3. package/assets/localization/local_hy.json +2011 -2010
  4. package/assets/localization/local_kk.json +2011 -2010
  5. package/assets/localization/local_ru.json +2011 -2010
  6. package/assets/localization/local_zh.json +2011 -2010
  7. package/components/atoms/alert/Notification.vue +167 -167
  8. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  9. package/components/atoms/datepicker/Datepicker.vue +612 -612
  10. package/components/atoms/list/SelectList.vue +62 -62
  11. package/components/atoms/modal/bySteps/BySteps.vue +234 -234
  12. package/components/atoms/nav/NavBar.vue +116 -116
  13. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  14. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  15. package/components/atoms/perPage/PerPage.vue +52 -52
  16. package/components/atoms/popup/SimplePopup.vue +90 -90
  17. package/components/atoms/step/VerticalStep.vue +104 -104
  18. package/components/atoms/switch/Switch.vue +107 -107
  19. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
  20. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  21. package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -83
  22. package/components/atoms/tabs/Tabs.vue +189 -189
  23. package/components/atoms/tooltip/Signpost.vue +224 -224
  24. package/components/common/accordion/Accordion.vue +176 -176
  25. package/components/common/accordion/Recursion.vue +195 -195
  26. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  27. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  28. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  29. package/components/common/browse/Browse.vue +182 -182
  30. package/components/common/browse/blocks/Title.vue +66 -66
  31. package/components/common/diagramMain/Header.vue +160 -160
  32. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  33. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  34. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  35. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  36. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  37. package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -94
  38. package/components/common/diagramMain/network/Contents.vue +238 -238
  39. package/components/common/feedback/Buttons.vue +232 -232
  40. package/components/common/feedback/Message.vue +468 -468
  41. package/components/common/feedback/VisitPortal.vue +54 -54
  42. package/components/common/modals/Rename.vue +165 -165
  43. package/components/common/perPage/PerPage.vue +51 -51
  44. package/components/common/recursionTree/RecursionTree.vue +201 -201
  45. package/components/common/vm/actions/add/select/name/Name.vue +215 -173
  46. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
  47. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  48. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  49. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  50. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  51. package/models/store/storage/interfaces.ts +32 -32
  52. package/package.json +1 -1
  53. package/public/spice-console/application/codec.js +257 -257
  54. package/public/spice-console/lib/rasterEngine.js +907 -907
  55. package/public/spice-console/network/spicechannel.js +369 -369
  56. package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
  57. package/public/spice-console-minify/lib/jgestures.min.js +24 -24
  58. package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
  59. package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
  60. package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
  61. package/public/spice-console-minify/lib/lodash.4.0.0.min.js +5 -5
@@ -1,173 +1,215 @@
1
- <template>
2
- <div class="select-name">
3
- <atoms-alert
4
- v-show="errors.length"
5
- status="alert-danger"
6
- :items="errors"
7
- @remove="onRemoveValidationErrors"
8
- />
9
-
10
- <form id="virtual-machine-form" @submit.prevent>
11
- <label for="virtual-machine-name"
12
- >{{ localization.virtualMachineName }}:</label
13
- >
14
- <input id="virtual-machine-name" v-model.trim="vmName" type="text" />
15
- </form>
16
-
17
- <template v-if="props.project === 'sphere'">
18
- <p class="new-vm-name-and-folder-instructions mt-1">
19
- {{ localization.selectLocationVirtualMachine }}
20
- </p>
21
- <div class="tree-view-wrap">
22
- <common-vm-actions-add-folder-tree-view
23
- :data-center="props.dataCenter"
24
- @select-node="onSelectNode"
25
- />
26
- </div>
27
- </template>
28
- </div>
29
- </template>
30
-
31
- <script setup lang="ts">
32
- // import { API_UI_I_Error } from '~/models/store/interfaces'
33
- import { UI_I_Localization } from '~/models/interfaces'
34
- import { UI_T_Project } from '~/models/types'
35
- import { UI_I_TreeNode } from '~/components/common/recursionTree/models/interfaces'
36
-
37
- const props = defineProps<{
38
- nameFormSubmit: number
39
- show: boolean
40
- project: UI_T_Project
41
- dataCenter?: UI_I_TreeNode // для сферы
42
- }>()
43
- const emits = defineEmits<{
44
- (event: 'submit', value: [string, UI_I_TreeNode | null]): void
45
- (event: 'loading', value: boolean): void
46
- (event: 'check-name', value: [[string, UI_I_TreeNode | null], (error: any) => void]): void
47
- }>()
48
-
49
- const localization = computed<UI_I_Localization>(() => useLocal())
50
-
51
- const vmName = ref<string>('')
52
-
53
- const selectedNode = ref<UI_I_TreeNode | null>(null)
54
- const onSelectNode = (node: UI_I_TreeNode): void => {
55
- selectedNode.value = node
56
- }
57
-
58
- watch(
59
- () => props.nameFormSubmit,
60
- () => {
61
- submit()
62
- }
63
- )
64
-
65
- const isParentDatacenter = (node: UI_I_TreeNode | null): boolean => {
66
- if (!node) return false
67
-
68
- if (node.parent?.type === 'datacenter') return true
69
- if (node.parent?.type === 'folder') return isParentDatacenter(node.parent)
70
- return false
71
- }
72
- const submit = async (): Promise<void> => {
73
- const name = vmName.value
74
-
75
- if (name !== '') {
76
- const isNameValid = await checkNameIsValid(name)
77
- if (!isNameValid) return
78
- }
79
-
80
- if (props.project === 'sphere') {
81
- const isDatacenterFolder = isParentDatacenter(selectedNode.value)
82
-
83
- if (selectedNode.value?.type !== 'datacenter' && selectedNode.value?.type === 'folder' && !isDatacenterFolder) {
84
- showValidationErrors([
85
- localization.value.enterValidLocationVirtualMachine,
86
- ])
87
- return
88
- }
89
- }
90
-
91
- onRemoveValidationErrors()
92
- emits('submit', [name, selectedNode.value])
93
- }
94
- const checkNameIsValid = async (name: string): Promise<boolean> => {
95
- emits('loading', true)
96
-
97
- return new Promise((resolve) => {
98
- emits('check-name', [
99
- [name, selectedNode.value],
100
- (error) => {
101
- emits('loading', false)
102
-
103
- const status = error?.statusCode || 200
104
- switch (status) {
105
- case 406: // Invalid name
106
- showValidationErrors([
107
- localization.value.vmNameValidationDescription,
108
- ])
109
- resolve(false)
110
- break
111
- case 409: // Name exist
112
- showValidationErrors([
113
- localization.value.vmNameExistInSelectedLocation,
114
- ])
115
- resolve(false)
116
- break
117
- }
118
-
119
- resolve(true)
120
- },
121
- ])
122
- })
123
- }
124
-
125
- const errors = ref<string[]>([])
126
- const showValidationErrors = (data: string[]): void => {
127
- errors.value = data
128
- }
129
- const onRemoveValidationErrors = (): void => {
130
- errors.value = []
131
- }
132
-
133
- watch(
134
- () => props.show,
135
- (newValue) => {
136
- if (!newValue) return
137
-
138
- const input = document.getElementById('virtual-machine-name')
139
- if (!input) return
140
-
141
- setTimeout(() => {
142
- input.focus()
143
- }, 0)
144
- }
145
- )
146
- </script>
147
-
148
- <style scoped lang="scss">
149
- .select-name {
150
- form {
151
- display: flex;
152
- align-items: center;
153
- padding-top: 20px;
154
-
155
- label {
156
- width: 216px;
157
- }
158
- input {
159
- width: 345px;
160
- }
161
- }
162
-
163
- .tree-view-wrap {
164
- position: relative;
165
- border: 1px solid #000;
166
- padding: 5px;
167
- max-height: 300px;
168
- min-height: 200px;
169
- overflow: auto;
170
- margin-bottom: 10px;
171
- }
172
- }
173
- </style>
1
+ <template>
2
+ <div class="select-name">
3
+ <atoms-alert
4
+ v-show="errors.length"
5
+ status="alert-danger"
6
+ :items="errors"
7
+ @remove="onRemoveValidationErrors"
8
+ />
9
+
10
+ <form id="virtual-machine-form" @submit.prevent>
11
+ <label for="virtual-machine-name"
12
+ >{{ localization.virtualMachineName }}:</label
13
+ >
14
+ <input id="virtual-machine-name" v-model.trim="vmName" type="text" />
15
+ <div id="vm-name-help-icon" class="content-signpost relative">
16
+ <atoms-the-icon
17
+ class="icon-show-help"
18
+ fill="#0072a3"
19
+ width="24px"
20
+ height="24px"
21
+ name="info-circle"
22
+ @click="isShowHelp = !isShowHelp"
23
+ />
24
+ <atoms-tooltip-signpost
25
+ v-if="isShowHelp"
26
+ test-id="help-signpost"
27
+ elem-id="vm-name-help-icon"
28
+ @hide="isShowHelp = false"
29
+ >
30
+ <p>
31
+ {{ localization.vmNameValidationDescription2 }}
32
+ </p>
33
+ </atoms-tooltip-signpost>
34
+ </div>
35
+ </form>
36
+
37
+ <template v-if="props.project === 'sphere'">
38
+ <p class="new-vm-name-and-folder-instructions mt-1">
39
+ {{ localization.selectLocationVirtualMachine }}
40
+ </p>
41
+ <div class="tree-view-wrap">
42
+ <common-vm-actions-add-folder-tree-view
43
+ :data-center="props.dataCenter"
44
+ @select-node="onSelectNode"
45
+ />
46
+ </div>
47
+ </template>
48
+ </div>
49
+ </template>
50
+
51
+ <script setup lang="ts">
52
+ // import { API_UI_I_Error } from '~/models/store/interfaces'
53
+ import { UI_I_Localization } from '~/models/interfaces'
54
+ import { UI_T_Project } from '~/models/types'
55
+ import { UI_I_TreeNode } from '~/components/common/recursionTree/models/interfaces'
56
+
57
+ const props = defineProps<{
58
+ nameFormSubmit: number
59
+ show: boolean
60
+ project: UI_T_Project
61
+ dataCenter?: UI_I_TreeNode // для сферы
62
+ }>()
63
+ const emits = defineEmits<{
64
+ (event: 'submit', value: [string, UI_I_TreeNode | null]): void
65
+ (event: 'loading', value: boolean): void
66
+ (
67
+ event: 'check-name',
68
+ value: [[string, UI_I_TreeNode | null], (error: any) => void]
69
+ ): void
70
+ }>()
71
+
72
+ const localization = computed<UI_I_Localization>(() => useLocal())
73
+
74
+ const vmName = ref<string>('')
75
+
76
+ const selectedNode = ref<UI_I_TreeNode | null>(null)
77
+ const onSelectNode = (node: UI_I_TreeNode): void => {
78
+ selectedNode.value = node
79
+ }
80
+
81
+ watch(
82
+ () => props.nameFormSubmit,
83
+ () => {
84
+ submit()
85
+ }
86
+ )
87
+
88
+ const isParentDatacenter = (node: UI_I_TreeNode | null): boolean => {
89
+ if (!node) return false
90
+
91
+ if (node.parent?.type === 'datacenter') return true
92
+ if (node.parent?.type === 'folder') return isParentDatacenter(node.parent)
93
+ return false
94
+ }
95
+ const submit = async (): Promise<void> => {
96
+ const name = vmName.value
97
+
98
+ if (name !== '') {
99
+ const isNameValid = await checkNameIsValid(name)
100
+ if (!isNameValid) return
101
+ }
102
+
103
+ if (props.project === 'sphere') {
104
+ const isDatacenterFolder = isParentDatacenter(selectedNode.value)
105
+
106
+ if (
107
+ selectedNode.value?.type !== 'datacenter' &&
108
+ selectedNode.value?.type === 'folder' &&
109
+ !isDatacenterFolder
110
+ ) {
111
+ showValidationErrors([
112
+ localization.value.enterValidLocationVirtualMachine,
113
+ ])
114
+ return
115
+ }
116
+ }
117
+
118
+ onRemoveValidationErrors()
119
+ emits('submit', [name, selectedNode.value])
120
+ }
121
+ const checkNameIsValid = async (name: string): Promise<boolean> => {
122
+ emits('loading', true)
123
+
124
+ return new Promise((resolve) => {
125
+ emits('check-name', [
126
+ [name, selectedNode.value],
127
+ (error) => {
128
+ emits('loading', false)
129
+
130
+ const status = error?.statusCode || 200
131
+ switch (status) {
132
+ case 406: // Invalid name
133
+ showValidationErrors([
134
+ localization.value.vmNameValidationDescription,
135
+ ])
136
+ resolve(false)
137
+ break
138
+ case 409: // Name exist
139
+ showValidationErrors([
140
+ localization.value.vmNameExistInSelectedLocation,
141
+ ])
142
+ resolve(false)
143
+ break
144
+ }
145
+
146
+ resolve(true)
147
+ },
148
+ ])
149
+ })
150
+ }
151
+
152
+ const errors = ref<string[]>([])
153
+ const showValidationErrors = (data: string[]): void => {
154
+ errors.value = data
155
+ }
156
+ const onRemoveValidationErrors = (): void => {
157
+ errors.value = []
158
+ }
159
+
160
+ watch(
161
+ () => props.show,
162
+ (newValue) => {
163
+ if (!newValue) return
164
+
165
+ const input = document.getElementById('virtual-machine-name')
166
+ if (!input) return
167
+
168
+ setTimeout(() => {
169
+ input.focus()
170
+ }, 0)
171
+ }
172
+ )
173
+
174
+ const isShowHelp = ref<boolean>(false)
175
+ </script>
176
+
177
+ <style scoped lang="scss">
178
+ .select-name {
179
+ form {
180
+ display: flex;
181
+ align-items: center;
182
+ padding-top: 20px;
183
+
184
+ label {
185
+ width: 216px;
186
+ }
187
+ input {
188
+ width: 345px;
189
+ }
190
+ }
191
+
192
+ .tree-view-wrap {
193
+ position: relative;
194
+ border: 1px solid #000;
195
+ padding: 5px;
196
+ max-height: 300px;
197
+ min-height: 200px;
198
+ overflow: auto;
199
+ margin-bottom: 10px;
200
+ }
201
+ }
202
+ .content-signpost {
203
+ .icon-show-help {
204
+ cursor: pointer;
205
+ }
206
+
207
+ .help-title {
208
+ font-size: 22px;
209
+ margin-bottom: 24px;
210
+ }
211
+ .signpost {
212
+ max-width: 360px;
213
+ }
214
+ }
215
+ </style>