diff --git a/awx/ui/client/legacy-styles/ansible-ui.less b/awx/ui/client/legacy-styles/ansible-ui.less
index 4adaeb09eb..717ab7bd30 100644
--- a/awx/ui/client/legacy-styles/ansible-ui.less
+++ b/awx/ui/client/legacy-styles/ansible-ui.less
@@ -44,7 +44,8 @@
@import "text-label.less";
@import "./bootstrap-datepicker.less";
@import "awx/ui/client/src/shared/branding/colors.default.less";
-
+// Bootstrap default overrides
+@import "awx/ui/client/src/shared/bootstrap-settings.less";
/* Bootstrap fix that's causing a right margin to appear
whenver a modal is opened */
body.modal-open {
diff --git a/awx/ui/client/src/about/about.controller.js b/awx/ui/client/src/about/about.controller.js
index c35388e8ae..07bad2dfd6 100644
--- a/awx/ui/client/src/about/about.controller.js
+++ b/awx/ui/client/src/about/about.controller.js
@@ -1,20 +1,20 @@
export default
['$scope', '$state', 'CheckLicense', function($scope, $state, CheckLicense){
var processVersion = function(version){
- // prettify version & calculate padding
- // e,g 3.0.0-0.git201602191743/ -> 3.0.0
- var split = version.split('-')[0]
- var spaces = Math.floor((16-split.length)/2),
- paddedStr = "";
- for(var i=0; i<=spaces; i++){
- paddedStr = paddedStr +" ";
- }
- paddedStr = paddedStr + split;
- for(var j = paddedStr.length; j<16; j++){
- paddedStr = paddedStr + " ";
- }
- return paddedStr
- }
+ // prettify version & calculate padding
+ // e,g 3.0.0-0.git201602191743/ -> 3.0.0
+ var split = version.split('-')[0]
+ var spaces = Math.floor((16-split.length)/2),
+ paddedStr = "";
+ for(var i=0; i<=spaces; i++){
+ paddedStr = paddedStr +" ";
+ }
+ paddedStr = paddedStr + split;
+ for(var j = paddedStr.length; j<16; j++){
+ paddedStr = paddedStr + " ";
+ }
+ return paddedStr
+ };
var init = function(){
CheckLicense.get()
.then(function(res){
@@ -23,9 +23,9 @@ export default
$('#about-modal').modal('show');
});
};
- var back = function(){
- $state.go('setup');
- }
+ $('#about-modal').on('hidden.bs.modal', function () {
+ $state.go('setup');
+ });
init();
}
];
\ No newline at end of file
diff --git a/awx/ui/client/src/about/about.partial.html b/awx/ui/client/src/about/about.partial.html
index afc66724f4..44d4914402 100644
--- a/awx/ui/client/src/about/about.partial.html
+++ b/awx/ui/client/src/about/about.partial.html
@@ -3,7 +3,7 @@
diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js
index a6ab910194..214e5cc9a5 100644
--- a/awx/ui/client/src/app.js
+++ b/awx/ui/client/src/app.js
@@ -76,7 +76,7 @@ __deferLoadIfEnabled();
/*#endif#*/
var tower = angular.module('Tower', [
- // 'ngAnimate',
+ 'ngAnimate',
'ngSanitize',
'ngCookies',
about.name,
diff --git a/awx/ui/client/src/footer/footer.block.less b/awx/ui/client/src/footer/footer.block.less
index 057d926568..ebe652d1c3 100644
--- a/awx/ui/client/src/footer/footer.block.less
+++ b/awx/ui/client/src/footer/footer.block.less
@@ -1,12 +1,11 @@
/** @define DashboardCounts */
-
.Footer {
height: 40px;
background-color: #f6f6f6;
color: #848992;
width: 100%;
z-index: 1040;
- position: fixed;
+ position: absolute;
right: 0;
left: 0;
bottom: 0;
diff --git a/awx/ui/client/src/license/license.block.less b/awx/ui/client/src/license/license.block.less
index 58ce83542a..aae2c22d07 100644
--- a/awx/ui/client/src/license/license.block.less
+++ b/awx/ui/client/src/license/license.block.less
@@ -20,6 +20,15 @@
display: block;
width: 100%;
}
+.License-submit--success.ng-hide-add, .License-submit--success.ng-hide-remove {
+ transition: all ease-in-out 0.5s;
+}
+.License-submit--success{
+ opacity: 1;
+}
+.License-submit--success.ng-hide{
+ opacity: 0;
+}
.License-eula textarea{
width: 100%;
height: 300px;
@@ -63,4 +72,8 @@
input[type=file] {
display: none;
}
+}
+.License-input--fake{
+ border-top-right-radius: 4px !important;
+ border-bottom-right-radius: 4px !important;
}
\ No newline at end of file
diff --git a/awx/ui/client/src/license/license.controller.js b/awx/ui/client/src/license/license.controller.js
index 6e2801a85f..187fa8883c 100644
--- a/awx/ui/client/src/license/license.controller.js
+++ b/awx/ui/client/src/license/license.controller.js
@@ -5,9 +5,9 @@
*************************************************/
export default
- [ 'Wait', '$state', '$scope', '$location',
+ [ 'Wait', '$state', '$scope', '$rootScope', '$location',
'GetBasePath', 'Rest', 'ProcessErrors', 'CheckLicense', 'moment',
- function( Wait, $state, $scope, $location,
+ function( Wait, $state, $scope, $rootScope, $location,
GetBasePath, Rest, ProcessErrors, CheckLicense, moment){
$scope.getKey = function(event){
// Mimic HTML5 spec, show filename
@@ -16,9 +16,19 @@ export default
var raw = new FileReader();
// readAsFoo runs async
raw.onload = function(){
- $scope.newLicense.file = JSON.parse(raw.result);
+ try {
+ $scope.newLicense.file = JSON.parse(raw.result);
+ }
+ catch(err) {
+ ProcessErrors($rootScope, null, null, null, {msg: 'Invalid file format. Please upload valid JSON.'});
+ }
+ }
+ try {
+ raw.readAsText(event.target.files[0]);
+ }
+ catch(err) {
+ ProcessErrors($rootScope, null, null, null, {msg: 'Invalid file format. Please upload valid JSON.'});
}
- raw.readAsText(event.target.files[0]);
};
// HTML5 spec doesn't provide a way to customize file input css
// So we hide the default input, show our own, and simulate clicks to the hidden input
@@ -33,6 +43,11 @@ export default
reset();
init();
$scope.success = true;
+ // for animation purposes
+ var successTimeout = setTimeout(function(){
+ $scope.success = false;
+ clearTimeout(successTimeout);
+ }, 4000);
});
};
var calcDaysRemaining = function(ms){
@@ -51,6 +66,7 @@ export default
CheckLicense.get()
.then(function(res){
$scope.license = res.data;
+ $scope.license.version = res.data.version.split('-')[0];
$scope.time = {};
$scope.time.remaining = calcDaysRemaining($scope.license.license_info.time_remaining);
$scope.time.expiresOn = calcExpiresOn($scope.time.remaining);
diff --git a/awx/ui/client/src/license/license.partial.html b/awx/ui/client/src/license/license.partial.html
index dcbde280e7..77f35c2be8 100644
--- a/awx/ui/client/src/license/license.partial.html
+++ b/awx/ui/client/src/license/license.partial.html
@@ -7,31 +7,31 @@
License
Valid
- Invalid
+ Invalid