diff --git a/NetPanel/Controllers/HomeController.cs b/NetPanel/Controllers/HomeController.cs index b13583c..1820995 100644 --- a/NetPanel/Controllers/HomeController.cs +++ b/NetPanel/Controllers/HomeController.cs @@ -12,11 +12,27 @@ namespace NetPanel.Controllers public class HomeController : Controller { + public IActionResult Overview() + { + return View(); + } + + public IActionResult Index() { ViewBag.data = new List() { + + new Menu() + { + Id=1, + MenuName="概况", + Icon="nav-icon fas fa-th", + Url="/Home/Overview" + }, + + new Menu() { Id=1, diff --git a/NetPanel/Controllers/LoginController.cs b/NetPanel/Controllers/LoginController.cs index 2f3e369..8d3f550 100644 --- a/NetPanel/Controllers/LoginController.cs +++ b/NetPanel/Controllers/LoginController.cs @@ -29,19 +29,19 @@ namespace NetPanel.Controllers { - string output = ExecuteBl.Exec("ping www.baidu.com"); + //string output = ExecuteBl.Exec("ping www.baidu.com"); - // 解析输出行 - string[] lines = output.Split('\n'); - string[] memoryInfo = lines[1].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + //// 解析输出行 + //string[] lines = output.Split('\n'); + //string[] memoryInfo = lines[1].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - // 获取已使用和总内存大小 - float totalMemory = float.Parse(memoryInfo[1]); - float usedMemory = float.Parse(memoryInfo[2]); + //// 获取已使用和总内存大小 + //float totalMemory = float.Parse(memoryInfo[1]); + //float usedMemory = float.Parse(memoryInfo[2]); - // 计算使用率 - float usagePercentage = (usedMemory / totalMemory) * 100; + //// 计算使用率 + //float usagePercentage = (usedMemory / totalMemory) * 100; ReturnMsg enReturnMsg = new ReturnMsg(); enReturnMsg.Code = 0; diff --git a/NetPanel/Views/Home/Overview.cshtml b/NetPanel/Views/Home/Overview.cshtml new file mode 100644 index 0000000..0c1962b --- /dev/null +++ b/NetPanel/Views/Home/Overview.cshtml @@ -0,0 +1,57 @@ +@{ + Layout = "~/Views/Shared/_Layout.cshtml"; +} +
+
+
+ +
+
+

概况

+ +
+ + +
+
+ +
+ +
+
+ + + + + + + + + + + +
路径状态时间操作
+ + +
+ + +
+ + + + +
+ +
+ + + + diff --git a/NetPanel/Views/Shared/Menu.cshtml b/NetPanel/Views/Shared/Menu.cshtml index 81e70cd..72f5aec 100644 --- a/NetPanel/Views/Shared/Menu.cshtml +++ b/NetPanel/Views/Shared/Menu.cshtml @@ -1,5 +1,5 @@ @using NetPanel.Entity; - +