Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React/redux Task Search #1121

Merged
merged 30 commits into from
Jul 8, 2016
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ac72a79
New task search page controller+view+root component
kwm4385 Jun 30, 2016
fffbe58
Implement the redux form
kwm4385 Jun 30, 2016
6bcfdcc
validation
kwm4385 Jun 30, 2016
4e69800
More date validation
kwm4385 Jun 30, 2016
14a0a58
handle submit
kwm4385 Jun 30, 2016
b2b26a1
Some pagination
kwm4385 Jul 1, 2016
5c8b569
more paging
kwm4385 Jul 1, 2016
1dce9e7
Table rendering
kwm4385 Jul 1, 2016
1098922
Merge decaf
kwm4385 Jul 1, 2016
e38baea
initial fetch
kwm4385 Jul 1, 2016
1d076d6
fix date naming?
kwm4385 Jul 1, 2016
85fd260
neaten up columns
kwm4385 Jul 1, 2016
4316457
don't refresh, also backtrack on getting an empty page
kwm4385 Jul 1, 2016
f99561c
Loading state
kwm4385 Jul 1, 2016
2de1cbb
properly disable next on hitting end
kwm4385 Jul 1, 2016
e164071
delete all the things
kwm4385 Jul 1, 2016
f4fa9f4
Remove comment block
kwm4385 Jul 5, 2016
3aafa8e
Move actions into new format
kwm4385 Jul 5, 2016
9d47e1e
support global task search (from admin menu)
kwm4385 Jul 5, 2016
dd26215
Merge branch "decaf"
kwm4385 Jul 5, 2016
ace0eb9
Add count options
kwm4385 Jul 5, 2016
1b2fd4f
25
kwm4385 Jul 5, 2016
8caa4e1
Only show if results
kwm4385 Jul 5, 2016
85e2859
Delete DateEntry
kwm4385 Jul 6, 2016
6b18c6f
Refactor query params into utility function
kwm4385 Jul 6, 2016
c45cff4
use format string
kwm4385 Jul 6, 2016
725fcfd
delinted
kwm4385 Jul 6, 2016
d9f5335
Fix proptypes
kwm4385 Jul 6, 2016
d6ca7c4
Merge branch 'decaf'
kwm4385 Jul 7, 2016
651bbaa
Merge branch 'decaf'
kwm4385 Jul 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)}`
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to use a function for building query params (like $.param(), but I'd rather not depend on jQuery), since it will handle escaping, etc. for us

});

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