operations/operations.module.ts
This module sets up the 'Device control' view. To use the module as it is you need to also import the '@c8y/ng1-modules/devicemanagement-deviceControlList/cumulocity.json' ng1 module in a hybrid application. By importing it in your custom application you will have:
Additionaly you can use the modules imported by OperationsModule separately to achieve the results you wish to have in your application, e.g.:
StepperBulkType*Module
modules (StepperBulkTypeConfigurationModule,
StepperBulkTypeFirmwareModule, StepperBulkTypeSoftwareModule,
StepperBulkTypeDeviceProfileModule) to have the option
to create new bulk operation in a guided stepper dialog. * import { BulkOperationsServiceModule } from '@c8y/ngx-components/operations/bulk-operations-service';
* import { BulkOperationsListModule } from '@c8y/ngx-components/operations/bulk-operations-list';
*
* @NgModule({
* imports: [
* [...]
* BulkOperationsServiceModule,
* BulkOperationsListModule
* ],
* [...]
* })
* export class CustomOperationsModule {}
respectively
* import { BulkOperationsStepperContainerModule } from '@c8y/ngx-components/operations/bulk-operations-stepper-container';
* import { BulkOperationsServiceModule } from '@c8y/ngx-components/operations/bulk-operations-service';
* import { BulkOperationsListModule } from '@c8y/ngx-components/operations/bulk-operations-list';
* import { StepperBulkTypeSoftwareModule } from '@c8y/ngx-components/operations/stepper-bulk-type-software';
*
* @NgModule({
* imports: [
* [...]
* BulkOperationsServiceModule,
* BulkOperationsListModule,
* BulkOperationsStepperContainerModule,
* StepperBulkTypeSoftwareModule
* ],
* [...]
* })
* export class CustomOperationsModule {}
You can provide your own bulk operation stepper by registering a component via the HOOK_LIST_BULK_TYPE
:
* import {
* HOOK_LIST_BULK_TYPE,
* baseUrl
* } from '@c8y/ngx-components/operations/bulk-operations-service';
*
* [...]
*
* providers: [
* {
* provide: HOOK_LIST_BULK_TYPE,
* useValue: {
* type: 'my-bulk-op-type',
* c8yIcon: 'c8y-tools',
* name: 'My bulk op type',
* path: `${baseUrl}my-type`,
* component: StepperMyBulkTypeComponent,
* fragments: ['c8y_MyType'],
* selected: false
* },
* multi: true
* }
* ]