diff --git a/ui/src/app/admin/container/SourcesActions.js b/ui/src/app/admin/container/SourcesActions.js index c3a8cca27..1d7316735 100644 --- a/ui/src/app/admin/container/SourcesActions.js +++ b/ui/src/app/admin/container/SourcesActions.js @@ -8,20 +8,10 @@ export function SourcesActions ({sources, reloadSources}) { const { dispatch } = React.useContext(NotificationContext); - const { put, del, response } = useMetadataEntity('source', { + const { put, response } = useMetadataEntity('source', { cachePolicy: 'no-cache' }); - async function deleteSource(id) { - await del(`/${id}`); - if (response.ok) { - dispatch(createNotificationAction( - `Metadata Source has been removed.` - )); - reloadSources(); - } - } - async function enableSource(source) { await put(`/${source.id}`, { ...source, @@ -36,6 +26,6 @@ export function SourcesActions ({sources, reloadSources}) { } return ( - + ); } \ No newline at end of file diff --git a/ui/src/app/dashboard/view/SourcesTab.js b/ui/src/app/dashboard/view/SourcesTab.js index 94305795b..852ec221a 100644 --- a/ui/src/app/dashboard/view/SourcesTab.js +++ b/ui/src/app/dashboard/view/SourcesTab.js @@ -16,7 +16,7 @@ export function SourcesTab () { }); async function loadSources() { - const sources = await get('/'); + const sources = await get(''); if (response.ok) { setSources(sources); } diff --git a/ui/src/app/metadata/hooks/api.js b/ui/src/app/metadata/hooks/api.js index 78e98d3ba..ab835e38e 100644 --- a/ui/src/app/metadata/hooks/api.js +++ b/ui/src/app/metadata/hooks/api.js @@ -24,7 +24,9 @@ export function getMetadataPath(type) { } export function useNonAdminSources() { - return useFetch(`${API_BASE_PATH}${getMetadataPath('source')}/disabledNonAdmin`); + return useFetch(`${API_BASE_PATH}${getMetadataPath('source')}/disabledNonAdmin`, { + cachePolicy: 'no-cache' + }); } export function getMetadataListPath(type) {