mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
can now purge history items from history view
This commit is contained in:
@@ -1859,6 +1859,14 @@ class HistoryViewModel {
|
||||
}
|
||||
|
||||
_deleteSelected() : void {
|
||||
let lineIds = Array.from(this.selectedItems.keys());
|
||||
let prtn = GlobalCommandRunner.historyPurgeLines(lineIds);
|
||||
prtn.then((result : boolean) => {
|
||||
if (!result) {
|
||||
GlobalModel.showAlert({message: "Error removing history lines."});
|
||||
return;
|
||||
}
|
||||
});
|
||||
let offset = this.offset.get();
|
||||
GlobalCommandRunner.historyView({offset: offset, searchText: this.activeSearchText});
|
||||
}
|
||||
@@ -3027,6 +3035,11 @@ class CommandRunner {
|
||||
GlobalModel.submitCommand("history", null, null, kwargs, true);
|
||||
}
|
||||
|
||||
historyPurgeLines(lines : string[]) : Promise<boolean> {
|
||||
let prtn = GlobalModel.submitCommand("history", "purge", lines, {"nohist": "1"}, false);
|
||||
return prtn;
|
||||
}
|
||||
|
||||
switchSession(session : string) {
|
||||
GlobalModel.submitCommand("session", null, [session], {"nohist": "1"}, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user