Revision e1a023a6

b/ui/static/synnefo.js
481 481
						// continue with the rest of the servers
482 482
						reboot(serverIDs);
483 483
					} else {
484
						ajax_error(jqXHR.status);
484
						ajax_error(jqXHR.status, serverID);
485 485
					}
486 486
				}
487 487
    });
......
520 520
						// continue with the rest of the servers			
521 521
                        shutdown(serverIDs);
522 522
                    } else {
523
                        ajax_error(jqXHR.status);
523
                        ajax_error(jqXHR.status, serverID);
524 524
                    }
525 525
                }             
526 526
    });
......
557 557
						// continue with the rest of the servers
558 558
                        destroy(serverIDs);
559 559
                    } else {
560
                        ajax_error(jqXHR.status);
560
                        ajax_error(jqXHR.status, serverID);
561 561
                    }
562 562
                }             
563 563
    });
......
596 596
						// continue with the rest of the servers						
597 597
                        start(serverIDs);
598 598
                    } else {
599
                        ajax_error(jqXHR.status);
599
                        ajax_error(jqXHR.status, serverID);
600 600
                    }
601 601
                }
602 602
    });
b/ui/templates/home.html
64 64
        };
65 65
        
66 66
        // ajax error checking  
67
        function ajax_error(status) {
67
        function ajax_error(status, serverID) {
68 68
            // prepare the error message
69 69
            $("#error-success h3").text(ERRORS['HEADER']);
70 70
            
71 71
            if (ERRORS[status] != undefined) {
72
                $("#error-success p").text(ERRORS[status]);
72
                if (serverID == undefined){
73
                    $("#error-success p").text(ERRORS[status]);
74
                } else {
75
                    var serverName = $("#"+serverID).parent().parent().find("a.name").text();
76
                    $("#error-success p").html("<b>" + serverName + "</b>" + ": " + ERRORS[status]);
77
                }
73 78
            } else {
74 79
                $("#error-success p").text(ERRORS['DEFAULT']);   
75 80
            }
b/ui/templates/list.html
263 263
function display_failure(serverID, status, action) {
264 264
	osIcon = $('#'+serverID).parent().parent().find('.list-logo');
265 265
	osIcon.attr('src',osIcon.attr('os'));
266
    ajax_error(status);
266
    ajax_error(status, serverID);
267 267
}
268 268

  
269 269
var vmTable = $("div.list table.list-machines").dataTable({

Also available in: Unified diff