mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Query History: Refactor persistence layer (#44545)
* Extract Rich History storage into two separate implementations Implement getting all entries and adding a new entry * Add deleting rich history items * Add editing rich history * Simplify RichHistoryStorage API * Reorganize methods * Rename variable * Remove feature toggle * Fix TS errors * Fix tests * Clean up * Clean up only when adding new entry * Fix showing a warning message * Use enum instead of a string * Update public/app/core/history/richHistoryLocalStorage.ts Co-authored-by: Giordano Ricci <me@giordanoricci.com> * Update public/app/core/history/richHistoryLocalStorage.ts Co-authored-by: Giordano Ricci <me@giordanoricci.com> * Improve readability * Rename files and remove inferred return types * Use const over a var * Remove unsed files * Remove redundant null check * Update public/app/core/history/richHistoryLocalStorageUtils.ts Co-authored-by: Giordano Ricci <me@giordanoricci.com> * Fix linting issues Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
@@ -48,10 +48,10 @@ export interface ExploreState {
|
||||
richHistory: RichHistoryQuery[];
|
||||
|
||||
/**
|
||||
* True if local storage quota was exceeded when a new item was added. This is to prevent showing
|
||||
* True if local storage quota was exceeded when a rich history item was added. This is to prevent showing
|
||||
* multiple errors when local storage is full.
|
||||
*/
|
||||
localStorageFull: boolean;
|
||||
richHistoryStorageFull: boolean;
|
||||
|
||||
/**
|
||||
* True if a warning message of hitting the exceeded number of items has been shown already.
|
||||
|
||||
Reference in New Issue
Block a user