Skip to content

Commit dce47f2

Browse files
committed
Merge branch 'dev' into contTSConvert
2 parents b5e5079 + b78aba1 commit dce47f2

File tree

7 files changed

+80
-107
lines changed

7 files changed

+80
-107
lines changed

src/components/css/metric.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
.legend-container {
22
display: flex;
33
flex-direction: column;
4-
align-items: flex-start;
54
width: 170px;
5+
align-items: center;
6+
margin-top: 5px;
67
}
78

9+
.legend-container p {
10+
margin-left: 8px;
11+
}
812
.aggregate-conatiner {
913
display: grid;
1014
grid-template-columns: 1fr 1fr 1fr;

src/components/css/styles.css

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
header {
1111
display: flex;
1212
justify-content: center;
13+
color: #042331;
1314
}
1415

1516
body {
@@ -19,7 +20,8 @@ body {
1920

2021
i {
2122
color: rgb(105, 105, 72);
22-
transition: 0.3s;
23+
transition: 0.7s;
24+
margin-right: 8px;
2325
}
2426

2527
ul {
@@ -60,7 +62,7 @@ h4 {
6062
padding: 0px 25px 0px 25px;
6163
min-width: 78vw;
6264
height: 100%;
63-
/* flex-wrap: wrap; */
65+
flex-wrap: wrap;
6466
overflow: scroll;
6567
border-radius: 0.3rem;
6668
background: #e1e4e6;
@@ -90,6 +92,10 @@ h4 {
9092
padding-bottom: 120px;
9193
}
9294

95+
.container-heading{
96+
margin: 10px;
97+
}
98+
9399
.settings-container.inner-box {
94100
border-radius: 0.7rem;
95101
}
@@ -110,6 +116,7 @@ h4 {
110116
}
111117

112118
.tabTitle {
119+
margin: 20px 15px;
113120
font-weight: bolder;
114121
font-size: 30px;
115122
}
@@ -120,10 +127,10 @@ h4 {
120127
}
121128

122129
.containers {
123-
background-color: #e1e4e6;
124-
max-height: 800px;
125130
display: flex;
126131
flex-wrap: wrap;
132+
background-color: #e1e4e6;
133+
max-height: 800px;
127134
overflow-y: auto;
128135
}
129136

@@ -155,7 +162,7 @@ h4 {
155162

156163
.box {
157164
margin-top: 20px;
158-
margin-left: 20px;
165+
margin-right: 20px;
159166
min-width: 250px;
160167
background: white;
161168
padding-bottom: 10px;
@@ -220,11 +227,13 @@ h4 {
220227
}
221228

222229
.tab ul li:hover {
223-
border-left: #e1e4e6 12px solid;
230+
/* border-left: #e1e4e6 5px solid; */
231+
224232
}
225233

226234
.tab ul li a:hover {
227235
font-weight: 900;
236+
color: #ecfffe;
228237
}
229238

230239
.tab ul li a:hover i {
@@ -379,12 +388,9 @@ h4 {
379388

380389
.users-container {
381390
border-radius: 0.5rem;
382-
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3),
383-
0 0 40px rgba(0, 0, 0, 0.1) inset;
384-
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3),
385-
0 0 40px rgba(0, 0, 0, 0.1) inset;
386-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
387-
/* overflow: hidden; */
391+
box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
392+
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
393+
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
388394
}
389395

390396
.settings-container {
@@ -394,13 +400,11 @@ h4 {
394400
flex-direction: column;
395401
background-color: white;
396402
margin: 20px 0px 20px 0px;
397-
padding: 15px;
398-
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3),
399-
0 0 40px rgba(0, 0, 0, 0.1) inset;
400-
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3),
401-
0 0 40px rgba(0, 0, 0, 0.1) inset;
402-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
403+
padding: 30px;
403404
border-radius: 0.5rem;
405+
box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
406+
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
407+
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
404408
line-height: 1.5rem;
405409
}
406410

@@ -790,4 +794,9 @@ h4 {
790794
padding: 1vh 1vw;
791795
width: 50vw;
792796
margin: 1vh 1vw 0 0;
797+
border-radius: 0.2rem;
798+
}
799+
800+
.user-table{
801+
height: calc(100% - 70px) !important;
793802
}

src/components/display/LineChartDisplay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ const LineChartDisplay = () => {
550550
return (
551551
<div>
552552
<div className="metric-section-title">
553-
<h3>Metrics Over Time</h3>
553+
<h3 className="container-heading">Metrics Over Time</h3>
554554
</div>
555555
<div className="metrics-options-form">
556556
<form

src/components/tabs/Metrics.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,38 +19,38 @@ const Metrics = (props: MetricsProps) => {
1919
const cpuThreshold = props.threshold[0];
2020
const memThreshold = props.threshold[1];
2121

22-
let cpuFails = 0;
23-
let memFails = 0;
22+
let cpuFails = 0
23+
let memFails = 0
2424

2525
// used to monitor threshold and fail counts
2626
for (const each of fullRunningList) {
27-
const cpu = parseFloat(each['CPUPerc'].replace(/([%])+/g, ''));
28-
const memory = parseFloat(each['MemPerc'].replace(/([%])+/g, ''));
29-
if (cpu >= cpuThreshold) cpuFails++;
30-
if (memory >= memThreshold) memFails++;
27+
const cpu = parseFloat(each['CPUPerc'].replace(/([%])+/g, ''))
28+
const memory = parseFloat(each['MemPerc'].replace(/([%])+/g, ''))
29+
if (cpu >= cpuThreshold) cpuFails++
30+
if (memory >= memThreshold) memFails++
3131
}
3232

3333
const cpu = {
3434
labels: [`Available: ${cpuData}%`, `Usage: ${hostStats.cpuPerc}%`],
3535
datasets: [
3636
{
3737
label: 'CPU',
38-
backgroundColor: ['rgba(44, 130, 201, 1)', 'rgba(19, 221, 29, 1)'],
38+
backgroundColor: ['#4594ce', '#67f267'],
3939
data: [cpuData, hostStats.cpuPerc],
4040
},
4141
],
42-
};
42+
}
4343

4444
const memory = {
4545
labels: [`Available: ${memoryData}%`, `Usage: ${hostStats.memPerc}%`],
4646
datasets: [
4747
{
4848
label: 'Memory',
49-
backgroundColor: ['rgba(44, 130, 201, 1)', 'rgba(19, 221, 29, 1)'],
49+
backgroundColor: ['#4594ce', '#67f267'],
5050
data: [memoryData, hostStats.memPerc],
5151
},
5252
],
53-
};
53+
}
5454

5555
const memOptions = {
5656
responsive: true,
@@ -72,7 +72,7 @@ const Metrics = (props: MetricsProps) => {
7272
color: '#fff',
7373
},
7474
},
75-
};
75+
}
7676

7777
const cpuOptions = {
7878
responsive: true,
@@ -94,15 +94,15 @@ const Metrics = (props: MetricsProps) => {
9494
color: '#fff',
9595
},
9696
},
97-
};
97+
}
9898

9999
return (
100100
<div className="renderContainers">
101101
<div className="header">
102102
<h1 className="tabTitle">Metrics</h1>
103103
</div>
104104
<div className="metric-section-title">
105-
<h3>Host Metrics</h3>
105+
<h3 className="container-heading">Host Metrics</h3>
106106
</div>
107107
<div className="aggregate-conatiner">
108108
<div className="pieChart">
@@ -138,7 +138,10 @@ const Metrics = (props: MetricsProps) => {
138138
<div className="legend-container">
139139
<div className="legend-section">
140140
<div className="avaliable-box"></div>
141-
<p className="legend-text"> Available {Math.round(memoryData)}%</p>
141+
<p className="legend-text">
142+
{' '}
143+
Available {Math.round(memoryData)}%
144+
</p>
142145
</div>
143146
<div className="legend-section">
144147
<div className="usage-box"></div>
@@ -176,7 +179,7 @@ const Metrics = (props: MetricsProps) => {
176179
for more information on these metrics
177180
</p> */}
178181
</div>
179-
);
180-
};
182+
)
183+
}
181184

182-
export default Metrics;
185+
export default Metrics

src/components/tabs/ProcessLogs.tsx

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,44 @@ const ProcessLogs = (props: any) => {
1818
key={index}
1919
index={index}
2020
container={container}
21-
status='Running'
22-
/>
23-
);
24-
});
21+
status="Running"
22+
/>,
23+
)
24+
})
2525

