diff --git a/ui/src/app/dashboard/view/Dashboard.js b/ui/src/app/dashboard/view/Dashboard.js index d7892f028..b296fefc0 100644 --- a/ui/src/app/dashboard/view/Dashboard.js +++ b/ui/src/app/dashboard/view/Dashboard.js @@ -1,7 +1,7 @@ import React from 'react'; import Nav from 'react-bootstrap/Nav'; -import { Switch, Route, Redirect, useRouteMatch } from 'react-router-dom'; +import { Switch, Route, Redirect, useRouteMatch, useLocation } from 'react-router-dom'; import { NavLink } from 'react-router-dom'; import Translate from '../../i18n/components/translate'; @@ -19,6 +19,7 @@ import { useNonAdminSources } from '../../metadata/hooks/api'; export function Dashboard () { const { path } = useRouteMatch(); + const location = useLocation(); const isAdmin = useIsAdmin(); @@ -50,7 +51,7 @@ export function Dashboard () { React.useEffect(() => { loadSources(); loadUsers(); - }, []); + }, [location]); React.useEffect(() => { setActions(users.length + sources.length); diff --git a/ui/src/app/metadata/domain/source/component/SourceList.js b/ui/src/app/metadata/domain/source/component/SourceList.js index 792c16394..41ce7f0cd 100644 --- a/ui/src/app/metadata/domain/source/component/SourceList.js +++ b/ui/src/app/metadata/domain/source/component/SourceList.js @@ -39,42 +39,42 @@ export default function SourceList({ entities, onDelete, onEnable, onChangeGroup - {limited.map((source, idx) => - - - {source.serviceProviderName} - - - {source.entityId} - - - {source.createdBy} - - - - - {onEnable && canEnable ? - onEnable(source, checked)} - checked={source.serviceEnabled} - > - - : - - - - } - - - {isAdmin && onChangeGroup && - - - {(groups, removeGroup, loadingGroups) => - + + {(groups, removeGroup, loadingGroups) => + + {limited.map((source, idx) => + + + {source.serviceProviderName} + + + {source.entityId} + + + {source.createdBy} + + + + + {onEnable && canEnable ? + onEnable(source, checked)} + checked={source.serviceEnabled} + > + + : + + + + } + + + {isAdmin && onChangeGroup && + - + } - - - } - {onDelete && isAdmin && - - - A metadata source must be disabled before it can be deleted. - - }> - - - - - } - - )} + {onDelete && isAdmin && + + + A metadata source must be disabled before it can be deleted. + + }> + + + + + + } + + )} + + } +