Add additional columns, styling and data to lists

This commit is contained in:
Jesse Lucas
2020-03-31 20:40:36 -04:00
parent 865f1f2ea6
commit 06eacb87d8
15 changed files with 51 additions and 102 deletions
+4 -8
View File
@@ -45,24 +45,20 @@ export class ChartComponent implements OnInit {
ngAfterViewInit() {
let totalCount: number = 0;
this.service.getAll().subscribe(
folder => {
t => {
// Count the number of folders and set chart
totalCount++;
this.donutChart.count = totalCount;
// Get StateType and convert to string
let stateType;
let state: string;
const stateType = t.stateType;
const state = t.state;
let color;
switch (this.type) {
case Type.Folder:
stateType = Folder.getStateType(folder);
state = Folder.stateTypeToString(stateType);
color = Folder.stateTypeToColor(stateType);
color = Folder.stateTypeToColor(t.stateType);
break;
case Type.Device:
stateType = Device.getStateType(folder);
state = Device.stateTypeToString(stateType);
color = Device.stateTypeToColor(stateType);
break;
}