Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UrlManager

Hierarchy

  • UrlManager

Implements

Index

Constructors

constructor

  • Creates an instance of UrlManager.

    Parameters

    • baseUrl: string

      The base URL of the app, off which the path would be constructed.

      A note on paths

      Paths are more 'elegant' but require some backend configuration to properly handle things like links, tab duplications, reloads, etc. If the backend cannot handle this (eg, being served off GH-Pages), then the path support must be disabled. The application can instead use a URL parameter named src:url. URLs on this parameter are assumed to be relative, but may be full cross-origin URLs if the protocol is specified and URL-encoded. Eg, ?src:url=http%3A%2F%2Fexample.org%2Fmy-cool-thing.dashboard.

      When using src:url, the dashboard should be treated as an 'imported' dashboard and will thus have no name or path. When the path is set, it will clear the src:url parameter.

    Returns UrlManager

Properties

Private Optional _importedDashboard

_importedDashboard: DashboardSerializer.ISerializedDashboard

Private Optional _importedDashboardKey

_importedDashboardKey: undefined | string

Private _isDisposed

_isDisposed: boolean = false

Private _onDashboardImport

_onDashboardImport: Subject<ISerializedDashboard> = new Subject<DashboardSerializer.ISerializedDashboard>()

Private _onPathChange

_onPathChange: Subject<string> = new Subject<string>()

Private _onQueryChange

_onQueryChange: Subject<object> = new Subject<Readonly<URLSearchParams>>()

Private _path

_path: string

Private _query

_query: Readonly<URLSearchParams>

Private baseUrl

baseUrl: string

Static Private ParameterBlacklist

ParameterBlacklist: string[] = ["src:url",]

URL Parameter Blacklist

Any parameter whose name matches an entry in this blacklist will be excluded from the parameters object exposed by this class.

static

Accessors

importedDashboard

  • get importedDashboard(): undefined | ISerializedDashboard
  • Returns undefined | ISerializedDashboard

isDisposed

  • get isDisposed(): boolean

onDashboardImport

  • get onDashboardImport(): Subject<ISerializedDashboard>
  • Returns Subject<ISerializedDashboard>

onPathChange

  • get onPathChange(): Observable<string>
  • Returns Observable<string>

onQueryChange

  • get onQueryChange(): Observable<Readonly<URLSearchParams>>
  • Returns Observable<Readonly<URLSearchParams>>

path

  • get path(): string
  • set path(newPath: string): void
  • Returns string

  • Parameters

    • newPath: string

    Returns void

query

  • get query(): object
  • set query(params: Readonly<URLSearchParams>): void
  • Returns object

  • Parameters

    • params: Readonly<URLSearchParams>

    Returns void

Methods

dispose

  • dispose(): void

handleEvent

  • handleEvent(): void

makeUrlFromComponents

  • makeUrlFromComponents(path: string, query: string): string

Private readQuery

  • readQuery(): string

Private removeBlacklistedParams

  • removeBlacklistedParams(): Record<string, string>
  • Returns Record<string, string>

Protected setOverrides

  • setOverrides(overrides: Record<string, string>): void
  • Parameters

    • overrides: Record<string, string>

    Returns void

Private setUrlFromCurrentState

  • setUrlFromCurrentState(): string

Generated using TypeDoc