Permalink
Browse files

feat(dashboard): updates

  • Loading branch information...
jkuri committed Sep 15, 2017
1 parent f6f54f0 commit a157be6123a2294ce97f420fdad88e5da2013f94
@@ -63,21 +63,31 @@ <h3>Overall Memory Consumption</h3>
<h2>CPU</h2>
<h3>Total CPU Usage</h3>
</div>
<app-progress-chart [percent]="cpuPercent"></app-progress-chart>
<div *ngIf="!cpuCores?.length">
<img src="images/icons/flickr.svg" class="main-loader">
</div>
<div *ngIf="cpuCores?.length">
<app-progress-chart [percent]="cpuPercent"></app-progress-chart>
</div>
</div>
<div class="content-box" *ngIf="cpuCores?.length">
<div class="content-box">
<div class="content-box-header">
<h2>CPU Cores</h2>
<h3>CPU Cores Utilization</h3>
</div>
<div class="info-data-container" *ngFor="let core of cpuCores; let i = index">
<span class="label-txt">Core {{ i }}</span>
<div class="data-progress-container green">
<span class="data-progress-bar" [style.width]="core + '%'"></span>
<div *ngIf="!cpuCores?.length">
<img src="images/icons/flickr.svg" class="main-loader">
</div>
<div *ngIf="cpuCores?.length">
<div class="info-data-container" *ngFor="let core of cpuCores; let i = index">
<span class="label-txt">Core {{ i }}</span>
<div class="data-progress-container green">
<span class="data-progress-bar" [style.width]="core + '%'"></span>
</div>
<span class="data-txt">
{{ core }}%
</span>
</div>
<span class="data-txt">
{{ core }}%
</span>
</div>
</div>
</div>
@@ -31,8 +31,6 @@ export class AppDashboardComponent implements OnInit, OnDestroy {
}

ngOnInit() {
this.loading = false;

this.sub = this.statsService.stats.subscribe(e => {
if (e.type === 'memory') {
this.memory = {
@@ -54,7 +52,10 @@ export class AppDashboardComponent implements OnInit, OnDestroy {
}
});

this.statsService.getJobRuns().then((runs: any) => this.runs = runs);
this.statsService.getJobRuns().then((runs: any) => {
this.loading = false;
this.runs = runs;
});

setTimeout(() => this.statsService.start());
}
@@ -4,7 +4,7 @@
border: 1px solid $border
border-radius: 4px
width: 100%
min-height: 215px
min-height: 50px
margin-bottom: 30px

.content-box-header

0 comments on commit a157be6

Please sign in to comment.