mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
refactor(instances): the instance page drops scripts for console fields it no longer has
The console settings form lost its password, keymap and listen address
fields long ago (47009d4), but its scripts stayed: show_console(), which
nothing calls, change handlers for #console_passwd_gen, #console_passwd_clear
and #console_keymap_clear, and two blocks that preselected
#console_select_keymap and #console_select_listener_address. No template
defines any of these ids, so the code matched nothing. The instance list
drops a commented-out line that read #compute_select.
This commit is contained in:
parent
ca74c02c4f
commit
c58d323e21
2 changed files with 0 additions and 47 deletions
|
|
@ -44,7 +44,6 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<script>
|
||||
function goto_compute(compute) {
|
||||
//let compute = $("#compute_select").val();
|
||||
window.location.href = "{% url 'instances:create_instance_select_type' 1 %}".replace(1, compute);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,15 +178,6 @@
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function show_console() {
|
||||
if ($('#console_show_pass').attr('type') == 'password') {
|
||||
$('#console_show_pass').attr('type', 'text');
|
||||
} else {
|
||||
$('#console_show_pass').attr('type', 'password');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
function guess_mac_address(src_elem, net) {
|
||||
new_vname = $(src_elem).val();
|
||||
|
|
@ -229,46 +220,9 @@
|
|||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).on('change', '#console_passwd_gen', function () {
|
||||
if ($(this).prop('checked')) {
|
||||
$('#console_passwd_manual').hide();
|
||||
$('#console_passwd_clear').prop('checked', false);
|
||||
} else {
|
||||
$('#console_passwd_manual').show();
|
||||
}
|
||||
});
|
||||
$(document).on('change', '#console_passwd_clear', function () {
|
||||
if ($(this).prop('checked')) {
|
||||
$('#console_passwd_manual').hide();
|
||||
$('#console_passwd_gen').prop('checked', false);
|
||||
} else {
|
||||
$('#console_passwd_manual').show();
|
||||
}
|
||||
});
|
||||
$(document).on('change', '#console_keymap_clear', function () {
|
||||
if ($(this).prop('checked')) {
|
||||
$('#console_keymap_selection').hide();
|
||||
} else {
|
||||
$('#console_keymap_selection').show();
|
||||
}
|
||||
});
|
||||
$('#clone_name').on('input', function () {
|
||||
update_clone_disk_name($(this).val());
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// set current console keymap or fall back to default
|
||||
var keymap = "{{ instance.config_console_keymap }}";
|
||||
if (keymap != '') {
|
||||
$("#console_select_keymap option[value='" + keymap + "']").prop('selected', true);
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// set current console listen address or fall back to default
|
||||
var console_listener_address = "{{ instance.config_console_listener_address }}";
|
||||
if (console_listener_address != '') {
|
||||
$("#console_select_listener_address option[value='" + console_listener_address + "']").prop('selected', true);
|
||||
}
|
||||
});
|
||||
$(document).ready(function () {
|
||||
// get video model or fall back to default
|
||||
let video_model = "{{ instance.config_video_model }}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue