Skip to content

Commit 97d1edd

Browse files
authored
Merge pull request #9045 from GilbertCherrie/convert_tasks_tabs_to_react
Convert tasks tabs to react
2 parents 94b0d41 + c50ca7e commit 97d1edd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/controllers/miq_task_controller.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def index
3939
# and :feature => "miq_task_all_ui"
4040
@tabform ||= "tasks_1" if role_allows?(:feature => "miq_task_my_ui")
4141
@tabform ||= "tasks_2" if role_allows?(:feature => "miq_task_all_ui")
42+
tab_vars(@tabform.split("_")[1])
4243
jobs
4344
render :action => "jobs"
4445
end
@@ -57,10 +58,16 @@ def show
5758
def change_tab
5859
assert_privileges('miq_task_all_ui', 'miq_task_my_ui', :any => false)
5960
@tabform = "tasks_#{params[:'uib-tab']}"
61+
tab_vars(params[:'uib-tab'])
6062
jobs
6163
render :action => "jobs"
6264
end
6365

66+
def tab_vars(current_tab)
67+
@path = '/miq_task/change_tab/'
68+
@current_tab = current_tab.to_s
69+
end
70+
6471
def build_jobs_tab
6572
@pp_choices = PPCHOICES2 # Get special pp choices for jobs/tasks lists
6673
@settings[:perpage][:job_task] ||= 50 # Default to 50 per page until changed

0 commit comments

Comments
 (0)