Skip to content

Commit 5ac88a4

Browse files
Merge pull request #48 from OneBusAway/api-calls
Adapt API calls page to mimic the 3-column reports layout
2 parents b97ef78 + e27abec commit 5ac88a4

32 files changed

Lines changed: 258 additions & 218 deletions
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<%@ tag pageEncoding="UTF-8" %>
2+
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
3+
<%@ attribute name="title" required="false" %>
4+
<%@ attribute name="head" fragment="true" required="false" %>
5+
<%-- API call sub-pages use this so the API Calls sidebar stays visible
6+
when drilling into a specific call, mirroring how reports/* pages
7+
keep the Reports sidebar visible. The p-8 wrapper restores the
8+
padding that t:layout gives by default and that t:splitLayout
9+
(which is bare) does not. --%>
10+
<t:splitLayout title="${title}">
11+
<jsp:attribute name="head"><jsp:invoke fragment="head"/></jsp:attribute>
12+
<jsp:attribute name="sidebar"><t:apiCallsSidebar/></jsp:attribute>
13+
<jsp:body><div class="p-8"><jsp:doBody/></div></jsp:body>
14+
</t:splitLayout>
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<%@ tag pageEncoding="UTF-8" %>
2+
<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %>
3+
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
4+
<t:secondarySidebar title="API Calls">
5+
<div>
6+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Routes</h3>
7+
<ul class="space-y-0.5">
8+
<t:secondarySidebarLink path="/reports/apiCalls/routeApiParams.jsp" title="Summary data for all routes, listed in order. Useful for creating a UI selector for routes."><fmt:message key="div.rou"/></t:secondarySidebarLink>
9+
<t:secondarySidebarLink path="/reports/apiCalls/routeDetailsApiParams.jsp" title="Detailed data for selected routes. Includes stop and path information needed to show route on map."><fmt:message key="div.roude"/></t:secondarySidebarLink>
10+
</ul>
11+
</div>
12+
<div>
13+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Vehicles</h3>
14+
<ul class="space-y-0.5">
15+
<t:secondarySidebarLink path="/reports/apiCalls/vehiclesApiParams.jsp" title="Data for vehicles, including GPS info, for a route. Useful for showing location of vehicles on map."><fmt:message key="div.veh"/></t:secondarySidebarLink>
16+
<t:secondarySidebarLink path="/reports/apiCalls/vehiclesDetailsApiParams.jsp" title="Detailed data for vehicles, including GPS info, for a route. Contains additional data such as schedule adherence and assignment information."><fmt:message key="div.vd"/></t:secondarySidebarLink>
17+
<t:secondarySidebarLink path="/reports/apiCalls/vehicleConfigsApiParams.jsp" title="Configuration data for vehicles. A way of getting list of vehicles configured for agency."><fmt:message key="div.vc"/></t:secondarySidebarLink>
18+
</ul>
19+
</div>
20+
<div>
21+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Predictions</h3>
22+
<ul class="space-y-0.5">
23+
<t:secondarySidebarLink path="/reports/apiCalls/predsByRouteStopApiParams.jsp" title="Predictions for specified route and stop."><fmt:message key="div.pbrs"/></t:secondarySidebarLink>
24+
<t:secondarySidebarLink path="/reports/apiCalls/predsByLocApiParams.jsp" title="Predictions for stops near specified latitude, longitude for the agency."><fmt:message key="div.pbl"/></t:secondarySidebarLink>
25+
</ul>
26+
</div>
27+
<div>
28+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Trips &amp; Blocks</h3>
29+
<ul class="space-y-0.5">
30+
<t:secondarySidebarLink path="/reports/apiCalls/tripApiParams.jsp" title="Data for a single trip. Includes trip pattern and schedule info."><fmt:message key="div.dtrip"/></t:secondarySidebarLink>
31+
<t:secondarySidebarLink path="/reports/apiCalls/tripWithTravelTimesApiParams.jsp" title="Data for a single trip. Includes trip pattern and schedule info as well as historic travel times used for generating predictions."><fmt:message key="div.twtt"/></t:secondarySidebarLink>
32+
<t:secondarySidebarLink path="/reports/apiCalls/blocksTerseApiParams.jsp" title="Data for a block assignment. Shows each trip that makes up the block in a terse format, without trip pattern or schedule info."><fmt:message key="div.dblock"/></t:secondarySidebarLink>
33+
<t:secondarySidebarLink path="/reports/apiCalls/blocksApiParams.jsp" title="Data for a block assignment. Shows each trip that makes up the block in a verbose format, including trip pattern and schedule info."><fmt:message key="div.bd"/></t:secondarySidebarLink>
34+
</ul>
35+
</div>
36+
<div>
37+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Service IDs</h3>
38+
<ul class="space-y-0.5">
39+
<t:secondarySidebarLink path="/reports/apiCalls/serviceIdsApiParams.jsp" title="Data for all service IDs configured for agency."><fmt:message key="div.si"/></t:secondarySidebarLink>
40+
<t:secondarySidebarLink path="/reports/apiCalls/serviceIdsCurrentApiParams.jsp" title="Data for service IDs that are currently active for agency."><fmt:message key="div.sic"/></t:secondarySidebarLink>
41+
</ul>
42+
</div>
43+
<div>
44+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Calendars</h3>
45+
<ul class="space-y-0.5">
46+
<t:secondarySidebarLink path="/reports/apiCalls/calendarsApiParams.jsp" title="Data for all calendars configured for agency.">Calendars</t:secondarySidebarLink>
47+
<t:secondarySidebarLink path="/reports/apiCalls/calendarsCurrentApiParams.jsp" title="Data for calendars that are currently active for agency.">Calendars Current</t:secondarySidebarLink>
48+
</ul>
49+
</div>
50+
<div>
51+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">GTFS-realtime</h3>
52+
<ul class="space-y-0.5">
53+
<t:secondarySidebarLink path="/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp" title="GTFS-realtime Trip Updates includes prediction data for entire agency"><fmt:message key="div.grtu"/></t:secondarySidebarLink>
54+
<t:secondarySidebarLink path="/reports/apiCalls/gtfsRealtimeVehiclePositionsApiParams.jsp" title="GTFS-realtime Vehicle Positions for entire agency"><fmt:message key="div.grvp"/></t:secondarySidebarLink>
55+
</ul>
56+
</div>
57+
<div>
58+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">SIRI</h3>
59+
<ul class="space-y-0.5">
60+
<t:secondarySidebarLink path="/reports/apiCalls/siriVehicleMonitoringApiParams.jsp" title="SIRI Vehicle Monitoring for specified route or entire agency"><fmt:message key="div.svm"/></t:secondarySidebarLink>
61+
<t:secondarySidebarLink path="/reports/apiCalls/siriStopMonitoringApiParams.jsp" title="SIRI Stop Monitoring for specified route and stop"><fmt:message key="div.ssm"/></t:secondarySidebarLink>
62+
</ul>
63+
</div>
64+
<div>
65+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Schedules</h3>
66+
<ul class="space-y-0.5">
67+
<t:secondarySidebarLink path="/reports/apiCalls/horizStopsScheduleApiParams.jsp" title="Schedule for route. For displaying schedule with stops listed in horizontal direction"><fmt:message key="div.sfrsh"/></t:secondarySidebarLink>
68+
<t:secondarySidebarLink path="/reports/apiCalls/vertStopsScheduleApiParams.jsp" title="Schedule for route. For displaying schedule with stops listed in vertical direction"><fmt:message key="div.sfrsv"/></t:secondarySidebarLink>
69+
</ul>
70+
</div>
71+
<div>
72+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider">Commands</h3>
73+
<ul class="space-y-0.5">
74+
<t:secondarySidebarLink path="/reports/apiCalls/resetVehicleApiParams.jsp" title="Reset specific vehicle"><fmt:message key="div.rv"/></t:secondarySidebarLink>
75+
</ul>
76+
</div>
77+
<div>
78+
<h3 class="px-2 mb-1 text-xs font-semibold text-gray-500 uppercase tracking-wider"><fmt:message key="div.nas"/></h3>
79+
<ul class="space-y-0.5">
80+
<t:secondarySidebarLink path="/reports/apiCalls/agenciesApiParams.jsp" title="List of all agencies available through the API" omitAgency="true"><fmt:message key="div.agencies"/></t:secondarySidebarLink>
81+
<t:secondarySidebarLink path="/reports/apiCalls/predsByLocForAllAgenciesApiParams.jsp" title="Predictions for stops near specified latitude, longitude. Will return predictions for all agencies that have nearby stops."><fmt:message key="div.pbl"/></t:secondarySidebarLink>
82+
</ul>
83+
</div>
84+
</t:secondarySidebar>
Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
11
<%@ tag pageEncoding="UTF-8" %>
2-
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
3-
<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %>
4-
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
2+
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
53
<%@ attribute name="title" required="false" %>
64
<%@ attribute name="head" fragment="true" required="false" %>
7-
<%-- bare="true" so the inner sidebar+content flex container can fill
8-
the main pane itself; the default p-8 wrapper would double-pad. --%>
9-
<t:layout title="${title}" bare="true">
10-
<jsp:attribute name="head">
11-
<jsp:invoke fragment="head"/>
12-
</jsp:attribute>
13-
<jsp:body>
14-
<div class="flex h-full">
15-
<t:reportsSidebar/>
16-
<div class="flex-1 overflow-y-auto">
17-
<jsp:doBody/>
18-
</div>
19-
</div>
20-
</jsp:body>
21-
</t:layout>
5+
<t:splitLayout title="${title}">
6+
<jsp:attribute name="head"><jsp:invoke fragment="head"/></jsp:attribute>
7+
<jsp:attribute name="sidebar"><t:reportsSidebar/></jsp:attribute>
8+
<jsp:body><jsp:doBody/></jsp:body>
9+
</t:splitLayout>

0 commit comments

Comments
 (0)