mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-16 20:42:40 +08:00
style: Adjust the style of the ssh configuration page (#8560)
This commit is contained in:
parent
7534b680a7
commit
36e0aece06
4 changed files with 92 additions and 86 deletions
|
|
@ -164,6 +164,7 @@
|
|||
<CodemirrorPro
|
||||
class="mt-5"
|
||||
:heightDiff="loadHeight()"
|
||||
:minHeight="350"
|
||||
v-model="dockerConf"
|
||||
mode="json"
|
||||
placeholder="# The Docker configuration file does not exist or is empty (/etc/docker/daemon.json)"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
<LayoutContent>
|
||||
<template #main>
|
||||
<MainDiv :heightDiff="320">
|
||||
<el-radio-group v-model="confShowType" @change="changeMode">
|
||||
<el-radio-button value="base">{{ $t('database.baseConf') }}</el-radio-button>
|
||||
<el-radio-button value="all">{{ $t('database.allConf') }}</el-radio-button>
|
||||
|
|
@ -113,16 +112,16 @@
|
|||
|
||||
<div v-if="confShowType === 'all'">
|
||||
<CodemirrorPro
|
||||
:heightDiff="400"
|
||||
:heightDiff="450"
|
||||
:minHeight="350"
|
||||
class="mt-5"
|
||||
v-model="sshConf"
|
||||
placeholder="# The SSH configuration file does not exist or is empty (/etc/ssh/sshd_config)"
|
||||
></CodemirrorPro>
|
||||
<el-button :disabled="loading" type="primary" @click="onSaveFile" style="margin-top: 5px">
|
||||
<el-button :disabled="loading" type="primary" @click="onSaveFile" class="mt-2.5">
|
||||
{{ $t('commons.button.save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</MainDiv>
|
||||
</template>
|
||||
</LayoutContent>
|
||||
|
||||
|
|
@ -140,7 +139,6 @@ import PubKey from '@/views/host/ssh/ssh/pubkey/index.vue';
|
|||
import Root from '@/views/host/ssh/ssh/root/index.vue';
|
||||
import Port from '@/views/host/ssh/ssh/port/index.vue';
|
||||
import Address from '@/views/host/ssh/ssh/address/index.vue';
|
||||
import MainDiv from '@/components/main-div/index.vue';
|
||||
import i18n from '@/lang';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { getSSHConf, getSSHInfo, operateSSH, updateSSH, updateSSHByfile } from '@/api/modules/host';
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
>
|
||||
<template #default="{ row }">
|
||||
<el-text type="primary" class="cursor-pointer" @click="onInspect(row)">
|
||||
{{ row.name }}
|
||||
{{ row.name === 'localhost' ? $t('terminal.local') : row.name }}
|
||||
</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -160,6 +160,11 @@ const search = async () => {
|
|||
bac.varsJson = JSON.parse(bac.vars);
|
||||
}
|
||||
}
|
||||
data.value.sort((a, b) => {
|
||||
if (a.name === 'localhost') return -1;
|
||||
if (b.name === 'localhost') return 1;
|
||||
return 0;
|
||||
});
|
||||
paginationConfig.total = res.data.total;
|
||||
})
|
||||
.catch(() => {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
<DrawerPro v-model="drawerVisible" :header="title + $t('setting.backupAccount')" @close="handleClose" size="large">
|
||||
<el-form @submit.prevent ref="formRef" v-loading="loading" label-position="top" :model="dialogData.rowData">
|
||||
<el-form-item :label="$t('commons.table.name')" prop="name" :rules="Rules.requiredInput">
|
||||
<el-tag v-if="dialogData.title === 'edit'">{{ dialogData.rowData!.name }}</el-tag>
|
||||
<el-tag v-if="dialogData.title === 'edit'">
|
||||
{{ dialogData.rowData!.name === 'localhost' ? $t('terminal.local') : dialogData.rowData!.name }}
|
||||
</el-tag>
|
||||
<el-input v-else v-model="dialogData.rowData!.name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue