mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-10 23:47:39 +08:00
fix: 解决进程搜索为空一直转圈的问题 (#1526)
This commit is contained in:
parent
e507611cad
commit
24e6fe89c8
3 changed files with 5 additions and 9 deletions
|
@ -532,7 +532,7 @@ func (b *BaseApi) DownloadChunkFiles(c *gin.Context) {
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
file.Seek(startPos, 0)
|
_, _ = file.Seek(startPos, 0)
|
||||||
reader := io.LimitReader(file, endPos-startPos+1)
|
reader := io.LimitReader(file, endPos-startPos+1)
|
||||||
_, err = io.CopyBuffer(c.Writer, reader, buffer)
|
_, err = io.CopyBuffer(c.Writer, reader, buffer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -55,13 +55,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<template #main>
|
<template #main>
|
||||||
<ComplexTable
|
<ComplexTable :data="data" @sort-change="changeSort" @filter-change="changeFilter" ref="tableRef">
|
||||||
:data="data"
|
|
||||||
@sort-change="changeSort"
|
|
||||||
@filter-change="changeFilter"
|
|
||||||
ref="tableRef"
|
|
||||||
v-loading="data.length === 0"
|
|
||||||
>
|
|
||||||
<el-table-column :label="'PID'" fix prop="PID" max-width="60px" sortable></el-table-column>
|
<el-table-column :label="'PID'" fix prop="PID" max-width="60px" sortable></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
:label="$t('commons.table.name')"
|
:label="$t('commons.table.name')"
|
||||||
|
@ -225,6 +219,7 @@ const onMessage = (message: any) => {
|
||||||
oldData.value = result;
|
oldData.value = result;
|
||||||
data.value = filterByStatus();
|
data.value = filterByStatus();
|
||||||
sortTable();
|
sortTable();
|
||||||
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterByStatus = () => {
|
const filterByStatus = () => {
|
||||||
|
@ -258,6 +253,8 @@ const initProcess = () => {
|
||||||
processSocket.onmessage = onMessage;
|
processSocket.onmessage = onMessage;
|
||||||
processSocket.onerror = onerror;
|
processSocket.onerror = onerror;
|
||||||
processSocket.onclose = onClose;
|
processSocket.onclose = onClose;
|
||||||
|
loading.value = true;
|
||||||
|
search();
|
||||||
sendMsg();
|
sendMsg();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
</template>
|
</template>
|
||||||
<template #main>
|
<template #main>
|
||||||
<ComplexTable :data="data" ref="tableRef" v-loading="loading">
|
<ComplexTable :data="data" ref="tableRef" v-loading="loading">
|
||||||
<el-table-column :label="$t('commons.table.user')" fix prop="PID"></el-table-column>
|
|
||||||
<el-table-column :label="$t('commons.table.user')" fix prop="username"></el-table-column>
|
<el-table-column :label="$t('commons.table.user')" fix prop="username"></el-table-column>
|
||||||
<el-table-column :label="'PTS'" fix prop="terminal"></el-table-column>
|
<el-table-column :label="'PTS'" fix prop="terminal"></el-table-column>
|
||||||
<el-table-column :label="$t('ssh.loginIP')" fix prop="host"></el-table-column>
|
<el-table-column :label="$t('ssh.loginIP')" fix prop="host"></el-table-column>
|
||||||
|
|
Loading…
Add table
Reference in a new issue