bfg-common 1.5.917 → 1.5.919
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 +3 -2
- package/assets/localization/local_en.json +2 -1
- package/assets/localization/local_hy.json +3 -2
- package/assets/localization/local_kk.json +3 -2
- package/assets/localization/local_ru.json +3 -2
- package/assets/localization/local_zh.json +4 -3
- package/components/common/pages/backups/modals/createBackup/general/General.vue +1 -0
- package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +59 -9
- package/components/common/pages/backups/modals/restore/New.vue +4 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/new/lib/config/table.ts +1 -0
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +1 -1
- package/components/common/pages/backups/modals/restore/name/NameNew.vue +3 -0
- package/components/common/pages/backups/modals/restore/networks/table/new/Table.vue +7 -0
- package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +34 -50
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/New.vue +141 -4
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/lib/config/historyRunsTable.ts +161 -0
- package/components/common/pages/scheduledTasks/table/new/New.vue +136 -147
- package/components/common/pages/scheduledTasks/table/new/lib/config/scheduledTasksTable.ts +18 -18
- package/components/common/pages/scheduledTasks/table/new/lib/models/enums.ts +3 -3
- package/package.json +1 -1
|
@@ -2221,6 +2221,7 @@
|
|
|
2221
2221
|
"sambaHelpDesc": "Samba Storage выкарыстоўвае пратакол SMBCIFS, забяспечвае доступ да платформы, гнуткія правы і інтэграцыю з Active Directory.",
|
|
2222
2222
|
"deviceType": "Тып прылады",
|
|
2223
2223
|
"selectDisksInvolvedBackup": "Выберыце дыскі, якія ўдзельнічаюць у рэзервовым капіраванні.",
|
|
2224
|
+
"selectDisksInvolvedBackupNotRequired": "Выберыце рэзервовыя дыскі для капіявання. Вы можаце прапусціць гэты крок, калі капіраванне не патрабуецца.",
|
|
2224
2225
|
"dateTime": "Дата Час",
|
|
2225
2226
|
"eventTypeDescription": "Апісанне тыпу падзеі",
|
|
2226
2227
|
"possibleCauses": "Магчымыя прычыны",
|
|
@@ -3725,10 +3726,10 @@
|
|
|
3725
3726
|
"createBackupCommonSubtitle": "Укажыце ўнікальную назву і апісанне для рэзервовай копіі.",
|
|
3726
3727
|
"virtualMachineName": "Імя віртуальнай машыны",
|
|
3727
3728
|
"restoreBackupSelectNameSubtitle": "Укажыце ўнікальную назву для віртуальнай машыны.",
|
|
3728
|
-
"nameValidationDescription": "
|
|
3729
|
+
"nameValidationDescription": "Імя павінна ўтрымліваць лацінскія літары і лічбы, '-', '_', '.' і павінна ўтрымліваць ад 5 да 64 сімвалаў. Калі вы прапусціце гэты крок, сістэма згенеруе імя аўтаматычна.",
|
|
3729
3730
|
"vmNameExistInSelectedLocation": "Віртуальная машына або шаблон з такой назвай ужо існуе. Увядзіце іншую назву.",
|
|
3730
3731
|
"noNetworksAvailable": "Няма даступных сетак",
|
|
3731
|
-
"restoreBackupSelectNetworkSubtitle": "Выберыце тыпы адаптараў і сеткі ў Procurator",
|
|
3732
|
+
"restoreBackupSelectNetworkSubtitle": "Выберыце тыпы адаптараў і сеткі ў Procurator.",
|
|
3732
3733
|
"restoreVirtualMachine": "Аднавіць віртуальную машыну"
|
|
3733
3734
|
},
|
|
3734
3735
|
"ssoUsers": {
|
|
@@ -2224,6 +2224,7 @@
|
|
|
2224
2224
|
"sambaHelpDesc": "Samba storage uses the SMBCIFS protocol, provides cross -platform access, flexible rights and integration with Active Directory.",
|
|
2225
2225
|
"deviceType": "Device type",
|
|
2226
2226
|
"selectDisksInvolvedBackup": "Select disks involved in the backup.",
|
|
2227
|
+
"selectDisksInvolvedBackupNotRequired": "Select backup disks for copy. You can skip this step if copying is not required.",
|
|
2227
2228
|
"dateTime": "Date Time",
|
|
2228
2229
|
"eventTypeDescription": "Event Type Description",
|
|
2229
2230
|
"possibleCauses": "Possible Causes",
|
|
@@ -3729,7 +3730,7 @@
|
|
|
3729
3730
|
"createBackupCommonSubtitle": "Specify a unique name and a description for the backup.",
|
|
3730
3731
|
"virtualMachineName": "Virtual Machine Name",
|
|
3731
3732
|
"restoreBackupSelectNameSubtitle": "Specify a unique name for the virtual machine.",
|
|
3732
|
-
"nameValidationDescription": "The name must contain Latin letters and numbers, '-', '_', '.' and it must contain from 5 to 64 characters.",
|
|
3733
|
+
"nameValidationDescription": "The name must contain Latin letters and numbers, '-', '_', '.' and it must contain from 5 to 64 characters. If you skip this step, the system will generate the name automatically.",
|
|
3733
3734
|
"vmNameExistInSelectedLocation": "A virtual machine or template with the same name exists. Enter a different name.",
|
|
3734
3735
|
"noNetworksAvailable": "No networks available",
|
|
3735
3736
|
"restoreBackupSelectNetworkSubtitle": "Select adapter types and networks in Procurator.",
|
|
@@ -2224,6 +2224,7 @@
|
|
|
2224
2224
|
"sambaHelpDesc": "SAMBA- ի պահեստը օգտագործում է SMBCIF- ի արձանագրությունը, ապահովում է խաչմերուկի հասանելիություն, ճկուն իրավունքներ եւ ինտեգրում Active Directory:",
|
|
2225
2225
|
"deviceType": "Սարքի տեսակը",
|
|
2226
2226
|
"selectDisksInvolvedBackup": "Ընտրեք կրկնօրինակում ներգրավված սկավառակները:",
|
|
2227
|
+
"selectDisksInvolvedBackupNotRequired": "Ընտրեք պահուստային սկավառակներ պատճենման համար: Կարող եք բաց թողնել այս քայլը, եթե պատճենահանում անհրաժեշտ չէ:",
|
|
2227
2228
|
"dateTime": "Ամսաթիվ Ժամ",
|
|
2228
2229
|
"eventTypeDescription": "Միջոցառման տեսակի նկարագրություն",
|
|
2229
2230
|
"possibleCauses": "Հնարավոր պատճառներ",
|
|
@@ -3729,10 +3730,10 @@
|
|
|
3729
3730
|
"createBackupCommonSubtitle": "Նշեք պահուստային պատճենի եզակի անունը և նկարագրությունը:",
|
|
3730
3731
|
"virtualMachineName": "Վիրտուալ մեքենայի անվանումը",
|
|
3731
3732
|
"restoreBackupSelectNameSubtitle": "Նշեք վիրտուալ մեքենայի եզակի անունը:",
|
|
3732
|
-
"nameValidationDescription": "Անունը պետք է պարունակի
|
|
3733
|
+
"nameValidationDescription": "Անունը պետք է պարունակի լատինական տառեր և թվեր՝ '-', '_', '.' և պետք է պարունակի 5-ից 64 նիշ։ Եթե բաց թողնեք այս քայլը, համակարգը ավտոմատ կերպով կգեներացնի անունը։",
|
|
3733
3734
|
"vmNameExistInSelectedLocation": "Նույն անունով վիրտուալ մեքենա կամ ձևանմուշ արդեն գոյություն ունի։ Մուտքագրեք այլ անուն։",
|
|
3734
3735
|
"noNetworksAvailable": "Հասանելի ցանցեր չկան",
|
|
3735
|
-
"restoreBackupSelectNetworkSubtitle": "Ընտրեք ադապտերների տեսակները և ցանցերը Procurator
|
|
3736
|
+
"restoreBackupSelectNetworkSubtitle": "Ընտրեք ադապտերների տեսակները և ցանցերը Procurator-ում:",
|
|
3736
3737
|
"restoreVirtualMachine": "Վերականգնել վիրտուալ մեքենան"
|
|
3737
3738
|
},
|
|
3738
3739
|
"ssoUsers": {
|
|
@@ -2223,6 +2223,7 @@
|
|
|
2223
2223
|
"sambaHelpDesc": "Samba сақтау SMBCIFS протоколын пайдаланады, кросс-платформаларға, икемді құқықтар мен интеграцияны белсенді каталогпен қамтамасыз етеді.",
|
|
2224
2224
|
"deviceType": "Құрылғы түрі",
|
|
2225
2225
|
"selectDisksInvolvedBackup": "Сақтық көшірмеге қатысатын дискілерді таңдаңыз.",
|
|
2226
|
+
"selectDisksInvolvedBackupNotRequired": "Көшіру үшін сақтық көшірме дискілерін таңдаңыз. Көшіру қажет болмаса, бұл қадамды өткізіп жіберуге болады.",
|
|
2226
2227
|
"dateTime": "Күні/Уақыты",
|
|
2227
2228
|
"eventTypeDescription": "Оқиға түрі сипаттамасы",
|
|
2228
2229
|
"possibleCauses": "Ықтимал себептері",
|
|
@@ -3728,10 +3729,10 @@
|
|
|
3728
3729
|
"createBackupCommonSubtitle": "Сақтық көшірме үшін бірегей атау мен сипаттаманы көрсетіңіз.",
|
|
3729
3730
|
"virtualMachineName": "Виртуалды машинаның атауы",
|
|
3730
3731
|
"restoreBackupSelectNameSubtitle": "Виртуалды машина үшін бірегей атауды көрсетіңіз.",
|
|
3731
|
-
"nameValidationDescription": "
|
|
3732
|
+
"nameValidationDescription": "Атауда латын әріптері мен сандары болуы керек, '-', '_', '.' және ол 5-тен 64 таңбаға дейін болуы керек. Бұл қадамды өткізіп жіберсеңіз, жүйе атауды автоматты түрде жасайды.",
|
|
3732
3733
|
"vmNameExistInSelectedLocation": "Осындай атауы бар виртуалды машина немесе үлгі бар. Басқа атау енгізіңіз.",
|
|
3733
3734
|
"noNetworksAvailable": "Қолжетімді желілер жоқ",
|
|
3734
|
-
"restoreBackupSelectNetworkSubtitle": "Procurator ішінде адаптер түрлері мен желілерді
|
|
3735
|
+
"restoreBackupSelectNetworkSubtitle": "Procurator ішінде адаптер түрлері мен желілерді таңдаңыз.",
|
|
3735
3736
|
"restoreVirtualMachine": "Виртуалды машинаны қалпына келтіру"
|
|
3736
3737
|
},
|
|
3737
3738
|
"ssoUsers": {
|
|
@@ -2223,6 +2223,7 @@
|
|
|
2223
2223
|
"sambaHelpDesc": "Хранилище Samba, использует протокол SMB/CIFS, обеспечивает кроссплатформенный доступ, гибкую настройку прав и интеграцию с Active Directory.",
|
|
2224
2224
|
"deviceType": "Тип устройства",
|
|
2225
2225
|
"selectDisksInvolvedBackup": "Выберите диски учавствующие в резервной копии.",
|
|
2226
|
+
"selectDisksInvolvedBackupNotRequired": "Выберите диски для резервного копирования. Этот шаг можно пропустить, если копирование не требуется.",
|
|
2226
2227
|
"dateTime": "Дата Время",
|
|
2227
2228
|
"eventTypeDescription": "Описание события",
|
|
2228
2229
|
"possibleCauses": "Возможные причины",
|
|
@@ -3728,10 +3729,10 @@
|
|
|
3728
3729
|
"createBackupCommonSubtitle": "Укажите уникальное имя и описание для резервной копии.",
|
|
3729
3730
|
"virtualMachineName": "Имя виртуальной машины",
|
|
3730
3731
|
"restoreBackupSelectNameSubtitle": "Укажите уникальное имя для виртуальной машины.",
|
|
3731
|
-
"nameValidationDescription": "Имя должно содержать латинские буквы и цифры, символы
|
|
3732
|
+
"nameValidationDescription": "Имя должно содержать латинские буквы и цифры, символы '-', '_', '.' и состоять из 5–64 символов. Если вы пропустите этот шаг, система сгенерирует имя автоматически.",
|
|
3732
3733
|
"vmNameExistInSelectedLocation": "Виртуальная машина или шаблон с таким именем уже существует. Введите другое имя.",
|
|
3733
3734
|
"noNetworksAvailable": "Нет доступных сетей",
|
|
3734
|
-
"restoreBackupSelectNetworkSubtitle": "Выберите типы адаптеров и сети в Procurator",
|
|
3735
|
+
"restoreBackupSelectNetworkSubtitle": "Выберите типы адаптеров и сети в Procurator.",
|
|
3735
3736
|
"restoreVirtualMachine": "Восстановить виртуальную машину"
|
|
3736
3737
|
},
|
|
3737
3738
|
"ssoUsers": {
|
|
@@ -2221,7 +2221,8 @@
|
|
|
2221
2221
|
"sambaDesc": "通过网络共享Samba共享的Samba数据存储。",
|
|
2222
2222
|
"sambaHelpDesc": "Samba Storage使用SMBCIFS协议,提供跨平台访问,灵活的权利以及与Active Directory的集成。",
|
|
2223
2223
|
"deviceType": "设备类型",
|
|
2224
|
-
"selectDisksInvolvedBackup": "
|
|
2224
|
+
"selectDisksInvolvedBackup": "选择备份涉及的磁盘。",
|
|
2225
|
+
"selectDisksInvolvedBackupNotRequired": "选择要复制的备份磁盘。如果不需要复制,可以跳过此步骤。",
|
|
2225
2226
|
"dateTime": "日期/时间",
|
|
2226
2227
|
"eventTypeDescription": "事件类型描述",
|
|
2227
2228
|
"possibleCauses": "可能的原因",
|
|
@@ -3726,10 +3727,10 @@
|
|
|
3726
3727
|
"createBackupCommonSubtitle": "为备份指定唯一的名称和描述。",
|
|
3727
3728
|
"virtualMachineName": "虚拟机名称",
|
|
3728
3729
|
"restoreBackupSelectNameSubtitle": "为虚拟机指定唯一名称。",
|
|
3729
|
-
"nameValidationDescription": "
|
|
3730
|
+
"nameValidationDescription": "名称必须包含拉丁字母、数字、连字符“-”、“_”和句点“.”,且长度必须在 5 到 64 个字符之间。如果跳过此步骤,系统将自动生成名称。",
|
|
3730
3731
|
"vmNameExistInSelectedLocation": "已存在具有相同名称的虚拟机或模板。请输入其他名称。",
|
|
3731
3732
|
"noNetworksAvailable": "没有可用的网络",
|
|
3732
|
-
"restoreBackupSelectNetworkSubtitle": "请在 Procurator
|
|
3733
|
+
"restoreBackupSelectNetworkSubtitle": "请在 Procurator 中选择适配器类型和网络。",
|
|
3733
3734
|
"restoreVirtualMachine": "恢复虚拟机"
|
|
3734
3735
|
},
|
|
3735
3736
|
"ssoUsers": {
|
|
@@ -9,15 +9,37 @@
|
|
|
9
9
|
/>
|
|
10
10
|
|
|
11
11
|
<form @submit.prevent>
|
|
12
|
-
<div class="field flex pt-4">
|
|
13
|
-
<label for="general-name">
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
<div class="field clr-form-control flex flex-row pt-4 mt-0">
|
|
13
|
+
<label for="general-name">
|
|
14
|
+
{{ localization.common.name }}
|
|
15
|
+
</label>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
:class="[
|
|
19
|
+
'clr-control-container',
|
|
20
|
+
nameErrorText &&
|
|
21
|
+
'clr-error',
|
|
22
|
+
]"
|
|
23
|
+
>
|
|
24
|
+
<div class="flex-align-center w-full">
|
|
25
|
+
<input
|
|
26
|
+
id="general-name"
|
|
27
|
+
v-model.trim="model.name"
|
|
28
|
+
data-id="general-name-input"
|
|
29
|
+
type="text"
|
|
30
|
+
class="clr-input w-full"
|
|
31
|
+
/>
|
|
32
|
+
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
v-if="nameErrorText"
|
|
36
|
+
class="clr-subtext ng-star-inserted"
|
|
37
|
+
>
|
|
38
|
+
{{ nameErrorText }}
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
20
41
|
</div>
|
|
42
|
+
|
|
21
43
|
<div class="field flex pt-4">
|
|
22
44
|
<label for="general-description"
|
|
23
45
|
>{{ localization.common.description }} ({{
|
|
@@ -35,6 +57,8 @@
|
|
|
35
57
|
</template>
|
|
36
58
|
|
|
37
59
|
<script lang="ts" setup>
|
|
60
|
+
import type {UI_I_ArbitraryObject} from "~/node_modules/bfg-uikit/models/interfaces";
|
|
61
|
+
import type {UI_I_ErrorFields} from "~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces";
|
|
38
62
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
39
63
|
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
40
64
|
import { dynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
|
|
@@ -44,6 +68,7 @@ const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
|
44
68
|
const props = defineProps<{
|
|
45
69
|
show: boolean
|
|
46
70
|
alertMessages: string[]
|
|
71
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
47
72
|
}>()
|
|
48
73
|
const emits = defineEmits<{
|
|
49
74
|
(event: 'remove-validation-errors', value: number): void
|
|
@@ -51,6 +76,8 @@ const emits = defineEmits<{
|
|
|
51
76
|
|
|
52
77
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
78
|
|
|
79
|
+
const nameErrorText = computed<string>(() => props.messagesFields?.name?.field || '')
|
|
80
|
+
|
|
54
81
|
watch(
|
|
55
82
|
() => props.show,
|
|
56
83
|
(newValue) => {
|
|
@@ -75,9 +102,32 @@ const onRemoveErrors = (): void => {
|
|
|
75
102
|
label {
|
|
76
103
|
width: 216px;
|
|
77
104
|
}
|
|
78
|
-
input,
|
|
79
105
|
textarea {
|
|
80
106
|
width: 345px;
|
|
81
107
|
}
|
|
82
108
|
}
|
|
109
|
+
.clr-form-control {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: row;
|
|
112
|
+
|
|
113
|
+
.clr-control-container {
|
|
114
|
+
min-height: 48px;
|
|
115
|
+
width: 345px;
|
|
116
|
+
&.clr-error {
|
|
117
|
+
.clr-subtext,
|
|
118
|
+
.error-icon {
|
|
119
|
+
display: block;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
.clr-subtext,
|
|
123
|
+
.error-icon {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
.error-icon {
|
|
127
|
+
fill: #db2100;
|
|
128
|
+
width: 24px;
|
|
129
|
+
height: 24px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
83
133
|
</style>
|
|
@@ -75,7 +75,7 @@ export const stepsFunc = (
|
|
|
75
75
|
id: dynamicSteps.selectDisksForCopy,
|
|
76
76
|
stepName: '',
|
|
77
77
|
title: localization.common.selectDisksForCopy,
|
|
78
|
-
subTitle: localization.common.
|
|
78
|
+
subTitle: localization.common.selectDisksInvolvedBackupNotRequired,
|
|
79
79
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
80
80
|
isValid: true,
|
|
81
81
|
fields: {
|
|
@@ -236,6 +236,13 @@ const findNetwork = (net_bridge: string): any => {
|
|
|
236
236
|
min-height: auto;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
:deep(.data-table-header.sm th) {
|
|
240
|
+
min-width: max-content !important;
|
|
241
|
+
}
|
|
242
|
+
:deep(tr:last-child td:last-child) {
|
|
243
|
+
max-width: 220px;
|
|
244
|
+
}
|
|
245
|
+
|
|
239
246
|
:deep(.title-container-top-info h6.title-container-top-selected-rows) {
|
|
240
247
|
font-size: 12px;
|
|
241
248
|
}
|
|
@@ -6,48 +6,45 @@
|
|
|
6
6
|
class="expand-details__row"
|
|
7
7
|
:class="item.lastChild && 'history-run'"
|
|
8
8
|
>
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
:class="['expand-details__value', { disabled: item.disabled }]"
|
|
13
|
-
>
|
|
14
|
-
<ui-icon
|
|
15
|
-
v-if="item.iconClassName"
|
|
16
|
-
:name="item.iconClassName"
|
|
17
|
-
width="18"
|
|
18
|
-
height="18"
|
|
19
|
-
class="mr-1"
|
|
20
|
-
/>
|
|
21
|
-
{{ item.value }}
|
|
22
|
-
</span>
|
|
9
|
+
<!-- Обычные строки -->
|
|
10
|
+
<template v-if="!item.lastChild">
|
|
11
|
+
<span class="expand-details__label"> {{ item.text }}: </span>
|
|
23
12
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
<span :class="['expand-details__value', { disabled: item.disabled }]">
|
|
14
|
+
<ui-icon
|
|
15
|
+
v-if="item.iconClassName"
|
|
16
|
+
:name="item.iconClassName"
|
|
17
|
+
width="18"
|
|
18
|
+
height="18"
|
|
19
|
+
class="mr-1"
|
|
20
|
+
/>
|
|
21
|
+
{{ item.value }}
|
|
22
|
+
</span>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<!-- History -->
|
|
26
|
+
<template v-else>
|
|
27
|
+
<div class="expand-details__label">
|
|
28
|
+
{{ item.text }}
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div class="expand-details__value">
|
|
32
|
+
<common-pages-scheduled-tasks-table-expand-details-history-run
|
|
33
|
+
v-else
|
|
34
|
+
:history-run-data="item.value"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
28
38
|
</div>
|
|
29
39
|
</div>
|
|
30
40
|
</template>
|
|
31
41
|
|
|
32
42
|
<script lang="ts" setup>
|
|
33
43
|
import type { UI_I_DataTableBodyData } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
34
|
-
import type { UI_I_Localization } from '~/node_modules/bfg-common/lib/models/interfaces'
|
|
35
44
|
|
|
36
45
|
const props = defineProps<{
|
|
37
46
|
expandData: UI_I_DataTableBodyData[]
|
|
38
47
|
}>()
|
|
39
|
-
|
|
40
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
41
|
-
|
|
42
|
-
const eventPossibleCauses = computed<string>(() => {
|
|
43
|
-
const { expandData } = props.expandData[0].data
|
|
44
|
-
return expandData?.message
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
const eventUser = computed<string>(() => {
|
|
48
|
-
const { expandData } = props.expandData[0].data
|
|
49
|
-
return expandData?.user_name
|
|
50
|
-
})
|
|
51
48
|
</script>
|
|
52
49
|
|
|
53
50
|
<style lang="scss" scoped>
|
|
@@ -72,37 +69,24 @@ const eventUser = computed<string>(() => {
|
|
|
72
69
|
@extend %properties;
|
|
73
70
|
color: #9da6ad;
|
|
74
71
|
text-transform: capitalize;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
.history-run & {
|
|
73
|
+
color: var(--title-form-first-color);
|
|
74
|
+
grid-column: 1 / -1; /* 🔥 ВАЖНО */
|
|
75
|
+
margin-top: 12px;
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
&__value {
|
|
81
79
|
@extend %properties;
|
|
82
80
|
color: var(--title-form-first-color);
|
|
83
|
-
&.target-link {
|
|
84
|
-
color: var(--bottom-pannel-rtask-link-text);
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
&:hover {
|
|
87
|
-
color: var(--bottom-pannel-rtask-link-hover-text);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
81
|
&.disabled {
|
|
91
82
|
color: var(--table-disabled-btn);
|
|
92
83
|
}
|
|
93
|
-
|
|
94
84
|
.icon {
|
|
95
85
|
margin-right: 4px;
|
|
96
86
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@include flex($align: center);
|
|
100
|
-
.ui-chip {
|
|
101
|
-
width: max-content;
|
|
87
|
+
.history-run & {
|
|
88
|
+
grid-column: 1 / -1; /* 🔥 ВАЖНО */
|
|
102
89
|
}
|
|
103
90
|
}
|
|
104
|
-
&__tooltip {
|
|
105
|
-
margin-left: 6px;
|
|
106
|
-
}
|
|
107
91
|
}
|
|
108
92
|
</style>
|
|
@@ -1,10 +1,147 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<ui-data-table
|
|
3
|
+
:data="data"
|
|
4
|
+
:options="options"
|
|
5
|
+
:loading="props.isLoading"
|
|
6
|
+
:total-pages="props.totalPages"
|
|
7
|
+
:total-items="props.totalItems"
|
|
8
|
+
:texts="texts"
|
|
9
|
+
:skeleton="skeletonData"
|
|
10
|
+
test-id="task-table"
|
|
11
|
+
@sort="onSorting"
|
|
12
|
+
@pagination="onPagination"
|
|
13
|
+
@column-filter="onColumnFilter"
|
|
14
|
+
>
|
|
15
|
+
<template #status="{ item }">
|
|
16
|
+
<ui-chip :test-id="item.data.testId" :color="item.data.chipColor" rounded>
|
|
17
|
+
<ui-icon
|
|
18
|
+
:name="item.data.icon"
|
|
19
|
+
width="14px"
|
|
20
|
+
height="14px"
|
|
21
|
+
class="chip-icon"
|
|
22
|
+
></ui-icon>
|
|
23
|
+
{{ item.text }}
|
|
24
|
+
</ui-chip>
|
|
25
|
+
|
|
26
|
+
<common-tooltip-help
|
|
27
|
+
v-if="item.data.chipColor === 'red'"
|
|
28
|
+
:title="localization.common.failureReason"
|
|
29
|
+
:help-text="'Lorem Ipsum'"
|
|
30
|
+
:test-id="`${item.data.testId}`"
|
|
31
|
+
:help-id="`${item.data.testId}-tooltip`"
|
|
32
|
+
status="error"
|
|
33
|
+
dropdown-width="320px"
|
|
34
|
+
dropdown-left
|
|
35
|
+
dropdown-top
|
|
36
|
+
class="ml-2"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
</ui-data-table>
|
|
3
40
|
</template>
|
|
4
41
|
|
|
5
|
-
<script lang="ts"
|
|
6
|
-
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { useDebounceFn } from '@vueuse/core'
|
|
44
|
+
import type {
|
|
45
|
+
UI_I_DataTable,
|
|
46
|
+
UI_I_DataTableHeader,
|
|
47
|
+
UI_I_DataTableBody,
|
|
48
|
+
UI_I_DataTableSkeleton,
|
|
49
|
+
UI_I_Pagination,
|
|
50
|
+
UI_I_TableTexts,
|
|
51
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
52
|
+
import type { UI_T_ArbitraryObject } from '~/node_modules/bfg-uikit/models/types'
|
|
53
|
+
import type { UI_I_TableTarget } from '~/lib/models/table/interfaces'
|
|
54
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
55
|
+
import type { UI_I_ScheduledTasks } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
56
|
+
import {
|
|
57
|
+
options,
|
|
58
|
+
getHeaderDataFunc,
|
|
59
|
+
getBodyDataFunc,
|
|
60
|
+
} from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/lib/config/historyRunsTable'
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
const props = defineProps<{
|
|
64
|
+
tableItems: UI_I_ScheduledTasks['items']
|
|
65
|
+
totalItems: number
|
|
66
|
+
totalPages: number
|
|
67
|
+
isLoading: boolean
|
|
68
|
+
}>()
|
|
69
|
+
const emits = defineEmits<{
|
|
70
|
+
(event: 'sort', value: string): void
|
|
71
|
+
(event: 'pagination', value: UI_I_Pagination): void
|
|
72
|
+
(event: 'col-search', value: string): void
|
|
73
|
+
(event: 'select-node', value: UI_I_TableTarget<'sphere'>): void
|
|
74
|
+
}>()
|
|
75
|
+
|
|
76
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
77
|
+
|
|
78
|
+
const texts = computed<UI_I_TableTexts>(() => ({
|
|
79
|
+
searchHere: localization.value.common.searchHere,
|
|
80
|
+
rowsPerPage: localization.value.common.rowsPerPage,
|
|
81
|
+
of: localization.value.common.of,
|
|
82
|
+
selected: localization.value.common.selected,
|
|
83
|
+
columns: localization.value.common.columns,
|
|
84
|
+
previous: localization.value.common.previous,
|
|
85
|
+
next: localization.value.common.next,
|
|
86
|
+
noItemsFound: localization.value.common.noItemsFound,
|
|
87
|
+
exportAll: localization.value.common.exportAll,
|
|
88
|
+
exportSelected: localization.value.common.exportSelected,
|
|
89
|
+
all: localization.value.common.all,
|
|
90
|
+
filter: localization.value.common.filter,
|
|
91
|
+
}))
|
|
92
|
+
const skeletonData = ref<UI_I_DataTableSkeleton>({
|
|
93
|
+
columnsCount: 6,
|
|
94
|
+
headColumns: [],
|
|
95
|
+
bodyColumns: [],
|
|
96
|
+
})
|
|
7
97
|
|
|
8
|
-
|
|
98
|
+
const data = computed<UI_I_DataTable>(() => ({
|
|
99
|
+
id: 'scheduled-tasks-history-table',
|
|
100
|
+
header: taskHeadItems.value,
|
|
101
|
+
body: taskBodyItems.value,
|
|
102
|
+
}))
|
|
103
|
+
|
|
104
|
+
const taskHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
105
|
+
getHeaderDataFunc(localization.value)
|
|
106
|
+
)
|
|
107
|
+
const taskBodyItems = computed<UI_I_DataTableBody[]>(() => {
|
|
108
|
+
return getBodyDataFunc(props.tableItems || [], localization.value)
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
const onSorting = (value: string): void => {
|
|
112
|
+
emits('sort', value)
|
|
113
|
+
}
|
|
114
|
+
const onPagination = (value: UI_I_Pagination): void => {
|
|
115
|
+
emits('pagination', value)
|
|
116
|
+
}
|
|
117
|
+
const sendFilter = useDebounceFn((searchText: string) => {
|
|
118
|
+
emits('col-search', searchText)
|
|
119
|
+
}, 1000)
|
|
120
|
+
const onColumnFilter = (obj: UI_T_ArbitraryObject<string>): void => {
|
|
121
|
+
let searchText = ''
|
|
122
|
+
|
|
123
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
124
|
+
const currentFilter = searchText
|
|
125
|
+
? ',' + key + '.' + value
|
|
126
|
+
: key + '.' + value
|
|
127
|
+
|
|
128
|
+
searchText = searchText + (value ? currentFilter : '')
|
|
129
|
+
}
|
|
130
|
+
sendFilter(searchText)
|
|
131
|
+
}
|
|
132
|
+
</script>
|
|
9
133
|
|
|
134
|
+
<style scoped lang="scss">
|
|
135
|
+
.task-table {
|
|
136
|
+
height: inherit;
|
|
137
|
+
.chip-icon {
|
|
138
|
+
min-width: 14px;
|
|
139
|
+
}
|
|
140
|
+
.icon {
|
|
141
|
+
margin-right: 4px;
|
|
142
|
+
}
|
|
143
|
+
&__tooltip {
|
|
144
|
+
margin-left: 8px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
10
147
|
</style>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_DataTableBody,
|
|
3
|
+
UI_I_DataTableHeader,
|
|
4
|
+
UI_I_DataTableOptions,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import type { UI_I_ScheduledTasks } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
8
|
+
import { UI_E_SchedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/models/enums'
|
|
9
|
+
import {
|
|
10
|
+
UI_E_SchedulerStatus,
|
|
11
|
+
UI_E_SchedulerChipColor,
|
|
12
|
+
UI_E_SchedulerChipIcon,
|
|
13
|
+
} from '~/components/common/pages/scheduledTasks/table/new/lib/models/enums'
|
|
14
|
+
|
|
15
|
+
// Маппинг для статусов
|
|
16
|
+
const STATUS_MAPPING = {
|
|
17
|
+
[UI_E_SchedulerStatus.Completed]: {
|
|
18
|
+
textKey: 'completed',
|
|
19
|
+
icon: UI_E_SchedulerChipIcon.StatusCheck,
|
|
20
|
+
chipColor: UI_E_SchedulerChipColor.Green,
|
|
21
|
+
},
|
|
22
|
+
[UI_E_SchedulerStatus.Running]: {
|
|
23
|
+
textKey: 'running',
|
|
24
|
+
icon: UI_E_SchedulerChipIcon.StatusCheck,
|
|
25
|
+
chipColor: UI_E_SchedulerChipColor.Green,
|
|
26
|
+
},
|
|
27
|
+
[UI_E_SchedulerStatus.Failed]: {
|
|
28
|
+
textKey: 'failed',
|
|
29
|
+
icon: UI_E_SchedulerChipIcon.Information,
|
|
30
|
+
chipColor: UI_E_SchedulerChipColor.Red,
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const getHeaderDataFunc = (
|
|
35
|
+
localization: UI_I_Localization
|
|
36
|
+
): UI_I_DataTableHeader[] => [
|
|
37
|
+
{
|
|
38
|
+
col: 'col0',
|
|
39
|
+
colName: 'start',
|
|
40
|
+
text: localization.common.startTime,
|
|
41
|
+
isSortable: true,
|
|
42
|
+
sort: 'asc',
|
|
43
|
+
width: '240px',
|
|
44
|
+
show: true,
|
|
45
|
+
filter: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
col: 'col1',
|
|
49
|
+
colName: 'duration',
|
|
50
|
+
text: localization.scheduledTasks.duration,
|
|
51
|
+
isSortable: true,
|
|
52
|
+
sort: 'asc',
|
|
53
|
+
width: '180px',
|
|
54
|
+
show: true,
|
|
55
|
+
filter: true,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
col: 'col2',
|
|
59
|
+
colName: 'end',
|
|
60
|
+
text: localization.scheduledTasks.endTime,
|
|
61
|
+
isSortable: true,
|
|
62
|
+
sort: 'asc',
|
|
63
|
+
width: '180px',
|
|
64
|
+
show: true,
|
|
65
|
+
filter: true,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
col: 'col3',
|
|
69
|
+
colName: 'result',
|
|
70
|
+
text: localization.scheduledTasks.result,
|
|
71
|
+
isSortable: true,
|
|
72
|
+
sort: 'asc',
|
|
73
|
+
width: '110px',
|
|
74
|
+
show: true,
|
|
75
|
+
filter: true,
|
|
76
|
+
},
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
export const options: UI_I_DataTableOptions = {
|
|
80
|
+
perPageOptions: [
|
|
81
|
+
{ text: '10', value: 10 },
|
|
82
|
+
{ text: '25', value: 25 },
|
|
83
|
+
{ text: '50', value: 50 },
|
|
84
|
+
{ text: '100', value: 100, default: true },
|
|
85
|
+
],
|
|
86
|
+
isSelectable: false,
|
|
87
|
+
isFocusable: false,
|
|
88
|
+
showPagination: false,
|
|
89
|
+
showPaginationOnTop: false,
|
|
90
|
+
showPageInfo: false,
|
|
91
|
+
isSortable: true,
|
|
92
|
+
server: false,
|
|
93
|
+
isResizable: true,
|
|
94
|
+
showSearch: false,
|
|
95
|
+
showSelectedRows: false,
|
|
96
|
+
showColumnManager: false,
|
|
97
|
+
withActions: false,
|
|
98
|
+
inBlock: true,
|
|
99
|
+
showExport: false,
|
|
100
|
+
withCollapse: false,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const getBodyDataFunc = (
|
|
104
|
+
bodyData: UI_I_ScheduledTasks['items'][number]['last_5_run'],
|
|
105
|
+
localization: UI_I_Localization
|
|
106
|
+
): UI_I_DataTableBody[] => {
|
|
107
|
+
const { $formattedDatetime }: any = useNuxtApp()
|
|
108
|
+
return bodyData.map((schedulerHistory, index: number) => {
|
|
109
|
+
const startTime = schedulerHistory.start
|
|
110
|
+
const formattedStartTime = $formattedDatetime(+startTime * 1000, {
|
|
111
|
+
hasSeconds: true,
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
const endTime = schedulerHistory.end
|
|
115
|
+
const formattedEndTime =
|
|
116
|
+
endTime && $formattedDatetime(+endTime * 1000, { hasSeconds: true })
|
|
117
|
+
|
|
118
|
+
const statusKey =
|
|
119
|
+
schedulerHistory?.result.toLowerCase() === UI_E_SchedulerRunStatus.SUCCESS
|
|
120
|
+
? UI_E_SchedulerStatus.Completed
|
|
121
|
+
: schedulerHistory?.result === UI_E_SchedulerRunStatus.RUNNING
|
|
122
|
+
? UI_E_SchedulerStatus.Running
|
|
123
|
+
: UI_E_SchedulerStatus.Failed
|
|
124
|
+
const statusData = {
|
|
125
|
+
...STATUS_MAPPING[statusKey],
|
|
126
|
+
testId: `${schedulerHistory.tid}-${index}-status`,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
row: schedulerHistory.tid,
|
|
131
|
+
collapse: false,
|
|
132
|
+
isHiddenCollapse: false,
|
|
133
|
+
collapseToggle: false,
|
|
134
|
+
data: [
|
|
135
|
+
{
|
|
136
|
+
col: 'col0',
|
|
137
|
+
text: formattedStartTime,
|
|
138
|
+
testId: `table-item-${schedulerHistory.tid}`,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
col: 'col1',
|
|
142
|
+
text: 'schedulerHistory.sched_type' || '--',
|
|
143
|
+
data: 'statusData',
|
|
144
|
+
testId: `table-item-${schedulerHistory.tid}`,
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
col: 'col2',
|
|
148
|
+
text: formattedEndTime,
|
|
149
|
+
testId: `table-item-${schedulerHistory.tid}`,
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: 'status',
|
|
153
|
+
col: 'col3',
|
|
154
|
+
text: localization.common[statusData.textKey],
|
|
155
|
+
data: statusData,
|
|
156
|
+
testId: `table-item-${schedulerHistory.tid}`,
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
}
|
|
@@ -1,120 +1,127 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
<div :class="`table-view-scheduled-tasks table-container-${data.id}`">
|
|
3
|
+
<ui-data-table
|
|
4
|
+
:data="data"
|
|
5
|
+
:options="options"
|
|
6
|
+
:loading="props.isLoading"
|
|
7
|
+
:total-pages="props.totalPages"
|
|
8
|
+
:total-items="props.totalItems"
|
|
9
|
+
:texts="texts"
|
|
10
|
+
:skeleton="skeletonData"
|
|
11
|
+
test-id="task-table"
|
|
12
|
+
@sort="onSorting"
|
|
13
|
+
@pagination="onPagination"
|
|
14
|
+
@column-filter="onColumnFilter"
|
|
15
|
+
@select-row="onSelectRow"
|
|
16
|
+
>
|
|
17
|
+
<template #insteadOfTitleActions>
|
|
18
|
+
<templates-inventory-vm-configure-scheduled-tasks-tools-panel
|
|
19
|
+
:selected-task="selectedScheduledTaskLocal"
|
|
20
|
+
:selected-task-from-table="props.selectedScheduler"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
>
|
|
24
|
+
<template #icon="{ item }">
|
|
25
|
+
<span class="flex-align-center">
|
|
26
|
+
<ui-icon
|
|
27
|
+
:name="item.data.iconClassName"
|
|
28
|
+
width="18"
|
|
29
|
+
height="18"
|
|
30
|
+
class="mr-1"
|
|
31
|
+
/>
|
|
32
32
|
{{ item.text }}
|
|
33
33
|
</span>
|
|
34
|
-
</
|
|
35
|
-
</template>
|
|
34
|
+
</template>
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
<template #status="{ item }">
|
|
37
|
+
<ui-chip
|
|
38
|
+
:test-id="item.data.testId"
|
|
39
|
+
:color="item.data.chipColor"
|
|
40
|
+
rounded
|
|
41
|
+
>
|
|
42
|
+
<ui-icon
|
|
43
|
+
:name="item.data.icon"
|
|
44
|
+
width="14px"
|
|
45
|
+
height="14px"
|
|
46
|
+
class="chip-icon"
|
|
47
|
+
></ui-icon>
|
|
48
|
+
{{ item.text }}
|
|
49
|
+
</ui-chip>
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
<common-tooltip-help
|
|
52
|
+
v-if="item.data.chipColor === 'red'"
|
|
53
|
+
:title="localization.common.failureReason"
|
|
54
|
+
:help-text="item.data.runResult"
|
|
55
|
+
:test-id="`${item.data.testId}`"
|
|
56
|
+
:help-id="`${item.data.testId}-tooltip`"
|
|
57
|
+
status="error"
|
|
58
|
+
dropdown-width="320px"
|
|
59
|
+
dropdown-left
|
|
60
|
+
dropdown-top
|
|
61
|
+
class="ml-2"
|
|
62
|
+
/>
|
|
63
|
+
</template>
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
>
|
|
72
|
-
<span
|
|
73
|
-
:class="['action-icon', { active: actionsShowId === item.data.id }]"
|
|
65
|
+
<template #default-actions="{ item }">
|
|
66
|
+
<div class="scheduler-drop-action">
|
|
67
|
+
<ui-button
|
|
68
|
+
:id="`event-table-action-${item.data.id}`"
|
|
69
|
+
:test-id="`event-table-action-${item.data.id}`"
|
|
70
|
+
variant="text"
|
|
71
|
+
is-without-height
|
|
72
|
+
is-without-sizes
|
|
73
|
+
@click.stop="onToggleActions(item.data.id)"
|
|
74
74
|
>
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:elem-id="`event-table-action-${item.data.id}`"
|
|
83
|
-
width="max-content"
|
|
84
|
-
left
|
|
85
|
-
@select="onSelectAction(item.data, $event)"
|
|
86
|
-
@hide="onHideActionsDropdown"
|
|
87
|
-
>
|
|
88
|
-
<template #row="{ item: dropMenu }">
|
|
89
|
-
<ui-icon :name="dropMenu.iconName" width="16" height="16" />
|
|
90
|
-
<span class="action-text">
|
|
91
|
-
{{ dropMenu.text }}
|
|
75
|
+
<span
|
|
76
|
+
:class="[
|
|
77
|
+
'scheduler-drop-action__icon',
|
|
78
|
+
{ active: actionsShowId === item.data.id },
|
|
79
|
+
]"
|
|
80
|
+
>
|
|
81
|
+
<ui-icon name="vertical-dotes" width="20" height="20" />
|
|
92
82
|
</span>
|
|
93
|
-
</
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
83
|
+
</ui-button>
|
|
84
|
+
<ui-dropdown
|
|
85
|
+
:show="actionsShowId === item.data.id"
|
|
86
|
+
:test-id="`event-table-action-dropdown-${item.data.id}`"
|
|
87
|
+
:items="actions"
|
|
88
|
+
:elem-id="`event-table-action-${item.data.id}`"
|
|
89
|
+
width="max-content"
|
|
90
|
+
left
|
|
91
|
+
@select="onSelectAction(item.data, $event)"
|
|
92
|
+
@hide="onHideActionsDropdown"
|
|
93
|
+
>
|
|
94
|
+
<template #row="{ item: dropMenu }">
|
|
95
|
+
<ui-icon :name="dropMenu.iconName" width="16" height="16" />
|
|
96
|
+
<span class="scheduler-drop-action__icon__text">
|
|
97
|
+
{{ dropMenu.text }}
|
|
98
|
+
</span>
|
|
99
|
+
</template>
|
|
100
|
+
</ui-dropdown>
|
|
101
|
+
</div>
|
|
102
|
+
</template>
|
|
97
103
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
104
|
+
<template #expand="{ item }">
|
|
105
|
+
<common-pages-scheduled-tasks-table-expand-details
|
|
106
|
+
:data="item.data[0]?.data.expandData"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
<template #skeleton-header>
|
|
111
|
+
<div class="skeleton-header">
|
|
112
|
+
<div class="left-skeleton">
|
|
113
|
+
<ui-skeleton-item width="70" height="16" />
|
|
114
|
+
<div class="vertical-line"></div>
|
|
115
|
+
<ui-skeleton-item width="70" height="16" />
|
|
116
|
+
<ui-skeleton-item width="70" height="16" />
|
|
117
|
+
</div>
|
|
118
|
+
<div class="right-skeleton">
|
|
119
|
+
<ui-skeleton-item width="128" height="36" border-radius="8" />
|
|
120
|
+
</div>
|
|
114
121
|
</div>
|
|
115
|
-
</
|
|
116
|
-
</
|
|
117
|
-
</
|
|
122
|
+
</template>
|
|
123
|
+
</ui-data-table>
|
|
124
|
+
</div>
|
|
118
125
|
</template>
|
|
119
126
|
|
|
120
127
|
<script setup lang="ts">
|
|
@@ -130,7 +137,6 @@ import type {
|
|
|
130
137
|
UI_I_TableTexts,
|
|
131
138
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
132
139
|
import type { UI_T_ArbitraryObject } from '~/node_modules/bfg-uikit/models/types'
|
|
133
|
-
import type { UI_I_TableTarget } from '~/lib/models/table/interfaces'
|
|
134
140
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
135
141
|
import type { UI_I_ScheduledTasks } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
136
142
|
import {
|
|
@@ -154,7 +160,6 @@ const emits = defineEmits<{
|
|
|
154
160
|
(event: 'sort', value: string): void
|
|
155
161
|
(event: 'pagination', value: UI_I_Pagination): void
|
|
156
162
|
(event: 'col-search', value: string): void
|
|
157
|
-
(event: 'select-node', value: UI_I_TableTarget<'sphere'>): void
|
|
158
163
|
}>()
|
|
159
164
|
|
|
160
165
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -230,11 +235,10 @@ const onSelectAction = (
|
|
|
230
235
|
data: UI_I_DataTableBodyData['data'],
|
|
231
236
|
action: 'view-target' | 'copy-clipboard' | 'export'
|
|
232
237
|
): void => {
|
|
233
|
-
const {
|
|
238
|
+
const { event } = data
|
|
234
239
|
|
|
235
240
|
switch (action) {
|
|
236
241
|
case 'view-target':
|
|
237
|
-
onSelectNodeOfTree(target)
|
|
238
242
|
break
|
|
239
243
|
case 'copy-clipboard': {
|
|
240
244
|
const clipboardText =
|
|
@@ -252,29 +256,19 @@ const onHideActionsDropdown = (): void => {
|
|
|
252
256
|
actionsShowId.value = -1
|
|
253
257
|
}
|
|
254
258
|
|
|
255
|
-
const onSelectNodeOfTree = (data: UI_I_TableTarget<'sphere'>): void => {
|
|
256
|
-
emits('select-node', data)
|
|
257
|
-
}
|
|
258
259
|
const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
259
260
|
selectedScheduledTaskLocal.value = value[0]?.row
|
|
260
261
|
}
|
|
261
262
|
</script>
|
|
262
263
|
|
|
263
264
|
<style scoped lang="scss">
|
|
264
|
-
.
|
|
265
|
+
.table-view-scheduled-tasks {
|
|
265
266
|
height: inherit;
|
|
266
267
|
|
|
267
|
-
.
|
|
268
|
-
|
|
269
|
-
font-size: 13px;
|
|
270
|
-
color: var(--bottom-pannel-rtask-link-text);
|
|
271
|
-
font-weight: 400;
|
|
272
|
-
line-height: 15.73px;
|
|
273
|
-
cursor: pointer;
|
|
274
|
-
&:hover {
|
|
275
|
-
color: var(--bottom-pannel-rtask-link-hover-text);
|
|
276
|
-
}
|
|
268
|
+
:deep(.table-container) {
|
|
269
|
+
grid-template-rows: min-content auto min-content;
|
|
277
270
|
}
|
|
271
|
+
|
|
278
272
|
.chip-icon {
|
|
279
273
|
min-width: 14px;
|
|
280
274
|
}
|
|
@@ -282,10 +276,9 @@ const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
|
282
276
|
margin-right: 4px;
|
|
283
277
|
}
|
|
284
278
|
|
|
285
|
-
.
|
|
279
|
+
.scheduler-drop-action {
|
|
286
280
|
width: 100%;
|
|
287
|
-
|
|
288
|
-
.action-icon {
|
|
281
|
+
&__icon {
|
|
289
282
|
width: 20px;
|
|
290
283
|
height: 20px;
|
|
291
284
|
color: var(--tasks-actions-icon-color);
|
|
@@ -297,35 +290,31 @@ const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
|
297
290
|
color: var(--tasks-actions-icon-icative-color);
|
|
298
291
|
}
|
|
299
292
|
}
|
|
300
|
-
|
|
301
|
-
.action-text {
|
|
293
|
+
&__text {
|
|
302
294
|
margin-left: 8px;
|
|
303
295
|
}
|
|
304
296
|
}
|
|
305
|
-
&__tooltip {
|
|
306
|
-
margin-left: 8px;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.skeleton-header {
|
|
311
|
-
display: flex;
|
|
312
|
-
justify-content: space-between;
|
|
313
|
-
align-items: center;
|
|
314
297
|
|
|
315
|
-
.
|
|
298
|
+
.skeleton-header {
|
|
316
299
|
display: flex;
|
|
300
|
+
justify-content: space-between;
|
|
317
301
|
align-items: center;
|
|
318
|
-
|
|
319
|
-
.
|
|
320
|
-
|
|
321
|
-
|
|
302
|
+
|
|
303
|
+
.left-skeleton {
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
306
|
+
column-gap: 16px;
|
|
307
|
+
.vertical-line {
|
|
308
|
+
height: 24px;
|
|
309
|
+
border-right: 1px solid var(--table-line);
|
|
310
|
+
}
|
|
322
311
|
}
|
|
323
|
-
}
|
|
324
312
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
313
|
+
.right-skeleton {
|
|
314
|
+
display: flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
column-gap: 16px;
|
|
317
|
+
}
|
|
329
318
|
}
|
|
330
319
|
}
|
|
331
320
|
</style>
|
|
@@ -8,27 +8,27 @@ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropd
|
|
|
8
8
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
9
9
|
import { UI_E_SchedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/models/enums'
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
UI_E_SchedulerStatus,
|
|
12
|
+
UI_E_SchedulerChipColor,
|
|
13
|
+
UI_E_SchedulerChipIcon,
|
|
14
14
|
} from '~/components/common/pages/scheduledTasks/table/new/lib/models/enums'
|
|
15
15
|
|
|
16
16
|
// Маппинг для статусов
|
|
17
17
|
const STATUS_MAPPING = {
|
|
18
|
-
[
|
|
19
|
-
textKey: '
|
|
20
|
-
icon:
|
|
21
|
-
chipColor:
|
|
18
|
+
[UI_E_SchedulerStatus.Completed]: {
|
|
19
|
+
textKey: 'completed',
|
|
20
|
+
icon: UI_E_SchedulerChipIcon.StatusCheck,
|
|
21
|
+
chipColor: UI_E_SchedulerChipColor.Green,
|
|
22
22
|
},
|
|
23
|
-
[
|
|
23
|
+
[UI_E_SchedulerStatus.Running]: {
|
|
24
24
|
textKey: 'running',
|
|
25
|
-
icon:
|
|
26
|
-
chipColor:
|
|
25
|
+
icon: UI_E_SchedulerChipIcon.StatusCheck,
|
|
26
|
+
chipColor: UI_E_SchedulerChipColor.Green,
|
|
27
27
|
},
|
|
28
|
-
[
|
|
28
|
+
[UI_E_SchedulerStatus.Failed]: {
|
|
29
29
|
textKey: 'failed',
|
|
30
|
-
icon:
|
|
31
|
-
chipColor:
|
|
30
|
+
icon: UI_E_SchedulerChipIcon.Information,
|
|
31
|
+
chipColor: UI_E_SchedulerChipColor.Red,
|
|
32
32
|
},
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -156,12 +156,13 @@ export const getBodyDataFunc = (
|
|
|
156
156
|
|
|
157
157
|
const statusKey =
|
|
158
158
|
historyLastRun?.result.toLowerCase() === UI_E_SchedulerRunStatus.SUCCESS
|
|
159
|
-
?
|
|
159
|
+
? UI_E_SchedulerStatus.Completed
|
|
160
160
|
: historyLastRun?.result === UI_E_SchedulerRunStatus.RUNNING
|
|
161
|
-
?
|
|
162
|
-
:
|
|
161
|
+
? UI_E_SchedulerStatus.Running
|
|
162
|
+
: UI_E_SchedulerStatus.Failed
|
|
163
163
|
const statusData = {
|
|
164
164
|
...STATUS_MAPPING[statusKey],
|
|
165
|
+
runResult: historyLastRun?.result,
|
|
165
166
|
testId: `${scheduler.rid}-${index}-status`,
|
|
166
167
|
}
|
|
167
168
|
|
|
@@ -176,7 +177,7 @@ export const getBodyDataFunc = (
|
|
|
176
177
|
col: 'col0',
|
|
177
178
|
text: scheduler.name,
|
|
178
179
|
data: {
|
|
179
|
-
iconClassName: '
|
|
180
|
+
iconClassName: 'shortcuts-tasks',
|
|
180
181
|
expandData: scheduler,
|
|
181
182
|
},
|
|
182
183
|
testId: `table-item-${scheduler.rid}`,
|
|
@@ -184,7 +185,6 @@ export const getBodyDataFunc = (
|
|
|
184
185
|
{
|
|
185
186
|
col: 'col1',
|
|
186
187
|
text: scheduler.sheduler || '--',
|
|
187
|
-
data: 'statusData',
|
|
188
188
|
testId: `table-item-${scheduler.rid}`,
|
|
189
189
|
},
|
|
190
190
|
{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export enum
|
|
1
|
+
export enum UI_E_SchedulerStatus {
|
|
2
2
|
Completed = 'completed',
|
|
3
3
|
Running = 'running',
|
|
4
4
|
Failed = 'failed',
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
export enum
|
|
7
|
+
export enum UI_E_SchedulerChipColor {
|
|
8
8
|
Green = 'green',
|
|
9
9
|
Red = 'red',
|
|
10
10
|
}
|
|
11
|
-
export enum
|
|
11
|
+
export enum UI_E_SchedulerChipIcon {
|
|
12
12
|
StatusCheck = 'status-check',
|
|
13
13
|
Information = 'info-stroke',
|
|
14
14
|
}
|