Skip to content

Commit

Permalink
fix: 周期任务添加最低任务间隔时间配置 --bug=120737215
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 25313
  • Loading branch information
ywywZhou authored and luofann committed Nov 29, 2024
1 parent f8a8947 commit fad6be2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions frontend/desktop/src/assets/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
var BK_PAAS_SHARED_RES_URL = '{{BK_PAAS_SHARED_RES_URL}}'
var APP_NAME = '{{APP_NAME}}'
var RUN_VER_NAME = '{{RUN_VER_NAME}}'
var PERIODIC_TASK_SHORTEST_TIME = {{PERIODIC_TASK_SHORTEST_TIME}}
// 是否开启通知中心
var ENABLE_NOTICE_CENTER = {{ENABLE_NOTICE_CENTER}}
function getCookie(name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<!-- corn 规则 tips -->
<div id="periodic-cron-tips-html">
<img style="width:542px;height: 258px;" class="ui-img" :src="periodicCronImg">
<p v-if="shortestTime" class="shortest-time-tips">
{{ $t('当前环境配置周期任务间隔不低于 n 分钟,如有特殊需求请联系管理员配置', { n: shortestTime }) }}
</p>
</div>
<div class="time-input">
<input
Expand Down Expand Up @@ -102,7 +105,8 @@
theme: 'light',
content: '#periodic-cron-tips-html',
placement: 'top-start'
}
},
shortestTime: window.PERIODIC_TASK_SHORTEST_TIME
}
},
watch: {
Expand Down Expand Up @@ -350,5 +354,9 @@
.tippy-tooltip {
padding: initial;
}
.shortest-time-tips {
padding: 10px 5px;
color: #ff9c01;
}
}
</style>
3 changes: 2 additions & 1 deletion frontend/desktop/src/config/i18n/cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,8 @@ const cn = {
'联系bk助手': '联系bk助手',
'蓝鲸桌面': '蓝鲸桌面',
'蓝鲸': '蓝鲸',
'请输入群 ID,多个 ID 以分号隔开': '请输入群 ID,多个 ID 以分号隔开'
'请输入群 ID,多个 ID 以分号隔开': '请输入群 ID,多个 ID 以分号隔开',
'当前环境配置周期任务间隔不低于 n 分钟,如有特殊需求请联系管理员配置': '当前环境配置周期任务间隔不低于 {n} 分钟,如有特殊需求请联系管理员配置'
}

export default cn
3 changes: 2 additions & 1 deletion frontend/desktop/src/config/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,8 @@ const en = {
'联系bk助手': 'Contact BK Assistant',
'蓝鲸桌面': 'BlueWhale Desktop',
'蓝鲸': 'BlueKing',
'请输入群 ID,多个 ID 以分号隔开': 'Please enter group IDs, separated by semicolons if there are multiple IDs'
'请输入群 ID,多个 ID 以分号隔开': 'Please enter group IDs, separated by semicolons if there are multiple IDs',
'当前环境配置周期任务间隔不低于 n 分钟,如有特殊需求请联系管理员配置': 'In the current environment, the interval for scheduled tasks is no less than {n} minutes. If you have special requirements, please contact the administrator for configuration'
}

export default en

0 comments on commit fad6be2

Please sign in to comment.