mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of github.com:grafana/grafana
This commit is contained in:
commit
9d5e4bee56
@ -69,11 +69,11 @@
|
||||
* **OAuth**: Verify TLS during OAuth callback [#9373](https://github.com/grafana/grafana/issues/9373), thx [@mattbostock](https://github.com/mattbostock)
|
||||
|
||||
## Minor
|
||||
* **SMTP**: Make it possible to set specific EHLO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
|
||||
* **Dataproxy**: Allow grafan to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)
|
||||
* **SMTP**: Make it possible to set specific HELO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
|
||||
* **Dataproxy**: Allow grafana to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)
|
||||
* **HTTP**: set net.Dialer.DualStack to true for all http clients [#9367](https://github.com/grafana/grafana/pull/9367)
|
||||
* **Alerting**: Add diff and percent diff as series reducers [#9386](https://github.com/grafana/grafana/pull/9386), thx [@shanhuhai5739](https://github.com/shanhuhai5739)
|
||||
* **Slack**: Allow images to be uploaded to slack when Token is precent [#7175](https://github.com/grafana/grafana/issues/7175), thx [@xginn8](https://github.com/xginn8)
|
||||
* **Slack**: Allow images to be uploaded to slack when Token is present [#7175](https://github.com/grafana/grafana/issues/7175), thx [@xginn8](https://github.com/xginn8)
|
||||
* **Opsgenie**: Use their latest API instead of old version [#9399](https://github.com/grafana/grafana/pull/9399), thx [@cglrkn](https://github.com/cglrkn)
|
||||
* **Table**: Add support for displaying the timestamp with milliseconds [#9429](https://github.com/grafana/grafana/pull/9429), thx [@s1061123](https://github.com/s1061123)
|
||||
* **Hipchat**: Add metrics, message and image to hipchat notifications [#9110](https://github.com/grafana/grafana/issues/9110), thx [@eloo](https://github.com/eloo)
|
||||
|
@ -27,8 +27,7 @@ and the conditions that need to be met for the alert to change state and trigger
|
||||
## Execution
|
||||
|
||||
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`,
|
||||
`InfluxDB` and `OpenTSDB`.
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `OpenTSDB`, `MySQL`, `Postgres` and `Cloudwatch`.
|
||||
|
||||
### Clustering
|
||||
|
||||
|
@ -169,5 +169,3 @@ Amazon provides 1 million CloudWatch API requests each month at no additional ch
|
||||
it costs $0.01 per 1,000 GetMetricStatistics or ListMetrics requests. For each query Grafana will
|
||||
issue a GetMetricStatistics request and every time you pick a dimension in the query editor
|
||||
Grafana will issue a ListMetrics request.
|
||||
|
||||
|
||||
|
@ -1,27 +1,14 @@
|
||||
define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'jquery',
|
||||
'../core_module',
|
||||
],
|
||||
function (angular, _, $, coreModule) {
|
||||
'use strict';
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
import coreModule from '../core_module';
|
||||
|
||||
coreModule.default.controller('InspectCtrl', function($scope, $sanitize) {
|
||||
export class InspectCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor($scope, $sanitize) {
|
||||
var model = $scope.inspector;
|
||||
|
||||
function getParametersFromQueryString(queryString) {
|
||||
var result = [];
|
||||
var parameters = queryString.split("&");
|
||||
for (var i = 0; i < parameters.length; i++) {
|
||||
var keyValue = parameters[i].split("=");
|
||||
if (keyValue[1].length > 0) {
|
||||
result.push({ key: keyValue[0], value: window.unescape(keyValue[1]) });
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
$scope.init = function () {
|
||||
$scope.editor = { index: 0 };
|
||||
|
||||
@ -57,7 +44,7 @@ function (angular, _, $, coreModule) {
|
||||
$scope.editor.index = 2;
|
||||
|
||||
if (_.isString(model.error.config.data)) {
|
||||
$scope.request_parameters = getParametersFromQueryString(model.error.config.data);
|
||||
$scope.request_parameters = this.getParametersFromQueryString(model.error.config.data);
|
||||
} else {
|
||||
$scope.request_parameters = _.map(model.error.config.data, function(value, key) {
|
||||
return {key: key, value: angular.toJson(value, true)};
|
||||
@ -65,7 +52,18 @@ function (angular, _, $, coreModule) {
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
getParametersFromQueryString(queryString) {
|
||||
var result = [];
|
||||
var parameters = queryString.split("&");
|
||||
for (var i = 0; i < parameters.length; i++) {
|
||||
var keyValue = parameters[i].split("=");
|
||||
if (keyValue[1].length > 0) {
|
||||
result.push({ key: keyValue[0], value: (<any>window).unescape(keyValue[1]) });
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
coreModule.controller('InspectCtrl', InspectCtrl);
|
@ -1,10 +1,9 @@
|
||||
define([
|
||||
'../core_module',
|
||||
],
|
||||
function (coreModule) {
|
||||
"use strict";
|
||||
import coreModule from '../core_module';
|
||||
|
||||
coreModule.default.controller('LoadDashboardCtrl', function($scope, $routeParams, dashboardLoaderSrv, backendSrv, $location) {
|
||||
export class LoadDashboardCtrl {
|
||||
|
||||
/** @ngInject */
|
||||
constructor($scope, $routeParams, dashboardLoaderSrv, backendSrv, $location) {
|
||||
$scope.appEvent("dashboard-fetch-start");
|
||||
|
||||
if (!$routeParams.slug) {
|
||||
@ -23,10 +22,13 @@ function (coreModule) {
|
||||
dashboardLoaderSrv.loadDashboard($routeParams.type, $routeParams.slug).then(function(result) {
|
||||
$scope.initDashboard(result, $scope);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
export class NewDashboardCtrl {
|
||||
|
||||
coreModule.default.controller('NewDashboardCtrl', function($scope) {
|
||||
/** @ngInject */
|
||||
constructor($scope) {
|
||||
$scope.initDashboard({
|
||||
meta: { canStar: false, canShare: false, isNew: true },
|
||||
dashboard: {
|
||||
@ -35,12 +37,14 @@ function (coreModule) {
|
||||
{
|
||||
title: 'Dashboard Row',
|
||||
height: '250px',
|
||||
panels:[],
|
||||
panels: [],
|
||||
isNew: true,
|
||||
}
|
||||
]
|
||||
},
|
||||
}, $scope);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
coreModule.controller('LoadDashboardCtrl', LoadDashboardCtrl);
|
||||
coreModule.controller('NewDashboardCtrl', NewDashboardCtrl);
|
@ -1,41 +0,0 @@
|
||||
define([
|
||||
'angular',
|
||||
'jquery',
|
||||
'app/core/core_module',
|
||||
'app/core/config',
|
||||
],
|
||||
function(angular, $, coreModule, config) {
|
||||
'use strict';
|
||||
|
||||
config = config.default;
|
||||
|
||||
coreModule.default.service('googleAnalyticsSrv', function($rootScope, $location) {
|
||||
|
||||
function gaInit() {
|
||||
$.getScript('https://www.google-analytics.com/analytics.js'); // jQuery shortcut
|
||||
var ga = window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments); }; ga.l = +new Date;
|
||||
ga('create', config.googleAnalyticsId, 'auto');
|
||||
return ga;
|
||||
}
|
||||
|
||||
this.init = function() {
|
||||
|
||||
$rootScope.$on('$viewContentLoaded', function() {
|
||||
var track = { page: $location.url() };
|
||||
|
||||
var ga = window.ga || gaInit();
|
||||
|
||||
ga('set', track);
|
||||
ga('send', 'pageview');
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}).run(function(googleAnalyticsSrv) {
|
||||
|
||||
if (config.googleAnalyticsId) {
|
||||
googleAnalyticsSrv.init();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
36
public/app/core/services/analytics.ts
Normal file
36
public/app/core/services/analytics.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import $ from 'jquery';
|
||||
import coreModule from 'app/core/core_module';
|
||||
import config from 'app/core/config';
|
||||
|
||||
export class Analytics {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $rootScope, private $location) {
|
||||
}
|
||||
|
||||
gaInit() {
|
||||
$.getScript('https://www.google-analytics.com/analytics.js'); // jQuery shortcut
|
||||
var ga = (<any>window).ga = (<any>window).ga || function () { (ga.q = ga.q || []).push(arguments); }; ga.l = +new Date;
|
||||
ga('create', (<any>config).googleAnalyticsId, 'auto');
|
||||
return ga;
|
||||
}
|
||||
|
||||
init() {
|
||||
this.$rootScope.$on('$viewContentLoaded', () => {
|
||||
var track = { page: this.$location.url() };
|
||||
var ga = (<any>window).ga || this.gaInit();
|
||||
ga('set', track);
|
||||
ga('send', 'pageview');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** @ngInject */
|
||||
function startAnalytics(googleAnalyticsSrv) {
|
||||
if ((<any>config).googleAnalyticsId) {
|
||||
googleAnalyticsSrv.init();
|
||||
}
|
||||
}
|
||||
|
||||
coreModule.service('googleAnalyticsSrv', Analytics).run(startAnalytics);
|
||||
|
@ -6,7 +6,7 @@ import coreModule from 'app/core/core_module';
|
||||
export class Timer {
|
||||
timers = [];
|
||||
|
||||
/** @ngInject */
|
||||
/** @ngInject */
|
||||
constructor(private $timeout) {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user