{% extends 'base_schedule_install.html' %} {% from 'host/common.html' import log_icon %} {% from 'host/common.html' import trace_icon %} {% block head_schedule_install %} region_id = "{{ host.region.id }}"; host_software_platform = "{{ host.software_platform }}"; host_software_version = "{{ host.software_version }}"; populate_supported_install_actions("{{ host.hostname }}"); // Display the selected install action (in Edit mode) $("#install_action").val("{{ form.install_action.data }}").trigger("change"); $('#form').submit(function(e) { on_final_submit(e, this, "{{ host.hostname }}"); // prevent the form from closing return false; }); $('.UTCDate').val(function(index, currentValue) { // Invalid date would be less than 15 characters if ($(this).text().length > 15) { if (use_utc_timezone) { $(this).text($(this).text() + ' UTC'); } else { $(this).text(convertToLocaleString($(this).text())); } } }); $("#dependency option").each(function() { var option = $(this).text(); var n = option.indexOf(' - '); if (n > -1) { if (use_utc_timezone) { $(this).html(option.substring(0, n) + ' - ' + option.substring(n + 3) + ' UTC'); } else { $(this).html(option.substring(0, n) + ' - ' + convertToLocaleString(option.substring(n + 3))); } } }); // In edit mode. if ($('#hidden_edit').val() == 'True') { $("#install_action").prop("disabled", true); } else { $("#install_action").prop("disabled", false); } $('#browse-install-history-button').on('click', function(e) { on_display_install_history_dialog(["{{ host.hostname }}"]); }); $('#browse-inactive-software-button').on('click', function(e) { invoke_host_software_dialog(FILTER_ACTIVATE); }); $('#browse-remove-software-button').on('click', function(e) { invoke_host_software_dialog(FILTER_REMOVE); }); $('#browse-deactivate-software-button').on('click', function(e) { invoke_host_software_dialog(FILTER_DEACTIVATE); }); function invoke_host_software_dialog(filter) { on_display_host_software_dialog(region_id, ["{{ host.hostname }}"], filter); } $('#browse-server-button').on('click', function(e) { on_display_server_software_dialog(region_id, ["{{ host.hostname }}"]); $('#server-dialog-title').html('> Host: {{ host.hostname }} ({{ host.software_platform | beautify_platform }}-{{ host.software_version }})'); }); $('#browse-cisco-button').on('click', function(e) { on_display_cisco_software_dialog(region_id, ["{{ host.hostname }}"]); }); {% endblock %} {% block main_schedule_install %}