Skip to content

Commit

Permalink
fix: fix missing reset options for print history data (#1534)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou authored Sep 5, 2023
1 parent fd293d2 commit 9f08afc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
20 changes: 18 additions & 2 deletions src/components/settings/General/GeneralReset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class SettingsGeneralTabResetDatabase extends Mixins(BaseMixin, S
resetCheckboxes: string[] = []
async mounted() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
await this.loadResetableNamespaces()
}
onSelectResetCheckboxes(resetCheckboxes: string[]) {
Expand All @@ -78,10 +78,26 @@ export default class SettingsGeneralTabResetDatabase extends Mixins(BaseMixin, S
}
async openDialog() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
await this.loadResetableNamespaces()
this.showDialog = true
}
async loadResetableNamespaces() {
this.resetableNamespaces = await this.loadBackupableNamespaces()
if (this.moonrakerComponents.includes('history')) {
this.resetableNamespaces.push({
value: 'history_jobs',
label: this.$t('Settings.GeneralTab.DbHistoryJobs'),
})
this.resetableNamespaces.push({
value: 'history_totals',
label: this.$t('Settings.GeneralTab.DbHistoryTotals'),
})
}
}
closeDialog() {
this.showDialog = false
}
Expand Down
4 changes: 0 additions & 4 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,6 @@
"KlipperUpdateQuestionConfig": "This update may also contain changes to config parameters that would need to be modified in the printer.cfg file, see the change log for details.",
"MoonrakerUpdateQuestion": "This will update the Moonraker API. Changes to the moonraker.conf file may be required to continue using the machine.",
"MoreCommitsInfo": "A maximum of 30 commits can be displayed here. To see all commits, please click on the following link:",
"Notification": {
"Detached": "Detached state is not an error nor is it a problem. It only means that additional commits exist in the local repository that do not exist in the remote repository.",
"Dirty": "The local repository has been modified and cannot be updated in this state. Please recover this repository."
},
"OSPackages": "OS-Packages",
"SoftRecovery": "Soft Recovery",
"StartUpdate": "Start Update",
Expand Down

0 comments on commit 9f08afc

Please sign in to comment.