mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* Rename 'Snapshot' to 'Inventory'. * Use new route in functional tests. * Internationalize tab titles. * Add old route for bookmark compatibility.
This commit is contained in:
parent
2710854caf
commit
fc6dddfa6a
4 changed files with 18 additions and 9 deletions
|
@ -46,18 +46,24 @@ export const InfrastructurePage = injectI18n(({ match, intl }: InfrastructurePag
|
|||
<RoutedTabs
|
||||
tabs={[
|
||||
{
|
||||
title: 'Snapshot',
|
||||
path: `${match.path}/snapshot`,
|
||||
title: intl.formatMessage({
|
||||
id: 'xpack.infra.homePage.inventoryTabTitle',
|
||||
defaultMessage: 'Inventory',
|
||||
}),
|
||||
path: `${match.path}/inventory`,
|
||||
},
|
||||
{
|
||||
title: 'Metrics explorer',
|
||||
title: intl.formatMessage({
|
||||
id: 'xpack.infra.homePage.metricsExplorerTabTitle',
|
||||
defaultMessage: 'Metrics explorer',
|
||||
}),
|
||||
path: `${match.path}/metrics-explorer`,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
<Switch>
|
||||
<Route path={`${match.path}/snapshot`} component={SnapshotPage} />
|
||||
<Route path={`${match.path}/inventory`} component={SnapshotPage} />
|
||||
<Route
|
||||
path={`${match.path}/metrics-explorer`}
|
||||
render={props => (
|
||||
|
|
|
@ -26,13 +26,16 @@ const PageRouterComponent: React.SFC<RouterProps> = ({ history, uiCapabilities }
|
|||
<Router history={history}>
|
||||
<Switch>
|
||||
{uiCapabilities.infrastructure.show && (
|
||||
<Redirect from="/" exact={true} to="/infrastructure/snapshot" />
|
||||
<Redirect from="/" exact={true} to="/infrastructure/inventory" />
|
||||
)}
|
||||
{uiCapabilities.infrastructure.show && (
|
||||
<Redirect from="/infrastructure" exact={true} to="/infrastructure/snapshot" />
|
||||
<Redirect from="/infrastructure" exact={true} to="/infrastructure/inventory" />
|
||||
)}
|
||||
{uiCapabilities.infrastructure.show && (
|
||||
<Redirect from="/home" exact={true} to="/infrastructure/snapshot" />
|
||||
<Redirect from="/infrastructure/snapshot" exact={true} to="/infrastructure/inventory" />
|
||||
)}
|
||||
{uiCapabilities.infrastructure.show && (
|
||||
<Redirect from="/home" exact={true} to="/infrastructure/inventory" />
|
||||
)}
|
||||
{uiCapabilities.logs.show && <Route path="/logs" component={LogsPage} />}
|
||||
{uiCapabilities.infrastructure.show && (
|
||||
|
|
|
@ -449,7 +449,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa
|
|||
});
|
||||
|
||||
it(`infrastructure snapshot page renders not found page`, async () => {
|
||||
await PageObjects.common.navigateToActualUrl('infraOps', 'infrastructure/snapshot', {
|
||||
await PageObjects.common.navigateToActualUrl('infraOps', 'infrastructure/inventory', {
|
||||
ensureCurrentUrl: false,
|
||||
shouldLoginIfPrompted: false,
|
||||
});
|
||||
|
|
|
@ -137,7 +137,7 @@ export default function({ getPageObjects, getService }: KibanaFunctionalTestDefa
|
|||
});
|
||||
|
||||
it(`infrastructure snapshot page renders not found page`, async () => {
|
||||
await PageObjects.common.navigateToActualUrl('infraOps', 'infrastructure/snapshot', {
|
||||
await PageObjects.common.navigateToActualUrl('infraOps', 'infrastructure/inventory', {
|
||||
basePath: '/s/custom_space',
|
||||
ensureCurrentUrl: false,
|
||||
shouldLoginIfPrompted: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue