diff --git a/internal/web/actions/default/clusters/cluster/boards/index.go b/internal/web/actions/default/clusters/cluster/boards/index.go index 268168b1..5758c6f0 100644 --- a/internal/web/actions/default/clusters/cluster/boards/index.go +++ b/internal/web/actions/default/clusters/cluster/boards/index.go @@ -10,7 +10,6 @@ import ( "github.com/iwind/TeaGo/maps" "github.com/iwind/TeaGo/types" timeutil "github.com/iwind/TeaGo/utils/time" - "strconv" ) type IndexAction struct { @@ -23,10 +22,17 @@ func (this *IndexAction) Init() { func (this *IndexAction) RunGet(params struct { ClusterId int64 +}) { + this.Data["clusterId"] = params.ClusterId + + this.Show() +} + +func (this *IndexAction) RunPost(params struct { + ClusterId int64 }) { if !teaconst.IsPlus { - this.RedirectURL("/clusters/cluster?clusterId=" + strconv.FormatInt(params.ClusterId, 10)) - return + this.Fail("only for commercial users") } resp, err := this.RPC().ServerStatBoardRPC().ComposeServerStatNodeClusterBoard(this.AdminContext(), &pb.ComposeServerStatNodeClusterBoardRequest{NodeClusterId: params.ClusterId}) @@ -178,5 +184,5 @@ func (this *IndexAction) RunGet(params struct { this.Data["metricCharts"] = chartMaps } - this.Show() + this.Success() } diff --git a/internal/web/actions/default/clusters/cluster/init.go b/internal/web/actions/default/clusters/cluster/init.go index 34fce311..28e5d99d 100644 --- a/internal/web/actions/default/clusters/cluster/init.go +++ b/internal/web/actions/default/clusters/cluster/init.go @@ -59,7 +59,7 @@ func init() { // 看板相关 Prefix("/clusters/cluster/boards"). - Get("", new(boards.IndexAction)). + GetPost("", new(boards.IndexAction)). EndAll() }) } diff --git a/internal/web/actions/default/ns/domains/index.go b/internal/web/actions/default/ns/domains/index.go index 97148ab0..7af9a89c 100644 --- a/internal/web/actions/default/ns/domains/index.go +++ b/internal/web/actions/default/ns/domains/index.go @@ -12,7 +12,7 @@ type IndexAction struct { } func (this *IndexAction) Init() { - this.FirstMenu("domain") + this.Nav("", "", "index") } func (this *IndexAction) RunGet(params struct { diff --git a/web/views/@default/clusters/cluster/boards/index.css b/web/views/@default/clusters/cluster/boards/index.css index 34f8ab5b..32455584 100644 --- a/web/views/@default/clusters/cluster/boards/index.css +++ b/web/views/@default/clusters/cluster/boards/index.css @@ -1,3 +1,6 @@ +.message.loading { + padding: 1.5em; +} .grid { margin-top: 2em !important; margin-left: 2em !important; diff --git a/web/views/@default/clusters/cluster/boards/index.css.map b/web/views/@default/clusters/cluster/boards/index.css.map index 1f562066..19ffc2f1 100644 --- a/web/views/@default/clusters/cluster/boards/index.css.map +++ b/web/views/@default/clusters/cluster/boards/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,0BAAA;EACA,2BAAA;;AAFD,KAIC;EACC,kBAAA;EACA,4BAAA;;AANF,KAIC,QAIC,IAAG;EACF,iBAAA;;AATH,KAIC,QAIC,IAAG,MAGF;EACC,cAAA;EACA,mBAAA;;AAbJ,KAkBC,QAAO;EACN,eAAA;;AAnBF,KAsBC,GACC;EACC,aAAA;;AAxBH,KA4BC,QAAO,MACN;EACC,eAAA;;AAKH;EACC,YAAA;;AAGD,EACC;EACC,gBAAA;EACA,WAAA","file":"index.css"} \ No newline at end of file +{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA,QAAQ;EACP,cAAA;;AAGD;EACC,0BAAA;EACA,2BAAA;;AAFD,KAIC;EACC,kBAAA;EACA,4BAAA;;AANF,KAIC,QAIC,IAAG;EACF,iBAAA;;AATH,KAIC,QAIC,IAAG,MAGF;EACC,cAAA;EACA,mBAAA;;AAbJ,KAkBC,QAAO;EACN,eAAA;;AAnBF,KAsBC,GACC;EACC,aAAA;;AAxBH,KA4BC,QAAO,MACN;EACC,eAAA;;AAKH;EACC,YAAA;;AAGD,EACC;EACC,gBAAA;EACA,WAAA","file":"index.css"} \ No newline at end of file diff --git a/web/views/@default/clusters/cluster/boards/index.html b/web/views/@default/clusters/cluster/boards/index.html index fa9a13f9..5bdeb789 100644 --- a/web/views/@default/clusters/cluster/boards/index.html +++ b/web/views/@default/clusters/cluster/boards/index.html @@ -1,6 +1,13 @@ {$layout} {$template "/echarts"} + +