diff --git a/CHANGELOG.md b/CHANGELOG.md index 75e655107c..48ef452932 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,8 @@ ### Features 1. [#1928](https://github.com/influxdata/chronograf/pull/1928): Add prefix, suffix, scale, and other y-axis formatting 1. [#1886](https://github.com/influxdata/chronograf/pull/1886): Fix limit of 100 alert rules on alert rules page -1. [#1934](https://github.com/influxdata/chronograf/pull/1943): Zoom syncronization and enhancement +1. [#1934](https://github.com/influxdata/chronograf/pull/1934): Update time resolution when zooming in on graphs +1. [#1945](https://github.com/influxdata/chronograf/pull/1945): Add `present` boolean query param to URL to enable presentation mode ### UI Improvements 1. [#1933](https://github.com/influxdata/chronograf/pull/1933): Use line-stacked graph type for memory information - thank you, @Joxit! diff --git a/ui/package.json b/ui/package.json index 8db744ea4a..a2ba3076b2 100644 --- a/ui/package.json +++ b/ui/package.json @@ -109,6 +109,7 @@ "lodash": "^4.3.0", "moment": "^2.13.0", "node-uuid": "^1.4.7", + "query-string": "^5.0.0", "react": "^15.0.2", "react-addons-shallow-compare": "^15.0.2", "react-custom-scrollbars": "^4.1.1", diff --git a/ui/src/shared/middleware/resizeLayout.js b/ui/src/shared/middleware/resizeLayout.js index d7a657d4ba..6af500579f 100644 --- a/ui/src/shared/middleware/resizeLayout.js +++ b/ui/src/shared/middleware/resizeLayout.js @@ -1,4 +1,6 @@ // Trigger resize event to relayout the React Layout plugin +import queryString from 'query-string' +import {enablePresentationMode} from 'src/shared/actions/app' export default function resizeLayout() { return next => action => { @@ -12,5 +14,12 @@ export default function resizeLayout() { evt.initEvent('resize', false, true) window.dispatchEvent(evt) } + + const qs = queryString.parse(window.location.search) + + if (qs.present === 'true') { + next(enablePresentationMode()) + next(action) + } } } diff --git a/ui/yarn.lock b/ui/yarn.lock index 0c55a38651..7b168719d2 100644 --- a/ui/yarn.lock +++ b/ui/yarn.lock @@ -2329,6 +2329,10 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + deep-eql@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" @@ -5862,6 +5866,14 @@ query-string@^4.1.0, query-string@^4.2.2: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +query-string@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.0.0.tgz#fbdf7004b4d2aff792f9871981b7a2794f555947" + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"