mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of github.com:torkelo/grafana-private into pro
This commit is contained in:
commit
c287405471
@ -4,6 +4,7 @@
|
|||||||
- [Issue #802](https://github.com/grafana/grafana/issues/802). Annotations: Fix when using InfluxDB datasource
|
- [Issue #802](https://github.com/grafana/grafana/issues/802). Annotations: Fix when using InfluxDB datasource
|
||||||
- [Issue #795](https://github.com/grafana/grafana/issues/795). Chrome: Fix for display issue in chrome beta & chrome canary when entering edit mode
|
- [Issue #795](https://github.com/grafana/grafana/issues/795). Chrome: Fix for display issue in chrome beta & chrome canary when entering edit mode
|
||||||
- [Issue #818](https://github.com/grafana/grafana/issues/818). Graph: Added percent y-axis format
|
- [Issue #818](https://github.com/grafana/grafana/issues/818). Graph: Added percent y-axis format
|
||||||
|
- [Issue #828](https://github.com/grafana/grafana/issues/828). Elasticsearch: saving new dashboard with title equal to slugified url would cause it to deleted.
|
||||||
|
|
||||||
# 1.8.0-RC1 (2014-09-12)
|
# 1.8.0-RC1 (2014-09-12)
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ function($, _, moment) {
|
|||||||
|
|
||||||
kbn.msFormat = function(size, decimals) {
|
kbn.msFormat = function(size, decimals) {
|
||||||
// Less than 1 milli, downscale to micro
|
// Less than 1 milli, downscale to micro
|
||||||
if (Math.abs(size) < 1) {
|
if (size !== 0 && Math.abs(size) < 1) {
|
||||||
return kbn.microsFormat(size * 1000, decimals);
|
return kbn.microsFormat(size * 1000, decimals);
|
||||||
}
|
}
|
||||||
else if (Math.abs(size) < 1000) {
|
else if (Math.abs(size) < 1000) {
|
||||||
@ -595,7 +595,7 @@ function($, _, moment) {
|
|||||||
|
|
||||||
kbn.sFormat = function(size, decimals) {
|
kbn.sFormat = function(size, decimals) {
|
||||||
// Less than 1 sec, downscale to milli
|
// Less than 1 sec, downscale to milli
|
||||||
if (Math.abs(size) < 1) {
|
if (size !== 0 && Math.abs(size) < 1) {
|
||||||
return kbn.msFormat(size * 1000, decimals);
|
return kbn.msFormat(size * 1000, decimals);
|
||||||
}
|
}
|
||||||
// Less than 10 min, use seconds
|
// Less than 10 min, use seconds
|
||||||
@ -624,7 +624,7 @@ function($, _, moment) {
|
|||||||
|
|
||||||
kbn.microsFormat = function(size, decimals) {
|
kbn.microsFormat = function(size, decimals) {
|
||||||
// Less than 1 micro, downscale to nano
|
// Less than 1 micro, downscale to nano
|
||||||
if (Math.abs(size) < 1) {
|
if (size !== 0 && Math.abs(size) < 1) {
|
||||||
return kbn.nanosFormat(size * 1000, decimals);
|
return kbn.nanosFormat(size * 1000, decimals);
|
||||||
}
|
}
|
||||||
else if (Math.abs(size) < 1000) {
|
else if (Math.abs(size) < 1000) {
|
||||||
|
@ -78,7 +78,7 @@ function (angular, _, moment, config, store) {
|
|||||||
var clone = angular.copy($scope.dashboard);
|
var clone = angular.copy($scope.dashboard);
|
||||||
$scope.db.saveDashboard(clone)
|
$scope.db.saveDashboard(clone)
|
||||||
.then(function(result) {
|
.then(function(result) {
|
||||||
alertSrv.set('Dashboard Saved', 'Dashboard has been saved as "' + result.title + '"','success', 5000);
|
alertSrv.set('Dashboard Saved', 'Saved as "' + result.title + '"','success', 3000);
|
||||||
|
|
||||||
if (result.url !== $location.path()) {
|
if (result.url !== $location.path()) {
|
||||||
$location.search({});
|
$location.search({});
|
||||||
|
@ -110,6 +110,11 @@ function (angular, $, kbn, moment, _) {
|
|||||||
|
|
||||||
// Populate element
|
// Populate element
|
||||||
var options = {
|
var options = {
|
||||||
|
hooks: {
|
||||||
|
drawSeries: [function() {
|
||||||
|
console.log('drawSeries', arguments);
|
||||||
|
}]
|
||||||
|
},
|
||||||
legend: { show: false },
|
legend: { show: false },
|
||||||
series: {
|
series: {
|
||||||
stackpercent: panel.stack ? panel.percentage : false,
|
stackpercent: panel.stack ? panel.percentage : false,
|
||||||
|
@ -37,6 +37,7 @@ function (angular, _, config, kbn, moment) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (this.basicAuth) {
|
if (this.basicAuth) {
|
||||||
|
options.withCredentials = true;
|
||||||
options.headers = {
|
options.headers = {
|
||||||
"Authorization": "Basic " + this.basicAuth
|
"Authorization": "Basic " + this.basicAuth
|
||||||
};
|
};
|
||||||
@ -168,7 +169,7 @@ function (angular, _, config, kbn, moment) {
|
|||||||
|
|
||||||
return this._request('PUT', '/dashboard/' + id, this.index, data)
|
return this._request('PUT', '/dashboard/' + id, this.index, data)
|
||||||
.then(function(results) {
|
.then(function(results) {
|
||||||
self._removeUnslugifiedDashboard(results, title);
|
self._removeUnslugifiedDashboard(results, title, id);
|
||||||
return { title: title, url: '/dashboard/db/' + id };
|
return { title: title, url: '/dashboard/db/' + id };
|
||||||
}, function() {
|
}, function() {
|
||||||
throw 'Failed to save to elasticsearch';
|
throw 'Failed to save to elasticsearch';
|
||||||
@ -176,8 +177,9 @@ function (angular, _, config, kbn, moment) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ElasticDatasource.prototype._removeUnslugifiedDashboard = function(saveResult, title) {
|
ElasticDatasource.prototype._removeUnslugifiedDashboard = function(saveResult, title, id) {
|
||||||
if (saveResult.statusText !== 'Created') { return; }
|
if (saveResult.statusText !== 'Created') { return; }
|
||||||
|
if (title === id) { return; }
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
this._get('/dashboard/' + title).then(function() {
|
this._get('/dashboard/' + title).then(function() {
|
||||||
|
@ -59,6 +59,7 @@ a.text-success:hover { color: darken(@green, 10%); }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.brand {
|
.brand {
|
||||||
|
padding: 0px 15px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: @navbarLinkColorHover;
|
color: @navbarLinkColorHover;
|
||||||
@ -461,7 +462,6 @@ legend {
|
|||||||
// -----------------------------------------------------
|
// -----------------------------------------------------
|
||||||
|
|
||||||
.alert {
|
.alert {
|
||||||
.border-radius(0);
|
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
|
|
||||||
&-heading, h1, h2, h3, h4, h5, h6 {
|
&-heading, h1, h2, h3, h4, h5, h6 {
|
||||||
|
@ -317,13 +317,38 @@ div.flot-text {
|
|||||||
color: @textColor !important;
|
color: @textColor !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-notice {
|
.page-alert-list {
|
||||||
z-index:8000;
|
z-index:8000;
|
||||||
margin-left:0px;
|
min-width: 300px;
|
||||||
padding:3px 0px 3px 0px;
|
max-width: 300px;
|
||||||
width:100%;
|
position: fixed;
|
||||||
padding-left:20px;
|
right: 20px;
|
||||||
|
top: 56px;
|
||||||
|
|
||||||
|
.alert {
|
||||||
color: @white;
|
color: @white;
|
||||||
|
padding-bottom: 13px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-close {
|
||||||
|
position: absolute;
|
||||||
|
top: -4px;
|
||||||
|
right: -2px;
|
||||||
|
width: 19px;
|
||||||
|
height: 19px;
|
||||||
|
padding: 0;
|
||||||
|
background: @grayLighter;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: none;
|
||||||
|
font-size: 1.1rem;
|
||||||
|
color: @grayDarker;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-title {
|
||||||
|
font-weight: bold;
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,9 +24,14 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="css/grafana.light.min.css" ng-if="grafana.style === 'light'">
|
<link rel="stylesheet" href="css/grafana.light.min.css" ng-if="grafana.style === 'light'">
|
||||||
|
|
||||||
<div ng-repeat='alert in dashAlerts.list' class="alert-{{alert.severity}} dashboard-notice" ng-show="$last">
|
<div class="page-alert-list">
|
||||||
<button type="button" class="close" ng-click="dashAlerts.clear(alert)" style="padding-right:50px">×</button>
|
<div ng-repeat='alert in dashAlerts.list' class="alert-{{alert.severity}} alert">
|
||||||
<strong>{{alert.title}}</strong> <span ng-bind-html='alert.text'></span> <div style="padding-right:10px" class='pull-right small'> {{$index + 1}} alert(s) </div>
|
<button type="button" class="alert-close" ng-click="dashAlerts.clear(alert)">
|
||||||
|
<i class="icon-remove-sign"></i>
|
||||||
|
</button>
|
||||||
|
<div class="alert-title">{{alert.title}}</div>
|
||||||
|
<div ng-bind-html='alert.text'></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-view></div>
|
<div ng-view></div>
|
||||||
|
@ -15,6 +15,12 @@ define([
|
|||||||
expect(str).to.be('1.02 hour');
|
expect(str).to.be('1.02 hour');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should not downscale when value is zero', function() {
|
||||||
|
var str = kbn.msFormat(0, 2);
|
||||||
|
expect(str).to.be('0.00 ms');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
it('should translate 365445 as 6.09 min', function() {
|
it('should translate 365445 as 6.09 min', function() {
|
||||||
var str = kbn.msFormat(365445, 2);
|
var str = kbn.msFormat(365445, 2);
|
||||||
expect(str).to.be('6.09 min');
|
expect(str).to.be('6.09 min');
|
||||||
|
Loading…
Reference in New Issue
Block a user