mirror of https://github.com/1Panel-dev/1Panel
parent
003c87bf00
commit
9f3181b8f3
|
@ -611,25 +611,15 @@ func (f FileOp) decompressWithSDK(srcFile string, dst string, cType CompressType
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f FileOp) Decompress(srcFile string, dst string, cType CompressType, secret string) error {
|
func (f FileOp) Decompress(srcFile string, dst string, cType CompressType, secret string) error {
|
||||||
if err := f.decompressWithSDK(srcFile, dst, cType); err != nil {
|
if cType == Tar || cType == Zip || cType == TarGz {
|
||||||
if cType == Tar || cType == Zip || cType == TarGz {
|
shellArchiver, err := NewShellArchiver(cType)
|
||||||
if secret != "" {
|
if err == nil {
|
||||||
shellArchiver, err := NewShellArchiver(TarGz)
|
if err = shellArchiver.Extract(srcFile, dst, secret); err == nil {
|
||||||
if err != nil {
|
return nil
|
||||||
return err
|
|
||||||
}
|
|
||||||
return shellArchiver.Extract(srcFile, dst, secret)
|
|
||||||
} else {
|
|
||||||
shellArchiver, err := NewShellArchiver(cType)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return shellArchiver.Extract(srcFile, dst, secret)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
return nil
|
return f.decompressWithSDK(srcFile, dst, cType)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ZipFile(files []archiver.File, dst afero.File) error {
|
func ZipFile(files []archiver.File, dst afero.File) error {
|
||||||
|
|
|
@ -119,6 +119,9 @@ const getContent = (pre: boolean) => {
|
||||||
readReq.id = props.config.id;
|
readReq.id = props.config.id;
|
||||||
readReq.type = props.config.type;
|
readReq.type = props.config.type;
|
||||||
readReq.name = props.config.name;
|
readReq.name = props.config.name;
|
||||||
|
if (readReq.page < 1) {
|
||||||
|
readReq.page = 1;
|
||||||
|
}
|
||||||
ReadByLine(readReq).then((res) => {
|
ReadByLine(readReq).then((res) => {
|
||||||
if (!end.value && res.data.end) {
|
if (!end.value && res.data.end) {
|
||||||
lastContent.value = content.value;
|
lastContent.value = content.value;
|
||||||
|
@ -178,7 +181,7 @@ const changeTail = (fromOutSide: boolean) => {
|
||||||
if (tailLog.value) {
|
if (tailLog.value) {
|
||||||
timer = setInterval(() => {
|
timer = setInterval(() => {
|
||||||
getContent(false);
|
getContent(false);
|
||||||
}, 1000 * 2);
|
}, 1000 * 3);
|
||||||
} else {
|
} else {
|
||||||
onCloseLog();
|
onCloseLog();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('website.log')" prop="">
|
<el-table-column :label="$t('website.log')" prop="">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button @click="openLog(row)" link type="primary">{{ $t('website.check') }}</el-button>
|
<el-button @click="openLog(row)" link type="primary" :disabled="row.resource == 'local'">
|
||||||
|
{{ $t('website.check') }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
|
Loading…
Reference in New Issue