Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable navlink depending on app status
Browse files Browse the repository at this point in the history
pgayvallet committed Nov 19, 2019
1 parent 038ae4e commit 4aa0e2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/public/chrome/nav_links/nav_links_service.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import { sortBy } from 'lodash';
import { BehaviorSubject, ReplaySubject, Observable, combineLatest } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { NavLinkWrapper, ChromeNavLinkUpdateableFields, ChromeNavLink } from './nav_link';
import { App, InternalApplicationStart, LegacyApp } from '../../application';
import { App, AppStatus, InternalApplicationStart, LegacyApp } from '../../application';
import { HttpStart } from '../../http';

interface StartDeps {
@@ -112,6 +112,7 @@ export class NavLinksService {
appId,
new NavLinkWrapper({
...app,
disabled: app.status === AppStatus.inaccessibleWithDisabledNavLink,
legacy: isLegacyApp(app),
baseUrl: isLegacyApp(app)
? relativeToAbsolute(http.basePath.prepend(app.appUrl))

0 comments on commit 4aa0e2c

Please sign in to comment.