Skip to content

Commit 4014d07

Browse files
committed
add debug info
1 parent 56207af commit 4014d07

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

OpenFlow/src/public/Controllers.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module openflow {
2525
public api: api
2626
) {
2727
super($scope, $location, $routeParams, WebSocketClient, api);
28+
console.debug("WorkflowsCtrl");
2829
WebSocketClient.onSignedin((user: TokenUser) => {
2930
this.loadData();
3031
});
@@ -140,6 +141,7 @@ module openflow {
140141
public api: api
141142
) {
142143
super($scope, $location, $routeParams, WebSocketClient, api);
144+
console.debug("ReportsCtrl");
143145
WebSocketClient.onSignedin((user: TokenUser) => {
144146
this.loadData();
145147
});
@@ -226,6 +228,7 @@ module openflow {
226228
public api: api,
227229
) {
228230
super($scope, $location, $routeParams, WebSocketClient, api);
231+
console.debug("MainCtrl");
229232
console.log("MainCtrl::constructor");
230233
WebSocketClient.onSignedin((user: TokenUser) => {
231234
this.loadData();
@@ -385,6 +388,7 @@ module openflow {
385388
public api
386389
) {
387390
super($scope, $location, $routeParams, WebSocketClient, api);
391+
console.debug("ProvidersCtrl");
388392
this.basequery = { _type: "provider" };
389393
this.collection = "config";
390394
WebSocketClient.onSignedin((user: TokenUser) => {
@@ -409,13 +413,14 @@ module openflow {
409413
public api: api
410414
) {
411415
super($scope, $location, $routeParams, WebSocketClient, api);
416+
console.debug("ProviderCtrl");
412417
this.collection = "config";
413418
WebSocketClient.onSignedin((user: TokenUser) => {
414419
if (this.id !== null && this.id !== undefined) {
415420
this.loadData();
416421
} else {
417-
this.model = new Provider("Office 365", "Office365", "saml", "",
418-
"https://login.microsoftonline.com/common/FederationMetadata/2007-06/FederationMetadata.xml")
422+
this.model = new Provider("", "", "", "",
423+
"")
419424
}
420425

421426
});
@@ -443,6 +448,7 @@ module openflow {
443448
public api: api
444449
) {
445450
super($scope, $location, $routeParams, WebSocketClient, api);
451+
console.debug("UsersCtrl");
446452
this.basequery = { _type: "user" };
447453
this.collection = "users";
448454
WebSocketClient.onSignedin((user: TokenUser) => {
@@ -529,6 +535,7 @@ module openflow {
529535
public api: api
530536
) {
531537
super($scope, $location, $routeParams, WebSocketClient, api);
538+
console.debug("UserCtrl");
532539
this.collection = "users";
533540
WebSocketClient.onSignedin((user: TokenUser) => {
534541
if (this.id !== null && this.id !== undefined) {
@@ -582,6 +589,7 @@ module openflow {
582589
public api: api
583590
) {
584591
super($scope, $location, $routeParams, WebSocketClient, api);
592+
console.debug("RolesCtrl");
585593
this.basequery = { _type: "role" };
586594
this.collection = "users";
587595
WebSocketClient.onSignedin((user: TokenUser) => {
@@ -607,6 +615,7 @@ module openflow {
607615
public api: api
608616
) {
609617
super($scope, $location, $routeParams, WebSocketClient, api);
618+
console.debug("RoleCtrl");
610619
this.collection = "users";
611620
WebSocketClient.onSignedin(async (user: TokenUser) => {
612621
if (this.id !== null && this.id !== undefined) {
@@ -688,6 +697,7 @@ module openflow {
688697
public WebSocketClient: WebSocketClient,
689698
public api: api
690699
) {
700+
console.debug("SocketCtrl");
691701
WebSocketClient.onSignedin(async (user: TokenUser) => {
692702
await api.RegisterQueue();
693703
});
@@ -720,6 +730,7 @@ module openflow {
720730
public api: api
721731
) {
722732
super($scope, $location, $routeParams, WebSocketClient, api);
733+
console.debug("EntitiesCtrl");
723734
this.basequery = {};
724735
this.collection = $routeParams.collection;
725736
this.baseprojection = { _type: 1, type: 1, name: 1, _created: 1, _createdby: 1, _modified: 1 };
@@ -765,6 +776,7 @@ module openflow {
765776
public api: api
766777
) {
767778
super($scope, $location, $routeParams, WebSocketClient, api);
779+
console.debug("jslogCtrl");
768780
WebSocketClient.onSignedin((user: TokenUser) => {
769781
this.loadData();
770782
});
@@ -798,6 +810,7 @@ module openflow {
798810
public api: api
799811
) {
800812
super($scope, $location, $routeParams, WebSocketClient, api);
813+
console.debug("EntityCtrl");
801814
this.collection = $routeParams.collection;
802815
WebSocketClient.onSignedin(async (user: TokenUser) => {
803816
if (this.id !== null && this.id !== undefined) {

OpenFlow/src/public/WebSocketClient.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module openflow {
9696
var q: SigninMessage = new SigninMessage();
9797
this.getJSON("/jwt", async (error: any, data: any) => {
9898
try {
99-
if (data === null || data === undefined || data.jwt === "") {
99+
if (data === null || data === undefined || (data.jwt === "" && data.rawAssertion === "")) {
100100
if (this.$location.path() !== "/Login") {
101101
console.log("path: " + this.$location.path());
102102
console.log("WebSocketClient::onopen: Not signed in, redirect /Login");
@@ -117,22 +117,26 @@ module openflow {
117117
if (_android != null) {
118118
q.realm = "android";
119119
try {
120+
console.debug("getFirebaseToken");
120121
q.firebasetoken = _android.getFirebaseToken();
121122
} catch (error) {
122123
console.log(error);
123124
}
124125
try {
126+
console.debug("getOneSignalRegisteredId");
125127
q.onesignalid = _android.getOneSignalRegisteredId();
126128
} catch (error) {
127129
console.log(error);
128130
}
129131
try {
132+
console.debug("iosGetOnesignalToken");
130133
var results = await this.iosGetOnesignalToken();
131134
q.onesignalid = results.token;
132135
} catch (error) {
133136
console.log(error);
134137
}
135138
}
139+
console.debug("signing in");
136140
var msg: Message = new Message(); msg.command = "signin"; msg.data = JSON.stringify(q);
137141
var a: any = await this.Send(msg);
138142
var result: SigninMessage = a;

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.125
1+
0.0.126

0 commit comments

Comments
 (0)