login.html 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>PrometheusAlert | 登录控制中心</title>
  7. <!-- Google Font: Source Sans Pro -->
  8. <link rel="stylesheet" href="https://fonts.font.im/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
  9. <!-- Font Awesome -->
  10. <link rel="stylesheet" href="/static/plugins/fontawesome-free/css/all.min.css">
  11. <!-- icheck bootstrap -->
  12. <link rel="stylesheet" href="/static/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
  13. <!-- Theme style -->
  14. <link rel="stylesheet"href="/static/dist/css/adminlte.min.css">
  15. </head>
  16. <body class="hold-transition login-page">
  17. <div class="login-box">
  18. <div class="login-logo">
  19. <a href="#"><b>Prometheus</b>Alert</a>
  20. </div>
  21. <!-- /.login-logo -->
  22. <div class="card">
  23. <div class="card-body login-card-body">
  24. <p class="login-box-msg">登录控制中心</p>
  25. <form action="/login" method="post">
  26. <div class="input-group mb-3">
  27. <input type="text" id="uname" name="username" class="form-control" placeholder="Username">
  28. <div class="input-group-append">
  29. <div class="input-group-text">
  30. <span class="fas fa-envelope"></span>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="input-group mb-3">
  35. <input type="password" id="pwd" name="password" class="form-control" placeholder="Password">
  36. <div class="input-group-append">
  37. <div class="input-group-text">
  38. <span class="fas fa-lock"></span>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="row">
  43. <div class="col-8">
  44. <div class="icheck-primary">
  45. <input type="checkbox" id="remember" name="autologin" checked>
  46. <label for="remember">
  47. Remember Me
  48. </label>
  49. </div>
  50. </div>
  51. <!-- /.col -->
  52. <div class="col-4">
  53. <button type="submit" class="btn btn-primary btn-block" onclick="return checkinput();">登录</button>
  54. </div>
  55. <!-- /.col -->
  56. </div>
  57. </form>
  58. <div class="social-auth-links text-center mb-3">
  59. {{if .loginerror}}
  60. <p>Username or Password For Login Error</p>
  61. {{end}}
  62. </div>
  63. <!-- /.social-auth-links -->
  64. </div>
  65. <!-- /.login-card-body -->
  66. </div>
  67. </div>
  68. <!-- /.login-box -->
  69. <!-- jQuery -->
  70. <script src="/static/plugins/jquery/jquery.min.js"></script>
  71. <!-- Bootstrap 4 -->
  72. <script src="/static/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
  73. <!-- AdminLTE App -->
  74. <script src="/static/dist/js/adminlte.min.js"></script>
  75. <script type="text/javascript">
  76. function checkinput(){
  77. var uname=document.getElementById("uname");
  78. var pwd=document.getElementById("pwd");
  79. if (uname.value.length==0){
  80. alert('用户名不能为空');
  81. return false
  82. };
  83. if (pwd.value.length==0){
  84. alert('密码不能为空');
  85. return false
  86. };
  87. return true
  88. }
  89. </script>
  90. </body>
  91. </html>