Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions frontend/src/lang/modules/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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',
Expand Down
13 changes: 9 additions & 4 deletions frontend/src/lang/modules/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,10 @@ const message = {
},
home: {
restart_1panel: '重啟面板',
restart_system: '重啟伺服器',
restartHelper: '您是否要對這台機器執行 [{0}] 操作?此操作將導致服務暫時無法使用。您要繼續嗎?',
restart_system: '重啟服務器',
panel: '1Panel 面板',
system: '1Panel 服務器',
restartHelper: '即將重新啟動 {0},是否繼續?',
operationSuccess: '操作成功!正在重啟,請稍候...',
overview: '概覽',
entranceHelper: '設置安全入口有利於提高系統的安全性,如有需要,前往 面板設置-安全 中,啟用安全入口',
Expand Down Expand Up @@ -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',
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/lang/modules/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ const message = {
home: {
restart_1panel: '重启面板',
restart_system: '重启服务器',
restartHelper: '是否对该机器进行 [{0}] 操作,该操作将导致服务暂时不可用,是否继续?',
panel: '1Panel 面板',
system: '1Panel 服务器',
restartHelper: '即将重新启动 {0},是否继续?',
operationSuccess: '操作成功!正在重启,请稍候...',
overview: '概览',
entranceHelper: '设置安全入口有利于提高系统的安全性,如有需要,前往 面板设置-安全 中,启用安全入口',
Expand Down Expand Up @@ -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',
Expand Down
34 changes: 31 additions & 3 deletions frontend/src/views/cronjob/operate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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>
4 changes: 2 additions & 2 deletions frontend/src/views/home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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'),
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/setting/safe/bind/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/views/setting/safe/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down Expand Up @@ -200,7 +200,6 @@ const form = reactive({
serverPort: 9999,
ipv6: 'disable',
bindAddress: '',
bindAddressItem: '',
ssl: 'disable',
sslType: 'self',
securityEntrance: '',
Expand All @@ -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') {
Expand Down
Loading