@@ -74,6 +74,8 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
7474 < option value = "gauge" > Gauge</ option >
7575 < option value = "table" > Table</ option >
7676 < option value = "histogram" > Histogram</ option >
77+ < option value = "piechart" > Pie Chart</ option >
78+ < option value = "alertlist" > Alert</ option >
7779 </ select >
7880
7981 < label htmlFor = "graphType" style = { {
@@ -99,7 +101,9 @@ const GrafanaEventChart: React.FC<EventChartProps> = React.memo(props => {
99101 graphType === "gauge" ? Gauge ( uid , parsedName , graphType , timeFrame ) :
100102 graphType === "table" ? Table ( uid , parsedName , graphType , timeFrame ) :
101103 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 }
103107
104108 </ div >
105109 ) ;
@@ -131,4 +135,12 @@ const Table = (uid, parsedName, graphType, timeFrame) => {
131135const Histogram = ( uid , parsedName , graphType , timeFrame ) => {
132136 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 >
133137}
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+ }
134146export default GrafanaEventChart ;
0 commit comments