UPD
This commit is contained in:
parent
21856e85d6
commit
ce66e10115
|
@ -40,30 +40,30 @@ $(function() {
|
||||||
// displayData(cluster);
|
// displayData(cluster);
|
||||||
// };
|
// };
|
||||||
|
|
||||||
$('#mountForm').submit(function(event){
|
// $('#mountForm').submit(function(event){
|
||||||
|
//
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
$.ajax({
|
// $.ajax({
|
||||||
url:"mount",
|
// url:"mount",
|
||||||
data:$(this).serialize(),
|
// data:$(this).serialize(),
|
||||||
method:'POST',
|
// method:'POST',
|
||||||
success:function(data){
|
// success:function(data){
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
$('#mount').css('display', 'none');
|
// $('#mount').css('display', 'none');
|
||||||
$('input[type = "text"]').val('');
|
// $('input[type = "text"]').val('');
|
||||||
var res = JSON.parse(data);
|
// var res = JSON.parse(data);
|
||||||
message = "<h3>" + res["state"] + "</h3> <p>"+ res["message"] +"</p>";
|
// message = "<h3>" + res["state"] + "</h3> <p>"+ res["message"] +"</p>";
|
||||||
$("#rspContainer").css("display", "block");
|
// $("#rspContainer").css("display", "block");
|
||||||
$("#rsp").html(message)
|
// $("#rsp").html(message)
|
||||||
if (res["state"] == 'OK'){
|
// if (res["state"] == 'OK'){
|
||||||
$("#rspContainer").css("background-color", "#4CAF50" );
|
// $("#rspContainer").css("background-color", "#4CAF50" );
|
||||||
}
|
// }
|
||||||
else {
|
// else {
|
||||||
$("#rspContainer").css("background-color", "#f44336" )
|
// $("#rspContainer").css("background-color", "#f44336" )
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -95,27 +95,27 @@
|
||||||
// };
|
// };
|
||||||
// $('.tablink').css('display', 'block');
|
// $('.tablink').css('display', 'block');
|
||||||
//
|
//
|
||||||
// $('#mountForm').submit(function(event){
|
$('#mountForm').submit(function(event){
|
||||||
// event.preventDefault();
|
event.preventDefault();
|
||||||
// $.ajax({
|
$.ajax({
|
||||||
// url:"mount",
|
url:"mount",
|
||||||
// data:$(this).serialize(),
|
data:$(this).serialize(),
|
||||||
// method:'POST',
|
method:'POST',
|
||||||
// success:function(data){
|
success:function(data){
|
||||||
// $('#mount').css('display', 'none');
|
$('#mount').css('display', 'none');
|
||||||
// $('input[type = "text"]').val('');
|
$('input[type = "text"]').val('');
|
||||||
// var res = JSON.parse(data);
|
var res = JSON.parse(data);
|
||||||
// message = "<h3>" + res["state"] + "</h3> <p>"+ res["message"] +"</p>";
|
message = "<h3>" + res["state"] + "</h3> <p>"+ res["message"] +"</p>";
|
||||||
// $("#rspContainer").css("display", "block");
|
$("#rspContainer").css("display", "block");
|
||||||
// $("#rsp").html(message)
|
$("#rsp").html(message)
|
||||||
// if (res["state"] == 'OK'){
|
if (res["state"] == 'OK'){
|
||||||
// $("#rspContainer").css("background-color", "#4CAF50" );
|
$("#rspContainer").css("background-color", "#4CAF50" );
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// $("#rspContainer").css("background-color", "#f44336" )
|
$("#rspContainer").css("background-color", "#f44336" )
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
// })
|
})
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user