Skip to content

Commit f70e23c

Browse files
committed
Completed all graph formatting
1 parent 9a4a71c commit f70e23c

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

app/charts/docker-stats-chart.jsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,19 @@ const DockerStatsChart = (props) => {
6868
if (Object.keys(dockerStats).length > 0) {
6969
// Build an array of <span>s that'll be rendered. Each <span> contains one stat.
7070
const dockerStatsArr = [];
71-
const dockerDataArr = [];
7271

7372
for (let stat in dockerStats) {
7473
dockerStatsArr.push(
7574
<span key={stat}>
76-
{stat}:
75+
{stat}: {dockerStats[stat]}
7776
</span>
7877
)
7978
}
80-
for (let stat in dockerStats) {
81-
dockerDataArr.push(
82-
<span key={stat}>
83-
{dockerStats[stat]}
84-
</span>
85-
)
86-
87-
}
8879
console.log('dockerStatsArr (docker stats chart):', dockerStatsArr);
89-
9080
return (
9181
<div id="docker-stats-chart">
9282
<header id="docker-stats-chart-header">Docker Container Stats</header>
9383
{dockerStatsArr}
94-
{dockerDataArr}
9584
</div>
9685
)
9786
} else { // If no Docker data:

app/stylesheets/graphs.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@ svg {
2828
#docker-stats-chart-header {
2929
align-self: center;
3030
font-size: 1.5em;
31-
padding-bottom: 25px
32-
}
31+
padding-bottom: 25px;
32+
height: 400;
33+
width: 400;
34+
}
35+

0 commit comments

Comments
 (0)