Merge pull request #5885 from influxdata/5883/ui_hosts_tz_selector
fix(ui/host): repair time zone selectorpull/5886/head
commit
63ac00ca4d
|
@ -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
|
||||
|
||||
|
|
|
@ -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<Props, State> {
|
|||
inPresentationMode,
|
||||
handleClickPresentationButton,
|
||||
source,
|
||||
timeZone,
|
||||
onSetTimeZone,
|
||||
} = this.props
|
||||
const {timeRange, hostLinks, layouts} = this.state
|
||||
|
||||
|
@ -137,6 +142,8 @@ class HostPage extends PureComponent<Props, State> {
|
|||
handleChooseTimeRange={this.handleChooseTimeRange}
|
||||
handleClickPresentationButton={handleClickPresentationButton}
|
||||
dashboardLinks={hostLinks}
|
||||
timeZone={timeZone}
|
||||
onSetTimeZone={onSetTimeZone}
|
||||
/>
|
||||
<FancyScrollbar
|
||||
className={classnames({
|
||||
|
@ -206,16 +213,18 @@ class HostPage extends PureComponent<Props, State> {
|
|||
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)))
|
||||
|
|
Loading…
Reference in New Issue