diff --git a/internal/web/actions/default/dashboard/index.go b/internal/web/actions/default/dashboard/index.go index bb7d216a..7ffdaf66 100644 --- a/internal/web/actions/default/dashboard/index.go +++ b/internal/web/actions/default/dashboard/index.go @@ -46,6 +46,11 @@ func (this *IndexAction) RunGet(params struct{}) { "countAPINodes": resp.CountAPINodes, "countDBNodes": resp.CountDBNodes, "countUserNodes": resp.CountUserNodes, + + "canGoServers": configloaders.AllowModule(this.AdminId(), configloaders.AdminModuleCodeServer), + "canGoNodes": configloaders.AllowModule(this.AdminId(), configloaders.AdminModuleCodeNode), + "canGoSettings": configloaders.AllowModule(this.AdminId(), configloaders.AdminModuleCodeSetting), + "canGoUsers": configloaders.AllowModule(this.AdminId(), configloaders.AdminModuleCodeUser), } // 今日流量 diff --git a/internal/web/helpers/user_must_auth.go b/internal/web/helpers/user_must_auth.go index b8ffde77..d4656083 100644 --- a/internal/web/helpers/user_must_auth.go +++ b/internal/web/helpers/user_must_auth.go @@ -133,7 +133,7 @@ func (this *userMustAuth) modules(adminId int64) []maps.Map { { "code": "dashboard", "module": configloaders.AdminModuleCodeDashboard, - "name": "看板", + "name": "数据看板", "icon": "dashboard", }, { diff --git a/web/views/@default/dashboard/index.css b/web/views/@default/dashboard/index.css index 311ceed2..fcc61a58 100644 --- a/web/views/@default/dashboard/index.css +++ b/web/views/@default/dashboard/index.css @@ -16,6 +16,12 @@ .grid .column.no-border { border-right: 0; } +.grid h4 a { + display: none; +} +.grid .column:hover a { + display: inline; +} .chart-box { height: 20em; } diff --git a/web/views/@default/dashboard/index.css.map b/web/views/@default/dashboard/index.css.map index 582fe827..5a8fcaa7 100644 --- a/web/views/@default/dashboard/index.css.map +++ b/web/views/@default/dashboard/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;;AAKF;EACC,YAAA","file":"index.css"} \ No newline at end of file +{"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;;AAMH;EACC,YAAA","file":"index.css"} \ No newline at end of file diff --git a/web/views/@default/dashboard/index.html b/web/views/@default/dashboard/index.html index 1a548a62..976afbea 100644 --- a/web/views/@default/dashboard/index.html +++ b/web/views/@default/dashboard/index.html @@ -8,32 +8,32 @@
-

当前集群数

+

集群

{{dashboard.countNodeClusters}}
-

当前边缘节点数

+

边缘节点

{{dashboard.countNodes}}
-

当前API节点数

+

API节点

{{dashboard.countAPINodes}}
-

当前用户数

+

用户

{{dashboard.countUsers}}
-

当前服务数

+

服务

{{dashboard.countServers}}
-

今日总流量

+

今日流量

{{todayTraffic}}{{todayTrafficUnit}}
diff --git a/web/views/@default/dashboard/index.less b/web/views/@default/dashboard/index.less index d51bc8a9..a6361eac 100644 --- a/web/views/@default/dashboard/index.less +++ b/web/views/@default/dashboard/index.less @@ -19,6 +19,18 @@ .column.no-border { border-right: 0; } + + h4 { + a { + display: none; + } + } + + .column:hover { + a { + display: inline; + } + } }