Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change location of I18nProvider #6723

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect, useState } from 'react';
import { getPlugins } from '../../../../kibana-services';
import { I18nProvider } from '@osd/i18n/react';
import useSearchBar from '../../../common/search-bar/use-search-bar';
import {
EuiFlexItem,
Expand Down Expand Up @@ -133,7 +132,7 @@ export const DashboardTabsPanels = ({
},
};
return (
<I18nProvider>
<>
{isDataSourceLoading && !dataSource ? (
<LoadingSpinner />
) : (
Expand Down Expand Up @@ -194,6 +193,6 @@ export const DashboardTabsPanels = ({
)}
</>
) : null}
</I18nProvider>
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
EuiSpacer,
EuiProgress,
} from '@elastic/eui';
import { I18nProvider } from '@osd/i18n/react';

import { clusterReq, clusterNodes } from '../configuration/utils/wz-fetch';
import { compose } from 'redux';
Expand Down Expand Up @@ -160,57 +161,59 @@ export class WzStatisticsOverview extends Component {

render() {
return (
<EuiPage style={{ background: 'transparent' }}>
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTitle>
<h2>Statistics</h2>
</EuiTitle>
<I18nProvider>
<EuiPage style={{ background: 'transparent' }}>
<EuiPanel>
<EuiFlexGroup>
<EuiFlexItem>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTitle>
<h2>Statistics</h2>
</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
{this.props.configurationUIEditable && (
<EuiFlexItem grow={false}>
<RedirectAppLinks application={getCore().application}>
<EuiButtonEmpty
href={getCore().application.getUrlForApp(appSettings.id, {
path: '#/settings?tab=configuration&category=Task:Statistics',
})}
iconType='gear'
iconSide='left'
>
Settings
</EuiButtonEmpty>
</RedirectAppLinks>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
{this.props.configurationUIEditable && (
<EuiFlexItem grow={false}>
<RedirectAppLinks application={getCore().application}>
<EuiButtonEmpty
href={getCore().application.getUrlForApp(appSettings.id, {
path: '#/settings?tab=configuration&category=Task:Statistics',
})}
iconType='gear'
iconSide='left'
>
Settings
</EuiButtonEmpty>
</RedirectAppLinks>
)}
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText color='subdued'>
From here you can see daemon statistics.
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTabs>{this.renderTabs()}</EuiTabs>
</EuiFlexItem>
)}
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiText color='subdued'>
From here you can see daemon statistics.
</EuiText>
</EuiFlexItem>
</EuiFlexGroup>
<EuiFlexGroup>
<EuiFlexItem>
<EuiTabs>{this.renderTabs()}</EuiTabs>
</EuiFlexItem>
</EuiFlexGroup>
<EuiSpacer size={'m'} />
<DashboardTabsPanels
selectedTab={this.state.selectedTabId}
loadingNode={this.state.loadingNode}
isClusterMode={this.state.isClusterMode}
clusterNodes={this.state.clusterNodes}
clusterNodeSelected={this.state.clusterNodeSelected}
onSelectNode={this.onSelectNode}
/>
</EuiPanel>
</EuiPage>
</EuiFlexGroup>
<EuiSpacer size={'m'} />
<DashboardTabsPanels
selectedTab={this.state.selectedTabId}
loadingNode={this.state.loadingNode}
isClusterMode={this.state.isClusterMode}
clusterNodes={this.state.clusterNodes}
clusterNodeSelected={this.state.clusterNodeSelected}
onSelectNode={this.onSelectNode}
/>
</EuiPanel>
</EuiPage>
</I18nProvider>
);
}
}
Expand Down
Loading