diff --git a/agent/init/business/business.go b/agent/init/business/business.go
index 2f568a8e3..41691bed2 100644
--- a/agent/init/business/business.go
+++ b/agent/init/business/business.go
@@ -20,6 +20,9 @@ func Init() {
}
func syncApp() {
+ if global.CONF.Base.IsOffLine {
+ return
+ }
_ = service.NewISettingService().Update("AppStoreSyncStatus", constant.StatusSyncSuccess)
if err := service.NewIAppService().SyncAppListFromRemote(""); err != nil {
global.LOG.Errorf("App Store synchronization failed")
diff --git a/core/app/service/script_library.go b/core/app/service/script_library.go
index fddbc442c..99a061e58 100644
--- a/core/app/service/script_library.go
+++ b/core/app/service/script_library.go
@@ -168,6 +168,9 @@ func LoadScriptInfo(id uint) (model.ScriptLibrary, error) {
}
func (u *ScriptService) Sync(req dto.OperateByTaskID) error {
+ if global.CONF.Base.IsOffLine {
+ return nil
+ }
syncTask, err := task.NewTaskWithOps(i18n.GetMsgByKey("ScriptLibrary"), task.TaskSync, task.TaskScopeScript, req.TaskID, 0)
if err != nil {
global.LOG.Errorf("create sync task failed %v", err)
diff --git a/core/init/cron/cron.go b/core/init/cron/cron.go
index ff14c623a..297d7e2db 100644
--- a/core/init/cron/cron.go
+++ b/core/init/cron/cron.go
@@ -19,9 +19,12 @@ func Init() {
global.LOG.Errorf("[core] can not add backup token refresh corn job: %s", err.Error())
}
- scriptJob := job.NewScriptJob()
- if _, err := global.Cron.AddJob(fmt.Sprintf("%v %v * * *", mathRand.Intn(60), mathRand.Intn(3)), scriptJob); err != nil {
- global.LOG.Errorf("[core] can not add script sync corn job: %s", err.Error())
+ if !global.CONF.Base.IsOffLine {
+ scriptJob := job.NewScriptJob()
+ if _, err := global.Cron.AddJob(fmt.Sprintf("%v %v * * *", mathRand.Intn(60), mathRand.Intn(3)), scriptJob); err != nil {
+ global.LOG.Errorf("[core] can not add script sync corn job: %s", err.Error())
+ }
}
+
global.Cron.Start()
}
diff --git a/frontend/src/components/system-upgrade/index.vue b/frontend/src/components/system-upgrade/index.vue
index 3219236e6..8a19486a3 100644
--- a/frontend/src/components/system-upgrade/index.vue
+++ b/frontend/src/components/system-upgrade/index.vue
@@ -37,13 +37,17 @@
{{ version }}
-
+
{{ $t('commons.button.update') }}
-
- {{ $t('setting.upgrading') }}
-
+ {{ $t('setting.upgrading') }}