Skip to content

Commit

Permalink
Adjustments
Browse files Browse the repository at this point in the history
* Moved `cluster` wording to `cluster_totals` for more clarity on valued within
  • Loading branch information
Nick Huanca committed Mar 29, 2019
1 parent 8ad6db2 commit 27a52d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/capacity/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ type jsonResourceOutput struct {
}

type jsonClusterMetrics struct {
Nodes []*jsonNodeMetric `json:"nodes"`
Cluster struct {
Nodes []*jsonNodeMetric `json:"nodes"`
ClusterTotals struct {
CPU *jsonResourceOutput `json:"cpu"`
Memory *jsonResourceOutput `json:"memory"`
} `json:"cluster"`
} `json:"cluster_totals"`
}

type jsonPrinter struct {
Expand All @@ -58,8 +58,8 @@ func (jp jsonPrinter) Print() {
func (jp *jsonPrinter) buildJSONClusterMetrics() jsonClusterMetrics {
var response jsonClusterMetrics

response.Cluster.CPU = jp.buildJSONResourceOutput(jp.cm.cpu)
response.Cluster.Memory = jp.buildJSONResourceOutput(jp.cm.memory)
response.ClusterTotals.CPU = jp.buildJSONResourceOutput(jp.cm.cpu)
response.ClusterTotals.Memory = jp.buildJSONResourceOutput(jp.cm.memory)

for key, val := range jp.cm.nodeMetrics {
var node jsonNodeMetric
Expand Down

0 comments on commit 27a52d1

Please sign in to comment.