Skip to content

Commit

Permalink
fix: Fields for Provision Watcher Tab DTO
Browse files Browse the repository at this point in the history
Closes: #642
Signed-off-by: Jieke Choo <jiekechoo@gmail.com>
  • Loading branch information
jiekechoo committed Nov 6, 2023
1 parent 422becc commit f7e57eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@
<div class="form-group row">
<label class="col-md-2 col-form-label" i18n>IdentifiersAddress</label>
<div class="col-md-10">
<input type="text" name="labels" [(ngModel)]="provisionWatcher.identifiers.address" class="form-control">
<input type="text" name="address" [(ngModel)]="provisionWatcher.identifiers.address" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label" i18n>IdentifiersPort</label>
<div class="col-md-10">
<input type="text" name="labels" [(ngModel)]="provisionWatcher.identifiers.port" class="form-control">
<input type="text" name="port" [(ngModel)]="provisionWatcher.identifiers.port" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-md-2 col-form-label" i18n>BlockingIdentifiers</label>
<div class="col-md-10">
<input type="text" name="labels" [(ngModel)]="provisionWatcher.blockingIdentifiers.port" class="form-control">
<input type="text" name="blockingIdentifiers" [(ngModel)]="blockingIdentifiers" class="form-control">
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';

import { MetadataService } from '../../../services/metadata.service';
import { MessageService } from '../../../message/message.service';
import { ErrorService } from '../../../services/error.service';
import { Device } from '../../../contracts/v3/device';
import { DeviceResponse } from '../../../contracts/v3/responses/device-response';
import { DeviceProfile } from '../../../contracts/v3/device-profile';
import { DeviceService } from '../../../contracts/v3/device-service';
import { ProvisionWatcher } from '../../../contracts/v3/provision-watcher';
import { ProvisionWatcherResponse } from '../../../contracts/v3/responses/provision-watcher-response';
import { DeviceServiceResponse } from '../../../contracts/v3/responses/device-service-response';
import { DeviceProfile } from '../../../contracts/v3/device-profile';
import { DeviceProfileResponse } from '../../../contracts/v3/responses/device-profile-response';
import { DeviceServiceResponse } from '../../../contracts/v3/responses/device-service-response';
import { ProvisionWatcherResponse } from '../../../contracts/v3/responses/provision-watcher-response';
import { MessageService } from '../../../message/message.service';
import { ErrorService } from '../../../services/error.service';
import { MetadataService } from '../../../services/metadata.service';
@Component({
selector: 'app-edit-provision-watcher',
templateUrl: './edit-provision-watcher.component.html',
Expand All @@ -22,7 +20,7 @@ export class EditProvisionWatcherComponent implements OnInit {
provisionWatcherLabels?: string;
selectedSvc?: DeviceService;
selectedProfile?: DeviceProfile;

blockingIdentifiers?: string;

constructor(private router: Router,
private route: ActivatedRoute,
Expand All @@ -39,6 +37,7 @@ export class EditProvisionWatcherComponent implements OnInit {
this.metaSvc.findProvisionWatcherByName(provisionWatcherName).subscribe((data: ProvisionWatcherResponse) => {
this.provisionWatcher = data.provisionWatcher;
this.provisionWatcherLabels = this.provisionWatcher.labels?.join(',');
this.blockingIdentifiers = JSON.stringify(data.provisionWatcher.blockingIdentifiers);
this.setDefaultDeviceSvcSelected(this.provisionWatcher.serviceName);
this.setDefaultDeviceProfileSelected(this.provisionWatcher.discoveredDevice.profileName);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</td>
<td>{{provisionWatcher.identifiers.address}}</td>
<td>{{provisionWatcher.identifiers.port}}</td>
<td>{{provisionWatcher.blockingIdentifiers.port}}</td>
<td>{{provisionWatcher.blockingIdentifiers|json}}</td>
<!-- <td>{{device.created | date:'yyyy-MM-dd hh:mm:ss'}}</td>
<td>{{device.modified | date:'yyyy-MM-dd hh:mm:ss' }}</td> -->
</tr>
Expand Down

0 comments on commit f7e57eb

Please sign in to comment.