@@ -3,16 +3,7 @@ import React from 'react';
33import type { Store } from '@reduxjs/toolkit' ;
44import type { History } from 'history' ;
55
6- import { getLogsLink as getLogsLinkDefault } from '../../utils/logs' ;
7- import type {
8- GetLogsLink ,
9- GetMonitoringClusterLink ,
10- GetMonitoringLink ,
11- } from '../../utils/monitoring' ;
12- import {
13- getMonitoringClusterLink as getMonitoringClusterLinkDefault ,
14- getMonitoringLink as getMonitoringLinkDefault ,
15- } from '../../utils/monitoring' ;
6+ import { uiFactory } from '../../uiFactory/uiFactory' ;
167import { App , AppSlots } from '../App' ;
178import type { YDBEmbeddedUISettings } from '../UserSettings/settings' ;
189
@@ -22,32 +13,21 @@ import {ExtendedTenant} from './ExtendedTenant/ExtendedTenant';
2213export interface AppWithClustersProps {
2314 store : Store ;
2415 history : History ;
25- getLogsLink ?: GetLogsLink ;
26- getMonitoringLink ?: GetMonitoringLink ;
27- getMonitoringClusterLink ?: GetMonitoringClusterLink ;
2816 userSettings ?: YDBEmbeddedUISettings ;
2917 children ?: React . ReactNode ;
3018}
3119
32- export function AppWithClusters ( {
33- store,
34- history,
35- getLogsLink = getLogsLinkDefault ,
36- getMonitoringLink = getMonitoringLinkDefault ,
37- getMonitoringClusterLink = getMonitoringClusterLinkDefault ,
38- userSettings,
39- children,
40- } : AppWithClustersProps ) {
20+ export function AppWithClusters ( { store, history, userSettings, children} : AppWithClustersProps ) {
4121 return (
4222 < App store = { store } history = { history } userSettings = { userSettings } >
4323 < AppSlots . ClusterSlot >
4424 { ( { component} ) => {
4525 return (
4626 < ExtendedCluster
4727 component = { component }
48- getLogsLink = { getLogsLink }
49- getMonitoringLink = { getMonitoringLink }
50- getMonitoringClusterLink = { getMonitoringClusterLink }
28+ getLogsLink = { uiFactory . getLogsLink }
29+ getMonitoringLink = { uiFactory . getMonitoringLink }
30+ getMonitoringClusterLink = { uiFactory . getMonitoringClusterLink }
5131 />
5232 ) ;
5333 } }
@@ -57,8 +37,8 @@ export function AppWithClusters({
5737 return (
5838 < ExtendedTenant
5939 component = { component }
60- getLogsLink = { getLogsLink }
61- getMonitoringLink = { getMonitoringLink }
40+ getLogsLink = { uiFactory . getLogsLink }
41+ getMonitoringLink = { uiFactory . getMonitoringLink }
6242 />
6343 ) ;
6444 } }
0 commit comments