From c304427e5d6ba7c8c9be8c4f7a3556a90217dd22 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 6 May 2016 14:37:20 -0400 Subject: [PATCH 01/11] Small UX changes to License and ActStream --- awx/ui/client/src/app.js | 5 ++ .../client/src/license/license.controller.js | 61 ++++++++++--------- .../client/src/license/license.partial.html | 2 +- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 0042de8cd9..9a2e38ccfd 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -233,6 +233,7 @@ var tower = angular.module('Tower', [ url: '/home', templateUrl: urlPrefix + 'partials/home.html', controller: Home, + params: {licenseMissing: null}, data: { activityStream: true }, @@ -789,6 +790,10 @@ var tower = angular.module('Tower', [ if (fromState.name === 'signIn'){ CheckLicense.notify(); } + + if(fromState.name === 'license' && toParams.hasOwnProperty('licenseMissing')){ + $rootScope.licenseMissing = toParams.licenseMissing; + } var list, id; // broadcast event change if editing crud object if ($location.$$path && $location.$$path.split("/")[3] && $location.$$path.split("/")[3] === "schedules") { diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js index 291ae0d0a7..61ab016946 100644 --- a/awx/ui/client/src/license/license.controller.js +++ b/awx/ui/client/src/license/license.controller.js @@ -6,9 +6,9 @@ export default ['Wait', '$state', '$scope', '$rootScope', '$location', 'GetBasePath', - 'Rest', 'ProcessErrors', 'CheckLicense', 'moment','$window', + 'Rest', 'ProcessErrors', 'CheckLicense', 'moment','$window', '$filter', function( Wait, $state, $scope, $rootScope, $location, GetBasePath, Rest, - ProcessErrors, CheckLicense, moment, $window){ + ProcessErrors, CheckLicense, moment, $window, $filter){ $scope.getKey = function(event){ // Mimic HTML5 spec, show filename $scope.fileName = event.target.files[0].name; @@ -40,33 +40,36 @@ export default $window.open('https://www.ansible.com/license', '_blank'); }; - $scope.newLicense = {}; - $scope.submit = function(){ - Wait('start'); - CheckLicense.post($scope.newLicense.file, $scope.newLicense.eula) - .success(function(){ - reset(); - init(); - $scope.success = true; - // for animation purposes - var successTimeout = setTimeout(function(){ - $scope.success = false; - clearTimeout(successTimeout); - }, 4000); - if($rootScope.licenseMissing === true){ - $rootScope.licenseMissing = false; - $state.go('dashboard'); - } - else{ - $rootScope.licenseMissing = false; - } - }); - }; - var calcDaysRemaining = function(seconds){ - // calculate the number of days remaining on the license - var duration = moment.duration(seconds, 'seconds'); - return duration.days(); - }; + $scope.newLicense = {}; + $scope.submit = function(){ + Wait('start'); + CheckLicense.post($scope.newLicense.file, $scope.newLicense.eula) + .success(function(){ + reset(); + init(); + if($rootScope.licenseMissing === true){ + $state.go('dashboard', { + licenseMissing: false + }); + } + else{ + $scope.success = true; + $rootScope.licenseMissing = false; + // for animation purposes + var successTimeout = setTimeout(function(){ + $scope.success = false; + clearTimeout(successTimeout); + }, 4000); + } + }); + }; + var calcDaysRemaining = function(seconds){ + // calculate the number of days remaining on the license + var duration = moment.duration(seconds, 'seconds').days(); + duration = (duration!==1) ? $filter('number')(duration, 0) + ' days' : $filter('number')(duration, 0) + ' day'; + return duration; + }; + var calcExpiresOn = function(days){ // calculate the expiration date of the license diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html index fb1e88cbe1..f6d44b3b97 100644 --- a/awx/ui/client/src/license/license.partial.html +++ b/awx/ui/client/src/license/license.partial.html @@ -44,7 +44,7 @@
Time Remaining
- {{time.remaining}} Days + {{time.remaining}}
From e31f4729756bc1f0940a671e2df67361fcc4c5d6 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 6 May 2016 14:41:18 -0400 Subject: [PATCH 02/11] Changing order of Setup cards --- awx/ui/client/src/setup-menu/setup-menu.partial.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/awx/ui/client/src/setup-menu/setup-menu.partial.html b/awx/ui/client/src/setup-menu/setup-menu.partial.html index 9560afa313..f03ae05d08 100644 --- a/awx/ui/client/src/setup-menu/setup-menu.partial.html +++ b/awx/ui/client/src/setup-menu/setup-menu.partial.html @@ -1,9 +1,9 @@
- -

Credentials

+
+

Organizations

- Add passwords, SSH keys, etc. for Tower to use when launching jobs against machines, or when syncing inventories or projects. + Group all of your content to manage permissions across departments in your company.

@@ -18,10 +18,10 @@ Split up your organization to associate content and control permissions for groups.

- -

Organizations

+
+

Credentials

- Group all of your content to manage permissions across departments in your company. + Add passwords, SSH keys, etc. for Tower to use when launching jobs against machines, or when syncing inventories or projects.

From fefa6998aaf24ad53e34733be662decc54c36130 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 6 May 2016 15:33:19 -0400 Subject: [PATCH 03/11] EULA text should start on a new line --- awx/ui/client/src/license/license.block.less | 1 + awx/ui/client/src/license/license.partial.html | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/license/license.block.less b/awx/ui/client/src/license/license.block.less index 475cdf0016..f76c1de0aa 100644 --- a/awx/ui/client/src/license/license.block.less +++ b/awx/ui/client/src/license/license.block.less @@ -54,6 +54,7 @@ color: @login-notice-text; overflow-y: scroll; overflow-x: visible; + white-space: pre-line; } .License-field label{ diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html index f6d44b3b97..24614bdc21 100644 --- a/awx/ui/client/src/license/license.partial.html +++ b/awx/ui/client/src/license/license.partial.html @@ -106,9 +106,7 @@
End User License Agreement
- {{ license.eula }} -
+ class="License-eulaNotice">{{ license.eula }}
-
+
diff --git a/awx/ui/client/src/management-jobs/card/mgmtcards.block.less b/awx/ui/client/src/management-jobs/card/mgmtcards.block.less index 768a1acff6..c8bd17a390 100644 --- a/awx/ui/client/src/management-jobs/card/mgmtcards.block.less +++ b/awx/ui/client/src/management-jobs/card/mgmtcards.block.less @@ -22,6 +22,14 @@ border-left: 5px solid #337AB7; } +.MgmtCards-card--promptElements{ + padding-top: 10px; +} + +// .MgmtCards-promptText{ +// color:@default-interface-txt; +// } + .MgmtCards-header { display: flex; flex-wrap: nowrap; diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index 446c6d1798..3d1c7ba0d6 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -157,9 +157,9 @@