Skip to content

Commit 4c3cf60

Browse files
committed
first level UI updates
1 parent edf4013 commit 4c3cf60

8 files changed

Lines changed: 48 additions & 23 deletions

File tree

app/charts/LogsTable.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ import { useTable, useGroupBy, useExpanded } from 'react-table';
99

1010
import { CommsContext } from '../context/CommsContext';
1111

12+
1213
/**
1314
* Styling for the Logs Table
1415
*/
1516

1617
const Styles = styled.div`
1718
padding: 1rem;
19+
1820
1921
table {
2022
border-spacing: 0;
2123
border: 1px solid black;
24+
background-color: #D7D7DC;
25+
2226
2327
tr {
2428
:last-child {
@@ -158,10 +162,10 @@ const LogsTable = () => {
158162
);
159163

160164
const data = useContext(CommsContext).commsData;
161-
165+
162166
return (
163-
<Styles>
164-
<Table columns={columns} data={data} />
167+
<Styles >
168+
<Table columns={columns} data={data} />
165169
</Styles>
166170
);
167171
};

app/components/About/About.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@ import React from 'react';
22
import './styles.scss';
33
import TeamMembers from './TeamMembers';
44
import PastContributors from './PastContributors';
5-
import { useStylingContext } from './StylingContext';
6-
5+
// import { useStylingContext } from './StylingContext';
6+
import { useContext } from 'react';
7+
import lightAndDark from '../Styling';
8+
import { DashboardContext } from '../../context/DashboardContext';
79

810
const About: React.FC = React.memo(() => {
9-
const currentMode = useStylingContext();
11+
const { mode } = useContext(DashboardContext);
1012

13+
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
14+
const currentStyle = mode === 'light' ? lightAndDark.lightModeData : lightAndDark.darkModeData;
1115
return (
12-
<div className="about">
13-
<div className="blurb" data-testid="aboutPage">
14-
<h3 style={currentMode} className="mainTitle">About</h3>
15-
<p style={currentMode} className="text" >
16+
17+
18+
<div className="about" >
19+
<div className="blurb" data-testid="aboutPage" style={currentStyle}>
20+
<h3 style={currentStyle} className="mainTitle">About</h3>
21+
<p style={currentStyle} className="text" >
1622
The Chronos Team has a passion for building tools that are powerful, beautifully
1723
designed, and easy to use. Chronos was conceived as an Open Source endeavor that directly benefits the developer
1824
community. It can also monitor applications deployed using AWS, EC2, and ECS from Amazon.

app/components/Contact/Contact.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ const Contact: React.FC = React.memo(() => {
88
const { mode } = useContext(DashboardContext);
99

1010
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
11+
const currentStyle = mode === 'light' ? lightAndDark.lightModeData : lightAndDark.darkModeData;
1112

1213
return (
1314
<div className="contact" style={currentMode}>
14-
<div className="contact-border" data-testid="contactPage">
15+
<div className="contact-border" data-testid="contactPage" style={currentStyle}>
1516
<div className="contact-container">
1617
<div className="contact-blurb">
1718
<h1>Contact Us</h1>

app/components/Copyright.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Copyright: React.FC = React.memo(() => {
1010
copyright: {
1111
fontFamily: 'Roboto',
1212
position: 'fixed',
13-
color: '#ffffff',
13+
color: '#FAFDF9',
1414
},
1515
}));
1616
const classes = useStyles();

app/components/Styling.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ const lightAndDark = {
1010
color: '#181818',
1111
},
1212
darkModeHeader: {
13-
backgroundColor: '#161b22',
13+
backgroundColor: '#1C202D',
1414
color: 'white',
1515
},
1616
darkModeMain: {
17-
backgroundColor: '#161b22',
17+
backgroundColor: '#1C202D',
1818
backgroundSize: 'contain',
1919
flex: '1',
2020
minHeight: '100vh',
@@ -26,6 +26,15 @@ const lightAndDark = {
2626
darkModeText: {
2727
color: '#fcfefb',
2828
},
29+
darkModeData: {
30+
backgroundColor: '#262837',
31+
color: '#fafdf9',
32+
borderColor: 'transparent',
33+
},
34+
lightModeData: {
35+
backgroundColor: '#E7E7F2',
36+
color: '#24272A',
37+
},
2938
};
3039

3140
export default lightAndDark;

app/components/TransferColumns.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom';
33
import { QueryContext } from '../context/QueryContext';
44
import { HealthContext } from '../context/HealthContext';
55
import { EventContext } from '../context/EventContext';
6-
import { DataGrid } from '@mui/x-data-grid';
6+
import { GridColDef, DataGrid } from '@mui/x-data-grid';
77
import { GridToolbar } from '@mui/x-data-grid/components';
88
import * as DashboardContext from '../context/DashboardContext';
99
import lightAndDark from './Styling';
@@ -32,6 +32,7 @@ const TransferColumns = React.memo(() => {
3232
const [searchTerm, setSearchTerm] = useState<string>('');
3333

3434
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
35+
const currentStyle = mode === 'light' ? lightAndDark.lightModeData : lightAndDark.darkModeData;
3536

3637
useEffect(() => {
3738
if (healthData) {
@@ -150,19 +151,21 @@ const TransferColumns = React.memo(() => {
150151
};
151152

152153
// makes the column titles for the selection grid
153-
const columns = [
154-
{ field: 'id', headerName: 'ID', flex: 1 },
154+
const columns: GridColDef[] = [
155+
{ field: 'id', headerName: 'ID', flex: 1, headerClassName: 'style',},
155156
{
156157
field: 'tag',
157158
headerName: 'Category',
158159
flex: 1,
159160
editable: true,
161+
headerClassName: 'style',
160162
},
161163
{
162164
field: 'title',
163165
headerName: 'Metric',
164166
flex: 3,
165167
editable: true,
168+
headerClassName: 'style',
166169
},
167170
];
168171

@@ -203,7 +206,7 @@ const TransferColumns = React.memo(() => {
203206
<div style={{ height: '500px', width: '100%' }}>
204207

205208
<DataGrid
206-
style={currentMode}
209+
style={currentStyle }
207210
rows={rows}
208211
columns={columns}
209212
slots={{ toolbar: GridToolbar }}
@@ -227,7 +230,7 @@ const TransferColumns = React.memo(() => {
227230

228231
</div>
229232
{selectedRows.length > 0 && (
230-
<h3 style={{ marginTop: '20px', color: currentMode.color }}>Selected Rows:</h3>
233+
<h3 style={{ marginTop: '20px', color: currentStyle.color }}>Selected Rows:</h3>
231234
)}
232235
<ol id="selectedRows">{selectedRows}</ol>
233236
</div>

app/containers/GraphsContainer/GraphsContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const GraphsContainer: React.FC = React.memo(() => {
9292
}, [service, live]);
9393

9494
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
95-
95+
const currentStyle = mode === 'light' ? lightAndDark.lightModeData : lightAndDark.darkModeData;
9696
return (
9797
<>
9898
<GraphNavBar
@@ -116,7 +116,7 @@ const GraphsContainer: React.FC = React.memo(() => {
116116
<LogsTable />
117117
</div>
118118
) : (
119-
<div className="graphs">
119+
<div className="graphs" style= {currentStyle}>
120120
{chart === 'all' && (
121121
<div className="transferColumns">
122122
<h2 style={currentMode}>Search Your Metrics to Display</h2>

app/containers/GraphsContainer/styles.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
.graphs-container {
2121
width: 100%;
22-
padding: 0 5%;
22+
padding: 5%;
2323

2424
.graphs {
2525
@include centerWithFlex();
@@ -46,12 +46,13 @@
4646
}
4747

4848
h2 {
49-
padding-top: 4px;
49+
padding-top: 15px;
5050
margin-bottom: 37px;
5151
align-self: center;
5252
font-size: 100%;
5353
margin-top: 20px;
5454
font-weight: 400;
55+
padding-bottom: 10px;
5556
}
5657
}
5758
}
@@ -73,6 +74,7 @@
7374
justify-content: center;
7475
align-items: center;
7576
margin-bottom: 20px;
77+
margin-top: 20px;
7678

7779
#getCharts:hover {
7880
font-weight: 580;

0 commit comments

Comments
 (0)