lith 5 år sedan
förälder
incheckning
801b794d29
56 ändrade filer med 217 tillägg och 187 borttagningar
  1. 1 2
      dotnet/Doc/Release/01 ServiceCenter.bat
  2. 2 3
      dotnet/Doc/Release/02 Gover.bat
  3. 1 2
      dotnet/Doc/Release/03 Gateway.bat
  4. 1 2
      dotnet/Doc/Release/04 Demo.bat
  5. 1 3
      dotnet/Doc/Release/05 Robot.bat
  6. 7 0
      dotnet/Doc/UpgradeLog/Sers2.1.1.txt
  7. 1 1
      dotnet/Sers/ApiLoader/Sers.NetcoreLoader/Sers.NetcoreLoader.csproj
  8. 1 1
      dotnet/Sers/ApiLoader/Sers.Serslot/Sers.Serslot.csproj
  9. 1 1
      dotnet/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj
  10. 1 1
      dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj
  11. 1 1
      dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj
  12. 1 1
      dotnet/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj
  13. 1 1
      dotnet/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj
  14. 1 1
      dotnet/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj
  15. 1 1
      dotnet/Sers/Sers.Core/Sers.Core/Module/Api/ApiEvent/BeforeCallApi/EventBuilder.cs
  16. 13 28
      dotnet/Sers/Sers.Core/Sers.Core/Module/Api/LocalApi/StaticFileTransmit/StaticFileMap.cs
  17. 1 1
      dotnet/Sers/Sers.Core/Sers.Core/Module/Reflection/ObjectLoader.cs
  18. 1 1
      dotnet/Sers/Sers.Core/Sers.Core/Sers.Core.csproj
  19. 1 1
      dotnet/Sers/Sers.Core/Sers.Core/SersLoader/ApiLoader.cs
  20. 1 1
      dotnet/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj
  21. 1 1
      dotnet/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj
  22. 1 1
      dotnet/Sers/Sers.Ioc/Sers.Ioc/Sers.Ioc.csproj
  23. 1 1
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ApiStationMng.cs
  24. 1 1
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/Extensions/ServiceStationExtensions.cs
  25. 10 1
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/Model/ServiceStationData.cs
  26. 61 50
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ServiceStationMng.cs
  27. 3 3
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ApiDescController.cs
  28. 3 3
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ApiStationController.cs
  29. 3 3
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/RateLimitController.cs
  30. 3 3
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ServerStationController.cs
  31. 7 7
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ServiceCenterController.cs
  32. 1 1
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/Subscribers/UsageSubController.cs
  33. 2 2
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Persistence/Persistence_ApiDesc.cs
  34. 9 0
      dotnet/Sers/Sers.ServiceCenter/Sers.ServiceCenter/Entity/ServiceStation.cs
  35. 1 1
      dotnet/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj
  36. 1 1
      dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj
  37. 2 2
      dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/appsettings.json
  38. 1 1
      dotnet/StationDemo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj
  39. 7 3
      dotnet/Vit/Vit.Core/Vit.Core/Util/Common/CommonHelp.cs
  40. 6 2
      dotnet/Vit/Vit.Core/Vit.Core/Util/ConfigurationManager/JsonFile.cs
  41. 1 1
      dotnet/Vit/Vit.Core/Vit.Core/Vit.Core.csproj
  42. 1 1
      dotnet/Vit/Vit.Ioc/Vit.Ioc/Vit.Ioc.csproj
  43. 1 1
      dotnet/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj
  44. 11 0
      dotnet/Vit/Vit.WebHost/Extensions/IWebHostBuilderExtensions_VitConfig.cs
  45. 6 14
      dotnet/Vit/Vit.WebHost/RunArg.cs
  46. 1 1
      dotnet/Vit/Vit.WebHost/Vit.WebHost.csproj
  47. 1 1
      dotnet/netcore/Gateway/App.Gateway/App.Gateway.csproj
  48. 0 7
      dotnet/netcore/Gateway/App.Gateway/appsettings.json
  49. 1 1
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj
  50. 0 7
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/appsettings.json
  51. 27 3
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/ServiceStationMng.html
  52. 1 1
      dotnet/netcore/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj
  53. 0 6
      dotnet/netcore/ServiceCenter/App.ServiceCenter/appsettings.json
  54. 1 1
      dotnet/netcore/Station/App.Ioc.Station/App.Ioc.Station.csproj
  55. 1 1
      dotnet/netcore/Station/App.Robot.Station/App.Robot.Station.csproj
  56. 1 1
      dotnet/netcore/Station/App.Robot.Station/appsettings.json

+ 1 - 2
dotnet/Doc/Release/01 ServiceCenter.bat

@@ -1,7 +1,6 @@
-cd /d ServiceCenter
 
 :begin
