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 @@ - -