2023-03-15 13:39:33 -04:00
|
|
|
import { action } from "@ember/object";
|
2020-03-06 11:41:41 -05:00
|
|
|
import Controller, { inject as controller } from "@ember/controller";
|
2022-11-07 19:40:56 -05:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2014-08-20 12:48:56 -04:00
|
|
|
import ModalFunctionality from "discourse/mixins/modal-functionality";
|
|
|
|
|
2023-03-15 13:39:33 -04:00
|
|
|
export default class AdminStartBackupController extends Controller.extend(
|
|
|
|
ModalFunctionality
|
|
|
|
) {
|
|
|
|
@controller adminBackupsLogs;
|
2014-08-20 12:48:56 -04:00
|
|
|
|
2022-11-07 19:40:56 -05:00
|
|
|
@discourseComputed
|
|
|
|
warningMessage() {
|
|
|
|
// this is never shown here, but we may want to show different
|
|
|
|
// messages in plugins
|
|
|
|
return "";
|
2023-03-15 13:39:33 -04:00
|
|
|
}
|
2022-11-07 19:40:56 -05:00
|
|
|
|
|
|
|
@discourseComputed
|
|
|
|
yesLabel() {
|
|
|
|
return "yes_value";
|
2023-03-15 13:39:33 -04:00
|
|
|
}
|
2022-11-07 19:40:56 -05:00
|
|
|
|
2023-03-15 13:39:33 -04:00
|
|
|
@action
|
|
|
|
startBackupWithUploads() {
|
|
|
|
this.send("closeModal");
|
|
|
|
this.send("startBackup", true);
|
|
|
|
}
|
2014-08-20 12:48:56 -04:00
|
|
|
|
2023-03-15 13:39:33 -04:00
|
|
|
@action
|
|
|
|
startBackupWithoutUploads() {
|
|
|
|
this.send("closeModal");
|
|
|
|
this.send("startBackup", false);
|
|
|
|
}
|
2014-08-20 12:48:56 -04:00
|
|
|
|
2023-03-15 13:39:33 -04:00
|
|
|
@action
|
|
|
|
cancel() {
|
|
|
|
this.send("closeModal");
|
|
|
|
}
|
|
|
|
}
|