From e89e59d8a8711ce06eca62f3a07d5feafdd35100 Mon Sep 17 00:00:00 2001 From: derailed Date: Fri, 24 Jan 2020 22:16:28 -0700 Subject: [PATCH] cleaning up --- internal/model/cluster_info.go | 1 + internal/ui/indicator.go | 1 + internal/view/cluster_info.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/model/cluster_info.go b/internal/model/cluster_info.go index b0e19e1d..5da36d45 100644 --- a/internal/model/cluster_info.go +++ b/internal/model/cluster_info.go @@ -16,6 +16,7 @@ type ClusterInfoListener interface { ClusterInfoUpdated(ClusterMeta) } +// NA indicates data is missing at this time. const NA = "n/a" // ClusterMeta represents cluster meta data. diff --git a/internal/ui/indicator.go b/internal/ui/indicator.go index 012259f0..54a25bfc 100644 --- a/internal/ui/indicator.go +++ b/internal/ui/indicator.go @@ -130,6 +130,7 @@ func (s *StatusIndicator) setText(msg string) { // Helpers... +// AsPercDelta represents a percentage with a delta indicator. func AsPercDelta(ov, nv float64) string { prev, cur := render.AsPerc(ov), render.AsPerc(nv) if cur == "0" { diff --git a/internal/view/cluster_info.go b/internal/view/cluster_info.go index 81b4253f..c69a94a2 100644 --- a/internal/view/cluster_info.go +++ b/internal/view/cluster_info.go @@ -67,7 +67,7 @@ func (c *ClusterInfo) infoCell(t string) *tview.TableCell { return cell } -// ClusterInfoChanged notifies the cluster meta was updated. +// ClusterInfoUpdated notifies the cluster meta was updated. func (c *ClusterInfo) ClusterInfoUpdated(data model.ClusterMeta) { c.app.QueueUpdateDraw(func() { var row int