upload project source code
This commit is contained in:
740
后端源码/yifan.action-ai.cn/index/js/index.BYkCj64N.js
Normal file
740
后端源码/yifan.action-ai.cn/index/js/index.BYkCj64N.js
Normal file
@@ -0,0 +1,740 @@
|
||||
import { V as ElCol, T as ElCard, U as ElRow, l as ElTooltip, aY as ElProgress, a3 as ElDescriptions, a4 as ElDescriptionsItem, i as ElIcon, al as ElTable, am as ElTableColumn, u as ElEmpty } from "./element-plus.CkEW9frc.js";
|
||||
import { l as httpRequest } from "./index.CMd5bD1r.js";
|
||||
import { J as defineComponent, t as onMounted, aO as resolveComponent, S as openBlock, _ as createElementBlock, $ as createVNode, a0 as withCtx, o as unref, a1 as createBaseVNode, a9 as createTextVNode, aa as toDisplayString, r as ref } from "./.pnpm.BW3P1y8f.js";
|
||||
import "./codemirror.CvJAcn2d.js";
|
||||
const API_PATH = "/monitor/server";
|
||||
const ServerAPI = {
|
||||
// 获取服务信息
|
||||
getServer() {
|
||||
return httpRequest({
|
||||
url: `${API_PATH}/info`,
|
||||
method: "get"
|
||||
});
|
||||
}
|
||||
};
|
||||
const _hoisted_1 = { class: "app-container" };
|
||||
const _hoisted_2 = { class: "flex items-center gap-2" };
|
||||
const _hoisted_3 = { class: "text-center mb-4" };
|
||||
const _hoisted_4 = { class: "text-center mb-4" };
|
||||
const _hoisted_5 = { class: "flex items-center gap-2" };
|
||||
const _hoisted_6 = { class: "text-center mb-4" };
|
||||
const _hoisted_7 = { class: "text-center mb-4" };
|
||||
const _hoisted_8 = { class: "flex items-center gap-2" };
|
||||
const _hoisted_9 = { class: "flex items-center gap-2" };
|
||||
const _hoisted_10 = { class: "flex items-center gap-2" };
|
||||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const loading = ref(false);
|
||||
const server = ref({
|
||||
cpu: {
|
||||
cpu_num: 0,
|
||||
used: 0,
|
||||
sys: 0,
|
||||
free: 0
|
||||
},
|
||||
mem: {
|
||||
total: "",
|
||||
used: "",
|
||||
free: "",
|
||||
usage: 0
|
||||
},
|
||||
sys: {
|
||||
computer_name: "",
|
||||
os_name: "",
|
||||
computer_ip: "",
|
||||
os_arch: "",
|
||||
user_dir: ""
|
||||
},
|
||||
py: {
|
||||
name: "",
|
||||
version: "",
|
||||
start_time: "",
|
||||
run_time: "",
|
||||
home: "",
|
||||
memory_total: "",
|
||||
memory_used: "",
|
||||
memory_free: "",
|
||||
memory_usage: 0
|
||||
},
|
||||
disks: []
|
||||
});
|
||||
async function getList() {
|
||||
loading.value = true;
|
||||
try {
|
||||
const response = await ServerAPI.getServer();
|
||||
server.value = response.data.data;
|
||||
} catch (error) {
|
||||
console.error("获取服务器信息失败:", error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
const _component_Cpu = resolveComponent("Cpu");
|
||||
const _component_el_icon = ElIcon;
|
||||
const _component_QuestionFilled = resolveComponent("QuestionFilled");
|
||||
const _component_el_tooltip = ElTooltip;
|
||||
const _component_el_progress = ElProgress;
|
||||
const _component_el_descriptions_item = ElDescriptionsItem;
|
||||
const _component_el_descriptions = ElDescriptions;
|
||||
const _component_el_card = ElCard;
|
||||
const _component_el_col = ElCol;
|
||||
const _component_el_row = ElRow;
|
||||
const _component_Memo = resolveComponent("Memo");
|
||||
const _component_Monitor = resolveComponent("Monitor");
|
||||
const _component_Dish = resolveComponent("Dish");
|
||||
const _component_Files = resolveComponent("Files");
|
||||
const _component_el_empty = ElEmpty;
|
||||
const _component_el_table_column = ElTableColumn;
|
||||
const _component_el_table = ElTable;
|
||||
return openBlock(), createElementBlock("div", _hoisted_1, [
|
||||
createVNode(_component_el_row, { gutter: 16 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_col, {
|
||||
span: 12,
|
||||
class: "mb-4"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
loading: unref(loading),
|
||||
shadow: "hover"
|
||||
}, {
|
||||
header: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_2, [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_Cpu)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[0] || (_cache[0] = createBaseVNode("span", { class: "flex items-center gap-2" }, "CPU使用情况", -1)),
|
||||
createVNode(_component_el_tooltip, { content: "展示CPU核心数及使用率" }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_QuestionFilled)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_row, { gutter: 16 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_col, { span: 12 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, { shadow: "hover" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
_cache[1] || (_cache[1] = createBaseVNode("span", null, "核心数", -1)),
|
||||
createVNode(_component_el_tooltip, {
|
||||
content: (((_a = unref(server).cpu) == null ? void 0 : _a.cpu_num) || 0).toFixed(1)
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_3, [
|
||||
createVNode(_component_el_progress, {
|
||||
type: "circle",
|
||||
percentage: 100,
|
||||
format: () => {
|
||||
var _a2;
|
||||
return `${((_a2 = unref(server).cpu) == null ? void 0 : _a2.cpu_num) || 0}`;
|
||||
}
|
||||
}, null, 8, ["format"])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["content"]),
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 1,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "总核心数" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a2 = unref(server).cpu) == null ? void 0 : _a2.cpu_num) || 0), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "已用核心" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2, _b;
|
||||
return [
|
||||
createTextVNode(toDisplayString(Math.floor((((_a2 = unref(server).cpu) == null ? void 0 : _a2.used) || 0) * ((_b = unref(server).cpu) == null ? void 0 : _b.cpu_num) / 100)), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "空闲核心" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2, _b;
|
||||
return [
|
||||
createTextVNode(toDisplayString(Math.floor((((_a2 = unref(server).cpu) == null ? void 0 : _a2.free) || 0) * ((_b = unref(server).cpu) == null ? void 0 : _b.cpu_num) / 100)), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, { span: 12 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
shadow: "hover",
|
||||
class: "h-full"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
_cache[2] || (_cache[2] = createBaseVNode("span", null, "使用率", -1)),
|
||||
createVNode(_component_el_tooltip, {
|
||||
content: (((_a = unref(server).cpu) == null ? void 0 : _a.used) || 0).toFixed(1) + "%"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a2, _b, _c;
|
||||
return [
|
||||
createBaseVNode("div", _hoisted_4, [
|
||||
createVNode(_component_el_progress, {
|
||||
type: "circle",
|
||||
percentage: ((_a2 = unref(server).cpu) == null ? void 0 : _a2.used) || 0,
|
||||
status: ((_b = unref(server).cpu) == null ? void 0 : _b.used) > 80 ? "exception" : ((_c = unref(server).cpu) == null ? void 0 : _c.used) > 60 ? "warning" : "success"
|
||||
}, null, 8, ["percentage", "status"])
|
||||
])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, 8, ["content"]),
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 1,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "用户使用率" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((((_a2 = unref(server).cpu) == null ? void 0 : _a2.used) || 0).toFixed(1) + "%"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "系统使用率" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((((_a2 = unref(server).cpu) == null ? void 0 : _a2.sys) || 0).toFixed(1) + "%"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "当前空闲率" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((((_a2 = unref(server).cpu) == null ? void 0 : _a2.free) || 0).toFixed(1) + "%"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["loading"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, {
|
||||
span: 12,
|
||||
class: "mb-4"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
loading: unref(loading),
|
||||
shadow: "hover"
|
||||
}, {
|
||||
header: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_5, [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_Memo)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[3] || (_cache[3] = createBaseVNode("span", null, "内存使用情况", -1)),
|
||||
createVNode(_component_el_tooltip, { content: "展示系统内存和Python程序内存使用情况" }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_QuestionFilled)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_row, { gutter: 16 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_col, { span: 12 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
shadow: "hover",
|
||||
class: "h-full"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
_cache[4] || (_cache[4] = createBaseVNode("span", null, "系统内存", -1)),
|
||||
createVNode(_component_el_tooltip, {
|
||||
content: (((_a = unref(server).mem) == null ? void 0 : _a.usage) || 0).toFixed(1) + "%"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a2, _b, _c;
|
||||
return [
|
||||
createBaseVNode("div", _hoisted_6, [
|
||||
createVNode(_component_el_progress, {
|
||||
type: "circle",
|
||||
percentage: ((_a2 = unref(server).mem) == null ? void 0 : _a2.usage) || 0,
|
||||
status: ((_b = unref(server).mem) == null ? void 0 : _b.usage) > 80 ? "exception" : ((_c = unref(server).mem) == null ? void 0 : _c.usage) > 60 ? "warning" : "success"
|
||||
}, null, 8, ["percentage", "status"])
|
||||
])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, 8, ["content"]),
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 1,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "总内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).mem) == null ? void 0 : _a2.total), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "已用内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).mem) == null ? void 0 : _a2.used), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "空闲内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).mem) == null ? void 0 : _a2.free), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, { span: 12 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
shadow: "hover",
|
||||
class: "h-full"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
_cache[5] || (_cache[5] = createBaseVNode("span", null, "Python内存", -1)),
|
||||
createVNode(_component_el_tooltip, {
|
||||
content: (((_a = unref(server).py) == null ? void 0 : _a.memory_usage) || 0).toFixed(1) + "%"
|
||||
}, {
|
||||
default: withCtx(() => {
|
||||
var _a2, _b, _c;
|
||||
return [
|
||||
createBaseVNode("div", _hoisted_7, [
|
||||
createVNode(_component_el_progress, {
|
||||
type: "circle",
|
||||
percentage: ((_a2 = unref(server).py) == null ? void 0 : _a2.memory_usage) || 0,
|
||||
status: ((_b = unref(server).py) == null ? void 0 : _b.memory_usage) > 80 ? "exception" : ((_c = unref(server).py) == null ? void 0 : _c.memory_usage) > 60 ? "warning" : "success"
|
||||
}, null, 8, ["percentage", "status"])
|
||||
])
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}, 8, ["content"]),
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 1,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "总内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).py) == null ? void 0 : _a2.memory_total), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "已用内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).py) == null ? void 0 : _a2.memory_used), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "空闲内存" }, {
|
||||
default: withCtx(() => {
|
||||
var _a2;
|
||||
return [
|
||||
createTextVNode(toDisplayString((_a2 = unref(server).py) == null ? void 0 : _a2.memory_free), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["loading"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, {
|
||||
span: 24,
|
||||
class: "mb-4"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, { loading: unref(loading) }, {
|
||||
header: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_8, [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_Monitor)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[6] || (_cache[6] = createBaseVNode("span", { class: "font-medium" }, "服务器基本信息", -1)),
|
||||
createVNode(_component_el_tooltip, { content: "展示服务器基本配置信息" }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_QuestionFilled)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 2,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "服务器名称" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).sys) == null ? void 0 : _a.computer_name) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "操作系统" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).sys) == null ? void 0 : _a.os_name) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "服务器IP" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).sys) == null ? void 0 : _a.computer_ip) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "系统架构" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).sys) == null ? void 0 : _a.os_arch) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["loading"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, {
|
||||
span: 24,
|
||||
class: "mb-4"
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, {
|
||||
loading: unref(loading),
|
||||
class: "shadow-sm"
|
||||
}, {
|
||||
header: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_9, [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_Dish)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[7] || (_cache[7] = createBaseVNode("span", { class: "font-medium" }, "Python运行环境", -1)),
|
||||
createVNode(_component_el_tooltip, { content: "展示Python环境配置及运行状态" }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_QuestionFilled)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions, {
|
||||
column: 3,
|
||||
border: ""
|
||||
}, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_descriptions_item, { label: "Python名称" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).py) == null ? void 0 : _a.name) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "Python版本" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).py) == null ? void 0 : _a.version) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "启动时间" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).py) == null ? void 0 : _a.start_time) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "运行时长" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).py) == null ? void 0 : _a.run_time) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "安装路径" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).py) == null ? void 0 : _a.home) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_descriptions_item, { label: "项目路径" }, {
|
||||
default: withCtx(() => {
|
||||
var _a;
|
||||
return [
|
||||
createTextVNode(toDisplayString(((_a = unref(server).sys) == null ? void 0 : _a.user_dir) || "-"), 1)
|
||||
];
|
||||
}),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["loading"])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_col, { span: 24 }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_card, { loading: unref(loading) }, {
|
||||
header: withCtx(() => [
|
||||
createBaseVNode("div", _hoisted_10, [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_Files)
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
_cache[8] || (_cache[8] = createBaseVNode("span", { class: "font-medium" }, "磁盘使用情况", -1)),
|
||||
createVNode(_component_el_tooltip, { content: "展示磁盘空间使用详情" }, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_icon, null, {
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_QuestionFilled)
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
])
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_table, {
|
||||
data: unref(server).disks,
|
||||
border: ""
|
||||
}, {
|
||||
empty: withCtx(() => [
|
||||
createVNode(_component_el_empty, {
|
||||
"image-size": 80,
|
||||
description: "暂无数据"
|
||||
})
|
||||
]),
|
||||
default: withCtx(() => [
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "盘符路径",
|
||||
prop: "dir_name",
|
||||
"show-overflow-tooltip": true
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "文件系统",
|
||||
prop: "sys_type_name",
|
||||
align: "center",
|
||||
width: "100"
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "盘符名称",
|
||||
prop: "type_name"
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
prop: "usage",
|
||||
label: "使用率",
|
||||
align: "center"
|
||||
}, {
|
||||
default: withCtx(({ row }) => [
|
||||
createBaseVNode("div", null, [
|
||||
createVNode(_component_el_progress, {
|
||||
percentage: Number(row.usage),
|
||||
status: row.usage > 80 ? "exception" : row.usage > 60 ? "warning" : "success",
|
||||
"text-inside": true,
|
||||
"stroke-width": 16
|
||||
}, null, 8, ["percentage", "status"])
|
||||
])
|
||||
]),
|
||||
_: 1
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "总大小",
|
||||
prop: "total",
|
||||
align: "center",
|
||||
width: "100"
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "可用大小",
|
||||
prop: "free",
|
||||
align: "center",
|
||||
width: "100"
|
||||
}),
|
||||
createVNode(_component_el_table_column, {
|
||||
label: "已用大小",
|
||||
prop: "used",
|
||||
align: "center",
|
||||
width: "100"
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["data"])
|
||||
]),
|
||||
_: 1
|
||||
}, 8, ["loading"])
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]),
|
||||
_: 1
|
||||
})
|
||||
]);
|
||||
};
|
||||
}
|
||||
});
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
Reference in New Issue
Block a user