Skip to content

Commit 38dd7b5

Browse files
fix: trigger style
1 parent 945a803 commit 38dd7b5

File tree

5 files changed

+46
-26
lines changed

5 files changed

+46
-26
lines changed

ui/src/locales/lang/en-US/views/trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
title: 'Trigger',
33
tip: 'When triggered, the system will automatically call task execution based on the input parameters settings',
44
task: 'Task',
5-
next: 'Next Execution Time',
5+
nextTime: 'Next Execution Time',
66
triggerTask: 'Trigger Task',
77
taskExecution: 'Task Execution',
88
triggerSource: 'Trigger Source',

ui/src/locales/lang/zh-CN/views/trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
title: '触发器',
33
tip: '触发时系统将会根据入参设置自动调用任务执行',
44
task: '任务',
5-
next: '下次执行时间',
5+
nextTime: '下次执行时间',
66
triggerTask: '触发任务',
77
taskExecution: '任务执行',
88
triggerSource: '触发来源',

ui/src/locales/lang/zh-Hant/views/trigger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
title: '觸發器',
33
tip: '觸發時系統將會根據入參設置自動調用任務執行',
44
task: '任務',
5-
next: '下次執行時間',
5+
nextTime: '下次執行時間',
66
triggerTask: '觸發任務',
77
taskExecution: '任務執行',
88
triggerSource: '觸發來源',

ui/src/views/trigger/TriggerDrawer.vue

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,46 @@
105105
</div>
106106
<el-card v-if="form.trigger_type === 'EVENT'" shadow="never" class="card-never mt-16">
107107
<el-form-item :label="$t('views.trigger.from.event_url.label')">
108-
<div class="complex-input flex align-center w-full" style="background-color: #ffffff">
108+
<div
109+
class="complex-input flex-between align-center w-full"
110+
style="background-color: #ffffff"
111+
>
109112
<el-input
110113
class="complex-input__left"
111114
v-bind:modelValue="event_url"
112115
readonly
113116
></el-input>
114117

115118
<el-tooltip :content="$t('common.copy')" placement="top">
116-
<el-button text @click="copy">
119+
<el-button text @click="copyClick(event_url)" class="mr-4">
117120
<AppIcon iconName="app-copy" class="color-secondary"></AppIcon>
118121
</el-button>
119122
</el-tooltip>
120123
</div>
121124
</el-form-item>
122125
<el-form-item label="Bearer Token">
123-
<el-input
124-
type="password"
125-
:placeholder="$t('common.inputPlaceholder')"
126-
v-model="form.trigger_setting.token"
127-
show-password
128-
readonly
129-
>
130-
</el-input>
126+
<div class="complex-input flex-between w-full" style="background-color: #ffffff">
127+
<el-input
128+
class="complex-input__left"
129+
:placeholder="$t('common.inputPlaceholder')"
130+
v-model="form.trigger_setting.token"
131+
readonly
132+
style="width: 80%"
133+
>
134+
</el-input>
135+
<div>
136+
<el-tooltip :content="$t('common.copy')" placement="top">
137+
<el-button text @click="copyClick(form.trigger_setting.token)">
138+
<AppIcon iconName="app-copy" class="color-secondary"></AppIcon>
139+
</el-button>
140+
</el-tooltip>
141+
<el-tooltip :content="$t('common.refresh')" placement="top">
142+
<el-button @click="refreshToken" text style="margin: 0 4px 0 0 !important">
143+
<AppIcon iconName="app-refresh" class="color-secondary"></AppIcon>
144+
</el-button>
145+
</el-tooltip>
146+
</div>
147+
</div>
131148
</el-form-item>
132149
<el-form-item>
133150
<template #label>
@@ -538,9 +555,7 @@ const editPermission = computed(() => {
538555
})
539556
540557
const triggerFormRef = ref<FormInstance>()
541-
const copy = () => {
542-
copyClick(event_url.value)
543-
}
558+
544559
const addParameter = () => {
545560
form.value.trigger_setting.body.push({ field: '', type: '' })
546561
}
@@ -681,7 +696,7 @@ const getDefaultValue = () => {
681696
trigger_task: [],
682697
trigger_type: 'SCHEDULED',
683698
trigger_setting: {
684-
token: uuidv4().replace('-', ''),
699+
token: uuidv4().replace(/-/g, ''),
685700
body: [],
686701
},
687702
}
@@ -726,6 +741,10 @@ const init = (trigger_id: string) => {
726741
})
727742
}
728743
}
744+
745+
function refreshToken() {
746+
form.value.trigger_setting.token = uuidv4().replace(/-/g, '')
747+
}
729748
const current_trigger_id = ref<string>()
730749
const current_source_id = ref<string>()
731750
const current_source_type = ref<string>()

ui/src/views/trigger/index.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@
127127
</div>
128128
</template>
129129
</el-table-column>
130-
<el-table-column prop="trigger_type" :label="$t('common.type')" width="150">
130+
<el-table-column prop="trigger_type" :label="$t('common.type')" width="120">
131131
<template #default="{ row }">
132132
{{ $t(TriggerType[row.trigger_type as keyof typeof TriggerType]) }}
133133
</template>
134134
</el-table-column>
135-
<el-table-column prop="is_active" :label="$t('common.status.label')" width="150">
135+
<el-table-column prop="is_active" :label="$t('common.status.label')" width="120">
136136
<template #default="{ row }">
137137
<div v-if="row.is_active" class="flex align-center">
138138
<el-icon class="color-success mr-8" style="font-size: 16px">
@@ -150,19 +150,20 @@
150150
</div>
151151
</template>
152152
</el-table-column>
153+
153154
<el-table-column
154-
prop="next_run_time"
155-
:label="$t('views.trigger.next')"
155+
prop="desc"
156+
:label="$t('common.desc')"
156157
show-overflow-tooltip
158+
min-width="170"
157159
>
160+
</el-table-column>
161+
<el-table-column prop="next_run_time" :label="$t('views.trigger.nextTime')" width="175">
158162
<template #default="{ row }">
159163
{{ datetimeFormat(row.next_run_time) }}
160164
</template>
161165
</el-table-column>
162-
<el-table-column prop="desc" :label="$t('common.desc')" show-overflow-tooltip>
163-
</el-table-column>
164-
165-
<el-table-column prop="trigger_task" :label="$t('views.trigger.task')" width="180">
166+
<el-table-column prop="trigger_task" :label="$t('views.trigger.task')" width="150">
166167
<template #default="{ row }">
167168
<el-popover
168169
placement="top-start"
@@ -254,7 +255,7 @@
254255
</el-popover>
255256
</template>
256257
</el-table-column>
257-
<el-table-column prop="create_user" :label="$t('common.creator')" width="150">
258+
<el-table-column prop="create_user" :label="$t('common.creator')" width="130">
258259
</el-table-column>
259260
<el-table-column
260261
prop="create_time"

0 commit comments

Comments
 (0)