Skip to content

Commit

Permalink
Update Diagnostics Route Table
Browse files Browse the repository at this point in the history
  • Loading branch information
fvanroie committed Oct 6, 2018
1 parent b2471d3 commit 53184e0
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
62 changes: 62 additions & 0 deletions Formats/Diagnostics.format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<ViewDefinitions>

<View>
<Name>OPNsense.Diagnostics.RouteTable</Name>
<ViewSelectedBy>
<TypeName>OPNsense.Diagnostics.RouteTable</TypeName>
</ViewSelectedBy>
<TableControl>
<TableHeaders>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader/>
<TableColumnHeader>
<Label>Netif (name)</Label>
</TableColumnHeader>
<TableColumnHeader/>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap/>
<TableColumnItems>
<TableColumnItem>
<PropertyName>Proto</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Destination</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Gateway</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Flags</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Use</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>MTU</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Netif</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>intf_description</PropertyName>
</TableColumnItem>
<TableColumnItem>
<PropertyName>Expire</PropertyName>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>

</ViewDefinitions>
</Configuration>
2 changes: 1 addition & 1 deletion OPNsensePSDrive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class OPNsenseMenuItem : SHiPSDirectory {
$obj += Get-OPNsenseItem -Routes Route
}
'/System/Routes/Status/' {
$obj += Get-OPNsenseRoute
$obj += Get-OPNsenseRouteTable
}

default {
Expand Down
1 change: 1 addition & 0 deletions PS_OPNsense.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
'Formats/ArpScanner.format.ps1xml',
'Formats/Core.format.ps1xml',
'Formats/Cron.format.ps1xml',
'Formats/Diagnostics.format.ps1xml',
'Formats/Firmware.format.ps1xml',
'Formats/FirmwareUpdate.format.ps1xml',
'Formats/HAProxy.format.ps1xml',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
SOFTWARE.
#>

Function Get-OPNsenseRoute {
# .EXTERNALHELP ../PS_OPNsense.psd1-Help.xml
Function Get-OPNsenseRouteTable {
# .EXTERNALHELP ../../PS_OPNsense.psd1-Help.xml
[CmdletBinding()]
param (
)
$result = Invoke-OPNsenseCommand diagnostics interface getroutes
return $result
$result = Invoke-OPNsenseCommand diagnostics interface getroutes
return $result | Add-ObjectDetail -TypeName 'OPNsense.Diagnostics.RouteTable'
}

0 comments on commit 53184e0

Please sign in to comment.