File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
frontend/src/views/host/file-management Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11package v2
22
33import (
4+ "encoding/json"
45 "errors"
56 "fmt"
67 "io"
@@ -761,7 +762,16 @@ func (b *BaseApi) WgetProcess(c *gin.Context) {
761762func (b * BaseApi ) ProcessKeys (c * gin.Context ) {
762763 res := & response.FileProcessKeys {}
763764 keys := global .CACHE .PrefixScanKey ("file-wget-" )
764- res .Keys = keys
765+ for _ , key := range keys {
766+ value := global .CACHE .Get (key )
767+ if value == "" {
768+ continue
769+ }
770+ var process files.Process
771+ if err := json .Unmarshal ([]byte (value ), & process ); err == nil && process .Percent != 100 {
772+ res .Keys = append (res .Keys , key )
773+ }
774+ }
765775 helper .SuccessWithData (c , res )
766776}
767777
Original file line number Diff line number Diff line change @@ -434,6 +434,7 @@ const mobile = computed(() => {
434434});
435435
436436const search = async () => {
437+ getWgetProcess ();
437438 loading .value = true ;
438439 if (req .search != ' ' ) {
439440 req .sortBy = ' name' ;
@@ -983,7 +984,6 @@ onMounted(() => {
983984 nextTick (function () {
984985 handlePath ();
985986 });
986- getWgetProcess ();
987987});
988988 </script >
989989
You can’t perform that action at this time.
0 commit comments