principal-dashboard-lib-v2 0.0.17 → 0.0.19
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 +93 -14
- 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 +30 -2
- package/esm2015/lib/header/header.component.js +3 -3
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +62 -11
- package/fesm2015/principal-dashboard-lib-v2.js +93 -14
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/chartview/chartview.component.d.ts +3 -0
- package/lib/principal-dashboard-lib-v2.service.d.ts +3 -0
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.metadata.json +1 -1
|
@@ -177,7 +177,9 @@
|
|
|
177
177
|
for (var i = 0; i < usermetadataMatrixUpdated.length; i++) {
|
|
178
178
|
// const randomNumber = document.createElement('span');
|
|
179
179
|
// randomNumber.innerHTML = i.toString();
|
|
180
|
-
usermetadataMatrixUpdated[i].userName = usermetadataMatrixUpdated[i].userName + " " + i;
|
|
180
|
+
//usermetadataMatrixUpdated[i].userName = usermetadataMatrixUpdated[i].userName + " --- " + i;
|
|
181
|
+
//satyajit 28 aug 2024 removed count from userName
|
|
182
|
+
usermetadataMatrixUpdated[i].userName = usermetadataMatrixUpdated[i].userName;
|
|
181
183
|
usersMetadataMatrix.push(usermetadataMatrixUpdated[i]); //adding same name users in usermetadataMatrix with some random charators
|
|
182
184
|
this.usersMetaData = usersMetadataMatrix;
|
|
183
185
|
}
|
|
@@ -365,12 +367,13 @@
|
|
|
365
367
|
if (this.userConsoleData) {
|
|
366
368
|
if (this.userConsoleData.length > 0) {
|
|
367
369
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
368
|
-
console.log("
|
|
370
|
+
console.log("chartDataUserWiseNew-->>", this.userConsoleData[i].userName);
|
|
369
371
|
if (this.userConsoleData[i].userName === undefined) {
|
|
370
372
|
this.userConsoleData[i].userName = "-";
|
|
371
373
|
}
|
|
372
374
|
var userData = [this.userConsoleData[i].userName, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
373
375
|
dataTableforChart.push(userData);
|
|
376
|
+
//console.log("chartDataUserWiseNewNew-->>",userData)
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
379
|
}
|
|
@@ -381,14 +384,40 @@
|
|
|
381
384
|
dataTableforChart = [];
|
|
382
385
|
if (this.userConsoleData) {
|
|
383
386
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
384
|
-
console.log('bbb-->',
|
|
385
|
-
var
|
|
387
|
+
//console.log('bbb-->',this.userConsoleData[i].terminalLocation)
|
|
388
|
+
var roomName = this.userConsoleData[i].terminalLocation;
|
|
389
|
+
if (roomName === "") {
|
|
390
|
+
//roomName = "No Name"
|
|
391
|
+
}
|
|
392
|
+
var location = roomName + " - " + this.userConsoleData[i].terminalIP;
|
|
393
|
+
console.log('bbblocation-->', location);
|
|
394
|
+
var userData = [location, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
386
395
|
dataTableforChart.push(userData);
|
|
387
396
|
}
|
|
388
397
|
}
|
|
389
398
|
console.log("this.classRoomWiseChartData", dataTableforChart);
|
|
390
399
|
return dataTableforChart;
|
|
391
400
|
};
|
|
401
|
+
PrincipalDashboardLibV2Service.prototype.newGetCurrentClassroomData = function () {
|
|
402
|
+
var dataTableforChart = new Array();
|
|
403
|
+
dataTableforChart = [];
|
|
404
|
+
if (this.userConsoleData) {
|
|
405
|
+
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
406
|
+
//console.log('bbb-->',this.userConsoleData[i].terminalLocation)
|
|
407
|
+
var roomName = this.userConsoleData[i].terminalLocation;
|
|
408
|
+
var location = roomName + " - " + this.userConsoleData[i].terminalIP;
|
|
409
|
+
console.log('bbblocation-->', location);
|
|
410
|
+
//let userData = [location];
|
|
411
|
+
dataTableforChart.push(location);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
console.log("this.classRoomWiseChartData", dataTableforChart);
|
|
415
|
+
dataTableforChart = this.uniq(dataTableforChart);
|
|
416
|
+
return dataTableforChart;
|
|
417
|
+
};
|
|
418
|
+
PrincipalDashboardLibV2Service.prototype.uniq = function (a) {
|
|
419
|
+
return Array.from(new Set(a));
|
|
420
|
+
};
|
|
392
421
|
PrincipalDashboardLibV2Service.prototype.allUserChartData = function () {
|
|
393
422
|
var dataTableforChart = new Array();
|
|
394
423
|
dataTableforChart = [];
|
|
@@ -471,12 +500,23 @@
|
|
|
471
500
|
var inActiveClassRoom = void 0;
|
|
472
501
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
473
502
|
allRoomsDetails.push(this.userConsoleData[i]);
|
|
474
|
-
|
|
503
|
+
console.log("bbb allRoom-->", this.userConsoleData[i]);
|
|
504
|
+
var roomName = this.userConsoleData[i].terminalLocation;
|
|
505
|
+
var roomIP = this.userConsoleData[i].terminalIP;
|
|
506
|
+
if (roomName === "" || roomName === undefined) {
|
|
507
|
+
roomName = "No Name";
|
|
508
|
+
}
|
|
509
|
+
var location = roomName + " - " + roomIP;
|
|
510
|
+
console.log('bbbbRoom', location);
|
|
511
|
+
// let userData = [this.userConsoleData[i].terminalIP,this.userConsoleData[i].startTime,this.userConsoleData[i].endTime];
|
|
512
|
+
var userData = [location, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
475
513
|
dataTableforChart.push(userData);
|
|
476
514
|
}
|
|
515
|
+
var inactiveRoonName = void 0;
|
|
477
516
|
for (var i = 0; i < this.schoolTerminalData.length; i++) {
|
|
478
517
|
console.log("schoolTerminalData", this.schoolTerminalData);
|
|
479
|
-
inActiveClassRoom = this.schoolTerminalData[i].terminalKey;
|
|
518
|
+
inActiveClassRoom = this.schoolTerminalData[i].location + ' - ' + this.schoolTerminalData[i].terminalKey;
|
|
519
|
+
//inactiveRoonName = this.schoolTerminalData[i].location;
|
|
480
520
|
myChartRowData = {
|
|
481
521
|
userId: "",
|
|
482
522
|
userName: "",
|
|
@@ -563,10 +603,13 @@
|
|
|
563
603
|
chapter = resourceMetadataMatrix[i_4].chapter;
|
|
564
604
|
teachingpoint = resourceMetadataMatrix[i_4].teachingpoint;
|
|
565
605
|
if (resourceMetadataMatrix[i_4].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i_4].title.toLowerCase() === 'question') {
|
|
566
|
-
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[
|
|
606
|
+
//AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
|
|
607
|
+
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
|
|
608
|
+
//convertSeconds
|
|
567
609
|
}
|
|
568
610
|
else {
|
|
569
|
-
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[
|
|
611
|
+
//AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
|
|
612
|
+
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + " : " + resourceMetadataMatrix[i_4].title + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
|
|
570
613
|
}
|
|
571
614
|
//AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k];
|
|
572
615
|
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
@@ -645,10 +688,13 @@
|
|
|
645
688
|
chapter = resourceMetadataMatrix[i].chapter;
|
|
646
689
|
teachingpoint = resourceMetadataMatrix[i].teachingpoint;
|
|
647
690
|
if (resourceMetadataMatrix[i].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i].title.toLowerCase() === 'question') {
|
|
648
|
-
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
691
|
+
//AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
692
|
+
AssestDetail = resourceMetadataMatrix[i].type + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
|
|
693
|
+
//convertSeconds
|
|
649
694
|
}
|
|
650
695
|
else {
|
|
651
|
-
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
696
|
+
//AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + resourceMetadataIDsduration[k] + ' sec';
|
|
697
|
+
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
|
|
652
698
|
}
|
|
653
699
|
resourceArrayForTableChart = [subject, grade, chapter, teachingpoint, AssestDetail];
|
|
654
700
|
detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
@@ -726,6 +772,11 @@
|
|
|
726
772
|
});
|
|
727
773
|
return displayValue;
|
|
728
774
|
};
|
|
775
|
+
PrincipalDashboardLibV2Service.prototype.convertSeconds = function (seconds) {
|
|
776
|
+
var minutes = Math.floor(seconds / 60);
|
|
777
|
+
var remainingSeconds = seconds % 60;
|
|
778
|
+
return minutes + "m " + remainingSeconds + "s";
|
|
779
|
+
};
|
|
729
780
|
return PrincipalDashboardLibV2Service;
|
|
730
781
|
}());
|
|
731
782
|
PrincipalDashboardLibV2Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function PrincipalDashboardLibV2Service_Factory() { return new PrincipalDashboardLibV2Service(); }, token: PrincipalDashboardLibV2Service, providedIn: "root" });
|
|
@@ -786,7 +837,7 @@
|
|
|
786
837
|
this.isChartView = true;
|
|
787
838
|
}
|
|
788
839
|
ChartheaderComponent.prototype.ngOnInit = function () {
|
|
789
|
-
this.libVersion = "0.0.
|
|
840
|
+
this.libVersion = "0.0.19";
|
|
790
841
|
// this.myIcon = document.getElementById('myIconImg');
|
|
791
842
|
// this.changeChatType()
|
|
792
843
|
};
|
|
@@ -1193,6 +1244,9 @@
|
|
|
1193
1244
|
this.alluserList = this.pdService.allUserChartData();
|
|
1194
1245
|
this.resourceDataList = this.pdService.genarateResourseReqiuredData(this.myXmlData);
|
|
1195
1246
|
this.totalUsers = this.currentdataList.usersMetadata.length;
|
|
1247
|
+
this.eligibleUsers = this.findEligibleUserCount();
|
|
1248
|
+
this.installedClassrooms = this.findInstalledClassrooms();
|
|
1249
|
+
this.currentRooms = this.findCurrentClassrooms();
|
|
1196
1250
|
this.findCurrentUserCount();
|
|
1197
1251
|
}
|
|
1198
1252
|
this.pdService.chartType.subscribe(function (data) {
|
|
@@ -1449,9 +1503,10 @@
|
|
|
1449
1503
|
};
|
|
1450
1504
|
ChartviewComponent.prototype.classRoomWiseCurrentData = function () {
|
|
1451
1505
|
var classRoomdata = this.pdService.classRoomWiseChartData();
|
|
1452
|
-
|
|
1506
|
+
console.log("classRoomdata", classRoomdata);
|
|
1453
1507
|
if (classRoomdata && classRoomdata.length > 0) {
|
|
1454
1508
|
this.myChartDataMatrix = classRoomdata;
|
|
1509
|
+
console.log("myChartDataMatrix", this.myChartDataMatrix);
|
|
1455
1510
|
this.updateChart();
|
|
1456
1511
|
if (this.currentdataList.userConsoleData.length > 0) {
|
|
1457
1512
|
this.calulateTotalDuration(this.currentdataList.userConsoleData);
|
|
@@ -1478,6 +1533,30 @@
|
|
|
1478
1533
|
var uniqueUserName = __spread(new Set(userNameArray));
|
|
1479
1534
|
this.currentUsers = uniqueUserName.length;
|
|
1480
1535
|
};
|
|
1536
|
+
ChartviewComponent.prototype.findCurrentClassrooms = function () {
|
|
1537
|
+
//console.log("findCurrentClassrooms", this.currentdataList.schoolTerminalData)
|
|
1538
|
+
var classRoomdata = this.pdService.newGetCurrentClassroomData();
|
|
1539
|
+
console.log("findCurrentClassrooms", classRoomdata);
|
|
1540
|
+
return classRoomdata.length;
|
|
1541
|
+
};
|
|
1542
|
+
ChartviewComponent.prototype.findInstalledClassrooms = function () {
|
|
1543
|
+
var count = 0;
|
|
1544
|
+
console.log("findInstalledClassrooms", this.currentdataList.schoolTerminalData);
|
|
1545
|
+
return this.currentdataList.schoolTerminalData.length;
|
|
1546
|
+
};
|
|
1547
|
+
ChartviewComponent.prototype.findEligibleUserCount = function () {
|
|
1548
|
+
console.log("findEligibleUserCount", this.currentdataList);
|
|
1549
|
+
var count = 0;
|
|
1550
|
+
var userMetaData = this.currentdataList.usersMetadata;
|
|
1551
|
+
for (var index = 0; index < userMetaData.length; index++) {
|
|
1552
|
+
var element = userMetaData[index].userSubjects;
|
|
1553
|
+
if (element !== "") {
|
|
1554
|
+
// console.log("findEligibleUserCount", element)
|
|
1555
|
+
count = count + 1;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return count;
|
|
1559
|
+
};
|
|
1481
1560
|
ChartviewComponent.prototype.ngOnDestroy = function () {
|
|
1482
1561
|
// console.log('ngOnDestroy >>');
|
|
1483
1562
|
};
|
|
@@ -2457,8 +2536,8 @@
|
|
|
2457
2536
|
HeaderComponent.decorators = [
|
|
2458
2537
|
{ type: i0.Component, args: [{
|
|
2459
2538
|
selector: 'lib-header',
|
|
2460
|
-
template: "<div id=\"pd_header\" class=\"pd_header\">\n \n <div *ngIf=\"message && mydata && (this.todayDate === this.calenderCurrentDate)\" id=\"pd_refeshView\" class=\"pd_refesh_bar\">\n <div class=\"timer_msg\"> This page will be refreshed in</div>\n <div class=\"timer_value\"> {{timeConvert(message)}} min</div>\n <div id=\"pd_refeshBtn\" (click)=\"refreshChart()\"> Refresh </div>\n </div>\n\n <div id=\"pd_exportBtn\" class=\"pd_exportButton\" *ngIf=\"mydata\"\n [ngClass]=\"{'pd_exportButton_shiftRight': this.todayDate != this.calenderCurrentDate}\" (click)=\"exportReport()\"> \n <span class=\"pd_exportButton_text\">
|
|
2461
|
-
styles: [".pd_header{width:100%;background-color:#e0e0e0;height:50px;border-bottom:2px solid #fff}.pd_header_calendar{position:absolute;width:150px;margin:5px 5px 5px 17px}.pd_header_content{position:relative;width:350px;margin:0 auto;color:#000;text-align:center;font-size:30px;line-height:50px;pointer-events:none}.pd_exportButton{position:absolute;display:inline-block;right:144px;padding:0 16px;cursor:pointer;margin:9px 0 0;height:30px;width:160px;line-height:30px;background-color:#
|
|
2539
|
+
template: "<div id=\"pd_header\" class=\"pd_header\">\n \n <div *ngIf=\"message && mydata && (this.todayDate === this.calenderCurrentDate)\" id=\"pd_refeshView\" class=\"pd_refesh_bar\">\n <div class=\"timer_msg\"> This page will be refreshed in</div>\n <div class=\"timer_value\"> {{timeConvert(message)}} min</div>\n <div id=\"pd_refeshBtn\" (click)=\"refreshChart()\"> Refresh </div>\n </div>\n\n <div id=\"pd_exportBtn\" class=\"pd_exportButton\" *ngIf=\"mydata\"\n [ngClass]=\"{'pd_exportButton_shiftRight': this.todayDate != this.calenderCurrentDate}\" (click)=\"exportReport()\"> \n <span class=\"pd_exportButton_text\">Download Report</span>\n <div class=\"pd_download_icon\"></div>\n </div>\n \n <div class=\"pd_header_calendar\">\n <!-- <input type=\"Date\" [max]=\"currentDate\" [value]=\"currentDate\" id=\"myCalendar\" (input)=\"selectDate($event)\" /> -->\n <ngx-datepicker [(ngModel)]=\"date\" [options]=\"options\" (ngModelChange)=\"dateSelected($event)\"></ngx-datepicker>\n </div>\n <div class=\"pd_header_content\" >Realtime usage data</div>\n</div>\n",
|
|
2540
|
+
styles: [".pd_header{width:100%;background-color:#e0e0e0;height:50px;border-bottom:2px solid #fff}.pd_header_calendar{position:absolute;width:150px;margin:5px 5px 5px 17px}.pd_header_content{position:relative;width:350px;margin:0 auto;color:#000;text-align:center;font-size:30px;line-height:50px;pointer-events:none}.pd_exportButton{position:absolute;display:inline-block;right:144px;padding:0 16px;cursor:pointer;margin:9px 0 0;height:30px;width:160px;line-height:30px;background-color:#4285f9;font-size:10pt;font-weight:400;transition:right .5s;border-radius:5px;color:#fff;font-weight:700}.pd_exportButton_shiftRight{right:10px}.pd_download_icon{position:absolute;width:16px;height:16px;background-size:100% 100%;top:8px;background-repeat:no-repeat;display:inline-block;right:5px;background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAAY0lEQVRIiWNgGOqAkQS1/8nRy0SCBWSBUQtGLRjiFpQzQDIXDKMDZLl6ch2Abgk2TLbhxFhCseH4LKGa4dgsIdpwZhIsOMoAKUEPMjAwNJLktFGADyDXStgyE8Vm07yoGPoAAH1UItbw1O5lAAAAAElFTkSuQmCC\")}.pd_exportButton_text{position:relative;display:inline-block;width:130px}.pd_refesh_bar{position:absolute;color:#000;width:120px;height:78px;right:15px;top:4px;z-index:2;background-color:#fff;float:right;text-align:center;font-size:12px;border-radius:.25rem;border:1px solid #a09898;box-shadow:0 0 5px 0 rgba(0,0,0,.75);-webkit-box-shadow:0 0 5px 0 rgba(0,0,0,.75);-moz-box-shadow:0 0 5px 0 rgba(0,0,0,.75);-webkit-animation:refreshViewAnimate .6s;animation:refreshViewAnimate .6s}@-webkit-keyframes refreshViewAnimate{0%{opacity:.5;top:-32px}to{opacity:1;top:4px}}@keyframes refreshViewAnimate{0%{opacity:.5;top:-32px}to{opacity:1;top:4px}}.timer_msg{position:absolute;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;line-height:14px;top:2px}.timer_value{font-weight:700;font-size:15px}#pd_refeshBtn,.timer_value{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;top:28px}#pd_refeshBtn{background-color:#2172f6;cursor:pointer;width:60px;margin:0 auto;border-radius:3px;color:#fff;height:22px;line-height:20px}#pd_refeshBtn:hover{opacity:.6}::ng-deep.bs-datepicker{margin-left:200px}.bs-datepicker-body table td span.selected,.theme-default .bs-datepicker-body table td.selected span,.theme-default .bs-datepicker-body table td[class*=select-] span:after,.theme-default .bs-datepicker-body table td span[class*=select-]:after{background-color:#000}.bs-datepicker-head{background-color:#000!important}"]
|
|
2462
2541
|
},] }
|
|
2463
2542
|
];
|
|
2464
2543
|
HeaderComponent.ctorParameters = function () { return [
|