Skip to content

Commit 87e771f

Browse files
committed
add comment
1 parent fdd7cdb commit 87e771f

File tree

5 files changed

+6
-27
lines changed

5 files changed

+6
-27
lines changed

app/charts/GrafanaEventChart.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ interface EventChartProps {
77
token: string;
88
}
99

10-
// interface SoloStyles {
11-
// height: number;
12-
// width: number;
13-
// }
1410

1511
type TimeFrame = '5m' | '15m' | '30m' | '1h' | '2h' | '1d' | '2d';
1612

@@ -27,16 +23,10 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
2723
const [type, setType] = useState(['timeserie']);
2824
const [timeFrame, setTimeFrame] = useState('5m');
2925

30-
// const [solo, setSolo] = useState<SoloStyles | null>(null);
3126
console.log("graphType: ", graphType)
3227
console.log("type: ", type)
3328
console.log("inside GrafanaEventChart")
3429

35-
// setInterval(() => {
36-
// if (solo !== soloStyle) {
37-
// setSolo(soloStyle);
38-
// }
39-
// }, 20);
4030
console.log("metricName: ", metricName)
4131
let uid = metricName.replace(/.*\/.*\//g, '')
4232
if (uid.length >= 40) {
@@ -47,8 +37,8 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
4737
console.log("uid: ", uid)
4838
console.log("parsedName: ", parsedName)
4939

40+
// make request to update dashboard
5041
const handleSelectionChange = async (event) => {
51-
//setGraphType(event.target.value);
5242
setType([...type, graphType]);
5343
await fetch('http://localhost:1111/api/updateDashboard', {
5444
method: 'POST',

app/containers/EventContainer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
135135
// }
136136
}
137137
}
138+
// currently, we only display graph using grafana. It can be implement as a option to choose between ploty and grafana for future iterations
138139
// if (isGrafana) {
139140
console.log(grafanaChartsArray)
140141
setEventChartsArr(grafanaChartsArray);

app/containers/Inspect.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import '../stylesheets/Inspect.scss';
66
import { CSS2DRenderer, CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
77

88

9-
10-
// currently, Insepect only works statically, but it should be possible to make it dynamic. To do so, we need to make get kubernetes resources information from the backend, and then pass it to the graph.
11-
// It will be great if future iteration group can make it dynamic.
12-
139
const Inspect = () => {
1410
useEffect(() => {
1511
// controls
@@ -124,7 +120,6 @@ const Inspect = () => {
124120
<h2>Infrastructure</h2>
125121
<div id="graph" />;
126122
</div>
127-
// <div id="graph" />;
128123
};
129124

130125
export default Inspect;

chronos_npm_package/server/output.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ size,path
22
"",Namespace: default
33
"",Namespace: default/Service: grafana/Pod: grafana-85d768d55b-jkr84
44
"",Namespace: default/Service: grafana
5-
"",Namespace: default/Service: frontend/Pod: nginx-frontend-55b44fbc7-45xp7
6-
"",Namespace: default/Service: frontend/Pod: nginx-frontend-55b44fbc7-5n2dh
5+
"",Namespace: default/Service: frontend/Pod: nginx-frontend-55b44fbc7-mzbp2
6+
"",Namespace: default/Service: frontend/Pod: nginx-frontend-55b44fbc7-vmxpm
77
"",Namespace: default/Service: frontend
8-
"",Namespace: default/Service: backend/Pod: node-backend-d597768c-z7mkw
8+
"",Namespace: default/Service: backend/Pod: node-backend-d597768c-944xr
99
"",Namespace: default/Service: backend
10-
"",Namespace: default/Service: prometheus-service/Pod: prometheus-deployment-96898bbc9-qg7tl
10+
"",Namespace: default/Service: prometheus-service/Pod: prometheus-deployment-96898bbc9-2jp9j
1111
"",Namespace: default/Service: prometheus-service

chronos_npm_package/server/server.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ app.get('/api/kuberData', kuberControllers.getResources, fileControllers.saveCSV
6060
});
6161

6262

63-
64-
65-
66-
67-
68-
69-
7063
app.use('*', (req, res) => {
7164
res.status(404).send('Not Found');
7265
});

0 commit comments

Comments
 (0)