-
Notifications
You must be signed in to change notification settings - Fork 897
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
Pulled out simulation parameters #12272
Pulled out simulation parameters #12272
Conversation
@miq-bot add_label ui, automate |
@miq-bot assign @h-kataria |
cc - @gmcculloug |
@@ -85,19 +85,6 @@ | |||
:javascript | |||
miqInitSelectPicker(); | |||
miqSelectPickerEvent('target_id', "#{url}") | |||
- if ae_sim_form |
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.
@syncrou this is the code for actual automate simulation screen, do we need to remove Execute Methods checkbox form there as well?
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.
Oh - No - I'll get that fixed.
@h-kataria - Cool. I'll take care of that. |
ed2bb82
to
5a81984
Compare
@h-kataria - Should be all set now after 🍏 |
5a81984
to
301f34a
Compare
.col-md-10 | ||
%p.form-control-static | ||
= h(@selected_schedule.filter[:parameters][:readonly].to_s.titleize) | ||
- if @selected_schedule.filter[:parameters][:attrs].present? |
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.
@syncrou this whole block needs to be indented 1 tab in, this code block should be inside https://github.com/syncrou/manageiq/blob/301f34a5eb0fd62b3e6b53487c739b0f6ab124a5/app/views/ops/_schedule_show.html.haml#L49
The execute method checkbox is not needed for Schedule Automate methods, since all methods would need to be executed, and currently are regardless of that setting https://www.pivotaltracker.com/story/show/133269097
301f34a
to
fd829de
Compare
Checked commit syncrou@fd829de with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 |
Tested UI changes. 👍 @syncrou Please include before/after images. Ran into one issue with the "Request" parameter being passed as expect which will be addressed in a separate PR. |
looks good. |
@gmcculloug @h-kataria |
@syncrou Is there a BZ for this PR? |
@simaishi - Hi Satoe, no there was not - It was part of the feature that added the ability to Schedule Automate Jobs. I believe we removed them based on our knowledge of what would be needed - no one reported them as an issue. |
Euwe backport conflict:
$ git diff
diff --cc app/assets/javascripts/controllers/schedule/schedule_form_controller.js
index d647eaf,4a06521..0000000
--- a/app/assets/javascripts/controllers/schedule/schedule_form_controller.js
+++ b/app/assets/javascripts/controllers/schedule/schedule_form_controller.js
@@@ -74,7 -74,7 +74,11 @@@ ManageIQ.angular.app.controller('schedu
$scope.scheduleModel.object_request = data.object_request;
$scope.scheduleModel.target_class = data.target_class;
$scope.scheduleModel.target_id = data.target_id;
++<<<<<<< HEAD
+ $scope.scheduleModel.ui_attrs = data.ui_attrs;
++=======
+ $scope.scheduleModel.attrs = data.attrs;
++>>>>>>> 4485b26... Merge pull request #12272 from syncrou/object_request_removal_for_automate_schedule
$scope.setTimerType();
diff --cc app/controllers/ops_controller/settings/automate_schedules.rb
index 3006a4e,e77a462..0000000
--- a/app/controllers/ops_controller/settings/automate_schedules.rb
+++ b/app/controllers/ops_controller/settings/automate_schedules.rb
@@@ -10,10 -11,10 +10,14 @@@ module OpsController::Settings::Automat
:instance_name => automate_request[:instance_name],
:object_message => automate_request[:object_message],
:object_request => automate_request[:object_request],
- :target_class => automate_request[:target_class],
+ :target_class => automate_request[:object_class],
:target_classes => automate_request[:target_classes],
:target_id => automate_request[:target_id],
++<<<<<<< HEAD
+ :ui_attrs => automate_request[:ui_attrs]
++=======
+ :attrs => automate_request[:attrs]
++>>>>>>> 4485b26... Merge pull request #12272 from syncrou/object_request_removal_for_automate_schedule
}
end
@@@ -50,15 -51,15 +54,20 @@@
targets = Rbac.filtered(automate_request[:target_class]).select(:id, :name)
automate_request[:targets] = targets.sort_by { |t| t.name.downcase }.collect { |t| [t.name, t.id.to_s] }
end
++<<<<<<< HEAD
+ automate_request[:target_id] = filter[:ui][:ui_object][:target_id] || ""
+ automate_request[:ui_attrs] = filter[:ui][:ui_attrs] || []
++=======
+ automate_request[:target_id] = filter[:parameters][:target_id] || ""
+ automate_request[:attrs] = filter[:parameters][:attrs] || []
++>>>>>>> 4485b26... Merge pull request #12272 from syncrou/object_request_removal_for_automate_schedule
- if automate_request[:attrs].empty?
- AE_MAX_RESOLUTION_FIELDS.times { automate_request[:attrs].push([]) }
+ if automate_request[:ui_attrs].empty?
+ AE_MAX_RESOLUTION_FIELDS.times { automate_request[:ui_attrs].push([]) }
else
# add empty array if @resolve[:new][:attrs] length is less than AE_MAX_RESOLUTION_FIELDS
- len = automate_request[:attrs].length
- AE_MAX_RESOLUTION_FIELDS.times { automate_request[:attrs].push([]) if len < AE_MAX_RESOLUTION_FIELDS }
+ len = automate_request[:ui_attrs].length
+ AE_MAX_RESOLUTION_FIELDS.times { automate_request[:ui_attrs].push([]) if len < AE_MAX_RESOLUTION_FIELDS }
end
automate_request
end
diff --cc app/views/ops/_schedule_show.html.haml
index 199b6eb,1eba0c5..0000000
--- a/app/views/ops/_schedule_show.html.haml
+++ b/app/views/ops/_schedule_show.html.haml
@@@ -77,10 -77,10 +77,17 @@@
%p.form-control-static
= h(@object_name)
++<<<<<<< HEAD
+ - if @selected_schedule.filter[:ui][:ui_attrs].present?
+ %div
+ = _("Attribute/Value Pairs")
+ - @selected_schedule.filter[:ui][:ui_attrs].each_with_index do |attr, i|
++=======
+ - if @selected_schedule.filter[:parameters][:attrs].present?
+ %div
+ = _("Attribute/Value Pairs")
+ - @selected_schedule.filter[:parameters][:attrs].each_with_index do |attr, i|
++>>>>>>> 4485b26... Merge pull request #12272 from syncrou/object_request_removal_for_automate_schedule
.form-group
%label.control-label.col-md-2
= (i + 1).to_s |
@syncrou Please resolve conflict and make Euwe-specific PR (referencing this one) or suggest other PRs to backport. |
…_for_automate_schedule Pulled out simulation parameters (cherry picked from commit 4485b26)
Backported to Euwe via #13472 |
The execute method checkbox is not needed for
Schedule Automate methods, since all methods would
need to be executed, and currently are regardless
of that setting
Before
After
Links