Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class AgencyMetadata {
public AgencyMetadata(String name, String url, String phone, String email, String timezone) {
this.name = name;
this.url = url;
this.phone = phone.isEmpty() ? "N/A" : phone;
this.email = email.isEmpty() ? "N/A" : email;
this.timezone = timezone.isEmpty() ? "N/A" : timezone;
this.phone = phone.isEmpty() ? "" : phone;
this.email = email.isEmpty() ? "" : email;
this.timezone = timezone.isEmpty() ? "" : timezone;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -431,16 +431,15 @@ private void loadFeedInfo(
var info = feedTable.getEntities().isEmpty() ? null : feedTable.getEntities().get(0);

feedInfo.put(
JsonReportFeedInfo.FEED_INFO_PUBLISHER_NAME,
info == null ? "N/A" : info.feedPublisherName());
JsonReportFeedInfo.FEED_INFO_PUBLISHER_NAME, info == null ? "" : info.feedPublisherName());
feedInfo.put(
JsonReportFeedInfo.FEED_INFO_PUBLISHER_URL, info == null ? "N/A" : info.feedPublisherUrl());
JsonReportFeedInfo.FEED_INFO_PUBLISHER_URL, info == null ? "" : info.feedPublisherUrl());
feedInfo.put(
JsonReportFeedInfo.FEED_INFO_FEED_CONTACT_EMAIL,
info == null ? "N/A" : info.feedContactEmail());
info == null ? "" : info.feedContactEmail());
feedInfo.put(
JsonReportFeedInfo.FEED_INFO_FEED_LANGUAGE,
info == null ? "N/A" : info.feedLang().getDisplayLanguage());
info == null ? "" : info.feedLang().getDisplayLanguage());
if (feedTable.hasColumn(GtfsFeedInfo.FEED_START_DATE_FIELD_NAME)) {
if (info != null) {
LocalDate localDate = info.feedStartDate().getLocalDate();
Expand All @@ -458,7 +457,7 @@ private void loadFeedInfo(
private String checkLocalDate(LocalDate localDate) {
String displayDate;
if (localDate.toString().equals(LocalDate.EPOCH.toString())) {
displayDate = "N/A";
displayDate = "";
} else {
displayDate = localDate.toString();
}
Expand Down Expand Up @@ -568,12 +567,12 @@ public void loadServiceWindow(
} finally {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM d, yyyy");
if ((earliestStartDate == null) && (latestEndDate == null)) {
feedInfo.put(JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, "N/A");
feedInfo.put(JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, "");
} else if (earliestStartDate == null && latestEndDate != null) {
feedInfo.put(JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, latestEndDate.format(formatter));
} else if (latestEndDate == null && earliestStartDate != null) {
if (earliestStartDate.isAfter(latestEndDate)) {
feedInfo.put(JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, "N/A");
feedInfo.put(JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, "");
} else {
feedInfo.put(
JsonReportFeedInfo.FEED_INFO_SERVICE_WINDOW, earliestStartDate.format(formatter));
Expand Down
4 changes: 2 additions & 2 deletions main/src/main/resources/report.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ <h4>Feed Info</h4>
<div th:with="isNotServiceWindow=${info.key != 'Service Window Start' and info.key != 'Service Window End'}">
<dd th:if="${isNotServiceWindow}" th:text="${info.key} + ':'" />
<dt th:if="${isNotServiceWindow}">
<span th:if="${info.key.contains('URL') and info.value != 'N/A'}">
<span th:if="${info.key.contains('URL') and not info.value.isEmpty()}">
<a th:href="${info.value}" target="_blank" th:text="${info.value}" />
</span>
<span th:if="${info.key.contains('URL') and info.value == 'N/A'}" th:text="${info.value}"></span>
<span th:if="${info.value.isEmpty()}">N/A</span>
<span th:unless="${info.key.contains('URL')}" th:text="${info.value}"/>
<span th:if="${info.key == 'Service Window'}" >
<a href="#" class="tooltip" onclick="event.preventDefault();"><span>(?)</span>
Expand Down
Loading