File

sub-assets/groups.component.ts

Implements

OnInit OnDestroy

Metadata

Index

Properties
Methods

Constructor

constructor(permissions: Permissions, subAssetsService: SubAssetsService, moduleConfig: SubAssetsConfig, activeRoute: ActivatedRoute, router: Router)
Parameters :
Name Type Optional
permissions Permissions No
subAssetsService SubAssetsService No
moduleConfig SubAssetsConfig No
activeRoute ActivatedRoute No
router Router No

Methods

ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
onAddGroupClick
onAddGroupClick()
Returns : void

Properties

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>

results matching ""

    No results matching ""