From f855b508dc6071e6a7ace6a5b98081b341164d39 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 15 Oct 2014 17:02:10 -0400 Subject: [PATCH] adding new files in app.js and index for portal adding the routing for portal mode and setting boolean for portal mode in app.js adding references to new files in index.html and added ngHide for nav bar items that should be hidden by portal mode --- awx/ui/static/js/app.js | 26 +++++++++++------------ awx/ui/templates/ui/index.html | 38 +++++++++++++++++++--------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index a949c7dd52..4c6b86d96e 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -86,6 +86,7 @@ angular.module('Tower', [ 'HostPieChartWidget', 'HostGraphWidget', 'DashboardJobsWidget', + 'PortalJobTemplateWidget', 'StreamWidget', 'JobsHelper', 'InventoryGroupsHelpDefinition', @@ -117,6 +118,7 @@ angular.module('Tower', [ 'SocketHelper', 'AboutAnsibleHelpModal', 'SurveyQuestionFormDefinition', + 'PortalJobsListDefinition' ]) @@ -135,10 +137,11 @@ angular.module('Tower', [ templateUrl: urlPrefix + 'partials/jobs.html', controller: 'JobsListController' }). - // when('/portal', { - // templateUrl: urlPrefix + 'partials/portal.html' - // controller: 'Portal' - // }). + + when('/portal', { + templateUrl: urlPrefix + 'partials/portal.html', + controller: 'PortalController' + }). when('/jobs/:id', { templateUrl: urlPrefix + 'partials/job_detail.html', @@ -165,16 +168,6 @@ angular.module('Tower', [ controller: 'JobTemplatesEdit' }). - // when('/job_templates/:template_id/survey/add', { - // templateUrl: urlPrefix + 'partials/survey_maker.html', - // controller: 'SurveyMakerAdd' - // }). - - // when('/job_templates/:template_id/survey/edit', { - // templateUrl: urlPrefix + 'partials/survey_maker.html', - // controller: 'SurveyMakerEdit' - // }). - when('/job_templates/:id/schedules', { templateUrl: urlPrefix + 'partials/schedule_detail.html', controller: 'ScheduleEditController' @@ -479,6 +472,11 @@ angular.module('Tower', [ base = (base === 'job_events' || base === 'job_host_summaries') ? 'jobs' : base; } + $rootScope.portalMode=false; + if(base==='portal'){ + $rootScope.portalMode= true; + } + $('#ansible-list-title').html('' + base.replace(/\_/,' ') + ''); $('#ansible-main-menu li').each(function() { diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index c15ef03675..4f6bf93947 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -77,10 +77,10 @@ + - @@ -116,6 +116,7 @@ + @@ -167,6 +168,7 @@ + @@ -180,14 +182,15 @@