File

datapoint-selector/datapoint-selector-modal/datapoint-selector-modal.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(bsModal: BsModalRef, elementRef: ElementRef)
Parameters :
Name Type Optional
bsModal BsModalRef No
elementRef ElementRef No

Methods

close
close()
Returns : void
ngOnInit
ngOnInit()
Returns : void
saveChanges
saveChanges()
Returns : void

Properties

allowChangingContext
Default value : true
allowDatapointsFromMultipleAssets
Default value : true
allowSearch
Default value : true
assetSelectorConfig
Type : Partial<DatapointSelectorModalAssetSelectorOptions>
Default value : {}
contextAsset
Type : IIdentified
defaultActiveState
Default value : true
guessDatapointUnit
Default value : true
Readonly result
Type : Promise<KPIDetails[]>
Default value : new Promise((resolve, reject) => { this.save = resolve; this.cancel = reject; })
saveButtonLabel
Type : string
Default value : gettext('Add data points')
selectedDatapoints
Default value : new Array<KPIDetails>()
title
Type : string
Default value : gettext('Data point selector')
<div class="modal-header separator">
  <h4 class="text-medium">{{ title | translate }}</h4>
</div>
<div class="modal-inner-scroll modal-inner-scroll--fixed">
  <c8y-datapoint-selector
    [contextAsset]="contextAsset"
    [guessDatapointUnit]="guessDatapointUnit"
    [allowDatapointsFromMultipleAssets]="allowDatapointsFromMultipleAssets"
    [allowChangingContext]="allowChangingContext"
    [defaultActiveState]="defaultActiveState"
    [allowSearch]="allowSearch"
    [(ngModel)]="selectedDatapoints"
  ></c8y-datapoint-selector>
</div>
<div class="modal-footer">
  <button
    type="button"
    [title]="'Cancel' | translate"
    class="btn btn-default"
    (click)="close()"
    translate
  >
    Cancel
  </button>
  <button
    [title]="saveButtonLabel | translate"
    class="btn btn-primary"
    [disabled]="!this.selectedDatapoints?.length"
    (click)="saveChanges()"
  >
    {{ saveButtonLabel | translate }}
  </button>
</div>

results matching ""

    No results matching ""