Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/unified-merge'
Browse files Browse the repository at this point in the history
2.0.0-cs release merge + security fixes
  • Loading branch information
sheldonabrown committed Sep 8, 2018
2 parents 4dd3137 + 0f31e8c commit 4470690
Show file tree
Hide file tree
Showing 491 changed files with 3,386 additions and 885 deletions.
Expand Up @@ -24,6 +24,11 @@ public class SimpleFeedVersionStrategy implements GtfsTransformStrategy {

private String _version;

@Override
public String getName() {
return this.getClass().getName();
}

@Override
public void run(TransformContext context, GtfsMutableRelationalDao dao) {
if (_version == null)
Expand Down
Expand Up @@ -25,6 +25,6 @@ public String getStatus() {
public void setStatus(String status) {
this.status = status;
}

/*to push Jenkins build*/

}
Expand Up @@ -49,6 +49,10 @@ public String getGoogleAdClientId() {
return _configurationService.getConfigurationValueAsString("display.googleAdsClientId", "");
}

public String getGoogleMapsApiKey() {
return _configurationService.getConfigurationValueAsString("display.googleMapsApiKey", "");
}

public String getAppHostName() {
return _configurationService.getConfigurationValueAsString(
"appHostname", null);
Expand Down
Expand Up @@ -120,6 +120,9 @@ public String getAppHostName() {
return _configurationService.getConfigurationValueAsString(
"appHostname", null);
}
public String getServiceAlertText() {
return _configurationService.getConfigurationValueAsString("display.serviceAlertText", "Service Alert");
}

public boolean isHttps() {
// force the use of https to remote servers
Expand Down
Expand Up @@ -86,14 +86,11 @@
namespace="/admin/vehiclestatus" /> <s:a href="%{url}">Vehicle Status Display Utility</s:a>
</li>
</s:if>

<s:if test="isPageAvailable('showVehicleStatusMap', 'org.onebusaway.webapp.actions.admin.vehiclestatusmap.VehicleStatusMapAction')">
<li><s:url var="url" action="vehicle-status-map"
namespace="/admin/vehiclestatusmap" /> <s:a href="%{url}">Vehicle Status Map</s:a>
</li>
<li><s:url var="url" action="api-key"
namespace="/admin/apikeymanagement" /> <s:a href="%{url}">Manage API Keys</s:a>
</li>

</s:if>
<s:if test="isPageAvailable('showUpdateConfig', 'org.onebusaway.webapp.actions.admin.DeployConfigAction')">
<li><s:url var="url" action="parameters" namespace="/admin" />
<s:a href="%{url}">Configuration Parameters Utility</s:a></li>
Expand Down
Expand Up @@ -62,6 +62,7 @@
<s:param name="v">3</s:param>
<s:param name="client"><s:property value="googleMapsClientId" /></s:param>
<s:param name="channel"><s:property value="googleMapsChannelId" /></s:param>
<s:param name="key"><s:property value="googleMapsApiKey" /></s:param>
<s:param name="sensor">false</s:param>
</s:url>
<script src="${url}" type="text/javascript"><!-- //prevent jspx minimization --></script>
Expand Down Expand Up @@ -205,11 +206,16 @@

</div>
<div class="container clear"><!-- jspx --></div>
<s:url var="url" value="/css/img/google_logo.png"></s:url>
<s:url var="url" value="/css/img/google_logo.png">
<s:param name="v">
<s:property value="frontEndVersion" />
</s:param>
</s:url>
<div id="google_translate_element">Google Translate <img id="icon" src="${url}" /></div>
</div>

<div id="map"><!-- //prevent jspx minimization --></div>
<div id="legend"><!-- //prevent jspx minimization --></div>

<div id="wizard">
<div id="wizard_start">
Expand Down
Expand Up @@ -58,12 +58,12 @@
<label class="top">Password:</label>
<s:password name="j_password"/>
</fieldset>

<!--
<fieldset>
<s:checkbox name="_spring_security_remember_me" value="true" label="Remember Me"/>
<label class="inline">Remember Me</label>
</fieldset>

-->
<s:hidden name="j_indexType" value="username"/>
<s:submit value="Login"/>
</s:form>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions onebusaway-admin-webapp/src/main/webapp/js/oba/api-key.js
Expand Up @@ -46,6 +46,7 @@ jQuery(function() {

jQuery("#newKey").click(function(e) {
e.preventDefault();
clearApiKeyFields();
handleGenerateApiKeyClick();
hideDelete();
hideSearch();
Expand Down
53 changes: 29 additions & 24 deletions onebusaway-admin-webapp/src/main/webapp/js/oba/map/Popups.js
Expand Up @@ -226,7 +226,9 @@ OBA.Popups = (function() {

var vehicleId = activity.MonitoredVehicleJourney.VehicleRef;
var vehicleIdParts = vehicleId.split("_");
var vehicleIdWithoutAgency = vehicleIdParts[1];
var blockId = activity.MonitoredVehicleJourney.BlockRef;
var vehicleIdWithoutAgency = vehicleIdParts[1];
var blockIdWithoutAgency = blockId.split("_")[1];
var routeName = activity.MonitoredVehicleJourney.LineRef;
var hasRealtime = activity.MonitoredVehicleJourney.Monitored;

Expand All @@ -241,8 +243,13 @@ OBA.Popups = (function() {
// header
html += '<div class="header vehicle">';
html += '<p class="title">' + activity.MonitoredVehicleJourney.PublishedLineName + " " + activity.MonitoredVehicleJourney.DestinationName + '</p><p>';
html += '<span class="type">Vehicle #' + vehicleIdWithoutAgency + '</span>';

//don't show block id if there is none or if config says no
if (OBA.Config.showBlockIdInVehiclePopup == false || typeof blockIdWithoutAgency === 'undefined' || blockIdWithoutAgency === null) {
html += '<span class="type">Vehicle #' + vehicleIdWithoutAgency + '</span>';
}
else {
html += '<span class="type">Vehicle #' + vehicleIdWithoutAgency + ' - ' + blockIdWithoutAgency + '</span>';
}
var updateTimestamp = OBA.Util.ISO8601StringToDate(activity.RecordedAtTime).getTime();
var updateTimestampReference = OBA.Util.ISO8601StringToDate(r.Siri.ServiceDelivery.ResponseTimestamp).getTime();

Expand All @@ -260,23 +267,8 @@ OBA.Popups = (function() {
html += '</p>';
html += '</div>';

//schedule adherence
var adherence = null;
if(hasRealtime && typeof activity.MonitoredVehicleJourney.MonitoredCall !== 'undefined'
&& typeof activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime !== 'undefined'
&& activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime !== null
&& typeof activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime !== 'undefined'
&& activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime !== null) {
var expectedArrivalDate = OBA.Util.ISO8601StringToDate(activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime);
var aimedArrivalDate = OBA.Util.ISO8601StringToDate(activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime);
var expectedArrivalDatetime = expectedArrivalDate.toTimeString();
var aimedArrivalDatetime = aimedArrivalDate.toTimeString();

var expectedArrivalTime = expectedArrivalDate.getTime();
var aimedArrivalTime = aimedArrivalDate.getTime();
var adherence = Math.round((expectedArrivalTime - aimedArrivalTime)/ (1000.0 * 60.0));
}
if (adherence !== null) {
var adherence = parseInt(activity.MonitoredVehicleJourney.MonitoredCall.Extensions.Deviation);
if (hasRealtime && adherence !== null) {
//late
if (adherence > 0) {
html += '<p class="adherence">Bus is ' + adherence + ' minute(s) late</p>';
Expand All @@ -290,8 +282,20 @@ OBA.Popups = (function() {
adherence = adherence * -1;
html += '<p class="adherence">Bus is ' + adherence + ' minute(s) early</p>';
}
html += '<p class="adherence">Scheduled arrival: ' + aimedArrivalDatetime + '</p>';
html += '<p class="adherence">Expected arrival: ' + expectedArrivalDatetime + '</p>';
//get the expected and aimed times
if(typeof activity.MonitoredVehicleJourney.MonitoredCall !== 'undefined'
&& typeof activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime !== 'undefined'
&& activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime !== null
&& typeof activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime !== 'undefined'
&& activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime !== null) {
var expectedArrivalDate = OBA.Util.ISO8601StringToDate(activity.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime);
var aimedArrivalDate = OBA.Util.ISO8601StringToDate(activity.MonitoredVehicleJourney.MonitoredCall.AimedArrivalTime);
var expectedArrivalDatetime = expectedArrivalDate.toLocaleTimeString();
var aimedArrivalDatetime = aimedArrivalDate.toLocaleTimeString();

html += '<p class="adherence">Scheduled arrival: ' + aimedArrivalDatetime + '</p>';
html += '<p class="adherence">Expected arrival: ' + expectedArrivalDatetime + '</p>';
}
}
else {
html += '<p class="adherence">Adherence data currently unavailable for this vehicle</p>';
Expand Down Expand Up @@ -350,13 +354,14 @@ OBA.Popups = (function() {

// service alerts
if (routeName in alertData) {
html += ' <a id="alert-link||' + routeName + '" class="alert-link" href="#">Service Alert for ' + activity.MonitoredVehicleJourney.PublishedLineName + '</a>';
html += ' <a id="alert-link||' + routeName + '" class="alert-link" href="#">' + OBA.Config.serviceAlertText + ' for ' + activity.MonitoredVehicleJourney.PublishedLineName + '</a>';
}

html += OBA.Config.infoBubbleFooterFunction('route', activity.MonitoredVehicleJourney.PublishedLineName);

html += "<ul class='links'>";
html += "<a href='#' id='zoomHere'>Center & Zoom Here</a>";
html += "<a href='#' id='zoomHere'>Center & Zoom Here</a><br/>";
html += "<a target='_new' href='" + OBA.Config.obaUrl +"/debug?vehicleId=" + vehicleId + "&key="+ OBA.Config.obaApiKey + "' id='debug'>Debug vehicle</a>";
html += "</ul>";

// (end popup)
Expand Down

0 comments on commit 4470690

Please sign in to comment.