diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13c8d04..5d174be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,7 +32,7 @@ jobs: - uses: robinraju/release-downloader@v1 with: repository: nezhahq/admin-frontend - tag: v1.0.12 + tag: v1.0.13 fileName: dist.zip latest: true extract: true @@ -45,7 +45,7 @@ jobs: - uses: robinraju/release-downloader@v1 with: repository: nezhahq/user-frontend - tag: v1.0.5 + tag: v1.0.6 fileName: dist.zip latest: true extract: true diff --git a/cmd/dashboard/controller/service.go b/cmd/dashboard/controller/service.go index 482da04..435c979 100644 --- a/cmd/dashboard/controller/service.go +++ b/cmd/dashboard/controller/service.go @@ -27,15 +27,16 @@ func listService(c *gin.Context) (*model.ServiceResponse, error) { singleton.AlertsLock.RLock() defer singleton.AlertsLock.RUnlock() var stats map[uint64]model.ServiceResponseItem - var statsStore map[uint64]model.CycleTransferStats + var cycleTransferStats map[uint64]model.CycleTransferStats copier.Copy(&stats, singleton.ServiceSentinelShared.LoadStats()) - copier.Copy(&statsStore, singleton.AlertsCycleTransferStatsStore) + copier.Copy(&cycleTransferStats, singleton.AlertsCycleTransferStatsStore) _, isMember := c.Get(model.CtxKeyAuthorizedUser) authorized := isMember // TODO || isViewPasswordVerfied for k, service := range stats { if !authorized { if !service.Service.EnableShowInService { delete(stats, k) + continue } service.Service = &model.Service{Name: service.Service.Name} stats[k] = service @@ -43,7 +44,7 @@ func listService(c *gin.Context) (*model.ServiceResponse, error) { } return []interface { }{ - stats, statsStore, + stats, cycleTransferStats, }, nil }) if err != nil {