attachmentSettings.jade 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. template(name="attachmentSettings")
  2. .setting-content.attachment-settings-content
  3. unless currentUser.isAdmin
  4. | {{_ 'error-notAuthorized'}}
  5. else
  6. .content-body
  7. .side-menu
  8. ul
  9. li
  10. a.js-attachment-storage-settings(data-id="storage-settings")
  11. i.fa.fa-cog
  12. | {{_ 'attachment-storage-settings'}}
  13. li
  14. a.js-attachment-migration(data-id="attachment-migration")
  15. i.fa.fa-arrow-right
  16. | {{_ 'attachment-migration'}}
  17. li
  18. a.js-attachment-monitoring(data-id="attachment-monitoring")
  19. i.fa.fa-chart-line
  20. | {{_ 'attachment-monitoring'}}
  21. .main-body
  22. if loading.get
  23. +spinner
  24. else if showStorageSettings.get
  25. +storageSettings
  26. else if showMigration.get
  27. +attachmentMigration
  28. else if showMonitoring.get
  29. +attachmentMonitoring
  30. template(name="storageSettings")
  31. .storage-settings
  32. h3 {{_ 'attachment-storage-configuration'}}
  33. .storage-config-section
  34. h4 {{_ 'filesystem-storage'}}
  35. .form-group
  36. label {{_ 'writable-path'}}
  37. input.wekan-form-control#filesystem-path(type="text" value="{{filesystemPath}}" readonly)
  38. small.form-text.text-muted {{_ 'filesystem-path-description'}}
  39. .form-group
  40. label {{_ 'attachments-path'}}
  41. input.wekan-form-control#attachments-path(type="text" value="{{attachmentsPath}}" readonly)
  42. small.form-text.text-muted {{_ 'attachments-path-description'}}
  43. .form-group
  44. label {{_ 'avatars-path'}}
  45. input.wekan-form-control#avatars-path(type="text" value="{{avatarsPath}}" readonly)
  46. small.form-text.text-muted {{_ 'avatars-path-description'}}
  47. .storage-config-section
  48. h4 {{_ 'mongodb-gridfs-storage'}}
  49. .form-group
  50. label {{_ 'gridfs-enabled'}}
  51. input.wekan-form-control#gridfs-enabled(type="checkbox" checked="{{gridfsEnabled}}" disabled)
  52. small.form-text.text-muted {{_ 'gridfs-enabled-description'}}
  53. .storage-config-section
  54. h4 {{_ 's3-minio-storage'}}
  55. .form-group
  56. label {{_ 's3-enabled'}}
  57. input.wekan-form-control#s3-enabled(type="checkbox" checked="{{s3Enabled}}" disabled)
  58. small.form-text.text-muted {{_ 's3-enabled-description'}}
  59. .form-group
  60. label {{_ 's3-endpoint'}}
  61. input.wekan-form-control#s3-endpoint(type="text" value="{{s3Endpoint}}" readonly)
  62. small.form-text.text-muted {{_ 's3-endpoint-description'}}
  63. .form-group
  64. label {{_ 's3-bucket'}}
  65. input.wekan-form-control#s3-bucket(type="text" value="{{s3Bucket}}" readonly)
  66. small.form-text.text-muted {{_ 's3-bucket-description'}}
  67. .form-group
  68. label {{_ 's3-region'}}
  69. input.wekan-form-control#s3-region(type="text" value="{{s3Region}}" readonly)
  70. small.form-text.text-muted {{_ 's3-region-description'}}
  71. .form-group
  72. label {{_ 's3-access-key'}}
  73. input.wekan-form-control#s3-access-key(type="text" placeholder="{{_ 's3-access-key-placeholder'}}" readonly)
  74. small.form-text.text-muted {{_ 's3-access-key-description'}}
  75. .form-group
  76. label {{_ 's3-secret-key'}}
  77. input.wekan-form-control#s3-secret-key(type="password" placeholder="{{_ 's3-secret-key-placeholder'}}")
  78. small.form-text.text-muted {{_ 's3-secret-key-description'}}
  79. .form-group
  80. label {{_ 's3-ssl-enabled'}}
  81. input.wekan-form-control#s3-ssl-enabled(type="checkbox" checked="{{s3SslEnabled}}" disabled)
  82. small.form-text.text-muted {{_ 's3-ssl-enabled-description'}}
  83. .form-group
  84. label {{_ 's3-port'}}
  85. input.wekan-form-control#s3-port(type="number" value="{{s3Port}}" readonly)
  86. small.form-text.text-muted {{_ 's3-port-description'}}
  87. .storage-actions
  88. button.js-test-s3-connection.btn.btn-secondary {{_ 'test-s3-connection'}}
  89. button.js-save-s3-settings.btn.btn-primary {{_ 'save-s3-settings'}}
  90. template(name="attachmentMigration")
  91. .attachment-migration
  92. h3 {{_ 'attachment-migration'}}
  93. .migration-controls
  94. .form-group
  95. label {{_ 'migration-batch-size'}}
  96. input.wekan-form-control#migration-batch-size(type="number" value="{{migrationBatchSize}}" min="1" max="100")
  97. small.form-text.text-muted {{_ 'migration-batch-size-description'}}
  98. .form-group
  99. label {{_ 'migration-delay-ms'}}
  100. input.wekan-form-control#migration-delay-ms(type="number" value="{{migrationDelayMs}}" min="100" max="10000")
  101. small.form-text.text-muted {{_ 'migration-delay-ms-description'}}
  102. .form-group
  103. label {{_ 'migration-cpu-threshold'}}
  104. input.wekan-form-control#migration-cpu-threshold(type="number" value="{{migrationCpuThreshold}}" min="10" max="90")
  105. small.form-text.text-muted {{_ 'migration-cpu-threshold-description'}}
  106. .migration-actions
  107. .migration-buttons
  108. button.js-migrate-all-to-filesystem.btn.btn-primary {{_ 'migrate-all-to-filesystem'}}
  109. button.js-migrate-all-to-gridfs.btn.btn-primary {{_ 'migrate-all-to-gridfs'}}
  110. button.js-migrate-all-to-s3.btn.btn-primary {{_ 'migrate-all-to-s3'}}
  111. .migration-controls
  112. button.js-pause-migration.btn.btn-warning {{_ 'pause-migration'}}
  113. button.js-resume-migration.btn.btn-success {{_ 'resume-migration'}}
  114. button.js-stop-migration.btn.btn-danger {{_ 'stop-migration'}}
  115. .migration-progress
  116. h4 {{_ 'migration-progress'}}
  117. .progress
  118. .progress-bar(role="progressbar" style="width: {{migrationProgress}}%" aria-valuenow="{{migrationProgress}}" aria-valuemin="0" aria-valuemax="100")
  119. | {{migrationProgress}}%
  120. .migration-stats
  121. .stat-item
  122. span.label {{_ 'total-attachments'}}:
  123. span.value {{totalAttachments}}
  124. .stat-item
  125. span.label {{_ 'migrated-attachments'}}:
  126. span.value {{migratedAttachments}}
  127. .stat-item
  128. span.label {{_ 'remaining-attachments'}}:
  129. span.value {{remainingAttachments}}
  130. .stat-item
  131. span.label {{_ 'migration-status'}}:
  132. span.value {{migrationStatus}}
  133. .migration-log
  134. h4 {{_ 'migration-log'}}
  135. .log-container
  136. pre#migration-log-content {{migrationLog}}
  137. template(name="attachmentMonitoring")
  138. .attachment-monitoring
  139. h3 {{_ 'attachment-monitoring'}}
  140. .monitoring-stats
  141. .stats-grid
  142. .stat-card
  143. h5 {{_ 'total-attachments'}}
  144. .stat-value {{totalAttachments}}
  145. .stat-card
  146. h5 {{_ 'filesystem-attachments'}}
  147. .stat-value {{filesystemAttachments}}
  148. .stat-card
  149. h5 {{_ 'gridfs-attachments'}}
  150. .stat-value {{gridfsAttachments}}
  151. .stat-card
  152. h5 {{_ 's3-attachments'}}
  153. .stat-value {{s3Attachments}}
  154. .stat-card
  155. h5 {{_ 'total-size'}}
  156. .stat-value {{totalSize}}
  157. .stat-card
  158. h5 {{_ 'filesystem-size'}}
  159. .stat-value {{filesystemSize}}
  160. .stat-card
  161. h5 {{_ 'gridfs-size'}}
  162. .stat-value {{gridfsSize}}
  163. .stat-card
  164. h5 {{_ 's3-size'}}
  165. .stat-value {{s3Size}}
  166. .monitoring-charts
  167. h4 {{_ 'storage-distribution'}}
  168. .chart-container
  169. canvas#storage-distribution-chart
  170. .monitoring-actions
  171. button.js-refresh-monitoring.btn.btn-secondary {{_ 'refresh-monitoring'}}
  172. button.js-export-monitoring.btn.btn-primary {{_ 'export-monitoring'}}