Revision b495fe50 ui/templates/machines_list.html

b/ui/templates/machines_list.html
253 253
        // check server status to select the appropriate OS icon, defaults to on state
254 254
        osTag = os_icon(server.metadata);
255 255
        var osIcon = osTag + "-on.png", imgStr, imgSrc;
256

  
257 256
        // check if the server already exists in the datatable
258
        tableData.forEach(function(row,index){
259

  
260
            if (row[0].split(' ')[2].replace('id=','') == server.id){
261
                current = index;
262
            }
263
        });
257
        if (tableData.length > 0) {
258
            tableData.forEach(function(row,index){
259
                if (row[0].split(' ')[2].replace('id=','') == server.id){
260
                    current = index;
261
                }
262
            });
263
        }
264 264
        if (current != -1) { // if it's there, update the values
265 265
            // get current status description, including non api states
266 266
            var server_row = $('#machinesview .list #' + server.id).parent().parent();
......
382 382

  
383 383
    $('#machinesview .list .dataTables_scrollHeadInner table').attr('style','');
384 384
    $('#machinesview .list .dataTables_scrollHeadInner th').attr('style','');
385

  
386 385
}
387 386

  
388 387
function display_success(serverID) {
......
438 437
});
439 438

  
440 439
// set the label of the multiple buttons
441
$('.confirm_multiple button.yes').text({% trans 'Confirm' %});
442
$('.confirm_multiple button.no').text({% trans 'Cancel' %});
440
$('.confirm_multiple button.yes').text(VARIOUS["CONFIRM"]);
441
$('.confirm_multiple button.no').text(VARIOUS["CANCEL"]);
443 442
</script>

Also available in: Unified diff