-dotnet App.ServiceCenter.dll
+dotnet ServiceCenter/App.ServiceCenter.dll
 
  TIMEOUT /T 1
 @echo restart

+ 2 - 3
dotnet/Doc/Release/02 Gover.bat

@@ -1,9 +1,8 @@
 start http://localhost:6022/_gover_/index.html
-
-cd /d Gover
+ 
 
 :begin
-dotnet App.Gover.Gateway.dll
+dotnet Gover/App.Gover.Gateway.dll
 
 TIMEOUT /T 2
 @echo restart

+ 1 - 2
dotnet/Doc/Release/03 Gateway.bat

@@ -1,7 +1,6 @@
-cd /d Gateway
 
 :begin
-dotnet App.Gateway.dll
+dotnet Gateway/App.Gateway.dll
 
 TIMEOUT /T 1
 @echo restart

+ 1 - 2
dotnet/Doc/Release/04 Demo.bat

@@ -1,7 +1,6 @@
-cd /d Demo
 
 :begin
-dotnet Did.SersLoader.Demo.dll
+dotnet Demo/Did.SersLoader.Demo.dll
 
  
  TIMEOUT /T 10

+ 1 - 3
dotnet/Doc/Release/05 Robot.bat

@@ -1,7 +1,5 @@
-cd /d Robot
-
 :begin
-dotnet App.Robot.Station.dll
+dotnet Robot/App.Robot.Station.dll
 
  
  TIMEOUT /T 10

+ 7 - 0
dotnet/Doc/UpgradeLog/Sers2.1.1.txt

@@ -78,3 +78,10 @@ ServiceCenter OrganizeConnection 
 
 [tag]Sers2.1.1.299
 ------------------------------------------------------------------------------------------------------------------
+
+修复文件相对路径的bug
+Gateway 若配置文件不指定Logging配置则关闭netcore log
+ServiceCenter服务站点等页面添加默认排序,ServiceStation添加服务开启时间
+
+[tag]Sers2.1.1.300
+------------------------------------------------------------------------------------------------------------------

+ 1 - 1
dotnet/Sers/ApiLoader/Sers.NetcoreLoader/Sers.NetcoreLoader.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/ApiLoader/Sers.Serslot/Sers.Serslot.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
   

+ 1 - 1
dotnet/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
   

+ 1 - 1
dotnet/Sers/Sers.Core/Sers.Core/Module/Api/ApiEvent/BeforeCallApi/EventBuilder.cs

@@ -66,7 +66,7 @@ namespace Sers.Core.Module.Api.ApiEvent.BeforeCallApi
                 {
                     return null;
                 }
-                assembly = Assembly.LoadFrom(CommonHelp.GetAbsPathByRealativePath(assemblyFile));
+                assembly = Assembly.LoadFrom(CommonHelp.GetAbsPath(assemblyFile));
                 #endregion
 
                 //(x.x.4) create class

+ 13 - 28
dotnet/Sers/Sers.Core/Sers.Core/Module/Api/LocalApi/StaticFileTransmit/StaticFileMap.cs

@@ -6,6 +6,7 @@ using System.IO;
 using System.Web;
 using Vit.Core.Util.ComponentModel.SsError;
 using Vit.Core.Util.ConfigurationManager;
