mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge remote-tracking branch 'upstream/master' into postgres-query-builder
This commit is contained in:
commit
6b656094fc
@ -1,3 +1,12 @@
|
||||
# 5.1.0 (unreleased)
|
||||
|
||||
* **Postgres/MySQL**: Ability to insert 0s or nulls for missing intervals [#9487](https://github.com/grafana/grafana/issues/9487), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
|
||||
|
||||
# 5.0.1 (unreleased)
|
||||
|
||||
* **Postgres**: PostgreSQL error when using ipv6 address as hostname in connection string [#11055](https://github.com/grafana/grafana/issues/11055), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
|
||||
# 5.0.0-stable (2018-03-01)
|
||||
|
||||
### Fixes
|
||||
|
@ -1,4 +1,5 @@
|
||||
[
|
||||
{ "version": "v5.1", "path": "/v5.1", "archived": false },
|
||||
{ "version": "v5.0", "path": "/", "archived": false, "current": true },
|
||||
{ "version": "v4.6", "path": "/v4.6", "archived": true },
|
||||
{ "version": "v4.5", "path": "/v4.5", "archived": true },
|
||||
|
@ -54,7 +54,8 @@ func generateConnectionString(datasource *models.DataSource) string {
|
||||
}
|
||||
|
||||
sslmode := datasource.JsonData.Get("sslmode").MustString("verify-full")
|
||||
return fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", url.PathEscape(datasource.User), url.PathEscape(password), url.PathEscape(datasource.Url), url.PathEscape(datasource.Database), url.QueryEscape(sslmode))
|
||||
u := &url.URL{Scheme: "postgres", User: url.UserPassword(datasource.User, password), Host: datasource.Url, Path: datasource.Database, RawQuery: "sslmode=" + sslmode}
|
||||
return u.String()
|
||||
}
|
||||
|
||||
func (e *PostgresQueryEndpoint) Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery *tsdb.TsdbQuery) (*tsdb.Response, error) {
|
||||
|
@ -571,6 +571,17 @@ kbn.valueFormats.degree = kbn.formatBuilders.fixedUnit('°');
|
||||
kbn.valueFormats.radian = kbn.formatBuilders.fixedUnit('rad');
|
||||
kbn.valueFormats.grad = kbn.formatBuilders.fixedUnit('grad');
|
||||
|
||||
// Radiation
|
||||
kbn.valueFormats.radbq = kbn.formatBuilders.decimalSIPrefix('Bq');
|
||||
kbn.valueFormats.radci = kbn.formatBuilders.decimalSIPrefix('Ci');
|
||||
kbn.valueFormats.radgy = kbn.formatBuilders.decimalSIPrefix('Gy');
|
||||
kbn.valueFormats.radrad = kbn.formatBuilders.decimalSIPrefix('rad');
|
||||
kbn.valueFormats.radsv = kbn.formatBuilders.decimalSIPrefix('Sv');
|
||||
kbn.valueFormats.radrem = kbn.formatBuilders.decimalSIPrefix('rem');
|
||||
kbn.valueFormats.radexpckg = kbn.formatBuilders.decimalSIPrefix('C/kg');
|
||||
kbn.valueFormats.radr = kbn.formatBuilders.decimalSIPrefix('R');
|
||||
kbn.valueFormats.radsvh = kbn.formatBuilders.decimalSIPrefix('Sv/h');
|
||||
|
||||
// Time
|
||||
kbn.valueFormats.hertz = kbn.formatBuilders.decimalSIPrefix('Hz');
|
||||
|
||||
@ -1036,6 +1047,20 @@ kbn.getUnitFormats = function() {
|
||||
{ text: 'G unit', value: 'accG' },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: 'radiation',
|
||||
submenu: [
|
||||
{ text: 'Becquerel (Bq)', value: 'radbq' },
|
||||
{ text: 'curie (Ci)', value: 'radci' },
|
||||
{ text: 'Gray (Gy)', value: 'radgy' },
|
||||
{ text: 'rad', value: 'radrad' },
|
||||
{ text: 'Sievert (Sv)', value: 'radsv' },
|
||||
{ text: 'rem', value: 'radrem' },
|
||||
{ text: 'Exposure (C/kg)', value: 'radexpckg' },
|
||||
{ text: 'roentgen (R)', value: 'radr' },
|
||||
{ text: 'Sievert/hour (Sv/h)', value: 'radsvh' },
|
||||
],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -66,6 +66,11 @@ describe('unsavedChangesSrv', function() {
|
||||
expect(tracker.hasChanges()).to.be(false);
|
||||
});
|
||||
|
||||
it('Should ignore .iteration changes', () => {
|
||||
dash.iteration = new Date().getTime() + 1;
|
||||
expect(tracker.hasChanges()).to.be(false);
|
||||
});
|
||||
|
||||
it.skip('Should ignore row collapse change', function() {
|
||||
dash.rows[0].collapse = true;
|
||||
expect(tracker.hasChanges()).to.be(false);
|
||||
|
@ -97,6 +97,9 @@ export class Tracker {
|
||||
dash.refresh = 0;
|
||||
dash.schemaVersion = 0;
|
||||
|
||||
// ignore iteration property
|
||||
delete dash.iteration;
|
||||
|
||||
// filter row and panels properties that should be ignored
|
||||
dash.rows = _.filter(dash.rows, function(row) {
|
||||
if (row.repeatRowId) {
|
||||
|
@ -649,13 +649,13 @@ export default function link(scope, elem, attrs, ctrl) {
|
||||
selection.x2 = limitSelection(event.offsetX);
|
||||
drawSelection(selection.x1, selection.x2);
|
||||
} else {
|
||||
emitGraphHoverEvet(event);
|
||||
emitGraphHoverEvent(event);
|
||||
drawCrosshair(event.offsetX);
|
||||
tooltip.show(event, data);
|
||||
}
|
||||
}
|
||||
|
||||
function emitGraphHoverEvet(event) {
|
||||
function emitGraphHoverEvent(event) {
|
||||
let x = xScale.invert(event.offsetX - yAxisWidth).valueOf();
|
||||
let y = yScale.invert(event.offsetY);
|
||||
let pos = {
|
||||
|
Loading…
Reference in New Issue
Block a user