diff options
Diffstat (limited to 'webapp/components/admin_console/elasticsearch_status/index.js')
-rw-r--r-- | webapp/components/admin_console/elasticsearch_status/index.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/webapp/components/admin_console/elasticsearch_status/index.js b/webapp/components/admin_console/elasticsearch_status/index.js new file mode 100644 index 000000000..6446195d2 --- /dev/null +++ b/webapp/components/admin_console/elasticsearch_status/index.js @@ -0,0 +1,28 @@ +// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import {connect} from 'react-redux'; +import {bindActionCreators} from 'redux'; +import {getJobsByType} from 'mattermost-redux/actions/jobs'; +import {JobTypes} from 'utils/constants.jsx'; + +import * as Selectors from 'mattermost-redux/selectors/entities/jobs'; + +import Status from './status.jsx'; + +function mapStateToProps(state, ownProps) { + return { + ...ownProps, + jobs: Selectors.makeGetJobsByType(JobTypes.ELASTICSEARCH_POST_INDEXING)(state) + }; +} + +function mapDispatchToProps(dispatch) { + return { + actions: bindActionCreators({ + getJobsByType + }, dispatch) + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(Status); |