Service accounts: able to hide api keys migration info (#50933)

This commit is contained in:
Alexander Zobnin
2022-06-16 17:22:05 +03:00
committed by GitHub
parent 7deb7258ba
commit 118b071d98
7 changed files with 43 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
import { config } from '@grafana/runtime';
import { getBackendSrv } from 'app/core/services/backend_srv';
import store from 'app/core/store';
import { API_KEYS_MIGRATION_INFO_STORAGE_KEY } from 'app/features/serviceaccounts/constants';
import { ApiKey, ThunkResult } from 'app/types';
import {
@@ -52,6 +54,7 @@ export function migrateAll(): ThunkResult<void> {
return async (dispatch) => {
try {
await getBackendSrv().post('/api/serviceaccounts/migrate');
store.set(API_KEYS_MIGRATION_INFO_STORAGE_KEY, true);
} finally {
dispatch(getApiKeysMigrationStatus());
dispatch(loadApiKeys());