Permalink
Browse files

Merge pull request #116 from grimradical/dashboard-cleanups

Adjust console spacing and shading
  • Loading branch information...
2 parents 80427df + 138b5b7 commit 74a8ffb4913dc79acccb269f5cfc689226fa1e03 @nicklewis nicklewis committed Apr 7, 2012
Showing with 30 additions and 29 deletions.
  1. +5 −4 resources/public/dashboard/charts.js
  2. +25 −25 resources/public/dashboard/index.html
@@ -43,18 +43,19 @@ function counterAndSparkline() {
// Y axis, linear scale
var y = d3.scale.linear()
- .range([h, 0]);
+ .range([h, 1]);
// Function that extracts values from a datum
var value = function(d) { return d.value; };
// SVG pathing computation, plotting time vs. value. We use
// linear interpolation to provide better visibility of data
// points. For prettier lines, try "basis" or "monotone".
- var line = d3.svg.line()
+ var line = d3.svg.area()
.interpolate("linear")
- .x(function(d) { return x(d.time); })
- .y(function(d) { return y(d.value); });
+ .x(function(d) { return 1+x(d.time); })
+ .y1(h+1)
+ .y0(function(d) { return y(d.value); });
// The "box" represents all DOM elements for this metrics'
// display
@@ -14,9 +14,9 @@
}
.line {
- fill: none;
+ fill: #edf7ff;
stroke: #43a2ca;
- stroke-width: 2.0px;
+ stroke-width: 1.5px;
}
#metrics {
@@ -27,11 +27,11 @@
#metrics td {
margin: 0px;
- padding: 0px 20px;
+ padding: 0px 10px;
}
#metrics tr {
- border-bottom: thin solid #ddd;
+ border-bottom: 2px solid #eee;
}
.counterbox {
@@ -65,7 +65,7 @@
}
.axis {
- font-size: 8px;
+ font-size: 10px;
color: #999;
}
@@ -213,11 +213,11 @@
.call();
counterAndSparkline()
- .url("/metrics/mbean/com.puppetlabs.puppetdb.scf.storage:type=default,name=duplicate-pct")
- .snag(function(res) { return res["Value"]; })
- .format(d3.format(",.1%"))
- .description("Catalog duplication")
- .addendum("% of catalogs encountered")
+ .url("/metrics/mbean/com.puppetlabs.puppetdb.http.server:type=commands,name=service-time")
+ .snag(function(res) { return res["50thPercentile"] / 1000; })
+ .format(d3.format(",.3s"))
+ .description("Enqueueing")
+ .addendum("service time, seconds")
.container("#metrics")
.nHistorical(nHistorical)
.pollingInterval(pollingInterval)
@@ -226,11 +226,11 @@
.call();
counterAndSparkline()
- .url("/metrics/mbean/com.puppetlabs.puppetdb.query.population:type=default,name=pct-resource-dupes")
- .snag(function(res) { return res["Value"]; })
- .format(d3.format(",.1%"))
- .description("Resource duplication")
- .addendum("% of resources stored")
+ .url("/metrics/mbean/com.puppetlabs.puppetdb.http.server:type=resources,name=service-time")
+ .snag(function(res) { return res["50thPercentile"] / 1000; })
+ .format(d3.format(",.3s"))
+ .description("Collection Queries")
+ .addendum("service time, seconds")
.container("#metrics")
.nHistorical(nHistorical)
.pollingInterval(pollingInterval)
@@ -252,11 +252,11 @@
.call();
counterAndSparkline()
- .url("/metrics/mbean/com.puppetlabs.puppetdb.http.server:type=commands,name=service-time")
- .snag(function(res) { return res["50thPercentile"] / 1000; })
- .format(d3.format(",.3s"))
- .description("Enqueueing")
- .addendum("service time, seconds")
+ .url("/metrics/mbean/com.puppetlabs.puppetdb.scf.storage:type=default,name=duplicate-pct")
+ .snag(function(res) { return res["Value"]; })
+ .format(d3.format(",.1%"))
+ .description("Catalog duplication")
+ .addendum("% of catalogs encountered")
.container("#metrics")
.nHistorical(nHistorical)
.pollingInterval(pollingInterval)
@@ -265,11 +265,11 @@
.call();
counterAndSparkline()
- .url("/metrics/mbean/com.puppetlabs.puppetdb.http.server:type=resources,name=service-time")
- .snag(function(res) { return res["50thPercentile"] / 1000; })
- .format(d3.format(",.3s"))
- .description("Collection Queries")
- .addendum("service time, seconds")
+ .url("/metrics/mbean/com.puppetlabs.puppetdb.query.population:type=default,name=pct-resource-dupes")
+ .snag(function(res) { return res["Value"]; })
+ .format(d3.format(",.1%"))
+ .description("Resource duplication")
+ .addendum("% of resources stored")
.container("#metrics")
.nHistorical(nHistorical)
.pollingInterval(pollingInterval)

0 comments on commit 74a8ffb

Please sign in to comment.