Skip to content

Commit 9d02987

Browse files
committed
Fix interface type casing and improve down interface notification sorting
1 parent 51b9fa1 commit 9d02987

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Src/Private/Get-AbrFgtSystem.ps1

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function Get-AbrFgtSystem {
317317
#"Comments" = $interface.description # Will be enabled next release when the TableWrite function is added
318318
}
319319
}
320-
"loopback" {
320+
"Loopback" {
321321
$OutObj += [pscustomobject]@{
322322
"Name" = $interface.name
323323
"VDOM" = $interface.vdom
@@ -331,7 +331,7 @@ function Get-AbrFgtSystem {
331331
}
332332

333333
}
334-
"physical"{
334+
"Physical"{
335335
$OutObj += [pscustomobject]@{
336336
"Name" = $interface.name
337337
"VDOM" = $interface.vdom
@@ -347,7 +347,7 @@ function Get-AbrFgtSystem {
347347
}
348348

349349
}
350-
"tunnel" {
350+
"Tunnel" {
351351
$OutObj += [pscustomobject]@{
352352
"Name" = $interface.name
353353
"Parent Interface" = $interface.interface
@@ -362,7 +362,7 @@ function Get-AbrFgtSystem {
362362
#"Comments" = $interface.description # Will be enabled next release when the TableWrite function is added
363363
}
364364
}
365-
"vlan" {
365+
"Vlan" {
366366
$OutObj += [pscustomobject]@{
367367
"Name" = $interface.name
368368
"Parent Interface" = $interface.interface
@@ -427,7 +427,6 @@ function Get-AbrFgtSystem {
427427
}
428428

429429
if ($upInterfaces.Count -gt 0) {
430-
Write-FormattedTable -InputObject $upInterfaces -TableName $tableName -CustomColumnWidths @{"Name" = 15;"VLAN ID" = 8;"Status" = 10;"IP Address" = 18;"Secondary IP" = 18;"Role" = 8;"Parent Interface" = 12}
431430
$TableParams = @{
432431
Name = "Interface"
433432
List = $false
@@ -443,7 +442,7 @@ function Get-AbrFgtSystem {
443442

444443
if ($downInterfaces.Count -gt 0) {
445444
$downInterfaceNames = $downInterfaces | Select-Object -ExpandProperty Name
446-
Paragraph -Style Notation "The following interface(s) were omitted due to being down: $($downInterfaceNames -join ', ')."
445+
Paragraph -Style Notation "The following interface(s) were omitted due to being down: $(( $downInterfaceNames | Sort-Object ) -join ', ')."
447446
BlankLine
448447
}
449448
}

0 commit comments

Comments
 (0)