bfg-common 1.4.460 → 1.4.462
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 +4 -1
- package/assets/localization/local_en.json +4 -1
- package/assets/localization/local_hy.json +4 -1
- package/assets/localization/local_kk.json +4 -1
- package/assets/localization/local_ru.json +4 -1
- package/assets/localization/local_zh.json +4 -1
- package/components/common/home/lib/models/interfaces.ts +2 -1
- package/components/common/pages/home/resource/Resource.vue +2 -5
- package/components/common/pages/home/resource/ResourceNew.vue +39 -22
- package/components/common/pages/home/resource/ResourceOld.vue +2 -5
- package/components/common/pages/home/resource/lib/models/interfaces.ts +0 -1
- package/components/common/pages/home/resource/lib/utils/resourceMeter.ts +36 -37
- package/package.json +1 -1
|
@@ -2267,7 +2267,10 @@
|
|
|
2267
2267
|
"logout": "Выйсці"
|
|
2268
2268
|
},
|
|
2269
2269
|
"home": {
|
|
2270
|
-
"objectsWithMostAlerts": "Аб'екты з большасцю папярэджанняў"
|
|
2270
|
+
"objectsWithMostAlerts": "Аб'екты з большасцю папярэджанняў",
|
|
2271
|
+
"totalUsages": "Агульная колькасць выкарыстанняў",
|
|
2272
|
+
"totalQuantities": "Агульныя колькасці",
|
|
2273
|
+
"totalAlertsWarnings": "Усяго абвестак і папярэджанняў"
|
|
2271
2274
|
},
|
|
2272
2275
|
"tasks": {
|
|
2273
2276
|
"task": "Задача",
|
|
@@ -2271,7 +2271,10 @@
|
|
|
2271
2271
|
"logout": "Log Out"
|
|
2272
2272
|
},
|
|
2273
2273
|
"home": {
|
|
2274
|
-
"objectsWithMostAlerts": "Objects with most alerts"
|
|
2274
|
+
"objectsWithMostAlerts": "Objects with most alerts",
|
|
2275
|
+
"totalUsages": "Total Usages",
|
|
2276
|
+
"totalQuantities": "Total Quantities",
|
|
2277
|
+
"totalAlertsWarnings": "Total Alerts & Warnings"
|
|
2275
2278
|
},
|
|
2276
2279
|
"tasks": {
|
|
2277
2280
|
"task": "Task",
|
|
@@ -2271,7 +2271,10 @@
|
|
|
2271
2271
|
"logout": "Դուրս գալ"
|
|
2272
2272
|
},
|
|
2273
2273
|
"home": {
|
|
2274
|
-
"objectsWithMostAlerts": "Առավելագույն նախազգուշացումներով օբյեկտներ"
|
|
2274
|
+
"objectsWithMostAlerts": "Առավելագույն նախազգուշացումներով օբյեկտներ",
|
|
2275
|
+
"totalUsages": "Ընդհանուր կիրառումներ",
|
|
2276
|
+
"totalQuantities": "Ընդհանուր քանակություններ",
|
|
2277
|
+
"totalAlertsWarnings": "Ընդհանուր հիշեցումներ և նախազգուշացումներ"
|
|
2275
2278
|
},
|
|
2276
2279
|
"tasks": {
|
|
2277
2280
|
"task": "Առաջադրանք",
|
|
@@ -2270,7 +2270,10 @@
|
|
|
2270
2270
|
"logout": "Шығу"
|
|
2271
2271
|
},
|
|
2272
2272
|
"home": {
|
|
2273
|
-
"objectsWithMostAlerts": "Көптеген ескертулері бар нысандар"
|
|
2273
|
+
"objectsWithMostAlerts": "Көптеген ескертулері бар нысандар",
|
|
2274
|
+
"totalUsages": "Жалпы пайдаланулар",
|
|
2275
|
+
"totalQuantities": "Жалпы мөлшерлер",
|
|
2276
|
+
"totalAlertsWarnings": "Жалпы ескертулер мен ескертулер"
|
|
2274
2277
|
},
|
|
2275
2278
|
"tasks": {
|
|
2276
2279
|
"task": "Тапсырма",
|
|
@@ -2272,7 +2272,10 @@
|
|
|
2272
2272
|
"logout": "Выйти"
|
|
2273
2273
|
},
|
|
2274
2274
|
"home": {
|
|
2275
|
-
"objectsWithMostAlerts": " Объекты с большим количестом оповещений"
|
|
2275
|
+
"objectsWithMostAlerts": " Объекты с большим количестом оповещений",
|
|
2276
|
+
"totalUsages": "Всего использований",
|
|
2277
|
+
"totalQuantities": "Общее количество",
|
|
2278
|
+
"totalAlertsWarnings": "Всего оповещений и предупреждений"
|
|
2276
2279
|
},
|
|
2277
2280
|
"tasks": {
|
|
2278
2281
|
"task": "Задача",
|
|
@@ -2269,7 +2269,10 @@
|
|
|
2269
2269
|
"logout": "退出"
|
|
2270
2270
|
},
|
|
2271
2271
|
"home": {
|
|
2272
|
-
"objectsWithMostAlerts": "警报最多的对象"
|
|
2272
|
+
"objectsWithMostAlerts": "警报最多的对象",
|
|
2273
|
+
"totalUsages": "总使用量",
|
|
2274
|
+
"totalQuantities": "总数量",
|
|
2275
|
+
"totalAlertsWarnings": "警报和警告总数"
|
|
2273
2276
|
},
|
|
2274
2277
|
"tasks": {
|
|
2275
2278
|
"task": "任务",
|
|
@@ -14,13 +14,10 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script lang="ts" setup>
|
|
17
|
-
import type {
|
|
18
|
-
UI_I_ResourceMeter,
|
|
19
|
-
UI_I_MeterBlockItem,
|
|
20
|
-
} from '~/components/common/home/lib/models/interfaces'
|
|
17
|
+
import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
|
|
21
18
|
|
|
22
19
|
const props = defineProps<{
|
|
23
|
-
items:
|
|
20
|
+
items: UI_I_Resources[]
|
|
24
21
|
}>()
|
|
25
22
|
|
|
26
23
|
const { $store }: any = useNuxtApp()
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
<div class="total-usages">
|
|
3
|
+
<h1>{{ localization.home.totalUsages }}</h1>
|
|
4
|
+
<div class="total-usages__container">
|
|
5
|
+
<ui-widget v-for="(item, key) in resourceMeter" :key="key">
|
|
6
|
+
<template v-if="props.loading">
|
|
7
|
+
<ui-widget-items-skeleton-line-bar />
|
|
8
|
+
</template>
|
|
9
|
+
<ui-widget-items-progress-bar-linear
|
|
10
|
+
v-else
|
|
11
|
+
id="host-summary-memory"
|
|
12
|
+
container-id="host"
|
|
13
|
+
:icon="item.icon"
|
|
14
|
+
:title="item.title"
|
|
15
|
+
:data="item.data"
|
|
16
|
+
:used-title="item.usedTitle"
|
|
17
|
+
:capacity-title="item.capacityTitle"
|
|
18
|
+
:status="item.status"
|
|
19
|
+
/>
|
|
20
|
+
</ui-widget>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
18
23
|
</template>
|
|
19
24
|
|
|
20
25
|
<script lang="ts" setup>
|
|
21
26
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
import type {
|
|
23
|
-
UI_I_ResourceMeter,
|
|
24
|
-
UI_I_MeterBlockItem,
|
|
25
|
-
} from '~/components/common/home/lib/models/interfaces'
|
|
27
|
+
import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
|
|
26
28
|
import type { UI_I_ResourceBlock } from '~/components/common/pages/home/resource/lib/models/interfaces'
|
|
27
29
|
import { constructResourceMeter } from '~/components/common/pages/home/resource/lib/utils/resourceMeter'
|
|
28
30
|
|
|
29
31
|
const props = defineProps<{
|
|
30
|
-
items:
|
|
32
|
+
items: UI_I_Resources[]
|
|
31
33
|
loading: boolean
|
|
32
34
|
}>()
|
|
33
35
|
|
|
@@ -38,4 +40,19 @@ const resourceMeter = computed<UI_I_ResourceBlock[]>(() =>
|
|
|
38
40
|
)
|
|
39
41
|
</script>
|
|
40
42
|
|
|
41
|
-
<style lang="scss" scoped
|
|
43
|
+
<style lang="scss" scoped>
|
|
44
|
+
.total-usages {
|
|
45
|
+
& > h1 {
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
line-height: 16.94px;
|
|
49
|
+
color: #9da6ad;
|
|
50
|
+
margin-bottom: 12px;
|
|
51
|
+
}
|
|
52
|
+
&__container {
|
|
53
|
+
display: grid;
|
|
54
|
+
grid-template-columns: repeat(3, 1fr);
|
|
55
|
+
grid-column-gap: 12px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</style>
|
|
@@ -35,13 +35,10 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
<script setup lang="ts">
|
|
37
37
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
38
|
-
import type {
|
|
39
|
-
UI_I_ResourceMeter,
|
|
40
|
-
UI_I_MeterBlockItem,
|
|
41
|
-
} from '~/components/common/home/lib/models/interfaces'
|
|
38
|
+
import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
|
|
42
39
|
|
|
43
40
|
const props = defineProps<{
|
|
44
|
-
items:
|
|
41
|
+
items: UI_I_Resources[]
|
|
45
42
|
}>()
|
|
46
43
|
|
|
47
44
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -1,50 +1,49 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type {
|
|
3
|
-
UI_I_ResourceMeter,
|
|
4
|
-
UI_I_MeterBlockItem,
|
|
5
|
-
} from '~/components/common/home/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
|
|
6
3
|
import type { UI_I_ResourceBlock } from '~/components/common/pages/home/resource/lib/models/interfaces'
|
|
7
4
|
|
|
8
5
|
export const constructResourceMeter = (
|
|
9
|
-
data:
|
|
6
|
+
data: UI_I_Resources[],
|
|
10
7
|
localization: UI_I_Localization
|
|
11
8
|
): UI_I_ResourceBlock[] => {
|
|
12
9
|
if (!data) return []
|
|
13
10
|
|
|
14
11
|
return (
|
|
15
|
-
data
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let title = ''
|
|
19
|
-
let icon = ''
|
|
12
|
+
data.map((item, key) => {
|
|
13
|
+
let title = ''
|
|
14
|
+
let icon = ''
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
switch (item.type) {
|
|
17
|
+
case 'memory':
|
|
18
|
+
title = localization.common.memory
|
|
19
|
+
icon = 'widget-memory'
|
|
20
|
+
break
|
|
21
|
+
case 'storage':
|
|
22
|
+
title = localization.common.storage
|
|
23
|
+
icon = 'widget-datastore'
|
|
24
|
+
break
|
|
25
|
+
case 'cpu':
|
|
26
|
+
title = localization.common.cpu
|
|
27
|
+
icon = 'widget-cpu'
|
|
28
|
+
break
|
|
29
|
+
}
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
return {
|
|
32
|
+
id: `${item.type}-${key}`,
|
|
33
|
+
containerId: `${key}`,
|
|
34
|
+
icon,
|
|
35
|
+
title,
|
|
36
|
+
data: {
|
|
37
|
+
used: item.used.text,
|
|
38
|
+
usedPureValue: item.used.value as number,
|
|
39
|
+
capacity: item.capacity.text,
|
|
40
|
+
capacityPureValue: item.capacity.value as number,
|
|
41
|
+
free: item.free.text,
|
|
42
|
+
},
|
|
43
|
+
usedTitle: localization.common.used,
|
|
44
|
+
capacityTitle: localization.common.capacity,
|
|
45
|
+
status: localization.common.available,
|
|
46
|
+
}
|
|
47
|
+
}) || []
|
|
49
48
|
)
|
|
50
49
|
}
|