bfg-common 1.5.215 → 1.5.217
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.
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +2 -2
- package/assets/localization/local_en.json +9 -9
- package/assets/localization/local_hy.json +2 -2
- package/assets/localization/local_kk.json +2 -2
- package/assets/localization/local_ru.json +2 -2
- package/assets/localization/local_zh.json +2 -2
- package/assets/scss/common/normalize.scss +0 -1
- package/components/common/context/recursion/RecursionNew.vue +1 -1
- package/components/common/pages/shortcuts/block/BlockNew.vue +7 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +5 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils.ts +20 -8
- package/components/common/vm/actions/common/select/computeResource/New.vue +141 -166
- package/components/common/vm/actions/common/select/createType/New.vue +84 -92
- package/components/common/vm/actions/common/select/name/New.vue +246 -274
- package/components/common/vm/actions/common/select/storage/new/New.vue +200 -219
- package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +334 -334
- package/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
|
@@ -1,274 +1,246 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
<Teleport to="#name-alert-wrapper">
|
|
4
|
-
<ui-alert
|
|
5
|
-
v-show="props.errors.length"
|
|
6
|
-
:messages="props.errors"
|
|
7
|
-
status="alert-danger"
|
|
8
|
-
test-id="name-alert"
|
|
9
|
-
class="errors-alert"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
left
|
|
38
|
-
@hide="isShowHelp = false"
|
|
39
|
-
>
|
|
40
|
-
<template #content>
|
|
41
|
-
<div class="vm-name-help-content">
|
|
42
|
-
<div class="headline">
|
|
43
|
-
<ui-icon name="info-2" width="16" height="16" />
|
|
44
|
-
<h3 class="vm-name-help-title">
|
|
45
|
-
{{ localization.vmWizard.vmNameRules }}
|
|
46
|
-
</h3>
|
|
47
|
-
<ui-icon
|
|
48
|
-
name="close"
|
|
49
|
-
width="16"
|
|
50
|
-
height="16"
|
|
51
|
-
class="hide-icon pointer"
|
|
52
|
-
@click="isShowHelp = false"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<p class="vm-name-help-text">
|
|
57
|
-
{{ localization.common.vmNameValidationDescription }}
|
|
58
|
-
</p>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|
|
61
|
-
</ui-dropdown>
|
|
62
|
-
</Teleport>
|
|
63
|
-
|
|
64
|
-
<div class="flex-2">
|
|
65
|
-
<ui-input
|
|
66
|
-
v-model="vmName"
|
|
67
|
-
:placeholder="
|
|
68
|
-
type="text"
|
|
69
|
-
maxlength="54"
|
|
70
|
-
test-id="virtual-machine-name"
|
|
71
|
-
/>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
<template v-if="props.project === 'sphere'">
|
|
76
|
-
<div class="location">
|
|
77
|
-
<span class="location-label">{{ localization.common.location }}</span>
|
|
78
|
-
|
|
79
|
-
<div v-if="selectedLocation" class="selected-location">
|
|
80
|
-
<span :class="['node-icon', selectedLocation.iconClassName]" />
|
|
81
|
-
<span :class="['text', isShowAlert && 'error']">
|
|
82
|
-
{{ selectedLocation.name }}
|
|
83
|
-
</span>
|
|
84
|
-
</div>
|
|
85
|
-
<ui-skeleton-item v-else width="160px" height="20px" />
|
|
86
|
-
</div>
|
|
87
|
-
<div class="tree-view-wrap">
|
|
88
|
-
<common-vm-actions-add-folder-tree-view
|
|
89
|
-
:data-center="props.dataCenter"
|
|
90
|
-
@select-node="onSelectNode"
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
</div>
|
|
95
|
-
</template>
|
|
96
|
-
|
|
97
|
-
<script setup lang="ts">
|
|
98
|
-
// import { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
99
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
100
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
101
|
-
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
102
|
-
|
|
103
|
-
const vmName = defineModel<string>('vmName', { required: true })
|
|
104
|
-
const isShowHelp = defineModel<boolean>('isShowHelp', { required: true })
|
|
105
|
-
|
|
106
|
-
const props = defineProps<{
|
|
107
|
-
project: UI_T_Project
|
|
108
|
-
errors: string[]
|
|
109
|
-
dataCenter?: UI_I_TreeNode // для сферы
|
|
110
|
-
}>()
|
|
111
|
-
const emits = defineEmits<{
|
|
112
|
-
(event: 'remove-validation-errors'): void
|
|
113
|
-
(event: 'select-node', value: UI_I_TreeNode): void
|
|
114
|
-
}>()
|
|
115
|
-
|
|
116
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
117
|
-
|
|
118
|
-
const isShowAlert = computed<boolean>(() =>
|
|
119
|
-
props.errors.includes(
|
|
120
|
-
localization.value.common.enterValidLocationVirtualMachine
|
|
121
|
-
)
|
|
122
|
-
)
|
|
123
|
-
const selectedLocation = ref<UI_I_TreeNode | null>(null)
|
|
124
|
-
const onSelectNode = (node: UI_I_TreeNode) => {
|
|
125
|
-
selectedLocation.value = node
|
|
126
|
-
emits('select-node', node)
|
|
127
|
-
}
|
|
128
|
-
</script>
|
|
129
|
-
|
|
130
|
-
<style>
|
|
131
|
-
:root {
|
|
132
|
-
--select-name-text-color: #4d5d69;
|
|
133
|
-
--select-name-help-icon-hover-color: #4d5d69;
|
|
134
|
-
--select-name-help-icon-active-color: #008fd6;
|
|
135
|
-
--select-name-help-hide-icon-color: #213444;
|
|
136
|
-
--select-name-border-color: #
|
|
137
|
-
--select-name-location-node-color: #182531;
|
|
138
|
-
--select-name-location-bg-color: #ffffff;
|
|
139
|
-
}
|
|
140
|
-
:root.dark-theme {
|
|
141
|
-
--select-name-text-color: #e9eaec;
|
|
142
|
-
--select-name-help-icon-hover-color: #e9eaec;
|
|
143
|
-
--select-name-help-icon-active-color: #2ba2de;
|
|
144
|
-
--select-name-help-hide-icon-color: #e9eaec;
|
|
145
|
-
--select-name-border-color: #e9ebed1f;
|
|
146
|
-
--select-name-location-node-color: #e9eaec;
|
|
147
|
-
--select-name-location-bg-color:
|
|
148
|
-
}
|
|
149
|
-
</style>
|
|
150
|
-
<style scoped lang="scss">
|
|
151
|
-
.select-name {
|
|
152
|
-
height: 100%;
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-direction: column;
|
|
155
|
-
padding-top: 16px;
|
|
156
|
-
|
|
157
|
-
.name-field {
|
|
158
|
-
display: flex;
|
|
159
|
-
align-items: center;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
text
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.vm-name-help-content {
|
|
248
|
-
padding: 16px;
|
|
249
|
-
|
|
250
|
-
.headline {
|
|
251
|
-
display: flex;
|
|
252
|
-
align-items: center;
|
|
253
|
-
gap: 8px;
|
|
254
|
-
margin-bottom: 12px;
|
|
255
|
-
|
|
256
|
-
.vm-name-help-title {
|
|
257
|
-
flex: 1;
|
|
258
|
-
font-size: 14px;
|
|
259
|
-
font-weight: 500;
|
|
260
|
-
line-height: 16.94px;
|
|
261
|
-
color: var(--select-name-text-color);
|
|
262
|
-
}
|
|
263
|
-
.hide-icon {
|
|
264
|
-
color: var(--select-name-help-hide-icon-color);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.vm-name-help-text {
|
|
269
|
-
font-size: 13px;
|
|
270
|
-
line-height: 15.73px;
|
|
271
|
-
color: var(--select-name-text-color);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-name">
|
|
3
|
+
<Teleport to="#name-alert-wrapper">
|
|
4
|
+
<ui-alert
|
|
5
|
+
v-show="props.errors.length"
|
|
6
|
+
:messages="props.errors"
|
|
7
|
+
status="alert-danger"
|
|
8
|
+
test-id="name-alert"
|
|
9
|
+
class="errors-alert"
|
|
10
|
+
@remove="emits('remove-validation-errors')"
|
|
11
|
+
/>
|
|
12
|
+
</Teleport>
|
|
13
|
+
|
|
14
|
+
<div class="name-field">
|
|
15
|
+
<div class="flex-1 flex-align-center">
|
|
16
|
+
<label for="virtual-machine-name" class="name-label">{{
|
|
17
|
+
localization.common.name
|
|
18
|
+
}}</label>
|
|
19
|
+
<ui-icon
|
|
20
|
+
id="virtual-machine-name-icon"
|
|
21
|
+
:class="{ active: isShowHelp }"
|
|
22
|
+
width="16"
|
|
23
|
+
height="16"
|
|
24
|
+
name="info"
|
|
25
|
+
data-id="virtual-machine-name-icon"
|
|
26
|
+
@click.stop="isShowHelp = !isShowHelp"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
<Teleport to="body">
|
|
30
|
+
<ui-dropdown
|
|
31
|
+
:show="isShowHelp"
|
|
32
|
+
:items="[]"
|
|
33
|
+
elem-id="virtual-machine-name-icon"
|
|
34
|
+
test-id=""
|
|
35
|
+
width="320px"
|
|
36
|
+
top
|
|
37
|
+
left
|
|
38
|
+
@hide="isShowHelp = false"
|
|
39
|
+
>
|
|
40
|
+
<template #content>
|
|
41
|
+
<div class="vm-name-help-content">
|
|
42
|
+
<div class="headline">
|
|
43
|
+
<ui-icon name="info-2" width="16" height="16" />
|
|
44
|
+
<h3 class="vm-name-help-title">
|
|
45
|
+
{{ localization.vmWizard.vmNameRules }}
|
|
46
|
+
</h3>
|
|
47
|
+
<ui-icon
|
|
48
|
+
name="close"
|
|
49
|
+
width="16"
|
|
50
|
+
height="16"
|
|
51
|
+
class="hide-icon pointer"
|
|
52
|
+
@click="isShowHelp = false"
|
|
53
|
+
/>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<p class="vm-name-help-text">
|
|
57
|
+
{{ localization.common.vmNameValidationDescription }}
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</ui-dropdown>
|
|
62
|
+
</Teleport>
|
|
63
|
+
|
|
64
|
+
<div class="flex-2">
|
|
65
|
+
<ui-input
|
|
66
|
+
v-model="vmName"
|
|
67
|
+
:placeholder="localization.common.name"
|
|
68
|
+
type="text"
|
|
69
|
+
maxlength="54"
|
|
70
|
+
test-id="virtual-machine-name"
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<template v-if="props.project === 'sphere'">
|
|
76
|
+
<div class="location">
|
|
77
|
+
<span class="location-label">{{ localization.common.location }}</span>
|
|
78
|
+
|
|
79
|
+
<div v-if="selectedLocation" class="selected-location">
|
|
80
|
+
<span :class="['node-icon', selectedLocation.iconClassName]" />
|
|
81
|
+
<span :class="['text', isShowAlert && 'error']">
|
|
82
|
+
{{ selectedLocation.name }}
|
|
83
|
+
</span>
|
|
84
|
+
</div>
|
|
85
|
+
<ui-skeleton-item v-else width="160px" height="20px" />
|
|
86
|
+
</div>
|
|
87
|
+
<div class="tree-view-wrap">
|
|
88
|
+
<common-vm-actions-add-folder-tree-view
|
|
89
|
+
:data-center="props.dataCenter"
|
|
90
|
+
@select-node="onSelectNode"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</template>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<script setup lang="ts">
|
|
98
|
+
// import { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
99
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
100
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
101
|
+
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
102
|
+
|
|
103
|
+
const vmName = defineModel<string>('vmName', { required: true })
|
|
104
|
+
const isShowHelp = defineModel<boolean>('isShowHelp', { required: true })
|
|
105
|
+
|
|
106
|
+
const props = defineProps<{
|
|
107
|
+
project: UI_T_Project
|
|
108
|
+
errors: string[]
|
|
109
|
+
dataCenter?: UI_I_TreeNode // для сферы
|
|
110
|
+
}>()
|
|
111
|
+
const emits = defineEmits<{
|
|
112
|
+
(event: 'remove-validation-errors'): void
|
|
113
|
+
(event: 'select-node', value: UI_I_TreeNode): void
|
|
114
|
+
}>()
|
|
115
|
+
|
|
116
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
117
|
+
|
|
118
|
+
const isShowAlert = computed<boolean>(() =>
|
|
119
|
+
props.errors.includes(
|
|
120
|
+
localization.value.common.enterValidLocationVirtualMachine
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
const selectedLocation = ref<UI_I_TreeNode | null>(null)
|
|
124
|
+
const onSelectNode = (node: UI_I_TreeNode) => {
|
|
125
|
+
selectedLocation.value = node
|
|
126
|
+
emits('select-node', node)
|
|
127
|
+
}
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<style>
|
|
131
|
+
:root {
|
|
132
|
+
--select-name-text-color: #4d5d69;
|
|
133
|
+
--select-name-help-icon-hover-color: #4d5d69;
|
|
134
|
+
--select-name-help-icon-active-color: #008fd6;
|
|
135
|
+
--select-name-help-hide-icon-color: #213444;
|
|
136
|
+
--select-name-border-color: #e9ebed;
|
|
137
|
+
--select-name-location-node-color: #182531;
|
|
138
|
+
--select-name-location-bg-color: #ffffff;
|
|
139
|
+
}
|
|
140
|
+
:root.dark-theme {
|
|
141
|
+
--select-name-text-color: #e9eaec;
|
|
142
|
+
--select-name-help-icon-hover-color: #e9eaec;
|
|
143
|
+
--select-name-help-icon-active-color: #2ba2de;
|
|
144
|
+
--select-name-help-hide-icon-color: #e9eaec;
|
|
145
|
+
--select-name-border-color: #e9ebed1f;
|
|
146
|
+
--select-name-location-node-color: #e9eaec;
|
|
147
|
+
--select-name-location-bg-color: transparent;
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
150
|
+
<style scoped lang="scss">
|
|
151
|
+
.select-name {
|
|
152
|
+
height: 100%;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
padding-top: 16px;
|
|
156
|
+
|
|
157
|
+
.name-field {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
|
|
161
|
+
.name-label {
|
|
162
|
+
font-size: 13px;
|
|
163
|
+
color: var(--select-name-text-color);
|
|
164
|
+
margin-right: 8px;
|
|
165
|
+
}
|
|
166
|
+
#virtual-machine-name-icon {
|
|
167
|
+
color: #9da6ad; // equal in dark and white modes
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
|
|
170
|
+
&:hover {
|
|
171
|
+
color: var(--select-name-help-icon-hover-color);
|
|
172
|
+
}
|
|
173
|
+
&.active {
|
|
174
|
+
color: var(--select-name-help-icon-active-color);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.location {
|
|
180
|
+
display: grid;
|
|
181
|
+
grid-template-columns: 1fr 2fr;
|
|
182
|
+
margin-top: 16px;
|
|
183
|
+
padding: 16px 0;
|
|
184
|
+
border-top: 1px solid var(--select-name-border-color);
|
|
185
|
+
|
|
186
|
+
.location-label {
|
|
187
|
+
font-size: 13px;
|
|
188
|
+
color: var(--select-name-text-color);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.selected-location {
|
|
192
|
+
display: flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
gap: 8px;
|
|
195
|
+
|
|
196
|
+
.text {
|
|
197
|
+
font-size: 13px;
|
|
198
|
+
color: var(--select-name-location-node-color);
|
|
199
|
+
|
|
200
|
+
&.error {
|
|
201
|
+
color: #ea3223; // equal in dark and white modes
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
.tree-view-wrap {
|
|
207
|
+
flex: 1;
|
|
208
|
+
border-radius: 8px;
|
|
209
|
+
border: 1px solid var(--select-name-border-color);
|
|
210
|
+
padding: 12px;
|
|
211
|
+
background-color: var(--select-name-location-bg-color);
|
|
212
|
+
|
|
213
|
+
:deep(.tree-content) {
|
|
214
|
+
padding: 0 !important;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.vm-name-help-content {
|
|
220
|
+
padding: 16px;
|
|
221
|
+
|
|
222
|
+
.headline {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
gap: 8px;
|
|
226
|
+
margin-bottom: 12px;
|
|
227
|
+
|
|
228
|
+
.vm-name-help-title {
|
|
229
|
+
flex: 1;
|
|
230
|
+
font-size: 14px;
|
|
231
|
+
font-weight: 500;
|
|
232
|
+
line-height: 16.94px;
|
|
233
|
+
color: var(--select-name-text-color);
|
|
234
|
+
}
|
|
235
|
+
.hide-icon {
|
|
236
|
+
color: var(--select-name-help-hide-icon-color);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.vm-name-help-text {
|
|
241
|
+
font-size: 13px;
|
|
242
|
+
line-height: 15.73px;
|
|
243
|
+
color: var(--select-name-text-color);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
</style>
|