mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
SingleStatPanel: renamed panel to singlestat
This commit is contained in:
parent
ee183d4574
commit
f0b7099be3
@ -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 : {},
|
||||
|
@ -1,6 +1,6 @@
|
||||
<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;
|
||||
|
@ -1,10 +1,10 @@
|
||||
.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;
|
Loading…
Reference in New Issue
Block a user