-
Notifications
You must be signed in to change notification settings - Fork 356
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
Angularize the VmCloud resize form #919
Conversation
@mansam Since this is a new form, please use the newer (There's already some examples in our code, possible issues are that you will need to add Also, the submit and cancel buttons should come from a shared partial .. |
$scope.submitClicked = function() { | ||
miqService.sparkleOn(); | ||
var url = '/vm_cloud/resize_vm/' + vmCloudResizeFormId + '?button=submit'; | ||
miqService.miqAjaxButton(url, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please submit the angular model instead of relying on implicit form data serialization .. this should be miqService.miqAjaxButton(url, vm.vmCloudModel)
var data = response.data; | ||
|
||
$scope.flavors = data.flavors; | ||
$scope.modelCopy = angular.copy( $scope.vmCloudModel ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense since you don't touch vmCloudModel
when handling the reponse.
%div_for_paging{'ng-controller' => "pagingDivButtonGroupController", | ||
'paging_div_buttons_id' => "angular_paging_div_buttons", | ||
'paging_div_buttons_type' => "Submit"} | ||
|
||
- unless @explorer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably can't use this anymore (edit: never mind :D)
c0e778a
to
91225ef
Compare
91225ef
to
a2372d7
Compare
Checked commit mansam@a2372d7 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
LGTM, works in the UI.. 👍 |
@mansam Should this go in fine? Also, out of curiosity, how did you fix the buttons not refreshing issue? |
@himdel I needed to add the view to the list here: https://github.com/ManageIQ/manageiq-ui-classic/pull/919/files#diff-5910cce3bec4cd624ba288de86215b4cL1339 |
Angularizing this form is generally helpful, and it also resolves https://bugzilla.redhat.com/show_bug.cgi?id=1437587 by fixing a bug with the select box when only one item is available to be selected.