mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
update about modal to be monospace and have core version
This commit is contained in:
committed by
Matthew Jones
parent
6e586282f5
commit
8f5253014b
@@ -1,6 +1,16 @@
|
||||
/** @define About */
|
||||
@import "./client/src/shared/branding/colors.default.less";
|
||||
|
||||
|
||||
.About-ansibleVersion,
|
||||
.About-cowsay--code {
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
}
|
||||
|
||||
.About-ansibleVersion {
|
||||
color: @default-data-txt;
|
||||
}
|
||||
|
||||
.About-cowsay--container{
|
||||
width: 340px;
|
||||
margin: 0 auto;
|
||||
@@ -25,6 +35,7 @@
|
||||
.About-brand--redhat{
|
||||
float: left;
|
||||
width: 112px;
|
||||
padding-top: 13px;
|
||||
}
|
||||
.About-brand--ansible{
|
||||
max-width: 120px;
|
||||
|
||||
@@ -1,27 +1,12 @@
|
||||
export default
|
||||
['$scope', '$state', 'ConfigService', 'i18n',
|
||||
function($scope, $state, ConfigService, i18n){
|
||||
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;
|
||||
};
|
||||
var init = function(){
|
||||
ConfigService.getConfig()
|
||||
.then(function(config){
|
||||
$scope.version = config.version.split('-')[0];
|
||||
$scope.ansible_version = config.ansible_version;
|
||||
$scope.subscription = config.license_info.subscription_name;
|
||||
$scope.version = processVersion(config.version);
|
||||
$scope.version_str = i18n._("Version");
|
||||
$('#about-modal').modal('show');
|
||||
});
|
||||
};
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
<div class="About-cowsay--container">
|
||||
<!-- Don't indent this properly, you'll break the cow -->
|
||||
<pre class="About-cowsay--code">
|
||||
________________
|
||||
/ Tower {{version_str}} \
|
||||
\<span>{{version}}</span>/
|
||||
----------------
|
||||
_______________
|
||||
< Tower {{version}} >
|
||||
---------------
|
||||
\ ^__^
|
||||
\ (oo)\_______
|
||||
(__) A )\/\
|
||||
@@ -23,8 +22,13 @@
|
||||
</div>
|
||||
<div class="About-modal--footer">
|
||||
<img class="About-brand--redhat img-responsive" src="/static/assets/tower-logo-login.svg" />
|
||||
<p class="text-right">Copyright © 2017 Red Hat, Inc. <br>
|
||||
Visit <a href="http://www.ansible.com/" target="_blank">Ansible.com</a> for more information.<br>
|
||||
<p class="text-right">
|
||||
<span class="About-ansibleVersion">
|
||||
Ansible {{ ansible_version }}
|
||||
</span> <br>
|
||||
Copyright © 2017 Red Hat, Inc. <br>
|
||||
Visit <a href="http://www.ansible.com/" target="_blank">Ansible.com</a> for more information.<br>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user