From f9f5a16f5de6839fdadf67114bb054be2a3c4fd5 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 18 Apr 2019 13:05:38 +0800 Subject: [PATCH] beta.104 --- projects/IoT/IoT.Shared/Application/Services/NodeService.cs | 2 +- projects/IoT/IoTNode/Views/Home/Test.cshtml | 5 ----- projects/IoT/IoTNode/appsettings.json | 2 +- .../IoT/IoTServices/APService/Infrastructure/ApService.cs | 2 +- projects/IoT/IoTServices/APService/appsettings.json | 2 +- .../LiChuangService/Infrastructure/DeviceService.cs | 2 +- projects/IoT/IoTServices/LiChuangService/appsettings.json | 2 +- projects/IoT/IoTServices/MediaService/Program.cs | 1 - .../NJWLService/src/main/resources/application.properties | 2 +- .../IoTServices/ONVIFService/Infrastructure/OnvifService.cs | 2 +- projects/IoT/IoTServices/ONVIFService/Program.cs | 2 +- projects/IoT/IoTServices/ONVIFService/appsettings.json | 2 +- .../SerialPortService/Infrastructure/SPService.cs | 2 +- projects/IoT/IoTServices/SerialPortService/Program.cs | 3 +-- projects/IoT/IoTServices/SerialPortService/appsettings.json | 2 +- .../IoTServices/WinService/Infrastructure/WindowsService.cs | 2 +- projects/IoT/IoTServices/WinService/Program.cs | 2 +- projects/IoT/IoTServices/WinService/appsettings.json | 2 +- projects/IoTCenter/Program.cs | 4 ++-- projects/IoTCenter/appsettings.json | 2 +- projects/StudyCenter/Program.cs | 2 +- projects/StudyCenter/appsettings.json | 2 +- projects/UserCenter/Startup.cs | 2 +- projects/UserCenter/appsettings.json | 2 +- 24 files changed, 23 insertions(+), 30 deletions(-) diff --git a/projects/IoT/IoT.Shared/Application/Services/NodeService.cs b/projects/IoT/IoT.Shared/Application/Services/NodeService.cs index d79ca4bf..a08984e9 100644 --- a/projects/IoT/IoT.Shared/Application/Services/NodeService.cs +++ b/projects/IoT/IoT.Shared/Application/Services/NodeService.cs @@ -451,7 +451,7 @@ namespace Application.Services message += mac; } var data = message.HexToBytes(); - using (var client = new UdpClient(new IPEndPoint(Helper.Instance.GetLocalIP(), 0))) + using (var client = new UdpClient(new IPEndPoint(IPAddress.Broadcast, 0))) { client.Send(data, data.Length, new IPEndPoint(IPAddress.Parse("255.255.255.255"), 9)); } diff --git a/projects/IoT/IoTNode/Views/Home/Test.cshtml b/projects/IoT/IoTNode/Views/Home/Test.cshtml index cd5af54d..e69de29b 100644 --- a/projects/IoT/IoTNode/Views/Home/Test.cshtml +++ b/projects/IoT/IoTNode/Views/Home/Test.cshtml @@ -1,5 +0,0 @@ -@for (int i = 0; i < 100; i++) -{ - Play @i -
-} \ No newline at end of file diff --git a/projects/IoT/IoTNode/appsettings.json b/projects/IoT/IoTNode/appsettings.json index dc0d1b4f..8da7e5c8 100644 --- a/projects/IoT/IoTNode/appsettings.json +++ b/projects/IoT/IoTNode/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning" diff --git a/projects/IoT/IoTServices/APService/Infrastructure/ApService.cs b/projects/IoT/IoTServices/APService/Infrastructure/ApService.cs index e46c1af8..275f1aab 100644 --- a/projects/IoT/IoTServices/APService/Infrastructure/ApService.cs +++ b/projects/IoT/IoTServices/APService/Infrastructure/ApService.cs @@ -71,7 +71,7 @@ namespace APService public NotifyModel GetModel() { - var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? Helper.Instance.GetLocalIP().ToString() : this._configuration["server.ip"]; + var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? "localhost" : this._configuration["server.ip"]; var prot = Convert.ToInt32(Regex.Match(this._configuration["server.urls"], @"(?<=:)\d+").Value); var sysinfo = this.RunCommand("sysinfo"); var timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); diff --git a/projects/IoT/IoTServices/APService/appsettings.json b/projects/IoT/IoTServices/APService/appsettings.json index efc59ef9..7de584f5 100644 --- a/projects/IoT/IoTServices/APService/appsettings.json +++ b/projects/IoT/IoTServices/APService/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning" diff --git a/projects/IoT/IoTServices/LiChuangService/Infrastructure/DeviceService.cs b/projects/IoT/IoTServices/LiChuangService/Infrastructure/DeviceService.cs index 87c1f02f..3c9a5ab9 100644 --- a/projects/IoT/IoTServices/LiChuangService/Infrastructure/DeviceService.cs +++ b/projects/IoT/IoTServices/LiChuangService/Infrastructure/DeviceService.cs @@ -394,7 +394,7 @@ namespace LiChuangService private NotifyModel CreateModel(string name, string number, string path, string icon) { - var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? Helper.Instance.GetLocalIP().ToString() : this._configuration["server.ip"]; + var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? "localhost" : this._configuration["server.ip"]; var port = Convert.ToInt32(Regex.Match(this._configuration["server.urls"], @"(?<=:)\d+").Value); return new NotifyModel diff --git a/projects/IoT/IoTServices/LiChuangService/appsettings.json b/projects/IoT/IoTServices/LiChuangService/appsettings.json index 522bb70d..35bfafec 100644 --- a/projects/IoT/IoTServices/LiChuangService/appsettings.json +++ b/projects/IoT/IoTServices/LiChuangService/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Information" diff --git a/projects/IoT/IoTServices/MediaService/Program.cs b/projects/IoT/IoTServices/MediaService/Program.cs index 5826548d..a6d28889 100644 --- a/projects/IoT/IoTServices/MediaService/Program.cs +++ b/projects/IoT/IoTServices/MediaService/Program.cs @@ -11,7 +11,6 @@ namespace MediaService { public static void Main(string[] args) { - var host = Helper.Instance.GetLocalIP().ToString(); WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, diff --git a/projects/IoT/IoTServices/NJWLService/src/main/resources/application.properties b/projects/IoT/IoTServices/NJWLService/src/main/resources/application.properties index 548171f6..6324ef4d 100644 --- a/projects/IoT/IoTServices/NJWLService/src/main/resources/application.properties +++ b/projects/IoT/IoTServices/NJWLService/src/main/resources/application.properties @@ -1,4 +1,4 @@ -version=1.0.0-beta.103 +version=1.0.0-beta.104 server.host=127.0.0.1 server.port=8003 spring.thymeleaf.cache=false diff --git a/projects/IoT/IoTServices/ONVIFService/Infrastructure/OnvifService.cs b/projects/IoT/IoTServices/ONVIFService/Infrastructure/OnvifService.cs index 5b3e1876..1c75c402 100644 --- a/projects/IoT/IoTServices/ONVIFService/Infrastructure/OnvifService.cs +++ b/projects/IoT/IoTServices/ONVIFService/Infrastructure/OnvifService.cs @@ -144,7 +144,7 @@ namespace ONVIFService public void Notify() { - var host = Helper.Instance.GetLocalIP().ToString(); + var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? "localhost" : this._configuration["server.ip"]; var prot = Convert.ToInt32(Regex.Match(this._configuration["server.urls"], @"(?<=:)\d+").Value); using (var scope = _applicationServices.CreateScope()) { diff --git a/projects/IoT/IoTServices/ONVIFService/Program.cs b/projects/IoT/IoTServices/ONVIFService/Program.cs index d745c983..9aedb131 100644 --- a/projects/IoT/IoTServices/ONVIFService/Program.cs +++ b/projects/IoT/IoTServices/ONVIFService/Program.cs @@ -11,7 +11,7 @@ namespace ONVIFService { public static void Main(string[] args) { - var host = Helper.Instance.GetLocalIP().ToString(); + var host = "localhost"; WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, diff --git a/projects/IoT/IoTServices/ONVIFService/appsettings.json b/projects/IoT/IoTServices/ONVIFService/appsettings.json index 4c15ecbd..94afeef3 100644 --- a/projects/IoT/IoTServices/ONVIFService/appsettings.json +++ b/projects/IoT/IoTServices/ONVIFService/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Information" diff --git a/projects/IoT/IoTServices/SerialPortService/Infrastructure/SPService.cs b/projects/IoT/IoTServices/SerialPortService/Infrastructure/SPService.cs index e6adbc9e..4db8c8d2 100644 --- a/projects/IoT/IoTServices/SerialPortService/Infrastructure/SPService.cs +++ b/projects/IoT/IoTServices/SerialPortService/Infrastructure/SPService.cs @@ -81,7 +81,7 @@ namespace SerialPortService public void Notify() { - var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? Helper.Instance.GetLocalIP().ToString() : this._configuration["server.ip"]; + var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? "localhost" : this._configuration["server.ip"]; var prot = Convert.ToInt32(Regex.Match(this._configuration["server.urls"], @"(?<=:)\d+").Value); try { diff --git a/projects/IoT/IoTServices/SerialPortService/Program.cs b/projects/IoT/IoTServices/SerialPortService/Program.cs index 3e7bffeb..02097f9b 100644 --- a/projects/IoT/IoTServices/SerialPortService/Program.cs +++ b/projects/IoT/IoTServices/SerialPortService/Program.cs @@ -11,7 +11,6 @@ namespace SerialPortService { public static void Main(string[] args) { - var host = Helper.Instance.GetLocalIP().ToString(); WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, @@ -22,7 +21,7 @@ namespace SerialPortService new EFConfigurationValue { Id = "email:port", Value= "25"}, new EFConfigurationValue { Id = "email:user", Value= "admin@nbaxp.com"}, new EFConfigurationValue { Id = "email:password", Value= "aA123456"}, - new EFConfigurationValue { Id = "server.ip", Value= "" }, + new EFConfigurationValue { Id = "server.ip", Value= "" }, new EFConfigurationValue { Id = "server.urls", Value= "http://*:8007" }, new EFConfigurationValue { Id = "node.url", Value= "127.0.0.1:8002"}, new EFConfigurationValue { Id = "timer.seconds", Value="300"}, diff --git a/projects/IoT/IoTServices/SerialPortService/appsettings.json b/projects/IoT/IoTServices/SerialPortService/appsettings.json index 4c15ecbd..94afeef3 100644 --- a/projects/IoT/IoTServices/SerialPortService/appsettings.json +++ b/projects/IoT/IoTServices/SerialPortService/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Information" diff --git a/projects/IoT/IoTServices/WinService/Infrastructure/WindowsService.cs b/projects/IoT/IoTServices/WinService/Infrastructure/WindowsService.cs index 12bd5b4d..68b993f4 100644 --- a/projects/IoT/IoTServices/WinService/Infrastructure/WindowsService.cs +++ b/projects/IoT/IoTServices/WinService/Infrastructure/WindowsService.cs @@ -64,7 +64,7 @@ namespace WinService var list = Search("select CSName,Caption,FreePhysicalMemory from Win32_OperatingSystem"); var physicalMemory = double.Parse(Search("select Capacity from Win32_PhysicalMemory")["Capacity"].ToString()); var cpu = int.Parse((Search("select PercentIdleTime from Win32_PerfFormattedData_PerfOS_Processor where Name='_Total'")["PercentIdleTime"].ToString())); - var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? Helper.Instance.GetLocalIP().ToString() : this._configuration["server.ip"]; + var host = string.IsNullOrEmpty(this._configuration["server.ip"]) ? "localhost" : this._configuration["server.ip"]; var prot = Convert.ToInt32(Regex.Match(this._configuration["server.urls"], @"(?<=:)\d+").Value); var timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); var model = new NotifyModel diff --git a/projects/IoT/IoTServices/WinService/Program.cs b/projects/IoT/IoTServices/WinService/Program.cs index 141a1a2a..6cd38b8d 100644 --- a/projects/IoT/IoTServices/WinService/Program.cs +++ b/projects/IoT/IoTServices/WinService/Program.cs @@ -22,7 +22,7 @@ namespace WinService new EFConfigurationValue { Id = "email:port", Value= "25"}, new EFConfigurationValue { Id = "email:user", Value= "admin@nbaxp.com"}, new EFConfigurationValue { Id = "email:password", Value= "aA123456"}, - new EFConfigurationValue { Id = "node.url", Value= "192.254.1.2:8002"}, + new EFConfigurationValue { Id = "node.url", Value= "192.168.3.2:8002"}, new EFConfigurationValue { Id = "timer.seconds", Value="5"}, // new EFConfigurationValue { Id = "name", Value= "Windows主机服务"}, diff --git a/projects/IoT/IoTServices/WinService/appsettings.json b/projects/IoT/IoTServices/WinService/appsettings.json index efc59ef9..7de584f5 100644 --- a/projects/IoT/IoTServices/WinService/appsettings.json +++ b/projects/IoT/IoTServices/WinService/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning" diff --git a/projects/IoTCenter/Program.cs b/projects/IoTCenter/Program.cs index 3dbfd16a..1c650c8f 100644 --- a/projects/IoTCenter/Program.cs +++ b/projects/IoTCenter/Program.cs @@ -12,7 +12,7 @@ namespace IoTCenter { public static void Main(string[] args) { - var host = Helper.Instance.GetLocalIP().ToString(); + var host = "localhost"; WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, @@ -25,7 +25,7 @@ namespace IoTCenter new EFConfigurationValue { Id = "usercenter:login", Value= $"http://{host}:8000/Account/Login"}, new EFConfigurationValue { Id = "usercenter:logout", Value= $"http://{host}:8000/Account/Logout"}, new EFConfigurationValue { Id = "usercenter:register", Value= $"http://{host}:8000/Account/Register"}, - new EFConfigurationValue { Id = "influxdb:url", Value= "http://localhost:8086"}, + new EFConfigurationValue { Id = "influxdb:url", Value= $"http://{host}:8086"}, new EFConfigurationValue { Id = "influxdb:usr", Value= "admin"}, new EFConfigurationValue { Id = "influxdb:pwd", Value= "admin"}, // diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json index c4ca0bfd..75070bff 100644 --- a/projects/IoTCenter/appsettings.json +++ b/projects/IoTCenter/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning" diff --git a/projects/StudyCenter/Program.cs b/projects/StudyCenter/Program.cs index 7322f255..c15608ac 100644 --- a/projects/StudyCenter/Program.cs +++ b/projects/StudyCenter/Program.cs @@ -11,7 +11,7 @@ namespace StudyCenter { public static void Main(string[] args) { - var host = Helper.Instance.GetLocalIP().ToString(); + var host = "localhost"; WebHost.CreateDefaultBuilder(args) .Run(new List { new EFConfigurationValue { Id = "openapi.title", Value= "web api" }, diff --git a/projects/StudyCenter/appsettings.json b/projects/StudyCenter/appsettings.json index 4c938e63..bbdc0daf 100644 --- a/projects/StudyCenter/appsettings.json +++ b/projects/StudyCenter/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning" diff --git a/projects/UserCenter/Startup.cs b/projects/UserCenter/Startup.cs index 7b290858..5fc093af 100644 --- a/projects/UserCenter/Startup.cs +++ b/projects/UserCenter/Startup.cs @@ -160,7 +160,7 @@ namespace UserCenter UserRoles = new List { new UserRole { Role = adminRole } } }); dbContext.SaveChanges(); - var host = Helper.Instance.GetLocalIP().ToString(); + var host = "localhost"; dbContext.Set().Add(new Site { Name = "物联网平台", diff --git a/projects/UserCenter/appsettings.json b/projects/UserCenter/appsettings.json index 8d050f1d..6286bb50 100644 --- a/projects/UserCenter/appsettings.json +++ b/projects/UserCenter/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.103", + "version": "1.0.0-beta.104", "Logging": { "LogLevel": { "Default": "Warning"