From 9f48e7200b6e2dcb09be3361ac48eba5f6bd3195 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 21 Mar 2017 00:21:36 +0545 Subject: Integrate new interfaces widget AJAX --- .../www/widgets/widgets/interfaces.widget.php | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'src/usr') diff --git a/src/usr/local/www/widgets/widgets/interfaces.widget.php b/src/usr/local/www/widgets/widgets/interfaces.widget.php index dcaf247..0528402 100644 --- a/src/usr/local/www/widgets/widgets/interfaces.widget.php +++ b/src/usr/local/www/widgets/widgets/interfaces.widget.php @@ -49,14 +49,21 @@ if ($_POST['widgetkey']) { header("Location: /index.php"); } +// When this widget is included in the dashboard, $widgetkey is already defined before the widget is included. +// When the ajax call is made to refresh the interfaces table, 'widgetkey' comes in $_REQUEST. +if ($_REQUEST['widgetkey']) { + $widgetkey = $_REQUEST['widgetkey']; +} + ?> -
+
$ifname): @@ -189,36 +196,38 @@ endif; - + -- cgit v1.1