Skip to content

Commit

Permalink
Add discovered devices in the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoGheza committed Dec 9, 2021
1 parent 9080ae8 commit 517469b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions UI/src/app/_components/settings/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ <h2>
</tbody>
</table>
</div>
<div class="alert alert-info mt-3" role="alert" *ngIf="socketService.networkDiscovery.length > 0">
Found {{ socketService.networkDiscovery.length }} new sources in your network.
<table class="table table-hover" *ngIf="socketService.networkDiscovery.length > 0">
<thead>
<tr>
<th>IP</th>
<th>Type</th>
<th></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let source of socketService.networkDiscovery">
<td>{{ source.ip }}</td>
<td>{{ source.sourceId }}</td>
<td><button class="btn btn-outline-dark"><i class="fas fa-plus"></i> Add</button></td>
</tbody>
</table>
</div>
<hr class="my-5" />
<div class="row">
<ng-container *ngTemplateOutlet="devicesTable; context: {editMode: true}"></ng-container>
Expand Down
2 changes: 1 addition & 1 deletion src/_models/NetworkDiscovery.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface NetworkDiscovery {
sourceId: string;

ip?: string;
ip: string;
port?: number;
}

0 comments on commit 517469b

Please sign in to comment.