bfg-common 1.5.921 → 1.5.923
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 +4 -16
- package/assets/localization/local_en.json +4 -16
- package/assets/localization/local_hy.json +4 -16
- package/assets/localization/local_kk.json +4 -16
- package/assets/localization/local_ru.json +4 -16
- package/assets/localization/local_zh.json +4 -16
- package/components/common/pages/scheduledTasks/lib/models/interfaces.ts +0 -6
- package/components/common/pages/scheduledTasks/modals/common/frequency/Frequency.vue +42 -46
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/AfterStartup.vue +48 -15
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/End.vue +69 -15
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/Interval.vue +53 -19
- package/components/common/pages/scheduledTasks/modals/common/frequency/lib/utils.ts +1 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/On.vue +168 -28
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/lib/config/options.ts +0 -17
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/SelectWeek.vue +28 -17
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/lib/config/weekOptions.ts +50 -20
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/StartOn.vue +51 -15
- package/components/common/pages/scheduledTasks/modals/common/{taskForm/Old.vue → newTaskForm/NewTaskForm.vue} +69 -12
- package/components/common/pages/scheduledTasks/table/Table.vue +81 -27
- package/components/common/pages/scheduledTasks/table/expandDetails/ExpandDetails.vue +2 -2
- package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +17 -48
- package/components/common/pages/scheduledTasks/table/expandDetails/Old.vue +3 -1
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/HistoryRun.vue +54 -16
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/config/historyRunsTable.ts +4 -4
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/config/expandDetails.ts +5 -7
- package/components/common/pages/scheduledTasks/table/{old/lib → lib}/config/scheduledTasksTable.ts +9 -13
- package/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus.ts +4 -0
- package/components/common/pages/scheduledTasks/table/{old/lib → lib}/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/lib/models/interfaces.ts +11 -0
- package/package.json +1 -1
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/New.vue +0 -43
- package/components/common/pages/scheduledTasks/modals/common/frequency/afterStartup/Old.vue +0 -65
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/New.vue +0 -73
- package/components/common/pages/scheduledTasks/modals/common/frequency/end/Old.vue +0 -112
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/New.vue +0 -49
- package/components/common/pages/scheduledTasks/modals/common/frequency/interval/Old.vue +0 -68
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/New.vue +0 -137
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/Old.vue +0 -234
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/New.vue +0 -66
- package/components/common/pages/scheduledTasks/modals/common/frequency/on/selectWeek/Old.vue +0 -44
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/New.vue +0 -46
- package/components/common/pages/scheduledTasks/modals/common/frequency/startOn/Old.vue +0 -77
- package/components/common/pages/scheduledTasks/modals/common/taskForm/New.vue +0 -194
- package/components/common/pages/scheduledTasks/modals/common/taskForm/TaskForm.vue +0 -129
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/New.vue +0 -147
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/new/lib/config/historyRunsTable.ts +0 -161
- package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/old/Old.vue +0 -68
- package/components/common/pages/scheduledTasks/table/expandDetails/lib/models/interfaces.ts +0 -8
- package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -4
- package/components/common/pages/scheduledTasks/table/new/New.vue +0 -320
- package/components/common/pages/scheduledTasks/table/new/lib/config/scheduledTasksTable.ts +0 -218
- package/components/common/pages/scheduledTasks/table/new/lib/models/enums.ts +0 -14
- package/components/common/pages/scheduledTasks/table/old/Old.vue +0 -93
- /package/components/common/pages/scheduledTasks/modals/common/{taskForm → newTaskForm}/lib/models/interfaces.ts +0 -0
- /package/components/common/pages/scheduledTasks/modals/common/{taskForm → newTaskForm}/lib/utils.ts +0 -0
- /package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/{old/lib → lib}/models/types.ts +0 -0
- /package/components/common/pages/scheduledTasks/table/{old/lib → lib}/models/types.ts +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<label
|
|
10
10
|
:class="[
|
|
11
11
|
'clr-control-container tooltip tooltip-validation tooltip-xs tooltip-bottom-left clr-col-md-8',
|
|
12
|
-
|
|
12
|
+
userNameErrorText && 'invalid',
|
|
13
13
|
]"
|
|
14
14
|
>
|
|
15
15
|
<input
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@blur="onInitValidation(['taskName'])"
|
|
23
23
|
/>
|
|
24
24
|
<span class="tooltip-content">
|
|
25
|
-
{{
|
|
25
|
+
{{ userNameErrorText }}
|
|
26
26
|
</span>
|
|
27
27
|
</label>
|
|
28
28
|
</div>
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<common-select-input
|
|
70
70
|
v-model="model.frequency"
|
|
71
71
|
:label="localization.common.run"
|
|
72
|
-
:data="
|
|
72
|
+
:data="frequencyMethodOptions"
|
|
73
73
|
class="clr-form-control run"
|
|
74
74
|
>
|
|
75
75
|
<template #options="{ value }">
|
|
@@ -101,23 +101,80 @@
|
|
|
101
101
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
102
102
|
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
103
103
|
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
|
104
|
-
import type { UI_I_InitialValidationFields } from '~/components/common/pages/scheduledTasks/modals/common/
|
|
104
|
+
import type { UI_I_InitialValidationFields } from '~/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/models/interfaces'
|
|
105
|
+
import type { UI_T_FrequencyType } from '~/components/common/pages/scheduledTasks/modals/common/frequency/lib/models/types'
|
|
106
|
+
import * as cron from '~/components/common/pages/scheduledTasks/modals/common/newTaskForm/lib/utils'
|
|
107
|
+
import { frequencyMethodFunc } from '~/components/common/pages/scheduledTasks/modals/common/frequency/lib/config/frequencyOptions'
|
|
105
108
|
|
|
106
|
-
const model = defineModel<UI_I_ScheduleNewTasksForm>({ required: true })
|
|
107
109
|
const props = defineProps<{
|
|
108
110
|
target: string
|
|
109
|
-
formValidationFields: UI_I_InitialValidationFields
|
|
110
|
-
taskNameErrorText: string
|
|
111
|
-
frequencyMethodOptions: UI_I_SelectInputItem[]
|
|
112
|
-
}>()
|
|
113
|
-
const emits = defineEmits<{
|
|
114
|
-
(event: 'init-validation', value: string[]): void
|
|
115
111
|
}>()
|
|
112
|
+
const model = defineModel<UI_I_ScheduleNewTasksForm>({ required: true })
|
|
116
113
|
|
|
117
114
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
118
115
|
|
|
116
|
+
const initValidationFields = ref<UI_I_InitialValidationFields>({
|
|
117
|
+
taskName: false,
|
|
118
|
+
})
|
|
119
119
|
const onInitValidation = (types: string[]): void => {
|
|
120
|
-
|
|
120
|
+
types.forEach((type) => (initValidationFields.value[type] = true))
|
|
121
|
+
}
|
|
122
|
+
const userNameErrorText = computed<string>(() => {
|
|
123
|
+
if (!initValidationFields.value.taskName) return ''
|
|
124
|
+
|
|
125
|
+
model.value.task_name = model.value.task_name.replace(/^\s+/, '')
|
|
126
|
+
|
|
127
|
+
return !model.value.task_name ? localization.value.common.fieldRequired : ''
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const frequencyMethodOptions = computed<UI_I_SelectInputItem[]>(() =>
|
|
131
|
+
frequencyMethodFunc(localization.value)
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
watch(
|
|
135
|
+
model,
|
|
136
|
+
(newValue: UI_I_ScheduleNewTasksForm) => {
|
|
137
|
+
newValue.cron = generateCronExpression(newValue.frequency, newValue)
|
|
138
|
+
},
|
|
139
|
+
{ deep: true }
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
const generateCronExpression = (
|
|
143
|
+
runType: UI_T_FrequencyType,
|
|
144
|
+
interval: UI_I_ScheduleNewTasksForm
|
|
145
|
+
): string => {
|
|
146
|
+
let cronExpression
|
|
147
|
+
|
|
148
|
+
// Генерируем cron-выражение на основе runType
|
|
149
|
+
switch (runType) {
|
|
150
|
+
case 'once':
|
|
151
|
+
const timestamp = Math.floor(
|
|
152
|
+
new Date(interval.frg_on_time).getTime() / 1000
|
|
153
|
+
)
|
|
154
|
+
cronExpression = `* * * * * ${timestamp}:0-0-0-0:once`
|
|
155
|
+
break
|
|
156
|
+
case 'after-startup':
|
|
157
|
+
const suffixDelay =
|
|
158
|
+
interval.frg_after_startup === 0 ? '' : `-${interval.frg_after_startup}`
|
|
159
|
+
cronExpression = `* * * * * after_procurator_startup${suffixDelay}` // Выполняется после запуска procurator_startup с задержой N минут
|
|
160
|
+
break
|
|
161
|
+
case 'hour':
|
|
162
|
+
cronExpression = cron.generateHourlyCronExpression(interval)
|
|
163
|
+
break
|
|
164
|
+
case 'day':
|
|
165
|
+
cronExpression = cron.generateDailyCronExpression(interval)
|
|
166
|
+
break
|
|
167
|
+
case 'week':
|
|
168
|
+
cronExpression = cron.generateWeeklyCronExpression(interval)
|
|
169
|
+
break
|
|
170
|
+
case 'month':
|
|
171
|
+
cronExpression = cron.generateMonthlyCronExpression(interval)
|
|
172
|
+
break
|
|
173
|
+
default:
|
|
174
|
+
cronExpression = '* * * * *'
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return cronExpression
|
|
121
178
|
}
|
|
122
179
|
</script>
|
|
123
180
|
|
|
@@ -1,39 +1,93 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<div class="data-table-view">
|
|
3
|
+
<atoms-table-data-grid
|
|
4
|
+
v-model:selected-row="selectedScheduledTaskLocal"
|
|
5
|
+
v-model:page-size="pagination.pageSize"
|
|
6
|
+
v-model:page="pagination.page"
|
|
7
|
+
:head-items="headItems"
|
|
8
|
+
:body-items="bodyItems"
|
|
9
|
+
:total-items="props.totalItems"
|
|
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>
|
|
12
36
|
</template>
|
|
13
37
|
|
|
14
38
|
<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'
|
|
15
44
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
-
import type {
|
|
45
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
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'
|
|
17
48
|
|
|
49
|
+
const props = defineProps<{
|
|
50
|
+
dataTable: UI_I_ScheduledTasksTableItem[]
|
|
51
|
+
loading: boolean
|
|
52
|
+
totalItems: number
|
|
53
|
+
totalPages: number
|
|
54
|
+
}>()
|
|
18
55
|
const selectedScheduledTaskLocal = defineModel<string | null>()
|
|
19
|
-
const props = withDefaults(
|
|
20
|
-
defineProps<{
|
|
21
|
-
schedulerData: UI_I_ScheduledTasks
|
|
22
|
-
selectedScheduler?: UI_I_ScheduledTasks['items'][number] // используется только в новом виде
|
|
23
|
-
isLoading: boolean
|
|
24
|
-
}>(),
|
|
25
|
-
{
|
|
26
|
-
selectedScheduler: undefined,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
56
|
|
|
30
57
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
31
|
-
const { $store }: any = useNuxtApp()
|
|
32
58
|
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
59
|
+
const pagination = ref<UI_I_Pagination>({
|
|
60
|
+
page: 1,
|
|
61
|
+
pageSize: 100,
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
65
|
+
scheduledTaskTable.headItems(localization.value)
|
|
38
66
|
)
|
|
67
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
68
|
+
return scheduledTaskTable.bodyItems(props.dataTable || [])
|
|
69
|
+
})
|
|
39
70
|
</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_ScheduleTableRowDetails } from '~/components/common/pages/scheduledTasks/table/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_ScheduleTableRowDetails[]>(
|
|
26
26
|
() => {
|
|
27
27
|
return detailsListFunc(props.data, localization.value)
|
|
28
28
|
}
|
|
@@ -1,50 +1,14 @@
|
|
|
1
1
|
<template>
|
|
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
|
-
<!-- Обычные строки -->
|
|
10
|
-
<template v-if="!item.lastChild">
|
|
11
|
-
<span class="expand-details__label"> {{ item.text }}: </span>
|
|
12
|
-
|
|
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>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
2
|
+
<div class="expand-details" />
|
|
40
3
|
</template>
|
|
41
4
|
|
|
42
5
|
<script lang="ts" setup>
|
|
43
|
-
import type { UI_I_DataTableBodyData } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
// import type { UI_I_DataTableBodyData } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
7
|
+
|
|
8
|
+
// const props = defineProps<{
|
|
9
|
+
// expandData: UI_I_DataTableBodyData[]
|
|
10
|
+
// }>()
|
|
44
11
|
|
|
45
|
-
const props = defineProps<{
|
|
46
|
-
expandData: UI_I_DataTableBodyData[]
|
|
47
|
-
}>()
|
|
48
12
|
</script>
|
|
49
13
|
|
|
50
14
|
<style lang="scss" scoped>
|
|
@@ -69,10 +33,9 @@ const props = defineProps<{
|
|
|
69
33
|
@extend %properties;
|
|
70
34
|
color: #9da6ad;
|
|
71
35
|
text-transform: capitalize;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
margin-top: 12px;
|
|
36
|
+
|
|
37
|
+
&.events {
|
|
38
|
+
height: 18px;
|
|
76
39
|
}
|
|
77
40
|
}
|
|
78
41
|
&__value {
|
|
@@ -84,9 +47,15 @@ const props = defineProps<{
|
|
|
84
47
|
.icon {
|
|
85
48
|
margin-right: 4px;
|
|
86
49
|
}
|
|
87
|
-
|
|
88
|
-
|
|
50
|
+
}
|
|
51
|
+
&__status {
|
|
52
|
+
@include flex($align: center);
|
|
53
|
+
.ui-chip {
|
|
54
|
+
width: max-content;
|
|
89
55
|
}
|
|
90
56
|
}
|
|
57
|
+
&__tooltip {
|
|
58
|
+
margin-left: 6px;
|
|
59
|
+
}
|
|
91
60
|
}
|
|
92
61
|
</style>
|
package/components/common/pages/scheduledTasks/table/expandDetails/historyRun/HistoryRun.vue
CHANGED
|
@@ -1,29 +1,67 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
|
|
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="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>
|
|
9
23
|
</template>
|
|
10
24
|
|
|
11
25
|
<script setup lang="ts">
|
|
26
|
+
import type {
|
|
27
|
+
UI_I_HeadItem,
|
|
28
|
+
UI_I_BodyItem,
|
|
29
|
+
} from '~/components/atoms/table/compact/lib/models/interfaces'
|
|
12
30
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
13
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/lib/config/historyRunsTable'
|
|
14
33
|
|
|
15
34
|
const props = defineProps<{
|
|
16
|
-
|
|
35
|
+
dataTable: UI_I_ScheduledTasksTableItem['last_5_run']
|
|
36
|
+
totalItems: number
|
|
37
|
+
totalPages: number
|
|
17
38
|
}>()
|
|
18
39
|
|
|
19
|
-
const
|
|
40
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
20
41
|
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
isNewView.value
|
|
24
|
-
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
25
|
-
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
42
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
43
|
+
historyRunTable.headItems(localization.value)
|
|
26
44
|
)
|
|
27
|
-
|
|
28
|
-
|
|
45
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
46
|
+
return historyRunTable.bodyItems(props.dataTable || [])
|
|
47
|
+
})
|
|
29
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
|
+
|
|
61
|
+
.icon {
|
|
62
|
+
width: 18px;
|
|
63
|
+
min-width: 18px;
|
|
64
|
+
margin-right: 3px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</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/
|
|
13
|
-
import {
|
|
12
|
+
import { historyLastRunTableKeys } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/lib/config/tableKeys'
|
|
13
|
+
import { schedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus'
|
|
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() === schedulerRunStatus.SUCCESS
|
|
72
72
|
? 2
|
|
73
|
-
: event?.result ===
|
|
73
|
+
: event?.result === 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/
|
|
1
|
+
import type { UI_T_HistoryLastRunTableTuple } from '~/components/common/pages/scheduledTasks/table/expandDetails/historyRun/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_ScheduleTableRowDetails } from '~/components/common/pages/scheduledTasks/table/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_ScheduleTableRowDetails[] => {
|
|
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,15 +25,13 @@ export const detailsListFunc = (
|
|
|
25
25
|
{
|
|
26
26
|
id: 3,
|
|
27
27
|
text: localization.scheduledTasks.emailNotification,
|
|
28
|
-
value: data
|
|
29
|
-
disabled: !data?.notify_emails,
|
|
28
|
+
value: data.notify_emails,
|
|
30
29
|
testId: 'scheduled-tasks-email-notification',
|
|
31
30
|
},
|
|
32
31
|
{
|
|
33
32
|
id: 4,
|
|
34
33
|
text: localization.common.initiator,
|
|
35
|
-
value: data
|
|
36
|
-
iconClassName: data?.initiator ? 'user-icon' : '',
|
|
34
|
+
value: data.initiator,
|
|
37
35
|
testId: 'scheduled-tasks-initiator',
|
|
38
36
|
},
|
|
39
37
|
{
|
package/components/common/pages/scheduledTasks/table/{old/lib → lib}/config/scheduledTasksTable.ts
RENAMED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from '~/lib/models/store/tasks/enums'
|
|
10
10
|
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
11
11
|
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { scheduledTaskTableItemsKeys } from '~/components/common/pages/scheduledTasks/table/lib/config/tableKeys'
|
|
13
|
+
import { schedulerRunStatus } from '~/components/common/pages/scheduledTasks/table/lib/config/schedulerStatus'
|
|
14
14
|
|
|
15
15
|
const getItems = (
|
|
16
16
|
localization: UI_I_Localization
|
|
@@ -67,20 +67,16 @@ export const bodyItems = (
|
|
|
67
67
|
const statusText =
|
|
68
68
|
historyLastRun &&
|
|
69
69
|
UI_E_RecentTaskStatus[
|
|
70
|
-
historyLastRun?.result?.toLowerCase() ===
|
|
71
|
-
UI_E_SchedulerRunStatus.SUCCESS
|
|
72
|
-
? 2
|
|
73
|
-
: -1
|
|
70
|
+
historyLastRun?.result?.toLowerCase() === 'success' ? 2 : -1
|
|
74
71
|
]
|
|
75
72
|
|
|
76
73
|
const statusData = {
|
|
77
74
|
iconClassName:
|
|
78
75
|
historyLastRun &&
|
|
79
76
|
UI_E_IconNameByRecentTaskStatus[
|
|
80
|
-
historyLastRun?.result.toLowerCase() ===
|
|
81
|
-
UI_E_SchedulerRunStatus.SUCCESS
|
|
77
|
+
historyLastRun?.result.toLowerCase() === schedulerRunStatus.SUCCESS
|
|
82
78
|
? 2
|
|
83
|
-
: historyLastRun?.result ===
|
|
79
|
+
: historyLastRun?.result === schedulerRunStatus.RUNNING
|
|
84
80
|
? 1
|
|
85
81
|
: 3
|
|
86
82
|
],
|
|
@@ -117,8 +113,8 @@ export const bodyItems = (
|
|
|
117
113
|
id: task.rid,
|
|
118
114
|
testId: `adapter-table-${key}-row-item`,
|
|
119
115
|
data: {
|
|
120
|
-
sortValue: lastRun || 0
|
|
121
|
-
}
|
|
116
|
+
sortValue: lastRun || 0
|
|
117
|
+
}
|
|
122
118
|
},
|
|
123
119
|
{
|
|
124
120
|
key: 'icon',
|
|
@@ -133,8 +129,8 @@ export const bodyItems = (
|
|
|
133
129
|
id: task.rid,
|
|
134
130
|
testId: `adapter-table-${key}-row-item`,
|
|
135
131
|
data: {
|
|
136
|
-
sortValue: task[scheduledTaskTableItemsKeys[4]]
|
|
137
|
-
}
|
|
132
|
+
sortValue: task[scheduledTaskTableItemsKeys[4]]
|
|
133
|
+
}
|
|
138
134
|
},
|
|
139
135
|
])
|
|
140
136
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UI_T_ScheduledTaskTableItemsTuple } from '~/components/common/pages/scheduledTasks/table/
|
|
1
|
+
import type { UI_T_ScheduledTaskTableItemsTuple } from '~/components/common/pages/scheduledTasks/table/lib/models/types'
|
|
2
2
|
|
|
3
3
|
export const scheduledTaskTableItemsKeys: UI_T_ScheduledTaskTableItemsTuple = [
|
|
4
4
|
'name',
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UI_I_TableRowDropDetails } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_ScheduledTasksTableItem } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export interface UI_I_ScheduleTableRowDetails
|
|
5
|
+
extends UI_I_TableRowDropDetails<
|
|
6
|
+
string | UI_I_ScheduledTasksTableItem['last_5_run']
|
|
7
|
+
> {}
|
|
8
|
+
|
|
9
|
+
// export interface I_ScheduledTaskTableItem extends API_I_ScheduledTaskTableItem {
|
|
10
|
+
// type: T_ScheduledTasksActionsType
|
|
11
|
+
// }
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="frequency-after-startup">
|
|
3
|
-
<h2>{{ localization.scheduledTasks.delayMinutes }}</h2>
|
|
4
|
-
<ui-input
|
|
5
|
-
id="ip-address"
|
|
6
|
-
v-model="afterStartupModel"
|
|
7
|
-
:error="props.timeIntervalErrorText"
|
|
8
|
-
:placeholder="localization.scheduledTasks.delayMinutes"
|
|
9
|
-
test-id="scheduler-frequency-delay-minute-field"
|
|
10
|
-
autocomplete="off"
|
|
11
|
-
type="number"
|
|
12
|
-
@input="onInitValidation"
|
|
13
|
-
></ui-input>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script lang="ts" setup>
|
|
18
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
19
|
-
|
|
20
|
-
const afterStartupModel = defineModel<number>({ required: true })
|
|
21
|
-
const props = defineProps<{
|
|
22
|
-
timeIntervalErrorText: string
|
|
23
|
-
}>()
|
|
24
|
-
const emits = defineEmits<{
|
|
25
|
-
(event: 'init-validation'): void
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
29
|
-
|
|
30
|
-
const onInitValidation = (): void => emits('init-validation')
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<style lang="scss" scoped>
|
|
34
|
-
.frequency-after-startup {
|
|
35
|
-
h2 {
|
|
36
|
-
font-family: 'Inter', sans-serif;
|
|
37
|
-
color: var(--title-form-first-color);
|
|
38
|
-
font-size: 14px;
|
|
39
|
-
font-weight: 500;
|
|
40
|
-
margin-bottom: 12px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
</style>
|