bfg-common 1.6.111 → 1.6.112
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 +1 -2
- package/assets/localization/local_en.json +1 -2
- package/assets/localization/local_hy.json +1 -2
- package/assets/localization/local_kk.json +1 -2
- package/assets/localization/local_ru.json +4 -5
- package/assets/localization/local_zh.json +1 -2
- package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +17 -25
- package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +4 -4
- package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +23 -42
- package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +3 -5
- package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +2 -27
- package/components/common/configure/advancedSystemSettings/tableView/new/New.vue +130 -60
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts +308 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +41 -14
- package/components/common/configure/advancedSystemSettings/tableView/{field → old/field}/Field.vue +50 -20
- package/components/common/configure/advancedSystemSettings/tableView/old/field/lib/models/enums.ts +14 -0
- package/components/common/configure/advancedSystemSettings/tools/New.vue +3 -64
- package/components/common/configure/advancedSystemSettings/tools/Old.vue +2 -2
- package/components/common/configure/advancedSystemSettings/tools/Tools.vue +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +569 -569
- package/package.json +1 -1
- package/components/common/configure/advancedSystemSettings/New.vue +0 -37
- package/components/common/configure/advancedSystemSettings/Old.vue +0 -36
- package/components/common/configure/advancedSystemSettings/tableView/field/New.vue +0 -88
- package/components/common/configure/advancedSystemSettings/tableView/field/Old.vue +0 -73
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/config/index.ts +0 -10
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/models/enums.ts +0 -14
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/index.ts +0 -112
|
@@ -4648,8 +4648,7 @@
|
|
|
4648
4648
|
"advancedSystemSettings": {
|
|
4649
4649
|
"key": "Ключ",
|
|
4650
4650
|
"value": "Значэнне",
|
|
4651
|
-
"summary": "Зводка"
|
|
4652
|
-
"keysCountText": "ключ(ы)"
|
|
4651
|
+
"summary": "Зводка"
|
|
4653
4652
|
},
|
|
4654
4653
|
"tagsAndAttributes": {
|
|
4655
4654
|
"attributeDeleteConfirmation": "Вы ўпэўненыя, што хочаце выдаліць карыстацкі атрыбут \"{attributeName}\"?",
|
|
@@ -4653,8 +4653,7 @@
|
|
|
4653
4653
|
"advancedSystemSettings": {
|
|
4654
4654
|
"key": "Key",
|
|
4655
4655
|
"value": "Value",
|
|
4656
|
-
"summary": "Summary"
|
|
4657
|
-
"keysCountText": "key(s)"
|
|
4656
|
+
"summary": "Summary"
|
|
4658
4657
|
},
|
|
4659
4658
|
"tagsAndAttributes": {
|
|
4660
4659
|
"attributeDeleteConfirmation": "Are you sure you want to delete the custom attribute \"{attributeName}\"?",
|
|
@@ -4652,8 +4652,7 @@
|
|
|
4652
4652
|
"advancedSystemSettings": {
|
|
4653
4653
|
"key": "Բանալի",
|
|
4654
4654
|
"value": "Արժեք",
|
|
4655
|
-
"summary": "Ամփոփում"
|
|
4656
|
-
"keysCountText": "բանալի(ներ)"
|
|
4655
|
+
"summary": "Ամփոփում"
|
|
4657
4656
|
},
|
|
4658
4657
|
"tagsAndAttributes": {
|
|
4659
4658
|
"attributeDeleteConfirmation": "Համոզվա՞ծ եք, որ ցանկանում եք հեռացնել \"{attributeName}\" հատուկ ատրիբուտը?",
|
|
@@ -4651,8 +4651,7 @@
|
|
|
4651
4651
|
"advancedSystemSettings": {
|
|
4652
4652
|
"key": "Кілт",
|
|
4653
4653
|
"value": "Мән",
|
|
4654
|
-
"summary": "Түйіндеме"
|
|
4655
|
-
"keysCountText": "кілт(тер)"
|
|
4654
|
+
"summary": "Түйіндеме"
|
|
4656
4655
|
},
|
|
4657
4656
|
"tagsAndAttributes": {
|
|
4658
4657
|
"attributeDeleteConfirmation": "\"{attributeName}\" теңшелетін төлсипатын жойғыңыз келетініне сенімдісіз бе?",
|
|
@@ -2578,12 +2578,12 @@
|
|
|
2578
2578
|
"vmAndTemplateDirectories": "Папки ВМ и шаблонов",
|
|
2579
2579
|
"vmApplications": "Приложения виртуальных машин",
|
|
2580
2580
|
"resourcePools": "Пулы ресурсов",
|
|
2581
|
-
"buckets": "
|
|
2581
|
+
"buckets": "Контейнеры",
|
|
2582
2582
|
"backupStorages": "Хранилища резервных копий",
|
|
2583
2583
|
"backupStorage": "Хранилище резервной копии",
|
|
2584
2584
|
"backupStorageDirectories": "Папки хранилищ резервных копий",
|
|
2585
2585
|
"scope": "Область",
|
|
2586
|
-
"bucket": "
|
|
2586
|
+
"bucket": "Контейнер",
|
|
2587
2587
|
"namespace": "Неймспейс",
|
|
2588
2588
|
"vmApplication": "Приложение виртуальной машины",
|
|
2589
2589
|
"zoneDirectory": "Папка зон",
|
|
@@ -4163,7 +4163,7 @@
|
|
|
4163
4163
|
"show_cluster": "Просмотр кластера",
|
|
4164
4164
|
"show_templates": "Просмотр шаблонов",
|
|
4165
4165
|
"show_network": "Просмотр сети",
|
|
4166
|
-
"show_buckets": "Отобразить
|
|
4166
|
+
"show_buckets": "Отобразить контейнер",
|
|
4167
4167
|
"show_rbac": "Просмотр информации о RBAC",
|
|
4168
4168
|
"show_zone": "Просмотр зоны",
|
|
4169
4169
|
"show_ghydra": "Просмотр Sphere Ghydra",
|
|
@@ -4651,8 +4651,7 @@
|
|
|
4651
4651
|
"advancedSystemSettings": {
|
|
4652
4652
|
"key": "Ключ",
|
|
4653
4653
|
"value": "Значение",
|
|
4654
|
-
"summary": "Сводка"
|
|
4655
|
-
"keysCountText": "ключ(и)"
|
|
4654
|
+
"summary": "Сводка"
|
|
4656
4655
|
},
|
|
4657
4656
|
"tagsAndAttributes": {
|
|
4658
4657
|
"attributeDeleteConfirmation": "Вы уверены, что хотите удалить пользовательский атрибут \"{attributeName}\"?",
|
|
@@ -4649,8 +4649,7 @@
|
|
|
4649
4649
|
"advancedSystemSettings": {
|
|
4650
4650
|
"key": "键",
|
|
4651
4651
|
"value": "值",
|
|
4652
|
-
"summary": "摘要"
|
|
4653
|
-
"keysCountText": "密钥"
|
|
4652
|
+
"summary": "摘要"
|
|
4654
4653
|
},
|
|
4655
4654
|
"tagsAndAttributes": {
|
|
4656
4655
|
"attributeDeleteConfirmation": "您确定要删除自定义属性\"{attributeName}\"吗?",
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
<atoms-loader v-show="loading" test-id="advanced-system-settings-spinner" />
|
|
3
|
+
<div class="advanced-system-settings flex flex-col h-full">
|
|
4
|
+
<common-configure-advanced-system-settings-tools
|
|
5
|
+
class="mb-1"
|
|
6
|
+
@show-edit="isShowEdit = true"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<common-configure-advanced-system-settings-table-view :data="settings" />
|
|
10
|
+
|
|
11
|
+
<common-configure-advanced-system-settings-modals-edit
|
|
12
|
+
v-if="isShowEdit"
|
|
13
|
+
:host="props.host"
|
|
14
|
+
:settings="settings"
|
|
15
|
+
@hide="isShowEdit = false"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
15
18
|
</template>
|
|
16
19
|
|
|
17
20
|
<script lang="ts" setup>
|
|
@@ -24,22 +27,11 @@ const props = defineProps<{
|
|
|
24
27
|
|
|
25
28
|
const { $store }: any = useNuxtApp()
|
|
26
29
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const currentComponent = computed(() =>
|
|
30
|
-
isNewView.value
|
|
31
|
-
? defineAsyncComponent(() => import('./New.vue'))
|
|
32
|
-
: defineAsyncComponent(() => import('./Old.vue'))
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
const isLoading = computed<boolean>(() =>
|
|
36
|
-
$store.getters['advancedSystemSettings/getLoading']('settings')
|
|
37
|
-
)
|
|
30
|
+
const loading = computed<boolean>(() => $store.getters['advancedSystemSettings/getLoading']('settings'))
|
|
38
31
|
|
|
39
32
|
const settings = computed<API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>>(
|
|
40
33
|
() => $store.getters['advancedSystemSettings/getSettings']
|
|
41
34
|
)
|
|
42
|
-
|
|
43
35
|
const getSettings = async (): Promise<void> => {
|
|
44
36
|
await $store.dispatch('advancedSystemSettings/A_GET_SETTINGS', props.host)
|
|
45
37
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
v-model:invalid-fields="invalidFields"
|
|
6
6
|
:host="props.host"
|
|
7
7
|
:settings="props.settings"
|
|
8
|
-
:
|
|
8
|
+
:loading="loading"
|
|
9
9
|
:errors="errors"
|
|
10
10
|
@hide="onHide"
|
|
11
11
|
@submit="onSubmit"
|
|
@@ -39,7 +39,7 @@ const settingsLocal = ref<API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>>(
|
|
|
39
39
|
useDeepCopy(props.settings)
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
const
|
|
42
|
+
const loading = ref<boolean>(false)
|
|
43
43
|
|
|
44
44
|
const errors = ref<string[]>([])
|
|
45
45
|
const invalidFields = ref<string[]>([])
|
|
@@ -50,7 +50,7 @@ const onSubmit = async (): Promise<void> => {
|
|
|
50
50
|
return
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
loading.value = true
|
|
54
54
|
|
|
55
55
|
const error = await $store.dispatch(
|
|
56
56
|
'advancedSystemSettings/A_UPDATE_SETTINGS',
|
|
@@ -67,7 +67,7 @@ const onSubmit = async (): Promise<void> => {
|
|
|
67
67
|
if (error) errors.value.push(error)
|
|
68
68
|
else onHide()
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
loading.value = false
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
const onHide = (): void => {
|
|
@@ -1,52 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:title="localization.common.
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:is-loading="props.isLoading"
|
|
2
|
+
<atoms-modal
|
|
3
|
+
:title="localization.common.edit"
|
|
4
|
+
:second-title="props.host"
|
|
5
|
+
:loading="props.loading"
|
|
7
6
|
test-id="advanced-system-settings-edit"
|
|
8
|
-
|
|
7
|
+
class="advanced-system-settings"
|
|
9
8
|
show
|
|
10
9
|
@hide="onHide"
|
|
11
10
|
>
|
|
12
|
-
<template #
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
11
|
+
<template #modalBody>
|
|
12
|
+
<atoms-alert
|
|
13
|
+
v-show="props.errors.length"
|
|
14
|
+
:items="props.errors"
|
|
15
|
+
status="alert-danger"
|
|
16
|
+
test-id="advanced-system-service-alert"
|
|
17
|
+
class="mb-1"
|
|
18
|
+
@remove="emits('remove-validation-errors')"
|
|
19
|
+
/>
|
|
20
|
+
|
|
21
|
+
<common-configure-advanced-system-settings-table-view
|
|
22
|
+
v-model:invalid-fields="invalidFields"
|
|
23
|
+
:data="props.settings"
|
|
24
|
+
/>
|
|
28
25
|
</template>
|
|
29
|
-
|
|
30
|
-
</ui-modal>
|
|
26
|
+
</atoms-modal>
|
|
31
27
|
</template>
|
|
32
28
|
|
|
33
29
|
<script lang="ts" setup>
|
|
34
30
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
31
|
import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
36
32
|
import type { UI_I_AdvancedSystemSetting } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
|
|
37
|
-
import type { UI_I_ModalTexts } from 'bfg-uikit/components/ui/modal/models/interfaces'
|
|
38
33
|
|
|
39
|
-
const
|
|
40
|
-
required: true,
|
|
41
|
-
})
|
|
42
|
-
const invalidFields = defineModel<string[]>('invalid-fields', {
|
|
43
|
-
required: true,
|
|
44
|
-
})
|
|
34
|
+
const invalidFields = defineModel<string[]>('invalid-fields', {required: true})
|
|
45
35
|
|
|
46
36
|
const props = defineProps<{
|
|
47
37
|
host: string
|
|
48
38
|
settings: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>
|
|
49
|
-
|
|
39
|
+
loading: boolean
|
|
50
40
|
errors: string[]
|
|
51
41
|
}>()
|
|
52
42
|
|
|
@@ -58,18 +48,9 @@ const emits = defineEmits<{
|
|
|
58
48
|
|
|
59
49
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
60
50
|
|
|
61
|
-
const modalTextsLocal = computed<UI_I_ModalTexts>(() => ({
|
|
62
|
-
button2: localization.value.common.save,
|
|
63
|
-
}))
|
|
64
|
-
|
|
65
51
|
const onHide = (): void => {
|
|
66
52
|
emits('hide')
|
|
67
53
|
}
|
|
68
54
|
</script>
|
|
69
55
|
|
|
70
|
-
<style lang="scss" scoped>
|
|
71
|
-
.advanced-system-settings-edit-modal-body {
|
|
72
|
-
height: 400px;
|
|
73
|
-
overflow: auto;
|
|
74
|
-
}
|
|
75
|
-
</style>
|
|
56
|
+
<style lang="scss" scoped></style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<atoms-modal
|
|
3
3
|
:title="localization.common.edit"
|
|
4
4
|
:second-title="props.host"
|
|
5
|
-
:loading="props.
|
|
5
|
+
:loading="props.loading"
|
|
6
6
|
test-id="advanced-system-settings-edit"
|
|
7
7
|
class="advanced-system-settings"
|
|
8
8
|
width="863px"
|
|
@@ -38,14 +38,12 @@ import type { UI_I_AdvancedSystemSetting } from '~/store/inventory/modules/confi
|
|
|
38
38
|
const model = defineModel<API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>>({
|
|
39
39
|
required: true,
|
|
40
40
|
})
|
|
41
|
-
const invalidFields = defineModel<string[]>('invalid-fields', {
|
|
42
|
-
required: true,
|
|
43
|
-
})
|
|
41
|
+
const invalidFields = defineModel<string[]>('invalid-fields', {required: true})
|
|
44
42
|
|
|
45
43
|
const props = defineProps<{
|
|
46
44
|
host: string
|
|
47
45
|
settings: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>
|
|
48
|
-
|
|
46
|
+
loading: boolean
|
|
49
47
|
errors: string[]
|
|
50
48
|
}>()
|
|
51
49
|
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
3
|
:is="currentComponent"
|
|
4
|
+
v-model:settings="settings"
|
|
5
|
+
v-model:invalid-fields="invalidFields"
|
|
4
6
|
:data-table="props.data?.items || []"
|
|
5
7
|
:total-items="props.data?.total_items || 0"
|
|
6
8
|
:total-pages="props.data?.total_pages || 1"
|
|
7
9
|
:is-edit="props.isEdit"
|
|
8
|
-
:is-loading="props.isLoading"
|
|
9
|
-
@change-setting="onChangeSetting"
|
|
10
|
-
@update-invalid-fields="onUpdateInvalidFields"
|
|
11
10
|
/>
|
|
12
11
|
</template>
|
|
13
12
|
|
|
14
13
|
<script lang="ts" setup>
|
|
15
14
|
import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
16
15
|
import type { UI_I_AdvancedSystemSetting } from '~/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces'
|
|
17
|
-
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
18
|
-
import type { UI_I_AdvancedSystemSettingsEditData } from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/models/interfaces'
|
|
19
16
|
|
|
20
17
|
const settings = defineModel<API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>>(
|
|
21
18
|
'settings',
|
|
@@ -27,7 +24,6 @@ const invalidFields = defineModel<string[]>('invalid-fields', {
|
|
|
27
24
|
const props = withDefaults(
|
|
28
25
|
defineProps<{
|
|
29
26
|
data: API_UI_I_DataTable<UI_I_AdvancedSystemSetting[]>
|
|
30
|
-
isLoading: boolean
|
|
31
27
|
isEdit?: boolean
|
|
32
28
|
}>(),
|
|
33
29
|
{ isEdit: false }
|
|
@@ -41,25 +37,4 @@ const currentComponent = computed(() =>
|
|
|
41
37
|
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
42
38
|
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
43
39
|
)
|
|
44
|
-
|
|
45
|
-
const onChangeSetting = (
|
|
46
|
-
value: UI_I_AdvancedSystemSettingsEditData['value'],
|
|
47
|
-
key: string
|
|
48
|
-
): void => {
|
|
49
|
-
settings.value.items = settings.value.items.map((item) => {
|
|
50
|
-
if (item.key === key) {
|
|
51
|
-
item.value = value
|
|
52
|
-
}
|
|
53
|
-
return item
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const invalidFieldsLocal = ref<UI_I_ArbitraryObject<string>>({})
|
|
58
|
-
const onUpdateInvalidFields = (value: string, key: string): void => {
|
|
59
|
-
invalidFieldsLocal.value[key] = value
|
|
60
|
-
if (invalidFields.value)
|
|
61
|
-
invalidFields.value = Object.values(invalidFieldsLocal.value).filter(
|
|
62
|
-
(error) => error
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
40
|
</script>
|
|
@@ -1,29 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
<div class="device-table-container">
|
|
3
|
+
<ui-data-table
|
|
4
|
+
:data="data"
|
|
5
|
+
:options="options"
|
|
6
|
+
:total-pages="props.totalPages"
|
|
7
|
+
:total-items="props.totalItems"
|
|
8
|
+
:texts="texts"
|
|
9
|
+
:default-layout="false"
|
|
10
|
+
:skeleton="tableSkeleton"
|
|
11
|
+
test-id="compute-resource-table"
|
|
12
|
+
class="device-table"
|
|
13
|
+
size="sm"
|
|
14
|
+
@select-row="onSelectRow"
|
|
15
|
+
>
|
|
16
|
+
<template #icon="{ item }">
|
|
17
|
+
<span :class="['device-table__icon', item.data.iconClassName]" />
|
|
18
|
+
<span class="device-table__text text-ellipsis">
|
|
19
|
+
{{ item.text }}
|
|
20
|
+
</span>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<template #progress="{ item }">
|
|
24
|
+
<div class="progress flex items-center justify-between w-full">
|
|
25
|
+
<div class="progress-line">
|
|
26
|
+
<div
|
|
27
|
+
v-if="item.data"
|
|
28
|
+
:style="`width: ${item.data}%`"
|
|
29
|
+
class="progress-line-fill"
|
|
30
|
+
></div>
|
|
31
|
+
</div>
|
|
32
|
+
<div
|
|
33
|
+
:class="[
|
|
34
|
+
'progress-text',
|
|
35
|
+
{
|
|
36
|
+
'progress-full': item.data === 100,
|
|
37
|
+
},
|
|
38
|
+
]"
|
|
39
|
+
>
|
|
40
|
+
{{ item.text }}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<template #status="{ item }">
|
|
46
|
+
<ui-chip
|
|
47
|
+
:test-id="item.data.testId"
|
|
48
|
+
:color="item.data.chipColor"
|
|
49
|
+
size="sm"
|
|
50
|
+
rounded
|
|
51
|
+
>
|
|
52
|
+
<ui-icon
|
|
53
|
+
:name="item.data.icon"
|
|
54
|
+
width="14px"
|
|
55
|
+
height="14px"
|
|
56
|
+
class="chip-icon"
|
|
57
|
+
></ui-icon>
|
|
58
|
+
{{ item.text }}
|
|
59
|
+
</ui-chip>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<template #skeleton-header>
|
|
63
|
+
<div class="flex justify-between items-center">
|
|
64
|
+
<ui-skeleton-item width="80" height="20" />
|
|
65
|
+
<ui-skeleton-item width="88" height="28" border-radius="6" />
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</ui-data-table>
|
|
69
|
+
</div>
|
|
27
70
|
</template>
|
|
28
71
|
|
|
29
72
|
<script lang="ts" setup>
|
|
@@ -33,34 +76,22 @@ import type {
|
|
|
33
76
|
UI_I_DataTableHeader,
|
|
34
77
|
UI_I_DataTableBody,
|
|
35
78
|
UI_I_TableTexts,
|
|
36
|
-
UI_I_DataTableSkeleton,
|
|
37
|
-
UI_I_DataTableOptions,
|
|
38
79
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
39
|
-
import type {
|
|
40
|
-
import type { UI_I_AdvancedSystemSettingsEditData } from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/models/interfaces'
|
|
80
|
+
import type { UI_I_DataTableSkeleton } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
41
81
|
import {
|
|
42
|
-
|
|
82
|
+
options,
|
|
43
83
|
getHeaderDataFunc,
|
|
44
84
|
getBodyDataFunc,
|
|
45
|
-
} from '~/components/common/
|
|
85
|
+
} from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
|
|
46
86
|
|
|
87
|
+
const selectedDataLocal = defineModel<number | null>({ required: true })
|
|
47
88
|
const props = defineProps<{
|
|
48
|
-
dataTable:
|
|
89
|
+
dataTable: any[]
|
|
49
90
|
totalItems: number
|
|
50
91
|
totalPages: number
|
|
51
|
-
isLoading: boolean
|
|
52
92
|
isEdit: boolean
|
|
53
93
|
}>()
|
|
54
94
|
|
|
55
|
-
const emits = defineEmits<{
|
|
56
|
-
(
|
|
57
|
-
event: 'change-setting',
|
|
58
|
-
value1: UI_I_AdvancedSystemSettingsEditData['value'],
|
|
59
|
-
value2: string
|
|
60
|
-
): void
|
|
61
|
-
(event: 'update-invalid-fields', value1: string, value2: string): void
|
|
62
|
-
}>()
|
|
63
|
-
|
|
64
95
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
65
96
|
|
|
66
97
|
const texts = computed<UI_I_TableTexts>(() => ({
|
|
@@ -79,45 +110,84 @@ const texts = computed<UI_I_TableTexts>(() => ({
|
|
|
79
110
|
}))
|
|
80
111
|
|
|
81
112
|
const tableSkeleton = ref<UI_I_DataTableSkeleton>({
|
|
82
|
-
columnsCount:
|
|
113
|
+
columnsCount: 4,
|
|
83
114
|
headColumns: [],
|
|
84
115
|
bodyColumns: [],
|
|
85
116
|
withoutPagination: true,
|
|
86
117
|
})
|
|
87
118
|
|
|
88
119
|
const data = computed<UI_I_DataTable>(() => ({
|
|
89
|
-
id: '
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
id: 'compute-resource-host-table',
|
|
121
|
+
title: `${localization.value.common.hosts} (${props.totalItems})`,
|
|
122
|
+
header: deviceHeadItems.value,
|
|
123
|
+
body: deviceBodyItems.value,
|
|
92
124
|
}))
|
|
93
125
|
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
const options = computed<UI_I_DataTableOptions>(() => optionsFunc(props.isEdit))
|
|
97
|
-
|
|
98
|
-
const tableHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
99
|
-
getHeaderDataFunc(localization.value, props.isEdit)
|
|
126
|
+
const deviceHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
127
|
+
getHeaderDataFunc(localization.value)
|
|
100
128
|
)
|
|
101
129
|
|
|
102
|
-
const
|
|
130
|
+
const deviceBodyItems = ref<UI_I_DataTableBody[]>([])
|
|
103
131
|
watch(
|
|
104
132
|
() => props.dataTable,
|
|
105
|
-
(newValue:
|
|
133
|
+
(newValue: UI_T_ComputeResourceTableItem[]) => {
|
|
106
134
|
if (!newValue?.length) {
|
|
107
|
-
|
|
135
|
+
deviceBodyItems.value = []
|
|
108
136
|
return
|
|
109
137
|
}
|
|
110
138
|
|
|
111
|
-
|
|
139
|
+
deviceBodyItems.value = getBodyDataFunc(newValue, localization.value)
|
|
112
140
|
},
|
|
113
141
|
{ deep: true, immediate: true }
|
|
114
142
|
)
|
|
143
|
+
|
|
144
|
+
const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
145
|
+
selectedDataLocal.value = value?.[0].row
|
|
146
|
+
}
|
|
115
147
|
</script>
|
|
116
148
|
|
|
117
149
|
<style lang="scss" scoped>
|
|
118
|
-
.table-
|
|
119
|
-
margin
|
|
120
|
-
|
|
121
|
-
|
|
150
|
+
.device-table-container {
|
|
151
|
+
margin: 20px 0 24px;
|
|
152
|
+
:deep(.column-manager-button.sm span) {
|
|
153
|
+
font-weight: 500;
|
|
154
|
+
}
|
|
155
|
+
:deep(.table-title .title-container h6) {
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
}
|
|
158
|
+
.device-table {
|
|
159
|
+
&__icon {
|
|
160
|
+
margin-right: 4px;
|
|
161
|
+
}
|
|
162
|
+
&__text {
|
|
163
|
+
font-size: 12px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
.progress {
|
|
167
|
+
&-line {
|
|
168
|
+
height: 12px;
|
|
169
|
+
width: 100%;
|
|
170
|
+
background: #e9ebed8f;
|
|
171
|
+
border-radius: 6px;
|
|
172
|
+
|
|
173
|
+
&-fill {
|
|
174
|
+
height: 12px;
|
|
175
|
+
min-width: 12px;
|
|
176
|
+
background: #008fd6;
|
|
177
|
+
border-radius: 6px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&-text {
|
|
182
|
+
width: 53px;
|
|
183
|
+
min-width: 53px;
|
|
184
|
+
margin-left: 8px;
|
|
185
|
+
text-align: right;
|
|
186
|
+
|
|
187
|
+
&.progress-full {
|
|
188
|
+
color: #ea3223;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
122
192
|
}
|
|
123
193
|
</style>
|