index.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html ng-app="app">
  3. <head>
  4. <script src="js/angular.min.js"></script>
  5. <script src="js/app.js"></script>
  6. <style>
  7. body { width: 70%; margin:0px auto; }
  8. td { padding: 5px; }
  9. input[type=text] {background-color:white;color:black;}
  10. </style>
  11. </head>
  12. <body>
  13. <div ng-controller="main">
  14. <table>
  15. <tr>
  16. <th>ID</th>
  17. <th>Type</th>
  18. <th>Query</th>
  19. <th>Status</th>
  20. <th>Elapsed</th>
  21. <th>Output</th>
  22. </tr>
  23. <tr ng-repeat="l in list track by l.ID">
  24. <td> {{l.ID}} </td>
  25. <td> {{l.TYPE}} </td>
  26. <td> {{l.QUERY}} </td>
  27. <td> {{l.STATUS}} </td>
  28. <td> <p ng-if="l.STATUS!='DISCONNECTED'">{{l.ELAPSED}}</p> </td>
  29. <td>
  30. <div ng-repeat="o in l.OUT">
  31. <div ng-if="l.TYPE=='SEARCH'">
  32. <a ng-click="download(o)"> {{o }}</a>
  33. </div>
  34. <div ng-if="l.TYPE=='BOOK'">
  35. <a ng-href="/test/{{o}}" target="_blank">Download {{o }}</a>
  36. </div>
  37. </div>
  38. </td>
  39. </tr>
  40. </table>
  41. <div>
  42. Search books:
  43. Book:<input type="text" ng-model="book">
  44. Extension: <input type="text" ng-model="extension">
  45. <input type="button" value="search" ng-click="searchBook(book,extension)">
  46. </div>
  47. <input type="button" value="refresh" ng-click="getList()">
  48. </div>
  49. </body>
  50. </html>