@@ -113,6 +113,8 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
113
113
const token = chartData . token ;
114
114
console . log ( 'token IS: ' , token ) ;
115
115
// plotting using plotly
116
+ // if (!isGrafana) {
117
+ // console.log("plotting plotly")
116
118
// chartsArray.push(
117
119
// <EventChart
118
120
// key={'E' + keymaker()}
@@ -122,16 +124,28 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
122
124
// colourGenerator={colourGenerator}
123
125
// />
124
126
// );
127
+ // } else {
128
+
125
129
// plotting using grafana
126
- console . log ( "I'm here " )
130
+ console . log ( "plotting grafana " )
127
131
grafanaChartsArray . push (
128
132
< GrafanaEventChart metricName = { metricName } token = { token } /> ) ;
133
+
134
+ // }
129
135
}
130
136
}
137
+ // if (isGrafana) {
131
138
console . log ( grafanaChartsArray )
132
139
setEventChartsArr ( grafanaChartsArray ) ;
133
140
setCurrChunk ( grafanaChartsArray . slice ( currIndex , currIndex + chunkSize ) ) ;
134
141
setCurrIndex ( currIndex + chunkSize ) ;
142
+ // }
143
+ // else {
144
+ // console.log(chartsArray)
145
+ // setEventChartsArr(chartsArray);
146
+ // setCurrChunk(chartsArray.slice(currIndex, currIndex + chunkSize));
147
+ // setCurrIndex(currIndex + chunkSize);
148
+ // }
135
149
} ;
136
150
137
151
@@ -145,7 +159,7 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
145
159
return (
146
160
147
161
< div >
148
- { /* <div id="gatherLiveData " onClick={() => { setIsGrafana(!isGrafana) }}>Gather Live Data </div> */ }
162
+ { /* <div id="grafana " onClick={() => { setIsGrafana(!isGrafana) }}>Grafana </div> */ }
149
163
{ service . includes ( 'kafkametrics' ) || service . includes ( 'kubernetesmetrics' ) ? currChunk : [ ] }
150
164
{ eventChartsArr . length > chunkSize && (
151
165
< >
0 commit comments