We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38e4137 commit cff5d70Copy full SHA for cff5d70
app/charts/GrafanaEventChart.tsx
@@ -38,9 +38,15 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
38
console.log("uid: ", uid)
39
console.log("parsedName: ", parsedName)
40
41
- const handleSelectionChange = (event) => {
+ const handleSelectionChange = async (event) => {
42
setGraphType(event.target.value);
43
- fetch('http://localhost:1111/random')
+ await fetch('http://localhost:1111/api/updateDashboard', {
44
+ headers: {
45
+ 'Content-Type': 'application/json',
46
+ },
47
+ body: JSON.stringify({ graphType: event.target.value, metric: metricName })
48
+ })
49
+
50
}
51
52
return (
0 commit comments