bfg-common 1.6.78 → 1.6.79
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 +14 -1
- package/assets/localization/local_en.json +14 -1
- package/assets/localization/local_hy.json +14 -1
- package/assets/localization/local_kk.json +14 -1
- package/assets/localization/local_ru.json +14 -1
- package/assets/localization/local_zh.json +14 -1
- package/components/common/adapterManager/AdapterManagerNew.vue +1 -0
- package/components/common/certificate/Certificate.vue +16 -6
- package/components/common/certificate/Info/Info.vue +61 -0
- package/components/common/certificate/{CertificateInfo.vue → Info/Old.vue} +6 -34
- package/components/common/certificate/Info/new/New.vue +285 -0
- package/components/common/certificate/Info/new/lib/config/index.ts +59 -0
- package/components/common/certificate/Info/new/lib/models/interfaces.ts +3 -0
- package/components/common/certificate/Info/new/lib/utils/index.ts +10 -0
- package/components/common/certificate/Old.vue +27 -0
- package/components/common/certificate/new/New.vue +30 -0
- package/components/common/certificate/new/Skeleton.vue +155 -0
- package/components/common/certificate/tools/New.vue +48 -0
- package/components/common/certificate/tools/Old.vue +39 -0
- package/components/common/certificate/{Tools.vue → tools/Tools.vue} +18 -23
- package/components/common/certificate/tools/lib/config/tabsPannel.ts +20 -0
- package/components/common/diagramMain/modals/Modals.vue +479 -483
- package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdapters.vue +164 -0
- package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdaptersNew.vue +306 -0
- package/components/common/diagramMain/modals/{ManagePhysicalAdaptersModal.vue → managePhysicalAdapters/ManagePhysicalAdaptersOld.vue} +245 -331
- package/package.json +2 -2
- package/components/common/certificate/lib/config/tabsPannel.ts +0 -22
|
@@ -2813,7 +2813,20 @@
|
|
|
2813
2813
|
"actionsSameInfoDesc": "Дзеянні такія ж, як і ў Правіле трывогі 1 з-за таго ж узроўню сур'ёзнасці",
|
|
2814
2814
|
"systemStack": "Сістэмны стэк",
|
|
2815
2815
|
"localSubnet": "Лакальная падсетка",
|
|
2816
|
-
"renewCertificateConfirm": "
|
|
2816
|
+
"renewCertificateConfirm": "Абнавіць сертыфікат",
|
|
2817
|
+
"elapsed": "Прайшло",
|
|
2818
|
+
"expiring": "Прайшло",
|
|
2819
|
+
"expiringSoon": "Хутка скончыцца",
|
|
2820
|
+
"certificateExpiration": "Да заканчэння тэрміну дзеяння засталося {0} дзён",
|
|
2821
|
+
"locality": "Месцазнаходжанне",
|
|
2822
|
+
"serialNumber": "Серыйны нумар",
|
|
2823
|
+
"commonName": "Агульнае імя",
|
|
2824
|
+
"organizationalUnit": "Арганізацыйнае падраздзяленне",
|
|
2825
|
+
"organization": "Арганізацыя",
|
|
2826
|
+
"state": "Дзяржава",
|
|
2827
|
+
"country": "Краіна",
|
|
2828
|
+
"validPeriod": "Тэрмін дзеяння",
|
|
2829
|
+
"certificateActiveDates": "Даты дзеяння сертыфіката",
|
|
2817
2830
|
"renewCertificateConfirmDesc": "Вы ўпэўнены, што хочаце абнавіць сертыфікат для хоста «{0}»?",
|
|
2818
2831
|
"refreshCACertificatesConfirm": "Пацверджанне абнаўлення сертыфікатаў ЦС",
|
|
2819
2832
|
"refreshCACertificatesConfirmDesc": "Вы ўпэўнены, што хочаце абнавіць сертыфікаты ЦС на хосце «{0}»?",
|
|
@@ -2817,7 +2817,20 @@
|
|
|
2817
2817
|
"actionsSameInfoDesc": "Actions are same as Alarm Rule 1 due to same severity level",
|
|
2818
2818
|
"systemStack": "System stack",
|
|
2819
2819
|
"localSubnet": "Local Subnet",
|
|
2820
|
-
"renewCertificateConfirm": "Renew Certificate
|
|
2820
|
+
"renewCertificateConfirm": "Renew Certificate",
|
|
2821
|
+
"elapsed": "Elapsed",
|
|
2822
|
+
"expiring": "Expiring",
|
|
2823
|
+
"expiringSoon": "Expiring soon",
|
|
2824
|
+
"certificateExpiration": "{0} days remaining until expiration",
|
|
2825
|
+
"locality": "Locality",
|
|
2826
|
+
"serialNumber": "Serial Number",
|
|
2827
|
+
"commonName": "Common Name",
|
|
2828
|
+
"organizationalUnit": "Organizational Unit",
|
|
2829
|
+
"organization": "Organization",
|
|
2830
|
+
"state": "State",
|
|
2831
|
+
"country": "Country",
|
|
2832
|
+
"validPeriod": "Valid Period",
|
|
2833
|
+
"certificateActiveDates": "Certificate Active Dates",
|
|
2821
2834
|
"renewCertificateConfirmDesc": "Are you sure you want to renew the certificate for the host “{0}”?",
|
|
2822
2835
|
"refreshCACertificatesConfirm": "Refresh CA Certificates Confirmation",
|
|
2823
2836
|
"refreshCACertificatesConfirmDesc": "Are you sure you want to refresh the CA certificates on the host “{0}”?",
|
|
@@ -2817,7 +2817,20 @@
|
|
|
2817
2817
|
"actionsSameInfoDesc": "Գործողությունները նույնն են, ինչ Տագնապային կանոն 1-ը՝ նույն խստության մակարդակի պատճառով",
|
|
2818
2818
|
"systemStack": "Համակարգի կույտ",
|
|
2819
2819
|
"localSubnet": "Տեղային ենթացանց",
|
|
2820
|
-
"renewCertificateConfirm": "
|
|
2820
|
+
"renewCertificateConfirm": "Թարմացնել վկայականը",
|
|
2821
|
+
"elapsed": "Անցել է",
|
|
2822
|
+
"expiring": "Անցել է",
|
|
2823
|
+
"expiringSoon": "Շուտով կլրանա",
|
|
2824
|
+
"certificateExpiration": "Գործողության ժամկետի ավարտին մնացել է {0} օր",
|
|
2825
|
+
"locality": "Տեղանք",
|
|
2826
|
+
"serialNumber": "Սերիական համար",
|
|
2827
|
+
"commonName": "Ընդհանուր անուն",
|
|
2828
|
+
"organizationalUnit": "Կազմակերպական ստորաբաժանում",
|
|
2829
|
+
"organization": "Կազմակերպություն",
|
|
2830
|
+
"state": "Պետություն",
|
|
2831
|
+
"country": "Երկիր",
|
|
2832
|
+
"validPeriod": "Գործողության ժամկետ",
|
|
2833
|
+
"certificateActiveDates": "Վկայականի գործողության ժամկետները",
|
|
2821
2834
|
"renewCertificateConfirmDesc": "Վստա՞հ եք, որ ցանկանում եք թարմացնել «{0}» հոսթի վկայագիրը։",
|
|
2822
2835
|
"refreshCACertificatesConfirm": "ՎԿ կենտրոնի վկայագրերի թարմացման հաստատում",
|
|
2823
2836
|
"refreshCACertificatesConfirmDesc": "Վստա՞հ եք, որ ցանկանում եք թարմացնել ՎԿ կենտրոնի վկայագրերը «{0}» հոսթում։",
|
|
@@ -2816,7 +2816,20 @@
|
|
|
2816
2816
|
"actionsSameInfoDesc": "Бірдей ауырлық деңгейіне байланысты әрекеттер 1-ші Дабыл ережесімен бірдей",
|
|
2817
2817
|
"systemStack": "Жүйелік стек",
|
|
2818
2818
|
"localSubnet": "Жергілікті ішкі желі",
|
|
2819
|
-
"renewCertificateConfirm": "Сертификатты
|
|
2819
|
+
"renewCertificateConfirm": "Сертификатты жаңарту",
|
|
2820
|
+
"elapsed": "Өтті",
|
|
2821
|
+
"expiring": "Өткен",
|
|
2822
|
+
"expiringSoon": "Жақын арада аяқталады",
|
|
2823
|
+
"certificateExpiration": "Қолданылу мерзімі аяқталғанша {0} күн қалды",
|
|
2824
|
+
"locality": "Орналасқан жері",
|
|
2825
|
+
"serialNumber": "Сериялық нөмір",
|
|
2826
|
+
"commonName": "Жалпы атау",
|
|
2827
|
+
"organizationalUnit": "Ұйымдық бөлімше",
|
|
2828
|
+
"organization": "Ұйым",
|
|
2829
|
+
"state": "Мемлекет",
|
|
2830
|
+
"country": "Ел",
|
|
2831
|
+
"validPeriod": "Қолданылу мерзімі",
|
|
2832
|
+
"certificateActiveDates": "Сертификаттың қолданылу күндері",
|
|
2820
2833
|
"renewCertificateConfirmDesc": "Сіз «{0}» хостының сертификатын жаңартқыңыз келетініне сенімдісіз бе?",
|
|
2821
2834
|
"refreshCACertificatesConfirm": "CA сертификаттарын жаңартуды растау",
|
|
2822
2835
|
"refreshCACertificatesConfirmDesc": "Сіз «{0}» хостындағы CA сертификаттарын жаңартқыңыз келетініне сенімдісіз бе?",
|
|
@@ -2816,7 +2816,20 @@
|
|
|
2816
2816
|
"actionsSameInfoDesc": "Действия такие же, как и в правиле тревоги 1, из-за того же уровня серьезности.",
|
|
2817
2817
|
"systemStack": "Системный стек",
|
|
2818
2818
|
"localSubnet": "Локальная подсеть",
|
|
2819
|
-
"renewCertificateConfirm": "
|
|
2819
|
+
"renewCertificateConfirm": "Продлить сертификат",
|
|
2820
|
+
"elapsed": "Прошло",
|
|
2821
|
+
"expiring": "Прошло",
|
|
2822
|
+
"expiringSoon": "Скоро истекает",
|
|
2823
|
+
"certificateExpiration": "До истечения срока действия осталось {0} дней",
|
|
2824
|
+
"locality": "Местоположение",
|
|
2825
|
+
"serialNumber": "Серийный номер",
|
|
2826
|
+
"commonName": "Общее имя",
|
|
2827
|
+
"organizationalUnit": "Организационное подразделение",
|
|
2828
|
+
"organization": "Организация",
|
|
2829
|
+
"state": "Государство",
|
|
2830
|
+
"country": "Страна",
|
|
2831
|
+
"validPeriod": "Срок действия",
|
|
2832
|
+
"certificateActiveDates": "Даты действия сертификата",
|
|
2820
2833
|
"renewCertificateConfirmDesc": "Вы уверены, что хотите продлить сертификат для хоста “{0}”?",
|
|
2821
2834
|
"refreshCACertificatesConfirm": "Подтверждение обновления сертификатов CA",
|
|
2822
2835
|
"refreshCACertificatesConfirmDesc": "Вы уверены, что хотите обновить сертификаты CA на хосте “{0}”?",
|
|
@@ -2814,7 +2814,20 @@
|
|
|
2814
2814
|
"actionsSameInfoDesc": "由于严重程度相同,操作与警报规则 1 相同",
|
|
2815
2815
|
"systemStack": "系统堆栈",
|
|
2816
2816
|
"localSubnet": "本地子网",
|
|
2817
|
-
"renewCertificateConfirm": "
|
|
2817
|
+
"renewCertificateConfirm": "续订证书",
|
|
2818
|
+
"elapsed": "已过",
|
|
2819
|
+
"expiring": "已过去",
|
|
2820
|
+
"expiringSoon": "即将过期",
|
|
2821
|
+
"certificateExpiration": "到期前还剩 {0} 天",
|
|
2822
|
+
"locality": "地点",
|
|
2823
|
+
"serialNumber": "序列号",
|
|
2824
|
+
"commonName": "通用名称",
|
|
2825
|
+
"organizationalUnit": "组织单位",
|
|
2826
|
+
"organization": "组织",
|
|
2827
|
+
"state": "州",
|
|
2828
|
+
"country": "国家",
|
|
2829
|
+
"validPeriod": "有效期",
|
|
2830
|
+
"certificateActiveDates": "证书有效日期",
|
|
2818
2831
|
"renewCertificateConfirmDesc": "您确定要为主机“{0}”更新证书吗?",
|
|
2819
2832
|
"refreshCACertificatesConfirm": "刷新 CA 证书确认",
|
|
2820
2833
|
"refreshCACertificatesConfirmDesc": "您确定要刷新主机“{0}”上的 CA 证书吗?",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:loading="props.loading"
|
|
5
|
+
:certificate-data="props.certificateData"
|
|
6
|
+
@renew-certificate="emits('renew-certificate')"
|
|
7
|
+
/>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script lang="ts" setup>
|
|
@@ -18,6 +18,16 @@ const props = defineProps<{
|
|
|
18
18
|
const emits = defineEmits<{
|
|
19
19
|
(event: 'renew-certificate'): void
|
|
20
20
|
}>()
|
|
21
|
+
|
|
22
|
+
const { $store }: any = useNuxtApp()
|
|
23
|
+
|
|
24
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
25
|
+
|
|
26
|
+
const currentComponent = computed(() =>
|
|
27
|
+
isNewView.value
|
|
28
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
29
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
30
|
+
)
|
|
21
31
|
</script>
|
|
22
32
|
|
|
23
33
|
<style lang="scss" scoped>
|
|
@@ -0,0 +1,61 @@
|
|
|
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>
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</template>
|
|
48
48
|
<template #stackBlockContent
|
|
49
49
|
><span data-id="certificate-valid-from-value">{{
|
|
50
|
-
validFrom
|
|
50
|
+
props.validFrom
|
|
51
51
|
}}</span></template
|
|
52
52
|
>
|
|
53
53
|
</atoms-stack-block>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
<template #stackBlockContent
|
|
66
66
|
><span data-id="certificate-valid-to-value">{{
|
|
67
|
-
validTo
|
|
67
|
+
props.validTo
|
|
68
68
|
}}</span></template
|
|
69
69
|
>
|
|
70
70
|
</atoms-stack-block>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
</template>
|
|
82
82
|
<template #stackBlockContent
|
|
83
83
|
><span data-id="certificate-status-value">{{
|
|
84
|
-
statusText
|
|
84
|
+
props.statusText
|
|
85
85
|
}}</span></template
|
|
86
86
|
>
|
|
87
87
|
</atoms-stack-block>
|
|
@@ -94,40 +94,12 @@ import type { UI_I_Certificate } from '~/components/common/certificate/lib/model
|
|
|
94
94
|
|
|
95
95
|
const props = defineProps<{
|
|
96
96
|
certificateData: UI_I_Certificate | {}
|
|
97
|
+
validFrom: string
|
|
98
|
+
validTo: string
|
|
99
|
+
statusText: string
|
|
97
100
|
}>()
|
|
98
101
|
|
|
99
|
-
const { $store, $formattedDatetime }: any = useNuxtApp()
|
|
100
|
-
|
|
101
102
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
102
|
-
|
|
103
|
-
const updateTimeFormatAndInterfaceLang = computed<number>(
|
|
104
|
-
() => $store.getters['main/getUpdateTimeFormatAndInterfaceLang']
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
const validFrom = computed<string>(() =>
|
|
108
|
-
updateTimeFormatAndInterfaceLang.value
|
|
109
|
-
? $formattedDatetime(props.certificateData.valid_from, {
|
|
110
|
-
hasSeconds: true,
|
|
111
|
-
})
|
|
112
|
-
: ''
|
|
113
|
-
)
|
|
114
|
-
const validTo = computed<string>(() =>
|
|
115
|
-
updateTimeFormatAndInterfaceLang.value
|
|
116
|
-
? $formattedDatetime(props.certificateData.valid_to, {
|
|
117
|
-
hasSeconds: true,
|
|
118
|
-
})
|
|
119
|
-
: ''
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
const statusText = computed<string>(() =>
|
|
123
|
-
props.certificateData.status === 'good'
|
|
124
|
-
? localization.value.common.valid
|
|
125
|
-
: props.certificateData.status
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
onUnmounted(() => {
|
|
129
|
-
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostCertificate')
|
|
130
|
-
})
|
|
131
103
|
</script>
|
|
132
104
|
|
|
133
105
|
<style lang="scss" scoped>
|
|
@@ -0,0 +1,285 @@
|
|
|
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>
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|