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

Pulled out simulation parameters #12272

Conversation

syncrou
Copy link
Contributor

@syncrou syncrou commented Oct 28, 2016

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

screen shot 2016-11-01 at 3 09 56 pm

After

screen shot 2016-11-01 at 3 12 59 pm

Links

@syncrou
Copy link
Contributor Author

syncrou commented Oct 28, 2016

@miq-bot add_label ui, automate

@syncrou
Copy link
Contributor Author

syncrou commented Oct 28, 2016

@miq-bot assign @h-kataria

@syncrou
Copy link
Contributor Author

syncrou commented Oct 28, 2016

cc - @gmcculloug

@@ -85,19 +85,6 @@
:javascript
miqInitSelectPicker();
miqSelectPickerEvent('target_id', "#{url}")
- if ae_sim_form
Copy link
Contributor

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?

Copy link
Contributor Author

@syncrou syncrou Oct 28, 2016

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.

@syncrou
Copy link
Contributor Author

syncrou commented Oct 28, 2016

@h-kataria - Cool. I'll take care of that.

@syncrou syncrou force-pushed the object_request_removal_for_automate_schedule branch 2 times, most recently from ed2bb82 to 5a81984 Compare October 28, 2016 17:37
@syncrou
Copy link
Contributor Author

syncrou commented Oct 28, 2016

@h-kataria - Should be all set now after 🍏

@syncrou syncrou force-pushed the object_request_removal_for_automate_schedule branch from 5a81984 to 301f34a Compare October 28, 2016 19:31
.col-md-10
%p.form-control-static
= h(@selected_schedule.filter[:parameters][:readonly].to_s.titleize)
- if @selected_schedule.filter[:parameters][:attrs].present?
Copy link
Contributor

Choose a reason for hiding this comment

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

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
@syncrou syncrou force-pushed the object_request_removal_for_automate_schedule branch from 301f34a to fd829de Compare November 1, 2016 17:47
@miq-bot
Copy link
Member

miq-bot commented Nov 1, 2016

Checked commit syncrou@fd829de with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 0 offenses detected
Everything looks good. 🍪

@gmcculloug
Copy link
Member

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.

@h-kataria
Copy link
Contributor

looks good.

@h-kataria h-kataria added this to the Sprint 49 Ending Nov 14, 2016 milestone Nov 2, 2016
@h-kataria h-kataria merged commit 4485b26 into ManageIQ:master Nov 2, 2016
@chessbyte
Copy link
Member

@gmcculloug @h-kataria euwe/yes or euwe/no please

@simaishi
Copy link
Contributor

simaishi commented Jan 5, 2017

@syncrou Is there a BZ for this PR?

@syncrou
Copy link
Contributor Author

syncrou commented Jan 6, 2017

@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.

@simaishi
Copy link
Contributor

simaishi commented Jan 6, 2017

@simaishi
Copy link
Contributor

simaishi commented Jan 6, 2017

Euwe backport conflict:

$ git cherry-pick -e -x -m 1 4485b26
error: could not apply 4485b26... Merge pull request #12272 from syncrou/object_request_removal_for_automate_schedule
$ 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

@simaishi
Copy link
Contributor

simaishi commented Jan 6, 2017

@syncrou Please resolve conflict and make Euwe-specific PR (referencing this one) or suggest other PRs to backport.

syncrou pushed a commit to syncrou/manageiq that referenced this pull request Jan 12, 2017
…_for_automate_schedule

Pulled out simulation parameters
(cherry picked from commit 4485b26)
@simaishi
Copy link
Contributor

Backported to Euwe via #13472

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.

6 participants