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.
- package/assets/localization/local_be.json +2011 -2010
- package/assets/localization/local_en.json +2011 -2010
- package/assets/localization/local_hy.json +2011 -2010
- package/assets/localization/local_kk.json +2011 -2010
- package/assets/localization/local_ru.json +2011 -2010
- package/assets/localization/local_zh.json +2011 -2010
- package/components/atoms/alert/Notification.vue +167 -167
- package/components/atoms/autocomplete/Autocomplete.vue +236 -236
- package/components/atoms/datepicker/Datepicker.vue +612 -612
- package/components/atoms/list/SelectList.vue +62 -62
- package/components/atoms/modal/bySteps/BySteps.vue +234 -234
- package/components/atoms/nav/NavBar.vue +116 -116
- package/components/atoms/nav/VerticalNavBar.vue +89 -89
- package/components/atoms/notificationBar/NotificationBar.vue +175 -175
- package/components/atoms/perPage/PerPage.vue +52 -52
- package/components/atoms/popup/SimplePopup.vue +90 -90
- package/components/atoms/step/VerticalStep.vue +104 -104
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -204
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
- package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -83
- package/components/atoms/tabs/Tabs.vue +189 -189
- package/components/atoms/tooltip/Signpost.vue +224 -224
- package/components/common/accordion/Accordion.vue +176 -176
- package/components/common/accordion/Recursion.vue +195 -195
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/Browse.vue +182 -182
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/Header.vue +160 -160
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -94
- package/components/common/diagramMain/network/Contents.vue +238 -238
- package/components/common/feedback/Buttons.vue +232 -232
- package/components/common/feedback/Message.vue +468 -468
- package/components/common/feedback/VisitPortal.vue +54 -54
- package/components/common/modals/Rename.vue +165 -165
- package/components/common/perPage/PerPage.vue +51 -51
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/vm/actions/add/select/name/Name.vue +215 -173
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -373
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
- package/models/store/storage/interfaces.ts +32 -32
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/public/spice-console-minify/lib/decoder/dixie.min.js +4 -4
- package/public/spice-console-minify/lib/jgestures.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +24 -24
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +11 -11
- package/public/spice-console-minify/lib/jquery-visibility.min.js +1 -1
- 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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
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>
|