sub-assets/groups.component.ts
OnInit
OnDestroy
selector | c8y-groups-name |
templateUrl | ./groups.component.html |
Properties |
Methods |
constructor(permissions: Permissions, subAssetsService: SubAssetsService, moduleConfig: SubAssetsConfig, activeRoute: ActivatedRoute, router: Router)
|
||||||||||||||||||
Parameters :
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
onAddGroupClick |
onAddGroupClick()
|
Returns :
void
|
columns |
Type : Column[]
|
Default value : []
|
destroyed |
Type : Subject<void>
|
Default value : new Subject()
|
filterable |
Default value : true
|
Public moduleConfig |
Type : SubAssetsConfig
|
Decorators :
@Inject(SUB_ASSETS_CONFIG)
|
refresh |
Type : EventEmitter<void>
|
Default value : new EventEmitter()
|
shouldDisableAddGroup |
Default value : false
|
showAddGroup |
Default value : signal(false)
|
sortable |
Default value : true
|
<c8y-title>
{{ moduleConfig.name | translate }}
</c8y-title>
<c8y-breadcrumb>
<c8y-breadcrumb-item
icon="c8y-group-open"
label="{{ moduleConfig.name | translate }}"
></c8y-breadcrumb-item>
</c8y-breadcrumb>
<c8y-action-bar-item
[placement]="'right'"
*ngIf="moduleConfig.showAddGroupBtn"
>
<button
class="btn btn-link"
title="{{ 'Add group' | translate }}"
(click)="onAddGroupClick()"
[disabled]="shouldDisableAddGroup"
[attr.data-cy]="'groups-add-group-button'"
>
<i
class="m-r-4"
c8yIcon="plus-circle"
></i>
{{ 'Add group' | translate }}
</button>
</c8y-action-bar-item>
<c8y-help
src="/docs/device-management-application/grouping-devices/#grouping-devices"
*ngIf="moduleConfig.showGroupsContextHelp"
></c8y-help>
<div [ngClass]="{ drawerOpen: showAddGroup()}">
<div class="bottom-drawer">
<c8y-add-group
[refresh]="refresh"
(onCancel)="onAddGroupClick()"
*ngIf="showAddGroup()"
></c8y-add-group>
</div>
</div>
<c8y-sub-assets-grid
class="content-fullpage d-flex d-col border-top border-bottom"
[refresh]="refresh"
[filterable]="filterable"
[sortable]="sortable"
[columns]="columns"
[columnsConfigKey]="'sub-assets-grid'"
[baseQuery]="moduleConfig.baseQuery"
></c8y-sub-assets-grid>