-
Notifications
You must be signed in to change notification settings - Fork 1
Add Dashboard page as first per-agency sidebar entry #44
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
transitclockWebapp/src/main/resources/org/transitclock/i18n/text.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
transitclockWebapp/src/main/webapp/WEB-INF/tags/activeBlocksSummary.tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <%@ tag pageEncoding="UTF-8" %> | ||
| <%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> | ||
| <%-- The five-stat strip shown on /status/activeBlocks.jsp and /dashboard. | ||
| Both pages mount the active-blocks Stimulus controller; the data-field | ||
| names here are the controller's #renderSummary contract. Keep that | ||
| contract here in one place so callers can't drift. --%> | ||
| <div data-active-blocks-target="summary" | ||
| class="flex items-stretch bg-white border border-gray-200 rounded-lg overflow-hidden shadow-[0_1px_2px_rgba(0,0,0,0.03)]"> | ||
| <div class="flex-1 min-w-0 px-4 py-3 border-r border-gray-200"> | ||
| <div class="text-[11px] font-semibold uppercase tracking-wider text-gray-500"><fmt:message key="div.blocks"/></div> | ||
| <div class="flex items-baseline gap-1.5 mt-0.5"> | ||
| <span data-field="total-blocks" class="text-[22px] font-bold tabular-nums text-gray-900">—</span> | ||
| <span class="text-xs text-gray-500 font-medium">total</span> | ||
| </div> | ||
| </div> | ||
| <div class="flex-1 min-w-0 px-4 py-3 border-r border-gray-200"> | ||
| <div class="text-[11px] font-semibold uppercase tracking-wider text-gray-500"><fmt:message key="div.assigned"/></div> | ||
| <div class="flex items-baseline gap-1.5 mt-0.5"> | ||
| <span data-field="percent-assigned" class="text-[22px] font-bold tabular-nums text-brand-accent">—</span> | ||
| <span data-field="assigned-detail" class="text-xs text-gray-500 font-medium tabular-nums"></span> | ||
| </div> | ||
| </div> | ||
| <div class="flex-1 min-w-0 px-4 py-3 border-r border-gray-200"> | ||
| <div class="text-[11px] font-semibold uppercase tracking-wider text-gray-500"><fmt:message key="div.contime"/></div> | ||
| <div class="flex items-baseline gap-1.5 mt-0.5"> | ||
| <span data-field="percent-on-time" class="text-[22px] font-bold tabular-nums text-status-on-time-ink">—</span> | ||
| <span data-field="on-time-count" class="text-xs text-gray-500 font-medium tabular-nums"></span> | ||
| </div> | ||
| </div> | ||
| <div class="flex-1 min-w-0 px-4 py-3 border-r border-gray-200"> | ||
| <div class="text-[11px] font-semibold uppercase tracking-wider text-gray-500"><fmt:message key="div.clate"/></div> | ||
| <div class="flex items-baseline gap-1.5 mt-0.5"> | ||
| <span data-field="percent-late" class="text-[22px] font-bold tabular-nums text-status-late">—</span> | ||
| <span data-field="late-count" class="text-xs text-gray-500 font-medium tabular-nums"></span> | ||
| </div> | ||
| </div> | ||
| <div class="flex-1 min-w-0 px-4 py-3"> | ||
| <div class="text-[11px] font-semibold uppercase tracking-wider text-gray-500"><fmt:message key="div.cearly"/></div> | ||
| <div class="flex items-baseline gap-1.5 mt-0.5"> | ||
| <span data-field="percent-early" class="text-[22px] font-bold tabular-nums text-status-early">—</span> | ||
| <span data-field="early-count" class="text-xs text-gray-500 font-medium tabular-nums"></span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
transitclockWebapp/src/main/webapp/WEB-INF/tags/serverStatusGrid.tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <%@ tag pageEncoding="UTF-8" %> | ||
| <%@ taglib prefix="c" uri="jakarta.tags.core" %> | ||
| <%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %> | ||
| <%@ attribute name="monitorResults" required="false" type="java.util.List" %> | ||
| <%@ attribute name="error" required="false" %> | ||
| <c:choose> | ||
| <c:when test="${not empty error}"> | ||
| <div class="rounded-lg border border-red-200 bg-red-50 p-4"> | ||
| <h3 class="text-sm font-semibold text-red-900"><fmt:message key="div.coreUnreachable"/></h3> | ||
| <p class="mt-1 text-sm text-red-800 font-mono break-all"><c:out value="${error}"/></p> | ||
| </div> | ||
| </c:when> | ||
| <c:otherwise> | ||
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||
| <c:forEach var="monitorResult" items="${monitorResults}"> | ||
| <c:if test="${not empty monitorResult.message}"> | ||
| <article class="bg-white border border-gray-200 rounded-lg p-4"> | ||
| <h3 class="text-xs font-semibold uppercase tracking-wider text-gray-500"> | ||
| <c:out value="${monitorResult.type}"/> | ||
| </h3> | ||
| <c:choose> | ||
| <c:when test="${not empty monitorResult.stats}"> | ||
| <dl class="mt-3 grid grid-cols-2 gap-x-4 gap-y-1.5 text-sm"> | ||
| <c:forEach var="stat" items="${monitorResult.stats}"> | ||
| <div class="flex items-baseline gap-1.5 col-span-2 sm:col-span-1"> | ||
| <dt class="text-gray-500"><c:out value="${stat.key}"/>:</dt> | ||
| <dd class="font-mono text-gray-900"><c:out value="${stat.value}"/></dd> | ||
| </div> | ||
| </c:forEach> | ||
| </dl> | ||
| </c:when> | ||
| <c:otherwise> | ||
| <p class="mt-2 text-sm text-gray-900 leading-relaxed tabular-nums"> | ||
| <c:out value="${monitorResult.message}"/> | ||
| </p> | ||
| </c:otherwise> | ||
| </c:choose> | ||
| </article> | ||
| </c:if> | ||
| </c:forEach> | ||
| </div> | ||
| </c:otherwise> | ||
| </c:choose> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Localize the remaining hard-coded label.
totalis the only visible label in this shared component that is still English, so Polish and future locales will render it inconsistently.Suggested fix
Add the matching
div.totalentry to the locale bundles as well.📝 Committable suggestion
🤖 Prompt for AI Agents