Skip to content

Commit

Permalink
Merge pull request #1121 from HubSpot/new_task_search
Browse files Browse the repository at this point in the history
React/redux Task Search
  • Loading branch information
kwm4385 authored Jul 8, 2016
2 parents 35bcfbf + 651bbaa commit 83027e1
Show file tree
Hide file tree
Showing 23 changed files with 486 additions and 532 deletions.
18 changes: 18 additions & 0 deletions SingularityUI/app/actions/api/history.es6
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { buildApiAction } from './base';
import Utils from '../../utils';

export const FetchTaskHistory = buildApiAction(
'FETCH_TASK_HISTORY',
Expand Down Expand Up @@ -37,6 +38,23 @@ export const FetchDeployForRequest = buildApiAction(
})
);

export const FetchTaskSearchParams = buildApiAction(
'FETCH_TASK_HISTORY',
({requestId = null, deployId = null, host = null, lastTaskStatus = null, startedAfter = null, startedBefore = null, orderDirection = null, count, page}) => {
const args = {
requestId,
deployId,
host,
lastTaskStatus,
startedAfter,
startedBefore,
orderDirection
};
return {
url: `/history/tasks?count=${count}&page=${page}&${Utils.queryParams(args)}`
};
});

export const FetchRequestRunHistory = buildApiAction(
'FETCH_REQUEST_RUN_HISTORY',
(requestId, runId) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ let TaskStateLabel = React.createClass({
});

export default TaskStateLabel;

55 changes: 0 additions & 55 deletions SingularityUI/app/components/common/formItems/DateEntry.jsx

This file was deleted.

13 changes: 13 additions & 0 deletions SingularityUI/app/components/common/formItems/ReduxSelect.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import Select from 'react-select';

// Wrapper for react-select for use with redux form. Needs to override onBlur of react-select
// More info: https://github.com/erikras/redux-form/issues/82
export default (props) => {
return (
<Select
{...props}
onBlur={_.noop}
/>
);
};
2 changes: 1 addition & 1 deletion SingularityUI/app/components/deployDetail/DeployDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class DeployDetail extends React.Component {

function mapStateToProps(state) {
let latestHealthchecks = _.mapObject(state.api.task, (val, key) => {
if (val.data && val.data.healthcheckResults.length > 0) {
if (val.data && val.data.healthcheckResults && val.data.healthcheckResults.length > 0) {
return _.max(val.data.healthcheckResults, (hc) => {
return hc.timestamp;
});
Expand Down
112 changes: 0 additions & 112 deletions SingularityUI/app/components/taskSearch/DisplayResults.jsx

This file was deleted.

13 changes: 0 additions & 13 deletions SingularityUI/app/components/taskSearch/Enums.jsx

This file was deleted.

12 changes: 0 additions & 12 deletions SingularityUI/app/components/taskSearch/Header.jsx

This file was deleted.

Loading

0 comments on commit 83027e1

Please sign in to comment.