feat: update monitor, terminal, and SFTP interaction flow

This commit is contained in:
liumangmang
2026-04-01 15:22:51 +08:00
parent 832d55c722
commit 9f133bd337
6 changed files with 644 additions and 564 deletions

View File

@@ -3,7 +3,7 @@ import { nextTick, ref, onMounted, onUnmounted, watch } from 'vue'
import { Terminal } from 'xterm'
import { FitAddon } from '@xterm/addon-fit'
import { useAuthStore } from '../stores/auth'
import axios from 'axios'
import client from '../api/client'
import { Activity, Cpu, HardDrive, MemoryStick, Clock, ChevronUp, ChevronDown } from 'lucide-vue-next'
import 'xterm/css/xterm.css'
@@ -74,7 +74,7 @@ async function fetchMonitorData() {
if (!props.active || status.value !== 'connected') return
monitorLoading.value = true
try {
const res = await axios.get(`/api/monitor/${props.connectionId}`)
const res = await client.get(`/monitor/${props.connectionId}`)
monitorData.value = res.data
} catch {
// 静默失败,不影响终端使用