diff --git a/backend/app/service/app_install.go b/backend/app/service/app_install.go index 3eddc97c0..fe956a970 100644 --- a/backend/app/service/app_install.go +++ b/backend/app/service/app_install.go @@ -435,7 +435,7 @@ func (a *AppInstallService) GetServices(key string) ([]response.AppService, erro for _, db := range dbs { service := response.AppService{ Label: db.Name, - Value: strconv.Itoa(int(db.ID)), + Value: db.Name, } if db.AppInstallID > 0 { install, err := appInstallRepo.GetFirst(commonRepo.WithByID(db.AppInstallID)) diff --git a/backend/utils/common/common.go b/backend/utils/common/common.go index e0ecd7957..edd5cd0a7 100644 --- a/backend/utils/common/common.go +++ b/backend/utils/common/common.go @@ -24,6 +24,17 @@ func CompareVersion(version1 string, version2 string) bool { version1s := strings.Split(version1, ".") version2s := strings.Split(version2, ".") + if len(version2s) > len(version1s) { + for i := 0; i < len(version2s)-len(version1s); i++ { + version1s = append(version1s, "0") + } + } + if len(version1s) > len(version2s) { + for i := 0; i < len(version1s)-len(version2s); i++ { + version2s = append(version2s, "0") + } + } + n := min(len(version1s), len(version2s)) re := regexp.MustCompile("[0-9]+") for i := 0; i < n; i++ { diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index 952a4fccd..dd19c4432 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -50,7 +50,7 @@ -
+