2626
const renderStoppedList: any[] = [];
2727
props.stoppedList.map((container: ContainerType, index: number) => {
2828
renderStoppedList.push(
29-
<ProcessLogsCard key={index} index={index} container={container} status='Stopped' />
30-
);
31-
});
29+
<ProcessLogsCard
30+
key={index}
31+
index={index}
32+
container={container}
33+
status="Stopped"
34+
/>,
35+
)
36+
})
3237

3338
return (
34-
<div className='renderContainers'>
35-
<div className='header'>
36-
<h1 className='tabTitle'>Process Logs</h1>
39+
<div className="renderContainers">
40+
<div className="header">
41+
<h1 className="tabTitle">Process Logs</h1>
3742
</div>
3843

39-
<h3>Running Containers: {props.runningList.length}</h3>
44+
<h3 className="container-heading">
45+
Running Containers: {props.runningList.length}
46+
</h3>
4047

41-
<div className='containers'>{renderRunningList}</div>
48+
<div className="containers">{renderRunningList}</div>
4249

4350
<br></br>
4451

45-
<h3>Stopped Containers: {props.stoppedList.length}</h3>
52+
<h3 className="container-heading">
53+
Stopped Containers: {props.stoppedList.length}
54+
</h3>
4655

47-
<div className='containers'>{renderStoppedList}</div>
56+
<div className="containers">{renderStoppedList}</div>
4857
</div>
49-
);
50-
};
58+
)
59+
}
5160

52-
export default ProcessLogs;
61+
export default ProcessLogs

src/components/tabs/Stopped.js

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/components/tabs/Users.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const UserTable = () => {
111111
* Double click on the role to access the drop down menu
112112
</Typography>
113113
<DataGrid
114+
className="user-table"
114115
sx={{}}
115116
columns={columns}
116117
rows={userList}

0 commit comments

Comments
 (0)