Skip to content

Commit b1ac7e4

Browse files
committed
switch between plotly and grafana not working
1 parent 6fa838d commit b1ac7e4

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

app/containers/EventContainer.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
113113
const token = chartData.token;
114114
console.log('token IS: ', token);
115115
// plotting using plotly
116+
// if (!isGrafana) {
117+
// console.log("plotting plotly")
116118
// chartsArray.push(
117119
// <EventChart
118120
// key={'E' + keymaker()}
@@ -122,16 +124,28 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
122124
// colourGenerator={colourGenerator}
123125
// />
124126
// );
127+
// } else {
128+
125129
// plotting using grafana
126-
console.log("I'm here")
130+
console.log("plotting grafana")
127131
grafanaChartsArray.push(
128132
<GrafanaEventChart metricName={metricName} token={token} />);
133+
134+
// }
129135
}
130136
}
137+
// if (isGrafana) {
131138
console.log(grafanaChartsArray)
132139
setEventChartsArr(grafanaChartsArray);
133140
setCurrChunk(grafanaChartsArray.slice(currIndex, currIndex + chunkSize));
134141
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+
// }
135149
};
136150

137151

@@ -145,7 +159,7 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
145159
return (
146160

147161
<div>
148-
{/* <div id="gatherLiveData" onClick={() => { setIsGrafana(!isGrafana) }}>Gather Live Data</div> */}
162+
{/* <div id="grafana" onClick={() => { setIsGrafana(!isGrafana) }}>Grafana</div> */}
149163
{service.includes('kafkametrics') || service.includes('kubernetesmetrics') ? currChunk : []}
150164
{eventChartsArr.length > chunkSize && (
151165
<>

0 commit comments

Comments
 (0)