-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add shell hooks integration and update useAlerts function to accept o…
…ptional filters
- Loading branch information
1 parent
533f14e
commit e908e64
Showing
3 changed files
with
110 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { | ||
useAlerts, | ||
getPlatformAlertSelectors, | ||
getNodesAlertSelectors, | ||
getVolumesAlertSelectors, | ||
getNetworksAlertSelectors, | ||
getServicesAlertSelectors, | ||
getK8SMasterAlertSelectors, | ||
getBootstrapAlertSelectors, | ||
getMonitoringAlertSelectors, | ||
getAlertingAlertSelectors, | ||
getLoggingAlertSelectors, | ||
getDashboardingAlertSelectors, | ||
getIngressControllerAlertSelectors, | ||
getAuthenticationAlertSelectors, | ||
useHighestSeverityAlerts, | ||
} from '../alerts'; | ||
import AlertProvider from '../alerts/AlertProvider'; | ||
import { useAuthConfig } from '../auth/AuthConfigProvider'; | ||
import { useAuth } from '../auth/AuthProvider'; | ||
import { | ||
useConfig, | ||
useConfigRetriever, | ||
useDiscoveredViews, | ||
useLinkOpener, | ||
} from '../initFederation/ConfigurationProviders'; | ||
import { useShellConfig } from '../initFederation/ShellConfigProvider'; | ||
import { useShellThemeSelector } from '../initFederation/ShellThemeSelectorProvider'; | ||
import { useDeployedApps } from '../initFederation/UIListProvider'; | ||
import { useLanguage } from '../navbar/lang'; | ||
|
||
type ShellHooks = { | ||
useAuthConfig: typeof useAuthConfig; | ||
useAuth: typeof useAuth; | ||
useConfigRetriever: typeof useConfigRetriever; | ||
useDiscoveredViews: typeof useDiscoveredViews; | ||
useShellConfig: typeof useShellConfig; | ||
useLanguage: typeof useLanguage; | ||
useConfig: typeof useConfig; | ||
useLinkOpener: typeof useLinkOpener; | ||
useDeployedApps: typeof useDeployedApps; | ||
useShellThemeSelector: typeof useShellThemeSelector; | ||
}; | ||
|
||
type ShellAlerts = { | ||
AlertsProvider: typeof AlertProvider; | ||
alertHooks: { | ||
useAlerts: typeof useAlerts; | ||
useHighestSeverityAlerts: typeof useHighestSeverityAlerts; | ||
}; | ||
alertSelectors: { | ||
getPlatformAlertSelectors: typeof getPlatformAlertSelectors; | ||
getNodesAlertSelectors: typeof getNodesAlertSelectors; | ||
getVolumesAlertSelectors: typeof getVolumesAlertSelectors; | ||
getNetworksAlertSelectors: typeof getNetworksAlertSelectors; | ||
getServicesAlertSelectors: typeof getServicesAlertSelectors; | ||
getK8SMasterAlertSelectors: typeof getK8SMasterAlertSelectors; | ||
getBootstrapAlertSelectors: typeof getBootstrapAlertSelectors; | ||
getMonitoringAlertSelectors: typeof getMonitoringAlertSelectors; | ||
getAlertingAlertSelectors: typeof getAlertingAlertSelectors; | ||
getLoggingAlertSelectors: typeof getLoggingAlertSelectors; | ||
getDashboardingAlertSelectors: typeof getDashboardingAlertSelectors; | ||
getIngressControllerAlertSelectors: typeof getIngressControllerAlertSelectors; | ||
getAuthenticationAlertSelectors: typeof getAuthenticationAlertSelectors; | ||
}; | ||
}; | ||
|
||
export const shellHooks: ShellHooks = { | ||
useAuthConfig, | ||
useAuth, | ||
useConfigRetriever, | ||
useDiscoveredViews, | ||
useShellConfig, | ||
useLanguage, | ||
useConfig, | ||
useLinkOpener, | ||
useDeployedApps, | ||
useShellThemeSelector, | ||
}; | ||
|
||
export const shellAlerts: ShellAlerts = { | ||
AlertsProvider: AlertProvider, | ||
alertHooks: { | ||
useAlerts, | ||
useHighestSeverityAlerts, | ||
}, | ||
alertSelectors: { | ||
getPlatformAlertSelectors, | ||
getNodesAlertSelectors, | ||
getVolumesAlertSelectors, | ||
getNetworksAlertSelectors, | ||
getServicesAlertSelectors, | ||
getK8SMasterAlertSelectors, | ||
getBootstrapAlertSelectors, | ||
getMonitoringAlertSelectors, | ||
getAlertingAlertSelectors, | ||
getLoggingAlertSelectors, | ||
getDashboardingAlertSelectors, | ||
getIngressControllerAlertSelectors, | ||
getAuthenticationAlertSelectors, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters