bug 6986: fixed all display issues with alerts

This commit is contained in:
will 2010-11-08 18:36:14 -08:00
parent 47cc0ffe6b
commit 3a4f3599d6
3 changed files with 23 additions and 23 deletions

View File

@ -413,13 +413,13 @@
<div class="row_celltitles">
<img src="images/alert_icon.png" /></div>
</div>
<div class="grid_row_cell" style="width: 70%;">
<div class="grid_row_cell" style="width: 63%;">
<div class="row_celltitles alert" id="type">
</div>
<div class="row_celltitles alertdetails" id="description">
</div>
</div>
<div class="grid_row_cell" style="width: 19%;">
<div class="grid_row_cell" style="width: 26%;">
<div class="row_celltitles" id="date">
</div>
</div>

View File

@ -27,8 +27,8 @@ function alertToMidmenu(jsonObj, $midmenuItem1) {
var $iconContainer = $midmenuItem1.find("#icon_container").show();
$iconContainer.find("#icon").attr("src", "images/midmenuicon_alerts.png");
$midmenuItem1.find("#first_row").text(jsonObj.description.substring(0,25));
$midmenuItem1.find("#second_row").text(jsonObj.type.substring(0,25));
setDateField(jsonObj.sent, $midmenuItem1.find("#second_row"));
$midmenuItem1.find("#first_row").text(toAlertType(jsonObj.type));
}
function alertToRightPanel($midmenuItem1) {

View File

@ -1826,25 +1826,25 @@ function toRole(type) {
function toAlertType(alertCode) {
switch (alertCode) {
case "0" : return "Capacity Threshold - Memory";
case "1" : return "Capacity Threshold - CPU";
case "2" : return "Capacity Threshold - Storage Used";
case "3" : return "Capacity Threshold - Storage Allocated";
case "4" : return "Capacity Threshold - Public IP";
case "5" : return "Capacity Threshold - Private IP";
case "6" : return "Monitoring - Host";
case "7" : return "Monitoring - VM";
case "8" : return "Monitoring - Domain Router";
case "9" : return "Monitoring - Console Proxy";
case "10" : return "Monitoring - Routing Host";
case "11" : return "Monitoring - Storage";
case "12" : return "Monitoring - Usage Server";
case "13" : return "Monitoring - Management Server";
case "14" : return "Migration - Domain Router";
case "15" : return "Migration - Console Proxy";
case "16" : return "Migration - User VM";
case "17" : return "VLAN";
case "18" : return "Monitoring - Secondary Storage VM";
case 0 : return "Capacity Threshold - Memory";
case 1 : return "Capacity Threshold - CPU";
case 2 : return "Capacity Threshold - Storage Used";
case 3 : return "Capacity Threshold - Storage Allocated";
case 4 : return "Capacity Threshold - Public IP";
case 5 : return "Capacity Threshold - Private IP";
case 6 : return "Monitoring - Host";
case 7 : return "Monitoring - VM";
case 8 : return "Monitoring - Domain Router";
case 9 : return "Monitoring - Console Proxy";
case 10 : return "Monitoring - Routing Host";
case 11 : return "Monitoring - Storage";
case 12 : return "Monitoring - Usage Server";
case 13 : return "Monitoring - Management Server";
case 14 : return "Migration - Domain Router";
case 15 : return "Migration - Console Proxy";
case 16 : return "Migration - User VM";
case 17 : return "VLAN";
case 18 : return "Monitoring - Secondary Storage VM";
}
}