-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Irfan Habib
committed
Sep 30, 2018
1 parent
d8a2554
commit c48de76
Showing
6 changed files
with
98 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 35 additions & 3 deletions
38
...kubernetes/kubernetes-node/kubernetes-node-metrics/kubernetes-node-metrics.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,35 @@ | ||
<p> | ||
kubernetes-node-metrics works! | ||
</p> | ||
<div class="kubernetes-node-metrics"> | ||
<app-tile> | ||
<app-tile-group> | ||
<app-tile> | ||
<app-kubernetes-node-metric-stats-card title="Memory" [metric]="memoryMetric" [unit]="memoryUnit"></app-kubernetes-node-metric-stats-card> | ||
</app-tile> | ||
<app-tile> | ||
<app-kubernetes-node-metric-stats-card title="CPU" [metric]="cpuMetric" [unit]="cpuUnit"></app-kubernetes-node-metric-stats-card> | ||
</app-tile> | ||
</app-tile-group> | ||
<app-tile-group> | ||
<app-tile> | ||
<app-kubernetes-node-metrics-chart | ||
[nodeName]="kubeNodeService.nodeName" | ||
[endpointGuid]="kubeNodeService.kubeGuid" | ||
[yAxisLabel]="" | ||
[metricName]="memoryMetric" | ||
title = "Memory Usage" | ||
></app-kubernetes-node-metrics-chart> | ||
</app-tile> | ||
</app-tile-group> | ||
<app-tile-group> | ||
<app-tile> | ||
<app-kubernetes-node-metrics-chart | ||
[nodeName]="kubeNodeService.nodeName" | ||
[endpointGuid]="kubeNodeService.kubeGuid" | ||
[yAxisLabel]="" | ||
[metricName]="cpuMetric" | ||
title= "CPU Usage" | ||
></app-kubernetes-node-metrics-chart> | ||
</app-tile> | ||
</app-tile-group> | ||
</app-tile> | ||
</div> | ||
|
14 changes: 13 additions & 1 deletion
14
...m/kubernetes/kubernetes-node/kubernetes-node-metrics/kubernetes-node-metrics.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { KubernetesNodeService, KubeNodeMetric } from '../../services/kubernetes-node.service'; | ||
|
||
@Component({ | ||
selector: 'app-kubernetes-node-metrics', | ||
templateUrl: './kubernetes-node-metrics.component.html', | ||
styleUrls: ['./kubernetes-node-metrics.component.scss'] | ||
}) | ||
export class KubernetesNodeMetricsComponent implements OnInit { | ||
memoryMetric: KubeNodeMetric; | ||
cpuMetric: KubeNodeMetric; | ||
memoryUnit: string; | ||
cpuUnit: string; | ||
|
||
constructor() { } | ||
constructor( | ||
public kubeNodeService: KubernetesNodeService | ||
) { } | ||
|
||
ngOnInit() { | ||
|
||
this.memoryMetric = KubeNodeMetric.MEMORY; | ||
this.cpuMetric = KubeNodeMetric.CPU; | ||
this.memoryUnit = 'bytes'; | ||
this.cpuUnit = 'secs'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters