优化rpc
This commit is contained in:
parent
050ef66509
commit
1c014952d1
Binary file not shown.
@ -145,7 +145,12 @@
|
||||
"ProjectGuid": "44619988-9f09-4714-9532-a44faf8275fe",
|
||||
"DisplayName": "IoTGateway.Model",
|
||||
"ColorIndex": 11
|
||||
},
|
||||
"27ff2d65-0bba-4c69-9dd7-311a4f21541e": {
|
||||
"ProjectGuid": "27ff2d65-0bba-4c69-9dd7-311a4f21541e",
|
||||
"DisplayName": "IoTGateway.DataAccess",
|
||||
"ColorIndex": 12
|
||||
}
|
||||
},
|
||||
"NextColorIndex": 12
|
||||
"NextColorIndex": 13
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -20,8 +20,10 @@ namespace IoTGateway.Model
|
||||
|
||||
public enum DataSide
|
||||
{
|
||||
[Display(Name ="共享属性")]
|
||||
AnySide=0,
|
||||
//ServerSide=1,
|
||||
ClientSide=2,
|
||||
[Display(Name = "客户端属性")]
|
||||
ClientSide =2,
|
||||
}
|
||||
}
|
@ -19,10 +19,10 @@ namespace IoTGateway.ViewModel.Rpc.RpcLogVMs
|
||||
{
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Create, Localizer["Sys.Create"],"Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Edit, Localizer["Sys.Edit"], "Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "Rpc", dialogWidth: 800),
|
||||
this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Delete, Localizer["Sys.Delete"], "Rpc", dialogWidth: 800),
|
||||
this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Details, Localizer["Sys.Details"], "Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.BatchEdit, Localizer["Sys.BatchEdit"], "Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "Rpc", dialogWidth: 800),
|
||||
this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "Rpc", dialogWidth: 800),
|
||||
//this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "Rpc", dialogWidth: 800),
|
||||
this.MakeStandardAction("RpcLog", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "Rpc"),
|
||||
};
|
||||
@ -33,12 +33,12 @@ namespace IoTGateway.ViewModel.Rpc.RpcLogVMs
|
||||
{
|
||||
return new List<GridColumn<RpcLog_View>>{
|
||||
this.MakeGridHeader(x => x.RpcSide),
|
||||
this.MakeGridHeader(x => x.StartTime),
|
||||
this.MakeGridHeader(x => x.StartTime).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.Duration),
|
||||
this.MakeGridHeader(x => x.DeviceName_view),
|
||||
this.MakeGridHeader(x => x.Method),
|
||||
this.MakeGridHeader(x => x.Params),
|
||||
this.MakeGridHeader(x => x.EndTime),
|
||||
this.MakeGridHeader(x => x.IsSuccess),
|
||||
this.MakeGridHeader(x => x.IsSuccess).SetHeader("是否成功"),
|
||||
this.MakeGridHeader(x => x.Description),
|
||||
this.MakeGridHeaderAction(width: 200)
|
||||
};
|
||||
@ -68,13 +68,34 @@ namespace IoTGateway.ViewModel.Rpc.RpcLogVMs
|
||||
.OrderByDescending(x => x.StartTime);
|
||||
return query;
|
||||
}
|
||||
public override void AfterDoSearcher()
|
||||
{
|
||||
foreach (var entity in EntityList)
|
||||
{
|
||||
try
|
||||
{
|
||||
TimeSpan ts1 = new TimeSpan(((DateTime)entity.StartTime).Ticks);
|
||||
TimeSpan ts2 = new TimeSpan(((DateTime)entity.EndTime).Ticks);
|
||||
TimeSpan ts = ts1.Subtract(ts2).Duration();
|
||||
entity.Duration = Math.Round(ts.TotalMilliseconds, 2);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
base.AfterDoSearcher();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class RpcLog_View : RpcLog
|
||||
{
|
||||
[Display(Name = "设备名")]
|
||||
public String DeviceName_view { get; set; }
|
||||
[Display(Name = "持续时间(ms)")]
|
||||
public double Duration { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,5 +5,5 @@
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:quote>注意:目前只实现了iotsharp和tb的遥测数据上传</wt:quote>
|
||||
<wt:quote>注意:目前实现了iotsharp和tb的遥测、属性上传以及RPC功能</wt:quote>
|
||||
<wt:grid vm="@Model" url="/Config/SystemConfig/Search" />
|
||||
|
@ -11,4 +11,5 @@
|
||||
<wt:combobox field="Searcher.IsSuccess" empty-text="@Localizer["Sys.All"]" />
|
||||
</wt:row>
|
||||
</wt:searchpanel>
|
||||
<wt:quote>注意:不同平台的rpc的topic和payload均不同,后期教程会更新到<a href="http://iotgateway.net/" target="_blank">http://iotgateway.net/</a></wt:quote>
|
||||
<wt:grid vm="@Model" url="/Rpc/RpcLog/Search" hidden-checkbox="true" hidden-grid-index="true" />
|
||||
|
@ -27,6 +27,8 @@
|
||||
<ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.Mvc\WalkingTec.Mvvm.Mvc.csproj" />
|
||||
<ProjectReference Include="..\WalkingTec.Mvvm\WalkingTec.Mvvm.TagHelpers.LayUI\WalkingTec.Mvvm.TagHelpers.LayUI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JsonSchema="" /></VisualStudio></ProjectExtensions>
|
||||
</Project>
|
||||
|
||||
|
||||
|
@ -68,6 +68,10 @@
|
||||
<li>
|
||||
<span class="login-error">@Model.MSD.GetFirstError()</span>
|
||||
<button type="submit" class="login-button" style="cursor:pointer">@Model.Localizer["Login.Login"]</button>
|
||||
<div class="login-button" style="cursor:pointer">
|
||||
<a href="http://iotgateway.net/" target="_blank">跳转教程文档,持续更新,收藏不迷路</a>
|
||||
</div>
|
||||
|
||||
@*<wt:linkbutton window-title="@Model.Localizer["Login.Register"]" class="login-button" style="cursor:pointer" target="ButtonTargetEnum.Layer" window-width="500" window-height="500" url="/Login/Reg" text="@Model.Localizer["Login.Register"]" />*@
|
||||
</li>
|
||||
</ul>
|
||||
|
Binary file not shown.
BIN
iotgateway.db
BIN
iotgateway.db
Binary file not shown.
Loading…
Reference in New Issue
Block a user