diff --git a/CHANGELOG.md b/CHANGELOG.md index ec6f6390cc4..767a0b6d58b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,15 @@ # 4.3.0 (unreleased) +## Enhancements + +* **InfluxDB**: influxdb query builder support for ORDER BY and LIMIT (allows TOPN queries) [#6065](https://github.com/grafana/grafana/issues/6065) Support influxdb's SLIMIT Feature [#7232](https://github.com/grafana/grafana/issues/7232) thx [@thuck](https://github.com/thuck) +* **InfluxDB**: Small fix for the "glow" when focus the field for LIMIT and SLIMIT [#7799](https://github.com/grafana/grafana/pull/7799) thx [@thuck](https://github.com/thuck) +* **Panels**: Delay loading & Lazy load panels as they become visible (scrolled into view) [#5216](https://github.com/grafana/grafana/issues/5216) thx [@jifwin](https://github.com/jifwin) + ## Minor Enchancements +* **Prometheus**: Make Prometheus query field a textarea [#7663](https://github.com/grafana/grafana/issues/7663), thx [@hagen1778](https://github.com/hagen1778) + # 4.2.0-beta2 (unreleased) ## Minor Enhancements * **Templates**: Prevent use of the prefix `__` for templates in web UI [#7678](https://github.com/grafana/grafana/issues/7678) diff --git a/public/app/core/utils/rangeutil.ts b/public/app/core/utils/rangeutil.ts index ea9ad111e8d..81fcbeb913f 100644 --- a/public/app/core/utils/rangeutil.ts +++ b/public/app/core/utils/rangeutil.ts @@ -41,7 +41,7 @@ var rangeOptions = [ { from: 'now-2d', to: 'now', display: 'Last 2 days', section: 0 }, { from: 'now-7d', to: 'now', display: 'Last 7 days', section: 0 }, { from: 'now-30d', to: 'now', display: 'Last 30 days', section: 0 }, - { from: 'now-60d', to: 'now', display: 'Last 60 days', section: 0 }, + { from: 'now-90d', to: 'now', display: 'Last 90 days', section: 0 }, { from: 'now-6M', to: 'now', display: 'Last 6 months', section: 0 }, { from: 'now-1y', to: 'now', display: 'Last 1 year', section: 0 }, { from: 'now-2y', to: 'now', display: 'Last 2 years', section: 0 }, @@ -146,4 +146,3 @@ export function describeTimeRange(range) { return range.from.toString() + ' to ' + range.to.toString(); } - diff --git a/public/app/features/dashboard/shareModalCtrl.js b/public/app/features/dashboard/shareModalCtrl.js index d4075c1e641..6f3cb320bef 100644 --- a/public/app/features/dashboard/shareModalCtrl.js +++ b/public/app/features/dashboard/shareModalCtrl.js @@ -76,9 +76,10 @@ function (angular, _, $, moment, require, config) { $scope.shareUrl = linkSrv.addParamsToUrl(baseUrl, params); - var soloUrl = $scope.shareUrl; - soloUrl = soloUrl.replace(config.appSubUrl + '/dashboard/', config.appSubUrl + '/dashboard-solo/'); - soloUrl = soloUrl.replace("&fullscreen", "").replace("&edit", ""); + var soloUrl = baseUrl.replace(config.appSubUrl + '/dashboard/', config.appSubUrl + '/dashboard-solo/'); + delete params.fullscreen; + delete params.edit; + soloUrl = linkSrv.addParamsToUrl(soloUrl, params); $scope.iframeHtml = ''; diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 0c80d7a88e3..8de78291baa 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -76,12 +76,8 @@ export class PanelCtrl { profiler.renderingCompleted(this.panel.id, this.timing); } - private isRenderingPng () { - return window.location.href.indexOf("/dashboard-solo/db") >= 0; - } - refresh() { - if (!this.isPanelVisible() && !this.isRenderingPng() && !this.dashboard.snapshot) { + if (!this.isPanelVisible() && !this.dashboard.meta.soloMode && !this.dashboard.snapshot) { this.skippedLastRefresh = true; return; } diff --git a/public/app/plugins/datasource/influxdb/partials/query.editor.html b/public/app/plugins/datasource/influxdb/partials/query.editor.html index c8848d6f43b..bff03fbb7d5 100644 --- a/public/app/plugins/datasource/influxdb/partials/query.editor.html +++ b/public/app/plugins/datasource/influxdb/partials/query.editor.html @@ -75,20 +75,20 @@
- +
- -
- - + +
+ +
- -
- - + +
+ +
diff --git a/public/app/plugins/datasource/influxdb/query_ctrl.ts b/public/app/plugins/datasource/influxdb/query_ctrl.ts index f78ed0727db..c676c222d94 100644 --- a/public/app/plugins/datasource/influxdb/query_ctrl.ts +++ b/public/app/plugins/datasource/influxdb/query_ctrl.ts @@ -34,8 +34,8 @@ export class InfluxQueryCtrl extends QueryCtrl { {text: 'Table', value: 'table'}, ]; this.orderByTime = [ - {text: 'Ascending', value: 'ASC'}, - {text: 'Descending', value: 'DESC'}, + {text: 'ASC', value: 'ASC'}, + {text: 'DESC', value: 'DESC'}, ]; this.policySegment = uiSegmentSrv.newSegment(this.target.policy); diff --git a/public/app/plugins/datasource/prometheus/partials/query.editor.html b/public/app/plugins/datasource/prometheus/partials/query.editor.html index 37c27ace58a..1840f74bd74 100644 --- a/public/app/plugins/datasource/prometheus/partials/query.editor.html +++ b/public/app/plugins/datasource/prometheus/partials/query.editor.html @@ -1,12 +1,7 @@ - +
- - -
-
- - +
@@ -39,6 +34,14 @@ ng-change="ctrl.refreshMetricData()">
+
+ +
+ + +
+ +
-
+
- +
-
+
- +
diff --git a/public/test/specs/shareModalCtrl-specs.js b/public/test/specs/shareModalCtrl-specs.js index f23dcb61f3a..9d3e7f941d0 100644 --- a/public/test/specs/shareModalCtrl-specs.js +++ b/public/test/specs/shareModalCtrl-specs.js @@ -71,6 +71,30 @@ define([ expect(ctx.scope.shareUrl).to.be('http://server/#!/test?from=1000&to=2000&orgId=1&theme=light'); }); + it('should remove fullscreen from image url when is first param in querystring and modeSharePanel is true', function() { + ctx.$location.url('/test?fullscreen&edit'); + ctx.scope.modeSharePanel = true; + ctx.scope.panel = { id: 1 }; + + ctx.scope.buildUrl(); + + expect(ctx.scope.shareUrl).to.contain('?fullscreen&edit&from=1000&to=2000&orgId=1&panelId=1'); + expect(ctx.scope.imageUrl).to.contain('?from=1000&to=2000&orgId=1&panelId=1&width=1000&height=500&tz=UTC'); + + }); + + it('should remove edit from image url when is first param in querystring and modeSharePanel is true', function() { + ctx.$location.url('/test?edit&fullscreen'); + ctx.scope.modeSharePanel = true; + ctx.scope.panel = { id: 1 }; + + ctx.scope.buildUrl(); + + expect(ctx.scope.shareUrl).to.contain('?edit&fullscreen&from=1000&to=2000&orgId=1&panelId=1'); + expect(ctx.scope.imageUrl).to.contain('?from=1000&to=2000&orgId=1&panelId=1&width=1000&height=500&tz=UTC'); + + }); + it('should include template variables in url', function() { ctx.$location.path('/test'); ctx.scope.options.includeTemplateVars = true; @@ -83,7 +107,6 @@ define([ ctx.scope.buildUrl(); expect(ctx.scope.shareUrl).to.be('http://server/#!/test?from=1000&to=2000&orgId=1&var-app=mupp&var-server=srv-01'); }); - }); });