mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
About Tower version number fix
for parsing versions such as "2.3.0" and "2.3.0-0.git201507231538"
This commit is contained in:
parent
5f4f7e0aaf
commit
6ab4bc6800
@ -52,17 +52,16 @@ export default
|
||||
scope.removeBuildAboutDialog = scope.$on('BuildAboutDialog', function(e, data) {
|
||||
var spaces, i, j,
|
||||
paddedStr = "",
|
||||
versionParts,
|
||||
str = data.version,
|
||||
subscription = data.license_info.subscription_name || "";
|
||||
|
||||
if(str.search('-')){
|
||||
str = str.substr(0,str.search('-'));
|
||||
}
|
||||
spaces = Math.floor((16-str.length)/2);
|
||||
versionParts = str.split('-');
|
||||
spaces = Math.floor((16-versionParts[0].length)/2);
|
||||
for( i=0; i<=spaces; i++){
|
||||
paddedStr = paddedStr +" ";
|
||||
}
|
||||
paddedStr = paddedStr+str;
|
||||
paddedStr = paddedStr + versionParts[0];
|
||||
for( j = paddedStr.length; j<16; j++){
|
||||
paddedStr = paddedStr + " ";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user