UNPKG

@c8y/ngx-components

Version:

Angular modules for Cumulocity IoT applications

1 lines • 26.4 kB
{"version":3,"file":"c8y-ngx-components-device-shell.mjs","sources":["../../device-shell/command-templates/command-templates.directive.ts","../../device-shell/command-templates/command-templates.component.ts","../../device-shell/command-templates/command-templates.module.ts","../../device-shell/device-shell.guard.ts","../../device-shell/shared/device-shell.model.ts","../../device-shell/shared/device-shell.service.ts","../../device-shell/shared/device-shell-shared.module.ts","../../device-shell/shell/shell.component.ts","../../device-shell/shell/shell.component.html","../../device-shell/shell/shell.module.ts","../../device-shell/device-shell.module.ts","../../device-shell/c8y-ngx-components-device-shell.ts"],"sourcesContent":["import { Directive, ElementRef, EventEmitter, Injector, Output } from '@angular/core';\nimport { UpgradeComponent } from '@angular/upgrade/static';\n\n@Directive({\n selector: 'c8y-command-templates-directive',\n standalone: false\n})\nexport class CommandTemplates extends UpgradeComponent {\n @Output()\n close: EventEmitter<void>;\n\n @Output()\n dismiss: EventEmitter<void>;\n\n constructor(elementRef: ElementRef, injector: Injector) {\n super('c8yCommandTemplates', elementRef, injector);\n }\n}\n","import { Component, EventEmitter, Injector } from '@angular/core';\nimport { BsModalRef } from 'ngx-bootstrap/modal';\n\n/* https://stackoverflow.com/a/65290658 */\nexport function rootScopeCommandTemplateFactory($injector: Injector) {\n return $injector.get('$rootScope').$new();\n}\n\n@Component({\n selector: 'c8y-command-templates',\n template: `<c8y-command-templates-directive\n (close)=\"modalRef.hide(); onTemplateSelected.next($event)\"\n (dismiss)=\"modalRef.hide()\"\n ></c8y-command-templates-directive>`,\n providers: [\n {\n deps: ['$injector'],\n provide: '$scope',\n useFactory: rootScopeCommandTemplateFactory\n }\n ],\n standalone: false\n})\nexport class CommandTemplatesComponent {\n onTemplateSelected: EventEmitter<object> = new EventEmitter();\n\n constructor(public modalRef: BsModalRef) {}\n}\n","import { NgModule } from '@angular/core';\nimport { CommandTemplatesComponent } from './command-templates.component';\nimport { CommandTemplates } from './command-templates.directive';\n\n@NgModule({\n declarations: [CommandTemplates, CommandTemplatesComponent],\n exports: [CommandTemplatesComponent]\n})\nexport class CommandTemplatesModule {}\n","import { Injectable } from '@angular/core';\nimport { ActivatedRouteSnapshot } from '@angular/router';\n\n@Injectable()\nexport class DeviceShellGuard {\n private readonly operation = 'c8y_Command';\n\n canActivate(route: ActivatedRouteSnapshot) {\n const device = route.data.contextData || route.parent.data.contextData;\n const supportedOperations = (device && device.c8y_SupportedOperations) || [];\n return supportedOperations.indexOf(this.operation) >= 0;\n }\n}\n","export enum CommandDeliveryType {\n DEFAULT = 'Default',\n SMS = 'SMS'\n}\n\nexport interface DeliveryType {\n name: string;\n default?: boolean;\n}\n\nexport interface Command {\n id: string;\n name: string;\n text: string;\n deliveryTypes: string[];\n command: string;\n category: string;\n}\n","import { Injectable } from '@angular/core';\nimport { IOperation, IResult, OperationService } from '@c8y/client';\nimport { gettext, OptionsService } from '@c8y/ngx-components';\nimport { Command, CommandDeliveryType, DeliveryType } from './device-shell.model';\n\n@Injectable()\nexport class DeviceShellService {\n constructor(private optionsService: OptionsService, private operationService: OperationService) {}\n\n getDeliveryTypes(): DeliveryType[] {\n return [\n {\n name: gettext(CommandDeliveryType.DEFAULT),\n default: true\n },\n {\n name: gettext(CommandDeliveryType.SMS)\n }\n ];\n }\n\n async canSendCommandsViaSMS(): Promise<boolean> {\n return !!(await this.optionsService.getSystemOption('messaging', 'provider', false));\n }\n\n createCommandOperation(\n deviceId: string,\n command: Command,\n deliveryType: CommandDeliveryType\n ): Promise<IResult<IOperation>> {\n const operation: IOperation = {\n deviceId,\n description: gettext('Execute shell command') + (command.name ? `: ${command.name}` : ''),\n deliveryType: deliveryType === CommandDeliveryType.SMS ? CommandDeliveryType.SMS : undefined,\n c8y_Command: {\n text: command.text\n }\n };\n return this.operationService.create(operation);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DeviceShellService } from './device-shell.service';\n\n@NgModule({\n providers: [DeviceShellService]\n})\nexport class DeviceShellSharedModule {}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { IManagedObject, IOperation, IResultList, OperationService } from '@c8y/client';\nimport {\n AlertService,\n gettext,\n ManagedObjectRealtimeService,\n OperationRealtimeService\n} from '@c8y/ngx-components';\nimport { includes, isEmpty } from 'lodash-es';\nimport { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';\nimport { BehaviorSubject, Observable, of, pipe, Subject } from 'rxjs';\nimport { filter, map, startWith, takeUntil } from 'rxjs/operators';\nimport { CommandTemplatesComponent } from '../command-templates';\nimport { Command, CommandDeliveryType, DeliveryType, DeviceShellService } from '../shared';\n\n@Component({\n selector: 'c8y-device-shell',\n templateUrl: 'shell.component.html',\n providers: [OperationRealtimeService, ManagedObjectRealtimeService],\n standalone: false\n})\nexport class DeviceShellComponent implements OnInit, OnDestroy {\n device: IManagedObject = this.route.snapshot.parent.data.contextData;\n device$: Observable<IManagedObject> = of({} as any);\n deliveryTypes: Array<DeliveryType & { isSupportedByCommand?: boolean }> = (\n this.service.getDeliveryTypes() || []\n ).map(deliveryType => ({ ...deliveryType, isSupportedByCommand: true }));\n command: Command = {} as Command;\n smsEnabled = false;\n sendingCommand$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n operations: IResultList<IOperation>;\n filterPipe = pipe(\n map((operations: IOperation[]) =>\n (operations || []).filter((operation: IOperation) => !!operation.c8y_Command)\n )\n );\n\n executeViaLabel = gettext('Execute via ({{deliveryType}})');\n\n private destroyed$: Subject<void> = new Subject();\n\n constructor(\n public service: DeviceShellService,\n public operationRealtime: OperationRealtimeService,\n private moRealtime: ManagedObjectRealtimeService,\n private operationService: OperationService,\n private route: ActivatedRoute,\n private modalService: BsModalService,\n private alertService: AlertService\n ) {}\n\n async ngOnInit(): Promise<void> {\n this.smsEnabled = await this.service.canSendCommandsViaSMS();\n\n this.device$ = this.moRealtime.onUpdate$(this.device.id).pipe(startWith(this.device));\n\n this.operations = await this.operationService.list({\n deviceId: this.device.id,\n fragmentType: 'c8y_Command',\n dateFrom: new Date(0).toISOString(),\n dateTo: new Date().toISOString(),\n pageSize: 50,\n withTotalPages: true,\n revert: true\n });\n\n this.operationRealtime\n .onCreate$(this.device.id)\n .pipe(takeUntil(this.destroyed$))\n .subscribe(() => this.alertService.success(gettext('Command sent.')));\n\n this.operationRealtime\n .onUpdate$(this.device.id)\n .pipe(\n filter(op => op.failureReason !== 'Operation cancelled by user.'), // avoid duplicate alerts\n takeUntil(this.destroyed$)\n )\n .subscribe(() => this.alertService.success(gettext('Command status updated.')));\n }\n\n getPredefinedCommand() {\n const modal: BsModalRef<CommandTemplatesComponent> = this.modalService.show(\n CommandTemplatesComponent,\n {\n ariaDescribedby: 'modal-body',\n ariaLabelledBy: 'modal-title'\n }\n );\n modal.content.onTemplateSelected.pipe(takeUntil(this.destroyed$)).subscribe(result => {\n this.command = { ...(result as any).commandTemplate } as Command;\n this.deliveryTypes = this.deliveryTypes.map(deliveryType => ({\n ...deliveryType,\n isSupportedByCommand:\n isEmpty(this.command.deliveryTypes) ||\n includes(this.command.deliveryTypes, deliveryType.name)\n }));\n });\n }\n\n resetSupportedDeliveryTypes(): void {\n this.deliveryTypes = (this.service.getDeliveryTypes() || []).map(deliveryType => ({\n ...deliveryType,\n isSupportedByCommand: true\n }));\n }\n\n async execute(commandDeliveryType): Promise<void> {\n const useSMS = commandDeliveryType === CommandDeliveryType.SMS;\n if (useSMS && !this.smsEnabled) {\n this.alertService.warning(gettext('SMS transport is not configured.'));\n return;\n }\n this.sendingCommand$.next(true);\n\n await this.service.createCommandOperation(this.device.id, this.command, commandDeliveryType);\n\n this.command.text = '';\n this.command.name = '';\n this.resetSupportedDeliveryTypes();\n this.sendingCommand$.next(false);\n }\n\n ngOnDestroy(): void {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n}\n","<c8y-action-bar-item [placement]=\"'right'\">\n <c8y-realtime-btn [service]=\"operationRealtime\"></c8y-realtime-btn>\n</c8y-action-bar-item>\n\n<div class=\"card content-fullpage d-grid grid__col--6-6--md\">\n <div class=\"inner-scroll d-flex d-col bg-level-0\">\n <div class=\"card-header large-padding separator sticky-top\">\n <div class=\"card-title\">\n {{ 'Command' | translate }}\n </div>\n </div>\n\n <div class=\"card-block d-flex d-col flex-grow large-padding\">\n <div class=\"d-flex p-b-16\">\n <button\n class=\"btn btn-default btn-sm\"\n type=\"button\"\n (click)=\"getPredefinedCommand()\"\n [title]=\"'Display a list of predefined commands' | translate\"\n data-cy=\"shell--predefined-commands\"\n >\n {{ 'Predefined commands' | translate }}\n </button>\n\n <div class=\"m-l-auto\">\n <device-status [mo]=\"device$ | async\"></device-status>\n </div>\n </div>\n <textarea\n [attr.aria-label]=\"'Commands' | translate\"\n class=\"form-control inner-scroll flex-grow bg-level-2 text-monospace\"\n [(ngModel)]=\"command.text\"\n data-cy=\"shell-component--commands\"\n (ngModelChange)=\"$event || resetSupportedDeliveryTypes()\"\n placeholder=\"{{ 'Add commands or use predefined commands above.' | translate }}\"\n ></textarea>\n </div>\n\n <div class=\"card-footer large-padding separator\">\n <ng-container *ngFor=\"let deliveryType of deliveryTypes\">\n <button\n class=\"btn btn-primary\"\n type=\"button\"\n *ngIf=\"deliveryType.isSupportedByCommand\"\n [disabled]=\"!command?.text || (sendingCommand$ | async)\"\n (click)=\"execute(deliveryType.name)\"\n >\n <span\n [title]=\"\n deliveryType.default\n ? ('Execute' | translate)\n : (executeViaLabel | translate: { deliveryType: deliveryType.name })\n \"\n >\n {{\n deliveryType.default\n ? ('Execute' | translate)\n : (executeViaLabel | translate: { deliveryType: deliveryType.name })\n }}\n </span>\n </button>\n </ng-container>\n </div>\n </div>\n <div class=\"inner-scroll bg-level-1\">\n <div class=\"card-header large-padding separator sticky-top\">\n <div class=\"card-title\">\n {{ 'Operations' | translate }}\n </div>\n </div>\n <div class=\"card-block large-padding\">\n <c8y-operations-timeline\n [operations]=\"operations\"\n [sourceId]=\"device.id\"\n [filterPipe]=\"filterPipe\"\n [bodyTemplate]=\"timelineItemBody\"\n [footerTemplates]=\"[timelineItemFooter]\"\n [propertiesToHide]=\"['c8y_Command']\"\n ></c8y-operations-timeline>\n <ng-template #timelineItemBody let-operation>\n <small>{{ operation.c8y_Command?.text || operation.description }}</small>\n </ng-template>\n <ng-template #timelineItemFooter let-operation>\n <div *ngIf=\"operation.c8y_Command?.text\">\n <div class=\"legend form-block\" translate>Command</div>\n <!-- Keep this in a single line since `pre-text` will preserve all whitespaces in the `pre` tag.-->\n <pre class=\"p-8 text-pre\"><code>{{operation.c8y_Command.text}}</code></pre>\n </div>\n <div *ngIf=\"operation.c8y_Command?.result\">\n <div class=\"legend form-block\" translate>Response</div>\n <!-- Keep this in a single line since `pre-text` will preserve all whitespaces in the `pre` tag.-->\n <pre class=\"p-8 text-pre\"><code>{{operation.c8y_Command.result}}</code></pre>\n </div>\n </ng-template>\n </div>\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { CoreModule } from '@c8y/ngx-components';\nimport { OperationsTimelineModule } from '@c8y/ngx-components/operations/operations-timeline';\nimport { CommandTemplatesModule } from '../command-templates';\nimport { DeviceShellSharedModule } from '../shared';\nimport { DeviceShellComponent } from './shell.component';\n\n@NgModule({\n imports: [\n CommonModule,\n CoreModule,\n OperationsTimelineModule,\n CommandTemplatesModule,\n DeviceShellSharedModule\n ],\n declarations: [DeviceShellComponent],\n exports: [DeviceShellComponent]\n})\nexport class ShellModule {}\n","import { NgModule } from '@angular/core';\nimport { gettext, hookRoute, Route, ViewContext } from '@c8y/ngx-components';\nimport { DeviceShellGuard } from './device-shell.guard';\nimport { DeviceShellComponent, ShellModule } from './shell';\n\nconst DEVICE_SHELL_ROUTE: Route = {\n path: 'shell',\n context: ViewContext.Device,\n component: DeviceShellComponent,\n label: gettext('Shell'),\n icon: 'terminal',\n canActivate: [DeviceShellGuard]\n};\n\n@NgModule({\n imports: [ShellModule],\n providers: [DeviceShellGuard, hookRoute(DEVICE_SHELL_ROUTE)]\n})\nexport class DeviceShellModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.CommandTemplates","i1","i2","i1.DeviceShellService","i3","i5"],"mappings":";;;;;;;;;;;;;;;;;AAOM,MAAO,gBAAiB,SAAQ,gBAAgB,CAAA;IAOpD,WAAY,CAAA,UAAsB,EAAE,QAAkB,EAAA;AACpD,QAAA,KAAK,CAAC,qBAAqB,EAAE,UAAU,EAAE,QAAQ,CAAC;;+GARzC,gBAAgB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,KAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;AAC3C,oBAAA,UAAU,EAAE;AACb,iBAAA;sGAGC,KAAK,EAAA,CAAA;sBADJ;gBAID,OAAO,EAAA,CAAA;sBADN;;;ACRH;AACM,SAAU,+BAA+B,CAAC,SAAmB,EAAA;IACjE,OAAO,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE;AAC3C;MAiBa,yBAAyB,CAAA;AAGpC,IAAA,WAAA,CAAmB,QAAoB,EAAA;QAApB,IAAQ,CAAA,QAAA,GAAR,QAAQ;AAF3B,QAAA,IAAA,CAAA,kBAAkB,GAAyB,IAAI,YAAY,EAAE;;+GADlD,yBAAyB,EAAA,IAAA,EAAA,CAAA,E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