principal-dashboard-lib-v2 0.0.9 → 0.0.12
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/README.md +24 -24
- package/bundles/principal-dashboard-lib-v2.umd.js +170 -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 +5 -2
- package/esm2015/lib/exceldata.service.js +87 -9
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +80 -5
- package/esm2015/public-api.js +1 -1
- package/fesm2015/principal-dashboard-lib-v2.js +170 -14
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/exceldata.service.d.ts +1 -0
- package/lib/principal-dashboard-lib-v2.service.d.ts +1 -0
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.metadata.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# PrincipalDashboardLibV2
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project principal-dashboard-lib-v2` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project principal-dashboard-lib-v2`.
|
|
8
|
-
> Note: Don't forget to add `--project principal-dashboard-lib-v2` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build principal-dashboard-lib-v2` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build principal-dashboard-lib-v2`, go to the dist folder `cd dist/principal-dashboard-lib-v2` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test principal-dashboard-lib-v2` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# PrincipalDashboardLibV2
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project principal-dashboard-lib-v2` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project principal-dashboard-lib-v2`.
|
|
8
|
+
> Note: Don't forget to add `--project principal-dashboard-lib-v2` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build principal-dashboard-lib-v2` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build principal-dashboard-lib-v2`, go to the dist folder `cd dist/principal-dashboard-lib-v2` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test principal-dashboard-lib-v2` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
}
|
|
97
97
|
//----------//type
|
|
98
98
|
if (resourceMetadata[i].type != undefined) {
|
|
99
|
-
type = resourceMetadata[i].type;
|
|
99
|
+
type = this.getDisplaytypeValue(resourceMetadata[i].type);
|
|
100
100
|
}
|
|
101
101
|
else {
|
|
102
102
|
type = '';
|
|
@@ -210,7 +210,9 @@
|
|
|
210
210
|
}
|
|
211
211
|
//----------//location
|
|
212
212
|
if (schoolTerminal[i].metadata !== undefined) {
|
|
213
|
-
|
|
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,13 @@
|
|
|
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].terminalKey", terminalIP, schoolTerminalMatrix[i_3].terminalKey);
|
|
309
312
|
if (terminalIP === schoolTerminalMatrix[i_3].terminalKey) {
|
|
310
313
|
terminalLocation = schoolTerminalMatrix[i_3].location;
|
|
311
314
|
}
|
|
315
|
+
else {
|
|
316
|
+
terminalLocation = "location";
|
|
317
|
+
}
|
|
312
318
|
}
|
|
313
319
|
var userData = {
|
|
314
320
|
userId: userId,
|
|
@@ -351,6 +357,7 @@
|
|
|
351
357
|
var dataTableforChart = new Array();
|
|
352
358
|
dataTableforChart = [];
|
|
353
359
|
if (this.userConsoleData) {
|
|
360
|
+
console.log("this.userConsoleData", this.userConsoleData);
|
|
354
361
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
355
362
|
var userData = [this.userConsoleData[i].terminalLocation, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
356
363
|
dataTableforChart.push(userData);
|
|
@@ -475,7 +482,7 @@
|
|
|
475
482
|
if ((userConsoleMatrix[i].startTime != undefined && userConsoleMatrix[i].startTime != "") && (userConsoleMatrix[i].endTime != undefined && userConsoleMatrix[i].endTime != "")) {
|
|
476
483
|
startTime = userConsoleMatrix[i].startTime.toLocaleTimeString('en-US', { hour12: true });
|
|
477
484
|
endTime = userConsoleMatrix[i].endTime.toLocaleTimeString('en-US', { hour12: true });
|
|
478
|
-
currentDate = userConsoleMatrix[i].startTime.getDate() + '/' + userConsoleMatrix[i].startTime.getMonth() + '/' + userConsoleMatrix[i].startTime.getFullYear();
|
|
485
|
+
currentDate = userConsoleMatrix[i].startTime.getDate() + '/' + (userConsoleMatrix[i].startTime.getMonth() + 1) + '/' + userConsoleMatrix[i].startTime.getFullYear();
|
|
479
486
|
}
|
|
480
487
|
//----------------- for duration
|
|
481
488
|
duration = Math.floor(userConsoleMatrix[i].duration);
|
|
@@ -504,7 +511,7 @@
|
|
|
504
511
|
grade = resourceMetadataMatrix[i_4].grade;
|
|
505
512
|
chapter = resourceMetadataMatrix[i_4].chapter;
|
|
506
513
|
teachingpoint = resourceMetadataMatrix[i_4].teachingpoint;
|
|
507
|
-
AssestDetail = resourceMetadataMatrix[i_4].type + ": " + resourceMetadataMatrix[i_4].title;
|
|
514
|
+
AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + ": " + resourceMetadataMatrix[i_4].title;
|
|
508
515
|
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
509
516
|
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
510
517
|
teacherName = undefined;
|
|
@@ -586,6 +593,74 @@
|
|
|
586
593
|
}
|
|
587
594
|
return { userDetails: detailedView_UserDataMatrix, resourceDetails: detailedView_ResourceDataMatrix };
|
|
588
595
|
};
|
|
596
|
+
// To GET DISPLAY TYPE
|
|
597
|
+
PrincipalDashboardLibV2Service.prototype.getDisplaytypeValue = function (key) {
|
|
598
|
+
var assetTypeConfig = [
|
|
599
|
+
{
|
|
600
|
+
type: "asset_media",
|
|
601
|
+
display: "Media"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
type: "asset_print",
|
|
605
|
+
display: "Print"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
type: "quiz",
|
|
609
|
+
display: "Quiz"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
type: "question",
|
|
613
|
+
display: "Question"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
type: "chapter",
|
|
617
|
+
display: "Chapter"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
type: "tp",
|
|
621
|
+
display: "Topic"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
type: "whiteboard",
|
|
625
|
+
display: "Whiteboard"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
type: "widget",
|
|
629
|
+
display: "Widget"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
type: "casset_media",
|
|
633
|
+
display: "cMedia"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
type: "casset_print",
|
|
637
|
+
display: "cPrint"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
type: "cquiz",
|
|
641
|
+
display: "cQuiz"
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
type: "cquestion",
|
|
645
|
+
display: "cQuestion"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
type: "image",
|
|
649
|
+
display: "Image"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
type: "video",
|
|
653
|
+
display: "Video"
|
|
654
|
+
},
|
|
655
|
+
];
|
|
656
|
+
var displayValue = key;
|
|
657
|
+
assetTypeConfig.forEach(function (value) {
|
|
658
|
+
if (value.type === key) {
|
|
659
|
+
displayValue = value.display;
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
return displayValue;
|
|
663
|
+
};
|
|
589
664
|
return PrincipalDashboardLibV2Service;
|
|
590
665
|
}());
|
|
591
666
|
PrincipalDashboardLibV2Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function PrincipalDashboardLibV2Service_Factory() { return new PrincipalDashboardLibV2Service(); }, token: PrincipalDashboardLibV2Service, providedIn: "root" });
|
|
@@ -646,7 +721,7 @@
|
|
|
646
721
|
this.isChartView = true;
|
|
647
722
|
}
|
|
648
723
|
ChartheaderComponent.prototype.ngOnInit = function () {
|
|
649
|
-
this.libVersion = "0.0.
|
|
724
|
+
this.libVersion = "0.0.20";
|
|
650
725
|
// this.myIcon = document.getElementById('myIconImg');
|
|
651
726
|
// this.changeChatType()
|
|
652
727
|
};
|
|
@@ -1115,6 +1190,7 @@
|
|
|
1115
1190
|
labels.removeChild(labels.lastChild);
|
|
1116
1191
|
}
|
|
1117
1192
|
this.chartDataTable = this.myChartDataMatrix;
|
|
1193
|
+
console.log("this.myChartDataMatrix", this.myChartDataMatrix);
|
|
1118
1194
|
(this.myChartOptions = {
|
|
1119
1195
|
tooltip: {
|
|
1120
1196
|
trigger: 'none',
|
|
@@ -1288,6 +1364,7 @@
|
|
|
1288
1364
|
};
|
|
1289
1365
|
ChartviewComponent.prototype.userWiseCurrentData = function () {
|
|
1290
1366
|
var chartDataUserWise = this.pdService.userWiseChartData();
|
|
1367
|
+
// console.log("chartDataUserWise",chartDataUserWise);
|
|
1291
1368
|
if (chartDataUserWise.length > 0) {
|
|
1292
1369
|
this.myChartDataMatrix = chartDataUserWise;
|
|
1293
1370
|
this.updateChart();
|
|
@@ -1306,6 +1383,7 @@
|
|
|
1306
1383
|
};
|
|
1307
1384
|
ChartviewComponent.prototype.classRoomWiseCurrentData = function () {
|
|
1308
1385
|
var classRoomdata = this.pdService.classRoomWiseChartData();
|
|
1386
|
+
// console.log("classRoomdata",classRoomdata);
|
|
1309
1387
|
if (classRoomdata && classRoomdata.length > 0) {
|
|
1310
1388
|
this.myChartDataMatrix = classRoomdata;
|
|
1311
1389
|
this.updateChart();
|
|
@@ -1335,7 +1413,7 @@
|
|
|
1335
1413
|
this.currentUsers = uniqueUserName.length;
|
|
1336
1414
|
};
|
|
1337
1415
|
ChartviewComponent.prototype.ngOnDestroy = function () {
|
|
1338
|
-
console.log('ngOnDestroy >>');
|
|
1416
|
+
// console.log('ngOnDestroy >>');
|
|
1339
1417
|
};
|
|
1340
1418
|
return ChartviewComponent;
|
|
1341
1419
|
}());
|
|
@@ -1591,7 +1669,7 @@
|
|
|
1591
1669
|
}
|
|
1592
1670
|
//----------//type
|
|
1593
1671
|
if (resourceMetadata[i].type != undefined) {
|
|
1594
|
-
type = resourceMetadata[i].type;
|
|
1672
|
+
type = this.getDisplaytypeValue(resourceMetadata[i].type);
|
|
1595
1673
|
}
|
|
1596
1674
|
else {
|
|
1597
1675
|
type = '';
|
|
@@ -1843,7 +1921,7 @@
|
|
|
1843
1921
|
if ((userConsoleMatrix[i].startTime != undefined && userConsoleMatrix[i].startTime != "") && (userConsoleMatrix[i].endTime != undefined && userConsoleMatrix[i].endTime != "")) {
|
|
1844
1922
|
startTime = userConsoleMatrix[i].startTime.toLocaleTimeString('en-US', { hour12: true });
|
|
1845
1923
|
endTime = userConsoleMatrix[i].endTime.toLocaleTimeString('en-US', { hour12: true });
|
|
1846
|
-
currentDate = userConsoleMatrix[i].startTime.getDate() + '/' + userConsoleMatrix[i].startTime.getMonth() + '/' + userConsoleMatrix[i].startTime.getFullYear();
|
|
1924
|
+
currentDate = userConsoleMatrix[i].startTime.getDate() + '/' + (userConsoleMatrix[i].startTime.getMonth() + 1) + '/' + userConsoleMatrix[i].startTime.getFullYear();
|
|
1847
1925
|
}
|
|
1848
1926
|
//----------------- for duration
|
|
1849
1927
|
duration = Math.floor(userConsoleMatrix[i].duration);
|
|
@@ -1880,17 +1958,23 @@
|
|
|
1880
1958
|
chapter = resourceMetadataMatrix[i_4].chapter;
|
|
1881
1959
|
teachingpoint = resourceMetadataMatrix[i_4].teachingpoint;
|
|
1882
1960
|
resourceTitle = resourceMetadataMatrix[i_4].title;
|
|
1883
|
-
resourceType = resourceMetadataMatrix[i_4].type;
|
|
1961
|
+
resourceType = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type);
|
|
1884
1962
|
// FOR EXCEL
|
|
1885
1963
|
resourceArrayForExcel = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, locationName, terminalIPAddress, subject, grade, chapter, teachingpoint, resourceTitle, resourceType, userID];
|
|
1886
1964
|
resourceMatrixForExcel.push(resourceArrayForExcel);
|
|
1965
|
+
teacherName = '';
|
|
1966
|
+
teacherSubject = '';
|
|
1967
|
+
currentDate = '';
|
|
1968
|
+
startTime = '';
|
|
1969
|
+
endTime = '';
|
|
1970
|
+
locationName = '';
|
|
1971
|
+
terminalIPAddress = '';
|
|
1972
|
+
duration = '';
|
|
1887
1973
|
}
|
|
1888
1974
|
}
|
|
1889
1975
|
}
|
|
1890
1976
|
}
|
|
1891
1977
|
}
|
|
1892
|
-
// console.log("resourceMatrixForExcel",[...new Set(resourceMatrixForExcel)]);
|
|
1893
|
-
// console.log("resourceMatrixForExcel",resourceMatrixForExcel);
|
|
1894
1978
|
return resourceMatrixForExcel;
|
|
1895
1979
|
};
|
|
1896
1980
|
ExceldataService.prototype.deatilUsage_Excel = function (resourceMatrixForExcel) {
|
|
@@ -1905,7 +1989,7 @@
|
|
|
1905
1989
|
Date: resourceMatrixForExcel[i][2],
|
|
1906
1990
|
startTime: resourceMatrixForExcel[i][3],
|
|
1907
1991
|
endTime: resourceMatrixForExcel[i][4],
|
|
1908
|
-
duration: resourceMatrixForExcel[i][5],
|
|
1992
|
+
"duration(mins)": resourceMatrixForExcel[i][5],
|
|
1909
1993
|
location: resourceMatrixForExcel[i][6],
|
|
1910
1994
|
IP: resourceMatrixForExcel[i][7],
|
|
1911
1995
|
subjectTitle: resourceMatrixForExcel[i][8],
|
|
@@ -1941,6 +2025,8 @@
|
|
|
1941
2025
|
grades = [];
|
|
1942
2026
|
subjectTought = [];
|
|
1943
2027
|
duration = 0;
|
|
2028
|
+
// console.log("userMetadataList[i]",userMetadataList);
|
|
2029
|
+
// console.log("resourceMatrixForExcel[i]",[...new Set(resourceMatrixForExcel)]);
|
|
1944
2030
|
for (var j = 0; j < resourceMatrixForExcel.length; j++) {
|
|
1945
2031
|
if (userMetadataList[i].userId === resourceMatrixForExcel[j][14]) {
|
|
1946
2032
|
if (resourceMatrixForExcel[j][12] != '') {
|
|
@@ -1949,7 +2035,9 @@
|
|
|
1949
2035
|
if (resourceMatrixForExcel[j][13] != '') {
|
|
1950
2036
|
resourceTypeList.push(resourceMatrixForExcel[j][13]);
|
|
1951
2037
|
}
|
|
1952
|
-
|
|
2038
|
+
if (resourceMatrixForExcel[j][5] != '') {
|
|
2039
|
+
duration = duration + resourceMatrixForExcel[j][5];
|
|
2040
|
+
}
|
|
1953
2041
|
classRooms.push(resourceMatrixForExcel[j][6]);
|
|
1954
2042
|
datesAccess.push(resourceMatrixForExcel[j][2]);
|
|
1955
2043
|
grades.push(resourceMatrixForExcel[j][9]);
|
|
@@ -2031,7 +2119,7 @@
|
|
|
2031
2119
|
// Sr_No: i+1,
|
|
2032
2120
|
Name: userObjectList[i].Name,
|
|
2033
2121
|
Subjects_taught: userObjectList[i].Subjects,
|
|
2034
|
-
Duration: userObjectList[i].duration,
|
|
2122
|
+
" Duration(mins)": userObjectList[i].duration,
|
|
2035
2123
|
ClassRooms: userObjectList[i].ClassRooms,
|
|
2036
2124
|
DaysAccsessed: userObjectList[i].DayAccess,
|
|
2037
2125
|
DatesAccess: userObjectList[i].DatesAccess,
|
|
@@ -2048,6 +2136,74 @@
|
|
|
2048
2136
|
// console.log("userSummaryList",userSummaryList);
|
|
2049
2137
|
return userSummaryList;
|
|
2050
2138
|
};
|
|
2139
|
+
// To GET DISPLAY TYPE
|
|
2140
|
+
ExceldataService.prototype.getDisplaytypeValue = function (key) {
|
|
2141
|
+
var assetTypeConfig = [
|
|
2142
|
+
{
|
|
2143
|
+
type: "asset_media",
|
|
2144
|
+
display: "Media"
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
type: "asset_print",
|
|
2148
|
+
display: "Print"
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
type: "quiz",
|
|
2152
|
+
display: "Quiz"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
type: "question",
|
|
2156
|
+
display: "Question"
|
|
2157
|
+
},
|
|
2158
|
+
{
|
|
2159
|
+
type: "chapter",
|
|
2160
|
+
display: "Chapter"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
type: "tp",
|
|
2164
|
+
display: "Topic"
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
type: "whiteboard",
|
|
2168
|
+
display: "Whiteboard"
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
type: "widget",
|
|
2172
|
+
display: "Widget"
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
type: "casset_media",
|
|
2176
|
+
display: "cMedia"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
type: "casset_print",
|
|
2180
|
+
display: "cPrint"
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
type: "cquiz",
|
|
2184
|
+
display: "cQuiz"
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
type: "cquestion",
|
|
2188
|
+
display: "cQuestion"
|
|
2189
|
+
},
|
|
2190
|
+
{
|
|
2191
|
+
type: "image",
|
|
2192
|
+
display: "Image"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
type: "video",
|
|
2196
|
+
display: "Video"
|
|
2197
|
+
},
|
|
2198
|
+
];
|
|
2199
|
+
var displayValue = key;
|
|
2200
|
+
assetTypeConfig.forEach(function (value) {
|
|
2201
|
+
if (value.type === key) {
|
|
2202
|
+
displayValue = value.display;
|
|
2203
|
+
}
|
|
2204
|
+
});
|
|
2205
|
+
return displayValue;
|
|
2206
|
+
};
|
|
2051
2207
|
return ExceldataService;
|
|
2052
2208
|
}());
|
|
2053
2209
|
ExceldataService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ExceldataService_Factory() { return new ExceldataService(); }, token: ExceldataService, providedIn: "root" });
|