@{ ViewData["Title"] = "主页"; var clients = ViewBag.Clients as List; }

客户端管理

@if (clients != null) { foreach (var client in clients) { var config = client.Config as LTEMvcApp.Models.ClientConfig; var state = (LTEMvcApp.Models.ClientState)client.State; } }
客户端名称 地址 状态 SSL 启用 操作
@client.Config.Name @client.Config.Address @if (state == LTEMvcApp.Models.ClientState.Connected) { 已连接 } else if (state == LTEMvcApp.Models.ClientState.Connecting) { 连接中 } else if (state == LTEMvcApp.Models.ClientState.Error) { 错误 } else { 已停止 } @if (config.Ssl) { } else { } @if (config.Enabled) { } else { } 启动 停止 消息 配置
@section Scripts { }