File

repository/configuration/device-tab/save-to-repository.component.ts

Metadata

Index

Properties
Methods

Constructor

constructor(modal: BsModalRef, alertService: AlertService, repositoryService: RepositoryService)
Parameters :
Name Type Optional
modal BsModalRef No
alertService AlertService No
repositoryService RepositoryService No

Methods

close
close()
Returns : void
Async save
save()
Returns : any

Properties

configSnapshot
Type : ConfigurationSnapshot
result
Type : Promise<any>
Default value : new Promise((resolve, reject) => { this._save = resolve; this._cancel = reject; })
<div class="modal-header bg-primary text-center text-white">
  <div style="font-size: 62px;">
    <span c8yIcon="gears"></span>
  </div>
  <h4 class="text-uppercase" translate>
    Save configuration
  </h4>
</div>
<div class="modal-body">
  <form #saveConfigurationSnapshot="ngForm" class="p-t-24">
    <c8y-form-group>
      <label translate for="name">Name</label>
      <input
        id="name"
        type="text"
        class="form-control"
        autocomplete="off"
        name="name"
        [(ngModel)]="configSnapshot.name"
        required
      />
    </c8y-form-group>
    <c8y-form-group>
      <label translate for="deviceType">Device type</label>
      <input
        id="deviceType"
        class="form-control"
        rows="6"
        name="deviceType"
        [(ngModel)]="configSnapshot.deviceType"
      />
    </c8y-form-group>
    <c8y-form-group>
      <label translate for="description">Description</label>
      <input
        type="text"
        id="description"
        class="form-control"
        maxlength="254"
        autocomplete="off"
        name="description"
        [(ngModel)]="configSnapshot.description"
      />
    </c8y-form-group>
    <c8y-form-group>
      <label translate for="configurationType">Configuration type</label>
      <input
        id="configurationType"
        class="form-control"
        rows="6"
        name="configurationType"
        [(ngModel)]="configSnapshot.configurationType"
      />
    </c8y-form-group>
  </form>
</div>
<div class="modal-footer">
  <button title="{{ 'Cancel' | translate }}" class="btn btn-default" (click)="close()" translate>
    Cancel
  </button>

  <button
    title="{{ 'Save configuration to repository' | translate }}"
    class="btn btn-primary"
    (click)="save()"
    [disabled]="saveConfigurationSnapshot.form.invalid"
    translate
  >
    Save
  </button>
</div>

results matching ""

    No results matching ""