updateComplete.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" href="../../script/semantic/semantic.min.css">
  6. <script type="text/javascript" src="../../script/jquery.min.js"></script>
  7. <script type="text/javascript" src="../../script/semantic/semantic.min.js"></script>
  8. <script type="text/javascript" src="../../script/ao_module.js"></script>
  9. <title>Storage Pool Editor</title>
  10. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  11. <style>
  12. body{
  13. background-color: rgba(0,0,0,0);
  14. }
  15. </style>
  16. </head>
  17. <body>
  18. <div class="ui basic modal">
  19. <div class="ui icon header">
  20. <i class="green checkmark icon"></i>
  21. Setting Updated
  22. </div>
  23. <div class="content">
  24. <p>File System Handler options updated. Some options might require a reboot to take effect.</p>
  25. </div>
  26. <div class="actions">
  27. <div id="reloadpoolbtn" class="ui ok inverted button" onclick="reloadPool()">
  28. Reload Pool and Exit
  29. </div>
  30. <div class="ui green ok inverted button" onclick="handleExit()">
  31. Exit
  32. </div>
  33. </div>
  34. </div>
  35. <div id="loader" class="ui active dimmer" style="display: none;">
  36. <div class="ui text loader">Reloading Storage Pool</div>
  37. </div>
  38. <script>
  39. $(".ui.modal").modal("show");
  40. $(".ui.modal").modal({
  41. backdrop: 'static',
  42. keyboard: false
  43. });
  44. $('.ui.modal').modal("set active",false);
  45. if (window.location.hash.length == 0){
  46. //Invalid usage.
  47. $("#reloadpoolbtn").remove();
  48. }
  49. function reloadPool(){
  50. var groupname = window.location.hash.substr(1);
  51. $("#loader").show();
  52. $.ajax({
  53. url: "../../system/storage/pool/reload",
  54. data: {pool: groupname},
  55. success: function(data){
  56. console.log(data);
  57. setTimeout(function(){
  58. handleExit();
  59. },1000);
  60. },
  61. error: function(){
  62. alert("Reload Failed: Server is not responding")
  63. }
  64. });
  65. }
  66. function handleExit(){
  67. ao_module_parentCallback(true);
  68. ao_module_close();
  69. }
  70. </script>
  71. </body>
  72. </html>