mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-14 01:34:47 +08:00
feat: 已安装应用改为同步
This commit is contained in:
parent
2091fdbe5d
commit
92a11863a7
@ -275,7 +275,6 @@ func (a AppInstallService) SyncAll() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
go func() {
|
||||
for _, i := range allList {
|
||||
if i.Status == constant.Installing {
|
||||
continue
|
||||
@ -284,7 +283,6 @@ func (a AppInstallService) SyncAll() error {
|
||||
global.LOG.Errorf("sync install app[%s] error,mgs: %s", i.Name, err.Error())
|
||||
}
|
||||
}
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<LayoutContent v-loading="loading" :title="activeName" :divider="true">
|
||||
<LayoutContent v-loading="loading || syncLoading" :title="activeName" :divider="true">
|
||||
<template #toolbar>
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="20">
|
||||
@ -203,6 +203,7 @@ import { MsgSuccess } from '@/utils/message';
|
||||
|
||||
let data = ref<any>();
|
||||
let loading = ref(false);
|
||||
let syncLoading = ref(false);
|
||||
let timer: NodeJS.Timer | null = null;
|
||||
const paginationConfig = reactive({
|
||||
currentPage: 1,
|
||||
@ -235,14 +236,14 @@ let activeName = ref(i18n.global.t('app.installed'));
|
||||
let mode = ref('installed');
|
||||
|
||||
const sync = () => {
|
||||
loading.value = true;
|
||||
syncLoading.value = true;
|
||||
SyncInstalledApp()
|
||||
.then(() => {
|
||||
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
||||
search();
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
syncLoading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user