diff options
author | Zuul <zuul@review.opendev.org> | 2020-05-21 00:13:35 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-05-21 00:13:35 +0000 |
commit | 551dbcbbc60edb4996563856e2b5f77d31b0bc4a (patch) | |
tree | 1ec61cbb3e3150c189ab5237fddb6ef596c52dc8 /web/src/App.jsx | |
parent | dff2ec282cfe4dcb88b0ccdb6a61c14e5399eac4 (diff) | |
parent | 86eba8b05d5a3f913ba7e255565e8cd5d20fea35 (diff) | |
download | zuul-551dbcbbc60edb4996563856e2b5f77d31b0bc4a.tar.gz |
Merge "Add new timezone selector in web interface"
Diffstat (limited to 'web/src/App.jsx')
-rw-r--r-- | web/src/App.jsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/web/src/App.jsx b/web/src/App.jsx index 619cc499e..1b412f572 100644 --- a/web/src/App.jsx +++ b/web/src/App.jsx @@ -31,12 +31,12 @@ import { import * as moment from 'moment' import ErrorBoundary from './containers/ErrorBoundary' +import SelectTz from './containers/timezone/SelectTz' import logo from './images/logo.png' -import { routes } from './routes' +import { clearError } from './actions/errors' import { fetchConfigErrorsAction } from './actions/configErrors' +import { routes } from './routes' import { setTenantAction } from './actions/tenant' -import { clearError } from './actions/errors' - class App extends React.Component { static propTypes = { @@ -44,6 +44,7 @@ class App extends React.Component { configErrors: PropTypes.array, info: PropTypes.object, tenant: PropTypes.object, + timezone: PropTypes.string, location: PropTypes.object, history: PropTypes.object, dispatch: PropTypes.func @@ -166,7 +167,7 @@ class App extends React.Component { type='error' onDismiss={() => {this.props.dispatch(clearError(error.id))}} > - <span title={moment(error.date).format()}> + <span title={moment.utc(error.date).tz(this.props.timezone).format()}> <strong>{error.text}</strong> ({error.status}) {error.url} </span> @@ -273,6 +274,9 @@ class App extends React.Component { </Link> </li> )} + <li> + <SelectTz/> + </li> </ul> {showErrors && this.renderConfigErrors(configErrors)} </div> @@ -299,6 +303,7 @@ export default withRouter(connect( errors: state.errors, configErrors: state.configErrors, info: state.info, - tenant: state.tenant + tenant: state.tenant, + timezone: state.timezone }) )(App)) |