Skip to content

Commit

Permalink
ui
Browse files Browse the repository at this point in the history
  • Loading branch information
zappiehost committed Jul 16, 2023
1 parent 67b4317 commit 42dca1e
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 23 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ do-install:
${STAGEDIR}${DATADIR}
@${REINPLACE_CMD} -i '' -e "s|%%PKGVERSION%%|${PKGVERSION}|" \
${STAGEDIR}${PREFIX}/pkg/birdvector.xml \
${STAGEDIR}${DATADIR}/info.xml
${STAGEDIR}${DATADIR}/info.xml \
${STAGEDIR}${PREFIX}/www/packages/birdvector/birdvector_about.php

.include <bsd.port.mk>
13 changes: 8 additions & 5 deletions files/usr/local/pkg/birdvector.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ function birdvector_deinstall() {

bird_kill();

unset($config['installedpackages']['birdvector']['config'][0]);
if (isset($config['installedpackages']['birdvector']['config'])) {
unset($config['installedpackages']['birdvector']['config']);
}

write_config("[birdvector] Package uninstalled.");

unlink_if_exists('/usr/local/etc/pathvector.yaml');
Expand Down Expand Up @@ -141,27 +144,27 @@ function get_bird_status() {
}

function pathvector_version() {
$output = shell_exec("/usr/local/bin/pathvector version | grep -w 'Built\|Pathvector' 2>&1");
$output = shell_exec("/usr/local/bin/pathvector version | grep -w 'Pathvector' | awk '{print $2}'");
if (!$output) {
return "Cannot Connect to Pathvector!";
}
return $output;
}

function bgpq4_version() {
$output = shell_exec("/usr/local/bin/bgpq4 -v | grep -w 'version' 2>&1");
$output = shell_exec("/usr/local/bin/bgpq4 -v | grep -w 'version' | awk '{print $2}' 2>&1");
if (!$output) {
return "Cannot Connect to BGPQ4!";
}
return $output;
}

function bird_version() {
$output = shell_exec("/usr/local/sbin/birdc --version 2>&1");
$output = shell_exec("/usr/local/sbin/bird --version 2>&1");
if (!$output) {
return "Cannot Connect to BIRD!";
}
return $output;
return explode(' ', $output)[2];;
}

?>
90 changes: 73 additions & 17 deletions files/usr/local/www/packages/birdvector/birdvector_about.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,82 @@
display_top_tabs($tab_array);

?>

<form class="form-horizontal" method="post" action="#">
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">Bird Vector</h2></div>
<div class="panel-body">
<p>Bird Vector is a tool created to assist the routing abilities of pfSense, since pfSense officially only supports FRR (Free Range Routing) rather thanthe BIRD Routing Platform, with great strides and additions from Nate Sales from Pathvector and BGPQ4 by Job Snijders, Bringing the CLI Based operations of BIRD, Pathvector and BGPQ4 into the GUI of pfSense.</p>
<dl class="dl-horizontal">
<dt>Pathvector Version: <dt><dd><pre><?php print( pathvector_version() ); ?></pre><br /><a href="https://www.pathvector.io">Pathvector.io</a> |-| <a href="https://github.com/NateSales/Pathvector">Pathvector Github</a></dd>
</dl>
<dl>
<dt>BIRD Routing Daemon Version: <dt><dd><pre><?php bird_version() ); ?></pre><br /><a href="https://bird.network.cz">Network.CZ</a> |-| <a href="https://gitlab.nic.cz/labs/bird/tree/master">BIRD Gitlab</a></dd>
</dl>
<dl>
<dt>BGPQ4 Version: <dt><dd><pre><?php bgpq4_version() ); ?></pre><br /><a href="http://sobornost.net/~job/">Job Snijders</a> |-| <a href="https://github.com/bgp/bgpq4">BGPQ4 Github</a></dd>
</dl>
<dl>
<dt>Birdvector Version: <dt><dd><pre>1.0</pre><br /><a href="https://www.zappiehost.com">ZappieHost.com</a> |-| <a href="https://github.com/zappiehost/pfSense-pkg-birdvector">BirdVector Github</a></dd>
</dl>
<div class="panel-heading"><h2 class="panel-title">Bird Vector</h2></div>
<div class="panel-body">

<div class="form-group">
<div class="col-sm-12">
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">

</label>
<div class="col-sm-10">
<span class="help-block">
<p>
Bird Vector is a tool created to assist the routing abilities of pfSense, since pfSense officially only supports FRR (Free Range Routing) rather thanthe BIRD Routing Platform, with great strides and additions from Nate Sales from Pathvector and BGPQ4 by Job Snijders, Bringing the CLI Based operations of BIRD, Pathvector and BGPQ4 into the GUI of pfSense.
</p>
</span>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">
<span class="element-required">BirdVector</span>
</label>
<div class="col-sm-10">
<strong>Version: %%PKGVERSION%%</strong>
<span class="help-block">
<a href="https://www.zappiehost.com" target="_blank">ZappieHost.com</a> |-| <a href="https://github.com/zappiehost/pfSense-pkg-birdvector" target="_blank">BirdVector Github</a>
</span>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">
<span class="element-required">Pathvector</span>
</label>
<div class="col-sm-10">
<strong>Version: <?php echo pathvector_version(); ?></strong>
<span class="help-block">
<a href="https://www.pathvector.io" target="_blank">Pathvector.io</a> |-| <a href="https://github.com/NateSales/Pathvector" target="_blank">Pathvector Github</a>
</span>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">
<span class="element-required">BIRD Routing Daemon</span>
</label>
<div class="col-sm-10">
<strong>Version: <?php echo bird_version(); ?></strong>
<span class="help-block">
<a href="https://bird.network.cz" target="_blank">Network.CZ</a> |-| <a href="https://gitlab.nic.cz/labs/bird/tree/master" target="_blank">BIRD Gitlab</a>
</span>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">
<span class="element-required">BGPQ4</span>
</label>
<div class="col-sm-10">
<strong>Version: <?php echo bgpq4_version(); ?></strong>
<span class="help-block">
<a href="http://sobornost.net/~job/" target="_blank">Job Snijders</a> |-| <a href="https://github.com/bgp/bgpq4" target="_blank">BGPQ4 Github</a>
</span>
</div>
</div>

</div>
</div>

</form>
<?php
include("foot.inc");
include("foot.inc");

?>

0 comments on commit 42dca1e

Please sign in to comment.