|
@@ -21,6 +21,7 @@ using DW5S.Service;
|
|
|
using DW5S.Entity;
|
|
|
using Serilog;
|
|
|
using DW5S.ViewModel;
|
|
|
+using DevExpress.XtraReports.Wizards;
|
|
|
|
|
|
namespace DW5S.App.UserControl
|
|
|
{
|
|
@@ -50,7 +51,26 @@ namespace DW5S.App.UserControl
|
|
|
gridView1.Columns[nameof(SvrViewModel.SwaggerAddr)].ColumnEdit = linkEdit;
|
|
|
gridView1.Columns[nameof(SvrViewModel.SwaggerAddr)].OptionsColumn.AllowEdit = true;
|
|
|
}
|
|
|
- this.list.AddRange(ServerContext.Instance.GetAll().To<List<SvrViewModel>>());
|
|
|
+ #region 模拟服务
|
|
|
+ List<SvrViewModel> svrList = new List<SvrViewModel>();
|
|
|
+ SvrViewModel svr1 = new SvrViewModel(EnumSvrType.AdCgSvr,"10001","http://192.168.1.1:8091", "http://192.168.1.1:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr2 = new SvrViewModel(EnumSvrType.CpuCgSvr, "10002", "http://192.168.1.2:8091", "http://192.168.1.2:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr3 = new SvrViewModel(EnumSvrType.GpuCgSvr, "10003", "http://192.168.1.3:8091", "http://192.168.1.3:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr4 = new SvrViewModel(EnumSvrType.CheckSvr, "10004", "http://192.168.1.4:8091", "http://192.168.1.4:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr5 = new SvrViewModel(EnumSvrType.X2D1NoRefTask, "10005", "http://192.168.1.5:8091", "http://192.168.1.5:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr6 = new SvrViewModel(EnumSvrType.X2D1RefTask, "10006", "http://192.168.1.6:8091", "http://192.168.1.6:8091/swagger/index.html", DateTime.Now);
|
|
|
+ SvrViewModel svr7 = new SvrViewModel(EnumSvrType.X1D1CxTask, "10007", "http://192.168.1.7:8091", "http://192.168.1.7:8091/swagger/index.html", DateTime.Now);
|
|
|
+ svrList.Add(svr1);
|
|
|
+ svrList.Add(svr2);
|
|
|
+ svrList.Add(svr3);
|
|
|
+ svrList.Add(svr4);
|
|
|
+ svrList.Add(svr5);
|
|
|
+ svrList.Add(svr6);
|
|
|
+ svrList.Add(svr7);
|
|
|
+ this.list.AddRange(svrList);
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ //this.list.AddRange(ServerContext.Instance.GetAll().To<List<SvrViewModel>>());
|
|
|
gridView1.RefreshData();
|
|
|
Messenger.Defalut.Sub<List<SvrViewModel>>("服务集合改变", RefreshSvr);
|
|
|
var unitOfWork = IocContainer.UnitOfWork;
|
|
@@ -79,14 +99,7 @@ namespace DW5S.App.UserControl
|
|
|
var find = list.Find(p => p.BaseHttpAddr == item.BaseHttpAddr);
|
|
|
if (find == null)
|
|
|
{
|
|
|
- list.Add(new SvrViewModel()
|
|
|
- {
|
|
|
- SvrType = item.SvrType,
|
|
|
- SvrID = item.SvrID,
|
|
|
- BaseHttpAddr = item.BaseHttpAddr,
|
|
|
- SwaggerAddr = item.SwaggerAddr,
|
|
|
- ReportTime = item.ReportTime,
|
|
|
- });
|
|
|
+ list.Add(new SvrViewModel(item.SvrType, item.SvrID, item.BaseHttpAddr, item.SwaggerAddr, item.ReportTime));
|
|
|
}
|
|
|
else
|
|
|
{
|