Skip to content

Commit 82af940

Browse files
committed
Finalized chart generation and page nav buttons.
1 parent a3297f3 commit 82af940

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/containers/EventContainer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
4141
setCurrChunk(nextChunk);
4242
setCurrIndex(currIndex + chunkSize);
4343
}
44-
4544
function prevChunk() {
4645
const prevChunk = eventChartsArr.slice(currIndex - 2 * chunkSize, currIndex - chunkSize);
4746
setCurrChunk(prevChunk);
@@ -55,7 +54,7 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
5554
It would be wonderful if a future iteration could manipulate the prometheus configuration in the kubernetes example to send its data
5655
to an instance of Grafana, and integrate Grafana's dashboard into Chronos to visualize the data.
5756
*/
58-
57+
5958
const filterSelectedEventMetricsandData = (eventDataObj: EventDataObject): EventDataObject => {
6059
const filteredEventData = {};
6160
// there's only one element in the selected metrics array for now...
@@ -100,6 +99,8 @@ const EventContainer: React.FC<EventContainerProps> = React.memo(props => {
10099
}
101100
}
102101
setEventChartsArr(chartsArray);
102+
setCurrChunk(chartsArray.slice(currIndex, currIndex + chunkSize));
103+
setCurrIndex(currIndex + chunkSize);
103104
};
104105

105106
// invoke the filter and generate functions to render charts

0 commit comments

Comments
 (0)