Skip to content

Commit 46852ab

Browse files
authored
Merge pull request #188 from open-source-labs/cleanCode
Clean code
2 parents d47335d + d01ad24 commit 46852ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2699
-3329
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build
66
release-builds
77
coverage
88
__tests__/**/__snapshots__
9-
# .env
9+
.env
1010
users.json
1111
test_users.json
1212

__tests__/test_settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"setupRequired":false,"services":[["myPostgres","SQL","postgres://zwezmnqm:[email protected]:5432/zwezmnqm","Online bookstore with that keeps track of orders and customers","Jun 28, 2020 4:58 PM"],["ToddDB","MongoDB","mongodb+srv://tdwolf6:[email protected]/Chronos?retryWrites=true&w=majority","Web app deployed on AWS","Jul 3, 2020 7:12AM"],["orders","MongoDB","mongodb+srv://yangsong:[email protected]/orders?retryWrites=true&w=majority","orders","May 31, 2022 5:16 PM"]],"mode":"light mode","splash":true,"landingPage":"dashBoard"}
1+
{"setupRequired":false,"services":[["myPostgres","SQL","postgres://zwezmnqm:[email protected]:5432/zwezmnqm","Online bookstore with that keeps track of orders and customers","Jun 28, 2020 4:58 PM"],["ToddDB","MongoDB","mongodb+srv://tdwolf6:[email protected]/Chronos?retryWrites=true&w=majority","Web app deployed on AWS","Jul 3, 2020 7:12AM"],["orders","MongoDB","mongodb+srv://yangsong:[email protected]/orders?retryWrites=true&w=majority","orders","May 31, 2022 5:16 PM"],["JamesMongo","MongoDB","mongodb+srv://james:[email protected]/test?retryWrites=true&w=majority","","Jun 15, 2022 10:34 AM"],["JamesPostgres","SQL","postgres://dxdebork:[email protected]/dxdebork","","Jun 15, 2022 11:11 AM"]],"mode":"light mode","splash":true,"landingPage":"dashBoard"}

app/charts/EventChart.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { time } from 'd3';
21
import moment from 'moment';
3-
import React, { useContext, useState, useEffect } from 'react';
2+
import React, { useState } from 'react';
43
import Plot from 'react-plotly.js';
54
import { all, solo as soloStyle } from './sizeSwitch';
65

@@ -20,11 +19,6 @@ interface SoloStyles {
2019

2120
const EventChart: React.FC<EventChartProps> = React.memo(props => {
2221
const { metric, timeList, valueList, sizing, colourGenerator } = props;
23-
// console.log('in event chart:');
24-
// console.log('event chart metric:', metric);
25-
// console.log('event chart timelist',JSON.stringify(timeList))
26-
// console.log('event chart valuelist', JSON.stringify(valueList));
27-
2822
const [solo, setSolo] = useState<SoloStyles | null>(null);
2923

3024
setInterval(() => {

app/charts/HealthChart.tsx

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import moment from 'moment';
2-
import React, { useEffect, useState } from 'react';
3-
4-
import { useParams } from 'react-router-dom';
5-
2+
import React, { useState } from 'react';
63
import Plot from 'react-plotly.js';
74
import { all, solo as soloStyle } from './sizeSwitch';
85

@@ -22,28 +19,15 @@ interface SoloStyles {
2219
}
2320

2421
const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
25-
const { service } = useParams<any>();
2622
const { renderService, metric, timeList, valueList, sizing, colourGenerator } = props;
2723
const [solo, setSolo] = useState<SoloStyles | null>(null);
28-
//console.log('in the HealthChart');
29-
//console.log('healthchart valuelist:', JSON.stringify(valueList));
30-
//console.log('healthchart timelist:', JSON.stringify(timeList));
31-
3224
setInterval(() => {
3325
if (solo !== soloStyle) {
3426
setSolo(soloStyle);
3527
}
3628
}, 20);
3729

3830
const createChart = () => {
39-
40-
// if (service && renderService && service !== renderService ) {
41-
// console.log("current service is:", service, "render service is:", renderService);
42-
// return (<div><p>Loading...</p></div>)
43-
44-
// }
45-
// else{
46-
4731
const timeArr = timeList.map((el: any) => moment(el).format('kk:mm:ss'));
4832
const hashedColour = colourGenerator(renderService);
4933
let plotlyData: {
@@ -101,10 +85,7 @@ const HealthChart: React.FC<HealthChartProps> = React.memo(props => {
10185
},
10286
}}
10387
/>
104-
);
105-
106-
// }
107-
88+
);
10889
};
10990

11091
return (

app/charts/LatencyChart.tsx

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

app/charts/MemoryChart.tsx

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

0 commit comments

Comments
 (0)