diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 87d3b6b06b..8d6613b007 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -24,7 +24,7 @@ import {Home, HomeGroups, HomeHosts} from './controllers/Home'; import {SocketsController} from './controllers/Sockets'; import {CredentialsAdd, CredentialsEdit, CredentialsList} from './controllers/Credentials'; import {JobsListController} from './controllers/Jobs'; -import {PortalController} from './controllers/Portal'; +import portalMode from './portal-mode/main'; import systemTracking from './system-tracking/main'; import inventories from './inventories/main'; import inventoryScripts from './inventory-scripts/main'; @@ -109,6 +109,7 @@ var tower = angular.module('Tower', [ standardOut.name, access.name, JobTemplates.name, + portalMode.name, 'templates', 'Utilities', 'OrganizationFormDefinition', @@ -291,20 +292,6 @@ var tower = angular.module('Tower', [ } }). - state('portal', { - url: '/portal', - templateUrl: urlPrefix + 'partials/portal.html', - controller: PortalController, - ncyBreadcrumb: { - label: "PORTAL" - }, - resolve: { - features: ['FeaturesService', function(FeaturesService) { - return FeaturesService.get(); - }] - } - }). - state('projects', { url: '/projects', templateUrl: urlPrefix + 'partials/projects.html', @@ -828,7 +815,7 @@ var tower = angular.module('Tower', [ $rootScope.$emit('JobStatusChange-jobDetails', data); } else if ($state.is('dashboard')) { $rootScope.$emit('JobStatusChange-home', data); - } else if ($state.is('portal')) { + } else if ($state.is('portalMode')) { $rootScope.$emit('JobStatusChange-portal', data); } else if ($state.is('projects')) { $rootScope.$emit('JobStatusChange-projects', data); diff --git a/awx/ui/client/src/helpers/Jobs.js b/awx/ui/client/src/helpers/Jobs.js index dd7e83d57f..236cbd8faf 100644 --- a/awx/ui/client/src/helpers/Jobs.js +++ b/awx/ui/client/src/helpers/Jobs.js @@ -381,8 +381,7 @@ export default mode: 'edit', id: id, scope: scope, - showSearch: false, - title: false + showSearch: false }); SearchInit({ diff --git a/awx/ui/client/src/lists/PortalJobTemplates.js b/awx/ui/client/src/lists/PortalJobTemplates.js index e9290e0f44..95b806910c 100644 --- a/awx/ui/client/src/lists/PortalJobTemplates.js +++ b/awx/ui/client/src/lists/PortalJobTemplates.js @@ -13,6 +13,7 @@ export default iterator: 'job_template', // selectTitle: 'Add Job Template', editTitle: 'Job Templates', + listTitle: 'Job Templates', // selectInstructions: "Click on a row to select it, and click Finished when done. Use the " + // "button to create a new job template.", index: false, @@ -22,9 +23,9 @@ export default fields: { name: { key: true, - noLink: true, label: 'Name', - columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8' + columnClass: 'col-lg-5 col-md-5 col-sm-9 col-xs-8', + linkTo: '/#/job_templates/{{job_template.id}}' }, description: { label: 'Description', diff --git a/awx/ui/client/src/lists/PortalJobs.js b/awx/ui/client/src/lists/PortalJobs.js index 753ef764fc..2673aac991 100644 --- a/awx/ui/client/src/lists/PortalJobs.js +++ b/awx/ui/client/src/lists/PortalJobs.js @@ -16,6 +16,7 @@ export default index: false, hover: true, well: true, + listTitle: 'Jobs', fields: { status: { @@ -34,39 +35,31 @@ export default { name: "Canceled", value: "canceled" } ] }, + /* id: { label: 'ID', key: true, noLink: true, //undocumented: 'key' above will automatically made the fields a link, but 'noLink' will override this setting desc: true, searchType: 'int', - columnClass: 'col-lg-1 col-md-1 col-sm-2 col-xs-2 List-staticColumnAdjacent', + columnClass: 'col-xs-2 List-staticColumnAdjacent', }, + */ name: { label: 'Name', columnClass: 'col-lg-4 col-md-4 col-sm-4 col-xs-6', - defaultSearchField: true + defaultSearchField: true, + linkTo: '/#/jobs/{{portal_job.id}}' }, started: { label: 'Started', noLink: true, searchable: false, filter: "longDate", - columnClass: "col-lg-4 col-md-4 col-sm-3 xs-hidden" + nosort: true, + columnClass: "col-lg-4 col-md-4 col-sm-3 hidden-xs" } }, - actions: { }, - - fieldActions: { - - columnClass: 'col-lg-3 col-md-4 col-sm-3 col-xs-4', - - job_details: { - mode: 'all', - ngClick: "viewJobDetails(portal_job)", - awToolTip: 'View job details', - dataPlacement: 'top' - } - } + actions: { } }); diff --git a/awx/ui/client/src/main-menu/main-menu.partial.html b/awx/ui/client/src/main-menu/main-menu.partial.html index 44f9600cb3..4c9a127523 100644 --- a/awx/ui/client/src/main-menu/main-menu.partial.html +++ b/awx/ui/client/src/main-menu/main-menu.partial.html @@ -58,6 +58,14 @@ SETTINGS + + + PORTAL MODE + + + + + + +
@@ -14,17 +14,15 @@
-
-
-
- Job Templates +
+
+
-
-
- Jobs +
+
diff --git a/awx/ui/client/src/portal-mode/portal-mode.route.js b/awx/ui/client/src/portal-mode/portal-mode.route.js new file mode 100644 index 0000000000..f39cd20e4f --- /dev/null +++ b/awx/ui/client/src/portal-mode/portal-mode.route.js @@ -0,0 +1,16 @@ +import {templateUrl} from '../shared/template-url/template-url.factory'; + +export default { + name: 'portalMode', + url: '/portal', + templateUrl: templateUrl('portal-mode/portal-mode'), + controller: 'PortalModeController', + ncyBreadcrumb: { + label: "PORTAL MODE" + }, + resolve: { + features: ['FeaturesService', function(FeaturesService) { + return FeaturesService.get(); + }] + } +} \ No newline at end of file diff --git a/awx/ui/client/src/shared/layouts/one-plus-one.less b/awx/ui/client/src/shared/layouts/one-plus-one.less new file mode 100644 index 0000000000..ee578d995b --- /dev/null +++ b/awx/ui/client/src/shared/layouts/one-plus-one.less @@ -0,0 +1,53 @@ +/* +* Large resolution 1/2 + 1/2 width panels +* Small resolution: 100% width panels, stacked +* Options: static height, custom breakpoint +*/ + +@import "awx/ui/client/src/shared/branding/colors.default.less"; + + +.OnePlusOne-container(@height: 100%; @breakpoint: 900px){ + height: @height; + display: flex; + flex-diration: row; + @media screen and(max-width: @breakpoint){ + flex-direction: column; + } +} + +.OnePlusOne-panel--left(@height: 100%; @breakpoint: 900px){ + flex: 1 1; + height: @height; + width: 100%; + margin-right: 20px; + .Panel{ + height: 100%; + } + @media screen and (max-width @breakpoint){ + margin-right: 0px; + height: inherit; + } +} + +.OnePlusOne-panel--right(@height: 100%; @breakpoint: 900px){ + flex: 1 1; + height: @height; + width: 100%; + margin-right: 0px; + .Panel{ + height: 100%; + } + @media screen and (max-width @breakpoint){ + height: inherit; + } +} + +.OnePlusOne-panelHeader{ + color: @default-interface-txt; + font-size: 14px; + font-weight: bold; + margin-right: 10px; + text-transform: uppercase; + display: flex; +} diff --git a/awx/ui/client/src/widgets/PortalJobs.js b/awx/ui/client/src/widgets/PortalJobs.js index 2725d75b59..7e6a033493 100644 --- a/awx/ui/client/src/widgets/PortalJobs.js +++ b/awx/ui/client/src/widgets/PortalJobs.js @@ -24,6 +24,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) choicesCount = 0, listCount = 0, jobs_scope = scope.$new(true), + pageSize = 12, max_rows, user, html, e, @@ -56,7 +57,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) list: PortalJobsList, id: 'active-jobs', url: url , //GetBasePath('jobs')+'?created_by='+user, - pageSize: max_rows, + pageSize: pageSize, spinner: true }); @@ -71,7 +72,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) scope.removeChoicesReady = scope.$on('choicesReady', function() { choicesCount++; if (choicesCount === 2) { - setPortalJobsHeight(); + //setPortalJobsHeight(); scope.$emit('buildJobsList'); } }); @@ -136,6 +137,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) // Set the height of each container and calc max number of rows containers can hold + /* function setPortalJobsHeight() { var docw = $(window).width(), box_height, available_height, search_row, page_row, height, header, row_height; @@ -191,9 +193,7 @@ angular.module('PortalJobsWidget', ['RestServices', 'Utilities']) scope[PortalJobTemplateList.iterator + 'PageSize'] = max_rows; scope.changePageSize(PortalJobTemplateList.name, PortalJobTemplateList.iterator, false); } - - - + */ }; } ]);