+using Vit.Core.Util.Common;
 
 namespace Sers.Core.Module.Api.LocalApi.StaticFileTransmit
 {
@@ -17,6 +18,11 @@ namespace Sers.Core.Module.Api.LocalApi.StaticFileTransmit
 
 
         #region LoadContentTypeFromFile
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="filePath"></param>
+        /// <returns></returns>
         public bool LoadContentTypeFromFile(string filePath)
         {
             var jsonFile = new JsonFile(filePath);
@@ -40,7 +46,7 @@ namespace Sers.Core.Module.Api.LocalApi.StaticFileTransmit
         private string _fileBasePath;
         /// <summary>
         /// D://fold1/wwwroot
-        /// 静态文件路径。可为相对路径或绝对路径。若未指定存在的文件夹则默认为当前目录下的wwwroot文件夹。
+        /// 静态文件绝对路径
         /// </summary>
         public string fileBasePath
         {
@@ -49,37 +55,15 @@ namespace Sers.Core.Module.Api.LocalApi.StaticFileTransmit
             {
                 #region (x.1) get fullPath
                 string fullPath = value;
-                if ("" == fullPath)
-                {
-                    fullPath = Path.Combine(AppContext.BaseDirectory, "wwwroot");
-                }
-                else if (fullPath != null)
-                {
-                    if (!Directory.Exists(fullPath))
-                    {
-                        fullPath = Path.Combine(AppContext.BaseDirectory, fullPath);
-                    }
-                }
 
                 if (string.IsNullOrEmpty(fullPath))
                 {
-                    fullPath = null;
-                }
-                else
-                {
-                    var dir = new DirectoryInfo(fullPath);
-                    if (dir.Exists)
-                    {
-                        fullPath = dir.FullName;
-                    }
-                    else
-                    {
-                        fullPath = null;
-                    }
+                    fullPath = "wwwroot";
                 }
+                fullPath = CommonHelp.GetAbsPath(fullPath);               
                 #endregion
 
-                _fileBasePath = fullPath ?? Path.Combine(AppContext.BaseDirectory, "wwwroot");
+                _fileBasePath = fullPath;
             }
         }
         #endregion
@@ -87,9 +71,10 @@ namespace Sers.Core.Module.Api.LocalApi.StaticFileTransmit
 
 
         /// <summary>
-        /// 
+        /// fileBasePath:静态文件路径。可为相对路径或绝对路径。若不指定(null或空字符串)则默认为入口程序所在目录下的wwwroot文件夹。
+        ///   demo  D://fold1/wwwroot 
         /// </summary>
-        /// <param name="fileBasePath">静态文件路径。可为相对路径或绝对路径。若未指定存在的文件夹则默认为当前目录下的wwwroot文件夹。demo  D://fold1/wwwroot </param>
+        /// <param name="fileBasePath"></param>
         public StaticFileMap(string fileBasePath = null)
         {
             this.fileBasePath = fileBasePath;

+ 1 - 1
dotnet/Sers/Sers.Core/Sers.Core/Module/Reflection/ObjectLoader.cs

@@ -25,7 +25,7 @@ namespace Sers.Core.Module.Reflection
             {
                 try
                 {
-                    var filePath = CommonHelp.GetAbsPathByRealativePath(assemblyFile);
+                    var filePath = CommonHelp.GetAbsPath(assemblyFile);
                     if (File.Exists(filePath))
                     {
                         assembly = Assembly.LoadFrom(filePath);

+ 1 - 1
dotnet/Sers/Sers.Core/Sers.Core/Sers.Core.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Core/Sers.Core/SersLoader/ApiLoader.cs

@@ -54,7 +54,7 @@ namespace Sers.SersLoader
             {
                 try
                 {
-                    config.assembly = Assembly.LoadFile(CommonHelp.GetAbsPathByRealativePath(config.assemblyFile));
+                    config.assembly = Assembly.LoadFile(CommonHelp.GetAbsPath(config.assemblyFile));
                 }
                 catch (Exception ex)
                 {

+ 1 - 1
dotnet/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Ioc/Sers.Ioc/Sers.Ioc.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ApiStationMng.cs

@@ -59,7 +59,7 @@ namespace Sers.Gover.Base
 
         public List<ApiStationData> ApiStation_GetAll()
         {
-            return apiStations.Values.ToList();
+            return apiStations.Values.OrderBy(m=>m.stationName).ToList();
         }
 
          

+ 1 - 1
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/Extensions/ServiceStationExtensions.cs

@@ -25,7 +25,7 @@ namespace Vit.Extensions
 
         public static List<string> ApiStationNames_Get(this ServiceStation data)
         {
-            return data.apiNodes.Select((apiNode) => apiNode.apiDesc.ApiStationNameGet()).Distinct().ToList();
+            return data.apiNodes.Select((apiNode) => apiNode.apiDesc.ApiStationNameGet()).Distinct().OrderBy(m=>m).ToList();
         }
 
 

+ 10 - 1
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/Model/ServiceStationData.cs

@@ -1,4 +1,6 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
+using Newtonsoft.Json;
 using Sers.Core.Module.Counter;
 using Sers.Core.Module.Env;
 using Sers.Hardware.Env;
@@ -9,6 +11,13 @@ namespace Sers.Gover.Base.Model
     public class ServiceStationData
     {
         public string connKey { get; set; }
+
+        /// <summary>
+        /// 服务站点开启时间
+        /// </summary>
+        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
+        public DateTime? startTime;
+
         /// <summary>
         /// 状态:正常、手动关闭、断线
         /// </summary>

+ 61 - 50
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ServiceStationMng.cs

@@ -1,4 +1,5 @@
-using System.Collections.Concurrent;
+using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using Sers.Core.CL.MessageOrganize;
@@ -13,7 +14,7 @@ namespace Sers.Gover.Base
     public class ServiceStationMng
     {
         GoverManage goverManage;
-       
+
         public ServiceStationMng Init(GoverManage goverManage)
         {
             this.goverManage = goverManage;
@@ -42,20 +43,25 @@ namespace Sers.Gover.Base
 
         public List<ServiceStationData> ServiceStation_GetAll()
         {
-            return serviceStation_ConnKey_Map.Values.Select(
+            return serviceStation_ConnKey_Map.Values
+
+                .Select(
                 (m) => new ServiceStationData
                 {
-                    connKey = ""+m.connection.GetHashCode(),
+                    connKey = "" + m.connection.GetHashCode(),
+                    startTime = m.startTime,
                     deviceInfo = m.deviceInfo,
                     serviceStationInfo = m.serviceStationInfo,
                     status = "" + m.Status_Get(),
-                    usageStatus=m.usageStatus,
-                    counter=m.counter,
-                    apiNodeCount =m.apiNodes.Count,
+                    usageStatus = m.usageStatus,
+                    counter = m.counter,
+                    apiNodeCount = m.apiNodes.Count,
                     activeApiNodeCount = m.ActiveApiNodeCount_Get(),
-                    apiStationNames= m.ApiStationNames_Get()
+                    apiStationNames = m.ApiStationNames_Get()
                 }
-            ).ToList();
+            ).OrderBy(m => m?.serviceStationInfo?.serviceStationName)
+                .ThenBy(m => m.startTime)
+                .ToList();
         }
 
 
@@ -68,19 +74,23 @@ namespace Sers.Gover.Base
         /// <param name="serviceStation"></param>
         public void ServiceStation_Add(ServiceStation serviceStation)
         {
-            serviceStation_ConnKey_Map[serviceStation.connection.GetHashCode()] = serviceStation;
-
+            lock (this)
+            {
+                serviceStation.startTime=DateTime.Now;
+                
+                serviceStation_ConnKey_Map[serviceStation.connection.GetHashCode()] = serviceStation;
 
-            if (string.IsNullOrEmpty(serviceStation.serviceStationInfo.serviceStationKey)) 
-                serviceStation.serviceStationInfo.serviceStationKey = "tmp" + serviceStation.GetHashCode();
-            serviceStationKey_Map[serviceStation.serviceStationKey] = serviceStation;            
 
-            serviceStation.Status_Set(EServiceStationStatus.正常);
-            goverManage.apiStationMng.ServiceStation_Add(serviceStation);
+                if (string.IsNullOrEmpty(serviceStation.serviceStationInfo.serviceStationKey))
+                    serviceStation.serviceStationInfo.serviceStationKey = "tmp" + serviceStation.GetHashCode();
+                serviceStationKey_Map[serviceStation.serviceStationKey] = serviceStation;
 
-            //发布 Sers Event
-            SersEventService.Publish(SersEventService.Event_ServiceStation_Add, serviceStation);
+                serviceStation.Status_Set(EServiceStationStatus.正常);
+                goverManage.apiStationMng.ServiceStation_Add(serviceStation);
 
+                //发布 Sers Event
+                SersEventService.Publish(SersEventService.Event_ServiceStation_Add, serviceStation);
+            }
         }
 
 
@@ -91,45 +101,52 @@ namespace Sers.Gover.Base
         /// <param name="serviceStation"></param>
         public bool ServiceStation_UpdateStationInfo(ServiceStation serviceStation)
         {
-            if (!serviceStation_ConnKey_Map.TryGetValue(serviceStation.connection.GetHashCode(), out var old_serviceStation))
+            lock (this)
             {
-                return false;
-            }
+                if (!serviceStation_ConnKey_Map.TryGetValue(serviceStation.connection.GetHashCode(),
+                    out var old_serviceStation))
+                {
+                    return false;
+                }
 
-            if (!string.IsNullOrEmpty(old_serviceStation.serviceStationKey))
-                serviceStationKey_Map.TryRemove(old_serviceStation.serviceStationKey, out _);
+                if (!string.IsNullOrEmpty(old_serviceStation.serviceStationKey))
+                    serviceStationKey_Map.TryRemove(old_serviceStation.serviceStationKey, out _);
 
 
-            if (serviceStation.serviceStationInfo != null)
-                old_serviceStation.serviceStationInfo = serviceStation.serviceStationInfo;
+                if (serviceStation.serviceStationInfo != null)
+                    old_serviceStation.serviceStationInfo = serviceStation.serviceStationInfo;
 
-            if (serviceStation.deviceInfo != null)
-                old_serviceStation.deviceInfo = serviceStation.deviceInfo;
+                if (serviceStation.deviceInfo != null)
+                    old_serviceStation.deviceInfo = serviceStation.deviceInfo;
 
-            if (string.IsNullOrEmpty(old_serviceStation.serviceStationInfo.serviceStationKey)) 
-                old_serviceStation.serviceStationInfo.serviceStationKey = "tmp" + old_serviceStation.GetHashCode();
-            serviceStationKey_Map[old_serviceStation.serviceStationKey] = old_serviceStation;
+                if (string.IsNullOrEmpty(old_serviceStation.serviceStationInfo.serviceStationKey))
+                    old_serviceStation.serviceStationInfo.serviceStationKey = "tmp" + old_serviceStation.GetHashCode();
+                serviceStationKey_Map[old_serviceStation.serviceStationKey] = old_serviceStation;
 
-            return true;
+                return true;
+            }
         }
 
 
 
         public ServiceStation ServiceStation_Remove(string connKey)
-        {           
-            if (!serviceStation_ConnKey_Map.TryRemove(int.Parse(connKey), out var serviceStation))
+        {
+            lock (this)
             {
-                return null;
-            }
+                if (!serviceStation_ConnKey_Map.TryRemove(int.Parse(connKey), out var serviceStation))
+                {
+                    return null;
+                }
 
-            if (!string.IsNullOrEmpty(serviceStation.serviceStationKey))
-                serviceStationKey_Map.TryRemove(serviceStation.serviceStationKey, out _);
+                if (!string.IsNullOrEmpty(serviceStation.serviceStationKey))
+                    serviceStationKey_Map.TryRemove(serviceStation.serviceStationKey, out _);
 
-            goverManage.apiStationMng.ServiceStation_Remove(serviceStation);
+                goverManage.apiStationMng.ServiceStation_Remove(serviceStation);
 
-            //发布 Sers Event
-            SersEventService.Publish(SersEventService.Event_ServiceStation_Remove, serviceStation);
-            return serviceStation;
+                //发布 Sers Event
+                SersEventService.Publish(SersEventService.Event_ServiceStation_Remove, serviceStation);
+                return serviceStation;
+            }
         }
 
 
@@ -140,14 +157,12 @@ namespace Sers.Gover.Base
                 if (!serviceStation_ConnKey_Map.TryGetValue(int.Parse(connKey), out var serviceStation))
                 {
                     return null;
-                }               
-
+                }
 
                 if (serviceStation.Status_Get() == EServiceStationStatus.暂停)
                 {
                     return serviceStation;
-                }  
-
+                }
 
                 serviceStation.Status_Set(EServiceStationStatus.暂停);
                 goverManage.apiStationMng.ServiceStation_Pause(serviceStation);
@@ -170,7 +185,7 @@ namespace Sers.Gover.Base
                 if (serviceStation.Status_Get() == EServiceStationStatus.正常)
                 {
                     return serviceStation;
-                }          
+                }
 
                 serviceStation.Status_Set(EServiceStationStatus.正常);
                 goverManage.apiStationMng.ServiceStation_Start(serviceStation);
@@ -183,10 +198,6 @@ namespace Sers.Gover.Base
             }
         }
 
-
-
-      
-
         #endregion
 
 

+ 3 - 3
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ApiDescController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ApiDescController.cs

@@ -1,15 +1,15 @@
 using System.Collections.Generic;
+using System.Linq;
 using Sers.Core.Module.Api.ApiDesc;
 using Sers.Core.Module.Api.Rpc;
+using Sers.Gover.Base;
 using Sers.SersLoader;
-using System.Linq;
 using Sers.SersLoader.ApiDesc.Attribute.Valid;
-using Sers.Gover.Base;
 using Vit.Core.Util.ComponentModel.Api;
 using Vit.Core.Util.ComponentModel.Data;
 using Vit.Core.Util.ComponentModel.Model;
 
-namespace Sers.Gover.Controller.ApiControllers
+namespace Sers.Gover.Controllers.ApiControllers
 {
     [SsStationName("_gover_")]
     public class ApiDescController : IApiController

+ 3 - 3
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ApiStationController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ApiStationController.cs

@@ -1,14 +1,14 @@
 using System.Collections.Generic;
 using Sers.Core.Module.Api.Rpc;
-using Sers.SersLoader;
-using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Sers.Gover.Base;
 using Sers.Gover.Base.Model;
+using Sers.SersLoader;
+using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Vit.Core.Util.ComponentModel.Api;
 using Vit.Core.Util.ComponentModel.Data;
 using Vit.Core.Util.ComponentModel.Model;
 
-namespace Sers.Gover.Controller.ApiControllers
+namespace Sers.Gover.Controllers.ApiControllers
 {
     [SsStationName("_gover_")]
     public class ApiStationController : IApiController

+ 3 - 3
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/RateLimitController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/RateLimitController.cs

@@ -1,13 +1,13 @@
 using Newtonsoft.Json.Linq;
 using Sers.Core.Module.Api.Rpc;
-using Sers.SersLoader;
-using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Sers.Gover.Base;
 using Sers.Gover.RateLimit;
+using Sers.SersLoader;
+using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Vit.Core.Util.ComponentModel.Api;
 using Vit.Core.Util.ComponentModel.Data;
 
-namespace Sers.Gover.Controller.ApiControllers
+namespace Sers.Gover.Controllers.ApiControllers
 {
     [SsStationName("_gover_")]
     [SsRoutePrefix("rateLimit")]

+ 3 - 3
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ServerStationController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ServerStationController.cs

@@ -1,14 +1,14 @@
 using System.Collections.Generic;
 using Sers.Core.Module.Api.Rpc;
-using Sers.SersLoader;
-using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Sers.Gover.Base;
 using Sers.Gover.Base.Model;
+using Sers.SersLoader;
+using Sers.SersLoader.ApiDesc.Attribute.Valid;
 using Vit.Core.Util.ComponentModel.Api;
 using Vit.Core.Util.ComponentModel.Data;
 using Vit.Core.Util.ComponentModel.Model;
 
-namespace Sers.Gover.Controller.ApiControllers
+namespace Sers.Gover.Controllers.ApiControllers
 {
     [SsStationName("_gover_")]
     public class ServiceStationController : IApiController

+ 7 - 7
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ServiceCenterController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/ApiControllers/ServiceCenterController.cs

@@ -1,17 +1,17 @@
-using Sers.Core.Module.Api.Rpc;
-using System;
-using Newtonsoft.Json.Linq;
-using Vit.Extensions;
-using Vit.Core.Module.Log;
+using System;
 using System.Diagnostics;
+using Newtonsoft.Json.Linq;
+using Sers.Core.Module.Api.Rpc;
+using Sers.Hardware.Usage;
 using Sers.SersLoader;
 using Sers.SersLoader.ApiDesc.Attribute.Valid;
-using Sers.Hardware.Usage;
+using Vit.Core.Module.Log;
 using Vit.Core.Util.ComponentModel.Api;
 using Vit.Core.Util.ComponentModel.Data;
 using Vit.Core.Util.ComponentModel.Model;
+using Vit.Extensions;
 
-namespace Sers.Gover.Controller.ApiControllers
+namespace Sers.Gover.Controllers.ApiControllers
 {
     [SsStationName("_gover_")]
     public class ServerCenterController : IApiController

+ 1 - 1
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/Subscribers/UsageSubController.cs → dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controllers/Subscribers/UsageSubController.cs

@@ -2,7 +2,7 @@
 using Sers.Core.Module.PubSub.Controller;
 using Sers.Gover.Base;
 
-namespace Sers.Gover.Controller.Subscribers
+namespace Sers.Gover.Controllers.Subscribers
 {
     public class UsageSubController : SubscriberController<EnvUsageInfo>
     {

+ 2 - 2
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Persistence/Persistence_ApiDesc.cs

@@ -18,7 +18,7 @@ namespace Sers.Gover.Persistence
             foreach (char invalidChar in Path.GetInvalidFileNameChars())
                 jsonFileName = jsonFileName.Replace(invalidChar, '_');
 
-            return CommonHelp.GetAbsPathByRealativePath(new[] { "Data", "Sers", "Gover", "ApiDesc", jsonFileName });            
+            return CommonHelp.GetAbsPath(new[] { "Data", "Sers", "Gover", "ApiDesc", jsonFileName });            
         }
 
         /// <summary>
@@ -51,7 +51,7 @@ namespace Sers.Gover.Persistence
         {
             try
             {
-                var foldPath = CommonHelp.GetAbsPathByRealativePath(new[] { "Data", "Sers", "Gover", "ApiDesc" });
+                var foldPath = CommonHelp.GetAbsPath(new[] { "Data", "Sers", "Gover", "ApiDesc" });
                 if (!Directory.Exists(foldPath)) return;
                 string[] files = Directory.GetFiles(foldPath, "*.json");
                 foreach (string filePath in files)

+ 9 - 0
dotnet/Sers/Sers.ServiceCenter/Sers.ServiceCenter/Entity/ServiceStation.cs

@@ -19,7 +19,16 @@ namespace Sers.ServiceCenter.Entity
     [JsonObject(MemberSerialization.OptIn)]
     public class ServiceStation: Extensible
     {
+        /// <summary>
+        /// 服务站点开启时间
+        /// </summary>
+        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
+        public DateTime? startTime;
 
+        /// <summary>
+        /// CL通信层连接对象
+        /// </summary>
+        [JsonIgnore]
         public IOrganizeConnection  connection { get; set; }
 
         /// <summary>

+ 1 - 1
dotnet/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj

@@ -3,7 +3,7 @@
  
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>

+ 2 - 2
dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/appsettings.json

@@ -242,8 +242,8 @@
   },
 
   "Demo": {
-    /* 静态文件路径。可为相对路径或绝对路径。若未指定存在的文件夹则默认为当前目录下的wwwroot文件夹。 */
-    "wwwroot": "wwwroot\\demo"
+    /* 静态文件路径。可为相对路径或绝对路径。若不指定(null或空字符串)则默认为入口程序所在目录下的wwwroot文件夹。 */
+    "wwwroot": "wwwroot/demo"
   },
 
 

+ 1 - 1
dotnet/StationDemo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 7 - 3
dotnet/Vit/Vit.Core/Vit.Core/Util/Common/CommonHelp.cs

@@ -8,12 +8,16 @@ namespace Vit.Core.Util.Common
 {
     public static class CommonHelp
     {
-        /// <summary>
-        /// 获取相对路径。如 ["Data","Sers","Gover", "Counter.json"],将返回 /root/netapp/xxxx/Data/Sers/Gover/Counter.json
+        /// <summary>            
+        /// <para> 构建绝对路径。                                                                                       </para> 
+        /// <para> path可为相对路径或绝对路径,若为绝对路径则忽略程序当前路径。                                         </para>
+        /// <para> demo: ["Data","Sers","Gover", "Counter.json"],将返回 /root/netapp/xxxx/Data/Sers/Gover/Counter.json  </para>
+        /// <para>   ["/Data","Sers","Gover", "Counter.json"],将返回 /Data/Sers/Gover/Counter.json                      </para>
+        /// <para>   ["D:\Program Files\Counter.json"],将返回 "D:\Program Files\Counter.json"                           </para>
         /// </summary>
         /// <param name="path"></param>
         /// <returns></returns>
-        public static string GetAbsPathByRealativePath(params string[] path)
+        public static string GetAbsPath(params string[] path)
         {
             return Path.Combine(AppContext.BaseDirectory , String.Join( Path.DirectorySeparatorChar.ToString(), path));
         }

+ 6 - 2
dotnet/Vit/Vit.Core/Vit.Core/Util/ConfigurationManager/JsonFile.cs

@@ -51,11 +51,15 @@ namespace Vit.Core.Util.ConfigurationManager
         public string configPath { get; protected set; }
 
         /// <summary>
-        /// 通过绝对路径加载json文件
+        /// 通过绝对路径(或相对路径)加载json文件
         /// </summary>
         /// <param name="configPath"></param>
         public JsonFile(string configPath)
         {
+            //if (!Path.IsPathRooted(configPath)) 
+            //{
+                configPath = CommonHelp.GetAbsPath(configPath);
+            //} 
             this.configPath = configPath;
             RefreshConfiguration();
         }
@@ -64,7 +68,7 @@ namespace Vit.Core.Util.ConfigurationManager
         /// 通过相对路径加载json文件
         /// </summary>
         /// <param name="path">如: new []{"Data","sqler.json"}</param>
-        public JsonFile(params string[] path ):this(CommonHelp.GetAbsPathByRealativePath(path))
+        public JsonFile(params string[] path ):this(CommonHelp.GetAbsPath(path))
         {
             
         }

+ 1 - 1
dotnet/Vit/Vit.Core/Vit.Core/Vit.Core.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.Ioc/Vit.Ioc/Vit.Ioc.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 11 - 0
dotnet/Vit/Vit.WebHost/Extensions/IWebHostBuilderExtensions_VitConfig.cs

@@ -1,5 +1,7 @@
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Newtonsoft.Json.Linq;
 
 namespace Vit.Extensions
 {
@@ -28,6 +30,15 @@ namespace Vit.Extensions
                 //    x.MultipartBodyLengthLimit = int.MaxValue; // In case of multipart
                 //});
             });
+
+            if (null == Vit.Core.Util.ConfigurationManager.ConfigurationManager.Instance.Get<JToken>("Logging"))
+            {
+                data.ConfigureLogging((Microsoft.Extensions.Logging.ILoggingBuilder logging) =>
+                {
+                    logging.ClearProviders();
+                });
+            }         
+
             return data;
         }
     }

+ 6 - 14
dotnet/Vit/Vit.WebHost/RunArg.cs

@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting;
 using Microsoft.Extensions.DependencyInjection;
 using System.IO;
 using Vit.Extensions;
+using Vit.Core.Util.Common;
 
 namespace Vit.WebHost
 {
@@ -24,7 +25,7 @@ namespace Vit.WebHost
         /// </summary>
         private string _wwwrootPath = null;
         /// <summary>
-        /// 静态文件路径。可为相对路径或绝对路径。若为空字符串则默认为当前目录下的wwwroot文件夹。若不指定(null)则不映射静态文件。
+        /// 静态文件路径。可为相对路径或绝对路径。若为空字符串则默认为入口程序所在目录下的wwwroot文件夹。若不指定(null)则不映射静态文件。
         /// </summary>
         public string wwwrootPath
         {
@@ -35,22 +36,13 @@ namespace Vit.WebHost
                 string fullPath = value;
                 if ("" == fullPath)
                 {
-                    fullPath = Path.Combine(AppContext.BaseDirectory, "wwwroot");
-                }
-                else if (fullPath != null)
-                {
-                    if (!Directory.Exists(fullPath))
-                    {
-                        fullPath = Path.Combine(AppContext.BaseDirectory, fullPath);
-                    }
+                    fullPath = "wwwroot";
                 }
 
-                if (string.IsNullOrEmpty(fullPath)) 
-                {
-                    fullPath = null;
-                }
-                else
+                if (fullPath != null)
                 {
+                    fullPath = CommonHelp.GetAbsPath(fullPath);
+               
                     var dir = new DirectoryInfo(fullPath);
                     if (dir.Exists)
                     {

+ 1 - 1
dotnet/Vit/Vit.WebHost/Vit.WebHost.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Gateway/App.Gateway/App.Gateway.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 0 - 7
dotnet/netcore/Gateway/App.Gateway/appsettings.json

@@ -1,11 +1,4 @@
 {
-  "Logging": {
-    "LogLevel": {
-      "Default": "Warning"
-    }
-  },
-
-
   "Sers": {
     /* 通讯层配置 */
     "CL": {

+ 1 - 1
dotnet/netcore/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 0 - 7
dotnet/netcore/ServiceCenter/App.Gover.Gateway/appsettings.json

@@ -1,11 +1,4 @@
 {
-  "Logging": {
-    "LogLevel": {
-      "Default": "Warning"
-    }
-  },
-
-
   "Sers": {
     /* 通讯层配置 */
     "CL": {

+ 27 - 3
dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/ServiceStationMng.html

@@ -30,6 +30,7 @@
             {{ (station.serviceStationInfo||{}).serviceStationName }} <br />
             {{station.apiStationNames}} <br />
             stationVersion:{{ (station.serviceStationInfo||{}).stationVersion }}<br />
+            startTime:{{station.startTime}}<br />
             状态:{{station.status}}(正常、暂停)<br />
             操作:  <a href="#" @click="start(station)">打开</a>   <a href="#" @click="pause(station)">暂停</a>  <a href="#" @click="stop(station)">强制关闭</a> <br />
             -----------------------<br />
@@ -37,9 +38,9 @@
             activeApiNodeCount:{{station.activeApiNodeCount}}     <br />
             calledCount  err/sum:  {{(station.counter||{}).errorCount}}/ {{(station.counter||{}).sumCount}}<br />
             -----------------------<br />
-            MachineName:{{(station.deviceInfo||{}).MachineName}}<br />
-            cpuUsage:{{ parseInt((station.usageStatus||{}).cpuUsage)|| '-' }} %<br />
-            memoryUsage:{{parseInt((station.usageStatus||{}).memoryUsage) || '-' }} % <br />
+            MachineName:{{ getStringByPath(station,'deviceInfo.MachineName')}}<br />
+            cpuUsage:{{ getFloatByPath(station,'usageStatus.cpuUsage') }} %<br />
+            memoryUsage:{{ getFloatByPath(station,'usageStatus.memoryUsage') }} % <br />
             -----------------------<br />
             <table>
                 <tr>
@@ -61,6 +62,26 @@
     </div>
     <script>
 
+        // getFloatByPath({a:{b:'12.525'}},'a.b');
+        function getFloatByPath(obj, path,fixed) {
+            var items = path.split('.');
+            for (var i in items) {
+                if (!obj) return '';
+                obj = obj[items[i]];                
+            }
+            obj = parseFloat(obj);
+            return isNaN(obj) ? '' : obj.toFixed(isNaN(fixed)?2:fixed);            
+        }
+
+         function getStringByPath(obj, path) {
+            var items = path.split('.');
+            for (var i in items) {
+                if (!obj) return '';
+                obj = obj[items[i]];                
+            }            
+            return ''+obj;            
+        }
+
 
         var stations = new Vue({
             el: '#stations',
@@ -70,6 +91,9 @@
                     }
                 ]
             }, methods: {
+                getFloatByPath: getFloatByPath,
+                getStringByPath: getStringByPath,
+
                 start: function (station) {
                     sers.apiClient.serviceStation_start(station.connKey, function (data) {
                         rendStations();

+ 1 - 1
dotnet/netcore/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 0 - 6
dotnet/netcore/ServiceCenter/App.ServiceCenter/appsettings.json

@@ -1,10 +1,4 @@
 {
-  "Logging": {
-    "LogLevel": {
-      "Default": "Warning"
-    }
-  },
-
 
   "Sers": {
     /* 通讯层配置 */

+ 1 - 1
dotnet/netcore/Station/App.Ioc.Station/App.Ioc.Station.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Station/App.Robot.Station/App.Robot.Station.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RunPostBuildEvent>Always</RunPostBuildEvent>
-    <Version>2.1.1.299</Version>
+    <Version>2.1.1.300</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Station/App.Robot.Station/appsettings.json

@@ -140,7 +140,7 @@
 
   "Robot": {
 
-    /* 静态文件路径。可为相对路径或绝对路径。若未指定存在的文件夹则默认为当前目录下的wwwroot文件夹。 */
+    /* 可为相对路径或绝对路径。若不指定(null或空字符串)则默认为入口程序所在目录下的wwwroot文件夹。 */
     "wwwroot": "wwwroot/_robot_"
   },