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,16 +275,14 @@ func (a AppInstallService) SyncAll() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
go func() {
|
for _, i := range allList {
|
||||||
for _, i := range allList {
|
if i.Status == constant.Installing {
|
||||||
if i.Status == constant.Installing {
|
continue
|
||||||
continue
|
|
||||||
}
|
|
||||||
if err := syncById(i.ID); err != nil {
|
|
||||||
global.LOG.Errorf("sync install app[%s] error,mgs: %s", i.Name, err.Error())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}()
|
if err := syncById(i.ID); err != nil {
|
||||||
|
global.LOG.Errorf("sync install app[%s] error,mgs: %s", i.Name, err.Error())
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<LayoutContent v-loading="loading" :title="activeName" :divider="true">
|
<LayoutContent v-loading="loading || syncLoading" :title="activeName" :divider="true">
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<el-row :gutter="5">
|
<el-row :gutter="5">
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
@ -203,6 +203,7 @@ import { MsgSuccess } from '@/utils/message';
|
|||||||
|
|
||||||
let data = ref<any>();
|
let data = ref<any>();
|
||||||
let loading = ref(false);
|
let loading = ref(false);
|
||||||
|
let syncLoading = ref(false);
|
||||||
let timer: NodeJS.Timer | null = null;
|
let timer: NodeJS.Timer | null = null;
|
||||||
const paginationConfig = reactive({
|
const paginationConfig = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
@ -235,14 +236,14 @@ let activeName = ref(i18n.global.t('app.installed'));
|
|||||||
let mode = ref('installed');
|
let mode = ref('installed');
|
||||||
|
|
||||||
const sync = () => {
|
const sync = () => {
|
||||||
loading.value = true;
|
syncLoading.value = true;
|
||||||
SyncInstalledApp()
|
SyncInstalledApp()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
MsgSuccess(i18n.global.t('app.syncSuccess'));
|
||||||
search();
|
search();
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
syncLoading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user