Skip to content

Commit

Permalink
Fixes #10315: Small fixes on dashboard display
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceMacBuche committed Mar 1, 2017
1 parent 7b10fcd commit cdd31dd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ class HomePage extends Loggable {
case Some(_: VirtualMachineType) => "Virtual"
case Some(PhysicalMachineType) => "Physical"
case _ => "No Machine Inventory"
} }.groupBy(identity).mapValues(_.size).foldLeft((Nil : List[JsExp], Nil : List[JsExp]))
} }.groupBy(identity).mapValues(_.size).toList.sortBy(_._2).foldLeft((Nil : List[JsExp], Nil : List[JsExp]))
{ case ((labels,values),(label,value)) => (label :: labels, value :: values) }
val machinesArray = JsObj("labels" -> JsArray(machines._1), "values" -> JsArray(machines._2))
val (osLabels,osValues) = nodeInfos.values.groupBy(_.osDetails.os.name).mapValues(_.size).foldLeft((Nil : List[JsExp], Nil : List[JsExp]))
val (osLabels,osValues) = nodeInfos.values.groupBy(_.osDetails.os.name).mapValues(_.size).toList.sortBy(_._2).foldLeft((Nil : List[JsExp], Nil : List[JsExp]))
{ case ((labels,values),(label,value)) => (label :: labels, value :: values) }

val osArray = JsObj("labels" -> JsArray(osLabels), "values" -> JsArray(osValues))
Expand Down
2 changes: 1 addition & 1 deletion rudder-web/src/main/webapp/javascript/rudder/homePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function homePage (
}
var stats = "Compliance based on "+ activeNodes
if (nodeCount.pending !== null) {
allNodes += nodeCount.pending;
allNodes += nodeCount.pending.nodes;
var pendingNodes = nodeCount.pending.nodes + " Nodes"
var verb = "are"
if (nodeCount.active === 1) {
Expand Down
1 change: 1 addition & 0 deletions rudder-web/src/main/webapp/secure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Rudder - Home</title>
<script type="text/javascript" src="/javascript/rudder/homePage.js"></script>
<script type="text/javascript" src="/javascript/gauge/gauge.min.js"></script>
<style type="text/css">body {overflow-y : scroll;}</style>
</head>

<div class="tw-bs homePage">
Expand Down
10 changes: 5 additions & 5 deletions rudder-web/src/main/webapp/style/rudder/rudder-bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -362,19 +362,19 @@
}

#globalCompliance .progress {
height:90px;
margin: 33px 25px;
height:80px;
margin: 33px 30px;
}

#globalCompliance .progress .progress-bar {
line-height: 90px;
line-height:80px;
font-size: 25px;
font-weight: 600;
}

#complianceGauge {
float: left;
width: 100%;
max-width: 100%;
width:420px;
}
#gauge-value {
font-weight: bold;
Expand Down
6 changes: 3 additions & 3 deletions rudder-web/src/main/webapp/style/rudder/rudder-menu.css
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ a.sidebar-toggle{
height: auto;
padding-top: 15px;
border-top: 2px solid #EBE7E7;
margin-left: 20%;
width: 60%;
position:relative
margin-left: 15%;
width: 70%;
position:relative;
}

.highlight{
Expand Down

0 comments on commit cdd31dd

Please sign in to comment.