From 70c2185cf4181ceb59e88a50359d8af0c24c7e75 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Wed, 23 Nov 2022 16:59:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0nginx=20log=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/dto/app.go | 17 +++++----- backend/app/service/app_install.go | 1 + frontend/src/api/interface/app.ts | 1 + frontend/src/components/app-status/index.vue | 33 ++++++++----------- frontend/src/lang/modules/zh.ts | 3 +- frontend/src/views/website/website/index.vue | 14 ++++++-- .../src/views/website/website/nginx/index.vue | 24 +++++++++++++- .../website/website/nginx/source/index.vue | 1 - 8 files changed, 61 insertions(+), 33 deletions(-) diff --git a/backend/app/dto/app.go b/backend/app/dto/app.go index 412571cb5..83cdabc62 100644 --- a/backend/app/dto/app.go +++ b/backend/app/dto/app.go @@ -41,14 +41,15 @@ type AppInstallRequest struct { } type CheckInstalled struct { - IsExist bool `json:"isExist"` - Name string `json:"name"` - App string `json:"app"` - Version string `json:"version"` - Status string `json:"status"` - CreatedAt time.Time `json:"createdAt"` - LastBackupAt string `json:"lastBackupAt"` - AppInstallID uint `json:"appInstallId"` + IsExist bool `json:"isExist"` + Name string `json:"name"` + App string `json:"app"` + Version string `json:"version"` + Status string `json:"status"` + CreatedAt time.Time `json:"createdAt"` + LastBackupAt string `json:"lastBackupAt"` + AppInstallID uint `json:"appInstallId"` + ContainerName string `json:"containerName"` } type AppInstalled struct { diff --git a/backend/app/service/app_install.go b/backend/app/service/app_install.go index 5b6da095e..fd9176fe5 100644 --- a/backend/app/service/app_install.go +++ b/backend/app/service/app_install.go @@ -51,6 +51,7 @@ func (a AppInstallService) CheckExist(key string) (*dto.CheckInstalled, error) { if reflect.DeepEqual(appInstall, model.AppInstall{}) { return res, nil } + res.ContainerName = appInstall.ContainerName res.Name = appInstall.Name res.Version = appInstall.Version res.CreatedAt = appInstall.CreatedAt diff --git a/frontend/src/api/interface/app.ts b/frontend/src/api/interface/app.ts index d4876eadd..fadaed347 100644 --- a/frontend/src/api/interface/app.ts +++ b/frontend/src/api/interface/app.ts @@ -91,6 +91,7 @@ export namespace App { createdAt: string; lastBackupAt: string; appInstallId: number; + containerName: string; } export interface AppInstalledOp { diff --git a/frontend/src/components/app-status/index.vue b/frontend/src/components/app-status/index.vue index 8042cab75..73c5f21da 100644 --- a/frontend/src/components/app-status/index.vue +++ b/frontend/src/components/app-status/index.vue @@ -1,7 +1,7 @@ diff --git a/frontend/src/views/website/website/nginx/source/index.vue b/frontend/src/views/website/website/nginx/source/index.vue index 2ceb43219..5d32ef824 100644 --- a/frontend/src/views/website/website/nginx/source/index.vue +++ b/frontend/src/views/website/website/nginx/source/index.vue @@ -55,7 +55,6 @@ const getNginx = async () => { const res = await GetNginx(); data.value = res.data; content.value = data.value.content; - console.log(content.value); }; onMounted(() => {