Commit f0b7099b by Torkel Ödegaard

SingleStatPanel: renamed panel to singlestat

parent ee183d45
...@@ -17,7 +17,7 @@ function (_, crypto) { ...@@ -17,7 +17,7 @@ function (_, crypto) {
window_title_prefix : 'Grafana - ', window_title_prefix : 'Grafana - ',
panels : { panels : {
'graph': { path: 'panels/graph' }, 'graph': { path: 'panels/graph' },
'stats': { path: 'panels/stats' }, 'singlestat': { path: 'panels/singlestat' },
'text': { path: 'panels/text' } 'text': { path: 'panels/text' }
}, },
plugins : {}, 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> <div class="clearfix"></div>
......
...@@ -5,15 +5,15 @@ define([ ...@@ -5,15 +5,15 @@ define([
'components/timeSeries', 'components/timeSeries',
'kbn', 'kbn',
'services/panelSrv', 'services/panelSrv',
'./statsDirective', './singleStatPanel',
], ],
function (angular, app, _, TimeSeries, kbn) { function (angular, app, _, TimeSeries, kbn) {
'use strict'; 'use strict';
var module = angular.module('grafana.panels.stats'); var module = angular.module('grafana.panels.singlestat');
app.useModule(module); app.useModule(module);
module.controller('StatsCtrl', function($scope, panelSrv, timeSrv) { module.controller('SingleStatCtrl', function($scope, panelSrv, timeSrv) {
$scope.panelMeta = { $scope.panelMeta = {
titlePos: 'left', titlePos: 'left',
...@@ -29,7 +29,7 @@ function (angular, app, _, TimeSeries, kbn) { ...@@ -29,7 +29,7 @@ function (angular, app, _, TimeSeries, kbn) {
}, },
{ {
title: 'Options', title: 'Options',
src:'app/panels/stats/statsEditor.html' src:'app/panels/singlestat/editor.html'
} }
], ],
fullscreenEdit: true, fullscreenEdit: true,
......
...@@ -10,10 +10,10 @@ define([ ...@@ -10,10 +10,10 @@ define([
function (angular, app, _, kbn, $) { function (angular, app, _, kbn, $) {
'use strict'; 'use strict';
var module = angular.module('grafana.panels.stats', []); var module = angular.module('grafana.panels.singlestat', []);
app.useModule(module); app.useModule(module);
module.directive('statsPanel', function() { module.directive('singlestatPanel', function() {
return { return {
link: function(scope, elem) { link: function(scope, elem) {
...@@ -69,14 +69,14 @@ function (angular, app, _, kbn, $) { ...@@ -69,14 +69,14 @@ function (angular, app, _, kbn, $) {
} }
function getBigValueHtml() { 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); 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>'; body += '</div>';
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
@import "search.less"; @import "search.less";
@import "panel.less"; @import "panel.less";
@import "forms.less"; @import "forms.less";
@import "stats-panel.less"; @import "singlestat.less";
.row-control-inner { .row-control-inner {
padding:0px; padding:0px;
......
.stats-panel { .singlestat-panel {
position: relative; position: relative;
display: table; display: table;
width: 100%; width: 100%;
} }
.stats-panel-value-container { .singlestat-panel-value-container {
padding: 20px; padding: 20px;
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
font-weight: bold; font-weight: bold;
} }
.stats-panel-prefix { .singlestat-panel-prefix {
padding-right: 20px; padding-right: 20px;
} }
.stats-panel-table { .singlestat-panel-table {
width: 100%; width: 100%;
td { td {
padding: 5px 10px; 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