mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
Remove the en.i18n.json key sandstorm-migration whose value was the bare proper noun 'Sandstorm' (the https://sandstorm.org project name), and hardcode 'Sandstorm' in the Admin Panel / Attachments tab label and panel title instead. The other sandstorm-migration-* keys are real translatable strings and stay.
711 lines
40 KiB
Plaintext
711 lines
40 KiB
Plaintext
template(name="attachments")
|
|
.setting-content.attachments-content
|
|
unless currentUser.isAdmin
|
|
| {{_ 'error-notAuthorized'}}
|
|
else
|
|
.content-title.ext-box
|
|
span
|
|
span.emoji-icon
|
|
i.fa.fa-paperclip
|
|
| {{_ 'attachments'}}
|
|
.content-body
|
|
.side-menu
|
|
ul
|
|
li(class="{{#if isMoveActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="move")
|
|
span.emoji-icon
|
|
i.fa.fa-arrow-right
|
|
| {{_ 'attachment-move'}}
|
|
li(class="{{#if isDefaultStorageActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="default-save-storage")
|
|
span.emoji-icon
|
|
i.fa.fa-save
|
|
| {{_ 'default-save-storage'}}
|
|
li(class="{{#if isLimitsActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="limits")
|
|
span.emoji-icon
|
|
i.fa.fa-sliders
|
|
| {{_ 'attachment-limits'}}
|
|
li(class="{{#if isGridFsActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="gridfs")
|
|
span.emoji-icon
|
|
i.fa.fa-database
|
|
| {{_ 'mongodb-gridfs-storage'}}
|
|
li(class="{{#if isFilesystemActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="filesystem")
|
|
span.emoji-icon
|
|
i.fa.fa-folder-open
|
|
| {{_ 'filesystem-storage'}}
|
|
li(class="{{#if isS3Active}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="s3")
|
|
span.emoji-icon
|
|
i.fa.fa-cloud
|
|
| {{_ 's3-minio-storage'}}
|
|
li(class="{{#if isAzureActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="azure")
|
|
span.emoji-icon
|
|
i.fa.fa-cloud
|
|
| {{_ 'azure-blob-storage'}}
|
|
li(class="{{#if isGcsActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="gcs")
|
|
span.emoji-icon
|
|
i.fa.fa-cloud
|
|
| {{_ 'gcs-storage'}}
|
|
li(class="{{#if isDatabaseMigrationActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="database-migration")
|
|
span.emoji-icon
|
|
i.fa.fa-exchange
|
|
| {{_ 'database-migration'}}
|
|
li(class="{{#if isBackupActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="backup")
|
|
span.emoji-icon
|
|
i.fa.fa-archive
|
|
| {{_ 'backup'}}
|
|
if isSandstorm
|
|
li(class="{{#if isSandstormActive}}active{{/if}}")
|
|
a.js-attachments-menu(data-id="sandstorm")
|
|
span.emoji-icon
|
|
i.fa.fa-hdd-o
|
|
| Sandstorm
|
|
|
|
.main-body
|
|
if loading.get
|
|
+spinner
|
|
else if isMoveActive
|
|
ul#attachment-move-setting.setting-detail
|
|
li
|
|
h3 {{_ 'attachment-move'}}
|
|
+moveAttachments
|
|
else if isDefaultStorageActive
|
|
ul#attachment-default-storage-setting.setting-detail
|
|
li
|
|
h3 {{_ 'default-save-storage'}}
|
|
.description {{_ 'default-save-storage-description'}}
|
|
.form-group
|
|
select.wekan-form-control.js-default-save-storage
|
|
each defaultStorageOptions
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
.form-group
|
|
button.js-save-default-storage.primary {{_ 'save'}}
|
|
else if isLimitsActive
|
|
ul#attachment-limits-setting.setting-detail
|
|
li
|
|
h3 {{_ 'attachment-transfer-limits-title'}}
|
|
.description {{_ 'attachment-transfer-limits-description'}}
|
|
|
|
li
|
|
.title {{_ 'attachment-upload-limit-label'}}
|
|
.form-group
|
|
select.wekan-form-control.js-attachment-limit-mode(data-field="attachmentsUploadMaxBytes")
|
|
each attachmentTransferLimitModeOptions 'attachmentsUploadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
.form-group(class="{{#if isAttachmentLimitMode 'attachmentsUploadMaxBytes' 'max-size'}}{{else}}hide{{/if}}")
|
|
input.wekan-form-control#attachments-upload-limit-value(type="number" min="1" step="any" value="{{attachmentTransferLimitValue 'attachmentsUploadMaxBytes'}}")
|
|
select.wekan-form-control.js-attachment-limit-unit(data-field="attachmentsUploadMaxBytes")
|
|
each attachmentTransferLimitUnitOptions 'attachmentsUploadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
|
|
li
|
|
.title {{_ 'attachment-download-limit-label'}}
|
|
.form-group
|
|
select.wekan-form-control.js-attachment-limit-mode(data-field="attachmentsDownloadMaxBytes")
|
|
each attachmentTransferLimitModeOptions 'attachmentsDownloadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
.form-group(class="{{#if isAttachmentLimitMode 'attachmentsDownloadMaxBytes' 'max-size'}}{{else}}hide{{/if}}")
|
|
input.wekan-form-control#attachments-download-limit-value(type="number" min="1" step="any" value="{{attachmentTransferLimitValue 'attachmentsDownloadMaxBytes'}}")
|
|
select.wekan-form-control.js-attachment-limit-unit(data-field="attachmentsDownloadMaxBytes")
|
|
each attachmentTransferLimitUnitOptions 'attachmentsDownloadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
|
|
li
|
|
.title {{_ 'api-upload-limit-label'}}
|
|
.form-group
|
|
select.wekan-form-control.js-attachment-limit-mode(data-field="apiUploadMaxBytes")
|
|
each attachmentTransferLimitModeOptions 'apiUploadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
.form-group(class="{{#if isAttachmentLimitMode 'apiUploadMaxBytes' 'max-size'}}{{else}}hide{{/if}}")
|
|
input.wekan-form-control#api-upload-limit-value(type="number" min="1" step="any" value="{{attachmentTransferLimitValue 'apiUploadMaxBytes'}}")
|
|
select.wekan-form-control.js-attachment-limit-unit(data-field="apiUploadMaxBytes")
|
|
each attachmentTransferLimitUnitOptions 'apiUploadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
|
|
li
|
|
.title {{_ 'api-download-limit-label'}}
|
|
.form-group
|
|
select.wekan-form-control.js-attachment-limit-mode(data-field="apiDownloadMaxBytes")
|
|
each attachmentTransferLimitModeOptions 'apiDownloadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
.form-group(class="{{#if isAttachmentLimitMode 'apiDownloadMaxBytes' 'max-size'}}{{else}}hide{{/if}}")
|
|
input.wekan-form-control#api-download-limit-value(type="number" min="1" step="any" value="{{attachmentTransferLimitValue 'apiDownloadMaxBytes'}}")
|
|
select.wekan-form-control.js-attachment-limit-unit(data-field="apiDownloadMaxBytes")
|
|
each attachmentTransferLimitUnitOptions 'apiDownloadMaxBytes'
|
|
option(value=value selected=selected) {{_ labelKey}}
|
|
|
|
li
|
|
.title {{_ 'avatars-upload-blocked-label'}}
|
|
.form-group
|
|
label
|
|
input.js-avatars-upload-blocked(type="checkbox" checked=avatarsUploadBlocked)
|
|
| {{_ 'avatars-upload-blocked-description'}}
|
|
|
|
li
|
|
button.js-save-attachment-transfer-limits.primary {{_ 'save'}}
|
|
else if isFilesystemActive
|
|
ul#attachment-filesystem-setting.setting-detail
|
|
li
|
|
h3 {{_ 'filesystem-storage'}}
|
|
.storage-rw-row
|
|
.storage-rw-item
|
|
input.js-toggle-filesystem-read#filesystem-read(type="checkbox" checked="{{filesystemRead}}")
|
|
label(for="filesystem-read") {{_ 'storage-read'}}
|
|
|
|
.form-group
|
|
button.js-calculate-filesystem-stats.btn.btn-primary(type="button") {{_ 'calculate-file-counts'}}
|
|
if filesystemStatsLoading
|
|
p.form-text.text-muted {{_ 'calculating-counts'}}
|
|
if filesystemStatsError
|
|
p.form-text.text-danger {{filesystemStatsError}}
|
|
if hasFilesystemStats
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'stats-count'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{filesystemStats.attachments}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{filesystemStats.avatars}}
|
|
|
|
.form-group
|
|
label {{_ 'writable-path'}}
|
|
input.wekan-form-control#filesystem-path(type="text" value="{{filesystemPath}}" readonly)
|
|
small.form-text.text-muted {{_ 'filesystem-path-description'}}
|
|
|
|
.form-group
|
|
label {{_ 'attachments-path'}}
|
|
input.wekan-form-control#attachments-path(type="text" value="{{attachmentsPath}}" readonly)
|
|
small.form-text.text-muted {{_ 'attachments-path-description'}}
|
|
|
|
.form-group
|
|
label {{_ 'avatars-path'}}
|
|
input.wekan-form-control#avatars-path(type="text" value="{{avatarsPath}}" readonly)
|
|
small.form-text.text-muted {{_ 'avatars-path-description'}}
|
|
|
|
else if isGridFsActive
|
|
ul#attachment-gridfs-setting.setting-detail
|
|
li
|
|
h3 {{_ 'mongodb-gridfs-storage'}}
|
|
.description {{_ 'gridfs-move-collectionfs-note'}}
|
|
.storage-rw-row
|
|
.storage-rw-item
|
|
input.js-toggle-gridfs-read#gridfs-read(type="checkbox" checked="{{gridfsRead}}")
|
|
label(for="gridfs-read") {{_ 'storage-read'}}
|
|
.form-group
|
|
button.js-calculate-gridfs-stats.btn.btn-primary(type="button") {{_ 'calculate-file-counts'}}
|
|
if gridFsStatsLoading
|
|
p.form-text.text-muted {{_ 'calculating-counts'}}
|
|
if gridFsStatsError
|
|
p.form-text.text-danger {{gridFsStatsError}}
|
|
if hasGridFsStats
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'stats-collectionfs'}}
|
|
th {{_ 'stats-mongo-files'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{gridFsStats.attachments.collectionFs}}
|
|
td {{gridFsStats.attachments.mongoFiles}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{gridFsStats.avatars.collectionFs}}
|
|
td {{gridFsStats.avatars.mongoFiles}}
|
|
.form-group
|
|
.compact-block
|
|
h4 {{_ 'mongodb-compact'}}
|
|
p.form-text {{_ 'mongodb-compact-description'}}
|
|
p.form-text.text-muted {{_ 'mongodb-compact-warning'}}
|
|
button.js-compact-mongodb-gridfs.btn.btn-warning(type="button") {{_ 'mongodb-compact-run'}}
|
|
if compactLoading
|
|
p.form-text.text-muted {{_ 'mongodb-compact-running'}}
|
|
if compactError
|
|
p.form-text.text-danger {{_ 'mongodb-compact-error'}} {{compactError}}
|
|
if compactResult
|
|
p.form-text.text-success {{_ 'mongodb-compact-success'}}
|
|
ul.compact-result-list
|
|
each item in compactResultItems
|
|
li
|
|
strong {{item.name}}
|
|
| : {{item.status}}
|
|
|
|
else if isS3Active
|
|
ul#attachment-s3-setting.setting-detail
|
|
li
|
|
h3 {{_ 's3-minio-storage'}}
|
|
.description {{_ 's3-minio-storage-description'}}
|
|
.storage-rw-row
|
|
.storage-rw-item
|
|
input#s3-enabled(type="checkbox" checked=cloudEnabled.s3)
|
|
label(for="s3-enabled") {{_ 'storage-enabled'}}
|
|
.storage-rw-item
|
|
input#s3-read(type="checkbox" checked=cloudRead.s3)
|
|
label(for="s3-read") {{_ 'storage-read'}}
|
|
|
|
.form-group
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="s3") {{_ 'save'}}
|
|
|
|
.form-group
|
|
button.js-calculate-s3-stats.btn.btn-primary(type="button") {{_ 'calculate-file-counts'}}
|
|
if s3StatsLoading
|
|
p.form-text.text-muted {{_ 'calculating-counts'}}
|
|
if s3StatsError
|
|
p.form-text.text-danger {{s3StatsError}}
|
|
if hasS3Stats
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'stats-count'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{s3Stats.attachments}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{s3Stats.avatars}}
|
|
|
|
.form-group
|
|
label Endpoint
|
|
small.form-text.cloud-input-label-tr {{_ 's3-endpoint'}}
|
|
input.wekan-form-control#s3-endpoint(type="text" value=cloudValue.s3.endpoint)
|
|
small.form-text.cloud-input-example https://s3.eu-west-1.amazonaws.com
|
|
small.form-text.cloud-input-desc S3 endpoint URL (e.g., s3.amazonaws.com or minio.example.com)
|
|
small.form-text.cloud-input-desc {{_ 's3-endpoint-description'}}
|
|
small.form-text.cloud-input-path AWS: leave blank (uses the region endpoint). S3-compatible: the Endpoint URL from your MinIO / Cloudflare R2 / Backblaze B2 / Wasabi / DigitalOcean Spaces console.
|
|
small.form-text.cloud-input-path {{_ 's3-endpoint-menu-path'}}
|
|
.form-group
|
|
label AWS Region
|
|
small.form-text.cloud-input-label-tr {{_ 's3-region'}}
|
|
input.wekan-form-control#s3-region(type="text" value=cloudValue.s3.region)
|
|
small.form-text.cloud-input-example eu-west-1
|
|
small.form-text.cloud-input-desc AWS S3 region (e.g., us-east-1)
|
|
small.form-text.cloud-input-desc {{_ 's3-region-description'}}
|
|
small.form-text.cloud-input-path AWS Console → S3 → Buckets → your bucket → Properties → AWS Region.
|
|
small.form-text.cloud-input-path {{_ 's3-region-menu-path'}}
|
|
.form-group
|
|
label Bucket name
|
|
small.form-text.cloud-input-label-tr {{_ 's3-bucket'}}
|
|
input.wekan-form-control#s3-bucket(type="text" value=cloudValue.s3.bucket)
|
|
small.form-text.cloud-input-example wekan-s3-test-369341155299-eu-west-1-an
|
|
small.form-text.cloud-input-desc S3 bucket name for storing files
|
|
small.form-text.cloud-input-desc {{_ 's3-bucket-description'}}
|
|
small.form-text.cloud-input-path AWS Console → S3 → Buckets → your bucket name (or Create bucket → Bucket name).
|
|
small.form-text.cloud-input-path {{_ 's3-bucket-menu-path'}}
|
|
.form-group
|
|
label Access key ID
|
|
small.form-text.cloud-input-label-tr {{_ 's3-access-key'}}
|
|
input.wekan-form-control#s3-access-key(type="text" value=cloudValue.s3.accessKeyId)
|
|
small.form-text.cloud-input-example AKIAIOSFODNN7EXAMPLE
|
|
small.form-text.cloud-input-desc AWS S3 access key for authentication
|
|
small.form-text.cloud-input-desc {{_ 's3-access-key-description'}}
|
|
small.form-text.cloud-input-path AWS Console → IAM → Users → your user → Security credentials → Access keys → Create access key → choose use case 'Application running outside AWS' → Create access key. Shown as 'Access key ID'.
|
|
small.form-text.cloud-input-path {{_ 's3-access-key-menu-path'}}
|
|
.form-group
|
|
label Secret access key
|
|
small.form-text.cloud-input-label-tr {{_ 's3-secret-key'}}
|
|
input.wekan-form-control#s3-secret-key(type="password" placeholder=cloudSecretPlaceholder.s3.secretAccessKey)
|
|
small.form-text.cloud-input-example wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
small.form-text.cloud-input-desc Leave blank to keep the current value.
|
|
small.form-text.cloud-input-desc {{_ 'cloud-secret-keep-blank'}}
|
|
small.form-text.cloud-input-path Same screen as the Access key ID; 'Secret access key' is shown only once when the key is created — copy it then (or Download .csv).
|
|
small.form-text.cloud-input-path {{_ 's3-secret-key-menu-path'}}
|
|
.form-group
|
|
.storage-rw-item
|
|
input#s3-force-path-style(type="checkbox" checked=cloudValue.s3.forcePathStyle)
|
|
label(for="s3-force-path-style") {{_ 's3-force-path-style'}}
|
|
small.form-text.text-muted {{_ 's3-force-path-style-description'}}
|
|
|
|
.form-group
|
|
button.js-test-cloud-connection.btn.btn-secondary(data-provider="s3") {{_ 'test-cloud-connection'}}
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="s3") {{_ 'save'}}
|
|
if cloudTestResult.s3
|
|
p.form-text.text-success {{_ 'cloud-connection-success'}}
|
|
if cloudTestError.s3
|
|
p.form-text.text-danger {{_ 'cloud-connection-failed'}}: {{cloudTestError.s3}}
|
|
|
|
else if isAzureActive
|
|
ul#attachment-azure-setting.setting-detail
|
|
li
|
|
h3 {{_ 'azure-blob-storage'}}
|
|
.storage-rw-row
|
|
.storage-rw-item
|
|
input#azure-enabled(type="checkbox" checked=cloudEnabled.azure)
|
|
label(for="azure-enabled") {{_ 'storage-enabled'}}
|
|
.storage-rw-item
|
|
input#azure-read(type="checkbox" checked=cloudRead.azure)
|
|
label(for="azure-read") {{_ 'storage-read'}}
|
|
|
|
.form-group
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="azure") {{_ 'save'}}
|
|
|
|
.form-group
|
|
button.js-calculate-azure-stats.btn.btn-primary(type="button") {{_ 'calculate-file-counts'}}
|
|
if azureStatsLoading
|
|
p.form-text.text-muted {{_ 'calculating-counts'}}
|
|
if azureStatsError
|
|
p.form-text.text-danger {{azureStatsError}}
|
|
if hasAzureStats
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'stats-count'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{azureStats.attachments}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{azureStats.avatars}}
|
|
|
|
.form-group
|
|
label Storage account name
|
|
small.form-text.cloud-input-label-tr {{_ 'azure-account-name'}}
|
|
input.wekan-form-control#azure-account-name(type="text" value=cloudValue.azure.accountName)
|
|
small.form-text.cloud-input-example wekanstorage
|
|
small.form-text.cloud-input-desc The name of your Azure Storage account.
|
|
small.form-text.cloud-input-desc {{_ 'azure-account-name-description'}}
|
|
small.form-text.cloud-input-path Azure Portal → Storage accounts → your account → name shown at the top (also under Security + networking → Access keys → Storage account name).
|
|
small.form-text.cloud-input-path {{_ 'azure-account-name-menu-path'}}
|
|
.form-group
|
|
label Storage account key
|
|
small.form-text.cloud-input-label-tr {{_ 'azure-account-key'}}
|
|
input.wekan-form-control#azure-account-key(type="password" placeholder=cloudSecretPlaceholder.azure.accountKey)
|
|
small.form-text.cloud-input-example base64AccountKey==
|
|
small.form-text.cloud-input-desc Leave blank to keep the current value.
|
|
small.form-text.cloud-input-desc {{_ 'cloud-secret-keep-blank'}}
|
|
small.form-text.cloud-input-path Azure Portal → Storage accounts → your account → Security + networking → Access keys → key1 → Show → Key.
|
|
small.form-text.cloud-input-path {{_ 'azure-account-key-menu-path'}}
|
|
.form-group
|
|
label Connection string
|
|
small.form-text.cloud-input-label-tr {{_ 'azure-connection-string'}}
|
|
input.wekan-form-control#azure-connection-string(type="password" placeholder=cloudSecretPlaceholder.azure.connectionString)
|
|
small.form-text.cloud-input-example DefaultEndpointsProtocol=https;AccountName=wekanstorage;AccountKey=...;EndpointSuffix=core.windows.net
|
|
small.form-text.cloud-input-desc Optional: use a full connection string instead of account name and key.
|
|
small.form-text.cloud-input-desc {{_ 'azure-connection-string-description'}}
|
|
small.form-text.cloud-input-path Azure Portal → Storage accounts → your account → Security + networking → Access keys → key1 → Connection string → Show.
|
|
small.form-text.cloud-input-path {{_ 'azure-connection-string-menu-path'}}
|
|
.form-group
|
|
label Container name
|
|
small.form-text.cloud-input-label-tr {{_ 'azure-container'}}
|
|
input.wekan-form-control#azure-bucket(type="text" value=cloudValue.azure.bucket)
|
|
small.form-text.cloud-input-example wekan-attachments
|
|
small.form-text.cloud-input-desc The blob container to store files in.
|
|
small.form-text.cloud-input-desc {{_ 'azure-container-description'}}
|
|
small.form-text.cloud-input-path Azure Portal → Storage accounts → your account → Data storage → Containers → your container (or + Container to create one).
|
|
small.form-text.cloud-input-path {{_ 'azure-container-menu-path'}}
|
|
|
|
.form-group
|
|
button.js-test-cloud-connection.btn.btn-secondary(data-provider="azure") {{_ 'test-cloud-connection'}}
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="azure") {{_ 'save'}}
|
|
if cloudTestResult.azure
|
|
p.form-text.text-success {{_ 'cloud-connection-success'}}
|
|
if cloudTestError.azure
|
|
p.form-text.text-danger {{_ 'cloud-connection-failed'}}: {{cloudTestError.azure}}
|
|
|
|
else if isGcsActive
|
|
ul#attachment-gcs-setting.setting-detail
|
|
li
|
|
h3 {{_ 'gcs-storage'}}
|
|
.description Give WeKan's service account read/write access to the bucket: Google Cloud Console → Cloud Storage → Buckets → your bucket → Permissions → Grant access. In "New principals", paste the service account email — the "client_email" value from your JSON key — then choose the role "Storage Object Admin" and Save.
|
|
.description {{_ 'gcs-permissions-note'}}
|
|
.storage-rw-row
|
|
.storage-rw-item
|
|
input#gcs-enabled(type="checkbox" checked=cloudEnabled.gcs)
|
|
label(for="gcs-enabled") {{_ 'storage-enabled'}}
|
|
.storage-rw-item
|
|
input#gcs-read(type="checkbox" checked=cloudRead.gcs)
|
|
label(for="gcs-read") {{_ 'storage-read'}}
|
|
|
|
.form-group
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="gcs") {{_ 'save'}}
|
|
|
|
.form-group
|
|
button.js-calculate-gcs-stats.btn.btn-primary(type="button") {{_ 'calculate-file-counts'}}
|
|
if gcsStatsLoading
|
|
p.form-text.text-muted {{_ 'calculating-counts'}}
|
|
if gcsStatsError
|
|
p.form-text.text-danger {{gcsStatsError}}
|
|
if hasGcsStats
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'stats-count'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{gcsStats.attachments}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{gcsStats.avatars}}
|
|
|
|
.form-group
|
|
label Project ID
|
|
small.form-text.cloud-input-label-tr {{_ 'gcs-project-id'}}
|
|
input.wekan-form-control#gcs-project-id(type="text" value=cloudValue.gcs.projectId)
|
|
small.form-text.cloud-input-example my-gcp-project-123456
|
|
small.form-text.cloud-input-desc Your Google Cloud project id.
|
|
small.form-text.cloud-input-desc {{_ 'gcs-project-id-description'}}
|
|
small.form-text.cloud-input-path Google Cloud Console → project selector at the top → your project's ID (Cloud overview → Dashboard → Project info → Project ID).
|
|
small.form-text.cloud-input-path {{_ 'gcs-project-id-menu-path'}}
|
|
.form-group
|
|
label Bucket name
|
|
small.form-text.cloud-input-label-tr {{_ 'gcs-bucket'}}
|
|
input.wekan-form-control#gcs-bucket(type="text" value=cloudValue.gcs.bucket)
|
|
small.form-text.cloud-input-example wekan-attachments
|
|
small.form-text.cloud-input-desc The name of the Cloud Storage bucket to store files in.
|
|
small.form-text.cloud-input-desc {{_ 'gcs-bucket-description'}}
|
|
small.form-text.cloud-input-path Google Cloud Console → Cloud Storage → Buckets → your bucket name (or Create to make one).
|
|
small.form-text.cloud-input-path {{_ 'gcs-bucket-menu-path'}}
|
|
.form-group
|
|
label Service account key file path
|
|
small.form-text.cloud-input-label-tr {{_ 'gcs-key-filename'}}
|
|
input.wekan-form-control#gcs-key-filename(type="text" value=cloudValue.gcs.keyFilename)
|
|
small.form-text.cloud-input-example /data/gcs-service-account.json
|
|
small.form-text.cloud-input-desc Optional: path to a service account JSON key file on the server.
|
|
small.form-text.cloud-input-desc {{_ 'gcs-key-filename-description'}}
|
|
small.form-text.cloud-input-path Path on the WeKan server to the downloaded service account JSON key file (created below). Use this OR paste the JSON into the field below.
|
|
small.form-text.cloud-input-path {{_ 'gcs-key-filename-menu-path'}}
|
|
.form-group
|
|
label Service account key (JSON)
|
|
small.form-text.cloud-input-label-tr {{_ 'gcs-credentials'}}
|
|
textarea.wekan-form-control#gcs-credentials(rows="4" placeholder=cloudSecretPlaceholder.gcs.credentials)
|
|
small.form-text.cloud-input-example { "type": "service_account", "project_id": "my-gcp-project", "client_email": "wekan@my-gcp-project.iam.gserviceaccount.com", "private_key": "-----BEGIN PRIVATE KEY-----..." }
|
|
small.form-text.cloud-input-desc Optional: paste the service account JSON key. Leave blank to use the key file or default credentials.
|
|
small.form-text.cloud-input-desc {{_ 'gcs-credentials-description'}}
|
|
small.form-text.cloud-input-path Google Cloud Console → IAM & Admin → Service accounts → your service account → Keys → Add key → Create new key → JSON → Create (downloads the file). Paste its contents here, or save the file and set its path above.
|
|
small.form-text.cloud-input-path {{_ 'gcs-credentials-menu-path'}}
|
|
small.form-text.text-muted {{_ 'gcs-credentials-description'}}
|
|
|
|
.form-group
|
|
button.js-test-cloud-connection.btn.btn-secondary(data-provider="gcs") {{_ 'test-cloud-connection'}}
|
|
button.js-save-cloud-settings.btn.btn-primary(data-provider="gcs") {{_ 'save'}}
|
|
if cloudTestResult.gcs
|
|
p.form-text.text-success {{_ 'cloud-connection-success'}}
|
|
if cloudTestError.gcs
|
|
p.form-text.text-danger {{_ 'cloud-connection-failed'}}: {{cloudTestError.gcs}}
|
|
|
|
else if isDatabaseMigrationActive
|
|
ul#attachment-database-migration-setting.setting-detail
|
|
li
|
|
h3 {{_ 'database-migration'}}
|
|
.description {{_ 'database-migration-description'}}
|
|
.form-group
|
|
button.js-migrate-to-ferretdb.btn.btn-primary(type="button" disabled=migrateRunning) {{_ 'database-migrate-to-ferretdb'}}
|
|
button.js-migrate-to-mongodb.btn.btn-primary(type="button" disabled=migrateRunning) {{_ 'database-migrate-to-mongodb'}}
|
|
if migrateStatus
|
|
.move-progress-section
|
|
.move-progress-counter
|
|
| {{_ 'database-migration-phase'}}: {{migrateStatus.phase}}
|
|
if migrateStatus.collection
|
|
| — {{migrateStatus.collection}} ({{migrateStatus.collDone}}/{{migrateStatus.collTotal}}), {{migrateStatus.collectionsDone}}/{{migrateStatus.collectionsTotal}}
|
|
if migrateStatus.error
|
|
p.form-text.text-danger {{migrateStatus.error}}
|
|
if migrateSuccess
|
|
p.form-text.text-success {{_ 'database-migration-done'}}
|
|
|
|
else if isBackupActive
|
|
ul#attachment-backup-setting.setting-detail
|
|
li
|
|
h3 {{_ 'backup'}}
|
|
.description {{_ 'backup-description'}}
|
|
.form-group
|
|
label
|
|
input.js-backup-attachments(type="checkbox" checked="checked")
|
|
| {{_ 'attachments'}}
|
|
label
|
|
input.js-backup-avatars(type="checkbox" checked="checked")
|
|
| {{_ 'avatars'}}
|
|
label
|
|
input.js-backup-data(type="checkbox" checked="checked")
|
|
| {{_ 'backup-data'}}
|
|
.form-group
|
|
label {{_ 'backup-storage'}}
|
|
select.wekan-form-control.js-backup-storage
|
|
option(value="filesystem") {{_ 'filesystem-storage'}}
|
|
option(value="s3") {{_ 's3-minio-storage'}}
|
|
option(value="azure") {{_ 'azure-blob-storage'}}
|
|
option(value="gcs") {{_ 'gcs-storage'}}
|
|
.form-group
|
|
button.js-run-backup.btn.btn-primary(type="button" disabled=backupRunning) {{_ 'backup-now'}}
|
|
if backupStatus
|
|
p.form-text {{_ 'database-migration-phase'}}: {{backupStatus.phase}} {{backupStatus.detail}}
|
|
if backupStatus.error
|
|
p.form-text.text-danger {{backupStatus.error}}
|
|
if backupSuccess
|
|
p.form-text.text-success {{_ 'backup-done'}}: {{backupStatus.file}}
|
|
|
|
h4 {{_ 'backup-schedule'}}
|
|
.form-group
|
|
label {{_ 'backup-frequency'}}
|
|
select.wekan-form-control.js-backup-frequency
|
|
option(value="off" selected=scheduleOff) {{_ 'backup-frequency-off'}}
|
|
option(value="daily" selected=scheduleDaily) {{_ 'backup-frequency-daily'}}
|
|
option(value="weekly" selected=scheduleWeekly) {{_ 'backup-frequency-weekly'}}
|
|
option(value="monthly" selected=scheduleMonthly) {{_ 'backup-frequency-monthly'}}
|
|
.form-group
|
|
label {{_ 'backup-time'}}
|
|
input.wekan-form-control.js-backup-time(type="time" value=scheduleTime)
|
|
.form-group
|
|
label {{_ 'backup-day-of-week'}}
|
|
input.wekan-form-control.js-backup-dow(type="text" value=scheduleDow placeholder="Sunday")
|
|
.form-group
|
|
label {{_ 'backup-day-of-month'}}
|
|
input.wekan-form-control.js-backup-dom(type="number" min="1" max="28" value=scheduleDom)
|
|
.form-group
|
|
button.js-save-backup-schedule.btn.btn-primary(type="button") {{_ 'save'}}
|
|
|
|
h4 {{_ 'backup-restore'}}
|
|
.form-group
|
|
button.js-list-backups.btn.btn-secondary(type="button") {{_ 'backup-list'}}
|
|
if backupList
|
|
table.gridfs-stats-table
|
|
tr
|
|
th
|
|
th {{_ 'backup-storage'}}
|
|
th {{_ 'backup-datetime'}}
|
|
th {{_ 'backup-path'}}
|
|
each backupList
|
|
tr
|
|
td
|
|
input.js-backup-select(type="radio" name="backup-select" value=path)
|
|
td {{storage}}
|
|
td {{datetime}}
|
|
td {{path}}
|
|
.form-group
|
|
label {{_ 'backup-restore-mode'}}
|
|
select.wekan-form-control.js-restore-mode
|
|
option(value="add-missing") {{_ 'backup-restore-add-missing'}}
|
|
option(value="replace-all") {{_ 'backup-restore-replace-all'}}
|
|
.form-group
|
|
button.js-restore-backup.btn.btn-warning(type="button" disabled=backupRunning) {{_ 'backup-restore'}}
|
|
|
|
else if isSandstormActive
|
|
ul#attachment-sandstorm-setting.setting-detail
|
|
li
|
|
h3 Sandstorm
|
|
.description {{_ 'sandstorm-migration-description'}}
|
|
if sandstormStatus
|
|
.form-group
|
|
strong {{_ 'sandstorm-migration-status'}}
|
|
if sandstormStatus.migrationSuccess
|
|
span.text-success {{_ 'sandstorm-migration-success'}}
|
|
else if sandstormStatus.migrationDone
|
|
span.text-danger {{_ 'sandstorm-migration-failed'}}
|
|
else
|
|
span.text-muted {{_ 'sandstorm-migration-pending'}}
|
|
if sandstormStatus.status
|
|
p.form-text.text-muted {{_ 'database-migration-phase'}}: {{sandstormStatus.status.phase}}
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'sandstorm-storage-item'}}
|
|
th {{_ 'sandstorm-disk-usage'}}
|
|
tr
|
|
td {{_ 'sandstorm-raw-mongodb'}}
|
|
td {{rawMongoSize}}
|
|
tr
|
|
td FerretDB (SQLite)
|
|
td {{ferretSize}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{attachmentsSize}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{avatarsSize}}
|
|
if sandstormStatus.rawMongoExists
|
|
.form-group
|
|
.description {{_ 'sandstorm-delete-raw-mongodb-description'}}
|
|
button.js-sandstorm-delete-raw-mongodb.btn.btn-warning(type="button" disabled=sandstormDeleteDisabled) {{_ 'sandstorm-delete-raw-mongodb'}}
|
|
if sandstormDeleteResult
|
|
p.form-text.text-success {{_ 'sandstorm-raw-mongodb-deleted'}} ({{sandstormDeleteFreed}})
|
|
if sandstormDeleteError
|
|
p.form-text.text-danger {{sandstormDeleteError}}
|
|
else
|
|
p.form-text.text-muted {{_ 'loading'}}
|
|
|
|
template(name="moveAttachments")
|
|
.move-storage-form
|
|
.move-storage-selects
|
|
.form-group
|
|
label {{_ 'move-scope'}}
|
|
select.wekan-form-control.js-move-scope
|
|
option(value="attachments") {{_ 'attachments'}}
|
|
option(value="avatars") {{_ 'move-scope-avatars'}}
|
|
option(value="both") {{_ 'move-scope-both'}}
|
|
.form-group
|
|
label {{_ 'move-source'}}
|
|
select.wekan-form-control.js-move-source-storage
|
|
option(value="all") {{_ 'move-storage-all'}}
|
|
option(value="collectionfs") {{_ 'move-storage-collectionfs'}}
|
|
option(value="gridfs") {{_ 'move-storage-gridfs'}}
|
|
option(value="fs") {{_ 'move-storage-fs'}}
|
|
option(value="s3") {{_ 'move-storage-s3'}}
|
|
option(value="azure") {{_ 'move-storage-azure'}}
|
|
option(value="gcs") {{_ 'move-storage-gcs'}}
|
|
.form-group
|
|
label {{_ 'move-destination'}}
|
|
select.wekan-form-control.js-move-dest-storage
|
|
option(value="gridfs") {{_ 'move-storage-gridfs'}}
|
|
option(value="fs") {{_ 'move-storage-fs'}}
|
|
option(value="s3") {{_ 'move-storage-s3'}}
|
|
option(value="azure") {{_ 'move-storage-azure'}}
|
|
option(value="gcs") {{_ 'move-storage-gcs'}}
|
|
option(value="collectionfs") {{_ 'move-storage-collectionfs'}}
|
|
button.js-move-all-attachments.btn.btn-primary {{_ 'move-all-attachments'}}
|
|
|
|
if lastMove
|
|
.move-last-operation
|
|
span.emoji-icon
|
|
i.fa.fa-info-circle
|
|
| {{_ 'attachment-last-move'}}: {{lastMoveText}}
|
|
|
|
.move-repair-section
|
|
h4 {{_ 'attachment-repair-locations'}}
|
|
.description {{_ 'attachment-repair-locations-description'}}
|
|
button.js-repair-attachment-locations.btn.btn-secondary(type="button") {{_ 'attachment-repair-locations'}}
|
|
if repairLoading
|
|
p.form-text.text-muted {{_ 'attachment-repair-running'}}
|
|
if repairError
|
|
p.form-text.text-danger {{repairError}}
|
|
if repairResult
|
|
p.form-text.text-success {{_ 'attachment-repair-done'}}
|
|
table.gridfs-stats-table
|
|
tr
|
|
th {{_ 'stats-scope'}}
|
|
th {{_ 'attachment-repair-scanned'}}
|
|
th {{_ 'attachment-repair-repaired'}}
|
|
th {{_ 'attachment-repair-broken'}}
|
|
tr
|
|
td {{_ 'attachments'}}
|
|
td {{repairResult.attachments.scanned}}
|
|
td {{repairResult.attachments.repaired}}
|
|
td {{repairResult.attachments.broken}}
|
|
tr
|
|
td {{_ 'avatars'}}
|
|
td {{repairResult.avatars.scanned}}
|
|
td {{repairResult.avatars.repaired}}
|
|
td {{repairResult.avatars.broken}}
|
|
|
|
if moveProgress
|
|
.move-progress-section
|
|
.move-progress-header
|
|
.move-progress-info
|
|
.move-progress-counter {{_ 'move-progress-file'}} {{moveProgress.current}} / {{moveProgress.total}}
|
|
.move-progress-filename {{moveProgress.name}} ({{moveProgressSize}})
|
|
.move-progress-bar-track
|
|
.move-progress-bar-fill(style="{{moveProgressBarStyle}}")
|
|
.move-progress-bar-track
|
|
.move-progress-bar-indeterminate
|
|
.move-progress-controls
|
|
if moveProgressPaused
|
|
button.js-resume-move.btn.btn-secondary {{_ 'move-progress-resume'}}
|
|
else
|
|
button.js-pause-move.btn.btn-secondary {{_ 'move-progress-pause'}}
|
|
button.js-cancel-move.btn.btn-danger {{_ 'move-progress-cancel'}}
|