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

Add ELBs page #215

Merged
merged 14 commits into from
Feb 22, 2017
Merged

Add ELBs page #215

merged 14 commits into from
Feb 22, 2017

Conversation

PtrTeixeira
Copy link
Contributor

Add a page that has a filterable table of all ELBs that are running.
Currently has the filtering and paging working. I am probably going to put the ELB detail page onto this PR as well.

Add a page that has a filterable table of all ELBs that are running.
Currently has the filtering and paging working.
Add a page to show details for an ELB. This page has no interactions at
all.
At the moment, this is just a list of the target groups and load
balancers. I'm going to have to walk through this to see how much
information I can actually pull out of the endpoints that I have for
this. In any event, at the moment it is just two tables, one for target
groups and one for load balancers. It doesn't have any interactivity or
useful information on it at the moment, but is just a list of some of
the attributes on the data that we are pulling back.
This just roughly duplicates the information that is available for
classic load balancers, but for the target groups. I'm really going to
need to play with this for a bit to get the presentation right. In
particular, I would like the load-balancers thing to link to the ALB
detail pages, but I have the ARNs, not the load balancer names (which is
what I have been using). This is fine for some things because ARNs are
guaranteed unique and names aren't, but it's less attractive. So I'm
going to have to think about what to do here.
Finish the visual portion of the ALB detail page. I do still want to
talk to Steve (+ look at Rainmaker?) about what kind of interactions
that we're going to be doing vis a vis Baragon and AWS.
label="Created"
id="createdAgo"
cellData={(loadBalancer) => Utils.timestampFromNow(loadBalancer.createdTime)}
/>
Copy link
Member

Choose a reason for hiding this comment

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

Can we get a json button in this table as well for the data in the row? Probably same for target group table

@@ -38,13 +57,21 @@ const Navigation = (props) => {
Navigation.propTypes = {
location: React.PropTypes.object.isRequired,
router: React.PropTypes.object.isRequired,

Copy link
Member

Choose a reason for hiding this comment

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

nit: extra new lines

<Route path="elbs/:loadBalancerName" component={ElbDetail} title={(params) => `${params.loadBalancerName}`} />
<Route path="albs" component={Albs} title="ALBs" />
<Route path="albs/target-groups/:targetGroupName" component={TargetGroupDetail} title={(params) => `${params.targetGroupName}`} />
<Route path="albs/load-balancers/:albName" component={AlbDetail} title={(params) => params.albName} />
Copy link
Member

Choose a reason for hiding this comment

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

Seems to be a mix of styles here

`${params.targetGroupName}`

vs just

params.albName

return (
<div>
<UITable
data={targetGroups}
Copy link
Member

Choose a reason for hiding this comment

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

do we have any data about number of instances here? That would be useful to show if we do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not off the first request, unfortunately. Amazon really cut back on the information that they give you per-request. This suggests that you need to use DescribeTargetHealth to get the targets for a target group, and it requires that you repeat the request for each target group.

Copy link
Member

Choose a reason for hiding this comment

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

ah, no problem then. Maybe we'l eventually make a more detailed target group page we'll display it there 👍

};

const mapStateToProps = (state) => ({
loadBalancers: Utils.maybe(state, ['api', 'loadBalancers', 'data']),
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't need the maybe here. Since you are setting the default in the reducers index, we know state.api.loadBalancers.data and state.api.targetGroups.data should be present. Might be empty, but will be there.

Add JSON buttons for both of them. Also change out the information in
the TargetGroups table, removing the ARN and adding the protocol and
port number that the TargetGroup listens on. This also includes a
handful of small style changes like stripping out extra new lines and
having consistent formatting in the router.
Add a modal button + dialog to edit a target group's health check.  It
doesn't _do_ anything at the moment except log whatever the input was to
the console because I need to play around with the endpoints on the back
end in order to more accurately map to our use case.
Add two search filter boxes to the `Albs` component, so that you can
refine what you are looking on the target groups page.  It may actually
be worth splitting up the TargetGroups and ApplicationLoadBalancers into
seperate pages, depending on how much information that we're winds up
getting displayed on this page.
Works the same way as links from albs to target groups. In particular,
it just pulls in data and generates a lookup table from ARNs to names,
which is what we're using to identify these things.  It does add the
overhead of an extra AWS call and another HTTP call when loading the
page.
Add a link to the `/albs` page to the navbar, to be shown when ELB sync
is turned on.
I had created an API that is capable of serving ModifyTargetGroup
requests, so I attached it the the UI that could modify target groups.
Originally I was ignoring the rules except for the default rule
associated with a listener. In the short term I'm not sure this would
matter because we aren't using path-based routing, which is the only
time I think it would really come up, but it really just wouldn't be
good practice. This makes it so that the front-end asks the back-end for
the associated actions and those actions will actually be displayed on
the front-end.
In particular, I was URI encoding ARNS when they went out (in the wrong
place, as it happens), and then expecting them to be keyed unencoded.
This just takes away all URI encoding, so it shouldn't come up. This
also fixes a variable name that didn't match what I had been expecting
it to be.
@PtrTeixeira PtrTeixeira merged commit c6bc1a9 into react Feb 22, 2017
@PtrTeixeira PtrTeixeira deleted the react-elbs branch February 24, 2017 14:39
@ssalinas ssalinas modified the milestone: 0.5.0 May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants