2023-08-01 21:40:25 +08:00
|
|
|
import Component from "@glimmer/component";
|
2023-08-31 12:51:07 +08:00
|
|
|
import { tracked } from "@glimmer/tracking";
|
2023-10-11 02:38:59 +08:00
|
|
|
import { action } from "@ember/object";
|
2023-08-31 12:51:07 +08:00
|
|
|
import { inject as service } from "@ember/service";
|
|
|
|
import I18n from "I18n";
|
2023-08-01 21:40:25 +08:00
|
|
|
|
|
|
|
export default class StartBackup extends Component {
|
2023-08-31 12:51:07 +08:00
|
|
|
@service siteSettings;
|
|
|
|
@tracked includeUploads = true;
|
|
|
|
|
|
|
|
get canManageUploadsInBackup() {
|
|
|
|
return (
|
|
|
|
!this.siteSettings.enable_s3_uploads ||
|
|
|
|
this.siteSettings.include_s3_uploads_in_backups
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
get warningCssClasses() {
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
get warningMessage() {
|
|
|
|
if (
|
|
|
|
this.siteSettings.enable_s3_uploads &&
|
|
|
|
!this.siteSettings.include_s3_uploads_in_backups
|
|
|
|
) {
|
|
|
|
return I18n.t("admin.backups.operations.backup.s3_upload_warning");
|
|
|
|
}
|
|
|
|
return "";
|
2023-08-01 21:40:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
2023-08-31 12:51:07 +08:00
|
|
|
startBackup() {
|
|
|
|
this.args.model.startBackup(this.includeUploads);
|
2023-08-01 21:40:25 +08:00
|
|
|
this.args.closeModal();
|
|
|
|
}
|
|
|
|
}
|