mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Subscription name to UI
adding subscription name to hte UI in About Tower modal and on License page on license tab for card https://trello.com/c/4IMj3H4V/535-include-subscription-type-in-tower-license-and-present-in-api-and-ui
This commit is contained in:
parent
c03a4e2873
commit
f5973c81e2
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc function
|
||||
* @name forms.function:LicenseForm
|
||||
@ -45,6 +45,12 @@ export default
|
||||
readonly: true,
|
||||
tab: 'license'
|
||||
},
|
||||
subscription_name: {
|
||||
label: 'Subscription Name',
|
||||
type: 'text',
|
||||
readonly: true,
|
||||
tab: 'license'
|
||||
},
|
||||
license_key: {
|
||||
label: 'License Key',
|
||||
type: 'textarea',
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
*
|
||||
* All Rights Reserved
|
||||
*************************************************/
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
* @name helpers
|
||||
@ -50,22 +50,24 @@ export default
|
||||
scope.removeBuildAboutDialog();
|
||||
}
|
||||
scope.removeBuildAboutDialog = scope.$on('BuildAboutDialog', function(e, data) {
|
||||
var spaces, i,
|
||||
paddedStr = "", l,
|
||||
version = data.version.replace(/-.*$/,''),
|
||||
license_type = data.license_info.license_type;
|
||||
var spaces, i, j,
|
||||
paddedStr = "",
|
||||
str = data.version,
|
||||
subscription = data.license_info.subscription_name || "";
|
||||
|
||||
// get the length of the license type and the word license (7) plus the extra spaces (4)
|
||||
l = license_type.length + 11;
|
||||
|
||||
spaces = Math.floor(l-(version.length + 10)); // 8 comes from " Tower "
|
||||
if(str.search('-')){
|
||||
str = str.substr(0,str.search('-'));
|
||||
}
|
||||
spaces = Math.floor((16-str.length)/2);
|
||||
for( i=0; i<=spaces; i++){
|
||||
paddedStr = paddedStr +" ";
|
||||
}
|
||||
paddedStr = version+paddedStr;
|
||||
paddedStr = paddedStr+str;
|
||||
for( j = paddedStr.length; j<16; j++){
|
||||
paddedStr = paddedStr + " ";
|
||||
}
|
||||
$('#about-modal-version').html(paddedStr);
|
||||
$('#about-modal-license-type').html(license_type);
|
||||
|
||||
$('#about-modal-subscription').html(subscription);
|
||||
scope.modalOK = function(){
|
||||
$('#about-modal-dialog').dialog('close');
|
||||
};
|
||||
@ -74,7 +76,7 @@ export default
|
||||
scope: scope,
|
||||
// buttons: [],
|
||||
width: 710,
|
||||
height: 380,
|
||||
height: 400,
|
||||
minWidth: 300,
|
||||
resizable: false,
|
||||
// title: , //'<img src="static/img/tower_login_logo.png">' ,//'About Ansible',
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
<div style="width: 340px; margin: 0 auto;">
|
||||
<pre id="cowsay">
|
||||
________________
|
||||
/ Tower <span id='about-modal-version'></span> \
|
||||
\ <span id='about-modal-license-type'></span> license /
|
||||
/ Tower Version \
|
||||
\<span id='about-modal-version'></span>/
|
||||
----------------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
@ -22,5 +22,7 @@
|
||||
<p>Ansible and Ansible Tower are registered trademarks of Ansible, Inc.</p>
|
||||
<br>
|
||||
<p>Visit <a href="http://www.ansible.com" target="_blank">Ansible.com</a> for more information.</p>
|
||||
<br>
|
||||
<p><span id='about-modal-subscription'></span></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user