bfg-common 1.6.113 → 1.6.114
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-4.svg +38 -17
- package/assets/img/icons/icons-sprite-light-4.svg +49 -17
- package/assets/localization/local_be.json +43 -4
- package/assets/localization/local_en.json +43 -4
- package/assets/localization/local_hy.json +43 -4
- package/assets/localization/local_kk.json +43 -4
- package/assets/localization/local_ru.json +43 -4
- package/assets/localization/local_zh.json +43 -4
- package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +25 -17
- package/components/common/configure/advancedSystemSettings/New.vue +41 -0
- package/components/common/configure/advancedSystemSettings/Old.vue +36 -0
- package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +4 -4
- package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +42 -23
- package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +5 -3
- package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +27 -2
- package/components/common/configure/advancedSystemSettings/tableView/{old/field → field}/Field.vue +20 -50
- package/components/common/configure/advancedSystemSettings/tableView/field/New.vue +88 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/Old.vue +73 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/config/index.ts +10 -0
- package/components/common/configure/advancedSystemSettings/tableView/field/lib/models/enums.ts +14 -0
- package/components/common/configure/advancedSystemSettings/tableView/new/New.vue +60 -130
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/index.ts +112 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +14 -41
- package/components/common/configure/advancedSystemSettings/tools/New.vue +64 -3
- package/components/common/configure/advancedSystemSettings/tools/Old.vue +2 -2
- package/components/common/configure/advancedSystemSettings/tools/Tools.vue +2 -2
- package/components/common/configure/physicalAdapters/modals/edit/lib/config/config.ts +59 -59
- package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +353 -345
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +327 -323
- package/components/common/graph/Graph.vue +19 -8
- package/components/common/graph/{graphNew/GraphNew.vue → new/New.vue} +3 -3
- package/components/common/modals/confirmation/Confirmation.vue +1 -0
- package/components/common/monitor/advanced/Advanced.vue +9 -49
- package/components/common/monitor/advanced/graphView/GraphView.vue +8 -12
- package/components/common/monitor/advanced/graphView/{GraphViewNew.vue → New.vue} +1 -1
- package/components/common/monitor/advanced/table/Table.vue +9 -8
- package/components/common/monitor/advanced/table/{tableNew/TableNew.vue → new/New.vue} +6 -5
- package/components/common/monitor/advanced/table/{tableNew → new}/lib/config/options.ts +1 -1
- package/components/common/monitor/advanced/table/{tableOld/TableOld.vue → old/Old.vue} +6 -3
- package/components/common/monitor/advanced/tools/{ToolsNew.vue → New.vue} +4 -0
- package/components/common/monitor/advanced/tools/{ToolsOld.vue → Old.vue} +2 -0
- package/components/common/monitor/advanced/tools/Tools.vue +11 -53
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +9 -13
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/{ActionsNew.vue → New.vue} +6 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +12 -44
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +8 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew/TableNew.vue → new/New.vue} +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/config/tableData.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld/TableOld.vue → old/Old.vue} +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld → old}/lib/config/tableConfig.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +9 -36
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +8 -9
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew/ObjectNew.vue → new/New.vue} +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/config/tableData.ts +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectOld/ObjectOld.vue → old/Old.vue} +1 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +8 -7
- package/components/common/monitor/advanced/tools/chartOptionsModal/{NotificationNew.vue → notification/New.vue} +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/{Notification.vue → notification/Notification.vue} +8 -6
- package/components/common/monitor/advanced/tools/chartOptionsModal/{NotificationOld.vue → notification/Old.vue} +1 -5
- package/components/common/monitor/overview/OverviewNew.vue +1 -1
- package/components/common/monitor/overview/OverviewOld.vue +1 -1
- package/components/common/monitor/overview/filters/FiltersNew.vue +1 -0
- package/components/common/monitor/overview/filters/FiltersOld.vue +1 -0
- package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +2 -2
- package/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts +0 -308
- package/components/common/configure/advancedSystemSettings/tableView/old/field/lib/models/enums.ts +0 -14
- package/components/common/graph/lib/utils/renderGraph.ts +0 -393
- /package/components/common/graph/{GraphOld.vue → Old.vue} +0 -0
- /package/components/common/graph/{graphNew → new}/EmptyBlock.vue +0 -0
- /package/components/common/graph/{graphNew → new}/lib/models/enums.ts +0 -0
- /package/components/common/monitor/advanced/{AdvancedNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/{AdvancedOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/graphView/{GraphViewOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/table/{tableNew → new}/lib/utils/constructBody.ts +0 -0
- /package/components/common/monitor/advanced/table/{tableOld → old}/lib/config/performanceDatatable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/{ChartOptionsModalNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/{ChartOptionsModalOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/actions/{ActionsOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/{CountersNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/{CountersOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/config/options.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableNew → new}/utils/constructTable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/{tableOld → old}/lib/models/types.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/{TimespanNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/{TimespanOld.vue → Old.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/config/options.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/{objectNew → new}/lib/utils/constructTable.ts +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/{MetricsNew.vue → New.vue} +0 -0
- /package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/{MetricsOld.vue → Old.vue} +0 -0
|
@@ -32,7 +32,7 @@ import type {
|
|
|
32
32
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
33
|
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
34
34
|
import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
|
|
35
|
-
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/
|
|
35
|
+
import * as table from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/old/lib/config/tableConfig'
|
|
36
36
|
|
|
37
37
|
const selectedCountersLocal = defineModel<number[]>('selectedCounters', {
|
|
38
38
|
required: true,
|
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
UI_I_BodyItem,
|
|
5
5
|
UI_I_ColumnKey,
|
|
6
6
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
7
|
-
import type { UI_T_AdvancedCountersColumnKey } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/
|
|
7
|
+
import type { UI_T_AdvancedCountersColumnKey } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/old/lib/models/types'
|
|
8
8
|
import type { UI_I_AdvancedCounterItem } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/models/interfaces'
|
|
9
9
|
import {
|
|
10
10
|
constructColumnKey,
|
package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
4
|
:type="props.type"
|
|
5
5
|
:chart="props.chart"
|
|
6
6
|
:language="props.language"
|
|
@@ -20,45 +20,12 @@
|
|
|
20
20
|
:objects-loading="props.objectsLoading"
|
|
21
21
|
:objects-data="props.objectsData"
|
|
22
22
|
:valid-date-end="props.validDateEnd"
|
|
23
|
+
:current-selected-objects="props.currentSelectedObjects"
|
|
23
24
|
:error-last-input="props.errorLastInput"
|
|
24
25
|
:error-date-from="props.errorDateFrom"
|
|
25
26
|
:error-time-from="props.errorTimeFrom"
|
|
26
27
|
:error-date-to="props.errorDateTo"
|
|
27
28
|
:error-time-to="props.errorTimeTo"
|
|
28
|
-
:current-selected-objects="props.currentSelectedObjects"
|
|
29
|
-
@update-chart-type="emits('update-chart-type', $event)"
|
|
30
|
-
@update-custom-time="emits('update-custom-time', $event)"
|
|
31
|
-
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
32
|
-
@update-unit-count="emits('update-unit-count', $event)"
|
|
33
|
-
@update-period-type="emits('update-period-type', $event)"
|
|
34
|
-
@update-custom-date-from="emits('update-custom-date-from', $event)"
|
|
35
|
-
@update-custom-date-to="emits('update-custom-date-to', $event)"
|
|
36
|
-
@update-custom-time-from="emits('update-custom-time-from', $event)"
|
|
37
|
-
@update-custom-time-to="emits('update-custom-time-to', $event)"
|
|
38
|
-
@select-objects="emits('select-objects', $event)"
|
|
39
|
-
/>
|
|
40
|
-
<common-monitor-advanced-tools-chart-options-modal-counters-timespan-old
|
|
41
|
-
v-else
|
|
42
|
-
:type="props.type"
|
|
43
|
-
:chart="props.chart"
|
|
44
|
-
:language="props.language"
|
|
45
|
-
:selected-chart-type="props.selectedChartType"
|
|
46
|
-
:selected-timespan-type="props.selectedTimespanType"
|
|
47
|
-
:units-count="props.unitsCount"
|
|
48
|
-
:period-type="props.periodType"
|
|
49
|
-
:selected-custom-time="props.selectedCustomTime"
|
|
50
|
-
:custom-date-from="props.customDateFrom"
|
|
51
|
-
:custom-date-to="props.customDateTo"
|
|
52
|
-
:custom-time-from="props.customTimeFrom"
|
|
53
|
-
:custom-time-to="props.customTimeTo"
|
|
54
|
-
:total-cores="props.totalCores"
|
|
55
|
-
:host-id="props.hostId"
|
|
56
|
-
:selected-metrics-keys="props.selectedMetricsKeys"
|
|
57
|
-
:total-metric-items="props.totalMetricItems"
|
|
58
|
-
:objects-loading="props.objectsLoading"
|
|
59
|
-
:objects-data="props.objectsData"
|
|
60
|
-
:valid-date-end="props.validDateEnd"
|
|
61
|
-
:current-selected-objects="props.currentSelectedObjects"
|
|
62
29
|
@update-chart-type="emits('update-chart-type', $event)"
|
|
63
30
|
@update-custom-time="emits('update-custom-time', $event)"
|
|
64
31
|
@update-timespan-type="emits('update-timespan-type', $event)"
|
|
@@ -133,6 +100,12 @@ const emits = defineEmits<{
|
|
|
133
100
|
const { $store }: any = useNuxtApp()
|
|
134
101
|
|
|
135
102
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
103
|
+
|
|
104
|
+
const currentComponent = computed(() =>
|
|
105
|
+
isNewView.value
|
|
106
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
107
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
108
|
+
)
|
|
136
109
|
</script>
|
|
137
110
|
|
|
138
111
|
<style scoped lang="scss"></style>
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
v-model:selected-row="selectedRow"
|
|
5
|
-
:table-type="tableType"
|
|
6
|
-
:loading="props.loading"
|
|
7
|
-
:body-items="bodyItems"
|
|
8
|
-
/>
|
|
9
|
-
<common-monitor-advanced-tools-chart-options-modal-counters-timespan-object-object-old
|
|
10
|
-
v-else
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
11
4
|
v-model:selected-row="selectedRow"
|
|
12
5
|
v-model:column-items="columnItems"
|
|
13
6
|
v-model:pagination="pagination"
|
|
@@ -56,6 +49,12 @@ const { $store }: any = useNuxtApp()
|
|
|
56
49
|
|
|
57
50
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
58
51
|
|
|
52
|
+
const currentComponent = computed(() =>
|
|
53
|
+
isNewView.value
|
|
54
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
55
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
56
|
+
)
|
|
57
|
+
|
|
59
58
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
60
59
|
|
|
61
60
|
const tableType = computed<UI_T_DataGridType>(() => {
|
|
@@ -22,8 +22,8 @@ import type {
|
|
|
22
22
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
23
23
|
import type { UI_T_DataGridType } from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
24
24
|
import type { UI_I_BodyItem } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
25
|
-
import { options } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/
|
|
26
|
-
import { tableDataFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/
|
|
25
|
+
import { options } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/new/lib/config/options'
|
|
26
|
+
import { tableDataFunc } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/new/lib/config/tableData'
|
|
27
27
|
|
|
28
28
|
const selectedRowLocal = defineModel<number[] | number>('selectedRow', {
|
|
29
29
|
required: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UI_I_DataTable } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
2
2
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
3
|
import type { UI_I_BodyItem } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
4
|
-
import { constructTable } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/
|
|
4
|
+
import { constructTable } from '~/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/new/lib/utils/constructTable'
|
|
5
5
|
|
|
6
6
|
export const tableDataFunc = (
|
|
7
7
|
localization: UI_I_Localization,
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
v-model:selected-metric="selectedMetricLocal"
|
|
5
|
-
:metrics-items="props.metricsItems"
|
|
6
|
-
/>
|
|
7
|
-
<common-monitor-advanced-tools-chart-options-modal-metrics-old
|
|
8
|
-
v-else
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
9
4
|
v-model:selected-metric="selectedMetricLocal"
|
|
10
5
|
:metrics-items="props.metricsItems"
|
|
11
6
|
/>
|
|
@@ -25,6 +20,12 @@ const props = defineProps<{
|
|
|
25
20
|
const { $store }: any = useNuxtApp()
|
|
26
21
|
|
|
27
22
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
23
|
+
|
|
24
|
+
const currentComponent = computed(() =>
|
|
25
|
+
isNewView.value
|
|
26
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
27
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
28
|
+
)
|
|
28
29
|
</script>
|
|
29
30
|
|
|
30
31
|
<style scoped lang="scss"></style>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:alerts="props.alerts"
|
|
5
|
-
/>
|
|
6
|
-
<common-monitor-advanced-tools-chart-options-modal-notification-old
|
|
7
|
-
v-else
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
8
4
|
:alerts="props.alerts"
|
|
9
5
|
@remove="emits('remove-alerts')"
|
|
10
6
|
/>
|
|
@@ -22,6 +18,12 @@ const emits = defineEmits<{
|
|
|
22
18
|
const { $store }: any = useNuxtApp()
|
|
23
19
|
|
|
24
20
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
21
|
+
|
|
22
|
+
const currentComponent = computed(() =>
|
|
23
|
+
isNewView.value
|
|
24
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
25
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
26
|
+
)
|
|
25
27
|
</script>
|
|
26
28
|
|
|
27
29
|
<style scoped lang="scss"></style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
status="alert-danger"
|
|
6
6
|
class="notification"
|
|
7
7
|
test-id="notification-alert"
|
|
8
|
-
@remove="
|
|
8
|
+
@remove="emits('remove-alerts')"
|
|
9
9
|
>
|
|
10
10
|
</atoms-alert>
|
|
11
11
|
</template>
|
|
@@ -18,10 +18,6 @@ const props = defineProps<{
|
|
|
18
18
|
const emits = defineEmits<{
|
|
19
19
|
(event: 'remove-alerts'): void
|
|
20
20
|
}>()
|
|
21
|
-
|
|
22
|
-
const onRemove = (): void => {
|
|
23
|
-
emits('remove-alerts')
|
|
24
|
-
}
|
|
25
21
|
</script>
|
|
26
22
|
|
|
27
23
|
<style scoped lang="scss"></style>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<template v-else>
|
|
7
7
|
<template
|
|
8
8
|
v-for="(chartData, key) in props.allData"
|
|
9
|
-
:key="chartData.title"
|
|
9
|
+
:key="chartData.title || key"
|
|
10
10
|
>
|
|
11
11
|
<div :class="['chart-container', `graph-${chartData.title}`]">
|
|
12
12
|
<div v-if="chartData.loader" class="graphic-loader-block">
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
{ loading: props.powerLoading },
|
|
46
46
|
]"
|
|
47
47
|
>
|
|
48
|
-
<common-graph-
|
|
48
|
+
<common-graph-new-empty-block
|
|
49
49
|
v-if="!props.powerData && !props.powerLoading"
|
|
50
50
|
/>
|
|
51
51
|
<ui-skeleton-long-metric v-if="props.powerLoading" height="336px" />
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
{ loading: props.temperatureLoading },
|
|
66
66
|
]"
|
|
67
67
|
>
|
|
68
|
-
<common-graph-
|
|
68
|
+
<common-graph-new-empty-block
|
|
69
69
|
v-if="!props.temperatureData && !props.temperatureLoading"
|
|
70
70
|
/>
|
|
71
71
|
<ui-skeleton-long-metric v-if="props.temperatureLoading" height="336px" />
|
package/lib/models/interfaces.ts
CHANGED
|
@@ -43,6 +43,7 @@ export interface UI_I_Localization {
|
|
|
43
43
|
license: UI_I_ArbitraryObject<string>
|
|
44
44
|
events: UI_I_ArbitraryObject<string>
|
|
45
45
|
zabbix: UI_I_ArbitraryObject<string>
|
|
46
|
+
monq: UI_I_ArbitraryObject<string>
|
|
46
47
|
glpi: UI_I_ArbitraryObject<string>
|
|
47
48
|
remoteConsole: UI_I_ArbitraryObject<string>
|
|
48
49
|
vmWizard: UI_I_ArbitraryObject<string>
|
package/package.json
CHANGED
package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts
DELETED
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_DataTableBody,
|
|
3
|
-
UI_I_DataTableOptions,
|
|
4
|
-
UI_I_DataTableHeader,
|
|
5
|
-
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
-
import type { UI_I_HostTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/lib/models/interfaces'
|
|
8
|
-
import {
|
|
9
|
-
UI_E_DeviceStatus,
|
|
10
|
-
UI_E_DeviceStatusChipColor,
|
|
11
|
-
UI_E_DeviceStatusIcon,
|
|
12
|
-
} from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums'
|
|
13
|
-
import {
|
|
14
|
-
hostIconByState,
|
|
15
|
-
hostLocalizationByState,
|
|
16
|
-
} from '~/components/common/lib/config/states'
|
|
17
|
-
|
|
18
|
-
// Маппинг для статусов
|
|
19
|
-
const STATUS_MAPPING = {
|
|
20
|
-
[UI_E_DeviceStatus.Unknown]: {
|
|
21
|
-
icon: UI_E_DeviceStatusIcon.HelpIcon,
|
|
22
|
-
chipColor: UI_E_DeviceStatusChipColor.Primary,
|
|
23
|
-
},
|
|
24
|
-
[UI_E_DeviceStatus.Supported]: {
|
|
25
|
-
icon: UI_E_DeviceStatusIcon.StatusCheck,
|
|
26
|
-
chipColor: UI_E_DeviceStatusChipColor.Green,
|
|
27
|
-
},
|
|
28
|
-
[UI_E_DeviceStatus.NotSupported]: {
|
|
29
|
-
icon: UI_E_DeviceStatusIcon.Close,
|
|
30
|
-
chipColor: UI_E_DeviceStatusChipColor.Red,
|
|
31
|
-
},
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const getHeaderDataFunc = (
|
|
35
|
-
localization: UI_I_Localization
|
|
36
|
-
): UI_I_DataTableHeader[] => [
|
|
37
|
-
{
|
|
38
|
-
col: 'col0',
|
|
39
|
-
colName: 'name',
|
|
40
|
-
text: localization.common.name,
|
|
41
|
-
isSortable: true,
|
|
42
|
-
sort: 'asc',
|
|
43
|
-
width: '180px',
|
|
44
|
-
show: true,
|
|
45
|
-
filter: false,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
col: 'col1',
|
|
49
|
-
colName: 'state',
|
|
50
|
-
text: localization.inventorySummary.state,
|
|
51
|
-
isSortable: true,
|
|
52
|
-
sort: 'asc',
|
|
53
|
-
width: '96px',
|
|
54
|
-
show: true,
|
|
55
|
-
filter: false,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
col: 'col2',
|
|
59
|
-
colName: 'cluster',
|
|
60
|
-
text: localization.common.cluster,
|
|
61
|
-
isSortable: true,
|
|
62
|
-
sort: 'asc',
|
|
63
|
-
width: '96px',
|
|
64
|
-
show: true,
|
|
65
|
-
filter: false,
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
col: 'col3',
|
|
69
|
-
colName: 'fault_domain',
|
|
70
|
-
text: localization.common.faultDomain,
|
|
71
|
-
isSortable: true,
|
|
72
|
-
sort: 'asc',
|
|
73
|
-
width: '96px',
|
|
74
|
-
show: true,
|
|
75
|
-
filter: false,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
col: 'col4',
|
|
79
|
-
colName: 'consumed_cpu',
|
|
80
|
-
text: `${localization.common.consumedCpu} %`,
|
|
81
|
-
isSortable: true,
|
|
82
|
-
sort: 'asc',
|
|
83
|
-
width: '96px',
|
|
84
|
-
show: true,
|
|
85
|
-
filter: false,
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
col: 'col5',
|
|
89
|
-
colName: 'consumed_mem',
|
|
90
|
-
text: `${localization.common.consumedMemory} %`,
|
|
91
|
-
isSortable: true,
|
|
92
|
-
sort: 'asc',
|
|
93
|
-
width: '96px',
|
|
94
|
-
show: true,
|
|
95
|
-
filter: false,
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
col: 'col6',
|
|
99
|
-
colName: 'ha_state',
|
|
100
|
-
text: localization.common.haState,
|
|
101
|
-
isSortable: true,
|
|
102
|
-
sort: 'asc',
|
|
103
|
-
width: '96px',
|
|
104
|
-
show: true,
|
|
105
|
-
filter: false,
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
col: 'col7',
|
|
109
|
-
colName: 'uptime',
|
|
110
|
-
text: localization.inventorySummary.uptime,
|
|
111
|
-
isSortable: true,
|
|
112
|
-
sort: 'asc',
|
|
113
|
-
width: '96px',
|
|
114
|
-
show: true,
|
|
115
|
-
filter: false,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
col: 'col8',
|
|
119
|
-
colName: 'cert_valid_to',
|
|
120
|
-
text: localization.common.certificateValidTo,
|
|
121
|
-
isSortable: true,
|
|
122
|
-
sort: 'asc',
|
|
123
|
-
width: '96px',
|
|
124
|
-
show: true,
|
|
125
|
-
filter: false,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
col: 'col9',
|
|
129
|
-
colName: 'mem_size',
|
|
130
|
-
text: `${localization.common.memorySize} (${localization.common.mb})`,
|
|
131
|
-
isSortable: true,
|
|
132
|
-
sort: 'asc',
|
|
133
|
-
width: '96px',
|
|
134
|
-
show: true,
|
|
135
|
-
filter: false,
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
col: 'col10',
|
|
139
|
-
colName: 'cpus',
|
|
140
|
-
text: localization.common.cpus,
|
|
141
|
-
isSortable: true,
|
|
142
|
-
sort: 'asc',
|
|
143
|
-
width: '96px',
|
|
144
|
-
show: true,
|
|
145
|
-
filter: false,
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
col: 'col11',
|
|
149
|
-
colName: 'nics',
|
|
150
|
-
text: localization.inventorySummary.nics,
|
|
151
|
-
isSortable: true,
|
|
152
|
-
sort: 'asc',
|
|
153
|
-
width: '96px',
|
|
154
|
-
show: true,
|
|
155
|
-
filter: false,
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
col: 'col12',
|
|
159
|
-
colName: 'version',
|
|
160
|
-
text: localization.common.version,
|
|
161
|
-
isSortable: true,
|
|
162
|
-
sort: 'asc',
|
|
163
|
-
width: '96px',
|
|
164
|
-
show: true,
|
|
165
|
-
filter: false,
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
col: 'col13',
|
|
169
|
-
colName: 'alarm_action',
|
|
170
|
-
text: localization.common.alarmActions,
|
|
171
|
-
isSortable: true,
|
|
172
|
-
sort: 'asc',
|
|
173
|
-
width: '96px',
|
|
174
|
-
show: true,
|
|
175
|
-
filter: false,
|
|
176
|
-
},
|
|
177
|
-
]
|
|
178
|
-
export const options: UI_I_DataTableOptions = {
|
|
179
|
-
perPageOptions: [{ text: '10', value: 100, default: true }],
|
|
180
|
-
isSelectable: true,
|
|
181
|
-
selectType: 'radio',
|
|
182
|
-
showPagination: false,
|
|
183
|
-
showPageInfo: false,
|
|
184
|
-
isSortable: true,
|
|
185
|
-
server: true,
|
|
186
|
-
isResizable: true,
|
|
187
|
-
showSelectedRows: false,
|
|
188
|
-
showColumnManager: true,
|
|
189
|
-
inModal: true,
|
|
190
|
-
inBlock: false,
|
|
191
|
-
// isFocusable: false,
|
|
192
|
-
// showPaginationOnTop: false,
|
|
193
|
-
// showSearch: false,
|
|
194
|
-
// withActions: false,
|
|
195
|
-
// showExport: false,
|
|
196
|
-
// withCollapse: false,
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export const getBodyDataFunc = (
|
|
200
|
-
bodyData: UI_I_HostTableItem[],
|
|
201
|
-
localization: UI_I_Localization
|
|
202
|
-
): UI_I_DataTableBody[] => {
|
|
203
|
-
const { $number } = useNuxtApp() as any
|
|
204
|
-
|
|
205
|
-
return bodyData.map((host, index: number) => {
|
|
206
|
-
const statusKey = host.state
|
|
207
|
-
? UI_E_DeviceStatus.Unknown
|
|
208
|
-
: UI_E_DeviceStatus.Supported
|
|
209
|
-
const statusData = {
|
|
210
|
-
...STATUS_MAPPING[statusKey],
|
|
211
|
-
testId: `${host.name}-${index}-status`,
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
return {
|
|
215
|
-
row: index,
|
|
216
|
-
collapse: false,
|
|
217
|
-
isHiddenCollapse: false,
|
|
218
|
-
collapseToggle: false,
|
|
219
|
-
|
|
220
|
-
data: [
|
|
221
|
-
{
|
|
222
|
-
key: 'icon',
|
|
223
|
-
col: 'col0',
|
|
224
|
-
text: host.name,
|
|
225
|
-
data: `vsphere-icon-${hostIconByState[host.state]}`,
|
|
226
|
-
testId: `migrate-host-table-item-${index}`,
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
{
|
|
230
|
-
key: 'status',
|
|
231
|
-
col: 'col1',
|
|
232
|
-
text: localization.common[hostLocalizationByState[host.state]],
|
|
233
|
-
testId: `migrate-host-table-item-${index}`,
|
|
234
|
-
data: statusData,
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
col: 'col2',
|
|
238
|
-
text: host.cluster,
|
|
239
|
-
testId: `migrate-host-table-item-${index}`,
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
col: 'col3',
|
|
243
|
-
text: host.fault_domain,
|
|
244
|
-
testId: `migrate-host-table-item-${index}`,
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
key: 'progress',
|
|
248
|
-
col: 'col4',
|
|
249
|
-
text: `${host.consumed_cpu.toFixed(2)}%`,
|
|
250
|
-
data: host.consumed_cpu,
|
|
251
|
-
testId: `migrate-host-table-item-${index}`,
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
key: 'progress',
|
|
255
|
-
col: 'col5',
|
|
256
|
-
text: `${host.consumed_mem.toFixed(2)}%`,
|
|
257
|
-
data: host.consumed_mem,
|
|
258
|
-
testId: `migrate-host-table-item-${index}`,
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
col: 'col6',
|
|
262
|
-
text: host.ha_state,
|
|
263
|
-
testId: `migrate-host-table-item-${index}`,
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
col: 'col7',
|
|
267
|
-
text: host.uptime + '',
|
|
268
|
-
testId: `migrate-host-table-item-${index}`,
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
col: 'col8',
|
|
272
|
-
text: host.cert_valid_to,
|
|
273
|
-
testId: `migrate-host-table-item-${index}`,
|
|
274
|
-
},
|
|
275
|
-
|
|
276
|
-
{
|
|
277
|
-
col: 'col9',
|
|
278
|
-
text: `${$number.format(host.mem_size, 'en')} ${
|
|
279
|
-
localization.common.mb
|
|
280
|
-
}`,
|
|
281
|
-
testId: `migrate-host-table-item-${index}`,
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
col: 'col10',
|
|
285
|
-
text: host.cpus + '',
|
|
286
|
-
testId: `migrate-host-table-item-${index}`,
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
col: 'col11',
|
|
290
|
-
text: host.nics + '',
|
|
291
|
-
testId: `migrate-host-table-item-${index}`,
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
col: 'col12',
|
|
295
|
-
text: host.version,
|
|
296
|
-
testId: `migrate-host-table-item-${index}`,
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
key: 'status',
|
|
300
|
-
col: 'col13',
|
|
301
|
-
text: host.alarm_action,
|
|
302
|
-
data: statusData,
|
|
303
|
-
testId: `migrate-host-table-item-${index}`,
|
|
304
|
-
},
|
|
305
|
-
],
|
|
306
|
-
}
|
|
307
|
-
})
|
|
308
|
-
}
|
package/components/common/configure/advancedSystemSettings/tableView/old/field/lib/models/enums.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export enum E_Format {
|
|
2
|
-
'unix path' = 'unixPath',
|
|
3
|
-
'win path' = 'winPath',
|
|
4
|
-
'mac' = 'mac',
|
|
5
|
-
'ip4' = 'ip4',
|
|
6
|
-
'ip6' = 'ip6',
|
|
7
|
-
'url' = 'url',
|
|
8
|
-
'uuid' = 'uuid',
|
|
9
|
-
'semver' = 'semver',
|
|
10
|
-
'domain' = 'domain',
|
|
11
|
-
'base64' = 'base64',
|
|
12
|
-
'regex' = 'regex',
|
|
13
|
-
'hex color' = 'hexColor',
|
|
14
|
-
}
|