mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 13288: Concatenate long zone names in dashboard UI
status 13288: resolved fixed
This commit is contained in:
parent
529d0706e1
commit
cc63a451a7
@ -1062,7 +1062,7 @@
|
||||
<div class="button view-all">view all</div>
|
||||
</div>
|
||||
<ul data-item="alerts">
|
||||
<li class="error" concat-value="true">
|
||||
<li class="error" concat-value="50">
|
||||
<div class="content">
|
||||
<span class="title" data-list-item="name">Alert 1</span>
|
||||
<p data-list-item="description">Alert 1</p>
|
||||
@ -1078,7 +1078,7 @@
|
||||
<div class="button view-all">view all</div>
|
||||
</div>
|
||||
<ul data-item="hostAlerts">
|
||||
<li class="error" concat-value="true">
|
||||
<li class="error" concat-value="50">
|
||||
<div class="content">
|
||||
<span class="title" data-list-item="name">Alert 1</span>
|
||||
<p data-list-item="description">Alert 1</p>
|
||||
@ -1109,7 +1109,7 @@
|
||||
<!-- Zone stat charts -->
|
||||
<div class="zone-stats">
|
||||
<ul data-item="zoneCapacities">
|
||||
<li>
|
||||
<li concat-value="25">
|
||||
<div class="label">
|
||||
Zone: <span data-list-item="zoneName"></span>
|
||||
</div>
|
||||
|
||||
@ -59,11 +59,17 @@
|
||||
{ data: [[1, arrayValue]], color: arrayValue < 80 ? 'orange' : 'red' }
|
||||
]);
|
||||
} else {
|
||||
if ($li.attr('concat-value') == 'true') {
|
||||
$arrayElem.html(arrayValue.substring(0, 50).concat('...'));
|
||||
if ($li.attr('concat-value')) {
|
||||
$arrayElem.html(arrayValue.toString().split('<br/>').map(function(val) {
|
||||
var concatValue = parseInt($li.attr('concat-value'));
|
||||
|
||||
return val.length >= concatValue ? val.substring(0, concatValue).concat('...') : val;
|
||||
}).join('<br/>'));
|
||||
} else {
|
||||
$arrayElem.html(arrayValue);
|
||||
}
|
||||
|
||||
$arrayElem.attr('title', arrayValue.toString().replace('<br/>', ', '));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user