Skip to content

Commit

Permalink
Merge pull request #48 from oslabs-beta/Issue#46
Browse files Browse the repository at this point in the history
Issue#46
  • Loading branch information
rbhastie authored Sep 16, 2022
2 parents 5925468 + 652bc73 commit a5a259b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/client/components/MetricsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const MetricsCard = ({
if (query) {
const { loading, data } = useQuery(query, { ...variables });
value = loading ? "Loading..." : keySearch(data, searchingFor);
if (value === undefined) value = "This metric is not available.";
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/RealTimeLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function RealTimeLineChart({
};
timeNow.current = new Date(variables.end);
refetch({ ...variables }).then((result) => {
if (loaded.current) {
if (loaded.current && typeof data[resource] !== "undefined") {
result.data[resource].forEach((series, index) => {
series[`${metric}`].forEach((point) => {
chart.data.datasets[index].data.push(point);
Expand Down
7 changes: 2 additions & 5 deletions src/client/pages/Topics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,8 @@ const Topics = () => {
elevation={8}
>
<MetricsCard
value={
topicCardQuery.loading
? "Loading..."
: topicCardQuery.data.cluster.underMinIsr.metric
}
query={TOPIC_PAGE_QUERY}
searchingFor="metric"
title="Total Under Min ISR"
description="Should be zero."
/>
Expand Down

0 comments on commit a5a259b

Please sign in to comment.