From 43ef01f466bec747facbf250037c3b467dd8547e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 23 Jul 2013 22:17:46 -0300 Subject: Add an ajax call to get command result --- config/openbgpd/openbgpd_status.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config/openbgpd') diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index f5930db0..245ed1c9 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -41,6 +41,12 @@ defCmdT("nexthops", "OpenBGPD Nexthops", "bgpctl show nexthop"); defCmdT("ip", "OpenBGPD IP", "bgpctl show ip bgp"); defCmdT("neighbors", "OpenBGPD Neighbors", "bgpctl show neighbor"); +if (isset($_REQUEST['isAjax'])) { + if (isset($_REQUEST['cmd']) && isset($commands[$_REQUEST['cmd']])) + echo htmlspecialchars_decode(doCmdT($commands[$_REQUEST['cmd']][1], $_REQUEST['limit']. $_REQUEST['filter'])); + exit; +} + if ($config['version'] >= 6) $pgtitle = array("OpenBGPD", "Status"); else -- cgit v1.2.3