Explore: Remove localStorage key migration for logs volume (#68360)

This commit is contained in:
Ivana Huckova 2023-05-14 13:29:19 +02:00 committed by GitHub
parent ea0bf989cb
commit 18aba61cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,21 +38,6 @@ export const loadSupplementaryQueries = (): SupplementaryQueries => {
};
for (const type of supplementaryQueryTypes) {
if (type === SupplementaryQueryType.LogsVolume) {
// TODO: Remove this in 10.0 (#61626)
// For LogsVolume we need to migrate old key to new key. So check for old key:
// If we have old key: 1) use it 2) migrate to new key 3) delete old key
// If not, continue with new key
const oldLogsVolumeEnabledKey = 'grafana.explore.logs.enableVolumeHistogram';
const shouldBeEnabled = store.get(oldLogsVolumeEnabledKey);
if (shouldBeEnabled) {
supplementaryQueries[type] = { enabled: shouldBeEnabled === 'true' ? true : false };
storeSupplementaryQueryEnabled(shouldBeEnabled === 'true', SupplementaryQueryType.LogsVolume);
localStorage.removeItem(oldLogsVolumeEnabledKey);
continue;
}
}
// We want to skip LogsSample and default it to false for now to trigger it only on user action
if (type === SupplementaryQueryType.LogsSample) {
continue;