cronSettings.jade 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. template(name="cronSettings")
  2. ul#cron-setting.setting-detail
  3. li
  4. h3 {{_ 'cron-migrations'}}
  5. .form-group
  6. label {{_ 'migration-status'}}
  7. .status-indicator
  8. span.status-label {{_ 'status'}}:
  9. span.status-value {{migrationStatus}}
  10. .progress-section
  11. .progress
  12. .progress-bar(role="progressbar" style="width: {{migrationProgress}}%" aria-valuenow="{{migrationProgress}}" aria-valuemin="0" aria-valuemax="100")
  13. | {{migrationProgress}}%
  14. .progress-text
  15. | {{migrationProgress}}% {{_ 'complete'}}
  16. .form-group
  17. button.js-start-all-migrations.btn.btn-primary {{_ 'start-all-migrations'}}
  18. button.js-pause-all-migrations.btn.btn-warning {{_ 'pause-all-migrations'}}
  19. button.js-stop-all-migrations.btn.btn-danger {{_ 'stop-all-migrations'}}
  20. li
  21. h3 {{_ 'board-operations'}}
  22. .form-group
  23. label {{_ 'scheduled-board-operations'}}
  24. button.js-schedule-board-cleanup.btn.btn-primary {{_ 'schedule-board-cleanup'}}
  25. button.js-schedule-board-archive.btn.btn-warning {{_ 'schedule-board-archive'}}
  26. button.js-schedule-board-backup.btn.btn-info {{_ 'schedule-board-backup'}}
  27. li
  28. h3 {{_ 'cron-jobs'}}
  29. .form-group
  30. label {{_ 'active-cron-jobs'}}
  31. each cronJobs
  32. .job-item
  33. .job-info
  34. .job-name {{name}}
  35. .job-schedule {{schedule}}
  36. .job-description {{description}}
  37. .job-actions
  38. button.js-pause-job.btn.btn-sm.btn-warning(data-job-id="{{_id}}") {{_ 'pause'}}
  39. button.js-delete-job.btn.btn-sm.btn-danger(data-job-id="{{_id}}") {{_ 'delete'}}
  40. .add-job-section
  41. button.js-add-cron-job.btn.btn-success {{_ 'add-cron-job'}}
  42. template(name="cronMigrations")
  43. .cron-migrations
  44. .migration-header
  45. h2
  46. | 🗄️
  47. | {{_ 'database-migrations'}}
  48. .migration-controls
  49. button.btn.btn-primary.js-start-all-migrations
  50. | ▶️
  51. | {{_ 'start-all-migrations'}}
  52. button.btn.btn-warning.js-pause-all-migrations
  53. | ⏸️
  54. | {{_ 'pause-all-migrations'}}
  55. button.btn.btn-danger.js-stop-all-migrations
  56. | ⏹️
  57. | {{_ 'stop-all-migrations'}}
  58. .migration-progress
  59. .progress-overview
  60. .progress-bar
  61. .progress-fill(style="width: {{migrationProgress}}%")
  62. .progress-text {{migrationProgress}}%
  63. .progress-label {{_ 'overall-progress'}}
  64. .current-step
  65. | ⚙️
  66. | {{migrationCurrentStep}}
  67. .migration-status
  68. | ℹ️
  69. | {{migrationStatus}}
  70. .migration-steps
  71. h3 {{_ 'migration-steps'}}
  72. .steps-list
  73. each migrationSteps
  74. .migration-step(class="{{#if completed}}completed{{/if}}" class="{{#if isCurrentStep}}current{{/if}}")
  75. .step-header
  76. .step-icon
  77. if completed
  78. | ✅
  79. else if isCurrentStep
  80. | ⚙️
  81. else
  82. | ⭕
  83. .step-info
  84. .step-name {{name}}
  85. .step-description {{description}}
  86. .step-progress
  87. if completed
  88. .progress-text 100%
  89. else if isCurrentStep
  90. .progress-text {{progress}}%
  91. else
  92. .progress-text 0%
  93. if isCurrentStep
  94. .step-progress-bar
  95. .progress-fill(style="width: {{progress}}%")
  96. template(name="cronBoardOperations")
  97. .cron-board-operations
  98. .board-operations-header
  99. h2
  100. | 📋
  101. | {{_ 'board-operations'}}
  102. .board-operations-controls
  103. button.btn.btn-success.js-refresh-board-operations
  104. | 🔄
  105. | {{_ 'refresh'}}
  106. button.btn.btn-primary.js-start-test-operation
  107. | ▶️
  108. | {{_ 'start-test-operation'}}
  109. button.btn.btn-info.js-force-board-scan
  110. | 🔍
  111. | {{_ 'force-board-scan'}}
  112. .board-operations-stats
  113. .stats-grid
  114. .stat-item
  115. .stat-value {{operationStats.total}}
  116. .stat-label {{_ 'total-operations'}}
  117. .stat-item
  118. .stat-value {{operationStats.running}}
  119. .stat-label {{_ 'running'}}
  120. .stat-item
  121. .stat-value {{operationStats.completed}}
  122. .stat-label {{_ 'completed'}}
  123. .stat-item
  124. .stat-value {{operationStats.error}}
  125. .stat-label {{_ 'errors'}}
  126. .stat-item
  127. .stat-value {{queueStats.pending}}
  128. .stat-label {{_ 'pending'}}
  129. .stat-item
  130. .stat-value {{queueStats.maxConcurrent}}
  131. .stat-label {{_ 'max-concurrent'}}
  132. .stat-item
  133. .stat-value {{boardMigrationStats.unmigratedCount}}
  134. .stat-label {{_ 'unmigrated-boards'}}
  135. .stat-item
  136. .stat-value {{boardMigrationStats.isScanning}}
  137. .stat-label {{_ 'scanning-status'}}
  138. .system-resources
  139. .resource-item
  140. .resource-label {{_ 'cpu-usage'}}
  141. .resource-bar
  142. .resource-fill(style="width: {{systemResources.cpuUsage}}%")
  143. .resource-value {{systemResources.cpuUsage}}%
  144. .resource-item
  145. .resource-label {{_ 'memory-usage'}}
  146. .resource-bar
  147. .resource-fill(style="width: {{systemResources.memoryUsage}}%")
  148. .resource-value {{systemResources.memoryUsage}}%
  149. .resource-item
  150. .resource-label {{_ 'cpu-cores'}}
  151. .resource-value {{systemResources.cpuCores}}
  152. .board-operations-search
  153. .search-box
  154. input.form-control.js-search-board-operations(type="text" placeholder="{{_ 'search-boards-or-operations'}}")
  155. | 🔍.search-icon
  156. .board-operations-list
  157. .operations-header
  158. h3 {{_ 'board-operations'}} ({{pagination.total}})
  159. .pagination-info
  160. | {{_ 'showing'}} {{pagination.start}} - {{pagination.end}} {{_ 'of'}} {{pagination.total}}
  161. .operations-table
  162. table.table.table-striped
  163. thead
  164. tr
  165. th {{_ 'board-id'}}
  166. th {{_ 'operation-type'}}
  167. th {{_ 'status'}}
  168. th {{_ 'progress'}}
  169. th {{_ 'start-time'}}
  170. th {{_ 'duration'}}
  171. th {{_ 'actions'}}
  172. tbody
  173. each boardOperations
  174. tr
  175. td
  176. .board-id {{boardId}}
  177. td
  178. .operation-type {{operationType}}
  179. td
  180. span.status-badge(class="status-{{status}}") {{status}}
  181. td
  182. .progress-container
  183. .progress-bar
  184. .progress-fill(style="width: {{progress}}%")
  185. .progress-text {{progress}}%
  186. td {{formatDateTime startTime}}
  187. td {{formatDuration startTime endTime}}
  188. td
  189. .btn-group
  190. if isRunning
  191. button.btn.btn-sm.btn-warning.js-pause-operation(data-operation="{{id}}")
  192. | ⏸️
  193. else
  194. button.btn.btn-sm.btn-success.js-resume-operation(data-operation="{{id}}")
  195. | ▶️
  196. button.btn.btn-sm.btn-danger.js-stop-operation(data-operation="{{id}}")
  197. | ⏹️
  198. button.btn.btn-sm.btn-info.js-view-details(data-operation="{{id}}")
  199. | ℹ️
  200. .pagination
  201. if pagination.hasPrev
  202. button.btn.btn-sm.btn-default.js-prev-page
  203. | ◀️
  204. | {{_ 'previous'}}
  205. .page-info
  206. | {{_ 'page'}} {{pagination.page}} {{_ 'of'}} {{pagination.totalPages}}
  207. if pagination.hasNext
  208. button.btn.btn-sm.btn-default.js-next-page
  209. | {{_ 'next'}}
  210. | ▶️
  211. template(name="cronJobs")
  212. .cron-jobs
  213. .jobs-header
  214. h2
  215. | ⏰
  216. | {{_ 'cron-jobs'}}
  217. .jobs-controls
  218. button.btn.btn-success.js-refresh-jobs
  219. | 🔄
  220. | {{_ 'refresh'}}
  221. .jobs-list
  222. table.table.table-striped
  223. thead
  224. tr
  225. th {{_ 'job-name'}}
  226. th {{_ 'schedule'}}
  227. th {{_ 'status'}}
  228. th {{_ 'last-run'}}
  229. th {{_ 'next-run'}}
  230. th {{_ 'actions'}}
  231. tbody
  232. each cronJobs
  233. tr
  234. td {{name}}
  235. td {{schedule}}
  236. td
  237. span.status-badge(class="status-{{status}}") {{status}}
  238. td {{formatDate lastRun}}
  239. td {{formatDate nextRun}}
  240. td
  241. .btn-group
  242. if isRunning
  243. button.btn.btn-sm.btn-warning.js-pause-job(data-job="{{name}}")
  244. | ⏸️
  245. else
  246. button.btn.btn-sm.btn-success.js-start-job(data-job="{{name}}")
  247. | ▶️
  248. button.btn.btn-sm.btn-danger.js-stop-job(data-job="{{name}}")
  249. | ⏹️
  250. button.btn.btn-sm.btn-danger.js-remove-job(data-job="{{name}}")
  251. | 🗑️
  252. template(name="cronAddJob")
  253. .cron-add-job
  254. .add-job-header
  255. h2
  256. | ➕
  257. | {{_ 'add-cron-job'}}
  258. .add-job-form
  259. form.js-add-cron-job-form
  260. .form-group
  261. label(for="job-name") {{_ 'job-name'}}
  262. input.form-control#job-name(type="text" name="name" required)
  263. .form-group
  264. label(for="job-description") {{_ 'job-description'}}
  265. textarea.form-control#job-description(name="description" rows="3")
  266. .form-group
  267. label(for="job-schedule") {{_ 'schedule'}}
  268. select.form-control#job-schedule(name="schedule")
  269. option(value="every 1 minute") {{_ 'every-1-minute'}}
  270. option(value="every 5 minutes") {{_ 'every-5-minutes'}}
  271. option(value="every 10 minutes") {{_ 'every-10-minutes'}}
  272. option(value="every 30 minutes") {{_ 'every-30-minutes'}}
  273. option(value="every 1 hour") {{_ 'every-1-hour'}}
  274. option(value="every 6 hours") {{_ 'every-6-hours'}}
  275. option(value="every 1 day") {{_ 'every-1-day'}}
  276. option(value="once") {{_ 'run-once'}}
  277. .form-group
  278. label(for="job-weight") {{_ 'weight'}}
  279. input.form-control#job-weight(type="number" name="weight" value="1" min="1" max="10")
  280. .form-actions
  281. button.btn.btn-primary(type="submit")
  282. | ➕
  283. | {{_ 'add-job'}}
  284. button.btn.btn-default.js-cancel-add-job
  285. | ❌
  286. | {{_ 'cancel'}}