bfg-common 1.4.186 → 1.4.189
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 +6 -5
- package/assets/localization/local_en.json +6 -5
- package/assets/localization/local_hy.json +6 -5
- package/assets/localization/local_kk.json +6 -5
- package/assets/localization/local_ru.json +6 -5
- package/assets/localization/local_zh.json +6 -5
- package/components/atoms/comboDropdownMenu/ComboDropdownMenu.vue +357 -0
- package/components/atoms/comboDropdownMenu/lib/models/interfaces.ts +26 -0
- package/components/atoms/datepicker/Datepicker.vue +12 -3
- package/components/atoms/datepicker/lib/config/{datapicker.ts → datepicker.ts} +4 -1
- package/components/common/layout/theHeader/TheHeader.vue +51 -0
- package/components/common/monitor/overview/filters/Filters.vue +2 -0
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +7 -14
- package/lib/utils/token.ts +34 -0
- package/package.json +1 -1
|
@@ -1833,7 +1833,7 @@
|
|
|
1833
1833
|
"newVCenterServer": "Новы сервер {productName}",
|
|
1834
1834
|
"noSavedVCenterServerAddressesFound": "Захаваных адрасоў сервера {productName} не знойдзена.",
|
|
1835
1835
|
"vCenterServerAddress": "Адрас сервера {productName}",
|
|
1836
|
-
"serverAddressEsxi": "Адрас сервера
|
|
1836
|
+
"serverAddressEsxi": "Адрас сервера vmware",
|
|
1837
1837
|
"saveVCenterServerAddress": "Захаваць адрас сервера {productName}",
|
|
1838
1838
|
"discard": "Адкідаць",
|
|
1839
1839
|
"ioControl": "Io Control",
|
|
@@ -2096,8 +2096,8 @@
|
|
|
2096
2096
|
"eventTypeDescription": "Апісанне тыпу падзеі",
|
|
2097
2097
|
"possibleCauses": "Магчымыя прычыны",
|
|
2098
2098
|
"importVms": "Імпарт віртуальных машын",
|
|
2099
|
-
"selectSourceVCenterServer": "
|
|
2100
|
-
"selectSourceVCenterServerDesc": "Імпарт віртуальнай машыны з абранага зыходнага вузла
|
|
2099
|
+
"selectSourceVCenterServer": "vmware Хост көзін таңдаңыз",
|
|
2100
|
+
"selectSourceVCenterServerDesc": "Імпарт віртуальнай машыны з абранага зыходнага вузла vmware.",
|
|
2101
2101
|
"importVirtualMachines": "Імпарт віртуальных машын",
|
|
2102
2102
|
"importVirtualMachinesDesc": "Выберыце, якія віртуальныя машыны трэба імпартаваць.",
|
|
2103
2103
|
"selectFolder": "Выберыце тэчку",
|
|
@@ -2274,7 +2274,8 @@
|
|
|
2274
2274
|
"inventoryConfigure": {
|
|
2275
2275
|
"acceptanceLevel": "узровень прыняцця",
|
|
2276
2276
|
"activeType": "Актыўны тып",
|
|
2277
|
-
"services": "Паслуга"
|
|
2277
|
+
"services": "Паслуга",
|
|
2278
|
+
"selectTrigger": "Выберыце трыгер"
|
|
2278
2279
|
},
|
|
2279
2280
|
"datastoreWizard": {
|
|
2280
2281
|
"accessMode": "Рэжым доступу"
|
|
@@ -2559,7 +2560,7 @@
|
|
|
2559
2560
|
"deleteSnapshotDescription": "Гэта дзеянне з'яўляецца сталым і не можа быць адноўлена. Вы хочаце выдаліць '{0}'?"
|
|
2560
2561
|
},
|
|
2561
2562
|
"importVms": {
|
|
2562
|
-
"selectSourceTooltipDesc": "Правы карыстальніка esxi павінны адпавядаць ролях Administrator"
|
|
2563
|
+
"selectSourceTooltipDesc": "Правы карыстальніка esxi павінны адпавядаць ролях Administrator, крэдыт прымаюцца ад esxi і vSphere"
|
|
2563
2564
|
},
|
|
2564
2565
|
"storageDevice": {
|
|
2565
2566
|
"repeatCount": "Паўтарыце падлік",
|
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
"newVCenterServer": "New {productName} server",
|
|
1836
1836
|
"noSavedVCenterServerAddressesFound": "No saved Sphere Zone addresses found.",
|
|
1837
1837
|
"vCenterServerAddress": "Sphere Zone address",
|
|
1838
|
-
"serverAddressEsxi": "
|
|
1838
|
+
"serverAddressEsxi": "Vmware Server Address",
|
|
1839
1839
|
"saveVCenterServerAddress": "Save Sphere Zone address",
|
|
1840
1840
|
"discard": "Discard",
|
|
1841
1841
|
"ioControl": "Io Control",
|
|
@@ -2099,8 +2099,8 @@
|
|
|
2099
2099
|
"eventTypeDescription": "Event Type Description",
|
|
2100
2100
|
"possibleCauses": "Possible Causes",
|
|
2101
2101
|
"importVms": "Import VMs",
|
|
2102
|
-
"selectSourceVCenterServer": "Select a source
|
|
2103
|
-
"selectSourceVCenterServerDesc": "Import Virtual Machine from the selected source
|
|
2102
|
+
"selectSourceVCenterServer": "Select a source vmware Host",
|
|
2103
|
+
"selectSourceVCenterServerDesc": "Import Virtual Machine from the selected source vmware",
|
|
2104
2104
|
"importVirtualMachines": "Import Virtual Machines",
|
|
2105
2105
|
"importVirtualMachinesDesc": "Select which Virtual Machines to be imported.",
|
|
2106
2106
|
"selectFolder": "Select folder",
|
|
@@ -2278,7 +2278,8 @@
|
|
|
2278
2278
|
"inventoryConfigure": {
|
|
2279
2279
|
"acceptanceLevel": "Acceptance level",
|
|
2280
2280
|
"activeType": "Active Type",
|
|
2281
|
-
"services": "Services"
|
|
2281
|
+
"services": "Services",
|
|
2282
|
+
"selectTrigger": "Select a trigger"
|
|
2282
2283
|
},
|
|
2283
2284
|
"datastoreWizard": {
|
|
2284
2285
|
"accessMode": "Access Mode"
|
|
@@ -2563,7 +2564,7 @@
|
|
|
2563
2564
|
"deleteSnapshotDescription": "This action is permanent and cannot be recovered. Are you sure you want to delete '{0}'?"
|
|
2564
2565
|
},
|
|
2565
2566
|
"importVms": {
|
|
2566
|
-
"selectSourceTooltipDesc": "No Trusted infrastructure Administrator"
|
|
2567
|
+
"selectSourceTooltipDesc": "No Trusted infrastructure Administrator, credits are accepted from esxi and vSphere"
|
|
2567
2568
|
},
|
|
2568
2569
|
"storageDevice": {
|
|
2569
2570
|
"repeatCount": "Repeat Count",
|
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
"newVCenterServer": "Նոր {productName} սերվեր",
|
|
1836
1836
|
"noSavedVCenterServerAddressesFound": "Պահված Sphere Zone հասցեներ չեն գտնվել:",
|
|
1837
1837
|
"vCenterServerAddress": "{productName} սերվերի հասցեն",
|
|
1838
|
-
"serverAddressEsxi": "
|
|
1838
|
+
"serverAddressEsxi": "Vmware սերվերի հասցե",
|
|
1839
1839
|
"saveVCenterServerAddress": "Պահպանեք {productName} սերվերի հասցեն",
|
|
1840
1840
|
"discard": "Հրաժարվել",
|
|
1841
1841
|
"ioControl": "Io Control",
|
|
@@ -2099,8 +2099,8 @@
|
|
|
2099
2099
|
"eventTypeDescription": "Միջոցառման տեսակի նկարագրություն",
|
|
2100
2100
|
"possibleCauses": "Հնարավոր պատճառներ",
|
|
2101
2101
|
"importVms": "Վիրտուալ մեքենաների ներմուծում",
|
|
2102
|
-
"selectSourceVCenterServer": "Ընտրեք
|
|
2103
|
-
"selectSourceVCenterServerDesc": "Ներմուծեք վիրտուալ
|
|
2102
|
+
"selectSourceVCenterServer": "Ընտրեք vmware աղբյուրի հյուրընկալողը",
|
|
2103
|
+
"selectSourceVCenterServerDesc": "Ներմուծեք վիրտուալ մեքենա ընտրված աղբյուրից vmware-ից",
|
|
2104
2104
|
"importVirtualMachines": "Ներմուծեք վիրտուալ մեքենաներ",
|
|
2105
2105
|
"importVirtualMachinesDesc": "Ընտրեք, թե որ վիրտուալ մեքենաները պետք է ներմուծվեն:",
|
|
2106
2106
|
"selectFolder": "Ընտրեք թղթապանակ",
|
|
@@ -2278,7 +2278,8 @@
|
|
|
2278
2278
|
"inventoryConfigure": {
|
|
2279
2279
|
"acceptanceLevel": "ընդունման մակարդակ",
|
|
2280
2280
|
"activeType": "Ակտիվ տեսակ",
|
|
2281
|
-
"services": "Ծառայություններ"
|
|
2281
|
+
"services": "Ծառայություններ",
|
|
2282
|
+
"selectTrigger": "Ընտրեք ձգան"
|
|
2282
2283
|
},
|
|
2283
2284
|
"datastoreWizard": {
|
|
2284
2285
|
"accessMode": "Մուտքի ռեժիմ"
|
|
@@ -2563,7 +2564,7 @@
|
|
|
2563
2564
|
"deleteSnapshotDescription": "Այս գործողությունը մշտական է և չի կարող վերականգնվել: Համոզված եք, որ ցանկանում եք ջնջել '{0}'?"
|
|
2564
2565
|
},
|
|
2565
2566
|
"importVms": {
|
|
2566
|
-
"selectSourceTooltipDesc": "Esxi օգտագործողի իրավունքները պետք է համապատասխանեն Administrator-ի
|
|
2567
|
+
"selectSourceTooltipDesc": "Esxi օգտագործողի իրավունքները պետք է համապատասխանեն Administrator-ի դերերին, կրեդիտներն ընդունվում են esxi-ից և vSphere-ից"
|
|
2567
2568
|
},
|
|
2568
2569
|
"storageDevice": {
|
|
2569
2570
|
"repeatCount": "Կրկնել հաշվարկը",
|
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
"newVCenterServer": "Жаңа {productName} сервері",
|
|
1836
1836
|
"noSavedVCenterServerAddressesFound": "Сақталған {productName} сервер мекенжайлары табылмады.",
|
|
1837
1837
|
"vCenterServerAddress": "{productName} серверінің мекенжайы",
|
|
1838
|
-
"serverAddressEsxi": "
|
|
1838
|
+
"serverAddressEsxi": "Vmware Серверінің Мекенжайы",
|
|
1839
1839
|
"saveVCenterServerAddress": "{productName} серверінің мекенжайын сақтаңыз",
|
|
1840
1840
|
"discard": "Жою",
|
|
1841
1841
|
"ioControl": "Io басқару",
|
|
@@ -2098,8 +2098,8 @@
|
|
|
2098
2098
|
"eventTypeDescription": "Оқиға түрі сипаттамасы",
|
|
2099
2099
|
"possibleCauses": "Ықтимал себептері",
|
|
2100
2100
|
"importVms": "Виртуалды Машиналарды Импорттау",
|
|
2101
|
-
"selectSourceVCenterServer": "
|
|
2102
|
-
"selectSourceVCenterServerDesc": "Виртуалды
|
|
2101
|
+
"selectSourceVCenterServer": "Vmware Хост көзін таңдаңыз",
|
|
2102
|
+
"selectSourceVCenterServerDesc": "Виртуалды машинаны таңдалған көзден vmware хостынан немесе vSphere импорттау.",
|
|
2103
2103
|
"importVirtualMachines": "Виртуалды машиналарды импорттау",
|
|
2104
2104
|
"importVirtualMachinesDesc": "Импортталатын виртуалды машиналарды таңдаңыз.",
|
|
2105
2105
|
"selectFolder": "Қалтаны таңдаңыз",
|
|
@@ -2277,7 +2277,8 @@
|
|
|
2277
2277
|
"inventoryConfigure": {
|
|
2278
2278
|
"acceptanceLevel": "қабылдау деңгейі",
|
|
2279
2279
|
"activeType": "Белсенді түрі",
|
|
2280
|
-
"services": "Қызметтер"
|
|
2280
|
+
"services": "Қызметтер",
|
|
2281
|
+
"selectTrigger": "Триггерді таңдау"
|
|
2281
2282
|
},
|
|
2282
2283
|
"datastoreWizard": {
|
|
2283
2284
|
"accessMode": "Қол жеткізу режимі"
|
|
@@ -2562,7 +2563,7 @@
|
|
|
2562
2563
|
"deleteSnapshotDescription": "Бұл әрекет тұрақты және оны қалпына келтіру мүмкін емес. Сіз жойғыңыз келетініне сенімдісіз '{0}'?"
|
|
2563
2564
|
},
|
|
2564
2565
|
"importVms": {
|
|
2565
|
-
"selectSourceTooltipDesc": "Esxi пайдаланушы құқықтары әкімші рөлдеріне сәйкес келуі
|
|
2566
|
+
"selectSourceTooltipDesc": "Esxi пайдаланушы құқықтары әкімші рөлдеріне сәйкес келуі керек, несиелер esxi және vSphere - ден алынады"
|
|
2566
2567
|
},
|
|
2567
2568
|
"storageDevice": {
|
|
2568
2569
|
"repeatCount": "Сананы қайталау",
|
|
@@ -1838,7 +1838,7 @@
|
|
|
1838
1838
|
"newVCenterServer": "Новый сервер {productName}",
|
|
1839
1839
|
"noSavedVCenterServerAddressesFound": "Сохраненных адресов серверов {productName} не найдено.",
|
|
1840
1840
|
"vCenterServerAddress": "Адрес сервера {productName}",
|
|
1841
|
-
"serverAddressEsxi": "Адрес сервера
|
|
1841
|
+
"serverAddressEsxi": "Адрес сервера vmware",
|
|
1842
1842
|
"saveVCenterServerAddress": "Сохранить адрес сервера {productName}",
|
|
1843
1843
|
"discard": "Отказаться",
|
|
1844
1844
|
"ioControl": "Ио-контроль",
|
|
@@ -2101,8 +2101,8 @@
|
|
|
2101
2101
|
"eventTypeDescription": "Описание события",
|
|
2102
2102
|
"possibleCauses": "Возможные причины",
|
|
2103
2103
|
"importVms": "Импорт виртуальных машин",
|
|
2104
|
-
"selectSourceVCenterServer": "Выберите исходный хост
|
|
2105
|
-
"selectSourceVCenterServerDesc": "Импортируйте виртуальную машину с выбранного исходного узла
|
|
2104
|
+
"selectSourceVCenterServer": "Выберите исходный хост vmware",
|
|
2105
|
+
"selectSourceVCenterServerDesc": "Импортируйте виртуальную машину с выбранного исходного узла vmware",
|
|
2106
2106
|
"importVirtualMachines": "Импортировать виртуальные машины",
|
|
2107
2107
|
"importVirtualMachinesDesc": "Выберите, какие виртуальные машины нужно импортировать.",
|
|
2108
2108
|
"selectFolder": "Выберите папку",
|
|
@@ -2280,7 +2280,8 @@
|
|
|
2280
2280
|
"inventoryConfigure": {
|
|
2281
2281
|
"acceptanceLevel": "Уровень приемлемости",
|
|
2282
2282
|
"activeType": "Белсенді түрі",
|
|
2283
|
-
"services": "Сервисы"
|
|
2283
|
+
"services": "Сервисы",
|
|
2284
|
+
"selectTrigger": "Выберите триггер"
|
|
2284
2285
|
},
|
|
2285
2286
|
"datastoreWizard": {
|
|
2286
2287
|
"accessMode": "Режим доступа"
|
|
@@ -2565,7 +2566,7 @@
|
|
|
2565
2566
|
"deleteSnapshotDescription": "Это действие является постоянным и не может быть восстановлено. Вы уверены, что хотите удалить '{0}'?"
|
|
2566
2567
|
},
|
|
2567
2568
|
"importVms": {
|
|
2568
|
-
"selectSourceTooltipDesc": "Права пользователя
|
|
2569
|
+
"selectSourceTooltipDesc": "Права пользователя vmware дожны соответствовать ролям Administrator, креды принимаются от esxi и vSphere"
|
|
2569
2570
|
},
|
|
2570
2571
|
"storageDevice": {
|
|
2571
2572
|
"repeatCount": "Повторить счет",
|
|
@@ -1835,7 +1835,7 @@
|
|
|
1835
1835
|
"newVCenterServer": "新的 {productName} 服务器",
|
|
1836
1836
|
"noSavedVCenterServerAddressesFound": "找不到已保存的 Sphere Zone 地址。",
|
|
1837
1837
|
"vCenterServerAddress": "{productName} 服务器地址",
|
|
1838
|
-
"serverAddressEsxi": "
|
|
1838
|
+
"serverAddressEsxi": "Vmware服务器地址",
|
|
1839
1839
|
"saveVCenterServerAddress": "保存 Sphere Zone 地址",
|
|
1840
1840
|
"discard": "丢弃",
|
|
1841
1841
|
"ioControl": "IO控制",
|
|
@@ -2098,8 +2098,8 @@
|
|
|
2098
2098
|
"eventTypeDescription": "事件类型描述",
|
|
2099
2099
|
"possibleCauses": "可能的原因",
|
|
2100
2100
|
"importVms": "导入虚拟机",
|
|
2101
|
-
"selectSourceVCenterServer": "选择源
|
|
2102
|
-
"selectSourceVCenterServerDesc": "从选定的源
|
|
2101
|
+
"selectSourceVCenterServer": "选择源vmware主机",
|
|
2102
|
+
"selectSourceVCenterServerDesc": "从选定的源 vmware 主机或 导入虚拟机。",
|
|
2103
2103
|
"importVirtualMachines": "导入虚拟机",
|
|
2104
2104
|
"importVirtualMachinesDesc": "选择要导入的虚拟机。",
|
|
2105
2105
|
"selectFolder": "选择文件夹",
|
|
@@ -2276,7 +2276,8 @@
|
|
|
2276
2276
|
"inventoryConfigure": {
|
|
2277
2277
|
"acceptanceLevel": "接受級別",
|
|
2278
2278
|
"activeType": "活动型",
|
|
2279
|
-
"services": "服务"
|
|
2279
|
+
"services": "服务",
|
|
2280
|
+
"selectTrigger": "选择触发器"
|
|
2280
2281
|
},
|
|
2281
2282
|
"datastoreWizard": {
|
|
2282
2283
|
"accessMode": "访问方式"
|
|
@@ -2561,7 +2562,7 @@
|
|
|
2561
2562
|
"deleteSnapshotDescription": "此操作是永久性的,无法恢复。 你确定你要删除 '{0}'?"
|
|
2562
2563
|
},
|
|
2563
2564
|
"importVms": {
|
|
2564
|
-
"selectSourceTooltipDesc": "Esxi
|
|
2565
|
+
"selectSourceTooltipDesc": "Esxi用户权限必须对应于管理员角色. esxi和vSphere接受积分"
|
|
2565
2566
|
},
|
|
2566
2567
|
"storageDevice": {
|
|
2567
2568
|
"repeatCount": "重复计数",
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="combo-dropdown-content">
|
|
3
|
+
<div>
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
:class="['alarm-trigger-combo-box dropdown', { open: isShowList }]"
|
|
7
|
+
@mouseenter="isHover = true"
|
|
8
|
+
@mouseleave="isHover = false"
|
|
9
|
+
>
|
|
10
|
+
<div class="select dropdown-toggle">
|
|
11
|
+
<input
|
|
12
|
+
v-model="selectedLocal"
|
|
13
|
+
:placeholder="localization.inventoryConfigure.selectTrigger"
|
|
14
|
+
:data-id="`${props.testId}-selected-field`"
|
|
15
|
+
type="text"
|
|
16
|
+
class="form-control dropdown-host"
|
|
17
|
+
@click="isShowList = !isShowList"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-if="isShowList" class="combo-dropdown-menu dropdown-menu">
|
|
21
|
+
<input
|
|
22
|
+
id="search-input"
|
|
23
|
+
v-model="search"
|
|
24
|
+
:data-id="`${props.testId}-search-field`"
|
|
25
|
+
type="search"
|
|
26
|
+
autocomplete="off"
|
|
27
|
+
maxlength="300"
|
|
28
|
+
class="form-control dropdown-search-box"
|
|
29
|
+
:placeholder="localization.common.search"
|
|
30
|
+
@input="onInputSearch"
|
|
31
|
+
/>
|
|
32
|
+
<div class="dropdown-result-holder">
|
|
33
|
+
<p v-if="search && !filteredData.length" class="empty-text">
|
|
34
|
+
<i>{{ localization.common.noItemsDisplay }}</i>
|
|
35
|
+
</p>
|
|
36
|
+
<div>
|
|
37
|
+
<div
|
|
38
|
+
v-for="(item, key) in filteredData"
|
|
39
|
+
:key="key"
|
|
40
|
+
:data-id="item.text"
|
|
41
|
+
:class="[
|
|
42
|
+
'clr-tree-node item-row dropdown-parent-item',
|
|
43
|
+
{ open: arrowKeys[key] },
|
|
44
|
+
{ searched: isSearched },
|
|
45
|
+
]"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
v-if="!isSearched"
|
|
49
|
+
class="clr-tree-node-content-container"
|
|
50
|
+
>
|
|
51
|
+
<button
|
|
52
|
+
:data-id="`${item.testId}-toggle-button`"
|
|
53
|
+
aria-hidden="true"
|
|
54
|
+
type="button"
|
|
55
|
+
class="clr-treenode-caret"
|
|
56
|
+
@click="arrowKeys[key] = !arrowKeys[key]"
|
|
57
|
+
>
|
|
58
|
+
<atoms-the-icon
|
|
59
|
+
:class="[
|
|
60
|
+
'trigger-icon clr-icon',
|
|
61
|
+
{ open: arrowKeys[key] },
|
|
62
|
+
]"
|
|
63
|
+
name="angle"
|
|
64
|
+
/>
|
|
65
|
+
</button>
|
|
66
|
+
<div class="clr-treenode-content item-title-content">
|
|
67
|
+
<b
|
|
68
|
+
:title="`${item.text} (${item.itemsCount})`"
|
|
69
|
+
class="dropdown-item-text category-name"
|
|
70
|
+
>
|
|
71
|
+
{{ item.text }} </b
|
|
72
|
+
><b
|
|
73
|
+
:title="`${item.text} (${item.itemsCount})`"
|
|
74
|
+
class="dropdown-item-text category-size"
|
|
75
|
+
>
|
|
76
|
+
({{ item.itemsCount }})</b
|
|
77
|
+
>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
:class="[
|
|
82
|
+
'clr-treenode-children children-content',
|
|
83
|
+
{ open: arrowKeys[key] },
|
|
84
|
+
]"
|
|
85
|
+
>
|
|
86
|
+
<div
|
|
87
|
+
v-for="(item2, key2) in item.childs"
|
|
88
|
+
:key="key2"
|
|
89
|
+
:data-id="item2.testId"
|
|
90
|
+
class="clr-tree-node"
|
|
91
|
+
@click="onSelect(item2.value)"
|
|
92
|
+
>
|
|
93
|
+
<div class="clr-tree-node-content-container">
|
|
94
|
+
<div class="clr-treenode-content item-title-content">
|
|
95
|
+
<button
|
|
96
|
+
:title="item2.text"
|
|
97
|
+
:data-id="item2.text"
|
|
98
|
+
type="button"
|
|
99
|
+
class="btn-link dropdown-child-item"
|
|
100
|
+
>
|
|
101
|
+
<span :title="item2.text" class="dropdown-item-text"
|
|
102
|
+
>{{ item2.firstText }}<b>{{ item2.secondText }}</b
|
|
103
|
+
>{{ item2.thirdText }}</span
|
|
104
|
+
>
|
|
105
|
+
</button>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script setup lang="ts">
|
|
121
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
122
|
+
import type {
|
|
123
|
+
UI_I_ComboDropdown,
|
|
124
|
+
UI_I_ComboDropdownChild,
|
|
125
|
+
UI_I_ComboDropdownSearched,
|
|
126
|
+
UI_I_ComboDropdownSearchedItem,
|
|
127
|
+
} from '~/components/atoms/comboDropdownMenu/lib/models/interfaces'
|
|
128
|
+
|
|
129
|
+
const props = defineProps<{
|
|
130
|
+
selected: string
|
|
131
|
+
items: UI_I_ComboDropdown[]
|
|
132
|
+
testId: string
|
|
133
|
+
}>()
|
|
134
|
+
const emits = defineEmits<{
|
|
135
|
+
(event: 'select', value: string): void
|
|
136
|
+
}>()
|
|
137
|
+
|
|
138
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
139
|
+
|
|
140
|
+
const selectedLocal = ref<string>(props.selected)
|
|
141
|
+
watch(
|
|
142
|
+
() => props.selected,
|
|
143
|
+
(newValue) => {
|
|
144
|
+
selectedLocal.value = newValue
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
const search = ref<string>('')
|
|
148
|
+
const isSearched = ref<boolean>(false)
|
|
149
|
+
const onInputSearch = (): void => {
|
|
150
|
+
isSearched.value = !!search.value
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// New Function for search
|
|
154
|
+
// const text = ref<string>('Hello Worlds!')
|
|
155
|
+
// const searchQuery = ref<string>('')
|
|
156
|
+
//
|
|
157
|
+
// const highlightText = computed<string>((): any => {
|
|
158
|
+
// if (!searchQuery.value) return text.value
|
|
159
|
+
// const regex = new RegExp(`(${searchQuery.value})`, 'gi')
|
|
160
|
+
// return text.value.replace(regex, '<bold style="font-weight: 500">$1</bold>')
|
|
161
|
+
// })
|
|
162
|
+
const constructChildesBySearch = (
|
|
163
|
+
data: UI_I_ComboDropdownChild[]
|
|
164
|
+
): UI_I_ComboDropdownSearchedItem[] => {
|
|
165
|
+
if (!isSearched.value)
|
|
166
|
+
return data.map((item) => {
|
|
167
|
+
return {
|
|
168
|
+
text: item.text,
|
|
169
|
+
value: item.value,
|
|
170
|
+
firstText: item.text,
|
|
171
|
+
secondText: '',
|
|
172
|
+
thirdText: '',
|
|
173
|
+
testId: `${item.text}-child`,
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
const searchLower = search.value.toLowerCase()
|
|
178
|
+
const searchLength = searchLower.length
|
|
179
|
+
const result: UI_I_ComboDropdownSearchedItem[] = []
|
|
180
|
+
data.forEach((item) => {
|
|
181
|
+
const showTextLower = item.text.toLowerCase()
|
|
182
|
+
const showText = item.text
|
|
183
|
+
if (showTextLower.includes(searchLower)) {
|
|
184
|
+
const getIndex = showTextLower.indexOf(searchLower)
|
|
185
|
+
|
|
186
|
+
const newValue = {
|
|
187
|
+
text: item.text,
|
|
188
|
+
value: item.value,
|
|
189
|
+
firstText: showText.slice(0, getIndex),
|
|
190
|
+
secondText: showText.slice(getIndex, getIndex + searchLength),
|
|
191
|
+
thirdText: showText.slice(getIndex + searchLength, showText.length),
|
|
192
|
+
testId: `${item.text}-child`,
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
result.push(newValue)
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
return result
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const filteredData = computed<UI_I_ComboDropdownSearched[]>(() => {
|
|
202
|
+
const result: UI_I_ComboDropdownSearched[] = []
|
|
203
|
+
|
|
204
|
+
props.items.forEach((item) => {
|
|
205
|
+
const filteredChilds = constructChildesBySearch(item.childs)
|
|
206
|
+
|
|
207
|
+
if (filteredChilds.length)
|
|
208
|
+
result.push({
|
|
209
|
+
text: item.text,
|
|
210
|
+
itemsCount: item.itemsCount,
|
|
211
|
+
childs: filteredChilds,
|
|
212
|
+
testId: item.testId,
|
|
213
|
+
})
|
|
214
|
+
})
|
|
215
|
+
return result
|
|
216
|
+
})
|
|
217
|
+
|
|
218
|
+
const arrowKeys = ref<boolean[]>([])
|
|
219
|
+
watch(
|
|
220
|
+
() => props.items,
|
|
221
|
+
(newValue) => {
|
|
222
|
+
if (!newValue.length) return
|
|
223
|
+
|
|
224
|
+
newValue.forEach((_, key) => {
|
|
225
|
+
const currentValue = key === 0
|
|
226
|
+
arrowKeys.value.push(currentValue)
|
|
227
|
+
})
|
|
228
|
+
},
|
|
229
|
+
{ immediate: true, deep: true }
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
const isShowList = ref<boolean>(false)
|
|
233
|
+
watch(isShowList, (newValue) => {
|
|
234
|
+
if (!newValue) {
|
|
235
|
+
isSearched.value = false
|
|
236
|
+
return
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
document.getElementById('search-input')?.focus()
|
|
241
|
+
}, 0)
|
|
242
|
+
selectedLocal.value && (search.value = selectedLocal.value)
|
|
243
|
+
})
|
|
244
|
+
const isHover = ref<boolean>(false)
|
|
245
|
+
|
|
246
|
+
const hideMenu = (force?: boolean): void => {
|
|
247
|
+
if (isHover.value && !force) return
|
|
248
|
+
|
|
249
|
+
isShowList.value = false
|
|
250
|
+
}
|
|
251
|
+
const windowClick = (): void => {
|
|
252
|
+
hideMenu()
|
|
253
|
+
}
|
|
254
|
+
const windowScroll = (): void => {
|
|
255
|
+
hideMenu()
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const onSelect = (value: string): void => {
|
|
259
|
+
emits('select', value)
|
|
260
|
+
hideMenu(true)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
onMounted(() => {
|
|
264
|
+
window.addEventListener('click', windowClick)
|
|
265
|
+
window.addEventListener('scroll', windowScroll, true)
|
|
266
|
+
})
|
|
267
|
+
onUnmounted(() => {
|
|
268
|
+
window.removeEventListener('click', windowClick)
|
|
269
|
+
window.removeEventListener('scroll', windowScroll)
|
|
270
|
+
})
|
|
271
|
+
</script>
|
|
272
|
+
|
|
273
|
+
<style scoped lang="scss">
|
|
274
|
+
.combo-dropdown-content {
|
|
275
|
+
.alarm-trigger-combo-box {
|
|
276
|
+
position: static;
|
|
277
|
+
|
|
278
|
+
.combo-dropdown-menu {
|
|
279
|
+
position: absolute;
|
|
280
|
+
inset: 0 auto auto 0;
|
|
281
|
+
transform: translateX(15px) translateY(24px);
|
|
282
|
+
margin-top: -15px;
|
|
283
|
+
width: 30rem;
|
|
284
|
+
|
|
285
|
+
#search-input {
|
|
286
|
+
margin: 5px 2px 3px;
|
|
287
|
+
width: calc(100% - 4px);
|
|
288
|
+
height: 34px;
|
|
289
|
+
padding: 6px 12px;
|
|
290
|
+
color: #333;
|
|
291
|
+
font-size: 13px;
|
|
292
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
|
293
|
+
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
|
294
|
+
border: 1px solid #949494;
|
|
295
|
+
background-image: none;
|
|
296
|
+
|
|
297
|
+
&:focus {
|
|
298
|
+
outline: none;
|
|
299
|
+
border-color: #3cf;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
.dropdown-result-holder {
|
|
303
|
+
padding-top: 10px;
|
|
304
|
+
max-height: 18rem;
|
|
305
|
+
overflow-x: hidden;
|
|
306
|
+
overflow-y: auto;
|
|
307
|
+
|
|
308
|
+
.empty-text {
|
|
309
|
+
padding: 0 0.24rem 1.2rem 0.72rem;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.dropdown-parent-item {
|
|
313
|
+
&.open {
|
|
314
|
+
&.searched {
|
|
315
|
+
.children-content {
|
|
316
|
+
.item-title-content {
|
|
317
|
+
.dropdown-child-item {
|
|
318
|
+
padding-left: 14px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.trigger-icon {
|
|
325
|
+
transform: rotate(180deg);
|
|
326
|
+
}
|
|
327
|
+
.children-content {
|
|
328
|
+
overflow-y: visible;
|
|
329
|
+
height: auto;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.trigger-icon {
|
|
334
|
+
transform: rotate(90deg);
|
|
335
|
+
}
|
|
336
|
+
.children-content {
|
|
337
|
+
overflow-x: hidden;
|
|
338
|
+
margin-left: 0;
|
|
339
|
+
height: 0;
|
|
340
|
+
overflow-y: visible;
|
|
341
|
+
|
|
342
|
+
.item-title-content {
|
|
343
|
+
&:first-child {
|
|
344
|
+
padding-left: 0;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.dropdown-child-item {
|
|
348
|
+
padding-left: 28px;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface UI_I_ComboDropdownChild {
|
|
2
|
+
text: string
|
|
3
|
+
value: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface UI_I_ComboDropdown {
|
|
7
|
+
text: string
|
|
8
|
+
itemsCount: number
|
|
9
|
+
childs: UI_I_ComboDropdownChild[]
|
|
10
|
+
testId: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface UI_I_ComboDropdownSearchedItem {
|
|
14
|
+
text: string
|
|
15
|
+
firstText: string
|
|
16
|
+
secondText: string
|
|
17
|
+
thirdText: string
|
|
18
|
+
testId: string
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface UI_I_ComboDropdownSearched {
|
|
22
|
+
text: string
|
|
23
|
+
itemsCount: number
|
|
24
|
+
childs: UI_I_ComboDropdownSearchedItem[]
|
|
25
|
+
testId: string
|
|
26
|
+
}
|
|
@@ -165,7 +165,9 @@ import type { UI_I_Items } from '~/components/atoms/datepicker/lib/models/interf
|
|
|
165
165
|
import {
|
|
166
166
|
getMonthsFunc,
|
|
167
167
|
getWeekdaysFunc,
|
|
168
|
-
|
|
168
|
+
datepickerWidth,
|
|
169
|
+
datepickerHeight,
|
|
170
|
+
} from '~/components/atoms/datepicker/lib/config/datepicker'
|
|
169
171
|
import { getShortMonths } from '~/components/atoms/datepicker/lib/config/allShortMonths'
|
|
170
172
|
|
|
171
173
|
const { $isDate } = useNuxtApp()
|
|
@@ -392,8 +394,15 @@ const showHideCalendar = (): void => {
|
|
|
392
394
|
`.calendar-id-${uniqueId.value}`
|
|
393
395
|
) as HTMLElement
|
|
394
396
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
+
const elementSizes = element.getBoundingClientRect()
|
|
398
|
+
|
|
399
|
+
const isOverTop = elementSizes.y - datepickerWidth + 2 < 0
|
|
400
|
+
// Set content top
|
|
401
|
+
if (!isOverTop) calendarTop.value = elementSizes.y - datepickerWidth + 2
|
|
402
|
+
else calendarTop.value = elementSizes.y + elementSizes.height + 2
|
|
403
|
+
|
|
404
|
+
// Set content left
|
|
405
|
+
calendarLeft.value = elementSizes.x - datepickerHeight / 2
|
|
397
406
|
|
|
398
407
|
isShowCalendar.value = !isShowCalendar.value
|
|
399
408
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type{ UI_I_Localization } from '~/lib/models/interfaces'
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
2
|
|
|
3
3
|
export const getMonthsFunc = (localization: UI_I_Localization): string[] => {
|
|
4
4
|
return [
|
|
@@ -41,3 +41,6 @@ export const getWeekdaysFunc = (
|
|
|
41
41
|
|
|
42
42
|
return result
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
export const datepickerWidth = 314
|
|
46
|
+
export const datepickerHeight = 278
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
71
71
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
72
72
|
import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
|
|
73
|
+
import { checkIsTokenExpired } from '~/lib/utils/token'
|
|
73
74
|
|
|
74
75
|
const props = defineProps<{
|
|
75
76
|
isShowMainMenu: boolean
|
|
@@ -90,6 +91,8 @@ const props = defineProps<{
|
|
|
90
91
|
newViewLocal: boolean
|
|
91
92
|
timeFormat: string
|
|
92
93
|
isDarkTheme: boolean
|
|
94
|
+
isPauseReconnect: boolean
|
|
95
|
+
expireTimeFromState: number
|
|
93
96
|
}>()
|
|
94
97
|
|
|
95
98
|
const emits = defineEmits<{
|
|
@@ -106,7 +109,55 @@ const emits = defineEmits<{
|
|
|
106
109
|
(event: 'update-remote-console', value: string): void
|
|
107
110
|
(event: 'update-vm-clusters', value: boolean): void
|
|
108
111
|
(event: 'submit-preferences'): void
|
|
112
|
+
(event: 'show-redirect-login-modal', value: boolean): void
|
|
113
|
+
(event: 'show-reconnect-modal', value: boolean): void
|
|
109
114
|
}>()
|
|
115
|
+
|
|
116
|
+
const inactivityTimer = ref<NodeJS.Timeout | undefined>(undefined)
|
|
117
|
+
const inactivityTimeout = ref<number>(20 * 60 * 1000)
|
|
118
|
+
|
|
119
|
+
const startInactivityTimer = (): void => {
|
|
120
|
+
inactivityTimer.value = setTimeout(() => {
|
|
121
|
+
// Проверяем если isPauseReconnect истина то не показываем модальное окно переподключения,
|
|
122
|
+
// к примеру если загружаем файл и он загружается дольше чем срабатывает таймаут
|
|
123
|
+
if (props.isPauseReconnect) {
|
|
124
|
+
startInactivityTimer()
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const expireTime =
|
|
129
|
+
props.expireTimeFromState || useLocalStorage('accessTokenExpiredTime')
|
|
130
|
+
|
|
131
|
+
const isExpiredToken = checkIsTokenExpired(expireTime)
|
|
132
|
+
|
|
133
|
+
isExpiredToken && emits('show-redirect-login-modal', true)
|
|
134
|
+
|
|
135
|
+
if (!isExpiredToken) {
|
|
136
|
+
emits('show-reconnect-modal', true)
|
|
137
|
+
startInactivityTimer()
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
console.log('Пользователь бездействует!')
|
|
141
|
+
}, inactivityTimeout.value)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const resetInactivityTimer = (): void => {
|
|
145
|
+
// Сброс таймера бездействия при каждом действии пользователя
|
|
146
|
+
inactivityTimer.value !== null && clearTimeout(inactivityTimer.value)
|
|
147
|
+
startInactivityTimer()
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
onMounted(() => {
|
|
151
|
+
document.addEventListener('mousemove', resetInactivityTimer)
|
|
152
|
+
|
|
153
|
+
startInactivityTimer()
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
onBeforeUnmount(() => {
|
|
157
|
+
document.removeEventListener('mousemove', resetInactivityTimer)
|
|
158
|
+
|
|
159
|
+
inactivityTimer.value !== null && clearTimeout(inactivityTimer.value)
|
|
160
|
+
})
|
|
110
161
|
</script>
|
|
111
162
|
|
|
112
163
|
<style scoped lang="scss"></style>
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
v-if="isShowIntervalModal"
|
|
55
55
|
:selected-periods="props.selectedPeriods"
|
|
56
56
|
:format-date="props.formatDate"
|
|
57
|
+
:current-lang="props.currentLang"
|
|
57
58
|
@hide="onHideIntervalModal"
|
|
58
59
|
@submit="onSubmitIntervalModal"
|
|
59
60
|
/>
|
|
@@ -82,6 +83,7 @@ const props = defineProps<{
|
|
|
82
83
|
selectedPeriods: number[]
|
|
83
84
|
formatDate: string
|
|
84
85
|
project: UI_T_Project
|
|
86
|
+
currentLang: string
|
|
85
87
|
formatTime?: string
|
|
86
88
|
}>()
|
|
87
89
|
|
package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
<div class="section-datepicker">
|
|
41
41
|
<atoms-datepicker
|
|
42
42
|
v-model="dateFrom"
|
|
43
|
-
:lang="currentLang"
|
|
43
|
+
:lang="props.currentLang"
|
|
44
44
|
class="chart-option-setting-row custom-time-input"
|
|
45
45
|
test-id="overview-first-date-datepicker"
|
|
46
46
|
@update="onUpdateDateFrom"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
<div class="section-datepicker">
|
|
77
77
|
<atoms-datepicker
|
|
78
78
|
v-model="dateTo"
|
|
79
|
-
:lang="currentLang"
|
|
79
|
+
:lang="props.currentLang"
|
|
80
80
|
class="chart-option-setting-row custom-time-input"
|
|
81
81
|
test-id="overview-first-date-to-datepicker"
|
|
82
82
|
@update="onUpdateDateTo"
|
|
@@ -112,6 +112,7 @@ import { checkDateFunc } from '~/components/common/monitor/overview/filters/cust
|
|
|
112
112
|
const props = defineProps<{
|
|
113
113
|
formatDate: string
|
|
114
114
|
selectedPeriods: number[]
|
|
115
|
+
currentLang: string
|
|
115
116
|
}>()
|
|
116
117
|
|
|
117
118
|
const emits = defineEmits<{
|
|
@@ -119,12 +120,13 @@ const emits = defineEmits<{
|
|
|
119
120
|
(event: 'submit', value: number[]): void
|
|
120
121
|
}>()
|
|
121
122
|
|
|
122
|
-
const { $
|
|
123
|
-
useNuxtApp()
|
|
123
|
+
const { $formattedDate, $formattedTime, $isDate, $getUnixByDate } = useNuxtApp()
|
|
124
124
|
|
|
125
125
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
126
126
|
|
|
127
|
-
const titleIntervalModal = ref<string>(
|
|
127
|
+
const titleIntervalModal = ref<string>(
|
|
128
|
+
`${localization.value.common.timeRange}:`
|
|
129
|
+
)
|
|
128
130
|
|
|
129
131
|
const selectedItem = ref<string>('')
|
|
130
132
|
|
|
@@ -165,15 +167,6 @@ const getCurrentTime = (): void => {
|
|
|
165
167
|
currentTimeTo.value = $formattedTime(props.selectedPeriods[1], '', true)
|
|
166
168
|
}
|
|
167
169
|
|
|
168
|
-
const timeFormatUpdater = computed<number>(
|
|
169
|
-
() => $store.getters['main/getTimeFormatUpdater']
|
|
170
|
-
)
|
|
171
|
-
const currentLang = ref<string>(useLocalStorage('lang') || 'ru_RU')
|
|
172
|
-
watch(timeFormatUpdater, () => {
|
|
173
|
-
currentLang.value = useLocalStorage('lang') || 'ru_RU'
|
|
174
|
-
getCurrentTime()
|
|
175
|
-
})
|
|
176
|
-
|
|
177
170
|
const onUpdateDateFrom = (val: number): void => {
|
|
178
171
|
if (!val) return
|
|
179
172
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// import type { API_I_Login } from '~/store/modules/auth/lib/models/interfaces'
|
|
2
|
+
//
|
|
3
|
+
// export const setTokensFunc = (data: API_I_Login): void => {
|
|
4
|
+
// const token = data.access_token || ''
|
|
5
|
+
// const expiredTime = data.at_expires || null
|
|
6
|
+
//
|
|
7
|
+
// useLocalStorage('accessTokenExpiredTime', expiredTime)
|
|
8
|
+
//
|
|
9
|
+
// const tokenCookie = useCookie('pnc-ui-token')
|
|
10
|
+
// tokenCookie.value = `Bearer ${token}`
|
|
11
|
+
//
|
|
12
|
+
// const refreshToken = data.refresh_token || ''
|
|
13
|
+
// const refreshTokenCookie = useCookie('pnc-ui-refresh-token')
|
|
14
|
+
// refreshTokenCookie.value = refreshToken
|
|
15
|
+
//
|
|
16
|
+
// const accessTokenExpiredTime = useCookie('token-expired-time')
|
|
17
|
+
// accessTokenExpiredTime.value = '' + expiredTime
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
export const checkIsTokenExpired = (expireTime: number): boolean => {
|
|
21
|
+
const currentTimeMilliseconds = new Date().getTime()
|
|
22
|
+
const expireTimeMilliseconds = expireTime * 1000
|
|
23
|
+
|
|
24
|
+
return expireTimeMilliseconds < currentTimeMilliseconds
|
|
25
|
+
}
|
|
26
|
+
// export const clearToken = (): void => {
|
|
27
|
+
// const tokenCookie = useCookie('pnc-ui-token')
|
|
28
|
+
// const refreshTokenCookie = useCookie('pnc-ui-refresh-token')
|
|
29
|
+
// const expiredTime = useCookie('token-expired-time')
|
|
30
|
+
//
|
|
31
|
+
// tokenCookie.value = ''
|
|
32
|
+
// refreshTokenCookie.value = ''
|
|
33
|
+
// expiredTime.value = ''
|
|
34
|
+
// }
|