bfg-common 1.6.76 → 1.6.78
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 -14
- package/assets/localization/local_en.json +1 -14
- package/assets/localization/local_hy.json +1 -14
- package/assets/localization/local_kk.json +1 -14
- package/assets/localization/local_ru.json +1 -14
- package/assets/localization/local_zh.json +1 -14
- package/components/atoms/dropdown/dropdown/Dropdown.vue +170 -170
- package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +10 -10
- package/components/common/adapterManager/AdapterManager.vue +473 -473
- package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
- package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
- package/components/common/adapterManager/lib/config/index.ts +19 -19
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
- package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
- package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
- package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
- package/components/common/adapterManager/ui/table/Table.vue +88 -88
- package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
- package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
- package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
- package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
- package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
- package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
- package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
- package/components/common/certificate/Certificate.vue +6 -16
- package/components/common/certificate/{Info/Old.vue → CertificateInfo.vue} +34 -6
- package/components/common/certificate/{tools/Tools.vue → Tools.vue} +23 -18
- package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
- package/components/common/diagramMain/adapter/Adapter.vue +123 -123
- package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/adapter/Contents.vue +212 -212
- package/components/common/diagramMain/adapter/Lines.vue +81 -81
- package/components/common/diagramMain/adapter/block/Block.vue +27 -27
- package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
- package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
- package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
- package/components/common/diagramMain/highlights/Highlights.vue +151 -151
- package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
- package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
- package/components/common/diagramMain/lib/config/index.ts +81 -81
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/config/positions.ts +194 -194
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
- package/components/common/diagramMain/modals/Modals.vue +483 -483
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
- package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
- package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
- package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/network/Lines.vue +107 -107
- package/components/common/diagramMain/network/Network.vue +141 -141
- package/components/common/diagramMain/network/block/Block.vue +37 -37
- package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
- package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
- package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
- package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
- package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
- package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
- package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
- package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/diagramMain/switch/Switch.vue +180 -180
- package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
- package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
- package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
- package/components/common/split/horizontal/New.vue +1 -1
- package/components/common/split/horizontal/Old.vue +1 -1
- package/package.json +2 -2
- package/components/common/certificate/Info/Info.vue +0 -61
- package/components/common/certificate/Info/new/New.vue +0 -285
- package/components/common/certificate/Info/new/lib/config/index.ts +0 -59
- package/components/common/certificate/Info/new/lib/models/interfaces.ts +0 -3
- package/components/common/certificate/Info/new/lib/utils/index.ts +0 -10
- package/components/common/certificate/Old.vue +0 -27
- package/components/common/certificate/new/New.vue +0 -30
- package/components/common/certificate/new/Skeleton.vue +0 -155
- package/components/common/certificate/tools/New.vue +0 -48
- package/components/common/certificate/tools/Old.vue +0 -39
- package/components/common/certificate/tools/lib/config/tabsPannel.ts +0 -20
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="chart-legend">
|
|
3
|
-
<span class="title">{{
|
|
4
|
-
localization.inventoryMonitor.performanceChartLegend
|
|
5
|
-
}}</span>
|
|
6
|
-
<client-only>
|
|
7
|
-
<atoms-table-data-grid
|
|
8
|
-
v-model:selected-row="selectedRow"
|
|
9
|
-
v-model:column-keys="columnKeys"
|
|
10
|
-
v-model:page-size="pageSize"
|
|
11
|
-
v-model:page="page"
|
|
12
|
-
:head-items="headAInfo"
|
|
13
|
-
:body-items="dataBody"
|
|
14
|
-
:total-items="dataBody.length"
|
|
15
|
-
:total-pages="1"
|
|
16
|
-
type="checkbox"
|
|
17
|
-
class="data-table"
|
|
18
|
-
test-id="advances-table"
|
|
19
|
-
hide-page-size
|
|
20
|
-
>
|
|
21
|
-
<template #col1="{ item }">
|
|
22
|
-
<div
|
|
23
|
-
:style="[{ backgroundColor: item.data.color }]"
|
|
24
|
-
class="datagrid-column-color-block"
|
|
25
|
-
></div>
|
|
26
|
-
</template>
|
|
27
|
-
</atoms-table-data-grid>
|
|
28
|
-
</client-only>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script setup lang="ts">
|
|
33
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
34
|
-
import type {
|
|
35
|
-
UI_I_HeadItem,
|
|
36
|
-
UI_I_BodyItem,
|
|
37
|
-
UI_I_ColumnKey,
|
|
38
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
39
|
-
import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
|
|
40
|
-
import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
|
|
41
|
-
|
|
42
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
43
|
-
|
|
44
|
-
const props = defineProps<{
|
|
45
|
-
data: UI_I_PerformanceItem[]
|
|
46
|
-
}>()
|
|
47
|
-
const emits = defineEmits<{
|
|
48
|
-
(event: 'select', value: number[]): void
|
|
49
|
-
}>()
|
|
50
|
-
|
|
51
|
-
const selectedRow = ref<number[]>([])
|
|
52
|
-
const pageSize = ref<number>(100)
|
|
53
|
-
const page = ref<number>(1)
|
|
54
|
-
const headAInfo = computed<UI_I_HeadItem[]>(() =>
|
|
55
|
-
table.headItems(localization.value)
|
|
56
|
-
)
|
|
57
|
-
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
58
|
-
watch(localization, () => {
|
|
59
|
-
columnKeys.value = table.columnKeys(localization.value)
|
|
60
|
-
})
|
|
61
|
-
const dataBody = ref<UI_I_BodyItem[][]>([])
|
|
62
|
-
|
|
63
|
-
watch(
|
|
64
|
-
() => props.data,
|
|
65
|
-
(newValue) => {
|
|
66
|
-
if (!newValue) return
|
|
67
|
-
|
|
68
|
-
dataBody.value = table.bodyItems(newValue)
|
|
69
|
-
},
|
|
70
|
-
{ immediate: true }
|
|
71
|
-
)
|
|
72
|
-
watch(
|
|
73
|
-
selectedRow,
|
|
74
|
-
(newValue) => {
|
|
75
|
-
emits('select', newValue)
|
|
76
|
-
},
|
|
77
|
-
{ deep: true }
|
|
78
|
-
)
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<style scoped lang="scss">
|
|
82
|
-
.chart-legend {
|
|
83
|
-
.title {
|
|
84
|
-
font-weight: 700;
|
|
85
|
-
height: 20px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.datagrid-column-color-block {
|
|
89
|
-
width: 16px;
|
|
90
|
-
height: 16px;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="chart-legend">
|
|
3
|
+
<span class="title">{{
|
|
4
|
+
localization.inventoryMonitor.performanceChartLegend
|
|
5
|
+
}}</span>
|
|
6
|
+
<client-only>
|
|
7
|
+
<atoms-table-data-grid
|
|
8
|
+
v-model:selected-row="selectedRow"
|
|
9
|
+
v-model:column-keys="columnKeys"
|
|
10
|
+
v-model:page-size="pageSize"
|
|
11
|
+
v-model:page="page"
|
|
12
|
+
:head-items="headAInfo"
|
|
13
|
+
:body-items="dataBody"
|
|
14
|
+
:total-items="dataBody.length"
|
|
15
|
+
:total-pages="1"
|
|
16
|
+
type="checkbox"
|
|
17
|
+
class="data-table"
|
|
18
|
+
test-id="advances-table"
|
|
19
|
+
hide-page-size
|
|
20
|
+
>
|
|
21
|
+
<template #col1="{ item }">
|
|
22
|
+
<div
|
|
23
|
+
:style="[{ backgroundColor: item.data.color }]"
|
|
24
|
+
class="datagrid-column-color-block"
|
|
25
|
+
></div>
|
|
26
|
+
</template>
|
|
27
|
+
</atoms-table-data-grid>
|
|
28
|
+
</client-only>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script setup lang="ts">
|
|
33
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
34
|
+
import type {
|
|
35
|
+
UI_I_HeadItem,
|
|
36
|
+
UI_I_BodyItem,
|
|
37
|
+
UI_I_ColumnKey,
|
|
38
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
39
|
+
import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
|
|
40
|
+
import * as table from '~/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable'
|
|
41
|
+
|
|
42
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
data: UI_I_PerformanceItem[]
|
|
46
|
+
}>()
|
|
47
|
+
const emits = defineEmits<{
|
|
48
|
+
(event: 'select', value: number[]): void
|
|
49
|
+
}>()
|
|
50
|
+
|
|
51
|
+
const selectedRow = ref<number[]>([])
|
|
52
|
+
const pageSize = ref<number>(100)
|
|
53
|
+
const page = ref<number>(1)
|
|
54
|
+
const headAInfo = computed<UI_I_HeadItem[]>(() =>
|
|
55
|
+
table.headItems(localization.value)
|
|
56
|
+
)
|
|
57
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
58
|
+
watch(localization, () => {
|
|
59
|
+
columnKeys.value = table.columnKeys(localization.value)
|
|
60
|
+
})
|
|
61
|
+
const dataBody = ref<UI_I_BodyItem[][]>([])
|
|
62
|
+
|
|
63
|
+
watch(
|
|
64
|
+
() => props.data,
|
|
65
|
+
(newValue) => {
|
|
66
|
+
if (!newValue) return
|
|
67
|
+
|
|
68
|
+
dataBody.value = table.bodyItems(newValue)
|
|
69
|
+
},
|
|
70
|
+
{ immediate: true }
|
|
71
|
+
)
|
|
72
|
+
watch(
|
|
73
|
+
selectedRow,
|
|
74
|
+
(newValue) => {
|
|
75
|
+
emits('select', newValue)
|
|
76
|
+
},
|
|
77
|
+
{ deep: true }
|
|
78
|
+
)
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<style scoped lang="scss">
|
|
82
|
+
.chart-legend {
|
|
83
|
+
.title {
|
|
84
|
+
font-weight: 700;
|
|
85
|
+
height: 20px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.datagrid-column-color-block {
|
|
89
|
+
width: 16px;
|
|
90
|
+
height: 16px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum UI_E_UtilizationBlockCurrentKeys {
|
|
2
|
-
cpuUtilization = 'hostCpu',
|
|
3
|
-
hostMemoryUtilization = 'hostMem',
|
|
4
|
-
}
|
|
1
|
+
export enum UI_E_UtilizationBlockCurrentKeys {
|
|
2
|
+
cpuUtilization = 'hostCpu',
|
|
3
|
+
hostMemoryUtilization = 'hostMem',
|
|
4
|
+
}
|
|
@@ -100,7 +100,7 @@ const rightPanelStyle = computed<any>(() => {
|
|
|
100
100
|
width = `calc(${leftPanelWLocal.value}% - 1.5px)`
|
|
101
101
|
}
|
|
102
102
|
if (props.showToggleButton && leftPanelCollapsed.value) {
|
|
103
|
-
width = 'calc(100% -
|
|
103
|
+
width = 'calc(100% - 16px)'
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
if (props.hideLeftPanel && leftPanelCollapsed.value)
|
|
@@ -84,7 +84,7 @@ const rightPanelStyle = computed<any>(() => {
|
|
|
84
84
|
width = `calc(${leftPanelW.value}% - 1.5px)`
|
|
85
85
|
}
|
|
86
86
|
if (props.showToggleButton && leftPanelCollapsed.value) {
|
|
87
|
-
width = 'calc(100% -
|
|
87
|
+
width = 'calc(100% - 16px)'
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
if (props.hideLeftPanel && leftPanelCollapsed.value)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.78",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@vueuse/core": "10.1.2",
|
|
19
19
|
"@vueuse/nuxt": "10.1.2",
|
|
20
20
|
"bfg-nuxt-3-graph": "1.0.28",
|
|
21
|
-
"bfg-uikit": "1.1.
|
|
21
|
+
"bfg-uikit": "1.1.32",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-myrules": "file:./eslint",
|
|
24
24
|
"nuxt": "3.11.2",
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
:certificate-data="props.certificateData"
|
|
5
|
-
:valid-from="validFrom"
|
|
6
|
-
:valid-to="validTo"
|
|
7
|
-
:status-text="statusText"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts" setup>
|
|
12
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
13
|
-
import type { UI_I_Certificate } from '~/components/common/certificate/lib/models/interfaces'
|
|
14
|
-
|
|
15
|
-
const props = defineProps<{
|
|
16
|
-
certificateData: UI_I_Certificate | {}
|
|
17
|
-
}>()
|
|
18
|
-
|
|
19
|
-
const { $store, $formattedDatetime }: any = useNuxtApp()
|
|
20
|
-
|
|
21
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
22
|
-
|
|
23
|
-
const currentComponent = computed(() =>
|
|
24
|
-
isNewView.value
|
|
25
|
-
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
26
|
-
: defineAsyncComponent(() => import('./Old.vue'))
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
-
|
|
31
|
-
const updateTimeFormatAndInterfaceLang = computed<number>(
|
|
32
|
-
() => $store.getters['main/getUpdateTimeFormatAndInterfaceLang']
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
const validFrom = computed<string>(() =>
|
|
36
|
-
updateTimeFormatAndInterfaceLang.value
|
|
37
|
-
? $formattedDatetime(props.certificateData.valid_from, {
|
|
38
|
-
hasSeconds: true,
|
|
39
|
-
})
|
|
40
|
-
: ''
|
|
41
|
-
)
|
|
42
|
-
const validTo = computed<string>(() =>
|
|
43
|
-
updateTimeFormatAndInterfaceLang.value
|
|
44
|
-
? $formattedDatetime(props.certificateData.valid_to, {
|
|
45
|
-
hasSeconds: true,
|
|
46
|
-
})
|
|
47
|
-
: ''
|
|
48
|
-
)
|
|
49
|
-
|
|
50
|
-
const statusText = computed<string>(() =>
|
|
51
|
-
props.certificateData.status === 'good'
|
|
52
|
-
? localization.value.common.valid
|
|
53
|
-
: props.certificateData.status
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
onUnmounted(() => {
|
|
57
|
-
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostCertificate')
|
|
58
|
-
})
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,285 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="certificate-info-page p-4 h-full">
|
|
3
|
-
<div class="certificate-info-item-box p-4">
|
|
4
|
-
<div class="flex justify-between items-center flex-wrap gap-4">
|
|
5
|
-
<div class="flex items-center gap-3">
|
|
6
|
-
<ui-icon
|
|
7
|
-
v-if="statusIconName"
|
|
8
|
-
:name="statusIconName"
|
|
9
|
-
width="38"
|
|
10
|
-
height="38"
|
|
11
|
-
/>
|
|
12
|
-
<div>
|
|
13
|
-
<p class="status-text mb-1">
|
|
14
|
-
{{ localization.common.status }}: {{ statusText }}
|
|
15
|
-
</p>
|
|
16
|
-
<p class="status-subtext">
|
|
17
|
-
{{ currentExpirationText }}
|
|
18
|
-
</p>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="elapsed-block">
|
|
22
|
-
<div class="flex justify-between items-center gap-2 mb-[10px]">
|
|
23
|
-
<p class="elapsed-text">
|
|
24
|
-
{{ localization.inventoryConfigure.elapsed }}
|
|
25
|
-
</p>
|
|
26
|
-
<p class="elapsed-value">{{ currentElapsedValue }}%</p>
|
|
27
|
-
</div>
|
|
28
|
-
<ui-progress-bar-linear
|
|
29
|
-
:percent="currentElapsedValue"
|
|
30
|
-
:color="elapsedProgressBarColor"
|
|
31
|
-
stroke-width="10"
|
|
32
|
-
border-radius="16"
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
<div class="grid cols-2 mt-3 gap-3">
|
|
38
|
-
<div class="certificate-info-item-box p-4">
|
|
39
|
-
<div class="flex items-center gap-3">
|
|
40
|
-
<div class="icon-box">
|
|
41
|
-
<ui-icon name="file" width="20" height="20" />
|
|
42
|
-
</div>
|
|
43
|
-
<p class="title-info-block">{{ localization.common.subject }}</p>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="grid gap-3 mt-4">
|
|
46
|
-
<div
|
|
47
|
-
v-for="(item, key) in subjectInfoItem"
|
|
48
|
-
:key="key"
|
|
49
|
-
class="flex justify-between items-center flex-wrap gap-2"
|
|
50
|
-
>
|
|
51
|
-
<p class="info-label">{{ localization.inventoryConfigure[key] }}</p>
|
|
52
|
-
<p class="info-value">{{ item }}</p>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
<div class="certificate-info-item-box p-4">
|
|
57
|
-
<div class="flex items-center gap-3">
|
|
58
|
-
<div class="icon-box">
|
|
59
|
-
<ui-icon name="permission" width="20" height="20" />
|
|
60
|
-
</div>
|
|
61
|
-
<p class="title-info-block">{{ localization.common.issuer }}</p>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="grid gap-3 mt-4">
|
|
64
|
-
<div
|
|
65
|
-
v-for="(item, key) in issuerInfoItem"
|
|
66
|
-
:key="key"
|
|
67
|
-
class="flex justify-between items-center flex-wrap gap-2"
|
|
68
|
-
>
|
|
69
|
-
<p class="info-label">{{ localization.inventoryConfigure[key] }}</p>
|
|
70
|
-
<p class="info-value">{{ item }}</p>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<p class="valid-period-title mt-5 mb-4">
|
|
76
|
-
{{ localization.inventoryConfigure.validPeriod }}
|
|
77
|
-
</p>
|
|
78
|
-
<div class="certificate-info-item-box p-4">
|
|
79
|
-
<p class="active-dates-title mb-4">
|
|
80
|
-
{{ localization.inventoryConfigure.certificateActiveDates }}
|
|
81
|
-
</p>
|
|
82
|
-
<div class="grid-container-dates grid cols-2">
|
|
83
|
-
<div class="flex items-center gap-3">
|
|
84
|
-
<div class="icon-box">
|
|
85
|
-
<ui-icon name="icon-events" width="20" height="20" />
|
|
86
|
-
</div>
|
|
87
|
-
<div>
|
|
88
|
-
<p class="date-title-info mb-1">
|
|
89
|
-
{{ localization.common.validFrom }}
|
|
90
|
-
</p>
|
|
91
|
-
<p class="date-value-info">{{ props.validFrom }}</p>
|
|
92
|
-
</div>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="flex items-center gap-3">
|
|
95
|
-
<div class="icon-box">
|
|
96
|
-
<ui-icon name="icon-events" width="20" height="20" />
|
|
97
|
-
</div>
|
|
98
|
-
<div>
|
|
99
|
-
<p class="date-title-info mb-1">
|
|
100
|
-
{{ localization.common.validTo }}
|
|
101
|
-
</p>
|
|
102
|
-
<p class="date-value-info">{{ props.validTo }}</p>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
</template>
|
|
109
|
-
|
|
110
|
-
<script lang="ts" setup>
|
|
111
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
112
|
-
import type { UI_I_Certificate } from '~/components/common/certificate/lib/models/interfaces'
|
|
113
|
-
import type { UI_I_CertificateInfoItem } from '~/components/common/certificate/Info/new/lib/models/interfaces'
|
|
114
|
-
import {
|
|
115
|
-
statusIconNameFunc,
|
|
116
|
-
statusTextFunc,
|
|
117
|
-
expirationTextFunc,
|
|
118
|
-
expirationDaysFunc,
|
|
119
|
-
elapsedValueFunc,
|
|
120
|
-
elapsedProgressBarColorFunc,
|
|
121
|
-
} from '~/components/common/certificate/Info/new/lib/config'
|
|
122
|
-
import { certificateInfo } from '~/components/common/certificate/Info/new/lib/utils'
|
|
123
|
-
|
|
124
|
-
const props = defineProps<{
|
|
125
|
-
certificateData: UI_I_Certificate | {}
|
|
126
|
-
validFrom: string
|
|
127
|
-
validTo: string
|
|
128
|
-
statusText: string
|
|
129
|
-
}>()
|
|
130
|
-
|
|
131
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
132
|
-
|
|
133
|
-
const currentExpirationDays = computed<number>(() =>
|
|
134
|
-
expirationDaysFunc(props.certificateData)
|
|
135
|
-
)
|
|
136
|
-
const statusIconName = ref<string>(
|
|
137
|
-
statusIconNameFunc(currentExpirationDays.value)
|
|
138
|
-
)
|
|
139
|
-
const statusText = ref<string>(
|
|
140
|
-
statusTextFunc(currentExpirationDays.value, localization.value)
|
|
141
|
-
)
|
|
142
|
-
const currentExpirationText = computed<string>(() =>
|
|
143
|
-
expirationTextFunc(currentExpirationDays.value, localization.value)
|
|
144
|
-
)
|
|
145
|
-
const currentElapsedValue = computed<number>(() =>
|
|
146
|
-
elapsedValueFunc(props.certificateData)
|
|
147
|
-
)
|
|
148
|
-
const elapsedProgressBarColor = computed<string>(() =>
|
|
149
|
-
elapsedProgressBarColorFunc(currentExpirationDays.value)
|
|
150
|
-
)
|
|
151
|
-
|
|
152
|
-
const subjectInfoItem = computed<UI_I_CertificateInfoItem>(() =>
|
|
153
|
-
certificateInfo(props.certificateData, 'subject')
|
|
154
|
-
)
|
|
155
|
-
const issuerInfoItem = computed<UI_I_CertificateInfoItem>(() =>
|
|
156
|
-
certificateInfo(props.certificateData, 'issuer')
|
|
157
|
-
)
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<style>
|
|
161
|
-
:root {
|
|
162
|
-
--certificate-info-page-bg: #ffffff;
|
|
163
|
-
--certificate-info-page-item-box-bg: #ffffff;
|
|
164
|
-
--certificate-info-page-item-box-border: #e9ebed;
|
|
165
|
-
--certificate-info-page-item-status-text: #4d5d69;
|
|
166
|
-
--certificate-info-page-item-status-subtext: #9da6ad;
|
|
167
|
-
--certificate-info-page-item-elapsed-value: #4d5d69;
|
|
168
|
-
--certificate-info-page-item-icon-box-bg: #008fd614;
|
|
169
|
-
--certificate-info-page-item-icon-box-icon: #008fd6;
|
|
170
|
-
--certificate-info-page-item-title-block: #4d5d69;
|
|
171
|
-
--certificate-info-page-item-label: #4d5d69;
|
|
172
|
-
--certificate-info-page-item-value: #182531;
|
|
173
|
-
--certificate-info-page-valid-period-title: #4d5d69;
|
|
174
|
-
--certificate-info-page-active-dates-title: #4d5d69;
|
|
175
|
-
--certificate-info-page-date-value-info: #182531;
|
|
176
|
-
}
|
|
177
|
-
:root.dark-theme {
|
|
178
|
-
--certificate-info-page-bg: #334453;
|
|
179
|
-
--certificate-info-page-item-box-bg: #1b2a371f;
|
|
180
|
-
--certificate-info-page-item-box-border: #e9ebed1f;
|
|
181
|
-
--certificate-info-page-item-status-text: #e9eaec;
|
|
182
|
-
--certificate-info-page-item-status-subtext: #9da6ad;
|
|
183
|
-
--certificate-info-page-item-elapsed-value: #e9eaec;
|
|
184
|
-
--certificate-info-page-item-icon-box-bg: #2ba2de29;
|
|
185
|
-
--certificate-info-page-item-icon-box-icon: #2ba2de;
|
|
186
|
-
--certificate-info-page-item-title-block: #e9eaec;
|
|
187
|
-
--certificate-info-page-item-label: #e9eaec;
|
|
188
|
-
--certificate-info-page-item-value: #e9eaec;
|
|
189
|
-
--certificate-info-page-valid-period-title: #e9eaec;
|
|
190
|
-
--certificate-info-page-active-dates-title: #e9eaec;
|
|
191
|
-
--certificate-info-page-date-value-info: #e9eaec;
|
|
192
|
-
}
|
|
193
|
-
</style>
|
|
194
|
-
|
|
195
|
-
<style lang="scss" scoped>
|
|
196
|
-
.certificate-info-page {
|
|
197
|
-
background-color: var(--certificate-info-page-bg);
|
|
198
|
-
box-shadow: 0 1px 4px 0 #00000014;
|
|
199
|
-
border-radius: 8px;
|
|
200
|
-
|
|
201
|
-
.certificate-info-item-box {
|
|
202
|
-
background-color: var(--certificate-info-page-item-box-bg);
|
|
203
|
-
border: 1px solid var(--certificate-info-page-item-box-border);
|
|
204
|
-
border-radius: 8px;
|
|
205
|
-
|
|
206
|
-
.status-text {
|
|
207
|
-
font-weight: 500;
|
|
208
|
-
font-size: 14px;
|
|
209
|
-
color: var(--certificate-info-page-item-status-text);
|
|
210
|
-
}
|
|
211
|
-
.status-subtext {
|
|
212
|
-
font-weight: 400;
|
|
213
|
-
font-size: 12px;
|
|
214
|
-
color: var(--certificate-info-page-item-status-subtext);
|
|
215
|
-
}
|
|
216
|
-
.elapsed-block {
|
|
217
|
-
min-width: 320px;
|
|
218
|
-
|
|
219
|
-
.elapsed-text {
|
|
220
|
-
font-weight: 400;
|
|
221
|
-
font-size: 13px;
|
|
222
|
-
color: #9da6ad;
|
|
223
|
-
}
|
|
224
|
-
.elapsed-value {
|
|
225
|
-
font-weight: 400;
|
|
226
|
-
font-size: 13px;
|
|
227
|
-
color: var(--certificate-info-page-item-elapsed-value);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
.icon-box {
|
|
231
|
-
width: 40px;
|
|
232
|
-
height: 40px;
|
|
233
|
-
background: var(--certificate-info-page-item-icon-box-bg);
|
|
234
|
-
border-radius: 8px;
|
|
235
|
-
display: flex;
|
|
236
|
-
align-items: center;
|
|
237
|
-
justify-content: center;
|
|
238
|
-
color: var(--certificate-info-page-item-icon-box-icon);
|
|
239
|
-
}
|
|
240
|
-
.title-info-block {
|
|
241
|
-
font-weight: 500;
|
|
242
|
-
font-size: 14px;
|
|
243
|
-
color: var(--certificate-info-page-item-title-block);
|
|
244
|
-
}
|
|
245
|
-
.info-label {
|
|
246
|
-
font-weight: 400;
|
|
247
|
-
font-size: 13px;
|
|
248
|
-
line-height: 18px;
|
|
249
|
-
color: var(--certificate-info-page-item-label);
|
|
250
|
-
}
|
|
251
|
-
.info-value {
|
|
252
|
-
font-weight: 400;
|
|
253
|
-
font-size: 13px;
|
|
254
|
-
line-height: 18px;
|
|
255
|
-
color: var(--certificate-info-page-item-value);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
.valid-period-title {
|
|
259
|
-
font-size: 16px;
|
|
260
|
-
font-weight: 500;
|
|
261
|
-
color: var(--certificate-info-page-valid-period-title);
|
|
262
|
-
}
|
|
263
|
-
.active-dates-title {
|
|
264
|
-
font-size: 14px;
|
|
265
|
-
font-weight: 500;
|
|
266
|
-
color: var(--certificate-info-page-active-dates-title);
|
|
267
|
-
}
|
|
268
|
-
.grid-container-dates {
|
|
269
|
-
grid-gap: 44px;
|
|
270
|
-
|
|
271
|
-
.date-title-info {
|
|
272
|
-
font-size: 13px;
|
|
273
|
-
font-weight: 400;
|
|
274
|
-
line-height: 18px;
|
|
275
|
-
color: #9da6ad;
|
|
276
|
-
}
|
|
277
|
-
.date-value-info {
|
|
278
|
-
font-size: 13px;
|
|
279
|
-
font-weight: 400;
|
|
280
|
-
line-height: 18px;
|
|
281
|
-
color: var(--certificate-info-page-date-value-info);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
</style>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_Certificate } from '~/components/common/certificate/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const statusIconNameFunc = (days: number): string => {
|
|
5
|
-
let result = ''
|
|
6
|
-
|
|
7
|
-
if (days === 0) result = 'error-circle'
|
|
8
|
-
else if (days >= 30) result = 'success-fill'
|
|
9
|
-
else if (days < 30) result = 'circle-warning'
|
|
10
|
-
|
|
11
|
-
return result
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const statusTextFunc = (
|
|
15
|
-
days: number,
|
|
16
|
-
localization: UI_I_Localization
|
|
17
|
-
): string => {
|
|
18
|
-
let result = ''
|
|
19
|
-
|
|
20
|
-
if (days === 0) result = localization.inventoryConfigure.expiring
|
|
21
|
-
else if (days >= 30) result = localization.common.good
|
|
22
|
-
else if (days < 30) result = localization.inventoryConfigure.expiringSoon
|
|
23
|
-
|
|
24
|
-
return result
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const expirationDaysFunc = (value: UI_I_Certificate | {}): number => {
|
|
28
|
-
const validFrom = new Date(value.valid_from).getTime()
|
|
29
|
-
const validTo = new Date(value.valid_to).getTime()
|
|
30
|
-
|
|
31
|
-
const diffMs = validTo - validFrom
|
|
32
|
-
return diffMs / (1000 * 60 * 60 * 24)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const expirationTextFunc = (
|
|
36
|
-
days: number,
|
|
37
|
-
localization: UI_I_Localization
|
|
38
|
-
): string =>
|
|
39
|
-
localization.inventoryConfigure.certificateExpiration.replace('{0}', days)
|
|
40
|
-
|
|
41
|
-
export const elapsedValueFunc = (value: UI_I_Certificate | {}): number => {
|
|
42
|
-
const start = new Date(value.valid_from).getTime()
|
|
43
|
-
const end = new Date(value.valid_to).getTime()
|
|
44
|
-
const now = new Date().getTime()
|
|
45
|
-
|
|
46
|
-
const percent = ((now - start) / (end - start)) * 100
|
|
47
|
-
|
|
48
|
-
return Math.round(percent)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export const elapsedProgressBarColorFunc = (days: number): string => {
|
|
52
|
-
let result = ''
|
|
53
|
-
|
|
54
|
-
if (days === 0) result = '--progress-bar-0-default'
|
|
55
|
-
else if (days >= 30) result = '--progress-bar-available'
|
|
56
|
-
else if (days < 30) result = '--progress-bar-2-default'
|
|
57
|
-
|
|
58
|
-
return result
|
|
59
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Certificate } from '~/components/common/certificate/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_CertificateInfoItem } from '~/components/common/certificate/Info/new/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const certificateInfo = (
|
|
5
|
-
data: UI_I_Certificate | {},
|
|
6
|
-
type: string
|
|
7
|
-
): UI_I_CertificateInfoItem =>
|
|
8
|
-
data?.[type]?.match(
|
|
9
|
-
/SERIALNUMBER=(?<serialNumber>[^,]+),CN=(?<commonName>[^,]+),OU=(?<organizationalUnit>[^,]+),O=(?<organization>[^,]+),L=(?<locality>[^,]+),ST=(?<state>[^,]+),C=(?<country>[^,]+)/
|
|
10
|
-
)?.groups
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-loader v-show="props.loading" test-id="certificate-spinner" />
|
|
3
|
-
<div class="certificate flex flex-col h-full">
|
|
4
|
-
<common-certificate-tools @renew-certificate="emits('renew-certificate')" />
|
|
5
|
-
|
|
6
|
-
<common-certificate-info :certificate-data="props.certificateData" />
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script lang="ts" setup>
|
|
11
|
-
import type { UI_I_Certificate } from '~/components/common/certificate/lib/models/interfaces'
|
|
12
|
-
|
|
13
|
-
const props = defineProps<{
|
|
14
|
-
loading: boolean
|
|
15
|
-
certificateData: UI_I_Certificate | {}
|
|
16
|
-
}>()
|
|
17
|
-
|
|
18
|
-
const emits = defineEmits<{
|
|
19
|
-
(event: 'renew-certificate'): void
|
|
20
|
-
}>()
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<style lang="scss" scoped>
|
|
24
|
-
.certificate {
|
|
25
|
-
padding-left: 10px;
|
|
26
|
-
}
|
|
27
|
-
</style>
|