module.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <div ng-controller="ModuleManagerController">
  2. <div class="row" ng-hide="linking">
  3. <div class="col-sm-12">
  4. <p class="alert well-sm alert-success" ng-show="installedModule">Successfully Installed Module</p>
  5. <p class="alert well-sm alert-success" ng-show="removedModule">Successfully Removed Module</p>
  6. <div ng-hide="gotAvailableModules">
  7. <button class="btn btn-default" ng-click="getAvailableModules()" ng-disabled="loading">Get Modules </button>
  8. <img src="img/throbber.gif" ng-show="loading">
  9. <br/><br/>
  10. </div>
  11. <div class="alert well-sm alert-danger" ng-show="connectionError">
  12. {{ connectionError }}
  13. </div>
  14. <div class="panel panel-default" ng-show="gotAvailableModules">
  15. <div class="panel-heading">
  16. <h3 class="panel-title">Available Modules <button class="btn btn-default btn-xs btn-fixed-length pull-right" ng-click="getAvailableModules()">Refresh</button></h3>
  17. </div>
  18. <div class="table-responsive table-dropdown">
  19. <table class="table module-table table-hover">
  20. <thead>
  21. <tr>
  22. <th>Module</th>
  23. <th>Version</th>
  24. <th>Description</th>
  25. <th>Author</th>
  26. <th>Size</th>
  27. <th>Type</th>
  28. <th>Action</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. <tr ng-repeat="(moduleName, module) in availableModules" ng-if="module.installed === undefined">
  33. <td>
  34. {{ module['title'] }}
  35. </td>
  36. <td>
  37. {{ module['version'] }}
  38. </td>
  39. <td>
  40. {{ module['description'] }}
  41. </td>
  42. <td>
  43. {{ module['author'] }}
  44. </td>
  45. <td>
  46. {{ (module['size']/1024).toFixed(2) }}K
  47. </td>
  48. <td>
  49. {{ module['type'] }}
  50. </td>
  51. <td>
  52. <update-button ng-hide="module.installable" content="{name: moduleName, module: module, updating: true}"></update-button>
  53. <install-button ng-show="module.installable" content="{name: moduleName, module: module}"></install-button>
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <div class="row">
  63. <div class="col-sm-12 text-center" ng-if="linking">
  64. <img src="img/throbber.gif">
  65. </div>
  66. </div>
  67. <div class="row" ng-hide="linking">
  68. <div class="col-sm-12">
  69. <div class="panel panel-default">
  70. <div class="panel-heading">
  71. <h3 class="panel-title">Installed Modules</h3>
  72. </div>
  73. <div class="table-responsive table-dropdown">
  74. <table class="table table-hover">
  75. <thead>
  76. <tr>
  77. <th>Module</th>
  78. <th>Version</th>
  79. <th>Description</th>
  80. <th>Size</th>
  81. <th>Author</th>
  82. <th>Type</th>
  83. <th>Action</th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. <tr ng-repeat="(moduleName, module) in installedModules" ng-hide="(module['type'] == 'System')">
  88. <td>
  89. {{ module['title'] }}
  90. </td>
  91. <td>
  92. {{ module['version'] }}
  93. </td>
  94. <td>
  95. {{ module['description'] }}
  96. </td>
  97. <td>
  98. {{ module['size'] }}
  99. </td>
  100. <td>
  101. {{ module['author'] }}
  102. </td>
  103. <td>
  104. {{ module['type'] }}
  105. </td>
  106. <td>
  107. <button type="button" class="btn btn-danger btn-xs btn-fixed-length" ng-hide="(module['type'] === 'System')" ng-click="removeModule(moduleName)">Remove</button>
  108. </td>
  109. </tr>
  110. </tbody>
  111. </table>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>