Commit 929e7813 by liulongfei

操作日志

parent 2dcbe432
......@@ -63,6 +63,21 @@ namespace VIZ.Package.Domain
/// </summary>
public const string OPERATE_SETTING_RESET_LAYOUT = "重置布局";
/// <summary>
/// 保存设置
/// </summary>
public const string OPERATE_SETTING_SAVE = "保存设置";
/// <summary>
/// Viz连接
/// </summary>
public const string OPERATE_SETTING_VIZ_CONNECTION = "Viz连接";
/// <summary>
/// Viz连接断开
/// </summary>
public const string OPERATE_SETTING_VIZ_DISCONNECTION = "Viz连接断开";
// =============================================================================
// 项目
// =============================================================================
......
......@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 插件名称
/// </summary>
public const string PLUGIN_NAME = "控制";
public const string PLUGIN_NAME = "播出控制";
/// <summary>
/// 注册
......
......@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 插件名称
/// </summary>
public const string PLUGIN_NAME = "控制列表";
public const string PLUGIN_NAME = "控制字段列表";
/// <summary>
/// 注册
......
......@@ -9,6 +9,7 @@ using VIZ.Framework.Core;
using VIZ.Package.Connection;
using VIZ.Package.Domain;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
......@@ -57,6 +58,11 @@ namespace VIZ.Package.Module
/// </summary>
private ConnService connService = new ConnService();
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
// ==========================================================================
// Property
// ==========================================================================
......@@ -98,10 +104,18 @@ namespace VIZ.Package.Module
{
if (model.IsConnected)
{
// 记录操作日志
string remark = $"分组: {model.OwnerGroup?.Name} 连接: {model.IP}:{model.Port}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_SETTING_VIZ_DISCONNECTION, remark);
model.EndpointManager.Disconnect();
}
else
{
// 记录操作日志
string remark = $"分组: {model.OwnerGroup?.Name} 连接: {model.IP}:{model.Port}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_SETTING_VIZ_CONNECTION, remark);
model.EndpointManager.Connect();
}
}, final: () =>
......@@ -151,6 +165,10 @@ namespace VIZ.Package.Module
if (item == ApplicationDomainEx.PreviewConn)
continue;
// 记录操作日志
string remark = $"分组: {item.OwnerGroup?.Name} 连接: {item.IP}:{item.Port}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.System, RecordLogTrigger.System, RecordLogConstants.OPERATE_SETTING_VIZ_DISCONNECTION, remark);
item.Dispose();
}
}
......@@ -178,6 +196,10 @@ namespace VIZ.Package.Module
{
try
{
// 记录操作日志
string remark = $"分组: {item.OwnerGroup?.Name} 连接: {item.IP}:{item.Port}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.System, RecordLogTrigger.System, RecordLogConstants.OPERATE_SETTING_VIZ_CONNECTION, remark);
item.EndpointManager.Connect();
}
catch (Exception ex)
......
......@@ -29,7 +29,7 @@ namespace VIZ.Package.Module
/// <summary>
/// 插件名称
/// </summary>
public const string PLUGIN_NAME = "场景";
public const string PLUGIN_NAME = "场景";
/// <summary>
/// 注册
......
......@@ -12,6 +12,7 @@ using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Plugin;
using VIZ.Package.Service;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
......@@ -42,6 +43,15 @@ namespace VIZ.Package.Module
}
// ==========================================================================
// Controller & Service
// ==========================================================================
/// <summary>
/// 操作日志服务
/// </summary>
private RecordLogService recordLogService = new RecordLogService();
// ==========================================================================
// Property
// ==========================================================================
......@@ -135,6 +145,10 @@ namespace VIZ.Package.Module
{
view.Save();
// 记录操作日志
string remark = $"{this.SelectedValue.Name}";
this.recordLogService.AppendLog(ApplicationConstants.APPLICATION_GROUP_NAME, RecordLogOperate.Operate, RecordLogTrigger.Human, RecordLogConstants.OPERATE_SETTING_SAVE, remark);
DXMessageBox.Show("保存成功!");
}
catch (Exception ex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment