@@ -74,6 +74,8 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
74
74
< option value = "gauge" > Gauge</ option >
75
75
< option value = "table" > Table</ option >
76
76
< option value = "histogram" > Histogram</ option >
77
+ < option value = "piechart" > Pie Chart</ option >
78
+ < option value = "alertlist" > Alert</ option >
77
79
</ select >
78
80
79
81
< label htmlFor = "graphType" style = { {
@@ -99,7 +101,9 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
99
101
graphType === "gauge" ? Gauge ( uid , parsedName , graphType , timeFrame ) :
100
102
graphType === "table" ? Table ( uid , parsedName , graphType , timeFrame ) :
101
103
graphType === "histogram" ? Histogram ( uid , parsedName , graphType , timeFrame ) :
102
- null }
104
+ graphType === "piechart" ? PieChart ( uid , parsedName , graphType , timeFrame ) :
105
+ graphType === "alertlist" ? AlertList ( uid , parsedName , graphType , timeFrame ) :
106
+ null }
103
107
104
108
</ div >
105
109
) ;
@@ -131,4 +135,12 @@ const Table = (uid, parsedName, graphType, timeFrame) => {
131
135
const Histogram = ( uid , parsedName , graphType , timeFrame ) => {
132
136
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 >
133
137
}
138
+
139
+ const PieChart = ( uid , parsedName , graphType , timeFrame ) => {
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
+ }
142
+
143
+ const AlertList = ( uid , parsedName , graphType , timeFrame ) => {
144
+ 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 >
145
+ }
134
146
export default GrafanaEventChart ;
0 commit comments