Skip to content

Commit

Permalink
PLT-7542 adding jobs table (mattermost#65)
Browse files Browse the repository at this point in the history
* PLT-7542 adding jobs table

* Cleaned up style for table

* Adding missing loc string

* Fixing issues from code review
  • Loading branch information
coreyhulen authored and jwilander committed Sep 26, 2017
1 parent b682caa commit ebd0f0c
Show file tree
Hide file tree
Showing 7 changed files with 525 additions and 38 deletions.
13 changes: 0 additions & 13 deletions actions/admin_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,6 @@ export function samlCertificateStatus(success, error) {
);
}

export function ldapSyncNow(success, error) {
AdminActions.syncLdap()(dispatch, getState).then(
(data) => {
if (data && success) {
success(data);
} else if (data == null && error) {
const serverError = getState().requests.admin.syncLdap.error;
error({id: serverError.server_error_id, ...serverError});
}
}
);
}

export function getOAuthAppInfo(clientId, success, error) {
Client4.getOAuthAppInfo(clientId).then(
(data) => {
Expand Down
26 changes: 26 additions & 0 deletions components/admin_console/jobs/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 * as Selectors from 'mattermost-redux/selectors/entities/jobs';

import Table from './table.jsx';

function mapStateToProps(state, ownProps) {
return {
...ownProps,
jobs: Selectors.makeGetJobsByType(ownProps.jobType)(state)
};
}

function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
getJobsByType
}, dispatch)
};
}

export default connect(mapStateToProps, mapDispatchToProps)(Table);
Loading

0 comments on commit ebd0f0c

Please sign in to comment.