diff --git a/CHANGELOG.md b/CHANGELOG.md index d2f5f9f65..a751b1170 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ 1. [#5862](https://github.com/influxdata/chronograf/pull/5862): Respect BASE_PATH when serving API docs. 1. [#5874](https://github.com/influxdata/chronograf/pull/5874): Propagate InfluxQL errors to UI. 1. [#5878](https://github.com/influxdata/chronograf/pull/5878): Rename Flux Query to Flux Script. +1. [#5885](https://github.com/influxdata/chronograf/pull/5885): Repair time zone selector on Host page. + ### Other diff --git a/ui/src/hosts/containers/HostPage.tsx b/ui/src/hosts/containers/HostPage.tsx index 27adc9483..5fb65c033 100644 --- a/ui/src/hosts/containers/HostPage.tsx +++ b/ui/src/hosts/containers/HostPage.tsx @@ -25,9 +25,10 @@ import {ErrorHandling} from 'src/shared/decorators/errors' import {GlobalAutoRefresher} from 'src/utils/AutoRefresher' import {getCells} from 'src/hosts/utils/getCells' -import {Source, Layout, TimeRange} from 'src/types' +import {Source, Layout, TimeRange, TimeZones} from 'src/types' import {Location} from 'history' import {DashboardSwitcherLinks} from 'src/types/dashboards' +import {setTimeZone} from 'src/shared/actions/app' interface Props { source: Source @@ -41,6 +42,8 @@ interface Props { onManualRefresh: () => void handleChooseTimeRange: typeof setAutoRefresh handleClickPresentationButton: typeof delayEnablePresentationMode + timeZone: TimeZones + onSetTimeZone: typeof setTimeZone } interface State { @@ -119,6 +122,8 @@ class HostPage extends PureComponent { inPresentationMode, handleClickPresentationButton, source, + timeZone, + onSetTimeZone, } = this.props const {timeRange, hostLinks, layouts} = this.state @@ -137,6 +142,8 @@ class HostPage extends PureComponent { handleChooseTimeRange={this.handleChooseTimeRange} handleClickPresentationButton={handleClickPresentationButton} dashboardLinks={hostLinks} + timeZone={timeZone} + onSetTimeZone={onSetTimeZone} /> { const mstp = ({ app: { ephemeral: {inPresentationMode}, - persisted: {autoRefresh}, + persisted: {autoRefresh, timeZone}, }, }) => ({ inPresentationMode, autoRefresh, + timeZone, }) const mdtp = { handleChooseTimeRange: setAutoRefresh, handleClickPresentationButton: delayEnablePresentationMode, + onSetTimeZone: setTimeZone, } export default connect(mstp, mdtp)(ManualRefresh(ErrorHandling(HostPage)))