Skip to content

Commit 128f96a

Browse files
committed
fix bugs
1 parent 1077d1f commit 128f96a

File tree

1 file changed

+7
-29
lines changed

1 file changed

+7
-29
lines changed

app/charts/GrafanaEventChart.tsx

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
3737
console.log("uid: ", uid)
3838
console.log("parsedName: ", parsedName)
3939

40-
// make request to update dashboard
4140
const handleSelectionChange = async (event) => {
4241
setType([...type, graphType]);
4342
await fetch('http://localhost:1111/api/updateDashboard', {
@@ -108,51 +107,30 @@ const TimeSeries = (uid, parsedName, graphType, timeFrame) => {
108107
}
109108

110109
const BarChart = (uid, parsedName, graphType, timeFrame) => {
111-
<>
112-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
113-
<hr />
114-
</>
110+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
115111
}
116112

117113
const Stat = (uid, parsedName, graphType, timeFrame) => {
118-
<>
119-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
120-
<hr />
121-
</>
114+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
122115
}
123116

124117
const Gauge = (uid, parsedName, graphType, timeFrame) => {
125-
<>
126-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
127-
<hr />
128-
</>
118+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
129119
}
130120

131121
const Table = (uid, parsedName, graphType, timeFrame) => {
132-
<>
133-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
134-
<hr />
135-
</>
122+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
136123
}
137124

138125
const Histogram = (uid, parsedName, graphType, timeFrame) => {
139-
<>
140-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
141-
<hr />
142-
</>
126+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
143127
}
144128

145129
const PieChart = (uid, parsedName, graphType, timeFrame) => {
146-
<>
147-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
148-
<hr />
149-
</>
130+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
150131
}
151132

152133
const AlertList = (uid, parsedName, graphType, timeFrame) => {
153-
<>
154-
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
155-
<hr />
156-
</>
134+
return <iframe src={`http://localhost:32000/d-solo/${uid}/${parsedName}?orgId=1&refresh=10s&from=now-${timeFrame}&to=now&panelId=1${graphType}`} width="800" height="500" ></iframe>
157135
}
158136
export default GrafanaEventChart;

0 commit comments

Comments
 (0)