Some more UI/JS fixes/cleanups.

This commit is contained in:
Julius Volz 2015-01-19 14:27:07 +01:00
parent 013c22ca01
commit 12a99ab5b4
2 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ body {
} }
.graph_wrapper { .graph_wrapper {
margin-top: 8px; margin-top: 12px;
} }
.graph { .graph {
@ -21,7 +21,7 @@ body {
} }
.nav-tabs { .nav-tabs {
margin-top: 5px; margin-top: 10px;
} }
.nav-tabs > li > a { .nav-tabs > li > a {
@ -210,6 +210,7 @@ input[name="end_input"], input[name="range_input"] {
.expression_select { .expression_select {
width: 210px !important; width: 210px !important;
margin-left: 7px;
} }
.graph_container .rickshaw_legend { .graph_container .rickshaw_legend {

View file

@ -92,7 +92,6 @@ Prometheus.Graph.prototype.initialize = function() {
language: 'en', language: 'en',
pickSeconds: false, pickSeconds: false,
}); });
// can we remove this conditional now?
if (self.options["end_input"]) { if (self.options["end_input"]) {
self.endDate.data('datetimepicker').setValue(self.options["end_input"]); self.endDate.data('datetimepicker').setValue(self.options["end_input"]);
} }
@ -530,7 +529,7 @@ Prometheus.Graph.prototype.handleConsoleResponse = function(data, textStatus) {
switch(data.Type) { switch(data.Type) {
case "vector": case "vector":
if (data.Value.length === 0) { if (data.Value.length === 0) {
tBody.append("<tr><td colspan='2'><i>no data</i></td></tr>") tBody.append("<tr><td colspan='2'><i>no data</i></td></tr>");
return; return;
} }
for (var i = 0; i < data.Value.length; i++) { for (var i = 0; i < data.Value.length; i++) {
@ -541,7 +540,7 @@ Prometheus.Graph.prototype.handleConsoleResponse = function(data, textStatus) {
break; break;
case "matrix": case "matrix":
if (data.Value.length === 0) { if (data.Value.length === 0) {
tBody.append("<tr><td colspan='2'><i>no data</i></td></tr>") tBody.append("<tr><td colspan='2'><i>no data</i></td></tr>");
return; return;
} }
for (var i = 0; i < data.Value.length; i++) { for (var i = 0; i < data.Value.length; i++) {