diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js
index 798fd7605a..0fd5283f62 100644
--- a/awx/ui/static/js/app.js
+++ b/awx/ui/static/js/app.js
@@ -113,7 +113,8 @@ angular.module('Tower', [
'SocketIO',
'lrInfiniteScroll',
'LoadConfigHelper',
- 'SocketHelper'
+ 'SocketHelper',
+ 'AboutAnsibleHelpModal'
])
.constant('AngularScheduler.partials', urlPrefix + 'lib/angular-scheduler/lib/')
@@ -421,9 +422,10 @@ angular.module('Tower', [
}])
.run(['$compile', '$cookieStore', '$rootScope', '$log', 'CheckLicense', '$location', 'Authorization', 'LoadBasePaths', 'Timer', 'ClearScope', 'HideStream', 'Socket',
- 'LoadConfig', 'Store', 'ShowSocketHelp', 'LicenseViewer',
+ 'LoadConfig', 'Store', 'ShowSocketHelp', 'LicenseViewer', 'AboutAnsibleHelp',
function ($compile, $cookieStore, $rootScope, $log, CheckLicense, $location, Authorization, LoadBasePaths, Timer, ClearScope, HideStream, Socket,
- LoadConfig, Store, ShowSocketHelp, LicenseViewer) {
+ LoadConfig, Store, ShowSocketHelp, LicenseViewer, AboutAnsibleHelp) {
+
var e, html, sock, checkCount = 0;
@@ -542,6 +544,10 @@ angular.module('Tower', [
activateTab();
+ $rootScope.viewAboutTower = function(){
+ AboutAnsibleHelp();
+ };
+
$rootScope.viewCurrentUser = function () {
$location.path('/users/' + $rootScope.current_user.id);
};
diff --git a/awx/ui/static/js/helpers/AboutAnsible.js b/awx/ui/static/js/helpers/AboutAnsible.js
new file mode 100644
index 0000000000..65d55db71f
--- /dev/null
+++ b/awx/ui/static/js/helpers/AboutAnsible.js
@@ -0,0 +1,64 @@
+/*********************************************
+ * Copyright (c) 2014 AnsibleWorks, Inc.
+ *
+ * Dashboard.js
+ *
+ * The new dashboard
+ *
+ */
+
+'use strict';
+
+angular.module('AboutAnsibleHelpModal', ['RestServices', 'Utilities','ModalDialog'])
+ .factory('AboutAnsibleHelp', ['$rootScope', '$compile', '$location' , 'Rest', 'GetBasePath', 'ProcessErrors', 'Wait', 'CreateDialog',
+ function ($rootScope, $compile , $location, Rest, GetBasePath, ProcessErrors, Wait, CreateDialog) {
+ return function () {
+
+ var scope= $rootScope.$new(),
+ url;
+
+ url = GetBasePath('config');
+ Rest.setUrl(url);
+ Rest.get()
+ .success(function (data){
+ scope.$emit('BuildAboutDialog', data);
+ })
+ .error(function (data, status) {
+ ProcessErrors(scope, data, status, null, { hdr: 'Error!',
+ msg: 'Failed to get: ' + url + ' GET returned: ' + status });
+ });
+
+
+ if (scope.removeDialogReady) {
+ scope.removeDialogReady();
+ }
+ scope.removeDialogReady = scope.$on('DialogReady', function() {
+ // element = angular.element(document.getElementById('about-modal-dialog'));
+ // $compile(element)(scope);
+ $('#about-modal-dialog').dialog('open');
+ });
+
+ if (scope.removeBuildAboutDialog) {
+ scope.removeBuildAboutDialog();
+ }
+ scope.removeBuildAboutDialog = scope.$on('BuildAboutDialog', function(e, data) {
+ var str = data.version;
+ if(str.search('-')){
+ str = str.substr(0,str.search('-'));
+ }
+ $('#about-modal-version').html(str);
+ CreateDialog({
+ id: 'about-modal-dialog',
+ scope: scope,
+ buttons: [],
+ width: 600,
+ height: 300,
+ minWidth: 300,
+ // title: , //'
' ,//'About Ansible',
+ callback: 'DialogReady'
+ });
+ });
+
+ };
+ }
+]);
\ No newline at end of file
diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less
index 8046e7710d..0078e5382b 100644
--- a/awx/ui/static/less/ansible-ui.less
+++ b/awx/ui/static/less/ansible-ui.less
@@ -128,6 +128,17 @@ a:focus {
background-color: #FFF;
}
+#about-modal-logo{
+ width: 150px;
+ height: 150px;
+ margin-left: 10px;
+ margin-top: 10px;
+}
+#about-modal-titlelogo{
+ margin-bottom: 10px;
+
+}
+
/* Make buttons appear to be disabled, but allow mouse events */
.btn-disabled {
opacity: 0.35;
diff --git a/awx/ui/static/partials/about.html b/awx/ui/static/partials/about.html
new file mode 100644
index 0000000000..c23e76d526
--- /dev/null
+++ b/awx/ui/static/partials/about.html
@@ -0,0 +1,14 @@
+
+
+