From ad885eacd212c4347fb92dfa8b3d887afa667c82 Mon Sep 17 00:00:00 2001 From: dongpd Date: Thu, 22 Oct 2020 11:06:01 +0700 Subject: [PATCH] update change ip gateway --- controllers/DeviceController.php | 2 ++ views/device/change-ip.tpl | 7 +++++++ web/js/device.js | 14 +++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/controllers/DeviceController.php b/controllers/DeviceController.php index f603eb65..4363bffb 100644 --- a/controllers/DeviceController.php +++ b/controllers/DeviceController.php @@ -251,11 +251,13 @@ class DeviceController extends Controller { "OldIPAddress" => $OldIpAddress, "NewIPAddress" => $data["Ip"], "NetMask" => $data["SubnetMask"], + "GATEIPAddress" => $data["Gateway"], "MAC" => $model->mac_address ]); if ($res == 0) { $model->ip_address = $data["Ip"]; $model->subnet_mask = $data["SubnetMask"]; + $model->gateway = $data["Gateway"]; $model->save(); return ["status" => true]; } diff --git a/views/device/change-ip.tpl b/views/device/change-ip.tpl index 8d734ce6..5368db28 100644 --- a/views/device/change-ip.tpl +++ b/views/device/change-ip.tpl @@ -31,6 +31,13 @@ +
+
+
Gateway
+ +
+ +