@@ -3,12 +3,7 @@ import React from 'react';
3
3
import type { Store } from '@reduxjs/toolkit' ;
4
4
import type { History } from 'history' ;
5
5
6
- import type { GetLogsLink } from '../../utils/logs' ;
7
- import type { GetMonitoringClusterLink , GetMonitoringLink } from '../../utils/monitoring' ;
8
- import {
9
- getMonitoringClusterLink as getMonitoringClusterLinkDefault ,
10
- getMonitoringLink as getMonitoringLinkDefault ,
11
- } from '../../utils/monitoring' ;
6
+ import { uiFactory } from '../../uiFactory/uiFactory' ;
12
7
import { App , AppSlots } from '../App' ;
13
8
import type { YDBEmbeddedUISettings } from '../UserSettings/settings' ;
14
9
@@ -18,32 +13,21 @@ import {ExtendedTenant} from './ExtendedTenant/ExtendedTenant';
18
13
export interface AppWithClustersProps {
19
14
store : Store ;
20
15
history : History ;
21
- getLogsLink ?: GetLogsLink ;
22
- getMonitoringLink ?: GetMonitoringLink ;
23
- getMonitoringClusterLink ?: GetMonitoringClusterLink ;
24
16
userSettings ?: YDBEmbeddedUISettings ;
25
17
children ?: React . ReactNode ;
26
18
}
27
19
28
- export function AppWithClusters ( {
29
- store,
30
- history,
31
- getLogsLink,
32
- getMonitoringLink = getMonitoringLinkDefault ,
33
- getMonitoringClusterLink = getMonitoringClusterLinkDefault ,
34
- userSettings,
35
- children,
36
- } : AppWithClustersProps ) {
20
+ export function AppWithClusters ( { store, history, userSettings, children} : AppWithClustersProps ) {
37
21
return (
38
22
< App store = { store } history = { history } userSettings = { userSettings } >
39
23
< AppSlots . ClusterSlot >
40
24
{ ( { component} ) => {
41
25
return (
42
26
< ExtendedCluster
43
27
component = { component }
44
- getLogsLink = { getLogsLink }
45
- getMonitoringLink = { getMonitoringLink }
46
- getMonitoringClusterLink = { getMonitoringClusterLink }
28
+ getLogsLink = { uiFactory . getLogsLink }
29
+ getMonitoringLink = { uiFactory . getMonitoringLink }
30
+ getMonitoringClusterLink = { uiFactory . getMonitoringClusterLink }
47
31
/>
48
32
) ;
49
33
} }
@@ -53,8 +37,8 @@ export function AppWithClusters({
53
37
return (
54
38
< ExtendedTenant
55
39
component = { component }
56
- getLogsLink = { getLogsLink }
57
- getMonitoringLink = { getMonitoringLink }
40
+ getLogsLink = { uiFactory . getLogsLink }
41
+ getMonitoringLink = { uiFactory . getMonitoringLink }
58
42
/>
59
43
) ;
60
44
} }
0 commit comments