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