mirror of
https://github.com/acepanel/panel.git
synced 2026-02-06 16:21:03 +08:00
feat: 添加磁盘管理工具到工具箱 (#1195)
* Initial plan * 实现磁盘管理工具的后端和前端基础功能 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * 完成磁盘管理工具功能实现并验证构建成功 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * 添加输入验证防止命令注入攻击 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * 移除命令注入验证并修复评审意见 Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> * feat: merge main * feat: merge main * feat: 分区优化 * feat: fstab管理 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com> Co-authored-by: 耗子 <haozi@loli.email>
This commit is contained in:
1020
web/src/views/toolbox/DiskView.vue
Normal file
1020
web/src/views/toolbox/DiskView.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,8 +4,9 @@ defineOptions({
|
||||
})
|
||||
|
||||
import BenchmarkView from '@/views/toolbox/BenchmarkView.vue'
|
||||
import DiskView from '@/views/toolbox/DiskView.vue'
|
||||
import ProcessView from '@/views/toolbox/ProcessView.vue'
|
||||
import SSHView from '@/views/toolbox/SSHView.vue'
|
||||
import SshView from '@/views/toolbox/SshView.vue'
|
||||
import SystemView from '@/views/toolbox/SystemView.vue'
|
||||
import WebHookView from '@/views/toolbox/WebHookView.vue'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
@@ -21,6 +22,7 @@ const current = ref('process')
|
||||
<n-tab name="process" :tab="$gettext('Process')" />
|
||||
<n-tab name="system" :tab="$gettext('System')" />
|
||||
<n-tab name="ssh" tab="SSH" />
|
||||
<n-tab name="disk" :tab="$gettext('Disk')" />
|
||||
<n-tab name="webhook" :tab="$gettext('WebHook')" />
|
||||
<n-tab name="benchmark" :tab="$gettext('Benchmark')" />
|
||||
</n-tabs>
|
||||
@@ -28,7 +30,8 @@ const current = ref('process')
|
||||
<n-flex vertical>
|
||||
<process-view v-if="current === 'process'" />
|
||||
<system-view v-if="current === 'system'" />
|
||||
<s-s-h-view v-if="current === 'ssh'" />
|
||||
<ssh-view v-if="current === 'ssh'" />
|
||||
<disk-view v-if="current === 'disk'" />
|
||||
<web-hook-view v-if="current === 'webhook'" />
|
||||
<benchmark-view v-if="current === 'benchmark'" />
|
||||
</n-flex>
|
||||
|
||||
@@ -224,20 +224,16 @@ onMounted(() => {
|
||||
<template>
|
||||
<n-spin :show="loading">
|
||||
<n-flex vertical :size="24">
|
||||
<!-- SSH 服务状态 -->
|
||||
<!-- SSH 服务 -->
|
||||
<n-card :title="$gettext('SSH Service')">
|
||||
<n-flex align="center" :size="12">
|
||||
<n-text strong>{{ $gettext('SSH Service Status') }}</n-text>
|
||||
<n-switch :value="sshStatus" :loading="loading" @update:value="handleToggleSSH" />
|
||||
<n-button :loading="loading" @click="handleRestartSSH">
|
||||
{{ $gettext('Restart') }}
|
||||
</n-button>
|
||||
</n-flex>
|
||||
</n-card>
|
||||
|
||||
<!-- SSH 基础设置 -->
|
||||
<n-card :title="$gettext('SSH Basic Settings')">
|
||||
<n-flex vertical :size="16">
|
||||
<n-flex align="center" :size="12">
|
||||
<n-text strong>{{ $gettext('SSH Service Status') }}</n-text>
|
||||
<n-switch :value="sshStatus" :loading="loading" @update:value="handleToggleSSH" />
|
||||
<n-button :loading="loading" @click="handleRestartSSH">
|
||||
{{ $gettext('Restart') }}
|
||||
</n-button>
|
||||
</n-flex>
|
||||
<!-- SSH 密码登录 -->
|
||||
<n-flex vertical :size="4">
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -250,7 +246,6 @@ onMounted(() => {
|
||||
</n-flex>
|
||||
<n-text depth="3">{{ $gettext('Allow password authentication for SSH login') }}</n-text>
|
||||
</n-flex>
|
||||
|
||||
<!-- SSH 密钥登录 -->
|
||||
<n-flex vertical :size="4">
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -265,7 +260,6 @@ onMounted(() => {
|
||||
$gettext('Allow public key authentication for SSH login')
|
||||
}}</n-text>
|
||||
</n-flex>
|
||||
|
||||
<!-- SSH 端口 -->
|
||||
<n-flex vertical :size="4">
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -299,7 +293,6 @@ onMounted(() => {
|
||||
@update:value="handleUpdateRootLogin"
|
||||
/>
|
||||
</n-flex>
|
||||
|
||||
<!-- Root 密码 -->
|
||||
<n-flex vertical :size="8">
|
||||
<n-text strong>{{ $gettext('Root Password') }}</n-text>
|
||||
@@ -332,7 +325,6 @@ onMounted(() => {
|
||||
}}
|
||||
</n-text>
|
||||
</n-flex>
|
||||
|
||||
<!-- Root 密钥 -->
|
||||
<n-flex vertical :size="4">
|
||||
<n-flex align="center" :size="12">
|
||||
@@ -290,7 +290,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<n-flex vertical>
|
||||
<n-flex justify="end">
|
||||
<n-flex>
|
||||
<n-button type="primary" @click="createModal = true">
|
||||
{{ $gettext('Create WebHook') }}
|
||||
</n-button>
|
||||
|
||||
Reference in New Issue
Block a user