Commit f0b7099b by Torkel Ödegaard

SingleStatPanel: renamed panel to singlestat

parent ee183d45
......@@ -17,7 +17,7 @@ function (_, crypto) {
window_title_prefix : 'Grafana - ',
panels : {
'graph': { path: 'panels/graph' },
'stats': { path: 'panels/stats' },
'singlestat': { path: 'panels/singlestat' },
'text': { path: 'panels/text' }
},
plugins : {},
......
<div ng-controller='StatsCtrl'>
<div ng-controller='SingleStatCtrl'>
<div class="stats-panel" stats-panel></div>
<div class="singlestat-panel" singlestat-panel></div>
<div class="clearfix"></div>
......
......@@ -5,15 +5,15 @@ define([
'components/timeSeries',
'kbn',
'services/panelSrv',
'./statsDirective',
'./singleStatPanel',
],
function (angular, app, _, TimeSeries, kbn) {
'use strict';
var module = angular.module('grafana.panels.stats');
var module = angular.module('grafana.panels.singlestat');
app.useModule(module);
module.controller('StatsCtrl', function($scope, panelSrv, timeSrv) {
module.controller('SingleStatCtrl', function($scope, panelSrv, timeSrv) {
$scope.panelMeta = {
titlePos: 'left',
......@@ -29,7 +29,7 @@ function (angular, app, _, TimeSeries, kbn) {
},
{
title: 'Options',
src:'app/panels/stats/statsEditor.html'
src:'app/panels/singlestat/editor.html'
}
],
fullscreenEdit: true,
......
......@@ -10,10 +10,10 @@ define([
function (angular, app, _, kbn, $) {
'use strict';
var module = angular.module('grafana.panels.stats', []);
var module = angular.module('grafana.panels.singlestat', []);
app.useModule(module);
module.directive('statsPanel', function() {
module.directive('singlestatPanel', function() {
return {
link: function(scope, elem) {
......@@ -69,14 +69,14 @@ function (angular, app, _, kbn, $) {
}
function getBigValueHtml() {
var body = '<div class="stats-panel-value-container">';
var body = '<div class="singlestat-panel-value-container">';
if (panel.prefix) { body += getSpan('stats-panel-prefix', panel.prefixFontSize, scope.panel.prefix); }
if (panel.prefix) { body += getSpan('singlestat-panel-prefix', panel.prefixFontSize, scope.panel.prefix); }
var value = applyColoringThresholds(data.mainValue, data.mainValueFormated);
body += getSpan('stats-panel-value', panel.valueFontSize, value);
body += getSpan('singlestat-panel-value', panel.valueFontSize, value);
if (panel.postfix) { body += getSpan('stats-panel-postfix', panel.postfixFontSize, panel.postfix); }
if (panel.postfix) { body += getSpan('singlestat-panel-postfix', panel.postfixFontSize, panel.postfix); }
body += '</div>';
......
......@@ -6,7 +6,7 @@
@import "search.less";
@import "panel.less";
@import "forms.less";
@import "stats-panel.less";
@import "singlestat.less";
.row-control-inner {
padding:0px;
......
.stats-panel {
.singlestat-panel {
position: relative;
display: table;
width: 100%;
}
.stats-panel-value-container {
.singlestat-panel-value-container {
padding: 20px;
display: table-cell;
vertical-align: middle;
......@@ -15,11 +15,11 @@
font-weight: bold;
}
.stats-panel-prefix {
.singlestat-panel-prefix {
padding-right: 20px;
}
.stats-panel-table {
.singlestat-panel-table {
width: 100%;
td {
padding: 5px 10px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment