In this episode, we focus on building out a detailed view for each endpoint in our app so that you can see every check or request that's been made against it. We start by creating a new controller and registering a dedicated route for this page. Then, we wire this up so when you click on an endpoint in your dashboard, it takes you to the expanded details page.
With the backend ready, we build a Vue component to represent the endpoint's page and hook up all the basics—like showing the endpoint's name (and full URL if you want), adding a back button to navigate to the right dashboard, and reusing the site selector UI. We move some logic around, making the list of sites available everywhere in the app, but also tweak it so users only see sites they own.
The centerpiece here is a table that lists all the checks made for the selected endpoint. We set things up so this table is populated from the data we get from our endpoint resource, paying special attention to eager-loading relationships in Laravel (though we'll properly optimize that in a later episode).
To keep the frontend clean, we make a new Check.vue
component for each row in the table. We add all the info you need—such as when the check happened, the status code, and whether the check was successful. For unsuccessful checks, we add a "View" button that will eventually launch a modal to inspect the response body, setting the stage for the next episode.
By the end of this episode, you'll have a page where you can browse every check made for each endpoint in your app, and easily navigate between them using the improved UI!