From 43b82827d43a451d879a5038fe1da2023a663d62 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Tue, 12 Nov 2019 14:56:50 +0800 Subject: [PATCH] update Former-commit-id: 7e65c97794210dff8bf289a9e3d1efd324433de5 --- .../Infrastructure/Views/Shared/_Menu.cshtml | 11 +-- projects/Infrastructure/wwwroot/css/site.css | 6 ++ .../IoTCenter/Controllers/AppController.cs | 2 +- projects/IoTCenter/Views/Home/Device.cshtml | 14 +-- projects/IoTCenter/Views/Home/Node.cshtml | 16 ++-- projects/IoTCenter/Views/Home/Product.cshtml | 2 +- projects/IoTCenter/iotcenter.db | Bin 434176 -> 430080 bytes projects/IoTCenter/wwwroot/node.pc.html | 8 +- projects/IoTCenter/wwwroot/node.tangshan.html | 8 +- .../Assets/StreamingAssets/wwwroot/js/node.js | 2 +- .../StreamingAssets/wwwroot/js/product.js | 2 +- .../Assets/StreamingAssets/wwwroot/node.html | 14 +-- .../StreamingAssets/wwwroot/product.html | 14 +-- .../Controllers/FBee/CurtainController.cs | 2 +- .../Controllers/FBee/SocketController.cs | 2 +- .../IoTNode/DeviceServices/FBee/DeviceId.cs | 4 +- .../DeviceServices/FBee/FBeeService.cs | 90 +++++++++++++++--- .../DeviceServices/Onvif/OnvifService.cs | 2 +- projects/IoTNode/configuration.db | Bin 12288 -> 12288 bytes projects/IoTNode/iotnode.db | Bin 466944 -> 458752 bytes 20 files changed, 132 insertions(+), 67 deletions(-) diff --git a/projects/Infrastructure/Views/Shared/_Menu.cshtml b/projects/Infrastructure/Views/Shared/_Menu.cshtml index 200104ca..36844f3d 100644 --- a/projects/Infrastructure/Views/Shared/_Menu.cshtml +++ b/projects/Infrastructure/Views/Shared/_Menu.cshtml @@ -1,17 +1,14 @@ @functions{ - public string GetClass(params string[] controllers) + public string GetClass(string action, string controller) { - if (controllers.Select(o => o.ToLower()).Contains(this.ViewContext.RouteData.Values["controller"].ToString().ToLower())) + if (this.ViewContext.RouteData.Values["action"].ToString() == action && + this.ViewContext.RouteData.Values["controller"].ToString() == controller) { - if (controllers.Length > 1) - { - return "active open"; - } return "active"; } return ""; diff --git a/projects/Infrastructure/wwwroot/css/site.css b/projects/Infrastructure/wwwroot/css/site.css index 01f9fb33..ce4a0c0d 100644 --- a/projects/Infrastructure/wwwroot/css/site.css +++ b/projects/Infrastructure/wwwroot/css/site.css @@ -41,6 +41,12 @@ font-family: 'Font Awesome 5 Free'; content: "\f057"; } +/**/ +.navbar-nav .nav-link.active { + background: mediumseagreen; + color: #fff!important; + border-radius: 5px; +} /*.content-header2 { overflow: hidden; } diff --git a/projects/IoTCenter/Controllers/AppController.cs b/projects/IoTCenter/Controllers/AppController.cs index 425c5e65..a4b95041 100644 --- a/projects/IoTCenter/Controllers/AppController.cs +++ b/projects/IoTCenter/Controllers/AppController.cs @@ -208,7 +208,7 @@ namespace IoTCenter.Controllers } if (rows != null) { - labels = rows.Select(o => o.Timestamp.Value).Select(o => o.ToString("MM-dd HH:mm")).Distinct().ToList(); + labels = rows.Select(o => o.Timestamp.Value).Select(o => o.ToString("MM-dd")).Distinct().ToList(); } } var model = new diff --git a/projects/IoTCenter/Views/Home/Device.cshtml b/projects/IoTCenter/Views/Home/Device.cshtml index 4169857e..acc660d0 100644 --- a/projects/IoTCenter/Views/Home/Device.cshtml +++ b/projects/IoTCenter/Views/Home/Device.cshtml @@ -202,8 +202,8 @@ - -