bfg-common 1.3.595 → 1.3.596
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 +37 -24
- package/assets/localization/local_en.json +37 -24
- package/assets/localization/local_hy.json +37 -24
- package/assets/localization/local_kk.json +38 -24
- package/assets/localization/local_ru.json +37 -24
- package/assets/localization/local_zh.json +37 -24
- package/components/common/adapterManager/ui/table/Header.vue +1 -1
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +6 -6
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +1 -1
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +4 -4
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +4 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +5 -4
- package/components/common/layout/theHeader/helpMenu/About.vue +4 -4
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +37 -2
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +3 -0
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +9 -2
- package/components/common/monitor/advanced/Advanced.vue +7 -4
- package/components/common/monitor/advanced/tools/Tools.vue +7 -4
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +15 -4
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +3 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +3 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +34 -12
- package/components/common/monitor/advanced/tools/chartOptionsModal/lib/utils/checkSubmit.ts +8 -3
- package/components/common/vm/actions/common/select/storage/lib/config/config.ts +1 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +2 -2
- package/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config.ts +1 -1
- package/composables/productNameLocal.ts +47 -40
- package/composables/useEnvLanguage.ts +2 -2
- package/lib/models/interfaces.ts +7 -0
- package/lib/models/types.ts +36 -29
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
v-model:column-keys="columnItems"
|
|
11
11
|
v-model:page-size="pagination.pageSize"
|
|
12
12
|
v-model:page="pagination.page"
|
|
13
|
-
type="
|
|
13
|
+
:type="tableType"
|
|
14
14
|
class="data-table"
|
|
15
15
|
test-id="object-table"
|
|
16
16
|
:loading="props.loading"
|
|
@@ -35,7 +35,9 @@ import type {
|
|
|
35
35
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
36
36
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
37
|
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
38
|
+
import type { UI_T_DataGridType } from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
38
39
|
import type { UI_I_AdvancedTargetObject } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
|
|
40
|
+
import type { UI_I_ObjectItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/models/interfaces'
|
|
39
41
|
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/config/objectTable'
|
|
40
42
|
import type { UI_T_AdvancedType } from '~/components/common/monitor/advanced/lib/models/types'
|
|
41
43
|
import type {
|
|
@@ -52,16 +54,20 @@ const props = defineProps<{
|
|
|
52
54
|
totalMetricItems: number
|
|
53
55
|
selectedObjects: string
|
|
54
56
|
loading: boolean
|
|
57
|
+
currentItems: UI_I_ObjectItem[]
|
|
55
58
|
}>()
|
|
56
59
|
|
|
57
60
|
const emits = defineEmits<{
|
|
58
61
|
(event: 'select-objects', value: string): void
|
|
59
|
-
(event: 'update-cores'): void
|
|
60
62
|
}>()
|
|
61
63
|
|
|
62
64
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
63
65
|
|
|
64
|
-
const
|
|
66
|
+
const tableType = computed<UI_T_DataGridType>(() =>
|
|
67
|
+
['disk', 'network'].includes(props.chart) ? 'radio' : 'checkbox'
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
const selectedRow = ref<number[] | number>([])
|
|
65
71
|
const pagination = ref<UI_I_Pagination>({
|
|
66
72
|
page: 1,
|
|
67
73
|
pageSize: 35,
|
|
@@ -101,6 +107,7 @@ watch(
|
|
|
101
107
|
props.totalCores,
|
|
102
108
|
props.hostId,
|
|
103
109
|
props.selectedMetricsKeys,
|
|
110
|
+
props.currentItems,
|
|
104
111
|
],
|
|
105
112
|
(newValue) => {
|
|
106
113
|
items = []
|
|
@@ -141,10 +148,16 @@ watch(
|
|
|
141
148
|
target_object: 'averageMHz',
|
|
142
149
|
})
|
|
143
150
|
}
|
|
144
|
-
|
|
145
|
-
|
|
151
|
+
} else if (
|
|
152
|
+
newValue[0] === 'host' &&
|
|
153
|
+
['disk', 'network'].includes(newValue[1])
|
|
154
|
+
) {
|
|
155
|
+
items = props.currentItems
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
bodyItems.value = table.bodyItems(items)
|
|
146
159
|
},
|
|
147
|
-
{ immediate: true }
|
|
160
|
+
{ immediate: true, deep: true }
|
|
148
161
|
)
|
|
149
162
|
|
|
150
163
|
watch(
|
|
@@ -152,9 +165,12 @@ watch(
|
|
|
152
165
|
(newValue) => {
|
|
153
166
|
const selectedItems: string[] = []
|
|
154
167
|
|
|
155
|
-
|
|
156
|
-
selectedItems.push(items[
|
|
157
|
-
}
|
|
168
|
+
if (['disk', 'network'].includes(props.chart)) {
|
|
169
|
+
selectedItems.push(items[newValue]?.target_object)
|
|
170
|
+
} else
|
|
171
|
+
newValue.forEach((key) => {
|
|
172
|
+
selectedItems.push(items[key].id)
|
|
173
|
+
})
|
|
158
174
|
|
|
159
175
|
const selectedNames =
|
|
160
176
|
items.length === newValue.length &&
|
|
@@ -185,13 +201,19 @@ watch(
|
|
|
185
201
|
})
|
|
186
202
|
selectedRow.value = selectedKeys
|
|
187
203
|
}
|
|
204
|
+
} else if (
|
|
205
|
+
props.type === 'host' &&
|
|
206
|
+
['disk', 'network'].includes(props.chart)
|
|
207
|
+
) {
|
|
208
|
+
if (selected) {
|
|
209
|
+
const selectedId = all.find((item) => item[0].text === selected)?.[0]
|
|
210
|
+
?.id
|
|
211
|
+
typeof selectedId === 'number' && (selectedRow.value = selectedId)
|
|
212
|
+
}
|
|
188
213
|
}
|
|
189
214
|
},
|
|
190
215
|
{ immediate: true }
|
|
191
216
|
)
|
|
192
|
-
onMounted(() => {
|
|
193
|
-
emits('update-cores')
|
|
194
|
-
})
|
|
195
217
|
</script>
|
|
196
218
|
|
|
197
219
|
<style scoped lang="scss">
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export const checkIsDisabledSubmit = (
|
|
2
2
|
type: string,
|
|
3
3
|
selectedMetric: string,
|
|
4
|
+
selectedRowsLength: number,
|
|
4
5
|
localSelectedObjects: string
|
|
5
6
|
): boolean => {
|
|
6
|
-
let result =
|
|
7
|
+
let result = !selectedRowsLength
|
|
7
8
|
|
|
8
|
-
if (type === 'host'
|
|
9
|
-
result = true
|
|
9
|
+
if (type === 'host') {
|
|
10
|
+
if (selectedMetric === 'cpu' && !localSelectedObjects) result = true
|
|
11
|
+
else if (selectedMetric === 'disk') {
|
|
12
|
+
result = !localSelectedObjects
|
|
13
|
+
}
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
return result
|
|
12
17
|
}
|
|
@@ -43,7 +43,7 @@ const getItems = (
|
|
|
43
43
|
[localization.used, true, '110px', storageTableKeys[5]],
|
|
44
44
|
[localization.type, true, '110px', storageTableKeys[6]],
|
|
45
45
|
[localization.thinProvisioning, true, '132px', storageTableKeys[7]],
|
|
46
|
-
[localization.access, true, '110px', storageTableKeys[8]],
|
|
46
|
+
[localization.common.access, true, '110px', storageTableKeys[8]],
|
|
47
47
|
[localization.hardwareAcceleration, true, '134px', storageTableKeys[9]],
|
|
48
48
|
[localization.driverType, true, '110px', storageTableKeys[10]],
|
|
49
49
|
[localization.device, true, '110px', storageTableKeys[11]],
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
>
|
|
91
91
|
<div class="flex-align-center input-action-wrapper">
|
|
92
92
|
<input
|
|
93
|
-
id="configuration-
|
|
93
|
+
id="configuration-server-input"
|
|
94
94
|
v-model="form.server.value"
|
|
95
|
-
data-id="configuration-
|
|
95
|
+
data-id="configuration-server-input"
|
|
96
96
|
type="text"
|
|
97
97
|
class="clr-input"
|
|
98
98
|
@blur="onBlurInputServer"
|
package/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config.ts
CHANGED
|
@@ -43,7 +43,7 @@ const getItems = (
|
|
|
43
43
|
[localization.used, true, '110px', storageTableKeys[5]],
|
|
44
44
|
[localization.type, true, '110px', storageTableKeys[6]],
|
|
45
45
|
[localization.thinProvisioning, true, '132px', storageTableKeys[7]],
|
|
46
|
-
[localization.access, true, '110px', storageTableKeys[8]],
|
|
46
|
+
[localization.common.access, true, '110px', storageTableKeys[8]],
|
|
47
47
|
[localization.hardwareAcceleration, true, '134px', storageTableKeys[9]],
|
|
48
48
|
[localization.driverType, true, '110px', storageTableKeys[10]],
|
|
49
49
|
[localization.device, true, '110px', storageTableKeys[11]],
|
|
@@ -1,40 +1,47 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_T_LanguageKey } from '~/lib/models/types'
|
|
3
|
-
|
|
4
|
-
export function productNameLocal(
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_Localization {
|
|
7
|
-
const config = useRuntimeConfig()
|
|
8
|
-
|
|
9
|
-
const productName =
|
|
10
|
-
config.public.LOCALIZATION_CODE === 'ru'
|
|
11
|
-
? config.public.PRODUCT_NAME_RU
|
|
12
|
-
: config.public.PRODUCT_NAME_EN
|
|
13
|
-
|
|
14
|
-
return replaceProductNameRecursion(localization, productName)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const replaceProductNameRecursion = (
|
|
18
|
-
localization: UI_I_Localization,
|
|
19
|
-
productName: any
|
|
20
|
-
): UI_I_Localization => {
|
|
21
|
-
for (const key of Object.keys(localization)) {
|
|
22
|
-
const item = localization[key as UI_T_LanguageKey]
|
|
23
|
-
// TODO move to config
|
|
24
|
-
const localizationKeys = [
|
|
25
|
-
'common',
|
|
26
|
-
'auth',
|
|
27
|
-
'home',
|
|
28
|
-
'tasks',
|
|
29
|
-
'layout',
|
|
30
|
-
'mainNavigation'
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_T_LanguageKey } from '~/lib/models/types'
|
|
3
|
+
|
|
4
|
+
export function productNameLocal(
|
|
5
|
+
localization: UI_I_Localization
|
|
6
|
+
): UI_I_Localization {
|
|
7
|
+
const config = useRuntimeConfig()
|
|
8
|
+
|
|
9
|
+
const productName =
|
|
10
|
+
config.public.LOCALIZATION_CODE === 'ru'
|
|
11
|
+
? config.public.PRODUCT_NAME_RU
|
|
12
|
+
: config.public.PRODUCT_NAME_EN
|
|
13
|
+
|
|
14
|
+
return replaceProductNameRecursion(localization, productName)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const replaceProductNameRecursion = (
|
|
18
|
+
localization: UI_I_Localization,
|
|
19
|
+
productName: any
|
|
20
|
+
): UI_I_Localization => {
|
|
21
|
+
for (const key of Object.keys(localization)) {
|
|
22
|
+
const item = localization[key as UI_T_LanguageKey]
|
|
23
|
+
// TODO move to config
|
|
24
|
+
const localizationKeys = [
|
|
25
|
+
'common',
|
|
26
|
+
'auth',
|
|
27
|
+
'home',
|
|
28
|
+
'tasks',
|
|
29
|
+
'layout',
|
|
30
|
+
'mainNavigation',
|
|
31
|
+
'administration',
|
|
32
|
+
'inventoryConfigure',
|
|
33
|
+
'datastoreWizard',
|
|
34
|
+
'inventorySummary',
|
|
35
|
+
'contextMenu',
|
|
36
|
+
'networks',
|
|
37
|
+
'inventory',
|
|
38
|
+
]
|
|
39
|
+
if (localizationKeys.includes(key)) {
|
|
40
|
+
for (const key2 of Object.keys(item)) {
|
|
41
|
+
item[key2] = item[key2].replaceAll('{productName}', productName)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return localization
|
|
47
|
+
}
|
|
@@ -3,9 +3,9 @@ export function useEnvLanguage(): string {
|
|
|
3
3
|
|
|
4
4
|
let localizationCode = 'en_US'
|
|
5
5
|
const langFromLocalStorage =
|
|
6
|
+
$store.getters['main/getInterfaceLang'] || // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
|
|
6
7
|
useLocalStorage('lang') ||
|
|
7
|
-
useLocalStorage('languageType')
|
|
8
|
-
$store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
|
|
8
|
+
useLocalStorage('languageType')
|
|
9
9
|
|
|
10
10
|
if (langFromLocalStorage) {
|
|
11
11
|
if (
|
package/lib/models/interfaces.ts
CHANGED
|
@@ -20,6 +20,13 @@ export interface UI_I_Localization {
|
|
|
20
20
|
tasks: UI_I_ArbitraryObject<string>
|
|
21
21
|
layout: UI_I_ArbitraryObject<string>
|
|
22
22
|
mainNavigation: UI_I_ArbitraryObject<string>
|
|
23
|
+
administration: UI_I_ArbitraryObject<string>
|
|
24
|
+
inventoryConfigure: UI_I_ArbitraryObject<string>
|
|
25
|
+
datastoreWizard: UI_I_ArbitraryObject<string>
|
|
26
|
+
inventorySummary: UI_I_ArbitraryObject<string>
|
|
27
|
+
contextMenu: UI_I_ArbitraryObject<string>
|
|
28
|
+
networks: UI_I_ArbitraryObject<string>
|
|
29
|
+
inventory: UI_I_ArbitraryObject<string>
|
|
23
30
|
}
|
|
24
31
|
export interface UI_I_SendTaskParams {
|
|
25
32
|
method: string
|
package/lib/models/types.ts
CHANGED
|
@@ -1,29 +1,36 @@
|
|
|
1
|
-
export type UI_T_Project = 'sphere' | 'procurator'
|
|
2
|
-
|
|
3
|
-
export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
|
|
4
|
-
export type UI_T_BinaryLower =
|
|
5
|
-
| 'kb'
|
|
6
|
-
| 'mb'
|
|
7
|
-
| 'gb'
|
|
8
|
-
| 'tb'
|
|
9
|
-
| 'pb'
|
|
10
|
-
| 'eb'
|
|
11
|
-
| 'zb'
|
|
12
|
-
| 'yb'
|
|
13
|
-
|
|
14
|
-
export type UI_T_LangValue =
|
|
15
|
-
| 'en_US'
|
|
16
|
-
| 'ru_RU'
|
|
17
|
-
| 'hy_AM'
|
|
18
|
-
| 'zh_CHS'
|
|
19
|
-
| 'kk_KZ'
|
|
20
|
-
| 'be_BY'
|
|
21
|
-
| 'BROWSER'
|
|
22
|
-
|
|
23
|
-
export type UI_T_LanguageKey =
|
|
24
|
-
| 'common'
|
|
25
|
-
| 'auth'
|
|
26
|
-
| 'home'
|
|
27
|
-
| 'tasks'
|
|
28
|
-
| 'layout'
|
|
29
|
-
| 'mainNavigation'
|
|
1
|
+
export type UI_T_Project = 'sphere' | 'procurator'
|
|
2
|
+
|
|
3
|
+
export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
|
|
4
|
+
export type UI_T_BinaryLower =
|
|
5
|
+
| 'kb'
|
|
6
|
+
| 'mb'
|
|
7
|
+
| 'gb'
|
|
8
|
+
| 'tb'
|
|
9
|
+
| 'pb'
|
|
10
|
+
| 'eb'
|
|
11
|
+
| 'zb'
|
|
12
|
+
| 'yb'
|
|
13
|
+
|
|
14
|
+
export type UI_T_LangValue =
|
|
15
|
+
| 'en_US'
|
|
16
|
+
| 'ru_RU'
|
|
17
|
+
| 'hy_AM'
|
|
18
|
+
| 'zh_CHS'
|
|
19
|
+
| 'kk_KZ'
|
|
20
|
+
| 'be_BY'
|
|
21
|
+
| 'BROWSER'
|
|
22
|
+
|
|
23
|
+
export type UI_T_LanguageKey =
|
|
24
|
+
| 'common'
|
|
25
|
+
| 'auth'
|
|
26
|
+
| 'home'
|
|
27
|
+
| 'tasks'
|
|
28
|
+
| 'layout'
|
|
29
|
+
| 'mainNavigation'
|
|
30
|
+
| 'administration'
|
|
31
|
+
| 'inventoryConfigure'
|
|
32
|
+
| 'datastoreWizard'
|
|
33
|
+
| 'inventorySummary'
|
|
34
|
+
| 'contextMenu'
|
|
35
|
+
| 'networks'
|
|
36
|
+
| 'inventory'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.596",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "^1.0.15",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.91",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|