1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 16:29:17 +08:00

fix: 修改计划任务样式 (#2744)

This commit is contained in:
ssongliu 2023-10-31 20:49:53 +08:00 committed by GitHub
parent e35d0c9aed
commit 000f175d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 59 additions and 20 deletions

View File

@ -284,8 +284,9 @@ const message = {
home: {
restart_1panel: 'Restart Panel',
restart_system: 'Restart Server',
restartHelper:
'Do you want to perform the operation [{0}] on this machine? This action will temporarily disable the service. Do you want to continue?',
panel: '1Panel',
system: '1Panel Server',
restartHelper: 'About to restart {0}, do you want to continue?',
operationSuccess: 'Operation successful! Restarting, please wait...',
overview: 'Overview',
entranceHelper:
@ -739,6 +740,9 @@ const message = {
record: 'Records',
shell: 'Shell script',
log: 'Backup logs',
ogHelper1: '1.1Panel System log ',
logHelper2: '2. SSH login log of the server ',
logHelper3: '3. All site logs ',
containerCheckBox: 'In container (no need to enter the container command)',
containerName: 'Container name',
ntp: 'Time synchronization',

View File

@ -281,8 +281,10 @@ const message = {
},
home: {
restart_1panel: '重啟面板',
restart_system: '重啟伺服器',
restartHelper: '您是否要對這台機器執行 [{0}] 操作此操作將導致服務暫時無法使用您要繼續嗎',
restart_system: '重啟服務器',
panel: '1Panel 面板',
system: '1Panel 服務器',
restartHelper: '即將重新啟動 {0}是否繼續',
operationSuccess: '操作成功正在重啟請稍候...',
overview: '概覽',
entranceHelper: '設置安全入口有利於提高系統的安全性如有需要前往 面板設置-安全 啟用安全入口',
@ -709,10 +711,13 @@ const message = {
taskType: '任務類型',
record: '報告',
shell: 'Shell 腳本',
log: '日誌備份',
log: '備份日誌',
logHelper1: '1. 1Panel 系統日誌',
logHelper2: '2. 服務器的 SSH 登錄日誌',
logHelper3: '3. 所有網站日誌',
containerCheckBox: '在容器中執行無需再輸入進入容器命令',
containerName: '容器名稱',
ntp: '時間同步',
ntp: '同步服務器時間',
app: '備份應用',
website: '備份網站',
rulesHelper: '當存在多個壓縮排除規則時需要換行顯示\n*.log \n*.sql',

View File

@ -282,7 +282,9 @@ const message = {
home: {
restart_1panel: '重启面板',
restart_system: '重启服务器',
restartHelper: '是否对该机器进行 [{0}] 操作该操作将导致服务暂时不可用是否继续',
panel: '1Panel 面板',
system: '1Panel 服务器',
restartHelper: '即将重新启动 {0}是否继续',
operationSuccess: '操作成功正在重启请稍候...',
overview: '概览',
entranceHelper: '设置安全入口有利于提高系统的安全性如有需要前往 面板设置-安全 启用安全入口',
@ -710,10 +712,13 @@ const message = {
taskType: '任务类型',
record: '报告',
shell: 'Shell 脚本',
log: '日志备份',
log: '备份日志',
logHelper1: '1. 1Panel 系统日志',
logHelper2: '2. 服务器的 SSH 登录日志',
logHelper3: '3. 所有网站日志',
containerCheckBox: '在容器中执行无需再输入进入容器命令',
containerName: '容器名称',
ntp: '时间同步',
ntp: '同步服务器时间',
app: '备份应用',
website: '备份网站',
rulesHelper: '当存在多个压缩排除规则时需要换行显示\n*.log \n*.sql',

View File

@ -23,14 +23,34 @@
<el-option value="website" :label="$t('cronjob.website')" />
<el-option value="database" :label="$t('cronjob.database')" />
<el-option value="directory" :label="$t('cronjob.directory')" />
<el-option value="snapshot" :label="$t('cronjob.snapshot')" />
<el-option value="log" :label="$t('cronjob.log')" />
<el-option value="curl" :label="$t('cronjob.curl')" />
<el-option value="ntp" :label="$t('cronjob.ntp')" />
<el-option value="cutWebsiteLog" :label="$t('cronjob.cutWebsiteLog')" />
<el-option value="clean" :label="$t('setting.diskClean')" />
<el-option value="log" :label="$t('cronjob.log')" />
<el-option value="snapshot" :label="$t('cronjob.snapshot')" />
<el-option value="ntp" :label="$t('cronjob.ntp')" />
</el-select>
<el-tag v-else>{{ $t('cronjob.' + dialogData.rowData!.type) }}</el-tag>
<div v-if="dialogData.rowData!.type === 'log'" class="logText">
<span class="input-help">
{{ $t('cronjob.logHelper1') }}
<el-link class="link" icon="Position" @click="goRouter('/logs/system')" type="primary">
{{ $t('firewall.quickJump') }}
</el-link>
</span>
<span class="input-help">
{{ $t('cronjob.logHelper2') }}
<el-link class="link" icon="Position" @click="goRouter('/logs/ssh')" type="primary">
{{ $t('firewall.quickJump') }}
</el-link>
</span>
<span class="input-help">
{{ $t('cronjob.logHelper3') }}
<el-link class="link" icon="Position" @click="goRouter('/logs/website')" type="primary">
{{ $t('firewall.quickJump') }}
</el-link>
</span>
</div>
</el-form-item>
<el-form-item :label="$t('cronjob.taskName')" prop="name">
@ -633,4 +653,12 @@ defineExpose({
font-size: 12px;
margin-top: 5px;
}
.logText {
line-height: 22px;
font-size: 12px;
.link {
font-size: 12px;
margin-top: -3px;
}
}
</style>

View File

@ -10,7 +10,7 @@
>
<template #route-button>
<div class="router-button">
<el-button link type="primary" @click="restart('1panel')">
<el-button link type="primary" @click="restart('panel')">
{{ $t('home.restart_1panel') }}
</el-button>
<el-divider direction="vertical" />
@ -542,7 +542,7 @@ const loadSafeStatus = async () => {
const restart = async (type: string) => {
ElMessageBox.confirm(
i18n.global.t('home.restartHelper', [i18n.global.t('home.restart_' + type)]),
i18n.global.t('home.restartHelper', [i18n.global.t('home.' + type)]),
i18n.global.t('commons.msg.operate'),
{
confirmButtonText: i18n.global.t('commons.button.confirm'),

View File

@ -21,7 +21,7 @@
>
<el-checkbox v-model="form.input" :label="$t('container.input')" />
<el-select v-if="!form.input" clearable v-model="form.bindAddress">
<el-option value="0.0.0.0" :label="$t('setting.bindAll') + ' (0.0.0.0)'"></el-option>
<el-option value="0.0.0.0" label="0.0.0.0"></el-option>
<div v-for="item in interfaceOptions" :key="item">
<el-option v-if="item.indexOf(':') === -1" :value="item" :label="item" />
</div>
@ -31,7 +31,7 @@
<el-form-item v-else :label="$t('setting.bindAddress')" prop="bindAddress" :rules="Rules.ipV6">
<el-checkbox v-model="form.input" :label="$t('container.input')" />
<el-select v-if="!form.input" clearable v-model="form.bindAddress">
<el-option value="::" :label="$t('setting.bindAll') + ' (::)'"></el-option>
<el-option value="::" label="::"></el-option>
<div v-for="item in interfaceOptions" :key="item">
<el-option v-if="item.indexOf(':') !== -1" :value="item" :label="item" />
</div>

View File

@ -16,7 +16,7 @@
</el-input>
</el-form-item>
<el-form-item :label="$t('setting.bindInfo')" prop="bindAddress">
<el-input disabled v-model="form.bindAddressItem">
<el-input disabled v-model="form.bindAddress">
<template #append>
<el-button @click="onChangeBind" icon="Setting">
{{ $t('commons.button.set') }}
@ -200,7 +200,6 @@ const form = reactive({
serverPort: 9999,
ipv6: 'disable',
bindAddress: '',
bindAddressItem: '',
ssl: 'disable',
sslType: 'self',
securityEntrance: '',
@ -220,8 +219,6 @@ const search = async () => {
form.serverPort = Number(res.data.serverPort);
form.ipv6 = res.data.ipv6;
form.bindAddress = res.data.bindAddress;
let proto = form.ipv6 === 'enable' ? 'ipv6' : 'ipv4';
form.bindAddressItem = ' [' + proto + '] ' + res.data.bindAddress;
form.ssl = res.data.ssl;
form.sslType = res.data.sslType;
if (form.ssl === 'enable') {