Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #10315: Small fixes on dashboard display #1541

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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