Skip to content

Commit 8732cd6

Browse files
committed
Changed initial page route
When the app card is clicked the user is now routed to the metrics page If requests from the client have come through the communications tab may be empty. Metrics tab will always be full if the user is successfully collecting server data
1 parent f883fcd commit 8732cd6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

app/components/ApplicationsCard/EventHandlers.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,25 @@ interface EventHandlersProps {
1212

1313
export const getEventHandlers = ({ application, setModal }: EventHandlersProps) => {
1414
const { deleteApp, user } = useContext(DashboardContext);
15-
const { setAppIndex, setApp, setServicesData, app, example, connectToDB, setChart } =
16-
useContext(ApplicationContext);
15+
const { setAppIndex, setApp, setServicesData, app, example, connectToDB, setChart } = useContext(ApplicationContext);
1716
const navigate = useNavigate();
1817

1918
const handleClick = (selectedApp: string, selectedService: string, i: number) => {
20-
const services = ['auth', 'client', 'event-bus', 'items', 'inventory', 'orders'];
19+
// const services = ['auth', 'client', 'event-bus', 'items', 'inventory', 'orders'];
20+
const services = [ 'client', 'items','event-bus'];
21+
2122
setAppIndex(i);
2223
setApp(selectedApp);
2324
if (['AWS', 'AWS/EC2', 'AWS/ECS', 'AWS/EKS'].includes(selectedService)) {
2425
navigate(`/aws/:${app}`, { state: { typeOfService: selectedService } });
25-
} else if (example) {
26+
}
27+
else if (example) {
2628
setServicesData([]);
27-
setChart('communications');
29+
setChart('all');
2830
connectToDB(user, i, app, application[2], application[1]);
2931
navigate(`/applications/example/${services.join(' ')}`);
30-
} else {
32+
}
33+
else {
3134
setServicesData([]);
3235
setModal({ isOpen: true, type: 'serviceModal' });
3336
}

0 commit comments

Comments
 (0)