mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-13 10:04:42 +08:00
fix(file): fix issue with download process not work (#8237)
This commit is contained in:
parent
06b7ae2a38
commit
b871c710b2
3 changed files with 12 additions and 4 deletions
|
@ -789,9 +789,6 @@ func (b *BaseApi) ProcessKeys(c *gin.Context) {
|
|||
continue
|
||||
}
|
||||
res.Keys = append(res.Keys, key)
|
||||
if process.Percent == 100 {
|
||||
global.CACHE.Del(key)
|
||||
}
|
||||
}
|
||||
helper.SuccessWithData(c, res)
|
||||
}
|
||||
|
|
|
@ -142,6 +142,9 @@ func getDownloadProcess(progress DownloadProgress) (res []byte, err error) {
|
|||
downloadProcess := &files.Process{}
|
||||
_ = json.Unmarshal([]byte(value), downloadProcess)
|
||||
result = append(result, *downloadProcess)
|
||||
if downloadProcess.Percent == 100 {
|
||||
global.CACHE.Del(k)
|
||||
}
|
||||
}
|
||||
res, err = json.Marshal(result)
|
||||
return
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<template>
|
||||
<DrawerPro v-model="open" :header="title" @close="handleClose" size="large" :fullScreen="true">
|
||||
<DrawerPro
|
||||
v-model="open"
|
||||
:header="title"
|
||||
@close="handleClose"
|
||||
:size="globalStore.isFullScreen ? 'full' : 'large'"
|
||||
:fullScreen="true"
|
||||
>
|
||||
<template #content>
|
||||
<div v-if="req.file != 'config'">
|
||||
<el-tabs v-model="req.file" type="card" @tab-click="handleChange">
|
||||
|
@ -36,6 +42,8 @@ import { operateSupervisorProcessFile } from '@/api/modules/host-tool';
|
|||
import i18n from '@/lang';
|
||||
import { TabsPaneContext } from 'element-plus';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { GlobalStore } from '@/store';
|
||||
const globalStore = GlobalStore();
|
||||
|
||||
const loading = ref(false);
|
||||
const content = ref('');
|
||||
|
|
Loading…
Add table
Reference in a new issue