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

Network router gateway setup #716

Merged
merged 4 commits into from
Mar 20, 2017
Merged

Network router gateway setup #716

merged 4 commits into from
Mar 20, 2017

Conversation

gildub
Copy link
Contributor

@gildub gildub commented Mar 17, 2017

The external gateway information wasn't fully handled.
Now external gateway values are correctly set up allowing to add reset ("clear") the gateway.

https://bugzilla.redhat.com/show_bug.cgi?id=1426268

Edit and Create share the same template:

router-gateway

@tzumainn
Copy link
Contributor

👍 from a functionality perspective; calls the API correctly. Double-checking the code, this doesn't actually have any gem changes, correct?

@@ -66,12 +68,25 @@ ManageIQ.angular.app.controller('networkRouterFormController', ['$http', '$scope
.catch(miqService.handleFailure);
};

$scope.filterCloudNetworkChanged = function(id) {
miqService.sparkleOn();
$http.get('/network_router/network_router_subnets_by_network/' + id)
Copy link
Contributor

@AparnaKarve AparnaKarve Mar 17, 2017

Choose a reason for hiding this comment

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

@gildub I see that you have added a new controller route and action -- network_router_subnets_by_network

Currently we have a new practice in place for all our angular forms, which is --
Use REST API calls and avoid creating new controller actions/routes, especially true for any new functionality being added in the forms.

Hence I recommend using an API call here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked that currently an API for network_routers does not exist, but it should not be too hard to add.

Copy link
Contributor

Choose a reason for hiding this comment

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

I missed the fact that this is an RFE BZ for 5.7... so maybe the REST API implementation can wait for now.
Can you create a follow-up PR later to call the REST API?

Copy link
Contributor Author

@gildub gildub Mar 18, 2017

Choose a reason for hiding this comment

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

@AparnaKarve,

Ack to create PR for REST API, I created following issue as a tracker:
#737

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

@gildub Thanks for creating the issue. We can work on this once this PR is merged.

'ng-maxlength' => 128,
:miqrequired => true,
:checkchange => true}
%h3
Copy link
Contributor

Choose a reason for hiding this comment

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

Fields that are Required need to be explicitly shown as Required including the dropdowns below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AparnaKarve , all the router gateway related field are optional

Copy link
Contributor

Choose a reason for hiding this comment

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

@gildub Some fields are Required, because otherwise the Add button will not light up (turn blue, that is) as seen in the screenshots below --

screen shot 2017-03-17 at 4 39 33 pm

screen shot 2017-03-17 at 4 44 37 pm

We need to clearly say Required for every Required field, it just makes for a better UX, that's all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AparnaKarve,

Oh sorry, yes the name is required and that one was removed by mistake, thanks

@AparnaKarve
Copy link
Contributor

@tzumainn I think saving the Network Router record should be a queued operation (if it isn't already), otherwise the spinner might keep spinning indefinitely during a Save.

@tzumainn
Copy link
Contributor

@AparnaKarve I think it's a Task - @gildub, is that correct?

I think optimally this makes it into the next 5.7 build, so if we can implement the REST API bit immediately after that would be great!

@dclarizio
Copy link

@gildub screen shots in the first comment would be appreciated 😄

@gildub
Copy link
Contributor Author

gildub commented Mar 17, 2017

@dclarizio, I added the screen shot, sorry I didn't have it in the first place, that was my intent but 'cause of Murphy's law I couldn't launch my instance anymore, Friday night, blah-blah :)

Please let me know if you think more information is required.

@AparnaKarve, please see my inline comment about API.

@tzumainn -Effectively no Gem added and using a task queue, nothing changed there.

Thanks

@miq-bot
Copy link
Member

miq-bot commented Mar 20, 2017

Checked commits https://github.com/gildub/manageiq-ui-classic/compare/679cb360fe7e7b8f180cef1a8e27532ac18b23f3~...7b2aff199a36f5975de953fbd0cf37a29e9a849c with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 4 offenses detected

app/controllers/network_router_controller.rb

@AparnaKarve
Copy link
Contributor

@gildub Thanks for addressing all the feedback!
@h-kataria This is good to go.

@h-kataria h-kataria added this to the Sprint 57 Ending Mar 27, 2017 milestone Mar 20, 2017
@h-kataria h-kataria merged commit 741917e into ManageIQ:master Mar 20, 2017
@gildub gildub deleted the network_router-gateway-setup branch March 20, 2017 23:21
@gildub gildub restored the network_router-gateway-setup branch March 20, 2017 23:21
@gildub gildub deleted the network_router-gateway-setup branch March 20, 2017 23:21
@simaishi
Copy link
Contributor

@gildub There is a conflict backporting to Euwe. Please resolve conflict and create an Euwe-specific PR (referencing this one) or suggest other PRs to backport.

$ git status
On branch euwe
Your branch is up-to-date with 'origin/euwe'.
You are currently cherry-picking commit 741917e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:

	new file:   app/views/network_router/_common_new_edit.haml
	modified:   app/views/network_router/add_interface_select.html.haml
	modified:   app/views/network_router/edit.html.haml
	modified:   app/views/network_router/new.html.haml
	modified:   app/views/network_router/remove_interface_select.html.haml
	modified:   config/routes.rb
	modified:   spec/controllers/network_router_controller_spec.rb

Unmerged paths:
  (use "git add <file>..." to mark resolution)

	both modified:   app/assets/javascripts/controllers/network_router/network_router_form_controller.js
	both modified:   app/controllers/network_router_controller.rb

@gildub gildub restored the network_router-gateway-setup branch March 21, 2017 21:00
@gildub gildub deleted the network_router-gateway-setup branch April 12, 2017 04:20
@simaishi
Copy link
Contributor

simaishi commented Apr 28, 2017

Backported to Euwe via ManageIQ/manageiq#14447 (Mar 27)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants