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

Request groups page #1196

Merged
merged 12 commits into from Aug 10, 2016
Merged

Request groups page #1196

merged 12 commits into from Aug 10, 2016

Conversation

@kwm4385
Copy link
Contributor

@kwm4385 kwm4385 commented Aug 9, 2016

Creates a new Group page (/group/:groupId) which shows details for all requests contained in it.
Also adds a breadcrumb item for requests, deploys, and tasks which are part of a group.
The metadata button displays a modal with copyable infoboxes. (button only is only shown if the group has metadata)

image

screen shot 2016-08-09 at 11 51 18 am

@tpetr @wolfd @Calvinp

kwm4385 added 8 commits Aug 8, 2016
import { buildApiAction } from './base';

export const FetchGroups = buildApiAction(
'FETCH_GROUPS',

This comment has been minimized.

@tpetr

tpetr Aug 9, 2016
Member

i'd suggest being explicit with the naming (FetchRequestGroups, FETCH_REQUEST_GROUPS), we also have the concept of groups for authentication (which may be featured more prominently in the future)

@@ -36,6 +37,7 @@ const AppRouter = (props) => {
<Route path="requests/new" component={RequestForm} />
<Route path="requests/edit/:requestId" component={RequestForm} />
<Route path="requests(/:state)(/:subFilter)(/:searchFilter)" component={RequestsPage} />
<Route path="group/:groupId" component={Group} store={props.store} />

This comment has been minimized.

@tpetr

tpetr Aug 9, 2016
Member

i dont think the store field is necessary

This comment has been minimized.

@kwm4385

kwm4385 Aug 9, 2016
Author Contributor

Yep you're right, leftover from an earlier experiment.

@@ -353,6 +362,7 @@ function mapStateToProps(state, ownProps) {
deploy: state.api.deploy.data,
taskHistory: state.api.taskHistoryForDeploy.data,
isTaskHistoryFetching: state.api.taskHistoryForDeploy.isFetching,
group: state.api.deploy.data.deploy && _.first(_.filter(state.api.requestGroups.data, (g) => _.contains(g.requestIds, state.api.deploy.data.deploy.requestId))),

This comment has been minimized.

@Calvinp

Calvinp Aug 9, 2016
Contributor

I'm adding a linting check to prohibit one-letter variable names (See #1192). Might want to change g to groupToCheck, or something more descriptive.

};

function mapStateToProps(state, ownProps) {
const group = _.find(state.api.requestGroups.data, (g) => g.id === ownProps.params.groupId);

This comment has been minimized.

@Calvinp

Calvinp Aug 9, 2016
Contributor

Same thing here (g -> groupToCheck or something).

export default RequestHeader;
function mapStateToProps(state, ownProps) {
return {
group: _.first(_.filter(state.api.requestGroups.data, (g) => _.contains(g.requestIds, ownProps.requestId)))

This comment has been minimized.

@Calvinp

Calvinp Aug 9, 2016
Contributor

Here as well (g -> groupToCheck).

@@ -471,7 +480,8 @@ function mapStateToProps(state, ownProps) {
s3Logs: state.api.taskS3Logs.data,
deploy: state.api.deploy.data,
pendingDeploys: state.api.deploys.data,
shellCommandResponse: state.api.taskShellCommandResponse.data
shellCommandResponse: state.api.taskShellCommandResponse.data,
group: task.task && _.first(_.filter(state.api.requestGroups.data, (g) => _.contains(g.requestIds, task.task.taskId.requestId)))

This comment has been minimized.

@Calvinp

Calvinp Aug 9, 2016
Contributor

And again (g -> groupToCheck)

@Calvinp
Copy link
Contributor

@Calvinp Calvinp commented Aug 9, 2016

LGTM

@tpetr tpetr merged commit 8ee3b69 into decaf Aug 10, 2016
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
@tpetr tpetr modified the milestone: 0.10.0 Aug 18, 2016
@ssalinas ssalinas deleted the request-groups branch Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.