Revision 6dd01959 ui/templates/machines_single.html
b/ui/templates/machines_single.html | ||
---|---|---|
314 | 314 |
$(this).parent().hide(); |
315 | 315 |
$(this).closest('div.action-container').children('div.single-action').removeClass('selected'); |
316 | 316 |
$(this).parent().parent().find('.state').children('.spinner').show(); |
317 |
update_transition_names(); |
|
317 | 318 |
update_confirmations(); |
318 | 319 |
return false; |
319 | 320 |
}); |
... | ... | |
453 | 454 |
var server_image = "unknown" |
454 | 455 |
} |
455 | 456 |
// get server status message, if it exists |
456 |
var current_message = existing.find(".state-label").text(); |
|
457 |
var current_message = existing.find(".state-label").text().replace(TRANSITION_STATE_APPEND, "");
|
|
457 | 458 |
|
458 | 459 |
// server already exists in DOM |
459 | 460 |
if (existing.length){ |
... | ... | |
583 | 584 |
} |
584 | 585 |
//show spinner while machine is building or rebooting |
585 | 586 |
if (server.status == 'BUILD' || |
586 |
[TRANSITIONS['Starting'], TRANSITIONS['Shutting down']].indexOf(existing.find(".status").text()) >= 0 ) { |
|
587 |
[TRANSITIONS['Starting'], TRANSITIONS['Shutting down']].indexOf(existing.find(".status").text().replace(TRANSITION_STATE_APPEND, "")) >= 0 ) {
|
|
587 | 588 |
machine.find(".column1 .state .spinner").show(); |
588 | 589 |
machine.find(".connect-border").hide(); |
589 | 590 |
machine.find(".connect-arrow").hide(); |
... | ... | |
641 | 642 |
} |
642 | 643 |
}); |
643 | 644 |
|
645 |
update_transition_names(); |
|
644 | 646 |
fix_v6_addresses(); |
645 | 647 |
// hide pane spinner |
646 | 648 |
$("#machinesview-single.single > div.large-spinner").hide(); |
... | ... | |
678 | 680 |
} |
679 | 681 |
} |
680 | 682 |
|
683 |
// define these to avoid exceptions |
|
684 |
function display_reboot_success() { |
|
685 |
} |
|
686 |
|
|
687 |
function display_reboot_failure() { |
|
688 |
} |
|
689 |
|
|
690 |
// append string to transition states |
|
691 |
function update_transition_names() { |
|
692 |
$(".state-label").each(function(index,el){ |
|
693 |
var tr_text = $(this).text().replace(TRANSITION_STATE_APPEND,""); |
|
694 |
if (TRANSITION_STATES.indexOf(tr_text) >= 0) { |
|
695 |
$(this).text(tr_text + TRANSITION_STATE_APPEND); |
|
696 |
} |
|
697 |
}) |
|
698 |
} |
|
699 |
|
|
681 | 700 |
//get currently displayed serverId |
682 | 701 |
function current_serverId() { |
683 | 702 |
return $("#machinesview-single.single").find("div.single-container:visible").attr("id"); |
Also available in: Unified diff