task_list.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
  4. layout:decorator="base">
  5. <head>
  6. <link rel="stylesheet" href="/static/css/applications.css" type="text/css"/>
  7. <!-- dataTables -->
  8. <link rel="stylesheet" type="text/css"
  9. href="/static/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css"/>
  10. <!-- Select2 -->
  11. <link rel="stylesheet" type="text/css" href="/static/AdminLTE/bower_components/select2/dist/css/select2.min.css"/>
  12. </head>
  13. <body>
  14. <div layout:fragment="mainbody">
  15. <aside class="main-sidebar">
  16. <section class="sidebar">
  17. <div class="user-panel">
  18. <div class="pull-left image">
  19. <img src="/static/images/avatar/avatar-admin.jpg" class="img-circle" alt="User Image" />
  20. </div>
  21. <div class="pull-left info">
  22. <p>Admin</p>
  23. <a href="#">
  24. <i class="fa fa-circle text-success"></i>
  25. Online
  26. </a>
  27. </div>
  28. </div>
  29. <!-- Search form -->
  30. <form action="#" method="get" class="sidebar-form">
  31. <div class="input-group">
  32. <input type="text" name="q" class="form-control" placeholder="Search..." />
  33. <span class="input-group-btn">
  34. <button type="submit" name="search" id="search-btn" class="btn btn-flat">
  35. <i class="fa fa-search"></i>
  36. </button>
  37. </span>
  38. </div>
  39. </form>
  40. <!-- Sidebar Menu -->
  41. <ul class="sidebar-menu tree" data-widget="tree">
  42. {% for task in app_list %}
  43. <li>
  44. <a href="/task?id={{ task.id }}">
  45. <i class="fa fa-link"></i>
  46. </a>
  47. </li>
  48. {% endfor %}
  49. </ul>
  50. </section>
  51. </aside>
  52. <!-- Main Content -->
  53. <div class="content-wrapper" style="min-height: 691px;">
  54. <section class="content-header">
  55. <h1>全部应用</h1>
  56. <ol class="breadcrumb">
  57. <li class="active">
  58. <a href="/home">
  59. <i class="fa fa-dashboard"></i>
  60. 全部应用
  61. </a>
  62. </li>
  63. </ol>
  64. </section>
  65. <!-- Main Content -->
  66. <section class="content container-fluid">
  67. <!-- <div id="task-list-search" class="input-group col-md-6">
  68. <input type="text" class="form-control" placeholder="Search for application">
  69. <span class="input-group-btn">
  70. <button class="btn btn-default" type="button" id="task-search-btn">Search</button>
  71. </span>
  72. </div> -->
  73. <table id="task-list" class="table table-striped text-center" style="margin-top: 10px">
  74. <thead><tr>
  75. <th></th>
  76. <th>应用名</th>
  77. <th>版本</th>
  78. <th>审核状态</th>
  79. <th>开始时间</th>
  80. <th>结束时间</th>
  81. <th>审核进度</th>
  82. <th>未审核数</th>
  83. </tr></thead>
  84. <tbody>
  85. <th:block th:each="task : ${tasks}">
  86. <tr>
  87. <td><img th:src="${task.icon}" style="width: 25px; height: 25px;" /></td>
  88. <td><b><a href="#" id="task-name" th:text="${task.name}">{{ task.name }}</a></b></td>
  89. <td th:text="${task.version}"></td>
  90. <td th:if="${task.status == 0}"><span class="label label-info">审核中</span></td>
  91. <td th:if="${task.status == 1}"><span class="label label-success">审核结束</span></td>
  92. <td th:text="${task.startTime}">{{ task.print_start_time }}</td>
  93. <td th:text="${task.endTime}">{{ task.print_end_time }}</td>
  94. <td style="width: 200px;">
  95. <a th:href="'/task_detail?examId=' + ${task.examId} + '&amp;caseId=' + ${task.caseId}">
  96. <div class="progress">
  97. <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar"
  98. th:style="'width: ' + ${(1 - task.numOfUndeal*1.0/task.numOfTotalBug) * 100}+'%'"
  99. data-placement="bottom" data-toggle="tooltip" th:title="|${task.numOfTotalBug - task.numOfUndeal}份报告已经被审核|">
  100. </div>
  101. <div class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar"
  102. th:style="'width: ' + ${(task.numOfUndeal*1.0/task.numOfTotalBug) * 100}+'%'"
  103. data-placement="bottom" data-toggle="tooltip" th:title="|${task.numOfUndeal}份报告还未被审核|">
  104. </div>
  105. </div>
  106. </a>
  107. </td>
  108. <td><span class="badge"><a th:href="'/task_detail?examId=' + ${task.examId} + '&amp;caseId=' + ${task.caseId}" style="color: #fff;" th:text="${task.numOfUndeal}"></a></span></td>
  109. </tr>
  110. </th:block>
  111. </tbody>
  112. </table><!-- table -->
  113. </section>
  114. </div>
  115. </div>
  116. </body>
  117. </html>
  118. <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
  119. <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
  120. <script src="/static/AdminLTE/bower_components/select2/dist/js/select2.min.js"></script>
  121. <script type="text/javascript">
  122. $(document).ready(function(){
  123. $('[data-toggle="tooltip"]').tooltip();
  124. var taskListTable = $('#task-list').DataTable({
  125. searching: true,
  126. pageLength: 25
  127. });
  128. });
  129. </script>