From 09a193820d89a1401360ede04a72ba4ca0bf9d77 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 3 Jun 2021 22:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=9F=E5=90=8D=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=95=8C=E9=9D=A2=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../actions/default/ns/clusters/cluster/init.go | 1 + .../default/ns/clusters/cluster/node/index.go | 2 +- .../ns/clusters/cluster/upgradeRemote.go | 17 +++++++++++++++++ .../ns/clusters/cluster/upgradeRemote.html | 3 +++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 internal/web/actions/default/ns/clusters/cluster/upgradeRemote.go create mode 100644 web/views/@default/ns/clusters/cluster/upgradeRemote.html diff --git a/internal/web/actions/default/ns/clusters/cluster/init.go b/internal/web/actions/default/ns/clusters/cluster/init.go index 7f93c783..f7f54fff 100644 --- a/internal/web/actions/default/ns/clusters/cluster/init.go +++ b/internal/web/actions/default/ns/clusters/cluster/init.go @@ -20,6 +20,7 @@ func init() { GetPost("/delete", new(DeleteAction)). GetPost("/createNode", new(CreateNodeAction)). Post("/deleteNode", new(DeleteNodeAction)). + Get("/upgradeRemote", new(UpgradeRemoteAction)). // 节点相关 Prefix("/ns/clusters/cluster/node"). diff --git a/internal/web/actions/default/ns/clusters/cluster/node/index.go b/internal/web/actions/default/ns/clusters/cluster/node/index.go index 88f9cae3..ac6b93ef 100644 --- a/internal/web/actions/default/ns/clusters/cluster/node/index.go +++ b/internal/web/actions/default/ns/clusters/cluster/node/index.go @@ -86,7 +86,7 @@ func (this *IndexAction) RunGet(params struct { // 检查是否有新版本 if len(status.OS) > 0 { - checkVersionResp, err := this.RPC().NodeRPC().CheckNodeLatestVersion(this.AdminContext(), &pb.CheckNodeLatestVersionRequest{ + checkVersionResp, err := this.RPC().NSNodeRPC().CheckNSNodeLatestVersion(this.AdminContext(), &pb.CheckNSNodeLatestVersionRequest{ Os: status.OS, Arch: status.Arch, CurrentVersion: status.BuildVersion, diff --git a/internal/web/actions/default/ns/clusters/cluster/upgradeRemote.go b/internal/web/actions/default/ns/clusters/cluster/upgradeRemote.go new file mode 100644 index 00000000..e38b7b05 --- /dev/null +++ b/internal/web/actions/default/ns/clusters/cluster/upgradeRemote.go @@ -0,0 +1,17 @@ +// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved. + +package cluster + +import "github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils" + +type UpgradeRemoteAction struct { + actionutils.ParentAction +} + +func (this *UpgradeRemoteAction) Init() { + this.Nav("", "", "") +} + +func (this *UpgradeRemoteAction) RunGet(params struct{}) { + this.Show() +} diff --git a/web/views/@default/ns/clusters/cluster/upgradeRemote.html b/web/views/@default/ns/clusters/cluster/upgradeRemote.html new file mode 100644 index 00000000..3853753e --- /dev/null +++ b/web/views/@default/ns/clusters/cluster/upgradeRemote.html @@ -0,0 +1,3 @@ +{$layout} + +

此功能暂未开放。

\ No newline at end of file