mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-10-29 08:03:48 +00:00
feat(ai): support benchmark node options and report integration (#14145)
This commit is contained in:
@@ -201,6 +201,7 @@ import { MsgSuccess, MsgWarning } from '@/utils/message';
|
||||
import { useSearchableForSelect } from '@/views/host/file-management/hooks/searchable';
|
||||
import { computeSize } from '@/utils/size';
|
||||
import { debounce } from '@/utils/misc';
|
||||
const props = defineProps<{ currentNode?: string }>();
|
||||
const data = ref([]);
|
||||
const loading = ref(false);
|
||||
const paths = ref<string[]>([]);
|
||||
@@ -367,7 +368,7 @@ const getFileSize = async (path: string) => {
|
||||
};
|
||||
updateByPath(path, { btnLoading: true });
|
||||
try {
|
||||
const res = await getFileContent(params);
|
||||
const res = await getFileContent(params, props.currentNode);
|
||||
updateByPath(path, { dirSize: res.data.size });
|
||||
} finally {
|
||||
updateByPath(path, { btnLoading: false });
|
||||
@@ -380,7 +381,7 @@ const getDirSize = async (path: string) => {
|
||||
};
|
||||
updateByPath(path, { btnLoading: true });
|
||||
try {
|
||||
const res = await computeDirSize(req);
|
||||
const res = await computeDirSize(req, props.currentNode);
|
||||
updateByPath(path, { dirSize: res.data.size });
|
||||
} finally {
|
||||
updateByPath(path, { btnLoading: false });
|
||||
@@ -410,7 +411,7 @@ const getPaths = (reqPath: string) => {
|
||||
const search = async (req: File.ReqFile) => {
|
||||
req.dir = form.dir;
|
||||
loading.value = true;
|
||||
await getFilesList(req)
|
||||
await getFilesList(req, props.currentNode)
|
||||
.then((res) => {
|
||||
if (!res.data.path) {
|
||||
req.path = oldUrl.value;
|
||||
@@ -497,7 +498,7 @@ const createFolder = async (row: any) => {
|
||||
let addItem = {};
|
||||
Object.assign(addItem, addForm);
|
||||
loading.value = true;
|
||||
createFile(addItem as File.FileCreate)
|
||||
createFile(addItem as File.FileCreate, props.currentNode)
|
||||
.then(async () => {
|
||||
row.isCreate = false;
|
||||
disBtn.value = false;
|
||||
@@ -524,7 +525,7 @@ const removeSelected = (index: number) => {
|
||||
|
||||
const loadFavorites = async () => {
|
||||
try {
|
||||
const res = await searchFavorite({ page: 1, pageSize: 100 });
|
||||
const res = await searchFavorite({ page: 1, pageSize: 100 }, props.currentNode);
|
||||
favorites.value = res.data.items || [];
|
||||
} catch {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user