principal-dashboard-lib-v2 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -210,7 +210,9 @@
210
210
  }
211
211
  //----------//location
212
212
  if (schoolTerminal[i].metadata !== undefined) {
213
- location = schoolTerminal[i].metadata; // get name of user w.r.t. ID
213
+ var metadataJSON = JSON.parse(schoolTerminal[i].metadata);
214
+ location = metadataJSON.location; // get name of user w.r.t. ID
215
+ console.log("metadataJSON", location);
214
216
  }
215
217
  else {
216
218
  location = '';
@@ -306,9 +308,14 @@
306
308
  }
307
309
  //----------// terminalIP and terminalLocation
308
310
  for (var i_3 = 0; i_3 < schoolTerminalMatrix.length; i_3++) {
311
+ console.log("schoolTerminalMatrix[i]", schoolTerminalMatrix[i_3]);
312
+ console.log("schoolTerminalMatrix[i].terminalKey", terminalIP, schoolTerminalMatrix[i_3].terminalKey);
309
313
  if (terminalIP === schoolTerminalMatrix[i_3].terminalKey) {
310
- // console.log("schoolTerminalMatrix[i].terminalKey",terminalIP,schoolTerminalMatrix[i]);
311
314
  terminalLocation = schoolTerminalMatrix[i_3].location;
315
+ break;
316
+ }
317
+ else {
318
+ terminalLocation = "location";
312
319
  }
313
320
  }
314
321
  var userData = {
@@ -352,9 +359,9 @@
352
359
  var dataTableforChart = new Array();
353
360
  dataTableforChart = [];
354
361
  if (this.userConsoleData) {
355
- // console.log("this.userConsoleData",this.userConsoleData);
362
+ console.log("this.userConsoleData", this.userConsoleData);
356
363
  for (var i = 0; i < this.userConsoleData.length; i++) {
357
- var userData = [this.userConsoleData[i].terminalLocation, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
364
+ var userData = [this.userConsoleData[i].terminalIP, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
358
365
  dataTableforChart.push(userData);
359
366
  }
360
367
  }
@@ -716,7 +723,7 @@
716
723
  this.isChartView = true;
717
724
  }
718
725
  ChartheaderComponent.prototype.ngOnInit = function () {
719
- this.libVersion = "0.0.19";
726
+ this.libVersion = "0.0.13";
720
727
  // this.myIcon = document.getElementById('myIconImg');
721
728
  // this.changeChatType()
722
729
  };
@@ -1185,7 +1192,7 @@
1185
1192
  labels.removeChild(labels.lastChild);
1186
1193
  }
1187
1194
  this.chartDataTable = this.myChartDataMatrix;
1188
- // console.log("this.myChartDataMatrix",this.myChartDataMatrix);
1195
+ console.log("this.myChartDataMatrix", this.myChartDataMatrix);
1189
1196
  (this.myChartOptions = {
1190
1197
  tooltip: {
1191
1198
  trigger: 'none',