mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
Use rank to determine color in details
This commit is contained in:
@@ -61,7 +61,7 @@ const NodeDetails = React.createClass({
|
||||
return this.renderLoading();
|
||||
}
|
||||
|
||||
const nodeColor = this.getNodeColorDark(details.label_major);
|
||||
const nodeColor = this.getNodeColorDark(details.rank);
|
||||
const styles = {
|
||||
controls: {
|
||||
'backgroundColor': this.brightenColor(nodeColor)
|
||||
|
||||
@@ -26,6 +26,7 @@ type DetailedNode struct {
|
||||
ID string `json:"id"`
|
||||
LabelMajor string `json:"label_major"`
|
||||
LabelMinor string `json:"label_minor,omitempty"`
|
||||
Rank string `json:"rank,omitempty"`
|
||||
Pseudo bool `json:"pseudo,omitempty"`
|
||||
Tables []Table `json:"tables"`
|
||||
Controls []ControlInstance `json:"controls"`
|
||||
@@ -115,6 +116,7 @@ func MakeDetailedNode(r report.Report, n RenderableNode) DetailedNode {
|
||||
ID: n.ID,
|
||||
LabelMajor: n.LabelMajor,
|
||||
LabelMinor: n.LabelMinor,
|
||||
Rank: n.Rank,
|
||||
Pseudo: n.Pseudo,
|
||||
Tables: tables,
|
||||
Controls: controls(r, n),
|
||||
|
||||
@@ -88,6 +88,7 @@ func TestMakeDetailedHostNode(t *testing.T) {
|
||||
ID: render.MakeHostID(fixture.ClientHostID),
|
||||
LabelMajor: "client",
|
||||
LabelMinor: "hostname.com",
|
||||
Rank: "hostname.com",
|
||||
Pseudo: false,
|
||||
Controls: []render.ControlInstance{},
|
||||
Tables: []render.Table{
|
||||
@@ -155,6 +156,7 @@ func TestMakeDetailedContainerNode(t *testing.T) {
|
||||
ID: fixture.ServerContainerID,
|
||||
LabelMajor: "server",
|
||||
LabelMinor: fixture.ServerHostName,
|
||||
Rank: "imageid456",
|
||||
Pseudo: false,
|
||||
Controls: []render.ControlInstance{},
|
||||
Tables: []render.Table{
|
||||
|
||||
Reference in New Issue
Block a user