Fix alarm Click + Test part of Server

This commit is contained in:
CMS3762\carminatini
2018-02-15 15:51:51 +01:00
parent b004bbc8a1
commit 74d0a44feb
4 changed files with 10 additions and 3 deletions
+2
View File
@@ -40,6 +40,8 @@ namespace Step.UI
TXTType.Text = NcConfig.NcVendor;
InitializeMessageListeners();
MessageServices.Current.Subscribe(SHOW_MSG_UI, (a, b) => { MessageBox.Show(a.ToString()); });
}
private static ServerControlWindow ctrlwindow = null;
+1
View File
@@ -72,6 +72,7 @@ namespace Step.Utils
public const string SEND_MESSAGE = "SEND_MESSAGE";
public const string SEND_NC_STATUS = "NC_STATUS";
public const string SEND_THREADS_STATUS = "THREAD_STATUS";
public const string SHOW_MSG_UI = "SHOW_MSG_UI";
// MVVM Messages to signalR tasks
public const string SEND_ALARMS = "SEND_ALARMS";
+5 -1
View File
@@ -5,6 +5,8 @@ using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNet.SignalR;
using Step.NC;
using TeamDev.SDK.MVVM;
using static Step.Utils.Constants;
namespace Step.Controllers.SignalR
{
@@ -54,15 +56,17 @@ namespace Step.Controllers.SignalR
ncHandler.Connect();
ncHandler.RefreshAllAlarms();
}
MessageServices.Current.Publish(SHOW_MSG_UI, null, "Refresh All Alarms.");
}
public void RefreshAlarm(string id)
{
MessageServices.Current.Publish(SHOW_MSG_UI, null, "Refresh Single Alarm. ID: " + id);
}
public void RecoveryProcedure(string id)
{
MessageServices.Current.Publish(SHOW_MSG_UI, null, "Recovery Alarm. ID: " + id);
}
}
@@ -67,10 +67,10 @@ export default {
this.$emit("close-detail");
},
refresh() {
Hub.Current.RefreshAlarm(this.alarm.Id);
Hub.Current.RefreshAlarm(this.alarm.id);
},
recovery() {
Hub.Current.RecoveryProcedure(this.alarm.Id);
Hub.Current.RecoveryProcedure(this.alarm.id);
}
}
};