bfg-common 1.5.893 → 1.5.895
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/localization/local_be.json +1 -1
- package/assets/localization/local_en.json +1 -1
- package/assets/localization/local_hy.json +1 -1
- package/assets/localization/local_kk.json +1 -1
- package/assets/localization/local_ru.json +1 -1
- package/assets/localization/local_zh.json +1 -1
- package/components/common/pages/scheduledTasks/lib/models/interfaces.ts +6 -0
- package/components/common/pages/scheduledTasks/table/Table.vue +18 -80
- package/components/common/pages/scheduledTasks/table/expandDetails/ExpandDetails.vue +2 -2
- package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +52 -5
- package/components/common/pages/scheduledTasks/table/expandDetails/Old.vue +1 -3
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/HistoryRun.vue +16 -54
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/New.vue +10 -0
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/Old.vue +68 -0
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{lib → old/lib}/config/historyRunsTable.ts +4 -4
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{lib → old/lib}/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/config/expandDetails.ts +7 -5
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/models/interfaces.ts +8 -0
- package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +4 -0
- package/components/common/pages/scheduledTasks/table/new/New.vue +332 -0
- package/components/common/pages/scheduledTasks/table/new/lib/config/scheduledTasksTable.ts +218 -0
- package/components/common/pages/scheduledTasks/table/new/lib/models/enums.ts +14 -0
- package/components/common/pages/scheduledTasks/table/old/Old.vue +93 -0
- package/components/common/pages/scheduledTasks/table/{lib → old/lib}/config/scheduledTasksTable.ts +13 -9
- package/components/common/pages/scheduledTasks/table/{lib → old/lib}/config/tableKeys.ts +1 -1
- package/package.json +1 -1
- package/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus.ts +0 -4
- package/components/common/pages/scheduledTasks/table/lib/models/interfaces.ts +0 -11
- /package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{lib → old/lib}/models/types.ts +0 -0
- /package/components/common/pages/scheduledTasks/table/{lib → old/lib}/models/types.ts +0 -0
|
@@ -2286,7 +2286,7 @@
|
|
|
2286
2286
|
"lastRunResult": "Вынік апошняга запуску",
|
|
2287
2287
|
"nextRun": "Наступны запуск",
|
|
2288
2288
|
"removeScheduledTask": "Выдаліць запланаванае заданне",
|
|
2289
|
-
"removeScheduledTaskDesc": "
|
|
2289
|
+
"removeScheduledTaskDesc": "Вы ўпэўнены, што хочаце выдаліць гэтае запланаванае заданне?\\nЗапланаванае заданне «{taskName}» для ВМ «{vmName}» будзе назаўсёды выдалена, і ўсе яго будучыя выкананні будуць адменены.",
|
|
2290
2290
|
"neverShowThisMessageAgain": "Больш ніколі не паказваць гэта паведамленне",
|
|
2291
2291
|
"scheduleNewTasks": "Расклад новых задач",
|
|
2292
2292
|
"scheduleTaskEdit": "Рэдагаванне раскладу задач",
|
|
@@ -2289,7 +2289,7 @@
|
|
|
2289
2289
|
"lastRunResult": "Last run result",
|
|
2290
2290
|
"nextRun": "Next run",
|
|
2291
2291
|
"removeScheduledTask": "Remove Scheduled Task",
|
|
2292
|
-
"removeScheduledTaskDesc": "
|
|
2292
|
+
"removeScheduledTaskDesc": "Are you sure you want to remove this scheduled task?\nThe scheduled task “{taskName}” for VM “{vmName}” will be permanently removed, and all its upcoming executions will be canceled.",
|
|
2293
2293
|
"neverShowThisMessageAgain": "Never show this message again",
|
|
2294
2294
|
"scheduleNewTasks": "Schedule New Tasks",
|
|
2295
2295
|
"scheduleTaskEdit": "Schedule Task Edit",
|
|
@@ -2289,7 +2289,7 @@
|
|
|
2289
2289
|
"lastRunResult": "Վերջին վազքի արդյունքը",
|
|
2290
2290
|
"nextRun": "Հաջորդ վազքը",
|
|
2291
2291
|
"removeScheduledTask": "Հեռացնել պլանավորված առաջադրանքը",
|
|
2292
|
-
"removeScheduledTaskDesc": "
|
|
2292
|
+
"removeScheduledTaskDesc": "Վստա՞հ եք, որ ցանկանում եք հեռացնել այս պլանավորված առաջադրանքը։\\n«{taskName}» պլանավորված առաջադրանքը «{vmName}» ՎՄ-ի համար կհեռացվի ընդմիշտ, և դրա բոլոր առաջիկա կատարումները կչեղարկվեն։",
|
|
2293
2293
|
"neverShowThisMessageAgain": "Այլևս երբեք չցուցադրել այս հաղորդագրությունը",
|
|
2294
2294
|
"scheduleNewTasks": "Ժամանակացույց նոր առաջադրանքներ",
|
|
2295
2295
|
"scheduleTaskEdit": "Ժամանակացույց առաջադրանքի խմբագրում",
|
|
@@ -2288,7 +2288,7 @@
|
|
|
2288
2288
|
"lastRunResult": "Соңғы іске қосу нәтижесі",
|
|
2289
2289
|
"nextRun": "Келесі жүгіру",
|
|
2290
2290
|
"removeScheduledTask": "Жоспарланған тапсырманы жою",
|
|
2291
|
-
"removeScheduledTaskDesc": "
|
|
2291
|
+
"removeScheduledTaskDesc": "Бұл жоспарланған тапсырманы жойғыңыз келетініне сенімдісіз бе?\\n«{vmName}» VM үшін «{taskName}» жоспарланған тапсырмасы біржола жойылады және оның барлық алдағы орындалулары тоқтатылады.",
|
|
2292
2292
|
"neverShowThisMessageAgain": "Бұл хабарды енді ешқашан көрсетпеңіз",
|
|
2293
2293
|
"scheduleNewTasks": "Жаңа тапсырмаларды жоспарлау",
|
|
2294
2294
|
"scheduleTaskEdit": "Тапсырманы өңдеуді жоспарлау",
|
|
@@ -2288,7 +2288,7 @@
|
|
|
2288
2288
|
"lastRunResult": "Результат последнего запуска",
|
|
2289
2289
|
"nextRun": "Следующий запуск",
|
|
2290
2290
|
"removeScheduledTask": "Удалить запланированное задание",
|
|
2291
|
-
"removeScheduledTaskDesc": "
|
|
2291
|
+
"removeScheduledTaskDesc": "Вы уверены, что хотите удалить это запланированное задание?\\nЗапланированное задание «{taskName}» для ВМ «{vmName}» будет окончательно удалено, и все его будущие выполнения будут отменены.",
|
|
2292
2292
|
"neverShowThisMessageAgain": "Никогда больше не показывать это сообщение",
|
|
2293
2293
|
"scheduleNewTasks": "Запланируйте новые задачи",
|
|
2294
2294
|
"scheduleTaskEdit": "Запланировать задачу Редактировать",
|
|
@@ -2286,7 +2286,7 @@
|
|
|
2286
2286
|
"lastRunResult": "上次运行结果",
|
|
2287
2287
|
"nextRun": "下次运行",
|
|
2288
2288
|
"removeScheduledTask": "删除计划任务",
|
|
2289
|
-
"removeScheduledTaskDesc": "
|
|
2289
|
+
"removeScheduledTaskDesc": "您确定要删除此计划任务吗?\\n虚拟机“{vmName}”的计划任务“{taskName}”将被永久删除,并且其所有未来的执行都将被取消。",
|
|
2290
2290
|
"neverShowThisMessageAgain": "不再显示此消息",
|
|
2291
2291
|
"scheduleNewTasks": "安排新任务",
|
|
2292
2292
|
"scheduleTaskEdit": "计划任务编辑",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
3
|
+
import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
2
4
|
|
|
3
5
|
export interface UI_I_ModalPayloadSchedulerData<T = UI_I_ScheduleNewTasksForm> {
|
|
4
6
|
isSchedulerTask: false
|
|
5
7
|
editTask: false
|
|
6
8
|
data: T
|
|
9
|
+
selectedNode: UI_I_TreeNode
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
export interface API_UI_I_ScheduledTasksTableItem {
|
|
@@ -31,6 +34,9 @@ export interface API_UI_I_ScheduledTasksTableItem {
|
|
|
31
34
|
export interface UI_I_ScheduledTasksTableItem
|
|
32
35
|
extends API_UI_I_ScheduledTasksTableItem {}
|
|
33
36
|
|
|
37
|
+
export interface UI_I_ScheduledTasks
|
|
38
|
+
extends API_UI_I_DataTable<UI_I_ScheduledTasksTableItem[]> {}
|
|
39
|
+
|
|
34
40
|
export interface UI_I_CreateScheduledTaskArgs {
|
|
35
41
|
name: string
|
|
36
42
|
description: string
|
|
@@ -1,93 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:total-pages="props.totalPages"
|
|
11
|
-
:items-per-page="itemsPerPage"
|
|
12
|
-
:z-index-header-shift="2"
|
|
13
|
-
:loading="loading"
|
|
14
|
-
type="radio"
|
|
15
|
-
class="data-table"
|
|
16
|
-
test-id="scheduled-tasks-table"
|
|
17
|
-
hide-pagination
|
|
18
|
-
hide-page-size
|
|
19
|
-
off-select-by-row
|
|
20
|
-
server-off
|
|
21
|
-
>
|
|
22
|
-
<template #icon="{ item }">
|
|
23
|
-
<atoms-the-icon :name="item.data.iconClassName" class="icon" />
|
|
24
|
-
<span :title="item.text" class="text-ellipsis">
|
|
25
|
-
{{ item.text }}
|
|
26
|
-
</span>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<template #toggleBlock="{ item }">
|
|
30
|
-
<common-pages-scheduled-tasks-table-expand-details
|
|
31
|
-
:data="item[0].data.expandData"
|
|
32
|
-
/>
|
|
33
|
-
</template>
|
|
34
|
-
</atoms-table-data-grid>
|
|
35
|
-
</div>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model="selectedScheduledTaskLocal"
|
|
5
|
+
:table-items="props.schedulerData?.items || []"
|
|
6
|
+
:total-items="props.schedulerData?.total_items || 0"
|
|
7
|
+
:total-pages="props.schedulerData?.total_pages || 1"
|
|
8
|
+
:is-loading="props.isLoading"
|
|
9
|
+
/>
|
|
36
10
|
</template>
|
|
37
11
|
|
|
38
12
|
<script lang="ts" setup>
|
|
39
|
-
import type {
|
|
40
|
-
UI_I_HeadItem,
|
|
41
|
-
UI_I_BodyItem,
|
|
42
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
43
|
-
import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
|
44
13
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
45
|
-
import type {
|
|
46
|
-
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
47
|
-
import * as scheduledTaskTable from '~/components/common/pages/scheduledTasks/table/lib/config/scheduledTasksTable'
|
|
14
|
+
import type { UI_I_ScheduledTasks } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
48
15
|
|
|
16
|
+
const selectedScheduledTaskLocal = defineModel<string | null>()
|
|
49
17
|
const props = defineProps<{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
totalItems: number
|
|
53
|
-
totalPages: number
|
|
18
|
+
schedulerData: UI_I_ScheduledTasks
|
|
19
|
+
isLoading: boolean
|
|
54
20
|
}>()
|
|
55
|
-
const selectedScheduledTaskLocal = defineModel<string | null>()
|
|
56
21
|
|
|
57
22
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
23
|
+
const { $store }: any = useNuxtApp()
|
|
58
24
|
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
65
|
-
scheduledTaskTable.headItems(localization.value)
|
|
25
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
26
|
+
const currentComponent = computed(() =>
|
|
27
|
+
isNewView.value
|
|
28
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
29
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
66
30
|
)
|
|
67
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
68
|
-
return scheduledTaskTable.bodyItems(props.dataTable || [])
|
|
69
|
-
})
|
|
70
31
|
</script>
|
|
71
|
-
|
|
72
|
-
<style lang="scss" scoped>
|
|
73
|
-
.data-table-view {
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
height: inherit;
|
|
76
|
-
margin-bottom: 10px;
|
|
77
|
-
:deep(.data-table) {
|
|
78
|
-
height: inherit;
|
|
79
|
-
.datagrid-outer-wrapper {
|
|
80
|
-
height: inherit;
|
|
81
|
-
padding-top: 0;
|
|
82
|
-
//.datagrid {
|
|
83
|
-
// margin-top: 0;
|
|
84
|
-
//}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
.icon {
|
|
88
|
-
width: 18px;
|
|
89
|
-
min-width: 18px;
|
|
90
|
-
margin-right: 3px;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<script lang="ts" setup>
|
|
6
6
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
7
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
8
|
-
import type {
|
|
8
|
+
import type { UI_I_ScheduleTableExpandDetails } from '~/components/common/pages/scheduledTasks/table/expandDetails/lib/models/interfaces'
|
|
9
9
|
import { detailsListFunc } from '~/components/common/pages/scheduledTasks/table/expandDetails/lib/config/expandDetails'
|
|
10
10
|
|
|
11
11
|
const props = defineProps<{
|
|
@@ -22,7 +22,7 @@ const currentComponent = computed(() =>
|
|
|
22
22
|
: defineAsyncComponent(() => import('./Old.vue'))
|
|
23
23
|
)
|
|
24
24
|
|
|
25
|
-
const normalizedSchedulerDetails = computed<
|
|
25
|
+
const normalizedSchedulerDetails = computed<UI_I_ScheduleTableExpandDetails[]>(
|
|
26
26
|
() => {
|
|
27
27
|
return detailsListFunc(props.data, localization.value)
|
|
28
28
|
}
|
|
@@ -1,14 +1,53 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="expand-details"
|
|
2
|
+
<div class="expand-details">
|
|
3
|
+
<div
|
|
4
|
+
v-for="(item, key) in props.expandData"
|
|
5
|
+
:key="key"
|
|
6
|
+
class="expand-details__row"
|
|
7
|
+
:class="item.lastChild && 'history-run'"
|
|
8
|
+
>
|
|
9
|
+
<span class="expand-details__label"> {{ item.text }}: </span>
|
|
10
|
+
<span
|
|
11
|
+
v-if="!item.lastChild"
|
|
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>
|
|
23
|
+
|
|
24
|
+
<common-pages-configure-scheduled-tasks-table-expand-details-history-run
|
|
25
|
+
v-else
|
|
26
|
+
:history-run-data="item.value"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
3
30
|
</template>
|
|
4
31
|
|
|
5
32
|
<script lang="ts" setup>
|
|
6
|
-
|
|
33
|
+
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
|
+
|
|
36
|
+
const props = defineProps<{
|
|
37
|
+
expandData: UI_I_DataTableBodyData[]
|
|
38
|
+
}>()
|
|
39
|
+
|
|
40
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
7
41
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
42
|
+
const eventPossibleCauses = computed<string>(() => {
|
|
43
|
+
const { expandData } = props.expandData[0].data
|
|
44
|
+
return expandData?.message
|
|
45
|
+
})
|
|
11
46
|
|
|
47
|
+
const eventUser = computed<string>(() => {
|
|
48
|
+
const { expandData } = props.expandData[0].data
|
|
49
|
+
return expandData?.user_name
|
|
50
|
+
})
|
|
12
51
|
</script>
|
|
13
52
|
|
|
14
53
|
<style lang="scss" scoped>
|
|
@@ -41,9 +80,17 @@
|
|
|
41
80
|
&__value {
|
|
42
81
|
@extend %properties;
|
|
43
82
|
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
|
+
}
|
|
44
90
|
&.disabled {
|
|
45
91
|
color: var(--table-disabled-btn);
|
|
46
92
|
}
|
|
93
|
+
|
|
47
94
|
.icon {
|
|
48
95
|
margin-right: 4px;
|
|
49
96
|
}
|
package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/HistoryRun.vue
CHANGED
|
@@ -1,67 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
9
|
-
:total-pages="props.totalPages"
|
|
10
|
-
:loading="false"
|
|
11
|
-
test-id="scheduled-tasks-history-runs-table"
|
|
12
|
-
class="history-runs-table"
|
|
13
|
-
off-select-by-row
|
|
14
|
-
hide-footer
|
|
15
|
-
>
|
|
16
|
-
<template #icon="{ item }">
|
|
17
|
-
<atoms-the-icon :name="item.data.iconClassName" class="icon" />
|
|
18
|
-
<span :title="item.text" class="text-ellipsis">
|
|
19
|
-
{{ item.text }}
|
|
20
|
-
</span>
|
|
21
|
-
</template>
|
|
22
|
-
</atoms-table-data-grid>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:table-items="props.historyRunData || []"
|
|
5
|
+
:total-items="props.historyRunData?.length || 0"
|
|
6
|
+
:total-pages="1"
|
|
7
|
+
:is-loading="false"
|
|
8
|
+
/>
|
|
23
9
|
</template>
|
|
24
10
|
|
|
25
11
|
<script setup lang="ts">
|
|
26
|
-
import type {
|
|
27
|
-
UI_I_HeadItem,
|
|
28
|
-
UI_I_BodyItem,
|
|
29
|
-
} from '~/components/atoms/table/compact/lib/models/interfaces'
|
|
30
12
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
13
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
32
|
-
import * as historyRunTable from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/config/historyRunsTable'
|
|
33
14
|
|
|
34
15
|
const props = defineProps<{
|
|
35
|
-
|
|
36
|
-
totalItems: number
|
|
37
|
-
totalPages: number
|
|
16
|
+
historyRunData: UI_I_ScheduledTasksTableItem['last_5_run']
|
|
38
17
|
}>()
|
|
39
18
|
|
|
40
|
-
const
|
|
19
|
+
const { $store }: any = useNuxtApp()
|
|
41
20
|
|
|
42
|
-
const
|
|
43
|
-
|
|
21
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
22
|
+
const currentComponent = computed(() =>
|
|
23
|
+
isNewView.value
|
|
24
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
25
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
44
26
|
)
|
|
45
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
46
|
-
return historyRunTable.bodyItems(props.dataTable || [])
|
|
47
|
-
})
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<style lang="scss" scoped>
|
|
51
|
-
.history-runs-table {
|
|
52
|
-
height: inherit;
|
|
53
|
-
:deep(.datagrid-outer-wrapper) {
|
|
54
|
-
height: inherit;
|
|
55
|
-
padding-top: 0;
|
|
56
|
-
}
|
|
57
|
-
:deep(.datagrid-row-scrollable) {
|
|
58
|
-
flex-direction: row;
|
|
59
|
-
}
|
|
60
27
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
min-width: 18px;
|
|
64
|
-
margin-right: 3px;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
</style>
|
|
28
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-table-data-grid
|
|
3
|
+
:selected-row="null"
|
|
4
|
+
:page-size="1"
|
|
5
|
+
:page="1"
|
|
6
|
+
:head-items="headItems"
|
|
7
|
+
:body-items="bodyItems"
|
|
8
|
+
:total-items="props.totalItems"
|
|
9
|
+
:total-pages="props.totalPages"
|
|
10
|
+
:loading="props.isLoading"
|
|
11
|
+
test-id="scheduled-tasks-history-runs-table"
|
|
12
|
+
class="history-runs-table"
|
|
13
|
+
off-select-by-row
|
|
14
|
+
hide-footer
|
|
15
|
+
>
|
|
16
|
+
<template #icon="{ item }">
|
|
17
|
+
<atoms-the-icon :name="item.data.iconClassName" class="icon" />
|
|
18
|
+
<span :title="item.text" class="text-ellipsis">
|
|
19
|
+
{{ item.text }}
|
|
20
|
+
</span>
|
|
21
|
+
</template>
|
|
22
|
+
</atoms-table-data-grid>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import type {
|
|
27
|
+
UI_I_HeadItem,
|
|
28
|
+
UI_I_BodyItem,
|
|
29
|
+
} from '~/components/atoms/table/compact/lib/models/interfaces'
|
|
30
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
+
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
32
|
+
import * as historyRunTable from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/lib/config/historyRunsTable'
|
|
33
|
+
|
|
34
|
+
const props = defineProps<{
|
|
35
|
+
tableItems: UI_I_ScheduledTasksTableItem['last_5_run']
|
|
36
|
+
totalItems: number
|
|
37
|
+
totalPages: number
|
|
38
|
+
isLoading: boolean
|
|
39
|
+
}>()
|
|
40
|
+
|
|
41
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
42
|
+
|
|
43
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
44
|
+
historyRunTable.headItems(localization.value)
|
|
45
|
+
)
|
|
46
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
47
|
+
return historyRunTable.bodyItems(props.tableItems || [])
|
|
48
|
+
})
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style lang="scss" scoped>
|
|
52
|
+
.history-runs-table {
|
|
53
|
+
height: inherit;
|
|
54
|
+
:deep(.datagrid-outer-wrapper) {
|
|
55
|
+
height: inherit;
|
|
56
|
+
padding-top: 0;
|
|
57
|
+
}
|
|
58
|
+
:deep(.datagrid-row-scrollable) {
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.icon {
|
|
63
|
+
width: 18px;
|
|
64
|
+
min-width: 18px;
|
|
65
|
+
margin-right: 3px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
UI_E_RecentTaskStatus,
|
|
10
10
|
} from '~/lib/models/store/tasks/enums'
|
|
11
11
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
12
|
-
import { historyLastRunTableKeys } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/config/tableKeys'
|
|
13
|
-
import {
|
|
12
|
+
import { historyLastRunTableKeys } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/lib/config/tableKeys'
|
|
13
|
+
import { UI_E_SchedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/models/enums'
|
|
14
14
|
|
|
15
15
|
const getItems = (
|
|
16
16
|
localization: UI_I_Localization
|
|
@@ -68,9 +68,9 @@ export const bodyItems = (
|
|
|
68
68
|
const statusData = {
|
|
69
69
|
iconClassName:
|
|
70
70
|
UI_E_IconNameByRecentTaskStatus[
|
|
71
|
-
event?.result.toLowerCase() ===
|
|
71
|
+
event?.result.toLowerCase() === UI_E_SchedulerRunStatus.SUCCESS
|
|
72
72
|
? 2
|
|
73
|
-
: event?.result ===
|
|
73
|
+
: event?.result === UI_E_SchedulerRunStatus.RUNNING
|
|
74
74
|
? 1
|
|
75
75
|
: 3
|
|
76
76
|
],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UI_T_HistoryLastRunTableTuple } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/models/types'
|
|
1
|
+
import type { UI_T_HistoryLastRunTableTuple } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/lib/models/types'
|
|
2
2
|
|
|
3
3
|
export const historyLastRunTableKeys: UI_T_HistoryLastRunTableTuple = [
|
|
4
4
|
'start',
|
package/components/common/pages/scheduledTasks/table/expandDetails/lib/config/expandDetails.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type {
|
|
2
|
+
import type { UI_I_ScheduleTableExpandDetails } from '~/components/common/pages/scheduledTasks/table/expandDetails/lib/models/interfaces'
|
|
3
3
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
4
4
|
|
|
5
5
|
export const detailsListFunc = (
|
|
6
6
|
data: UI_I_ScheduledTasksTableItem,
|
|
7
7
|
localization: UI_I_Localization
|
|
8
|
-
):
|
|
8
|
+
): UI_I_ScheduleTableExpandDetails[] => {
|
|
9
9
|
const { $formattedDatetime }: any = useNuxtApp()
|
|
10
10
|
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
13
|
id: 1,
|
|
14
14
|
text: localization.scheduledTasks.scheduledDescription,
|
|
15
|
-
value: data
|
|
15
|
+
value: data?.description || '--',
|
|
16
16
|
testId: 'scheduled-tasks-description',
|
|
17
17
|
},
|
|
18
18
|
|
|
@@ -25,13 +25,15 @@ export const detailsListFunc = (
|
|
|
25
25
|
{
|
|
26
26
|
id: 3,
|
|
27
27
|
text: localization.scheduledTasks.emailNotification,
|
|
28
|
-
value: data.
|
|
28
|
+
value: data?.notify_emails || localization.common.none,
|
|
29
|
+
disabled: !data?.notify_emails,
|
|
29
30
|
testId: 'scheduled-tasks-email-notification',
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
id: 4,
|
|
33
34
|
text: localization.common.initiator,
|
|
34
|
-
value: data
|
|
35
|
+
value: data?.initiator || '--',
|
|
36
|
+
iconClassName: data?.initiator ? 'user-icon' : '',
|
|
35
37
|
testId: 'scheduled-tasks-initiator',
|
|
36
38
|
},
|
|
37
39
|
{
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UI_I_TableRowDropDetails } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_ScheduledTasks } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export interface UI_I_ScheduleTableExpandDetails
|
|
5
|
+
extends Omit<UI_I_TableRowDropDetails, 'value'> {
|
|
6
|
+
value: string | UI_I_ScheduledTasks['items'][number]['last_5_run']
|
|
7
|
+
disabled?: boolean
|
|
8
|
+
}
|