From 5f4da1023eb3a708eb1b085e8de196e73d2fa176 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Thu, 16 Jun 2016 17:32:25 -0400 Subject: [PATCH] Tweaked refresh buttons on the dashboard/job page/portal mode --- awx/ui/client/legacy-styles/forms.less | 9 ++++ awx/ui/client/src/app.js | 3 +- .../src/bread-crumb/bread-crumb.block.less | 5 ++- .../src/bread-crumb/bread-crumb.directive.js | 7 +++ .../src/bread-crumb/bread-crumb.partial.html | 43 +++++++++++++------ .../client/src/dashboard/dashboard.block.less | 1 + awx/ui/client/src/partials/home.html | 19 -------- awx/ui/client/src/partials/jobs.html | 32 +++++++------- .../portal-mode-jobs.controller.js | 4 ++ .../portal-mode/portal-mode-jobs.partial.html | 25 +++++++---- .../portal-mode-layout.partial.html | 14 ------ .../src/portal-mode/portal-mode.block.less | 8 +++- 12 files changed, 94 insertions(+), 76 deletions(-) diff --git a/awx/ui/client/legacy-styles/forms.less b/awx/ui/client/legacy-styles/forms.less index 5e383a6c0f..28c98651b8 100644 --- a/awx/ui/client/legacy-styles/forms.less +++ b/awx/ui/client/legacy-styles/forms.less @@ -102,6 +102,11 @@ min-height: 30px; } +.Form-tabs { + flex: 1 0 auto; + display: flex; +} + .Form-tab { color: @btn-txt; background-color: @btn-bg; @@ -163,6 +168,10 @@ display: block; } +.Form-tabActions { + display: flex; +} + .Form-formGroup { flex: 1 0 auto; margin-bottom: 20px; diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index b1933e4198..3d1b74e8b1 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -241,7 +241,8 @@ var tower = angular.module('Tower', [ controller: Home, params: {licenseMissing: null}, data: { - activityStream: true + activityStream: true, + refreshButton: true }, ncyBreadcrumb: { label: "DASHBOARD" diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.block.less b/awx/ui/client/src/bread-crumb/bread-crumb.block.less index 58aa900c65..08abee34a7 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.block.less +++ b/awx/ui/client/src/bread-crumb/bread-crumb.block.less @@ -18,9 +18,12 @@ .BreadCrumb.is-loggedOut { opacity: 0; } +.BreadCrumb-menuLinkHolder { + display: flex; + margin-left: auto; +} .BreadCrumb-menuLink { width: 58px; - margin-left: auto; color: @bc-link-icon; flex: initial; display: flex; diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js index 3331a10736..1cf035550a 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.directive.js +++ b/awx/ui/client/src/bread-crumb/bread-crumb.directive.js @@ -9,8 +9,13 @@ export default var streamConfig = {}; scope.showActivityStreamButton = false; + scope.showRefreshButton = false; scope.loadingLicense = true; + scope.refresh = function() { + $state.go($state.current, {}, {reload: true}); + }; + scope.toggleActivityStream = function() { // If the user is not already on the activity stream then they want to navigate to it @@ -79,6 +84,8 @@ export default scope.showActivityStreamButton = false; } + + scope.showRefreshButton = (streamConfig && streamConfig.refreshButton) ? true : false; }); // scope.$on('featuresLoaded', function(){ diff --git a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html index 8b9ef46bc7..8e661904ba 100644 --- a/awx/ui/client/src/bread-crumb/bread-crumb.partial.html +++ b/awx/ui/client/src/bread-crumb/bread-crumb.partial.html @@ -1,18 +1,33 @@