@@ -12,6 +12,7 @@ import {
1212 SilenceStates ,
1313 TableColumn ,
1414 Timestamp ,
15+ useActiveNamespace ,
1516 useListPageFilter ,
1617 useResolvedExtensions ,
1718 VirtualizedTable ,
@@ -44,7 +45,6 @@ import { Link, Redirect, Route, RouteComponentProps, Switch, withRouter } from '
4445
4546// TODO: These will be available in future versions of the plugin SDK
4647import { formatPrometheusDuration } from './console/utils/datetime' ;
47- import { useActiveNamespace } from './console/console-shared/hooks/useActiveNamespace' ;
4848
4949import { withFallback } from './console/console-shared/error/error-boundary' ;
5050import {
@@ -436,7 +436,7 @@ type SilencedAlertsListProps = RouteComponentProps & { alerts: Alert[] };
436436const SilencedAlertsList_ : React . FC < SilencedAlertsListProps > = ( { alerts, history } ) => {
437437 const { t } = useTranslation ( 'plugin__monitoring-plugin' ) ;
438438 const { isDev } = usePerspective ( ) ;
439- const namespace = useActiveNamespace ( ) ;
439+ const [ namespace ] = useActiveNamespace ( ) ;
440440
441441 return _ . isEmpty ( alerts ) ? (
442442 < div className = "pf-u-text-align-center" > { t ( 'None found' ) } </ div >
@@ -487,7 +487,7 @@ const SilencedAlertsList = withRouter(SilencedAlertsList_);
487487const SilencesDetailsPage_ : React . FC < RouteComponentProps < { id : string } > > = ( { match } ) => {
488488 const { t } = useTranslation ( 'plugin__monitoring-plugin' ) ;
489489
490- const namespace = useActiveNamespace ( ) ;
490+ const [ namespace ] = useActiveNamespace ( ) ;
491491 const { isDev, alertsKey } = usePerspective ( ) ;
492492
493493 const alertsLoaded = useSelector ( ( { observe } : RootState ) => observe . get ( alertsKey ) ?. loaded ) ;
@@ -657,7 +657,7 @@ const tableRuleClasses = [
657657const RuleTableRow : React . FC < RowProps < Rule > > = ( { obj } ) => {
658658 const { t } = useTranslation ( 'plugin__monitoring-plugin' ) ;
659659 const { isDev } = usePerspective ( ) ;
660- const namespace = useActiveNamespace ( ) ;
660+ const [ namespace ] = useActiveNamespace ( ) ;
661661
662662 const title : string = obj . annotations ?. description || obj . annotations ?. message ;
663663
@@ -690,7 +690,7 @@ const RuleTableRow: React.FC<RowProps<Rule>> = ({ obj }) => {
690690const RulesPage_ : React . FC = ( ) => {
691691 const { t } = useTranslation ( 'plugin__monitoring-plugin' ) ;
692692 const { isDev, rulesKey, alertsKey } = usePerspective ( ) ;
693- const namespace = useActiveNamespace ( ) ;
693+ const [ namespace ] = useActiveNamespace ( ) ;
694694
695695 const data : Rule [ ] = useSelector ( ( { observe } : RootState ) => observe . get ( rulesKey ) ) ;
696696 const { loaded = false , loadError } : Alerts = useSelector (
@@ -1122,7 +1122,7 @@ const PollerPages = () => {
11221122 const dispatch = useDispatch ( ) ;
11231123
11241124 const { isDev } = usePerspective ( ) ;
1125- const namespace = useActiveNamespace ( ) ;
1125+ const [ namespace ] = useActiveNamespace ( ) ;
11261126
11271127 const [ customExtensions ] =
11281128 useResolvedExtensions < AlertingRulesSourceExtension > ( isAlertingRulesSource ) ;
0 commit comments