File

global-context/core/global-context-config.component.ts

Description

GlobalContextConfigComponent

Presentation + state coordination for the widget's Global Context controls.

  • Hydrates a component-scoped store from the incoming config input.
  • Renders Live/History configuration controls via ConfigurationControlsComponent.
  • Emits a normalized GlobalContextState when user changes either the tab (refreshOption) or any control value within the current tab.
  • Does not emit during initial hydrate; emissions only happen on user actions.

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor()

Inputs

configInput
Type : GlobalContextState
Required :  true
Default value : { alias: 'config' }
historySnapshotInput
Type : GlobalContextState | null
Default value : null, { alias: 'historySnapshot' }
isLoading
Default value : false
liveSnapshotInput
Type : GlobalContextState | null
Default value : null, { alias: 'liveSnapshot' }
widgetControls
Type : WidgetControls
Required :  true

Outputs

globalContextChange
Type : GlobalContextState
refresh
Type : void

Methods

onConfigurationChanges
onConfigurationChanges(changes: Partial)
Parameters :
Name Type Optional
changes Partial<GlobalContextState> No
Returns : void

Properties

Readonly activeConfig
Type : unknown
Default value : computed(() => this.store.activeConfig())
Readonly historyConfig
Type : unknown
Default value : computed(() => this.store.historyState())
isExpanded
Type : unknown
Default value : false
Readonly liveConfig
Type : unknown
Default value : computed(() => this.store.liveState())
Readonly refreshOption
Type : unknown
Default value : computed(() => this.store.refreshOption())
Readonly settings
Type : unknown
Default value : computed(() => this.store.settings())
Readonly supportedModes
Type : unknown
Default value : computed( () => this.widgetControls().supportedModes ?? [REFRESH_OPTION.LIVE, REFRESH_OPTION.HISTORY] )
<c8y-configuration-controls
  [settings]="settings()"
  [controlsDisplayMode]="'horizontal'"
  [tabsOutletName]="'verticalTabOutletForConfigurationModes'"
  [activeMode]="refreshOption()"
  [liveContext]="liveConfig()"
  [historyContext]="historyConfig()"
  [supportedModes]="supportedModes()"
  (contextChange)="onConfigurationChanges($event)"
  (refreshOptionChange)="onConfigurationChanges({ refreshOption: $event })"
></c8y-configuration-controls>

results matching ""

    No results matching ""