default-subscriptions/default-subscriptions.component.ts
The component shows the main view for managing default subscriptions configuration.
selector | c8y-default-subscriptions |
templateUrl | ./default-subscriptions.component.html |
Properties |
Methods |
|
constructor(fb: FormBuilder, defaultSubscriptionsService: DefaultSubscriptionsService, alertService: AlertService)
|
||||||||||||
Parameters :
|
Async initForm |
initForm()
|
Loads the list of apps, builds the form and hooks value change events for override switches.
Returns :
any
|
isEmptyView |
isEmptyView()
|
Checks if there are no application rows to be displayed.
Returns :
boolean
|
isSubscribed | ||||||||||||
isSubscribed(app: IApplication, subscribedApps: PartialAppsList)
|
||||||||||||
Checks if given application is subscribed (present in the given list of applications).
Parameters :
Returns :
boolean
True, if the application is present in the list. |
Async ngOnInit |
ngOnInit()
|
Initializes the loading of the form and the current settings.
Returns :
any
|
Async save |
save()
|
Saves the current value of form object to backend.
Returns :
any
|
shouldShowAppRow | ||||
shouldShowAppRow(appRowRawValue)
|
||||
Checks if given application row should be displayed. The row is displayed when any of its checkboxes is selected or any of the lists is being overridden.
Parameters :
Returns :
boolean
|
currentDefaultSubscriptions |
Type : DefaultSubscriptions
|
Default subscriptions defined in the current tenant. |
disabledCheckboxHint |
Default value : gettext('Select "Override inherited" to enable.')
|
Hint text for disabled checkboxes. |
form |
Type : FormGroup
|
Form object. |
loading |
Type : boolean
|
Whether the configuration is being loaded. |
parentDefaultSubscriptions |
Type : DefaultSubscriptions
|
Default subscriptions inherited from parent tenant. |