From df021819b41c4a18fa670e06f4c09ffcde83f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 17 Oct 2024 17:18:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=A7=E5=B9=85=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/app/IndexView.vue | 11 +++--- web/src/views/apps/fail2ban/IndexView.vue | 29 +++++++++------ web/src/views/apps/mysql/IndexView.vue | 24 ++++++++++-- web/src/views/apps/nginx/IndexView.vue | 24 ++++++++++-- web/src/views/apps/php/IndexView.vue | 39 ++++++++++++++++---- web/src/views/apps/postgresql/IndexView.vue | 24 ++++++++++-- web/src/views/apps/pureftpd/IndexView.vue | 15 +++++--- web/src/views/apps/redis/IndexView.vue | 24 ++++++++++-- web/src/views/apps/rsync/IndexView.vue | 31 ++++++++++++---- web/src/views/apps/s3fs/IndexView.vue | 9 ++--- web/src/views/apps/supervisor/IndexView.vue | 30 ++++++++++++--- web/src/views/backup/ListView.vue | 16 +++++--- web/src/views/cert/AccountView.vue | 23 +++++++++--- web/src/views/cert/CertView.vue | 16 ++++---- web/src/views/cert/DnsView.vue | 15 +++++--- web/src/views/container/ContainerView.vue | 19 +++++++--- web/src/views/container/ImageView.vue | 20 ++++++---- web/src/views/container/NetworkView.vue | 22 +++++++---- web/src/views/container/VolumeView.vue | 19 +++++++--- web/src/views/cron/IndexView.vue | 27 ++++++++++---- web/src/views/file/ListTable.vue | 41 ++++++++++++++++----- web/src/views/safe/IndexView.vue | 16 ++++---- web/src/views/task/IndexView.vue | 11 +++--- web/src/views/website/IndexView.vue | 16 ++++---- 24 files changed, 372 insertions(+), 149 deletions(-) diff --git a/web/src/views/app/IndexView.vue b/web/src/views/app/IndexView.vue index dedda3fb87..a7d48f83ef 100644 --- a/web/src/views/app/IndexView.vue +++ b/web/src/views/app/IndexView.vue @@ -20,26 +20,27 @@ const columns: any = [ { title: t('appIndex.columns.name'), key: 'name', - width: 200, + minWidth: 200, resizable: true, ellipsis: { tooltip: true } }, { title: t('appIndex.columns.description'), key: 'description', + minWidth: 200, resizable: true, ellipsis: { tooltip: true } }, { title: t('appIndex.columns.installedVersion'), key: 'installed_version', - width: 100, + minWidth: 100, ellipsis: { tooltip: true } }, { title: t('appIndex.columns.show'), key: 'show', - width: 100, + minWidth: 100, align: 'center', render(row: any) { return h(NSwitch, { @@ -53,9 +54,8 @@ const columns: any = [ { title: t('appIndex.columns.actions'), key: 'actions', - width: 280, + minWidth: 280, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -238,6 +238,7 @@ onMounted(() => { { { { }) const loadColumns: any = [ - { title: '属性', key: 'name', fixed: 'left', resizable: true, ellipsis: { tooltip: true } }, - { title: '当前值', key: 'value', width: 200, ellipsis: { tooltip: true } } + { + title: '属性', + key: 'name', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '当前值', + key: 'value', + minWidth: 200, + ellipsis: { tooltip: true } + } ] const load = ref([]) @@ -243,7 +254,14 @@ onMounted(() => { - + { }) const columns: any = [ - { title: '属性', key: 'name', fixed: 'left', resizable: true, ellipsis: { tooltip: true } }, - { title: '当前值', key: 'value', width: 200, ellipsis: { tooltip: true } } + { + title: '属性', + key: 'name', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '当前值', + key: 'value', + minWidth: 200, + ellipsis: { tooltip: true } + } ] const load = ref([]) @@ -197,7 +208,14 @@ onMounted(() => { - + ([]) @@ -319,6 +334,7 @@ onMounted(() => { { - + { }) const loadColumns: any = [ - { title: '属性', key: 'name', fixed: 'left', resizable: true, ellipsis: { tooltip: true } }, - { title: '当前值', key: 'value', width: 200, ellipsis: { tooltip: true } } + { + title: '属性', + key: 'name', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '当前值', + key: 'value', + minWidth: 200, + ellipsis: { tooltip: true } + } ] const load = ref([]) @@ -233,7 +244,14 @@ onMounted(() => { - + { { }) const loadColumns: any = [ - { title: '属性', key: 'name', fixed: 'left', resizable: true, ellipsis: { tooltip: true } }, - { title: '当前值', key: 'value', width: 200, ellipsis: { tooltip: true } } + { + title: '属性', + key: 'name', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '当前值', + key: 'value', + minWidth: 200, + ellipsis: { tooltip: true } + } ] const load = ref([]) @@ -161,7 +172,14 @@ onMounted(() => { - + diff --git a/web/src/views/apps/rsync/IndexView.vue b/web/src/views/apps/rsync/IndexView.vue index fea812dece..6fc9bae3df 100644 --- a/web/src/views/apps/rsync/IndexView.vue +++ b/web/src/views/apps/rsync/IndexView.vue @@ -43,21 +43,37 @@ const processColumns: any = [ { title: '名称', key: 'name', - width: 200, - fixed: 'left', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '目录', + key: 'path', + minWidth: 250, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '用户', + key: 'auth_user', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, + { + title: '主机', + key: 'hosts_allow', + minWidth: 250, resizable: true, ellipsis: { tooltip: true } }, - { title: '目录', key: 'path', width: 250, resizable: true, ellipsis: { tooltip: true } }, - { title: '用户', key: 'auth_user', width: 200, resizable: true, ellipsis: { tooltip: true } }, - { title: '主机', key: 'hosts_allow', width: 250, resizable: true, ellipsis: { tooltip: true } }, { title: '备注', key: 'comment', resizable: true, ellipsis: { tooltip: true } }, { title: '操作', key: 'actions', - width: 200, + minWidth: 200, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -299,6 +315,7 @@ onMounted(() => { { { { ([]) const algorithms = ref([]) const accountColumns: any = [ - { title: '邮箱', key: 'email', resizable: true, ellipsis: { tooltip: true } }, + { + title: '邮箱', + key: 'email', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, { title: 'CA', key: 'ca', - width: 150, + minWidth: 150, resizable: true, ellipsis: { tooltip: true }, render(row: any) { @@ -61,13 +67,18 @@ const accountColumns: any = [ ) } }, - { title: '密钥类型', key: 'key_type', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: '密钥类型', + key: 'key_type', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '操作', key: 'actions', - width: 200, + minWidth: 200, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -202,8 +213,8 @@ onMounted(() => { { () const dnsProviders = ref([]) const dnsColumns: any = [ - { title: '备注名称', key: 'name', resizable: true, ellipsis: { tooltip: true } }, + { + title: '备注名称', + key: 'name', + minWidth: 200, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '类型', key: 'type', - width: 150, + minWidth: 150, resizable: true, ellipsis: { tooltip: true }, render(row: any) { @@ -69,9 +75,8 @@ const dnsColumns: any = [ { title: '操作', key: 'actions', - width: 200, + minWidth: 200, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -203,8 +208,8 @@ onMounted(async () => { { const columns: any = [ { type: 'selection', fixed: 'left' }, - { title: '容器名', key: 'name', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: '容器名', + key: 'name', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '状态', key: 'state', - width: 100, + minWidth: 100, resizable: true, render(row: any) { return h(NSwitch, { @@ -46,10 +52,11 @@ const columns: any = [ }) } }, - { title: '镜像', key: 'image', width: 300, resizable: true, ellipsis: { tooltip: true } }, + { title: '镜像', key: 'image', minWidth: 300, resizable: true, ellipsis: { tooltip: true } }, { title: '端口(主机->容器)', key: 'ports', + minWidth: 100, resizable: true, ellipsis: { tooltip: true }, render(row: any) { @@ -63,16 +70,15 @@ const columns: any = [ { title: '运行状态', key: 'status', - width: 300, + minWidth: 300, resizable: true, ellipsis: { tooltip: true } }, { title: '操作', key: 'actions', - width: 250, + minWidth: 250, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -433,6 +439,7 @@ onMounted(() => { { const columns: any = [ { type: 'selection', fixed: 'left' }, - { title: 'ID', key: 'id', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: 'ID', + key: 'id', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '容器数', key: 'containers', - width: 100, + minWidth: 100, resizable: true, ellipsis: { tooltip: true } }, { title: '镜像', key: 'repo_tags', - width: 300, + minWidth: 300, resizable: true, ellipsis: { tooltip: true }, render(row: any): any { @@ -50,23 +56,22 @@ const columns: any = [ { title: '大小', key: 'size', - width: 150, + minWidth: 150, resizable: true, ellipsis: { tooltip: true } }, { title: '创建时间', key: 'created', - width: 200, + minWidth: 200, resizable: true, ellipsis: { tooltip: true } }, { title: '操作', key: 'actions', - width: 120, + minWidth: 120, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -174,6 +179,7 @@ onMounted(() => { { const columns: any = [ { type: 'selection', fixed: 'left' }, - { title: '名称', key: 'name', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: '名称', + key: 'name', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '驱动', key: 'driver', - width: 100, + minWidth: 100, resizable: true, ellipsis: { tooltip: true } }, { title: '范围', key: 'scope', - width: 100, + minWidth: 100, resizable: true, ellipsis: { tooltip: true } }, { title: '子网', key: 'subnet', - width: 150, + minWidth: 150, resizable: true, ellipsis: { tooltip: true }, render(row: any): any { @@ -79,7 +85,7 @@ const columns: any = [ { title: '网关', key: 'gateway', - width: 150, + minWidth: 150, resizable: true, ellipsis: { tooltip: true }, render(row: any): any { @@ -96,16 +102,15 @@ const columns: any = [ { title: '创建时间', key: 'created', - width: 200, + minWidth: 200, resizable: true, ellipsis: { tooltip: true } }, { title: '操作', key: 'actions', - width: 120, + minWidth: 120, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -213,6 +218,7 @@ onMounted(() => { { const columns: any = [ { type: 'selection', fixed: 'left' }, - { title: '名称', key: 'id', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: '名称', + key: 'id', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '驱动', key: 'driver', - width: 100, + minWidth: 100, resizable: true, ellipsis: { tooltip: true } }, { title: '范围', key: 'scope', - width: 100, + minWidth: 100, resizable: true, ellipsis: { tooltip: true } }, @@ -44,21 +50,21 @@ const columns: any = [ title: '挂载点', key: 'mount', resizable: true, + minWidth: 150, ellipsis: { tooltip: true } }, { title: '创建时间', key: 'created', - width: 200, + minWidth: 200, resizable: true, ellipsis: { tooltip: true } }, { title: '操作', key: 'actions', - width: 120, + minWidth: 120, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -166,6 +172,7 @@ onMounted(() => { ([]) const columns: any = [ { type: 'selection', fixed: 'left' }, - { title: '任务名', key: 'name', width: 150, resizable: true, ellipsis: { tooltip: true } }, + { + title: '任务名', + key: 'name', + minWidth: 150, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '任务类型', key: 'type', - width: 100, + minWidth: 100, resizable: true, render(row: any) { return row.type === 'shell' ? '运行脚本' : row.type === 'backup' ? '备份数据' : '切割日志' @@ -64,7 +70,7 @@ const columns: any = [ { title: '启用', key: 'status', - width: 60, + minWidth: 60, align: 'center', resizable: true, render(row: any) { @@ -76,11 +82,17 @@ const columns: any = [ }) } }, - { title: '任务周期', key: 'time', width: 100, resizable: true, ellipsis: { tooltip: true } }, + { + title: '任务周期', + key: 'time', + minWidth: 100, + resizable: true, + ellipsis: { tooltip: true } + }, { title: '创建时间', key: 'created_at', - width: 200, + minWidth: 200, resizable: true, ellipsis: { tooltip: true }, render(row: any): string { @@ -90,6 +102,7 @@ const columns: any = [ { title: '最后更新时间', key: 'updated_at', + minWidth: 200, ellipsis: { tooltip: true }, render(row: any): string { return formatDateTime(row.updated_at) @@ -98,9 +111,8 @@ const columns: any = [ { title: '操作', key: 'actions', - width: 280, + minWidth: 280, align: 'center', - fixed: 'right', hideInExcel: true, render(row: any) { return [ @@ -374,6 +386,7 @@ onMounted(() => { = [ { title: '名称', key: 'name', - width: '180', + minWidth: 180, ellipsis: { tooltip: true }, @@ -78,15 +78,35 @@ const columns: DataTableColumns = [ ) } }, - { title: '权限', key: 'mode', width: '80' }, - { title: '所有者', key: 'owner', width: '80' }, - { title: '组', key: 'group', width: '80' }, - { title: '大小', key: 'size', width: '80' }, - { title: '修改时间', key: 'modify', width: '150' }, + { + title: '权限', + key: 'mode', + minWidth: 80 + }, + { + title: '所有者', + key: 'owner', + minWidth: 80 + }, + { + title: '组', + key: 'group', + minWidth: 80 + }, + { + title: '大小', + key: 'size', + minWidth: 80 + }, + { + title: '修改时间', + key: 'modify', + minWidth: 150 + }, { title: '操作', key: 'action', - width: '340', + minWidth: 340, render(row) { return h( NSpace, @@ -355,7 +375,11 @@ onUnmounted(() => {