Skip to content

Commit

Permalink
Pulled out simulation parameters
Browse files Browse the repository at this point in the history
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
  • Loading branch information
syncrou committed Nov 1, 2016
1 parent 892abf2 commit fd829de
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ ManageIQ.angular.app.controller('scheduleFormController', ['$http', '$scope', 's
$scope.scheduleModel.object_request = data.object_request;
$scope.scheduleModel.target_class = data.target_class;
$scope.scheduleModel.target_id = data.target_id;
$scope.scheduleModel.readonly = data.readonly;
$scope.scheduleModel.attrs = data.attrs;

$scope.setTimerType();
Expand Down Expand Up @@ -216,7 +215,6 @@ ManageIQ.angular.app.controller('scheduleFormController', ['$http', '$scope', 's
$scope.scheduleModel.object_request = data.object_request;
$scope.scheduleModel.target_class = data.tagert_class;
$scope.scheduleModel.target_id = data.target_id;
$scope.scheduleModel.readonly = data.readonly;
$scope.scheduleModel.targets = [];
$scope.scheduleModel.filter_typ = null;
$scope.scheduleModel.attrs = data.attrs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ def automate_schedules_set_vars
:target_class => automate_request[:target_class],
:target_classes => automate_request[:target_classes],
:target_id => automate_request[:target_id],
:attrs => automate_request[:attrs],
:readonly => automate_request[:readonly]
:attrs => automate_request[:attrs]
}
end

Expand Down Expand Up @@ -53,7 +52,6 @@ def fetch_automate_request_vars(schedule)
automate_request[:targets] = targets.sort_by { |t| t.name.downcase }.collect { |t| [t.name, t.id.to_s] }
end
automate_request[:target_id] = filter[:parameters][:target_id] || ""
automate_request[:readonly] = filter[:parameters][:readonly] || true
automate_request[:attrs] = filter[:parameters][:attrs] || []

if automate_request[:attrs].empty?
Expand Down
11 changes: 0 additions & 11 deletions app/views/layouts/angular-bootstrap/_ae_resolve_options.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,6 @@
%span.help-block{"ng-show" => "angularForm.target_id.$error.miqrequired"}
= _("Required")
%div
= _("Simulation Parameters")
.form-group
%label.col-md-2.control-label{"for" => "readonly"}
= _("Execute Methods")
.col-md-8
%input#readonly{"type" => "checkbox",
"name" => "readonly",
"ng-model" => "scheduleModel.readonly",
"checkchange" => ""}
%div
= _("Attribute/Value Pairs")
.form-group{"ng-repeat" => "key_val in scheduleModel.attrs track by $index"}
Expand Down
30 changes: 12 additions & 18 deletions app/views/ops/_schedule_show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,18 @@
%p.form-control-static
= h(@object_name)

%div
= _("Simulation Parameters")
.form-group
%label.col-md-2.control-label= _("Execute Methods")
.col-md-10
%p.form-control-static
= h(@selected_schedule.filter[:parameters][:readonly].to_s.titleize)
%div
= _("Attribute/Value Pairs")
- @selected_schedule.filter[:parameters][:attrs].each_with_index do |attr, i|
.form-group
%label.control-label.col-md-2
= (i + 1).to_s
- if attr
.col-md-2
= h(attr[0])
.col-md-2
= h(attr[1])
- if @selected_schedule.filter[:parameters][:attrs].present?
%div
= _("Attribute/Value Pairs")
- @selected_schedule.filter[:parameters][:attrs].each_with_index do |attr, i|
.form-group
%label.control-label.col-md-2
= (i + 1).to_s
- if attr
.col-md-2
= h(attr[0])
.col-md-2
= h(attr[1])

- if @selected_schedule.sched_action[:method] != 'db_backup'
%div
Expand Down

0 comments on commit fd829de

Please sign in to comment.