principal-dashboard-lib-v2 0.0.13 → 0.0.15
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.
- package/bundles/principal-dashboard-lib-v2.umd.js +82 -29
- package/bundles/principal-dashboard-lib-v2.umd.js.map +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js.map +1 -1
- package/esm2015/lib/chartheader/chartheader.component.js +2 -2
- package/esm2015/lib/chartview/chartview.component.js +3 -2
- package/esm2015/lib/exceldata.service.js +16 -5
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +43 -13
- package/esm2015/lib/tableview/tableview.component.js +6 -3
- package/fesm2015/principal-dashboard-lib-v2.js +65 -20
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.metadata.json +1 -1
|
@@ -239,7 +239,8 @@ class PrincipalDashboardLibV2Service {
|
|
|
239
239
|
let terminalIP;
|
|
240
240
|
let userConsoleResources;
|
|
241
241
|
let resourceMetadataIDS;
|
|
242
|
-
let resourceMetauserConsoleData =
|
|
242
|
+
let resourceMetauserConsoleData = [];
|
|
243
|
+
let resourceDurationFromConsole = [];
|
|
243
244
|
let userName;
|
|
244
245
|
let userSubjects;
|
|
245
246
|
let terminalLocation;
|
|
@@ -295,10 +296,16 @@ class PrincipalDashboardLibV2Service {
|
|
|
295
296
|
}
|
|
296
297
|
if (userConsoleResources != null) {
|
|
297
298
|
if (userConsoleResources.userConsoleResource !== undefined) {
|
|
298
|
-
|
|
299
|
+
// satyajit resource wise duration added
|
|
300
|
+
userConsoleResources.userConsoleResource.forEach(item => {
|
|
301
|
+
resourceMetauserConsoleData.push(item.resourceId); // get name of user w.r.t. ID
|
|
302
|
+
resourceDurationFromConsole.push(item.duration);
|
|
303
|
+
});
|
|
304
|
+
// resourceMetauserConsoleData = userConsoleResources.userConsoleResource[index]resourceId; // get name of user w.r.t. ID
|
|
299
305
|
}
|
|
300
306
|
else {
|
|
301
307
|
resourceMetauserConsoleData = [];
|
|
308
|
+
resourceDurationFromConsole = [];
|
|
302
309
|
}
|
|
303
310
|
}
|
|
304
311
|
//----------// userName and userSubjects
|
|
@@ -317,16 +324,20 @@ class PrincipalDashboardLibV2Service {
|
|
|
317
324
|
break;
|
|
318
325
|
}
|
|
319
326
|
else {
|
|
320
|
-
terminalLocation =
|
|
327
|
+
terminalLocation = '';
|
|
321
328
|
}
|
|
322
329
|
}
|
|
323
|
-
|
|
330
|
+
if (terminalLocation === undefined || terminalLocation === 'undefined') {
|
|
331
|
+
terminalLocation = '';
|
|
332
|
+
}
|
|
333
|
+
const userData = {
|
|
324
334
|
userId: userId,
|
|
325
335
|
userName: userName,
|
|
326
336
|
startTime: new Date(startTime),
|
|
327
337
|
endTime: new Date(endTime),
|
|
328
338
|
terminalIP: terminalIP,
|
|
329
339
|
resourceMetauserConsoleData: resourceMetauserConsoleData,
|
|
340
|
+
resourceDurationFromConsole: resourceDurationFromConsole,
|
|
330
341
|
duration: duration,
|
|
331
342
|
terminalLocation: terminalLocation,
|
|
332
343
|
userSubjects: userSubjects
|
|
@@ -361,12 +372,12 @@ class PrincipalDashboardLibV2Service {
|
|
|
361
372
|
let dataTableforChart = new Array();
|
|
362
373
|
dataTableforChart = [];
|
|
363
374
|
if (this.userConsoleData) {
|
|
364
|
-
console.log("this.userConsoleData", this.userConsoleData);
|
|
365
375
|
for (let i = 0; i < this.userConsoleData.length; i++) {
|
|
366
376
|
let userData = [this.userConsoleData[i].terminalIP, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
367
377
|
dataTableforChart.push(userData);
|
|
368
378
|
}
|
|
369
379
|
}
|
|
380
|
+
console.log("this.classRoomWiseChartData", dataTableforChart);
|
|
370
381
|
return dataTableforChart;
|
|
371
382
|
}
|
|
372
383
|
allUserChartData() {
|
|
@@ -429,20 +440,21 @@ class PrincipalDashboardLibV2Service {
|
|
|
429
440
|
let inActiveClassRoom;
|
|
430
441
|
for (let i = 0; i < this.userConsoleData.length; i++) {
|
|
431
442
|
allRoomsDetails.push(this.userConsoleData[i]);
|
|
432
|
-
let userData = [this.userConsoleData[i].
|
|
443
|
+
let userData = [this.userConsoleData[i].terminalIP, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
433
444
|
dataTableforChart.push(userData);
|
|
434
445
|
}
|
|
435
446
|
for (let i = 0; i < this.schoolTerminalData.length; i++) {
|
|
436
|
-
|
|
447
|
+
console.log("schoolTerminalData", this.schoolTerminalData);
|
|
448
|
+
inActiveClassRoom = this.schoolTerminalData[i].terminalKey;
|
|
437
449
|
myChartRowData = {
|
|
438
450
|
userId: "",
|
|
439
451
|
userName: "",
|
|
440
452
|
startTime: new Date(this.myEndTime),
|
|
441
453
|
endTime: new Date(this.myEndTime),
|
|
442
|
-
terminalIP:
|
|
454
|
+
terminalIP: inActiveClassRoom,
|
|
443
455
|
resourceMetauserConsoleData: [],
|
|
444
456
|
duration: 0,
|
|
445
|
-
terminalLocation:
|
|
457
|
+
terminalLocation: "",
|
|
446
458
|
userSubjects: ""
|
|
447
459
|
};
|
|
448
460
|
allRoomsDetails.push(myChartRowData);
|
|
@@ -453,6 +465,7 @@ class PrincipalDashboardLibV2Service {
|
|
|
453
465
|
return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
|
|
454
466
|
}
|
|
455
467
|
dataForTableView(userConsoleMatrix, resourceMetadataMatrix) {
|
|
468
|
+
console.log("AAA userConsoleMatrix", userConsoleMatrix);
|
|
456
469
|
let currentDate;
|
|
457
470
|
let resourceMatrixForTableChart = new Array();
|
|
458
471
|
let resourceMatrixForExcel = new Array();
|
|
@@ -474,6 +487,7 @@ class PrincipalDashboardLibV2Service {
|
|
|
474
487
|
let teacherName;
|
|
475
488
|
let teacherSubject;
|
|
476
489
|
let resourceMetadataIDs;
|
|
490
|
+
let resourceMetadataIDsDuration;
|
|
477
491
|
let resourceArrayForExcel = new Array();
|
|
478
492
|
let resourceArrayForTableChart = new Array();
|
|
479
493
|
let userConsoleDataMatrix = new Array();
|
|
@@ -495,7 +509,8 @@ class PrincipalDashboardLibV2Service {
|
|
|
495
509
|
terminalIP = userConsoleMatrix[i].terminalIP;
|
|
496
510
|
let roomDetail = location + ' ' + terminalIP;
|
|
497
511
|
resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
|
|
498
|
-
|
|
512
|
+
resourceMetadataIDsDuration = userConsoleMatrix[i].resourceDurationFromConsole;
|
|
513
|
+
if (resourceMetadataIDs.length === 0) {
|
|
499
514
|
subject = undefined;
|
|
500
515
|
grade = undefined;
|
|
501
516
|
chapter = undefined;
|
|
@@ -511,11 +526,18 @@ class PrincipalDashboardLibV2Service {
|
|
|
511
526
|
for (let k = 0; k < resourceMetadataIDs.length; k++) {
|
|
512
527
|
for (let i = 0; i < resourceMetadataMatrix.length; i++) {
|
|
513
528
|
if (resourceMetadataIDs[k] === resourceMetadataMatrix[i].resouseID) {
|
|
529
|
+
// satyajit
|
|
514
530
|
subject = resourceMetadataMatrix[i].subject;
|
|
515
531
|
grade = resourceMetadataMatrix[i].grade;
|
|
516
532
|
chapter = resourceMetadataMatrix[i].chapter;
|
|
517
533
|
teachingpoint = resourceMetadataMatrix[i].teachingpoint;
|
|
518
|
-
|
|
534
|
+
if (resourceMetadataMatrix[i].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i].title.toLowerCase() === 'question') {
|
|
535
|
+
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
|
|
539
|
+
}
|
|
540
|
+
//AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k];
|
|
519
541
|
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
520
542
|
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
521
543
|
teacherName = undefined;
|
|
@@ -551,6 +573,7 @@ class PrincipalDashboardLibV2Service {
|
|
|
551
573
|
let teacherSubject;
|
|
552
574
|
let currentDate;
|
|
553
575
|
let resourceMetadataIDs;
|
|
576
|
+
let resourceMetadataIDsduration;
|
|
554
577
|
let resourceArrayForTableChart = new Array();
|
|
555
578
|
resourceArrayForTableChart = [];
|
|
556
579
|
//----------------- for subject and Name
|
|
@@ -569,6 +592,7 @@ class PrincipalDashboardLibV2Service {
|
|
|
569
592
|
terminalIP = userConsoleMatrix[rowLabel].terminalIP;
|
|
570
593
|
let roomDetail = location + ' ' + terminalIP;
|
|
571
594
|
resourceMetadataIDs = userConsoleMatrix[rowLabel].resourceMetauserConsoleData;
|
|
595
|
+
resourceMetadataIDsduration = userConsoleMatrix[rowLabel].resourceDurationFromConsole;
|
|
572
596
|
detailedView_UserDataMatrix = [teacherName, startTime, teacherSubject, endTime, roomDetail];
|
|
573
597
|
if (resourceMetadataIDs.length == 0) {
|
|
574
598
|
subject = undefined;
|
|
@@ -580,6 +604,7 @@ class PrincipalDashboardLibV2Service {
|
|
|
580
604
|
// detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
581
605
|
}
|
|
582
606
|
else {
|
|
607
|
+
//satyajit
|
|
583
608
|
//resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingpoint,type,title]
|
|
584
609
|
for (let k = 0; k < resourceMetadataIDs.length; k++) {
|
|
585
610
|
for (let i = 0; i < resourceMetadataMatrix.length; i++) {
|
|
@@ -588,7 +613,12 @@ class PrincipalDashboardLibV2Service {
|
|
|
588
613
|
grade = resourceMetadataMatrix[i].grade;
|
|
589
614
|
chapter = resourceMetadataMatrix[i].chapter;
|
|
590
615
|
teachingpoint = resourceMetadataMatrix[i].teachingpoint;
|
|
591
|
-
|
|
616
|
+
if (resourceMetadataMatrix[i].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i].title.toLowerCase() === 'question') {
|
|
617
|
+
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
618
|
+
}
|
|
619
|
+
else {
|
|
620
|
+
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
621
|
+
}
|
|
592
622
|
resourceArrayForTableChart = [subject, grade, chapter, teachingpoint, AssestDetail];
|
|
593
623
|
detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
594
624
|
}
|
|
@@ -719,7 +749,7 @@ class ChartheaderComponent {
|
|
|
719
749
|
this.isChartView = true;
|
|
720
750
|
}
|
|
721
751
|
ngOnInit() {
|
|
722
|
-
this.libVersion = "0.0.
|
|
752
|
+
this.libVersion = "0.0.15";
|
|
723
753
|
// this.myIcon = document.getElementById('myIconImg');
|
|
724
754
|
// this.changeChatType()
|
|
725
755
|
}
|
|
@@ -899,8 +929,9 @@ class ChartviewComponent {
|
|
|
899
929
|
}
|
|
900
930
|
else {
|
|
901
931
|
for (let i = 0; i < detailViewMatrix.length; i++) {
|
|
932
|
+
// console.log("detailViewMatrix[i]",detailViewMatrix[i]);
|
|
902
933
|
id_durationArray = {
|
|
903
|
-
name: detailViewMatrix[i].
|
|
934
|
+
name: detailViewMatrix[i].terminalIP,
|
|
904
935
|
value: parseInt(detailViewMatrix[i].duration),
|
|
905
936
|
};
|
|
906
937
|
id_durationMatrix.push(id_durationArray);
|
|
@@ -1470,7 +1501,8 @@ class ExceldataService {
|
|
|
1470
1501
|
let terminalIP;
|
|
1471
1502
|
let userConsoleResources;
|
|
1472
1503
|
let resourceMetadataIDS;
|
|
1473
|
-
let resourceMetauserConsoleData =
|
|
1504
|
+
let resourceMetauserConsoleData = [];
|
|
1505
|
+
let resourceDurationFromConsole = [];
|
|
1474
1506
|
let userName;
|
|
1475
1507
|
let userSubjects;
|
|
1476
1508
|
let terminalLocation;
|
|
@@ -1526,10 +1558,16 @@ class ExceldataService {
|
|
|
1526
1558
|
}
|
|
1527
1559
|
if (userConsoleResources != null) {
|
|
1528
1560
|
if (userConsoleResources.userConsoleResource !== undefined) {
|
|
1529
|
-
|
|
1561
|
+
// satyajit resource wise duration added
|
|
1562
|
+
userConsoleResources.userConsoleResource.forEach(item => {
|
|
1563
|
+
resourceMetauserConsoleData.push(item.resourceId); // get name of user w.r.t. ID
|
|
1564
|
+
resourceDurationFromConsole.push(item.duration);
|
|
1565
|
+
});
|
|
1566
|
+
// resourceMetauserConsoleData = userConsoleResources.userConsoleResource; // get name of user w.r.t. ID
|
|
1530
1567
|
}
|
|
1531
1568
|
else {
|
|
1532
1569
|
resourceMetauserConsoleData = [];
|
|
1570
|
+
resourceDurationFromConsole = [];
|
|
1533
1571
|
}
|
|
1534
1572
|
}
|
|
1535
1573
|
//----------// userName and userSubjects
|
|
@@ -1554,7 +1592,8 @@ class ExceldataService {
|
|
|
1554
1592
|
resourceMetauserConsoleData: resourceMetauserConsoleData,
|
|
1555
1593
|
duration: duration,
|
|
1556
1594
|
terminalLocation: terminalLocation,
|
|
1557
|
-
userSubjects: userSubjects
|
|
1595
|
+
userSubjects: userSubjects,
|
|
1596
|
+
resourceDurationFromConsole: resourceDurationFromConsole
|
|
1558
1597
|
};
|
|
1559
1598
|
userConsoleMatrix.push(userData);
|
|
1560
1599
|
}
|
|
@@ -1582,6 +1621,7 @@ class ExceldataService {
|
|
|
1582
1621
|
let teacherName;
|
|
1583
1622
|
let teacherSubject;
|
|
1584
1623
|
let resourceMetadataIDs;
|
|
1624
|
+
let resourceMetadataIDsDuration;
|
|
1585
1625
|
let resourceArrayForExcel = new Array();
|
|
1586
1626
|
userID = userConsoleMatrix[i].userId;
|
|
1587
1627
|
//----------------- for subject and Name
|
|
@@ -1602,6 +1642,7 @@ class ExceldataService {
|
|
|
1602
1642
|
let locationName = location;
|
|
1603
1643
|
let terminalIPAddress = terminalIP;
|
|
1604
1644
|
resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
|
|
1645
|
+
resourceMetadataIDsDuration = userConsoleMatrix[i].resourceDurationFromConsole;
|
|
1605
1646
|
if (resourceMetadataIDs.length == 0) {
|
|
1606
1647
|
subject = '';
|
|
1607
1648
|
grade = '';
|
|
@@ -1630,7 +1671,7 @@ class ExceldataService {
|
|
|
1630
1671
|
resourceTitle = resourceMetadataMatrix[i].title;
|
|
1631
1672
|
resourceType = this.getDisplaytypeValue(resourceMetadataMatrix[i].type);
|
|
1632
1673
|
// FOR EXCEL
|
|
1633
|
-
resourceArrayForExcel = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, locationName, terminalIPAddress, subject, grade, chapter, teachingpoint, resourceTitle, resourceType, userID];
|
|
1674
|
+
resourceArrayForExcel = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, locationName, terminalIPAddress, subject, grade, chapter, teachingpoint, resourceTitle, resourceType, userID, resourceMetadataIDsDuration[k]];
|
|
1634
1675
|
resourceMatrixForExcel.push(resourceArrayForExcel);
|
|
1635
1676
|
teacherName = '';
|
|
1636
1677
|
teacherSubject = '';
|
|
@@ -1668,6 +1709,7 @@ class ExceldataService {
|
|
|
1668
1709
|
tpTitle: resourceMatrixForExcel[i][11],
|
|
1669
1710
|
resourceTitle: resourceMatrixForExcel[i][12],
|
|
1670
1711
|
resourceType: resourceMatrixForExcel[i][13],
|
|
1712
|
+
'resourceDuration(sec)': resourceMatrixForExcel[i][15],
|
|
1671
1713
|
};
|
|
1672
1714
|
userList.push(data);
|
|
1673
1715
|
}
|
|
@@ -2075,6 +2117,8 @@ class TableviewComponent {
|
|
|
2075
2117
|
this.alluserList = fetchAlluserList.fordurationTable;
|
|
2076
2118
|
// resoureMetadata list
|
|
2077
2119
|
this.currentResoursedataList = this.pdService.genarateResourseReqiuredData(this.myXmlData);
|
|
2120
|
+
console.log("AAA genarateUserReqiuredData-->>", genarateUserReqiuredData);
|
|
2121
|
+
console.log("AAA this.currentResoursedataList-->>", this.currentResoursedataList);
|
|
2078
2122
|
}
|
|
2079
2123
|
}
|
|
2080
2124
|
this.tableViewDiv = document.getElementById('tableViewDiv');
|
|
@@ -2123,6 +2167,7 @@ class TableviewComponent {
|
|
|
2123
2167
|
}
|
|
2124
2168
|
}
|
|
2125
2169
|
ueserWiseTableView(resoureMetadata) {
|
|
2170
|
+
console.log('AAA resoureMetadata', resoureMetadata);
|
|
2126
2171
|
// this.deleterow("tableRow");
|
|
2127
2172
|
document.getElementById("tblBody").innerHTML = "";
|
|
2128
2173
|
let labelArray = new Array();
|
|
@@ -2157,8 +2202,8 @@ class TableviewComponent {
|
|
|
2157
2202
|
TableviewComponent.decorators = [
|
|
2158
2203
|
{ type: Component, args: [{
|
|
2159
2204
|
selector: 'lib-tableview',
|
|
2160
|
-
template: "\r\n <div id=\"tableViewDiv\" class=\"pd-tableViewDiv\">\r\n \r\n <table class=\"table table-bordered\" id=\"tableRow\">\r\n <thead>\r\n <tr class=\"table-headerRow\">\r\n <th scope=\"col\">Teacher Name</th>\r\n <th scope=\"col\">Subjects</th>\r\n <th scope=\"col\">Date</th>\r\n <th scope=\"col\">Start Time</th>\r\n <th scope=\"col\">End Time</th>\r\n <th scope=\"col\">Duration (mins)</th>\r\n <th scope=\"col\">Room</th>\r\n <th scope=\"col\">Subject</th>\r\n <th scope=\"col\">Topic of Class</th>\r\n <th scope=\"col\">Chapter Name</th>\r\n <th scope=\"col\">Topic Name</th>\r\n <th scope=\"col\">Assets Details</th>\r\n </tr>\r\n </thead>\r\n <tbody id=\"tblBody\">\r\n \r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n",
|
|
2161
|
-
styles: [".pd-tableViewDiv{width:100%;height:484px;overflow:scroll}.pd-tableViewDiv #tableRow{font-size:small;width:100%;margin-left:24px;margin-top:10px}.pd-tableViewDiv .table-headerRow{font-weight:700}"]
|
|
2205
|
+
template: "\r\n <div id=\"tableViewDiv\" class=\"pd-tableViewDiv\">\r\n \r\n <table class=\"table table-bordered\" id=\"tableRow\">\r\n <thead class=\"table-head\">\r\n <tr class=\"table-headerRow\">\r\n <th scope=\"col\">Teacher Name</th>\r\n <th scope=\"col\">Subjects</th>\r\n <th scope=\"col\">Date</th>\r\n <th scope=\"col\">Start Time</th>\r\n <th scope=\"col\">End Time</th>\r\n <th scope=\"col\">Duration (mins)</th>\r\n <th scope=\"col\">Room</th>\r\n <th scope=\"col\">Subject</th>\r\n <th scope=\"col\">Topic of Class</th>\r\n <th scope=\"col\">Chapter Name</th>\r\n <th scope=\"col\">Topic Name</th>\r\n <th scope=\"col\">Assets Details</th>\r\n </tr>\r\n </thead>\r\n <tbody id=\"tblBody\">\r\n \r\n </tbody>\r\n </table>\r\n </div>\r\n \r\n",
|
|
2206
|
+
styles: [".pd-tableViewDiv{width:100%;height:484px;overflow:scroll}.pd-tableViewDiv #tableRow{font-size:small;width:100%;margin-left:24px;margin-top:10px}.pd-tableViewDiv .table-headerRow{font-weight:700}.pd-tableViewDiv .table-head{position:sticky;top:0;background:#fff}"]
|
|
2162
2207
|
},] }
|
|
2163
2208
|
];
|
|
2164
2209
|
TableviewComponent.ctorParameters = () => [
|