Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fields for Provision Watcher Tab DTO #657

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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