File

repository/configuration-device-tab/text-based-configuration.component.ts

Implements

OnInit

Metadata

selector c8y-text-based-configuration
templateUrl ./text-based-configuration.component.html

Index

Properties
Methods
Accessors

Constructor

constructor(route: ActivatedRoute, alertService: AlertService, repositoryService: RepositoryService, deviceConfigurationService: DeviceConfigurationService, inventoryService: InventoryService)
Parameters :
Name Type Optional
route ActivatedRoute No
alertService AlertService No
repositoryService RepositoryService No
deviceConfigurationService DeviceConfigurationService No
inventoryService InventoryService No

Methods

Async load
load()
Returns : any
Async loadOperation
loadOperation()
Returns : any
Async ngOnInit
ngOnInit()
Returns : any
Async reloadConfiguration
reloadConfiguration()
Returns : any
Async updateConfiguration
updateConfiguration(config)
Parameters :
Name Optional
config No
Returns : any

Properties

config
config: string
Type : string
device
device: IManagedObject
Type : IManagedObject
latestOperation
latestOperation: IOperation
Type : IOperation
reloadingConfig
reloadingConfig:
Default value : false
showTextBasedConfigReload
showTextBasedConfigReload: boolean
Type : boolean
showTextBasedConfigSave
showTextBasedConfigSave: boolean
Type : boolean

Accessors

savingConfig
getsavingConfig()
<div class="d-flex d-col fit-h">
  <fieldset *ngIf="latestOperation !== undefined" class="card-block bg-gray-white fit-w">
    <div class="content-flex-50">
      <c8y-single-operation [operation]="latestOperation" class="flex-grow"></c8y-single-operation>
      <div class="flex-item-right d-flex">
        <button
          title="{{ 'Get snapshot from device' | translate }}"
          type="button"
          class="btn btn-default btn-sm flex-item-v-center m-t-8 m-b-8"
          *ngIf="showTextBasedConfigReload"
          (click)="reloadConfiguration()"
          [disabled]="reloadingConfig || savingConfig"
        >
          <i
            c8yIcon="refresh"
            *ngIf="reloadingConfig"
            class="m-r-4"
            [ngClass]="{ 'icon-spin': reloadingConfig }"
          ></i>
          <i c8yIcon="download" *ngIf="!reloadingConfig" class="m-r-4"></i>

          {{ 'Get snapshot from device' | translate }}
        </button>
      </div>
    </div>
  </fieldset>
  <div class="flex-grow">
    <textarea
      [(ngModel)]="config"
      class="form-control fit-h p-r-16 p-l-16"
      [disabled]="reloadingConfig || savingConfig"
      c8y-spellcheck="false"
    ></textarea>
  </div>
  <div class="card-footer fit-w separator" *ngIf="showTextBasedConfigSave">
    <button
      type="button"
      (click)="updateConfiguration(config)"
      [disabled]="reloadingConfig || savingConfig"
      class="btn btn-primary"
      [ngClass]="{ 'btn-pending': savingConfig }"
    >
      <span title="{{ 'Send' | translate }}" *ngIf="!savingConfig">
        {{ 'Send configuration to device' | translate }}
      </span>
      <span title="{{ 'Sending…' | translate }}" *ngIf="savingConfig">
        {{ 'Sending…' | translate }}
      </span>
    </button>
  </div>
</div>

result-matching ""

    No results matching ""