Update script.js

This commit is contained in:
Bobby Dhanoolal 2023-12-19 13:52:50 -05:00 committed by GitHub
parent 2b9d32720b
commit 3c3db3747c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -223,7 +223,7 @@ $("#create-vm").click(function(){
const max_cpu = $(this).data('max_cpu');
const max_mem = $(this).data('max_mem');
const max_disk = $(this).data('max_disk');
var ssh_regex = new RegExp("ssh-rsa AAAA[0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?")
var ssh_regex = new RegExp("ssh-[a-z]+ [0-9A-Za-z+/]+[=]{0,3}( [^@]+@[^@]+)?");
var disk = document.getElementById('disk').value;
fetch(`/template/${template}/disk`, {
credentials: 'same-origin',
@ -1155,4 +1155,4 @@ $(".delete-disk").click(function(){
const vmid = $(this).data('vmid')
const disk = $(this).data('disk')
confirmDialog(`/vm/${vmid}/disk/${disk}/delete`, `Are you sure you want to delete ${disk}?`, "Delete", `Deleting ${disk}!`, `Unable to delete disk. Please try again later.`, `/vm/${vmid}`, true)
});
});