Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring dashboard #60

Open
wants to merge 13 commits into
base: monitoring-dashboard
Choose a base branch
from

Conversation

psankhe28
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Sep 5, 2023

@psankhe28 is attempting to deploy a commit to the UCI Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@geeky-abhishek geeky-abhishek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I can see a lot of code is repeated multiple times ,try to move them to some util to reduce the line of code and reuse the created logic

@@ -101,6 +111,126 @@ function App() {
</RequireAuth>
}
/>
<Route
path="/monitoring"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use some config array and iterate through each element to reduce the line of code

const res = JSON.parse(response.data.result);
setBroadcastTransformerData(res["Broadcast Transformer".trim()] || {});
} catch (error) {
console.error("Error toggling:", error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toastify the error instead of console.log

};

useEffect(() => {
func();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever the value of date changes, the function is being called so it is present in use effect

setSelectedChart(value);
setDropdownLabel(label);
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not good either use some function to get the final value or use memorised value

src/pages/monitoring/inbound/index.tsx Show resolved Hide resolved
src/pages/monitoring/inbound/index.tsx Show resolved Hide resolved
src/pages/monitoring/inbound/index.tsx Show resolved Hide resolved
src/pages/monitoring/inbound/index.tsx Show resolved Hide resolved
src/pages/monitoring/logs/inbound/index.tsx Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants