File

widgets/implementations/device-control-message/device-control-message-widget-view/device-control-message-widget-view.component.ts

Implements

OnChanges DynamicComponent OnDestroy OnInit

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(alert: AlertService, operation: OperationService, translate: TranslateService, dashboard: ContextDashboardComponent)
Parameters :
Name Type Optional
alert AlertService No
operation OperationService No
translate TranslateService No
dashboard ContextDashboardComponent No

Inputs

config
Type : literal type

Methods

ngOnChanges
ngOnChanges()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void
Async sendMessage
sendMessage()
Returns : any

Properties

alerts
Type : DynamicComponentAlertAggregator
messageToBeSent
Type : string
Default value : ''
operationSupportedByDevice$
Type : Observable<boolean>
<div *ngIf="operationSupportedByDevice$ | async" class="input-group p-16">
  <input
    type="text"
    class="form-control"
    data-cy="c8y-device-control-message-widget-view--message-textbox"
    [(ngModel)]="messageToBeSent"
    placeholder="{{ 'Message' | translate }}"
  />
  <span class="input-group-btn">
    <button
      title="{{ 'Send' | translate }}"
      class="btn btn-primary"
      data-cy="c8y-device-control-message-widget-view--send-button"
      (click)="sendMessage()"
      [disabled]="!messageToBeSent"
      translate
    >
      Send
    </button>
  </span>
</div>

results matching ""

    No results matching ""