test.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. {{template "main" .}}
  2. <!-- Navbar -->
  3. <nav class="main-header navbar navbar-expand navbar-white navbar-light">
  4. <!-- Left navbar links -->
  5. <ul class="navbar-nav">
  6. <li class="nav-item">
  7. <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
  8. </li>
  9. <li class="nav-item d-none d-sm-inline-block">
  10. <a href="/test" class="nav-link">告警管理</a>
  11. </li>
  12. </ul>
  13. </nav>
  14. <!-- /.navbar -->
  15. <!-- Content Wrapper. Contains page content -->
  16. <div class="content-wrapper">
  17. <!-- Content Header (Page header) -->
  18. <section class="content-header">
  19. <div class="container-fluid">
  20. <div class="row mb-2">
  21. <div class="col-sm-6">
  22. <h1>告警测试</h1>
  23. </div>
  24. </div>
  25. </div><!-- /.container-fluid -->
  26. </section>
  27. <!-- Main content -->
  28. <section class="content">
  29. <!-- Default box -->
  30. <div class="card">
  31. <div class="card-header">
  32. <h3 class="card-title" style="color:red">** 告警测试功能主要是通过发送测试消息校验配置文件的正确性</h3>
  33. <div class="card-tools">
  34. <button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse">
  35. <i class="fas fa-minus"></i>
  36. </button>
  37. <button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
  38. <i class="fas fa-times"></i>
  39. </button>
  40. </div>
  41. </div>
  42. <div class="card-body">
  43. <table class="table table-hover">
  44. <thead>
  45. <tr>
  46. <th>ID</th>
  47. <th>名称</th>
  48. <th>操作</th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <tr>
  53. <th>1</th>
  54. <th>钉钉</th>
  55. <th>
  56. <a id="dd" class="btn btn-default btn-flat">
  57. <i class="fas fa-bullhorn"></i> 告警测试
  58. </a>
  59. </th>
  60. </tr>
  61. <tr>
  62. <th>2</th>
  63. <th>企业微信</th>
  64. <th>
  65. <a id="wx" class="btn btn-default btn-flat">
  66. <i class="fas fa-bullhorn"></i> 告警测试
  67. </a>
  68. </th>
  69. </tr>
  70. <tr>
  71. <th>3</th>
  72. <th>飞书</th>
  73. <th>
  74. <a id="fs" class="btn btn-default btn-flat">
  75. <i class="fas fa-bullhorn"></i> 告警测试
  76. </a>
  77. </th>
  78. </tr>
  79. <tr>
  80. <th>4</th>
  81. <th>腾讯云语音电话</th>
  82. <th>
  83. <a id="txdh" class="btn btn-default btn-flat">
  84. <i class="fas fa-bullhorn"></i> 告警测试
  85. </a>
  86. </th>
  87. </tr>
  88. <tr>
  89. <th>5</th>
  90. <th>腾讯云短信</th>
  91. <th>
  92. <a id="txdx" class="btn btn-default btn-flat">
  93. <i class="fas fa-bullhorn"></i> 告警测试
  94. </a>
  95. </th>
  96. </tr>
  97. <tr>
  98. <th>6</th>
  99. <th>阿里云语音电话</th>
  100. <th>
  101. <a id="alydh" class="btn btn-default btn-flat">
  102. <i class="fas fa-bullhorn"></i> 告警测试
  103. </a>
  104. </th>
  105. </tr>
  106. <tr>
  107. <th>7</th>
  108. <th>阿里云短信</th>
  109. <th>
  110. <a id="alydx" class="btn btn-default btn-flat">
  111. <i class="fas fa-bullhorn"></i> 告警测试
  112. </a>
  113. </th>
  114. </tr>
  115. <tr>
  116. <th>8</th>
  117. <th>容联云语音电话</th>
  118. <th>
  119. <a id="rlydh" class="btn btn-default btn-flat">
  120. <i class="fas fa-bullhorn"></i> 告警测试
  121. </a>
  122. </th>
  123. </tr>
  124. <tr>
  125. <th>9</th>
  126. <th>华为云短信</th>
  127. <th>
  128. <a id="hwdx" class="btn btn-default btn-flat">
  129. <i class="fas fa-bullhorn"></i> 告警测试
  130. </a>
  131. </th>
  132. </tr>
  133. <tr>
  134. <th>10</th>
  135. <th>Email</th>
  136. <th>
  137. <a id="email" class="btn btn-default btn-flat">
  138. <i class="fas fa-bullhorn"></i> 告警测试
  139. </a>
  140. </th>
  141. </tr>
  142. <tr>
  143. <th>11</th>
  144. <th>七陌短信</th>
  145. <th>
  146. <a id="7moordx" class="btn btn-default btn-flat">
  147. <i class="fas fa-bullhorn"></i> 告警测试
  148. </a>
  149. </th>
  150. </tr>
  151. <tr>
  152. <th>12</th>
  153. <th>七陌语音电话</th>
  154. <th>
  155. <a id="7moordh" class="btn btn-default btn-flat">
  156. <i class="fas fa-bullhorn"></i> 告警测试
  157. </a>
  158. </th>
  159. </tr>
  160. <tr>
  161. <th>13</th>
  162. <th>Telegram</th>
  163. <th>
  164. <a id="tg" class="btn btn-default btn-flat">
  165. <i class="fas fa-bullhorn"></i> 告警测试
  166. </a>
  167. </th>
  168. </tr>
  169. <tr>
  170. <th>14</th>
  171. <th>企业微信应用</th>
  172. <th>
  173. <a id="workwechat" class="btn btn-default btn-flat">
  174. <i class="fas fa-bullhorn"></i> 告警测试
  175. </a>
  176. </th>
  177. </tr>
  178. <tr>
  179. <th>15</th>
  180. <th>百度云短信</th>
  181. <th>
  182. <a id="bddx" class="btn btn-default btn-flat">
  183. <i class="fas fa-bullhorn"></i> 告警测试
  184. </a>
  185. </th>
  186. </tr>
  187. <tr>
  188. <th>16</th>
  189. <th>百度Hi(如流)</th>
  190. <th>
  191. <a id="bdrl" class="btn btn-default btn-flat">
  192. <i class="fas fa-bullhorn"></i> 告警测试
  193. </a>
  194. </th>
  195. </tr>
  196. <tr>
  197. <th>17</th>
  198. <th>Bark(iPhone推送)</th>
  199. <th>
  200. <a id="bark" class="btn btn-default btn-flat">
  201. <i class="fas fa-bullhorn"></i> 告警测试
  202. </a>
  203. </th>
  204. </tr>
  205. <tr>
  206. <th>18</th>
  207. <th>语音播报</th>
  208. <th>
  209. <a id="voice" class="btn btn-default btn-flat">
  210. <i class="fas fa-bullhorn"></i> 告警测试
  211. </a>
  212. </th>
  213. </tr>
  214. <tr>
  215. <th>19</th>
  216. <th>飞书机器人应用</th>
  217. <th>
  218. <a id="fsapp" class="btn btn-default btn-flat">
  219. <i class="fas fa-bullhorn"></i> 告警测试
  220. </a>
  221. </th>
  222. </tr>
  223. </tbody>
  224. </table>
  225. </div>
  226. <!-- /.card-body -->
  227. <div class="card-footer">
  228. 短信和电话请提前配置好app.conf中的[defaultphone]配置项
  229. </div>
  230. <!-- /.card-footer-->
  231. </div>
  232. <!-- /.card -->
  233. </section>
  234. <!-- /.content -->
  235. </div>
  236. <!-- /.content-wrapper -->
  237. {{template "endhtml"}}
  238. <script>
  239. $(function(){
  240. $(".btn").click(function(){
  241. $.post("/alerttest",{mtype:$(this).attr("id")},function(result){
  242. alert(result);
  243. });
  244. });
  245. })
  246. </script>
  247. {{template "jshtml"}}