attachmentSettings.jade 6.8 KB

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