• Log inStart now

On August 31, 2024, we're EOLing developer.newrelic.com. All relevant content has been migrated to docs.newrelic.com.

navigation

Usage

import { navigation } from 'nr1'

API methods

navigation.getOpenEntityLocation

function (
entityGuid: string

GUID of the entity to open.

) => Location

navigation.getOpenLauncherLocation

function (
launcher: Launcher

Launcher to open.

) => Location

navigation.getOpenNerdletLocation

function (
nerdlet: Nerdlet

Nerdlet to replace current nerdlet with.

) => Location

navigation.getOpenOverlayLocation

function (
overlay: Overlay

Overlay you want to open.

) => Location

navigation.getOpenStackedEntityLocation

function (
entityGuid: string

GUID of the entity to open.

) => Location

navigation.getOpenStackedNerdletLocation

function (
nerdlet: Nerdlet

Nerdlet to open as stacked nerdlet.

) => Location

navigation.getReplaceNerdletLocation

function (
nerdlet: Nerdlet

Nerdlet to replace current nerdlet with.

) => Location

navigation.openEntity

function (
entityGuid: string,

GUID of the entity to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => undefined

navigation.openLauncher

function (
launcher: Launcher,

Launcher to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => void

navigation.openNerdlet

function (
nerdlet: Nerdlet,

Nerdlet to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => void

navigation.openOverlay

function (
overlay: Overlay,

Overlay you want to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => void

navigation.openStackedEntity

function (
entityGuid: string,

GUID of the entity to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => undefined

navigation.openStackedNerdlet

function (
nerdlet: Nerdlet,

Nerdlet to open as stacked nerdlet.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => void

navigation.replaceNerdlet

function (
nerdlet: Nerdlet,

GUID of the entity to open.

urlStateOptions: UrlStateOptions

Options for the URL state.

) => void

Type definitions

Nerdlet

{
id: string,

Id of the nerdlet. You can specify the full nerdlet id: <nerdpack-id>.<nerdlet-id> (i.e. "8ba28fe4-5362-4f7f-8f9a-4b8c6c39d8a6.my-nerdlet") or simply <nerdlet-id> (i.e. "my-nerdlet"). In the latter case, the nerdlet will be treated as if it belongs to the current nerdpack, meaning that the nerdpack id is automatically added by the platform.

urlState: Object,

State of the nerdlet which is persisted in the url.

}

UrlStateOptions

{
replaceHistory: boolean,

If true, the current entry in the browser history will be replaced with the new one.

}

Overlay

{
id: string,

Id of the overlay to be opened, for example nr1-core.search.

urlState: Object,

State of the overlay which is persisted in the url.

}

Launcher

{
id: string,

Id of the launcher, for example nr1-core.explorer.

nerdlet: Nerdlet,

Nerdlet to be opened in the launcher. If not provided, the root nerdlet of the launcher will be opened.

stackedNerdlets: Nerdlet[],

Nerdlet to be opened as stacked nerdlets.

}

Location

{
pathname: string,

String representing the path to link to.

search: string,

String representing query parameters.

hash: string,

String to put in the URL as hash, e.g. #entities.

}
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.