 null) {
        return;
    }
    $.ajax({
        url: "{{ url_for("connect") }}",
        type: "POST",
        data: {
            serial: serial,
        },
        success: function (data) {
            if (data == null){
                $("#device").html("None");
                return;
            }
            $("#device").html(data);
        }
    });
}
function apply() {
    $.ajax({
        url: "{{ url_for("apply") }}",
        type: "POST",
        data: {
            data: JSON.stringify(_dum