mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into develop
This commit is contained in:
commit
f5b63fc65d
16
CHANGELOG.md
16
CHANGELOG.md
@ -14,18 +14,24 @@
|
|||||||
* **Cloudwatch**: Show all available CloudWatch regions [#12308](https://github.com/grafana/grafana/issues/12308), thx [@mtanda](https://github.com/mtanda)
|
* **Cloudwatch**: Show all available CloudWatch regions [#12308](https://github.com/grafana/grafana/issues/12308), thx [@mtanda](https://github.com/mtanda)
|
||||||
* **Cloudwatch**: AWS/Connect metrics and dimensions [#13970](https://github.com/grafana/grafana/pull/13970), thx [@zcoffy](https://github.com/zcoffy)
|
* **Cloudwatch**: AWS/Connect metrics and dimensions [#13970](https://github.com/grafana/grafana/pull/13970), thx [@zcoffy](https://github.com/zcoffy)
|
||||||
* **Postgres**: Add delta window function to postgres query builder [#13925](https://github.com/grafana/grafana/issues/13925), thx [svenklemm](https://github.com/svenklemm)
|
* **Postgres**: Add delta window function to postgres query builder [#13925](https://github.com/grafana/grafana/issues/13925), thx [svenklemm](https://github.com/svenklemm)
|
||||||
* **Units**: New clock time format, to format ms or second values as for example `01h:59m`, [#13635](https://github.com/grafana/grafana/issues/13635), thx [@franciscocpg](https://github.com/franciscocpg)
|
* **Elasticsearch**: Fix switching to/from es raw document metric query [#6367](https://github.com/grafana/grafana/issues/6367)
|
||||||
* **Datasource Proxy**: Keep trailing slash for datasource proxy requests [#13326](https://github.com/grafana/grafana/pull/13326), thx [@ryantxu](https://github.com/ryantxu)
|
* **Elasticsearch**: Fix deprecation warning about terms aggregation order key in Elasticsearch 6.x [#11977](https://github.com/grafana/grafana/issues/11977)
|
||||||
* **DingDing**: Can't receive DingDing alert when alert is triggered [#13723](https://github.com/grafana/grafana/issues/13723), thx [@Yukinoshita-Yukino](https://github.com/Yukinoshita-Yukino)
|
|
||||||
* **Internal metrics**: Renamed `grafana_info` to `grafana_build_info` and added branch, goversion and revision [#13876](https://github.com/grafana/grafana/pull/13876)
|
|
||||||
* **Alerting**: Increaste default duration for queries [#13945](https://github.com/grafana/grafana/pull/13945)
|
|
||||||
* **Table**: Fix CSS alpha background-color applied twice in table cell with link [#13606](https://github.com/grafana/grafana/issues/13606), thx [@grisme](https://github.com/grisme)
|
* **Table**: Fix CSS alpha background-color applied twice in table cell with link [#13606](https://github.com/grafana/grafana/issues/13606), thx [@grisme](https://github.com/grisme)
|
||||||
|
* **Units**: New clock time format, to format ms or second values as for example `01h:59m`, [#13635](https://github.com/grafana/grafana/issues/13635), thx [@franciscocpg](https://github.com/franciscocpg)
|
||||||
|
* **Alerting**: Increaste default duration for queries [#13945](https://github.com/grafana/grafana/pull/13945)
|
||||||
* **Alerting**: More options for the Slack Alert notifier [#13993](https://github.com/grafana/grafana/issues/13993), thx [@andreykaipov](https://github.com/andreykaipov)
|
* **Alerting**: More options for the Slack Alert notifier [#13993](https://github.com/grafana/grafana/issues/13993), thx [@andreykaipov](https://github.com/andreykaipov)
|
||||||
|
* **Alerting**: Can't receive DingDing alert when alert is triggered [#13723](https://github.com/grafana/grafana/issues/13723), thx [@Yukinoshita-Yukino](https://github.com/Yukinoshita-Yukino)
|
||||||
|
* **Internal metrics**: Renamed `grafana_info` to `grafana_build_info` and added branch, goversion and revision [#13876](https://github.com/grafana/grafana/pull/13876)
|
||||||
|
* **Datasource Proxy**: Keep trailing slash for datasource proxy requests [#13326](https://github.com/grafana/grafana/pull/13326), thx [@ryantxu](https://github.com/ryantxu)
|
||||||
|
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
|
|
||||||
* Postgres/MySQL/MSSQL datasources now per default uses `max open connections` = `unlimited` (earlier 10), `max idle connections` = `2` (earlier 10) and `connection max lifetime` = `4` hours (earlier unlimited)
|
* Postgres/MySQL/MSSQL datasources now per default uses `max open connections` = `unlimited` (earlier 10), `max idle connections` = `2` (earlier 10) and `connection max lifetime` = `4` hours (earlier unlimited)
|
||||||
|
|
||||||
|
# 5.3.5 (unreleased)
|
||||||
|
|
||||||
|
* **Security**: Upgrade macaron session package to fix security issue. [#14043](https://github.com/grafana/grafana/pull/14043)
|
||||||
|
|
||||||
# 5.3.4 (2018-11-13)
|
# 5.3.4 (2018-11-13)
|
||||||
|
|
||||||
* **Alerting**: Delete alerts when parent folder was deleted [#13322](https://github.com/grafana/grafana/issues/13322)
|
* **Alerting**: Delete alerts when parent folder was deleted [#13322](https://github.com/grafana/grafana/issues/13322)
|
||||||
|
@ -94,6 +94,10 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
* Not kept in component state to prevent edit-render roundtrips.
|
* Not kept in component state to prevent edit-render roundtrips.
|
||||||
*/
|
*/
|
||||||
queryExpressions: string[];
|
queryExpressions: string[];
|
||||||
|
/**
|
||||||
|
* Local ID cache to compare requested vs selected datasource
|
||||||
|
*/
|
||||||
|
requestedDatasourceId: string;
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -167,6 +171,9 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
const datasourceId = datasource.meta.id;
|
const datasourceId = datasource.meta.id;
|
||||||
let datasourceError = null;
|
let datasourceError = null;
|
||||||
|
|
||||||
|
// Keep ID to track selection
|
||||||
|
this.requestedDatasourceId = datasourceId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const testResult = await datasource.testDatasource();
|
const testResult = await datasource.testDatasource();
|
||||||
datasourceError = testResult.status === 'success' ? null : testResult.message;
|
datasourceError = testResult.status === 'success' ? null : testResult.message;
|
||||||
@ -174,6 +181,11 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
datasourceError = (error && error.statusText) || 'Network error';
|
datasourceError = (error && error.statusText) || 'Network error';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (datasourceId !== this.requestedDatasourceId) {
|
||||||
|
// User already changed datasource again, discard results
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const historyKey = `grafana.explore.history.${datasourceId}`;
|
const historyKey = `grafana.explore.history.${datasourceId}`;
|
||||||
const history = store.getObject(historyKey, []);
|
const history = store.getObject(historyKey, []);
|
||||||
|
|
||||||
|
@ -28,9 +28,13 @@ export class ElasticConfigCtrl {
|
|||||||
];
|
];
|
||||||
|
|
||||||
indexPatternTypeChanged() {
|
indexPatternTypeChanged() {
|
||||||
|
if (!this.current.database ||
|
||||||
|
this.current.database.length === 0 ||
|
||||||
|
this.current.database.startsWith('[logstash-]')) {
|
||||||
const def = _.find(this.indexPatternTypes, {
|
const def = _.find(this.indexPatternTypes, {
|
||||||
value: this.current.jsonData.interval,
|
value: this.current.jsonData.interval,
|
||||||
});
|
});
|
||||||
this.current.database = def.example || 'es-index-name';
|
this.current.database = def.example || 'es-index-name';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -160,6 +160,12 @@ export class ElasticMetricAggCtrl {
|
|||||||
$scope.agg.settings = {};
|
$scope.agg.settings = {};
|
||||||
$scope.agg.meta = {};
|
$scope.agg.meta = {};
|
||||||
$scope.showOptions = false;
|
$scope.showOptions = false;
|
||||||
|
|
||||||
|
// reset back to metric/group by query
|
||||||
|
if ($scope.target.bucketAggs.length === 0 && $scope.agg.type !== 'raw_document') {
|
||||||
|
$scope.target.bucketAggs = [queryDef.defaultBucketAgg()];
|
||||||
|
}
|
||||||
|
|
||||||
$scope.updatePipelineAggOptions();
|
$scope.updatePipelineAggOptions();
|
||||||
$scope.onChange();
|
$scope.onChange();
|
||||||
};
|
};
|
||||||
|
@ -181,8 +181,8 @@ export class ElasticQueryBuilder {
|
|||||||
|
|
||||||
build(target, adhocFilters?, queryString?) {
|
build(target, adhocFilters?, queryString?) {
|
||||||
// make sure query has defaults;
|
// make sure query has defaults;
|
||||||
target.metrics = target.metrics || [{ type: 'count', id: '1' }];
|
target.metrics = target.metrics || [queryDef.defaultMetricAgg()];
|
||||||
target.bucketAggs = target.bucketAggs || [{ type: 'date_histogram', id: '2', settings: { interval: 'auto' } }];
|
target.bucketAggs = target.bucketAggs || [queryDef.defaultBucketAgg()];
|
||||||
target.timeField = this.timeField;
|
target.timeField = this.timeField;
|
||||||
|
|
||||||
let i, nestedAggs, metric;
|
let i, nestedAggs, metric;
|
||||||
|
@ -17,6 +17,19 @@ export class ElasticQueryCtrl extends QueryCtrl {
|
|||||||
super($scope, $injector);
|
super($scope, $injector);
|
||||||
|
|
||||||
this.esVersion = this.datasource.esVersion;
|
this.esVersion = this.datasource.esVersion;
|
||||||
|
|
||||||
|
this.target = this.target || {};
|
||||||
|
this.target.metrics = this.target.metrics || [queryDef.defaultMetricAgg()];
|
||||||
|
this.target.bucketAggs = this.target.bucketAggs || [queryDef.defaultBucketAgg()];
|
||||||
|
|
||||||
|
if (this.target.bucketAggs.length === 0) {
|
||||||
|
const metric = this.target.metrics[0];
|
||||||
|
if (!metric || metric.type !== 'raw_document') {
|
||||||
|
this.target.bucketAggs = [queryDef.defaultBucketAgg()];
|
||||||
|
}
|
||||||
|
this.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
this.queryUpdated();
|
this.queryUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,3 +228,11 @@ export function describeOrderBy(orderBy, target) {
|
|||||||
return 'metric not found';
|
return 'metric not found';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function defaultMetricAgg() {
|
||||||
|
return { type: 'count', id: '1' };
|
||||||
|
}
|
||||||
|
|
||||||
|
export function defaultBucketAgg() {
|
||||||
|
return { type: 'date_histogram', id: '2', settings: { interval: 'auto' } };
|
||||||
|
}
|
||||||
|
@ -320,8 +320,11 @@
|
|||||||
|
|
||||||
.ReactTable {
|
.ReactTable {
|
||||||
border: none;
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ReactTable .rt-table {
|
||||||
// Allow some space for the no-data text
|
// Allow some space for the no-data text
|
||||||
min-height: 120px;
|
min-height: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ReactTable .rt-thead.-header {
|
.ReactTable .rt-thead.-header {
|
||||||
@ -350,6 +353,11 @@
|
|||||||
.ReactTable .rt-tbody .rt-td:last-child {
|
.ReactTable .rt-tbody .rt-td:last-child {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
}
|
}
|
||||||
|
.ReactTable .-pagination {
|
||||||
|
border-top: none;
|
||||||
|
box-shadow: none;
|
||||||
|
margin-top: $panel-margin;
|
||||||
|
}
|
||||||
.ReactTable .-pagination .-btn {
|
.ReactTable .-pagination .-btn {
|
||||||
color: $blue;
|
color: $blue;
|
||||||
background: $list-item-bg;
|
background: $list-item-bg;
|
||||||
@ -371,6 +379,10 @@
|
|||||||
.ReactTable .rt-tr .rt-td:last-child {
|
.ReactTable .rt-tr .rt-td:last-child {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
.ReactTable .rt-noData {
|
||||||
|
top: 60px;
|
||||||
|
z-index: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
// React-component cascade fix: show "loading" even though item can expand
|
// React-component cascade fix: show "loading" even though item can expand
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user