context-dashboard/dashboard-availability.component.ts
OnInit
| selector | c8y-dashboard-availability |
| standalone | true |
| imports |
C8yTranslatePipe
ReactiveFormsModule
PopoverModule
FormsModule
NgIf
SelectModule
|
| templateUrl | ./dashboard-availability.component.html |
Properties |
Methods |
|
Inputs |
Outputs |
Accessors |
constructor(userGroupService: UserGroupService, gainsightService: GainsightService, permissions: Permissions)
|
||||||||||||
|
Parameters :
|
| globalRolesIds |
Type : DashboardGlobalRoles
|
|
Ids of global roles assigned to the dashboard or a string "all" indicating the selection of all global roles. The value undefined is treated as equivalent to 'all'. |
| globalRolesIdsChange |
Type : EventEmitter
|
| Async ngOnInit |
ngOnInit()
|
|
Returns :
any
|
| onSelected | ||||||
onSelected(items: Item[])
|
||||||
|
Parameters :
Returns :
void
|
| globalRolesItems |
Type : Item[]
|
Default value : []
|
| globalRolesItemsSelected |
Type : Item[]
|
Default value : []
|
| selectHidden |
Type : unknown
|
Default value : false
|
| globalRolesIds | ||||||
getglobalRolesIds()
|
||||||
|
Ids of global roles assigned to the dashboard or a string "all" indicating the selection of all global roles. The value undefined is treated as equivalent to 'all'.
Returns :
DashboardGlobalRoles
|
||||||
setglobalRolesIds(ids: DashboardGlobalRoles)
|
||||||
|
Parameters :
Returns :
void
|
<fieldset class="c8y-fieldset c8y-fieldset--lg">
<legend>{{ 'Availability`of dashboard based on permissions`' | translate }}</legend>
<c8y-form-group>
<label for="availability">
<span
class="m-r-4"
id="availability"
>
{{ 'Global roles' | translate }}
</span>
<button
class="btn-help btn-help--sm"
[attr.aria-label]="'Help' | translate"
popover="{{
'Select the global roles for which the dashboard will be available' | translate
}}"
placement="right"
triggers="focus"
container="body"
type="button"
></button>
</label>
<c8y-select-legacy
*ngIf="!selectHidden"
[items]="globalRolesItems"
[selected]="globalRolesItemsSelected"
(onChange)="onSelected($event)"
></c8y-select-legacy>
<p
class="form-control-static"
*ngIf="selectHidden"
>
{{ "You don't have permission to change global roles." | translate }}
</p>
</c8y-form-group>
</fieldset>