From 83e58f35b88e0f82cd82c94d505e8d6d49de146a Mon Sep 17 00:00:00 2001 From: Jerry Keselman Date: Wed, 8 Nov 2017 09:11:43 -0500 Subject: [PATCH 1/2] Amazon Docker Creds Visibility Based on Setting The visibility of the Amazon Docker Creds tab will be based on a true Settings value. The setting used is Settings.ems.ems_amazon.agent_coordinator.docker_login_required. If the value is false no tab is presented. This feature is implemented based on offline discussions around the original PR implementing the tab - #2525 with @Fryguy. This is the original desired functionality but it was not implemented in time for the 4.6 cutoff. --- .../layouts/angular/_multi_auth_credentials.html.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/angular/_multi_auth_credentials.html.haml b/app/views/layouts/angular/_multi_auth_credentials.html.haml index edb7861d81a..a778b68498e 100644 --- a/app/views/layouts/angular/_multi_auth_credentials.html.haml +++ b/app/views/layouts/angular/_multi_auth_credentials.html.haml @@ -24,9 +24,10 @@ = miq_tab_header('console', nil, {'ng-click' => "changeAuthTab('console')"}) do %i{"error-on-tab" => "console", :style => "color:#cc0000"} = _("VMRC Console") - = miq_tab_header('smartstate_docker', nil, {'ng-click' => "changeAuthTab('smartstate_docker')"}) do - %i{"error-on-tab" => "smartstate_docker", :style => "color:#cc0000"} - = _("SmartState Docker") + - if ::Settings.ems.ems_amazon.agent_coordinator.docker_login_required + = miq_tab_header('smartstate_docker', nil, {'ng-click' => "changeAuthTab('smartstate_docker')"}) do + %i{"error-on-tab" => "smartstate_docker", :style => "color:#cc0000"} + = _("SmartState Docker") - elsif controller_name == "ems_container" = miq_tab_header('metrics', nil, 'ng-click' => "changeAuthTab('metrics')") do %div{"ng-if" => "emsCommonModel.metrics_selection == 'prometheus' || emsCommonModel.metrics_selection == 'hawkular'"} From c7242ea5ab000a2d9f65bb0eac7ae124b0da8b9a Mon Sep 17 00:00:00 2001 From: Jerry Keselman Date: Wed, 8 Nov 2017 09:50:10 -0500 Subject: [PATCH 2/2] Rubocop Warning Fix Remove redundant curly braces around hash parameter per Rubocop. --- app/views/layouts/angular/_multi_auth_credentials.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/angular/_multi_auth_credentials.html.haml b/app/views/layouts/angular/_multi_auth_credentials.html.haml index a778b68498e..94c0f7b659d 100644 --- a/app/views/layouts/angular/_multi_auth_credentials.html.haml +++ b/app/views/layouts/angular/_multi_auth_credentials.html.haml @@ -25,7 +25,7 @@ %i{"error-on-tab" => "console", :style => "color:#cc0000"} = _("VMRC Console") - if ::Settings.ems.ems_amazon.agent_coordinator.docker_login_required - = miq_tab_header('smartstate_docker', nil, {'ng-click' => "changeAuthTab('smartstate_docker')"}) do + = miq_tab_header('smartstate_docker', nil, 'ng-click' => "changeAuthTab('smartstate_docker')") do %i{"error-on-tab" => "smartstate_docker", :style => "color:#cc0000"} = _("SmartState Docker") - elsif controller_name == "ems_container"