Debugging

This commit is contained in:
Falkvinge
2017-05-16 12:01:02 +02:00
parent cc40100824
commit cc911b7212
3 changed files with 15 additions and 5 deletions
+1
View File
@@ -887,6 +887,7 @@ namespace Swarmops.Backend
downstream["MessageType"] = "RecalculateOrganizationProfitLoss";
downstream["OrganizationId"] = message.OrganizationId.ToString(CultureInfo.InvariantCulture);
Broadcast(downstream);
Console.WriteLine(@" - Recalculating P&L for orgId " + message.OrganizationId);
break;
default:
// Unhandled. Exception?
+3
View File
@@ -56,6 +56,7 @@ namespace Swarmops.Frontend.Socket
private void ProcessMetapackage(string xmlData)
{
Console.WriteLine("Decoding XML: " + xmlData);
SocketMessage message = SocketMessage.FromXml(xmlData);
// Most should just be sent straight to backend. Some could possibly be processed already here.
@@ -68,6 +69,7 @@ namespace Swarmops.Frontend.Socket
default:
// we're not handling here, send to backend
Console.WriteLine(" - sending " + message.MessageType + " upstream");
FrontendLoop.SendMessageUpstream(message);
break;
}
@@ -84,6 +86,7 @@ namespace Swarmops.Frontend.Socket
if (Authority.IsSystemAuthorityTokenValid(authBase64))
{
_authority = null; // System authority
Console.WriteLine(" - - valid system authentication token");
}
else
{
+11 -5
View File
@@ -1,5 +1,6 @@
using System;
using Resources;
using Swarmops.Logic;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Security;
using Swarmops.Logic.Support;
@@ -19,12 +20,17 @@ namespace Swarmops.Frontend
this.PageAccessRequired = new Access (AccessAspect.Null, AccessType.Read);
// dummy security until there's something to show on Dashboard
byte[] symmetricKey = SystemSettings.SymmetricEncryptionKeyFileSystem;
// Access forces initialization if it's not there: remove by Alpha-12 // TODO
// BEGIN TEST CODE
/*
this.LabelActionListMotions.Text = Resources.Pages.Governance.ListMotions_PageTitle;
this.LabelActionVote.Text = Resources.Pages.Governance.Vote_PageTitle;*/
SocketMessage testMessage = new SocketMessage
{
MessageType = "Foo",
OrganizationId = 1
};
string messageXml = testMessage.ToXml();
SocketMessage newMessage = SocketMessage.FromXml(messageXml);
// END TEST CODE
InfoBoxLiteral =
"This is a Dashboard placeholder. It will contain a snapshot of the state of things as soon as the basic functions are re-implemented in the new interface.";