File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useContext } from 'react' ;
2+
3+ import moment from 'moment' ;
24import { DockerContext } from '../context/DockerContext' ;
35
46interface IContainer {
@@ -40,10 +42,10 @@ const DockerStatsChart = () => {
4042 // Render the component if there is available data
4143 return containerid ? (
4244 < div className = "chart docker-chart" >
43- < header id = "docker-stats-chart-header" > Docker Container Stats</ header >
45+ < h2 > Docker Container Stats</ h2 >
4446 < span > Container Name: { containername } </ span >
4547 < span > Platform: { platform } </ span >
46- < span > Start time: { starttime } </ span >
48+ < span > Start time: { moment ( starttime ) . format ( 'LLL' ) } </ span >
4749 < span > Memory Usage: { ( memoryusage / 1000000 ) . toFixed ( 2 ) } </ span >
4850 < span > Memory Limit: { ( memorylimit / 1000000 ) . toFixed ( 2 ) } </ span >
4951 < span > Memory Percent: { memorypercent . toFixed ( 2 ) } %</ span >
Original file line number Diff line number Diff line change 1010
1111 .chart {
1212 margin : 10px 20px ;
13+
14+ & .docker-chart {
15+ @include centerWithFlex ($justify : flex-start , $direction : column );
16+ align-items : flex-start ;
17+ width : 400px ;
18+ height : 400px ;
19+ background-color : #fff ;
20+ color : #333 ;
21+ box-shadow : 2px 2px 6px 2px rgb (187 , 187 , 187 );
22+ padding : 10px 20px ;
23+ border-radius : 4px ;
24+
25+ h2 {
26+ align-self : center ;
27+ font-size : 125% ;
28+ margin : 15px 0 20px ;
29+ font-weight : 700px ;
30+ }
31+ }
1332 }
1433 }
1534
1635 svg {
1736 border-radius : 3px ;
1837 // border: thin solid rgb(155, 155, 155);
19- box-shadow : 2px 2px 6px rgb (187 , 187 , 187 );
20-
38+ box-shadow : $boxshadow ;
2139 }
2240}
2341
24- #docker-stats-chart {
25- position : relative ;
26- display : flex ;
27- flex-direction : column ;
28- background-color : white ;
29- border-radius : 3px ;
30- box-shadow : 3px 3px 3px rgba (216 , 210 , 247 , 0.5 );
31- height : 380px ;
32- width : 380px ;
33- padding : 10px 10px 10px 10px ;
34- }
35-
36- #docker-stats-chart-header {
37- align-self : center ;
38- font-size : 1.5em ;
39- padding-bottom : 25px ;
40- height : 400 ;
41- width : 400 ;
42- }
43-
4442/* Tablet */
4543@media screen and (min-width : 601px ) and (max-width : 980px ) {
4644 .graphsGrid {
You can’t perform that action at this time.
0 commit comments