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,219 +1,200 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-storage">
|
|
3
|
-
<Teleport v-if="!props.hideAlert" to="#storage-alert-wrapper">
|
|
4
|
-
<ui-alert
|
|
5
|
-
v-show="props.errors.length"
|
|
6
|
-
:messages="props.errors"
|
|
7
|
-
:items="props.errors"
|
|
8
|
-
status="alert-danger"
|
|
9
|
-
test-id="storage-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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<span class="compatibility-message-description">{{
|
|
56
|
-
localization.
|
|
57
|
-
}}</span>
|
|
58
|
-
</template>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
import
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
import
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
)
|
|
104
|
-
|
|
105
|
-
const
|
|
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
|
-
:root {
|
|
145
|
-
--select-storage-border-color: #
|
|
146
|
-
--select-storage-bg-color:
|
|
147
|
-
--select-storage-title-color: #
|
|
148
|
-
--select-storage-compatibility-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
background-color: var(--select-storage-compatibility-bg-color);
|
|
202
|
-
gap: 10px;
|
|
203
|
-
|
|
204
|
-
.icon-compatibility-alert {
|
|
205
|
-
min-width: 16px;
|
|
206
|
-
min-height: 16px;
|
|
207
|
-
}
|
|
208
|
-
.compatibility-message-description {
|
|
209
|
-
font-size: 13px;
|
|
210
|
-
color: var(--select-storage-compatibility-description-color);
|
|
211
|
-
|
|
212
|
-
&.empty {
|
|
213
|
-
color: var(--select-storage-compatibility-empty-description-color);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-storage">
|
|
3
|
+
<Teleport v-if="!props.hideAlert" to="#storage-alert-wrapper">
|
|
4
|
+
<ui-alert
|
|
5
|
+
v-show="props.errors.length"
|
|
6
|
+
:messages="props.errors"
|
|
7
|
+
:items="props.errors"
|
|
8
|
+
status="alert-danger"
|
|
9
|
+
test-id="storage-alert"
|
|
10
|
+
@remove="emits('remove-error')"
|
|
11
|
+
/>
|
|
12
|
+
</Teleport>
|
|
13
|
+
|
|
14
|
+
<div class="table-wrap">
|
|
15
|
+
<ui-data-table
|
|
16
|
+
:data="data"
|
|
17
|
+
:options="tableOptions"
|
|
18
|
+
:loading="loading"
|
|
19
|
+
:default-layout="false"
|
|
20
|
+
:texts="tableTexts"
|
|
21
|
+
test-id="select-storage-data-table"
|
|
22
|
+
server-off
|
|
23
|
+
size="sm"
|
|
24
|
+
@select-row="onSelectRow"
|
|
25
|
+
>
|
|
26
|
+
<template #insteadOfTitleActions
|
|
27
|
+
><h3 class="storage-count">
|
|
28
|
+
{{ storageCount }}
|
|
29
|
+
</h3></template
|
|
30
|
+
>
|
|
31
|
+
<template #state="{ item }">
|
|
32
|
+
<ui-chip :color="item.data.color" rounded>
|
|
33
|
+
<ui-icon :name="item.data.iconClassName" width="14" height="14" />
|
|
34
|
+
{{ item.data.text }}
|
|
35
|
+
</ui-chip>
|
|
36
|
+
</template>
|
|
37
|
+
</ui-data-table>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<div v-if="!props.hideCompatibility" class="compatibility-wrap">
|
|
41
|
+
<p class="compatibility">
|
|
42
|
+
{{ localization.inventorySummary.compatibility }}
|
|
43
|
+
</p>
|
|
44
|
+
<div class="compatibility-message flex-align-center">
|
|
45
|
+
<ui-skeleton-item v-if="loading" width="160px" height="16px" />
|
|
46
|
+
<template v-else>
|
|
47
|
+
<template v-if="props.selectedStorage">
|
|
48
|
+
<ui-icon name="success-fill" width="16" height="16" />
|
|
49
|
+
<span class="compatibility-message-description">{{
|
|
50
|
+
localization.common.compatibilityChecksSucceeded
|
|
51
|
+
}}</span>
|
|
52
|
+
</template>
|
|
53
|
+
<template v-else>
|
|
54
|
+
<!-- <ui-icon name="error" width="16" height="16" />-->
|
|
55
|
+
<span class="compatibility-message-description">{{
|
|
56
|
+
localization.vmWizard.noStorageSelected
|
|
57
|
+
}}</span>
|
|
58
|
+
</template>
|
|
59
|
+
</template>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script setup lang="ts">
|
|
66
|
+
import type {
|
|
67
|
+
UI_I_DataTable,
|
|
68
|
+
UI_I_TableTexts,
|
|
69
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
70
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
71
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
72
|
+
import {
|
|
73
|
+
tableBodyFunc,
|
|
74
|
+
tableDataFunc,
|
|
75
|
+
tableOptions,
|
|
76
|
+
} from '~/components/common/vm/actions/common/select/storage/new/lib/config/table'
|
|
77
|
+
import { tableTextsFunc } from '~/lib/config/uiTable'
|
|
78
|
+
|
|
79
|
+
const selectedRow = defineModel<number | null>('selectedRow')
|
|
80
|
+
|
|
81
|
+
const props = defineProps<{
|
|
82
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
83
|
+
errors: string[]
|
|
84
|
+
selectedStorage: UI_I_DatastoreTableItem | null
|
|
85
|
+
hideCompatibility?: boolean
|
|
86
|
+
hideAlert?: boolean
|
|
87
|
+
}>()
|
|
88
|
+
const emits = defineEmits<{
|
|
89
|
+
(event: 'remove-error'): void
|
|
90
|
+
(event: 'change-storage', value: number): void
|
|
91
|
+
}>()
|
|
92
|
+
|
|
93
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
94
|
+
|
|
95
|
+
const tableTexts = computed<UI_I_TableTexts>(() =>
|
|
96
|
+
tableTextsFunc(localization.value)
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
const storageCount = computed<string>(() =>
|
|
100
|
+
localization.value.vmWizard.storageCount.replace(
|
|
101
|
+
'{0}',
|
|
102
|
+
data.value.body.length.toString()
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
const loading = ref<boolean>(true)
|
|
106
|
+
const data = ref<UI_I_DataTable>(tableDataFunc(localization.value))
|
|
107
|
+
|
|
108
|
+
watch(
|
|
109
|
+
() => props.datastore,
|
|
110
|
+
(newValue: UI_I_DatastoreTableItem[]) => {
|
|
111
|
+
loading.value = true
|
|
112
|
+
|
|
113
|
+
// if (!newValue.length || data.value.body.length) return
|
|
114
|
+
|
|
115
|
+
data.value.body = tableBodyFunc(
|
|
116
|
+
newValue,
|
|
117
|
+
localization.value,
|
|
118
|
+
selectedRow.value
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
loading.value = false
|
|
122
|
+
},
|
|
123
|
+
{ immediate: true, deep: true }
|
|
124
|
+
// { deep: true }
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
const onSelectRow = (selectedData: UI_I_DataTable): void => {
|
|
128
|
+
const selectedId = selectedData[0]?.data[0]?.key
|
|
129
|
+
const selectedItemIndex = props.datastore.findIndex(
|
|
130
|
+
(item) => item.id === selectedId
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
emits('change-storage', selectedItemIndex)
|
|
134
|
+
}
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
<style>
|
|
138
|
+
:root {
|
|
139
|
+
--select-storage-border-color: #e9ebed;
|
|
140
|
+
--select-storage-bg-color: #ffffff;
|
|
141
|
+
--select-storage-title-color: #4d5d69;
|
|
142
|
+
--select-storage-compatibility-description-color: #4d5d69;
|
|
143
|
+
}
|
|
144
|
+
:root.dark-theme {
|
|
145
|
+
--select-storage-border-color: #e9ebed1f;
|
|
146
|
+
--select-storage-bg-color: var(--wizard-right-bg);
|
|
147
|
+
--select-storage-title-color: #e9eaec;
|
|
148
|
+
--select-storage-compatibility-description-color: #9da6ad;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
151
|
+
<style scoped lang="scss">
|
|
152
|
+
.select-storage {
|
|
153
|
+
padding-top: 16px;
|
|
154
|
+
|
|
155
|
+
.storage-count {
|
|
156
|
+
font-size: 16px;
|
|
157
|
+
font-weight: 500;
|
|
158
|
+
color: var(--select-storage-title-color);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:deep(.bottom-grid-content) {
|
|
162
|
+
border: 1px solid var(--select-storage-border-color);
|
|
163
|
+
border-radius: 8px;
|
|
164
|
+
padding: 12px;
|
|
165
|
+
background-color: var(--select-storage-bg-color);
|
|
166
|
+
}
|
|
167
|
+
:deep(.select-row-item) {
|
|
168
|
+
background-color: var(--select-storage-bg-color);
|
|
169
|
+
}
|
|
170
|
+
:deep(.table-title-actions-container) {
|
|
171
|
+
justify-content: flex-start;
|
|
172
|
+
}
|
|
173
|
+
:deep(.table-container .table-title) {
|
|
174
|
+
margin-bottom: 12px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.compatibility-wrap {
|
|
178
|
+
margin-top: 24px;
|
|
179
|
+
|
|
180
|
+
.compatibility {
|
|
181
|
+
font-size: 16px;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
color: var(--select-storage-title-color);
|
|
184
|
+
margin-bottom: 16px;
|
|
185
|
+
}
|
|
186
|
+
.compatibility-message {
|
|
187
|
+
border-radius: 8px;
|
|
188
|
+
border: 1px solid var(--select-storage-border-color);
|
|
189
|
+
padding: 12px;
|
|
190
|
+
background-color: var(--select-storage-bg-color);
|
|
191
|
+
gap: 12px;
|
|
192
|
+
|
|
193
|
+
.compatibility-message-description {
|
|
194
|
+
font-size: 13px;
|
|
195
|
+
color: var(--select-storage-compatibility-description-color);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
</style>
|