From f7e57ebd2ad4d96da9d70341491ca8456df46195 Mon Sep 17 00:00:00 2001 From: Jieke Choo Date: Mon, 6 Nov 2023 21:50:05 +0800 Subject: [PATCH] fix: Fields for Provision Watcher Tab DTO Closes: #642 Signed-off-by: Jieke Choo --- .../edit-provision-watcher.component.html | 6 +++--- .../edit-provision-watcher.component.ts | 21 +++++++++---------- .../provision-watcher-list.component.html | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.html b/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.html index e2d60f16..8e84d4fd 100644 --- a/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.html +++ b/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.html @@ -53,19 +53,19 @@
- +
- +
- +
diff --git a/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.ts b/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.ts index 6f727ad2..2ea0a084 100644 --- a/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.ts +++ b/web/src/app/metadata/provision-watcher/edit-provision-watcher/edit-provision-watcher.component.ts @@ -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', @@ -22,7 +20,7 @@ export class EditProvisionWatcherComponent implements OnInit { provisionWatcherLabels?: string; selectedSvc?: DeviceService; selectedProfile?: DeviceProfile; - + blockingIdentifiers?: string; constructor(private router: Router, private route: ActivatedRoute, @@ -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); }); diff --git a/web/src/app/metadata/provision-watcher/provision-watcher-list/provision-watcher-list.component.html b/web/src/app/metadata/provision-watcher/provision-watcher-list/provision-watcher-list.component.html index f64e7bd3..cb0cbbfa 100644 --- a/web/src/app/metadata/provision-watcher/provision-watcher-list/provision-watcher-list.component.html +++ b/web/src/app/metadata/provision-watcher/provision-watcher-list/provision-watcher-list.component.html @@ -78,7 +78,7 @@ {{provisionWatcher.identifiers.address}} {{provisionWatcher.identifiers.port}} - {{provisionWatcher.blockingIdentifiers.port}} + {{provisionWatcher.blockingIdentifiers|json}}