Skip to content

Commit 6a15980

Browse files
committed
minor fixes
1 parent 27c12b4 commit 6a15980

6 files changed

Lines changed: 21 additions & 61 deletions

File tree

django_app/mso/static/main-es2015.js

Lines changed: 6 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

django_app/mso/static/main-es2015.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

django_app/mso/static/main-es5.js

Lines changed: 6 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

django_app/mso/static/main-es5.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src_angular/src/app/dashboard/dashboard.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<mat-sidenav fxLayout="column" fxLayoutAlign="space-between stretch" style="width:20em; min-width: 20em;" class="max90vh">
22
<div>
33
<div fxLayout="column" class="psk-table-container">
4-
<table mat-table [dataSource]="filteredDevicesDatase" style="background: none;">
4+
<table mat-table [dataSource]="filteredDevicesDatabase" style="background: none;">
55
<ng-container matColumnDef="device">
66
<th mat-header-cell *matHeaderCellDef fxLayout="column" fxLayoutAlign="space-between stretch" style="padding-right: 0; padding-left: 0; ">
77
<div fxLayout="row" style="margin-left: 24px;">

src_angular/src/app/dashboard/dashboard.component.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export class DashboardComponent implements OnInit {
188188
editingPortsStatus = {}
189189
displayedPorts = {}
190190

191-
filteredDevicesDatase: MatTableDataSource<DeviceElement> | null;
191+
filteredDevicesDatabase: MatTableDataSource<DeviceElement> | null;
192192
devices: DeviceElement[] = []
193193

194194
resultsLength = 0;
@@ -243,9 +243,9 @@ export class DashboardComponent implements OnInit {
243243
this.editingDevice = element;
244244
}
245245
});
246-
this.filteredDevicesDatase = new MatTableDataSource(data["results"]);
246+
this.filteredDevicesDatabase = new MatTableDataSource(data["results"]);
247247

248-
this.filteredDevicesDatase.paginator = this.paginator;
248+
this.filteredDevicesDatabase.paginator = this.paginator;
249249
this.topBarLoading = false;
250250
},
251251
error: error => {
@@ -476,30 +476,16 @@ export class DashboardComponent implements OnInit {
476476
//////////////////////////////////////////////////////////////////////////////
477477
updateFrmDeviceValues(config: PortElement): void {
478478
this.frmPort.reset()
479-
this.frmPort.controls["mode"].setValue(config.mode)
480-
this.frmPort.controls["all_networks"].setValue(config.all_networks)
481-
this.frmPort.controls["networks"].setValue(config.networks)
482479
this.frmPort.controls["port_network"].setValue(config.port_network)
483-
this.frmPort.controls["port_auth"].setValue(config.port_auth)
484-
this.frmPort.controls["enable_mac_auth"].setValue(config.enable_mac_auth)
485-
this.frmPort.controls["guest_network"].setValue(config.guest_network)
486-
this.frmPort.controls["bypass_auth_when_server_down"].setValue(config.bypass_auth_when_server_down)
487480
this.frmPort.controls["autoneg"].setValue(config.disable_autoneg == false)
488-
this.frmPort.controls["mac_limit"].setValue(config.mac_limit)
489-
this.frmPort.controls["stp_edge"].setValue(config.stp_edge)
490-
this.frmPort.controls["mtu"].setValue(config.mtu)
491481
this.frmPort.controls["enabled"].setValue(config.disabled == false)
492482
this.frmPort.controls["poe"].setValue(config.poe_disabled == false)
493-
this.frmPort.controls["description"].setValue(config.description)
494-
this.frmPort.controls["voip_network"].setValue(config.voip_network)
495-
this.frmPort.controls["storm_control"].setValue(config.storm_control)
496483
if (config.disable_autoneg == true) {
497484
this.frmPort.controls["duplex"] = new FormControl({ value: config.duplex, disabled: true })
498485
this.frmPort.controls["speed"] = new FormControl({ value: config.speed, disabled: true })
499486
} else {
500487
this.frmPort.controls["speed"].setValue(config.speed)
501488
this.frmPort.controls["duplex"].setValue(config.duplex)
502-
503489
}
504490
}
505491

@@ -520,10 +506,10 @@ export class DashboardComponent implements OnInit {
520506

521507
applyFilter(event: Event) {
522508
const filterValue = (event.target as HTMLInputElement).value.trim().toLowerCase();
523-
this.filteredDevicesDatase.filter = filterValue.trim().toLowerCase();
509+
this.filteredDevicesDatabase.filter = filterValue.trim().toLowerCase();
524510

525-
if (this.filteredDevicesDatase.paginator) {
526-
this.filteredDevicesDatase.paginator.firstPage();
511+
if (this.filteredDevicesDatabase.paginator) {
512+
this.filteredDevicesDatabase.paginator.firstPage();
527513
}
528514
}
529515

0 commit comments

Comments
 (0)