From 1ea2f3eaf94ee31b544b6381aece0735b543f192 Mon Sep 17 00:00:00 2001 From: Grzegorz Patynek Date: Wed, 7 Oct 2020 17:38:59 +0200 Subject: [PATCH 1/3] polish and credentials --- transitclockWebapp/pom.xml | 5 + .../org/transitclock/i18n/text.properties | 237 ++++++++++++ .../org/transitclock/i18n/text_pl.properties | 236 ++++++++++++ .../transitclock/i18n/text_pl.properties.bak | 236 ++++++++++++ .../src/main/webapp/WEB-INF/web.xml | 15 +- .../src/main/webapp/css/general.css | 4 +- .../src/main/webapp/extensions/index.jsp | 18 +- .../src/main/webapp/holding/css/general.css | 2 +- .../src/main/webapp/maps/css/mapUi.css | 2 +- .../src/main/webapp/maps/css/mbtaMapUi.css | 2 +- .../src/main/webapp/maps/heatmap.jsp | 84 ++--- .../src/main/webapp/maps/index.jsp | 24 +- .../src/main/webapp/maps/map.jsp | 340 +++++++++-------- .../src/main/webapp/maps/schAdhMap.jsp | 114 +++--- .../src/main/webapp/maps/smartphoneMap.html | 210 +++++++++++ .../src/main/webapp/maps/smartphoneMap.jsp | 54 +-- .../reports/apiCalls/agenciesApiParams.jsp | 25 +- .../reports/apiCalls/blocksApiParams.jsp | 29 +- .../reports/apiCalls/blocksTerseApiParams.jsp | 27 +- .../gtfsRealtimeTripUpdatesApiParams.jsp | 33 +- .../gtfsRealtimeVehiclePositionsApiParams.jsp | 33 +- .../apiCalls/horizStopsScheduleApiParams.jsp | 31 +- .../main/webapp/reports/apiCalls/index.jsp | 65 ++-- .../reports/apiCalls/predsByLocApiParams.jsp | 43 +-- .../predsByLocForAllAgenciesApiParams.jsp | 45 +-- .../apiCalls/predsByRouteStopApiParams.jsp | 39 +- .../apiCalls/resetVehicleApiParams.jsp | 15 +- .../reports/apiCalls/routeApiParams.jsp | 26 +- .../apiCalls/routeDetailsApiParams.jsp | 28 +- .../reports/apiCalls/serviceIdsApiParams.jsp | 24 +- .../apiCalls/serviceIdsCurrentApiParams.jsp | 24 +- .../apiCalls/siriStopMonitoringApiParams.jsp | 40 +- .../siriVehicleMonitoringApiParams.jsp | 26 +- .../webapp/reports/apiCalls/tripApiParams.jsp | 32 +- .../apiCalls/tripWithTravelTimesApiParams.jsp | 32 +- .../apiCalls/vehicleConfigsApiParams.jsp | 24 +- .../reports/apiCalls/vehiclesApiParams.jsp | 28 +- .../apiCalls/vehiclesDetailsApiParams.jsp | 26 +- .../apiCalls/vertStopsScheduleApiParams.jsp | 26 +- .../src/main/webapp/reports/avlJsonData.jsp | 4 +- .../src/main/webapp/reports/avlMap.jsp | 347 ++++++++++++++---- .../webapp/reports/avlMapByRouteParams.jsp | 22 +- .../webapp/reports/avlMapByVehicleParams.jsp | 26 +- .../src/main/webapp/reports/index.jsp | 109 +++--- .../main/webapp/reports/lastAvlJsonData.jsp | 34 +- .../src/main/webapp/reports/lastAvlReport.jsp | 22 +- .../src/main/webapp/reports/params/block.jsp | 27 +- .../main/webapp/reports/params/boolean.jsp | 20 +- .../reports/params/fromDateNumDaysTime.jsp | 64 ++-- .../webapp/reports/params/fromToDateTime.jsp | 95 +++-- .../webapp/reports/params/reportParams.css | 2 +- .../reports/params/routeAllOrSingle.jsp | 34 +- .../webapp/reports/params/routeMultiple.jsp | 30 +- .../webapp/reports/params/routeOptional.jsp | 29 +- .../webapp/reports/params/routeSingle.jsp | 32 +- .../webapp/reports/params/submitApiCall.jsp | 8 +- .../webapp/reports/params/submitReport.jsp | 8 +- .../main/webapp/reports/params/vehicle.jsp | 60 +-- .../webapp/reports/params/vehicleSingle.jsp | 53 +-- .../main/webapp/reports/predAccuracyCsv.jsp | 77 ++-- .../webapp/reports/predAccuracyCsvParams.jsp | 22 +- .../reports/predAccuracyIntervalsChart.jsp | 71 ++-- .../reports/predAccuracyIntervalsParams.jsp | 106 +++--- .../webapp/reports/predAccuracyRangeChart.jsp | 87 ++--- .../reports/predAccuracyRangeParams.jsp | 77 ++-- .../reports/predAccuracyScatterChart.jsp | 5 +- .../reports/predAccuracyScatterData.jsp | 192 +++++----- .../reports/predAccuracyScatterParams.jsp | 65 ++-- .../webapp/reports/schAdhByRouteChart.jsp | 130 +++---- .../main/webapp/reports/schAdhByRouteData.jsp | 18 +- .../webapp/reports/schAdhByRouteParams.jsp | 39 +- .../main/webapp/reports/schAdhByStopChart.jsp | 15 +- .../main/webapp/reports/schAdhByStopData.jsp | 48 +-- .../webapp/reports/schAdhByStopParams.jsp | 38 +- .../main/webapp/reports/schAdhByTimeChart.jsp | 15 +- .../main/webapp/reports/schAdhByTimeData.jsp | 26 +- .../webapp/reports/schAdhByTimeParams.jsp | 38 +- .../reports/scheduleHorizStopsParams.jsp | 24 +- .../reports/scheduleHorizStopsReport.jsp | 42 +-- .../reports/scheduleVertStopsParams.jsp | 24 +- .../reports/scheduleVertStopsReport.jsp | 44 +-- .../src/main/webapp/smartphone/index.html | 4 +- .../src/main/webapp/status/activeBlocks.jsp | 259 ++++--------- .../src/main/webapp/status/dbDiskSpace.jsp | 100 ++--- .../src/main/webapp/status/index.jsp | 20 +- .../src/main/webapp/status/serverStatus.jsp | 20 +- .../src/main/webapp/template/header.jsp | 2 +- .../src/main/webapp/template/includes.jsp | 15 +- .../src/main/webapp/tracker/index.jsp | 8 +- .../src/main/webapp/welcome/index.jsp | 31 +- 90 files changed, 3012 insertions(+), 1980 deletions(-) create mode 100644 transitclockWebapp/src/main/resources/org/transitclock/i18n/text.properties create mode 100644 transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties create mode 100644 transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties.bak create mode 100644 transitclockWebapp/src/main/webapp/maps/smartphoneMap.html diff --git a/transitclockWebapp/pom.xml b/transitclockWebapp/pom.xml index 2d01c05c9..4e02afffd 100644 --- a/transitclockWebapp/pom.xml +++ b/transitclockWebapp/pom.xml @@ -40,6 +40,11 @@ transitclockCore 2.0.0-SNAPSHOT + + org.glassfish.web + javax.servlet.jsp.jstl + 1.2.4 + diff --git a/transitclockWebapp/src/main/resources/org/transitclock/i18n/text.properties b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text.properties new file mode 100644 index 000000000..a420454be --- /dev/null +++ b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text.properties @@ -0,0 +1,237 @@ +hello.label.welcome = Welcome +div.agencies = Agencies +div.maps = Maps +div.reports = Reports +div.api = Api +div.status = Status +div.extensions = Extensions +div.apicalls = Api calls +div.apicallsfor = API Calls for +div.notethisis = Note: This is a only a partial list of the API calls +div.historical = Historical Reports +div.schedule = Schedule Adherence +div.statuspages = Status Pages +div.realtime = Real-time Maps for +div.mapfor = Map for Selected Route +div.mapincluding = Map Including Unassigned Vehicles +div.scheduleadherence = Schedule Adherence Map +div.transitimemaps = Transitime Map +div.scheduleadherencemaps = Schedule Adherence Map +div.smartphonemap = Smartphone Map +div.smartphonemap2 = Smartphone Map +div.avldata = AVL Data Map +div.specify = Specify Parameters +div.specifyparametrs = Specify Parameters +div.prediction = Prediction Accuracy Range Chart +div.predictionaccuracy = Prediction Accuracy Interval Chart +div.predictionscatter = Prediction Accuracy Scatter Plot +div.csv = Prediction Accuracy CSV Download +div.scheduleroutr = Schedule Adherence by Route +div.earlylate = Schedule Adherence by how Early/Late +div.schedulebystop = Schedule Adherence by Stop +div.avldata = AVL Data in Map by Route +div.datainmap = AVL Data in Map by Vehicle +div.lastgps = Last GPS Report by Vehicle +div.schedulefor = Schedule for Route +div.lastgpsreports = Last GPS Reports for Vehicles +div.specifyparametrs2 = Specify Parameters +div.predictionaccuracy2 = Prediction Accuracy +div.specifyparametrs3 = Specify Parameters +div.predictionaccuracy4 = Prediction Accuracy +div.specifyparametrs4 = Specify Parameters +div.specifyparametrs5 = Specify Parameters +div.scheduleadherence2 = Schedule Adherence +div.spcyfyparametrsn = Specify Parameters +div.specifyparametrs6 = Specify Parameters +div.specifyparametrs7 = Specify Parameters +div.scgedulareport = Schedule Report +div.specifyparametrs8 = Specify Parameters +div.specifyparametrs9 = Specify Parameters +div.specifyparametrs10 = Specify Parameters +div.specifyparametrs11 = Specify Parameters +div.specifyparametrs12 = Specify Parameters +div.specifyparametrs13 = Specify Parameters +div.specifyparametrs14 = Specify Parameters +div.specifyparametrs15 = Specify Parameters +div.specifyparametrs16 = Specify Parameters +div.specifyparametrs17 = Specify Parameters +div.specifyparametrs18 = Specify Parameters +div.specifyparametrs19 = Specify Parameters +div.specifyparametrs20 = Specify Parameters +div.specifyparametrs21 = Specify Parameters +div.specifyparametrs22 = Specify Parameters +div.specifyparametrs23 = Specify Parameters +div.specifyparametrs24 = Specify Parameters +div.specifyparametrs25 = Specify Parameters +div.specifyparametrs26 = Specify Parameters +div.specifyparametrs27 = Specify Parameters +div.specifyparametrs28 = Specify Parameters +div.specifyparametrs29 = Specify Parameters +div.specifyparametrs30 = Specify Parameters +div.acbiveblock = Active Blocks +div.statuspages = Status Pages +div.serwerstatus = Server Status +div.spfa = Select Parameters for Agencies API +div.spfb = Select Parameters for Blocks API +div.spfbta = Select Parameters for Blocks Terse API +div.spfgrtua = Select Parameters for GTFS-Realtime Trip Updates API +div.binary = Binary +div.hr = Human Readable +div.spfgrvpa = Select Parameters for GTFS-Realtime Vehicle Positions API +div.spfshsa = Select Parameters for Schedule (Horizontal Stops) API +div.asac = Agency Specific API calls +div.rv = Reset vehicle +div.pbl = Predictions by Location +div.agencies = Agencies +div.nas = Not Agency Specific +div.sfrsv = Schedule for Route, stops vertical +div.sfrsh = Schedule for Route, stops horizontal +div.ssm = SIRI Stop Monitoring +div.svm = SIRI Vehicle Monitoring +div.grvp = GTFS-realtime Vehicle Positions +div.grtu = GTFS-realtime Trip Updates +div.sic = Service IDs Current +div.si = Service IDs +div.bd = Block Details +div.b = Block +div.twtt = Trip With Travel Times +div.t = Trip +div.pbl = Predictions by Location +div.pbrs = Predictions by Route/Stop +div.vc = Vehicle Configurations +div.vd = Vehicles Details +div.veh = Vehicles +div.roude = Route Details +div.rou = Routes +div.spfpbla = Select Parameters for Predictions by Location API +div.lat = Latitude: +div.lon = Longitude: +div.md = Max Distance: +div.mdf = meters (default is 1500m) +div.np = Number Predictions: +div.dfps = (default is 3 per stop) +div.spfpbla = Select Parameters for Predictions by Location API +div.spfpbrsa = Select Parameters for Predictions by Route/Stop API +div.difps = (default is 3 per stop) +div.stopid = Stop ID: +div.spfrva = Select Parameters for Reset Vehicle API +div.spfra = Select Parameters for routes API +div.spfrda = Select Parameters for routesDetails API +div.spfsia = Select Parameters for Service IDs API +div.spfcsia = Select Parameters for Current Service IDs API +div.spfpbrsa = Select Parameters for Predictions by Route/Stop API +div.spfsvma = Select Parameters for SIRI Vehicle Montitoring API +div.spfta = Select Parameters for Trip API +div.trip = Trip: +div.spfvca = Select Parameters for Vehicle Configurations API +div.spfva = Select Parameters for Vehicles API +div.spfvda = Select Parameters for Vehicles Details API +div.spfsvsa = Select Parameters for Schedule (Vertical Stops) API +div.hrf = Historical Reports for +div.pa = Prediction Accuracy +div.ofa = (only for agencies where prediction accuracy stored to database) +div.sar = Schedule Adherence Reports +div.ar = AVL Reports +div.mr = Miscellaneous Reports +div.sfrvss = Schedule for Route (vertical stops) +div.block = Block: +div.true = True +div.false = False +div.bd = Begin Date: +div.nod = Number of days: +div.bt = Begin Time: +div.et = End Time: +div.bd = Begin Date: +div.ed = End Date: +div.route = Route: +div.v = Vehicle: +div.srf = Status Reports for +div.ab = Active Blocks +div.sam = Schedule Adherence Map +div.ddsu = Database Disk Space Utilization +div.ss = Server Status +div.blocks = Blocks: +div.early = Early: +div.ontime = OnTime: +div.late = Late: +div.assigned = Assigned: +div.ddsu = Database Disk Space Utilization +div.ddsflt = Database Disk Space for Largest Tables +div.ddsbt = Database Disk Space by Table +div.ddsd = Database Disk Space Details +div.ssf = Server Status for +div.ep = Extensions Page +div.ef = Extensions for +div.htns = Holding Times Northern Stop +div.htss = Holding Times Southern Stop +div.psource = Prediction Source: +div.other = Other +div.ptype = Prediction Type: +div.pall = All +div.paff = Affected by layover +div.pnaff = Not affected by layover +div.aear = Allowable Early: +div.minutes = minutes +div.alat = Allowable Late: +div.sppaic = Select Parameters for Prediction Accuracy Intervals Chart +div.intt = Intervals Type: +div.pon = Percentage only +div.sdon = Standard Deviation only +div.ponsd = Percentage only and Standard Deviation +div.iper = Interval Percentage +div.sppas = Select Parameters for Prediction Accuracy Scatter Chart +div.csvd = Select Parameters for Prediction Accuracy CSV Download +div.spsabr = Select Parameters for Schedule Adherence by Route Chart +div.spdavld = Select Parameters for Displaying AVL Data in Map by Route +div.spdavlbv = Select Parameters for Displaying AVL Data in Map by Vehicle +div.lgpsr = Last GPS Reports for Past 24 Hours +div.lv = Vehicle +div.lgps = Last GPS +div.spfsr = Select Parameters for Schedule Report +div.selectroute = Select Route +div.droute = Route +div.dstop = Stop +div.ddestination = Destination +div.dsvehicle = vehicle +div.dminutes = minutes +div.dnopredictions = No Predictions +div.dtrippattern = Trip Pattern +div.dheadsign = Headsign +div.dkmhr = km/hr +div.dlayover = Layover +div.ddeparture = Departure +div.dnextstop = Next Stop +div.ddriver = Driver +div.dlat = lat +div.dlon = lon +div.dheading = Heading +div.dspeed = Speed +div.ddirection = Direction +div.dtrippattern = Trip Pattern +div.dstarttime = Start Time +div.dschadh = sch adh +div.dvehicle = Vehicle +div.dgpstime = GPS Time +div.dheadsign = Headsign +div.dblock = Block +div.dtrip = Trip +div.dto = To +div.drunreport = Run Report +div.drunapicall = Run Api Call +div.scfor = Schedule For +div.schadh = Schedule Adherence +div.minearly = min early +div.minearlyto = min early to +div.minlate = min late +div.for = for +div.day = day +div.clate = Late +div.contime = On Time +div.cearly = Early +div.coutof = out of +div.cstops = stops +div.ccombined = Combined +div.hitback = Hit back button to try other parameters. +div.spfsabsc = Select Parameters for Schedule Adherence by Stop Chart +div.ctimes = times +div.ctotal = Total diff --git a/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties new file mode 100644 index 000000000..b174ec81c --- /dev/null +++ b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties @@ -0,0 +1,236 @@ +hello.label.welcome = Witaj +div.agencies = Agencje +div.maps = Mapy +div.reports = Raporty +div.api = Api +div.status = Status +div.extensions = Rozszerzenia +div.apicalls = Zapytania do API +div.apicallsfor = Zapytania do api dla +div.notethisis = Uwaga: To jest tylko cz\u0119\u015bciowa lista zapyta\u0144 do API +div.historical = Historyczne raporty +div.schedule = Przestrzeganie rozk\u0142adu +div.statuspages = Strony statusu +div.realtime = Mapy rzeczywiste dla +div.mapfor = Mapa dla wybranej trasy +div.mapincluding = Mapa zawieraj\u0105ca nieprzypisane pojazdy +div.scheduleadherence = Mapa przestrzegania rozk\u0142adu +div.transitimemaps = Mapa transitime +div.scheduleadherencemaps = Mapa przestrzegania rozk\u0142adu +div.smartphonemap = Mapa Smartphone +div.smartphonemap2 = Mapa SMartphone +div.avldata = Mapa danych AVL +div.specify = Sprecyzuj parametry +div.specifyparametrs = Sprecyzuj parametry +div.prediction = Wykres zakresu dok\u0142adno\u015bci prognozy +div.predictionaccuracy = Interwa\u0142owy wykres dok\u0142adno\u015bci prognozy +div.predictionscatter = Wykres rozproszony dok\u0142adno\u015bci prognozy +div.csv = Pobierz csv dok\u0142adno\u015bci predykcji +div.scheduleroutr = Prognoza rozk\u0142adu wed\u0142ug trasy +div.earlylate = Przestrzegania rozk\u0142adu jazdy wed\u0142ug wcze\u015bniej/p\u00f3\u017aniej ni\u017c rozk\u0142adowo +div.schedulebystop = Prognoza rozk\u0142adu jazdy wed\u0142ug przystank\u00f3w +div.avldata = Dane AVL na Mapie wed\u0142ug trasy +div.datainmap = Dane AVL na Mapie wed\u0142ug pojazdu +div.lastgps = Ostatni raport GPS wed\u0142ug pojazdu +div.schedulefor = Rozk\u0142ad dla trasy +div.lastgpsreports = Ostatnie raporty GPS dla Pojazd\u00f3w +div.specifyparametrs2 = Sprecyzuj parametry +div.predictionaccuracy2 = Dok\u0142adno\u015b\u0107 predykcji +div.specifyparametrs3 = Sprecyzuj parametry +div.predictionaccuracy4 = Dok\u0142adno\u015b\u0107 predykcji +div.specifyparametrs4 = Sprecyzuj parametry +div.specifyparametrs5 = Sprecyzuj parametry +div.scheduleadherence2 = Prognoza rozk\u0142adu +div.spcyfyparametrsn = Sprecyzuj parametry +div.specifyparametrs6 = Sprecyzuj parametry +div.specifyparametrs7 = Sprecyzuj parametry +div.scgedulareport = Raport rozk\u0142adu +div.specifyparametrs8 = Sprecyzuj parametry +div.specifyparametrs9 = Sprecyzuj parametry +div.specifyparametrs10 = Sprecyzuj parametry +div.specifyparametrs11 = Sprecyzuj parametry +div.specifyparametrs12 = Sprecyzuj parametry +div.specifyparametrs13 = Sprecyzuj parametry +div.specifyparametrs14 = Sprecyzuj parametry +div.specifyparametrs15 = Sprecyzuj parametry +div.specifyparametrs16 = Sprecyzuj parametry +div.specifyparametrs17 = Sprecyzuj parametry +div.specifyparametrs18 = Sprecyzuj parametry +div.specifyparametrs19 = Sprecyzuj parametry +div.specifyparametrs20 = Sprecyzuj parametry +div.specifyparametrs21 = Sprecyzuj parametry +div.specifyparametrs22 = Sprecyzuj parametry +div.specifyparametrs23 = Sprecyzuj parametry +div.specifyparametrs24 = Sprecyzuj parametry +div.specifyparametrs25 = Sprecyzuj parametry +div.specifyparametrs26 = Sprecyzuj parametry +div.specifyparametrs27 = Sprecyzuj parametry +div.specifyparametrs28 = Sprecyzuj parametry +div.specifyparametrs29 = Sprecyzuj parametry +div.specifyparametrs30 = Sprecyzuj parametry +div.acbiveblock = Aktywne bloki +div.statuspages = Strony statusu +div.serwerstatus = Status serwera +div.spfa = Wybierz parametry dla API agencji +div.spfb = Wybierz parametry dla API blok\u00f3w +div.spfbta = Wybierz parametry dla API zwi\u0119z\u0142ych blok\u00f3w +div.spfgrtua = Wybierz parametry dla Aktualizacji GTFS w czasie rzeczywistym podr\u00f3\u017cy +div.binary = Binarny +div.hr = Czytelny przez cz\u0142owieka +div.spfgrvpa = Wybierz parametry dla GTFS w czasie rzeczywistym pozycji pojazd\u00f3w +div.spfshsa = Wybierz parametry dla API rozk\u0142adu (poziome przystanki ) +div.asac = Specyficzne dla agencji wywo\u0142ania API +div.rv = Resetuj pojazd +div.pbl = Prognoza wed\u0142ug lokacji +div.agencies = Agencje +div.nas = Nie specyficzne dla agencji +div.sfrsv = Rozk\u0142ad dla trasy, przystanki pionowe +div.sfrsh = Rozk\u0142ad dla trasy, przystanki poziome +div.ssm = Monitoring przystank\u00f3w SIRI +div.svm = Monitoring pojazd\u00f3w SIRI +div.grvp = Pozycje pojazd\u00f3w GTFS w czasie rzeczywistym +div.grtu = AKtualizacje podr\u00f3\u017cy GTFS w czasie rzeczywistym +div.sic = Aktualne ID Us\u0142ugi +div.si = ID Us\u0142ugi +div.bd = Szczeg\u00f3\u0142y bloku +div.b = Blok +div.twtt = Podr\u00f3\u017c z czasami podr\u00f3\u017cy +div.t = Podr\u00f3\u017c +div.pbl = Prognoza przez lokalizacje +div.pbrs = Przeiwdywania przez trase/przystanek +div.vc = Konfiguracje Pojazd\u00f3w +div.vd = Szczeg\u00f3\u0142y pojazd\u00f3w +div.veh = Pojazdy +div.roude = Szczeg\u00f3\u0142y trasy +div.rou = Trasy +div.spfpbla = Wybierz parametry dla przeiwdywania lokacji API +div.lat = D\u0142ugo\u015b\u0107 geograficzna: +div.lon = Szeroko\u015b\u0107 geograficzna: +div.md = Maksymalny dystans: +div.mdf = metry ( domy\u015blnie 1500m ) +div.np = Prognoza numer\u00f3w: +div.dfps = (domy\u015blnie jest 3 na przystanek) +div.spfpbla = Wybierz parametry dla prognoz dla lokacji API +div.spfpbrsa = Wybierz parametry dla prognoz dla Trasy/Przystanku API +div.difps = (domy\u015blnie jest 3 na przystanek) +div.stopid = ID Przystanku: +div.spfrva = Wybierz parametry dla Reset Vehicle API +div.spfra = Wybierz parametry dla API tras +div.spfrda = Wybierz parametry dla szczeg\u00f3\u0142\u00f3w tras API +div.spfsia = Wybierz parametry dla ID us\u0142ug API +div.spfcsia = Wybierz parametry dla aktualnych us\u0142ug API +div.spfpbrsa = Wybierz parametry dla prognozy przez trase/przystanek API +div.spfsvma = Wybierz parametry dla monitoringu SIRI API +div.spfta = Wybierz parametry dla API podr\u00f3\u017cy +div.trip = Podr\u00f3\u017c: +div.spfvca = Wybierz parametry dla konfiguracji Pojazd\u00f3w API +div.spfva = Wybierz parametry dla API Pojazd\u00f3w +div.spfvda = Wybierz parametry dla API Szczeg\u00f3\u0142\u00f3w Pojazdu +div.spfsvsa = Wybierz parametry dla API Rozk\u0142adu ( poziome przystanki ) API +div.hrf = Historyczne raporty dla +div.pa = Dok\u0142adno\u015b\u0107 prognozy +div.ofa = (tylko dla agencji gdzie dok\u0142adno\u015b\u0107 predykcji zapisana do bazy danych) +div.sar = Raporty przestrzegania rozk\u0142adu +div.ar = Raporty AVL +div.mr = Inne raporty +div.sfrvss = Rozk\u0142ad dla trasy ( Pionowe przystanki ) +div.block = Blok: +div.true = Prawda +div.false = Fa\u0142sz +div.bd = Data rozpocz\u0119cia: +div.nod = Liczba dni: +div.bt = Czas rozpocz\u0119cia: +div.et = Czas zako\u0144czenia: +div.bd = Data rozpocz\u0119cia: +div.ed = Data zako\u0144czenia: +div.route = Trasa: +div.v = Pojazd: +div.srf = Raporty statusu dla +div.ab = Aktywne bloki +div.sam = Mapa prognozy rozk\u0142adu +div.ddsu = Utylizacja przestrzeni bazy danych +div.ss = Status serwera +div.blocks = Blok: +div.early = Wcze\u015bnie: +div.ontime = Na czas: +div.late = P\u00f3\u017ano: +div.assigned = Przypisany: +div.ddsu = Utylizacja przestrzedni dyskowej bazy danych +div.ddsflt = Przestrzen dyskowa bazy danych dla najwi\u0119kszych tabel +div.ddsbt = Przestrze\u0144 dyskowa na tabel\u0119 +div.ddsd = Szczeg\u00f3\u0142y przestrzeni dyskowej +div.ssf = Status serwera dla +div.ep = Strona rozszerze\u0144 +div.ef = Rozszerzenia dla +div.htns = Czasy zatrzymania p\u00f3\u0142nocny przystanek +div.htss = Czasy zatrzymania po\u0142udniowy przystanek +div.psource = \u0179r\u00f3d\u0142o predykcji +div.other = Inne +div.ptype = Typ predykcji +div.pall = Wszystkie linie +div.paff = Wp\u0142yni\u0119ty przez layover +div.pnaff = Nie wp\u0142yni\u0119ty przez layover +div.aear = Tolerancja przyspieszenia: +div.minutes = minut +div.sppaic = Wybierz parametry dla wykresu interwa\u0142\u00f3w predykcji dok\u0142adno\u015bci +div.alat = Tolerancja op\u00f3\u017anienia: +div.intt = Typ interwa\u0142\u00f3w: +div.pon = Tylko procentowe +div.sdon = Tylko standardowe odchylenie +div.ponsd = Standardowe odchylenie i procentowe +div.iper = Procentowe interwa\u0142y +div.sppas = Wybierz parametry dla rozproszonego wykresu predykcji dok\u0142adno\u015bci +div.csvd = Wybierz parametry dla pobierania CSV dok\u0142adno\u015bci predykcji +div.spsabr = Wybierz parametry dla wykresu predykcji rozk\u0142adu wed\u0142ug trasy +div.spdavld = Wybierz parametry by wy\u015bwietli\u0107 dane AVL na mapie wed\u0142ug trasy +div.spdavlbv = Wybierz parametry by wy\u015bwietli\u0107 dane AVL na mapie wed\u0142ug pojazdu +div.lgpsr = Ostatnie raporty GPS przez ostatnie 24 godziny +div.spfsr = Wybierz parametry dla raportu rozk\u0142adu +div.selectroute = Wybierz tras\u0119 +div.droute = Linia +div.dstop = Przystanek +div.ddestination = Cel +div.dsvehicle = Pojazd +div.dminutes = minut +div.dnopredictions = Brak prognoz +div.dtrippattern = Wzorzec kursu +div.dheadsign = Kierunek +div.dkmhr = km/h +div.dlayover = Layover +div.ddeparture = Odjazd +div.dnextstop = Nast. Przystanek +div.ddriver = Kierowca +div.dlat = d\u0142. geogr +div.dlon = szer. geogr +div.dheading = Kierunek +div.dspeed = Pr\u0119dko\u015b\u0107 +div.ddirection = Kierunek +div.dtrippattern = Wz\u00f3r kursu +div.dstarttime = Pocz\u0105tkowy czas +div.dschadh = Op\u00f3\u017a./Przys. +div.schadh = Op\u00f3\u017a./Przys. +div.dvehicle = Pojazd +div.dgpstime = Czas GPS +div.dheadsign = Kierunek +div.dblock = Zadanie +div.dtrip = Kurs +div.dto = Do +div.drunreport = Generuj Raport +div.drunapicall = Generuj Wywo\u0142anie API +div.scfor = Rozk\u0142ad dla +div.schadh = Prognoza rozk\u0142adu +div.minearly = min wcze\u015bniej +div.minearlyto = min wcze\u015bniej do +div.minlate = min p\u00f3\u017aniej +div.for = dla +div.day = dzie\u0144 +div.clate = P\u00f3\u017aniej +div.contime = Na Czas +div.cearly = Wcze\u015bniej +div.coutof = z +div.cstops = przystanki +div.ccombined = Wsp\u00f3lne +div.hitback = Naci\u015bnij wstecz, by wypr\u00f3bowa\u0107 inne parametry. +div.spfsabsc = Wybierz parametry dla prognozy rozk\u0142adu wed\u0142ug przystanku +div.ctimes = razy +div.ctotal = Suma diff --git a/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties.bak b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties.bak new file mode 100644 index 000000000..2a4670fd4 --- /dev/null +++ b/transitclockWebapp/src/main/resources/org/transitclock/i18n/text_pl.properties.bak @@ -0,0 +1,236 @@ +hello.label.welcome = Witaj +div.agencies = Agencje +div.maps = Mapy +div.reports = Raporty +div.api = Api +div.status = Status +div.extensions = Rozszerzenia +div.apicalls = Zapytania do API +div.apicallsfor = Zapytania do api dla +div.notethisis = Uwaga: To jest tylko częściowa lista zapytań do API +div.historical = Historyczne raporty +div.schedule = Przestrzeganie rozkładu +div.statuspages = Strony statusu +div.realtime = Mapy rzeczywiste dla +div.mapfor = Mapa dla wybranej trasy +div.mapincluding = Mapa zawierająca nieprzypisane pojazdy +div.scheduleadherence = Mapa przestrzegania rozkładu +div.transitimemaps = Mapa transitime +div.scheduleadherencemaps = Mapa przestrzegania rozkładu +div.smartphonemap = Mapa Smartphone +div.smartphonemap2 = Mapa SMartphone +div.avldata = Mapa danych AVL +div.specify = Sprecyzuj parametry +div.specifyparametrs = Sprecyzuj parametry +div.prediction = Wykres zakresu dokładności prognozy +div.predictionaccuracy = Interwałowy wykres dokładności prognozy +div.predictionscatter = Wykres rozproszony dokładności prognozy +div.csv = Pobierz csv dokładności predykcji +div.scheduleroutr = Prognoza rozkładu według trasy +div.earlylate = Przestrzegania rozkładu jazdy według wcześniej/później niż rozkładowo +div.schedulebystop = Prognoza rozkładu jazdy według przystanków +div.avldata = Dane AVL na Mapie według trasy +div.datainmap = Dane AVL na Mapie według pojazdu +div.lastgps = Ostatni raport GPS według pojazdu +div.schedulefor = Rozkład dla trasy +div.lastgpsreports = Ostatnie raporty GPS dla Pojazdów +div.specifyparametrs2 = Sprecyzuj parametry +div.predictionaccuracy2 = Dokładność predykcji +div.specifyparametrs3 = Sprecyzuj parametry +div.predictionaccuracy4 = Dokładność predykcji +div.specifyparametrs4 = Sprecyzuj parametry +div.specifyparametrs5 = Sprecyzuj parametry +div.scheduleadherence2 = Prognoza rozkładu +div.spcyfyparametrsn = Sprecyzuj parametry +div.specifyparametrs6 = Sprecyzuj parametry +div.specifyparametrs7 = Sprecyzuj parametry +div.scgedulareport = Raport rozkładu +div.specifyparametrs8 = Sprecyzuj parametry +div.specifyparametrs9 = Sprecyzuj parametry +div.specifyparametrs10 = Sprecyzuj parametry +div.specifyparametrs11 = Sprecyzuj parametry +div.specifyparametrs12 = Sprecyzuj parametry +div.specifyparametrs13 = Sprecyzuj parametry +div.specifyparametrs14 = Sprecyzuj parametry +div.specifyparametrs15 = Sprecyzuj parametry +div.specifyparametrs16 = Sprecyzuj parametry +div.specifyparametrs17 = Sprecyzuj parametry +div.specifyparametrs18 = Sprecyzuj parametry +div.specifyparametrs19 = Sprecyzuj parametry +div.specifyparametrs20 = Sprecyzuj parametry +div.specifyparametrs21 = Sprecyzuj parametry +div.specifyparametrs22 = Sprecyzuj parametry +div.specifyparametrs23 = Sprecyzuj parametry +div.specifyparametrs24 = Sprecyzuj parametry +div.specifyparametrs25 = Sprecyzuj parametry +div.specifyparametrs26 = Sprecyzuj parametry +div.specifyparametrs27 = Sprecyzuj parametry +div.specifyparametrs28 = Sprecyzuj parametry +div.specifyparametrs29 = Sprecyzuj parametry +div.specifyparametrs30 = Sprecyzuj parametry +div.acbiveblock = Aktywne bloki +div.statuspages = Strony statusu +div.serwerstatus = Status serwera +div.spfa = Wybierz parametry dla API agencji +div.spfb = Wybierz parametry dla API bloków +div.spfbta = Wybierz parametry dla API zwięzłych bloków +div.spfgrtua = Wybierz parametry dla Aktualizacji GTFS w czasie rzeczywistym podróży +div.binary = Binarny +div.hr = Czytelny przez człowieka +div.spfgrvpa = Wybierz parametry dla GTFS w czasie rzeczywistym pozycji pojazdów +div.spfshsa = Wybierz parametry dla API rozkładu (poziome przystanki ) +div.asac = Specyficzne dla agencji wywołania API +div.rv = Resetuj pojazd +div.pbl = Prognoza według lokacji +div.agencies = Agencje +div.nas = Nie specyficzne dla agencji +div.sfrsv = Rozkład dla trasy, przystanki pionowe +div.sfrsh = Rozkład dla trasy, przystanki poziome +div.ssm = Monitoring przystanków SIRI +div.svm = Monitoring pojazdów SIRI +div.grvp = Pozycje pojazdów GTFS w czasie rzeczywistym +div.grtu = AKtualizacje podróży GTFS w czasie rzeczywistym +div.sic = Aktualne ID Usługi +div.si = ID Usługi +div.bd = Szczegóły bloku +div.b = Blok +div.twtt = Podróż z czasami podróży +div.t = Podróż +div.pbl = Prognoza przez lokalizacje +div.pbrs = Przeiwdywania przez trase/przystanek +div.vc = Konfiguracje Pojazdów +div.vd = Szczegóły pojazdów +div.veh = Pojazdy +div.roude = Szczegóły trasy +div.rou = Trasy +div.spfpbla = Wybierz parametry dla przeiwdywania lokacji API +div.lat = Długość geograficzna: +div.lon = Szerokość geograficzna: +div.md = Maksymalny dystans: +div.mdf = metry ( domyślnie 1500m ) +div.np = Prognoza numerów: +div.dfps = (domyślnie jest 3 na przystanek) +div.spfpbla = Wybierz parametry dla prognoz dla lokacji API +div.spfpbrsa = Wybierz parametry dla prognoz dla Trasy/Przystanku API +div.difps = (domyślnie jest 3 na przystanek) +div.stopid = ID Przystanku: +div.spfrva = Wybierz parametry dla Reset Vehicle API +div.spfra = Wybierz parametry dla API tras +div.spfrda = Wybierz parametry dla szczegółów tras API +div.spfsia = Wybierz parametry dla ID usług API +div.spfcsia = Wybierz parametry dla aktualnych usług API +div.spfpbrsa = Wybierz parametry dla prognozy przez trase/przystanek API +div.spfsvma = Wybierz parametry dla monitoringu SIRI API +div.spfta = Wybierz parametry dla API podróży +div.trip = Podróż: +div.spfvca = Wybierz parametry dla konfiguracji Pojazdów API +div.spfva = Wybierz parametry dla API Pojazdów +div.spfvda = Wybierz parametry dla API Szczegółów Pojazdu +div.spfsvsa = Wybierz parametry dla API Rozkładu ( poziome przystanki ) API +div.hrf = Historyczne raporty dla +div.pa = Dokładność prognozy +div.ofa = (tylko dla agencji gdzie dokładność predykcji zapisana do bazy danych) +div.sar = Raporty przestrzegania rozkładu +div.ar = Raporty AVL +div.mr = Inne raporty +div.sfrvss = Rozkład dla trasy ( Pionowe przystanki ) +div.block = Blok: +div.true = Prawda +div.false = Fałsz +div.bd = Data rozpoczęcia: +div.nod = Liczba dni: +div.bt = Czas rozpoczęcia: +div.et = Czas zakończenia: +div.bd = Data rozpoczęcia: +div.ed = Data zakończenia: +div.route = Trasa: +div.v = Pojazd: +div.srf = Raporty statusu dla +div.ab = Aktywne bloki +div.sam = Mapa prognozy rozkładu +div.ddsu = Utylizacja przestrzeni bazy danych +div.ss = Status serwera +div.blocks = Blok: +div.early = Wcześnie: +div.ontime = Na czas: +div.late = Późno: +div.assigned = Przypisany: +div.ddsu = Utylizacja przestrzedni dyskowej bazy danych +div.ddsflt = Przestrzen dyskowa bazy danych dla największych tabel +div.ddsbt = Przestrzeń dyskowa na tabelę +div.ddsd = Szczegóły przestrzeni dyskowej +div.ssf = Status serwera dla +div.ep = Strona rozszerzeń +div.ef = Rozszerzenia dla +div.htns = Czasy zatrzymania północny przystanek +div.htss = Czasy zatrzymania południowy przystanek +div.psource = Źródło predykcji +div.other = Inne +div.ptype = Typ predykcji +div.pall = Wszystkie linie +div.paff = Wpłynięty przez layover +div.pnaff = Nie wpłynięty przez layover +div.aear = Tolerancja przyspieszenia: +div.minutes = minut +div.sppaic = Wybierz parametry dla wykresu interwałów predykcji dokładności +div.alat = Tolerancja opóźnienia: +div.intt = Typ interwałów: +div.pon = Tylko procentowe +div.sdon = Tylko standardowe odchylenie +div.ponsd = Standardowe odchylenie i procentowe +div.iper = Procentowe interwały +div.sppas = Wybierz parametry dla rozproszonego wykresu predykcji dokładności +div.csvd = Wybierz parametry dla pobierania CSV dokładności predykcji +div.spsabr = Wybierz parametry dla wykresu predykcji rozkładu według trasy +div.spdavld = Wybierz parametry by wyświetlić dane AVL na mapie według trasy +div.spdavlbv = Wybierz parametry by wyświetlić dane AVL na mapie według pojazdu +div.lgpsr = Ostatnie raporty GPS przez ostatnie 24 godziny +div.spfsr = Wybierz parametry dla raportu rozkładu +div.selectroute = Wybierz trasę +div.droute = Linia +div.dstop = Przystanek +div.ddestination = Cel +div.dsvehicle = Pojazd +div.dminutes = minut +div.dnopredictions = Brak prognoz +div.dtrippattern = Wzorzec kursu +div.dheadsign = Kierunek +div.dkmhr = km/h +div.dlayover = Layover +div.ddeparture = Odjazd +div.dnextstop = Nast. Przystanek +div.ddriver = Kierowca +div.dlat = dł. geogr +div.dlon = szer. geogr +div.dheading = Kierunek +div.dspeed = Prędkość +div.ddirection = Kierunek +div.dtrippattern = Wzór kursu +div.dstarttime = Początkowy czas +div.dschadh = Opóź./Przys. +div.schadh = Opóź./Przys. +div.dvehicle = Pojazd +div.dgpstime = Czas GPS +div.dheadsign = Kierunek +div.dblock = Zadanie +div.dtrip = Kurs +div.dto = Do +div.drunreport = Generuj Raport +div.drunapicall = Generuj Wywołanie API +div.scfor = Rozkład dla +div.schadh = Prognoza rozkładu +div.minearly = min wcześniej +div.minearlyto = min wcześniej do +div.minlate = min później +div.for = dla +div.day = dzień +div.clate = Później +div.contime = Na Czas +div.cearly = Wcześniej +div.coutof = z +div.cstops = przystanki +div.ccombined = Wspólne +div.hitback = Naciśnij wstecz, by wypróbować inne parametry. +div.spfsabsc = Wybierz parametry dla prognozy rozkładu według przystanku +div.ctimes = razy +div.ctotal = Suma diff --git a/transitclockWebapp/src/main/webapp/WEB-INF/web.xml b/transitclockWebapp/src/main/webapp/WEB-INF/web.xml index 0268e7e4f..25644c6a2 100644 --- a/transitclockWebapp/src/main/webapp/WEB-INF/web.xml +++ b/transitclockWebapp/src/main/webapp/WEB-INF/web.xml @@ -43,5 +43,18 @@ org.transitclock.web.ReadConfigListener - + + + + + /* + + + manager + + + + BASIC + Hudson + diff --git a/transitclockWebapp/src/main/webapp/css/general.css b/transitclockWebapp/src/main/webapp/css/general.css index 5492a1244..7b9c45fa9 100644 --- a/transitclockWebapp/src/main/webapp/css/general.css +++ b/transitclockWebapp/src/main/webapp/css/general.css @@ -1,6 +1,6 @@ -@CHARSET "ISO-8859-1"; +@CHARSET "UTF-8"; /* - * This file contains general CSS config for TheTransitClock pages + * This file contains general CSS config for Transitime pages */ body { font-family: sans-serif; diff --git a/transitclockWebapp/src/main/webapp/extensions/index.jsp b/transitclockWebapp/src/main/webapp/extensions/index.jsp index aa2a76804..82e63d542 100755 --- a/transitclockWebapp/src/main/webapp/extensions/index.jsp +++ b/transitclockWebapp/src/main/webapp/extensions/index.jsp @@ -1,7 +1,7 @@ <%@page import="org.transitclock.db.webstructs.WebAgency"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <% String agencyId = request.getParameter("a"); @@ -12,22 +12,22 @@ if (agencyId == null || agencyId.isEmpty()) { %> -<%@include file="/template/includes.jsp" %> - -Extensions Page +<%@include file="/template/includes.jsp" %> + +<fmt:message key="div.ep" /> <%@include file="/template/header.jsp" %>
-
Extensions for <%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
+
<%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/holding/css/general.css b/transitclockWebapp/src/main/webapp/holding/css/general.css index 9254a973c..7ec012755 100755 --- a/transitclockWebapp/src/main/webapp/holding/css/general.css +++ b/transitclockWebapp/src/main/webapp/holding/css/general.css @@ -1,4 +1,4 @@ -@CHARSET "ISO-8859-1"; +@CHARSET "UTF-8"; /* * This file contains general CSS config for Transitime pages */ diff --git a/transitclockWebapp/src/main/webapp/maps/css/mapUi.css b/transitclockWebapp/src/main/webapp/maps/css/mapUi.css index 8446f0fef..882c989c9 100644 --- a/transitclockWebapp/src/main/webapp/maps/css/mapUi.css +++ b/transitclockWebapp/src/main/webapp/maps/css/mapUi.css @@ -1,4 +1,4 @@ -@CHARSET "ISO-8859-1"; +@CHARSET "UTF-8"; html, body, #map { height: 100%; width: 100%; padding: 0px; margin: 0px; diff --git a/transitclockWebapp/src/main/webapp/maps/css/mbtaMapUi.css b/transitclockWebapp/src/main/webapp/maps/css/mbtaMapUi.css index 71ef8905a..f488321a3 100644 --- a/transitclockWebapp/src/main/webapp/maps/css/mbtaMapUi.css +++ b/transitclockWebapp/src/main/webapp/maps/css/mbtaMapUi.css @@ -1,4 +1,4 @@ -@CHARSET "ISO-8859-1"; +@CHARSET "UTF-8"; /* * This file contains css customizations for MBTA */ diff --git a/transitclockWebapp/src/main/webapp/maps/heatmap.jsp b/transitclockWebapp/src/main/webapp/maps/heatmap.jsp index 3441e8833..abb17d7e7 100644 --- a/transitclockWebapp/src/main/webapp/maps/heatmap.jsp +++ b/transitclockWebapp/src/main/webapp/maps/heatmap.jsp @@ -1,21 +1,21 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%-- This heapmap page was just an experiment and wasn't completed and doesn't work. It is kept here for now only in case want to look at creating another heatmap - in the future. --%> + in the future. --%> <%@page import="org.transitclock.web.WebConfigParams"%> - -Schedule Adherence + +<fmt:message key="div.schedule" /> <%@include file="/template/includes.jsp" %> - + @@ -23,7 +23,7 @@ @@ -41,17 +41,17 @@ function createHeatmapLayer() { var cfg = { // If want to scale the radius then radius is in lat/lon units //"radius": 0.005, - //"scaleRadius": true, - + //"scaleRadius": true, + // If don't scale radius then radius is in pixels "radius": 25, - "scaleRadius": false, - + "scaleRadius": false, + "useLocalExtrema": false, - + "maxOpacity": .8, "valueField": "value", -/* +/* "gradient": { // enter n keys between 0 and 1 here // for gradient color customization @@ -61,9 +61,9 @@ function createHeatmapLayer() { } */ } - + var heatmapLayer = new HeatmapOverlay(cfg); - + return heatmapLayer; } @@ -76,51 +76,51 @@ function createMap(mapTileUrl, mapTileCopyright) { heatmapLayerForLateVehicles = new HeatmapOverlay({ // If want to scale the radius then radius is in lat/lon units //"radius": 0.005, - //"scaleRadius": true, - + //"scaleRadius": true, + // If don't scale radius then radius is in pixels "radius": 25, - "scaleRadius": false, - + "scaleRadius": false, + "useLocalExtrema": false, - + "maxOpacity": .8, "valueField": "value"}); - + var baseTiles = L.tileLayer(mapTileUrl, // Specifying a shorter version of attribution. Original really too long. - //attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', - {attribution: '© OpenStreetMap & CC-BY-SA, Imagery © ' + mapTileCopyright, + //attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery � Mapbox', + {attribution: '© OpenStreetMap & CC-BY-SA, Imagery � ' + mapTileCopyright, maxZoom: 19 }); - // Create map. - map = L.map('map', + // Create map. + map = L.map('map', {layers: [baseTiles /*, heatmapLayerForEarlyVehicles, heatmapLayerForLateVehicles */]}); L.control.scale({metric: false}).addTo(map); map.addLayer(heatmapLayerForLateVehicles); map.addLayer(heatmapLayerForEarlyVehicles); - + // Set the CLIP_PADDING to a higher value so that when user pans on map // the route path doesn't need to be redrawn. Note: leaflet documentation // says that this could decrease drawing performance. But hey, it looks // better. L.Path.CLIP_PADDING = 0.8; - - + + // Set map bounds to the agency extent - $.getJSON(apiUrlPrefix + "/command/agencyGroup", + $.getJSON(apiUrlPrefix + "/command/agencyGroup", function(agencies) { // Fit the map initially to the agency var e = agencies.agency[0].extent; map.fitBounds([[e.minLat, e.minLon], [e.maxLat, e.maxLon]]); - + // Note: setting of data must be done after bounds is adjusted // for map. Otherwise fitBounds() will try to access heatmap - // before it has been properly initialized. This is + // before it has been properly initialized. This is // apparently a bug with heatmap.js . - + // NOTES: min can't be negative. If negative the range is // max-min but the min will be 0. // Max ends up being increased to maximum value of data values. @@ -145,25 +145,25 @@ function createMap(mapTileUrl, mapTileCopyright) { }; heatmapLayerForLateVehicles.setData(lateTestData); - }); + }); } function getAndProcessData() { - $.getJSON(apiUrlPrefix + "/command/vehiclesDetails", + $.getJSON(apiUrlPrefix + "/command/vehiclesDetails", function(jsonData) { var len = jsonData.vehicle.length; var data = {}; data.min = -360000; // Negative means vehicle is late - data.max = 120000; - + data.max = 120000; + var dataArray = []; while (len--) { var vehicle = jsonData.vehicle[len]; - + // If no schedule adherence info for vehicle skip it if (!vehicle.schAdh) continue; - + var dataObj = {lat: vehicle.loc.lat, lng: vehicle.loc.lon, value: vehicle.schAdh}; dataArray.push(dataObj); } @@ -175,16 +175,16 @@ function getAndProcessData() { * When page finishes loading then create map */ $( document ).ready(function() { - createMap('<%= WebConfigParams.getMapTileUrl() %>', + createMap('<%= WebConfigParams.getMapTileUrl() %>', '<%= WebConfigParams.getMapTileCopyright() %>'); - + // FIXME getAndProcessData(); }); - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/maps/index.jsp b/transitclockWebapp/src/main/webapp/maps/index.jsp index 68781d63c..166d0a29c 100644 --- a/transitclockWebapp/src/main/webapp/maps/index.jsp +++ b/transitclockWebapp/src/main/webapp/maps/index.jsp @@ -1,7 +1,7 @@ <%@page import="org.transitclock.db.webstructs.WebAgency"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <% String agencyId = request.getParameter("a"); @@ -12,25 +12,25 @@ if (agencyId == null || agencyId.isEmpty()) { %> -<%@include file="/template/includes.jsp" %> - -Status Pages +<%@include file="/template/includes.jsp" %> + +<fmt:message key="div.statuspages" /> <%@include file="/template/header.jsp" %>
-
Real-time Maps for <%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
+
<%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/maps/map.jsp b/transitclockWebapp/src/main/webapp/maps/map.jsp index 57ac6b5b2..df6993046 100644 --- a/transitclockWebapp/src/main/webapp/maps/map.jsp +++ b/transitclockWebapp/src/main/webapp/maps/map.jsp @@ -1,9 +1,9 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@page import="org.transitclock.web.WebConfigParams"%> - - + - + <%@include file="/template/includes.jsp" %> @@ -32,7 +32,7 @@ <% } %> - + @@ -42,23 +42,23 @@ body { margin: 0px; } - + /* Set width of route selector. For smaller displays use smaller width */ #routes { width: 400px; } - + @media (max-width:600px) { #routes { width: 300px; } } - + - - - - Transitime Map + + + + <fmt:message key="div.transitimemaps" /> @@ -68,18 +68,18 @@
- + + to set the css width here. Yes, strange! -->
- +
- + diff --git a/transitclockWebapp/src/main/webapp/maps/schAdhMap.jsp b/transitclockWebapp/src/main/webapp/maps/schAdhMap.jsp index c6f5c34bd..c7e078e0d 100644 --- a/transitclockWebapp/src/main/webapp/maps/schAdhMap.jsp +++ b/transitclockWebapp/src/main/webapp/maps/schAdhMap.jsp @@ -1,24 +1,25 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> -<%-- Shows real-time schedule adherence, for all vehicles, in a map. --%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%-- Shows real-time schedule adherence, for all vehicles, in a map. --%> <%@page import="org.transitclock.web.WebConfigParams"%> - -Schedule Adherence Map + + <%@include file="/template/includes.jsp" %> + +<fmt:message key="div.scheduleadherencemaps" /> - <%@include file="/template/includes.jsp" %> - + @@ -32,7 +33,7 @@ var routeOptions = { }; var vehiclePopupOptions = { - offset: L.point(0,-2), + offset: L.point(0,-2), closeButton: false }; @@ -41,24 +42,17 @@ var map; // Global so can keep track and delete all vehicles at once var vehicleLayer; -/** - * Returns content for vehicle popup window. For showing vehicle ID and +/** + * Returns content for vehicle popup window. For showing vehicle ID and * schedule adherence. */ function getVehiclePopupContent(vehicle) { - var content = - "Vehicle: " + vehicle.id - + "
Route: " + vehicle.routeName; - if (vehicle.headsign) - content += "
To: " + vehicle.headsign; - if (vehicle.schAdhStr) - content += "
SchAhd: " + vehicle.schAdhStr; - if (vehicle.block) - content += "
Block: " + vehicle.block; - if (vehicle.driver) - content += "
Driver: " + vehicle.driver; - - return content; + return ': ' + vehicle.id + + '
: ' + vehicle.routeName + + '
: ' + vehicle.headsign + + '
: ' + vehicle.schAdhStr + + '
: ' + vehicle.block + + '
: ' + vehicle.driver; } /** @@ -66,16 +60,16 @@ function getVehiclePopupContent(vehicle) { */ function getAndProcessSchAdhData() { // Do API call to get schedule adherence data - $.getJSON(apiUrlPrefix + "/command/vehiclesDetails?onlyAssigned=true", + $.getJSON(apiUrlPrefix + "/command/vehiclesDetails", // Process data function(jsonData) { var newVehicleLayer = L.featureGroup(); - + // Add new vehicles var len = jsonData.vehicles.length; while (len--) { var vehicle = jsonData.vehicles[len]; - + // If no schedule adherence info for vehicle skip it if (!vehicle.schAdh) continue; @@ -87,14 +81,14 @@ function getAndProcessSchAdhData() { var directionColor = '#0a0'; if (vehicle.direction == "1") directionColor = '#00f'; - + // For determining gradiation of how early/late a vehicle is var earlyTime = 30000; // 30 seconds var maxEarly = 180000; // 3 minutes var lateTime = -120000; // 2 minutes var maxLate = -960000; // 16 minutes var msecPerRadiusPixels = 33000; - + // Determine radius and color for vehicle depending on how early/late it is var radius; var fillColor; @@ -104,8 +98,8 @@ function getAndProcessSchAdhData() { radius = 5 - (Math.max(maxLate, vehicle.schAdh) - lateTime)/msecPerRadiusPixels; fillColor = '#E6D83E'; fillOpacity = 0.5; - } else if (vehicle.schAdh > earlyTime) { - // Vehicle is early. Since early is worse make radius + } else if (vehicle.schAdh > earlyTime) { + // Vehicle is early. Since early is worse make radius // of larger by using msecPerRadiusPixels/2 radius = 5 + (Math.min(maxEarly, vehicle.schAdh) - earlyTime)/(msecPerRadiusPixels/2); fillColor = '#E34B71'; @@ -113,10 +107,10 @@ function getAndProcessSchAdhData() { } else { // Vehicle is ontime radius = 5; - fillColor = '#37E627'; + fillColor = '#37E627'; fillOpacity = 0.5; } - + // Specify options on how circle is be drawn. Depends // on how early/late a vehicle is var vehicleMarkerOptions = { @@ -128,19 +122,19 @@ function getAndProcessSchAdhData() { // Set size and color of circle depending on how // early or late the vehicle is radius: radius, - fillColor: fillColor, + fillColor: fillColor, fillOpacity: fillOpacity, }; - + // Create circle for vehicle showing schedule adherence - var vehicleMarker = - L.circleMarker([vehicle.loc.lat, vehicle.loc.lon], + var vehicleMarker = + L.circleMarker([vehicle.loc.lat, vehicle.loc.lon], vehicleMarkerOptions); newVehicleLayer.addLayer(vehicleMarker); - + // Store vehicle data obtained via AJAX with stopMarker so it can be used in popup vehicleMarker.vehicle = vehicle; - + // Create popup window for vehicle when clicked on vehicleMarker.on('click', function(e) { var content = getVehiclePopupContent(this.vehicle); @@ -151,18 +145,18 @@ function getAndProcessSchAdhData() { this.popup = L.popup(vehiclePopupOptions, this) .setLatLng(latlng) .setContent(content).openOn(map); - }); + }); } // End of while loop - + // Remove old vehicles if (vehicleLayer) map.removeLayer(vehicleLayer); - + // Add all the vehicles at once newVehicleLayer.addTo(map); - - // Remember the vehicle layer so can remove all the old + + // Remember the vehicle layer so can remove all the old // vehicles next time updating the map vehicleLayer = newVehicleLayer; }); @@ -174,30 +168,30 @@ function getAndProcessSchAdhData() { function routeConfigCallback(routeData, status) { // So can make sure routes are drawn below the stops var routeFeatureGroup = L.featureGroup(); - + // For each route for (var r=0; rOpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', - attribution: '© OpenStreetMap & CC-BY-SA, Imagery ©<%= WebConfigParams.getMapTileCopyright() %>', + //attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery � Mapbox', + attribution: '© OpenStreetMap & CC-BY-SA, Imagery �<%= WebConfigParams.getMapTileCopyright() %>', maxZoom: 19 }).addTo(map); @@ -222,15 +216,15 @@ function createMap(mapTileUrl, mapTileCopyright) { // says that this could decrease drawing performance. But hey, it looks // better. L.Path.CLIP_PADDING = 0.8; - + // Set map bounds to the agency extent - $.getJSON(apiUrlPrefix + "/command/agencyGroup", + $.getJSON(apiUrlPrefix + "/command/agencyGroup", function(agencies) { // Fit the map initially to the agency var e = agencies.agency[0].extent; map.fitBounds([[e.minLat, e.minLon], [e.maxLat, e.maxLon]]); - }); - + }); + // Get route config data and draw all routes $.getJSON(apiUrlPrefix + "/command/routesDetails", routeConfigCallback); @@ -246,7 +240,7 @@ function createMap(mapTileUrl, mapTileCopyright) { * When page finishes loading then create map */ $( document ).ready(function() { - createMap('<%= WebConfigParams.getMapTileUrl() %>', + createMap('<%= WebConfigParams.getMapTileUrl() %>', '<%= WebConfigParams.getMapTileCopyright() %>'); }); @@ -256,4 +250,4 @@ $( document ).ready(function() {
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/maps/smartphoneMap.html b/transitclockWebapp/src/main/webapp/maps/smartphoneMap.html new file mode 100644 index 000000000..145febe8b --- /dev/null +++ b/transitclockWebapp/src/main/webapp/maps/smartphoneMap.html @@ -0,0 +1,210 @@ + + + + + +<fmt:message key="div.smartphonemap" /> + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + diff --git a/transitclockWebapp/src/main/webapp/maps/smartphoneMap.jsp b/transitclockWebapp/src/main/webapp/maps/smartphoneMap.jsp index 9ad60a8ce..c3d4b0b97 100644 --- a/transitclockWebapp/src/main/webapp/maps/smartphoneMap.jsp +++ b/transitclockWebapp/src/main/webapp/maps/smartphoneMap.jsp @@ -1,21 +1,21 @@ <%@page import="org.transitclock.web.WebConfigParams"%> - - -Smartphone Map + +<fmt:message key="div.smartphonemap2" /> - + - + - @@ -33,7 +33,7 @@ margin: 0px; } - + - +
- +
- + - \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/agenciesApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/agenciesApiParams.jsp index 3b092203b..c084d53d1 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/agenciesApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/agenciesApiParams.jsp @@ -1,11 +1,12 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs9" /> @@ -18,24 +19,24 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Agencies API +
- -
+ +
<%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%> - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksApiParams.jsp index a2685fea5..71022930b 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs10" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Blocks API +
- -
+ +
<%-- Create block selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksTerseApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksTerseApiParams.jsp index 21b35d55f..810d26944 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksTerseApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/blocksTerseApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs11" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Blocks Terse API +
- -
+ +
<%-- Create block selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp index 6c61cb242..b798b72ce 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeTripUpdatesApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs12" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for GTFS-Realtime Trip Updates API +
- -
+ +
- Binary - Human Readable + +
- - <%-- Create submit button --%> - - + + <%-- Create submit button --%> + +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeVehiclePositionsApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeVehiclePositionsApiParams.jsp index 529f972a8..ad5eced87 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeVehiclePositionsApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/gtfsRealtimeVehiclePositionsApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs13" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for GTFS-Realtime Vehicle Positions API +
- -
+ +
- Binary - Human Readable + +
- - <%-- Create submit button --%> - - + + <%-- Create submit button --%> + +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/horizStopsScheduleApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/horizStopsScheduleApiParams.jsp index 95a3ced09..5f2db7a63 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/horizStopsScheduleApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/horizStopsScheduleApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs14" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Schedule (Horizontal Stops) API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - - + + <%-- Create submit button --%> + +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/index.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/index.jsp index 022af641c..46d363e09 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/index.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/index.jsp @@ -1,7 +1,7 @@ <%@page import="org.transitclock.db.webstructs.WebAgency"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <% String agencyId = request.getParameter("a"); @@ -13,58 +13,58 @@ if (agencyId == null || agencyId.isEmpty()) { <%@include file="/template/includes.jsp" %> - -API Calls + +<fmt:message key="div.apicalls" /> <%@include file="/template/header.jsp" %> diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocApiParams.jsp index 6ef13208f..0659169f5 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs15" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Predictions by Location API +
- -
+ +
- +
- +
- - meters (default is 1500m) + +
- - (default is 3 per stop) + +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocForAllAgenciesApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocForAllAgenciesApiParams.jsp index 65c193873..d71c2eba2 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocForAllAgenciesApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByLocForAllAgenciesApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs16" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Predictions by Location API +
- -
+ +
- +
- +
- - meters (default is 1500m) + +
- - (default is 3 per stop) + +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - - + + <%-- Create submit button --%> + +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByRouteStopApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByRouteStopApiParams.jsp index 89489da16..728797c11 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByRouteStopApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/predsByRouteStopApiParams.jsp @@ -1,16 +1,17 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs17" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Predictions by Route/Stop API +
- -
+ +
<%-- Create route selector --%> - +
- +
- +
- - (default is 3 per stop) + +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/resetVehicleApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/resetVehicleApiParams.jsp index 5615bbbf7..b1a221beb 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/resetVehicleApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/resetVehicleApiParams.jsp @@ -1,11 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs18" /> @@ -30,7 +35,7 @@ <%@include file="/template/header.jsp" %>
- Select Parameters for Reset Vehicle API +
diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/routeApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/routeApiParams.jsp index 66f35c9e8..6c87903a2 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/routeApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/routeApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs19" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for routes API +
- -
+ +
<%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/routeDetailsApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/routeDetailsApiParams.jsp index 3df3df2be..f8ea4c689 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/routeDetailsApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/routeDetailsApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs20" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for routesDetails API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsApiParams.jsp index e283d31ad..c57b1e74b 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsApiParams.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs21" /> @@ -18,24 +18,24 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Service IDs API +
- -
+ +
<%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%> - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsCurrentApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsCurrentApiParams.jsp index e9a2a8877..2e382b257 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsCurrentApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/serviceIdsCurrentApiParams.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs22" /> @@ -18,24 +18,24 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Current Service IDs API +
- -
+ +
<%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%> - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/siriStopMonitoringApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/siriStopMonitoringApiParams.jsp index 595def43b..fe736841e 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/siriStopMonitoringApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/siriStopMonitoringApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs23" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Predictions by Route/Stop API +
- -
+ +
<%-- Create route selector --%> - +
- +
- +
- - (default is 3 per stop) + +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/siriVehicleMonitoringApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/siriVehicleMonitoringApiParams.jsp index d3053e2ca..d837a33de 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/siriVehicleMonitoringApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/siriVehicleMonitoringApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs24" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for SIRI Vehicle Montitoring API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/tripApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/tripApiParams.jsp index d93a600e1..6c7753251 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/tripApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/tripApiParams.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs25" /> @@ -13,8 +13,8 @@ function execute() { var tripId = $("#tripId").val(); var format = $('input:radio[name=format]:checked').val(); - - var url = apiUrlPrefix + "/command/trip" + + var url = apiUrlPrefix + "/command/trip" + "?tripId=" + tripId + "&format=" + format; @@ -22,28 +22,28 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Trip API +
- -
+ +
- +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/tripWithTravelTimesApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/tripWithTravelTimesApiParams.jsp index d5a338f5a..fd77db99f 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/tripWithTravelTimesApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/tripWithTravelTimesApiParams.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs26" /> @@ -13,8 +13,8 @@ function execute() { var tripId = $("#tripId").val(); var format = $('input:radio[name=format]:checked').val(); - - var url = apiUrlPrefix + "/command/tripWithTravelTimes" + + var url = apiUrlPrefix + "/command/tripWithTravelTimes" + "?tripId=" + tripId + "&format=" + format; @@ -22,28 +22,28 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Trip API +
- -
+ +
- +
- + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> - + + <%-- Create submit button --%> +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehicleConfigsApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehicleConfigsApiParams.jsp index 9d6f8bd11..77ba64ab8 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehicleConfigsApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehicleConfigsApiParams.jsp @@ -1,11 +1,11 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs27" /> @@ -18,24 +18,24 @@ location.href = url; } - + <%@include file="/template/header.jsp" %>
- Select Parameters for Vehicle Configurations API +
- -
+ +
<%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%> - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesApiParams.jsp index c0ff9ad98..2d8009a9a 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs28" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Vehicles API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesDetailsApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesDetailsApiParams.jsp index 86acb638f..822ab0969 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesDetailsApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/vehiclesDetailsApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs29" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Vehicles Details API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/apiCalls/vertStopsScheduleApiParams.jsp b/transitclockWebapp/src/main/webapp/reports/apiCalls/vertStopsScheduleApiParams.jsp index 2bb78286e..b11ce3b58 100644 --- a/transitclockWebapp/src/main/webapp/reports/apiCalls/vertStopsScheduleApiParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/apiCalls/vertStopsScheduleApiParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs30" /> - + - + <%@include file="/template/header.jsp" %>
- Select Parameters for Schedule (Vertical Stops) API +
- -
+ +
<%-- Create route selector --%> - + <%-- Create json/xml format radio buttons --%> - - <%-- Create submit button --%> + + <%-- Create submit button --%>
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/avlJsonData.jsp b/transitclockWebapp/src/main/webapp/reports/avlJsonData.jsp index 71537b9ea..94ee3378b 100644 --- a/transitclockWebapp/src/main/webapp/reports/avlJsonData.jsp +++ b/transitclockWebapp/src/main/webapp/reports/avlJsonData.jsp @@ -12,10 +12,10 @@ String beginTime = request.getParameter("beginTime"); String endTime = request.getParameter("endTime"); // Query db and get JSON string -String jsonString = AvlJsonQuery.getAvlJson(agencyId, vehicleId, beginDate, numDays, beginTime, endTime); +String jsonString = AvlJsonQuery.getAvlWithMatchesJson(agencyId, vehicleId, routeId, beginDate, numDays, beginTime, endTime); // Respond with the JSON string response.setContentType("application/json"); response.setHeader("Access-Control-Allow-Origin", "*"); response.getWriter().write(jsonString); -%> +%> \ No newline at end of file diff --git a/transitclockWebapp/src/main/webapp/reports/avlMap.jsp b/transitclockWebapp/src/main/webapp/reports/avlMap.jsp index 482b7daa6..85870465a 100644 --- a/transitclockWebapp/src/main/webapp/reports/avlMap.jsp +++ b/transitclockWebapp/src/main/webapp/reports/avlMap.jsp @@ -1,65 +1,284 @@ -<%@ page import="org.transitclock.utils.web.WebUtils" %> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - - - - - - - - - - - <%@include file="/template/includes.jsp" %> - - - - - - - - - - - - - - - AVL Data Map - - - - - -
-
-
- - -
- - Export -
-
-
-
- - - - - -
-
1X
-
00:00:00
-
-
- - - - - +<%@ page import="org.transitclock.utils.web.WebUtils" %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + + + + <%@include file="/template/includes.jsp" %> + + + + + + + <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + + + + + + + + + <fmt:message key="div.avldata" /> + + + + + +
+ + + + + diff --git a/transitclockWebapp/src/main/webapp/reports/avlMapByRouteParams.jsp b/transitclockWebapp/src/main/webapp/reports/avlMapByRouteParams.jsp index 6d31fd78f..88639192b 100644 --- a/transitclockWebapp/src/main/webapp/reports/avlMapByRouteParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/avlMapByRouteParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specify" /> - + @@ -18,21 +18,21 @@ <%@include file="/template/header.jsp" %>
- Select Parameters for Displaying AVL Data in Map by Route +
- +
<%-- For passing agency param to the report --%> "> - + - + - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/avlMapByVehicleParams.jsp b/transitclockWebapp/src/main/webapp/reports/avlMapByVehicleParams.jsp index 361cbc5d2..f1e591fae 100644 --- a/transitclockWebapp/src/main/webapp/reports/avlMapByVehicleParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/avlMapByVehicleParams.jsp @@ -1,16 +1,16 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs" /> - + @@ -18,27 +18,27 @@ <%@include file="/template/header.jsp" %>
- Select Parameters for Displaying AVL Data in Map by Vehicle +
- +
<%-- For passing agency param to the report --%> "> - + - + - + - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/index.jsp b/transitclockWebapp/src/main/webapp/reports/index.jsp index 30c7e87ce..9656cfc08 100644 --- a/transitclockWebapp/src/main/webapp/reports/index.jsp +++ b/transitclockWebapp/src/main/webapp/reports/index.jsp @@ -1,8 +1,8 @@ <%@page import="org.transitclock.db.webstructs.WebAgency"%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> - +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% String agencyId = request.getParameter("a"); if (agencyId == null || agencyId.isEmpty()) { @@ -13,101 +13,76 @@ if (agencyId == null || agencyId.isEmpty()) { <%@include file="/template/includes.jsp" %> - - -Historical Reports + + + +<fmt:message key="div.historical" /> <%@include file="/template/header.jsp" %>
-
Historical Reports for <%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
+
<%= WebAgency.getCachedWebAgency(agencyId).getAgencyName() %>
-
Prediction Accuracy
(only for agencies where prediction accuracy stored to database)
+

- -
AVL Reports
- -
Event Reports
- -
- -
Schedule Adherence Reports
+
+
+ -
Miscellaneous Reports
+
- -
Status Reports
- -
diff --git a/transitclockWebapp/src/main/webapp/reports/lastAvlJsonData.jsp b/transitclockWebapp/src/main/webapp/reports/lastAvlJsonData.jsp index 8f163d607..5fba83777 100644 --- a/transitclockWebapp/src/main/webapp/reports/lastAvlJsonData.jsp +++ b/transitclockWebapp/src/main/webapp/reports/lastAvlJsonData.jsp @@ -1,34 +1,12 @@ -<%@ page language="java" contentType="application/json; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="application/json; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.reports.GenericJsonQuery" %> -<%@ page import="org.transitclock.db.webstructs.WebAgency" %> -<%@ page import="org.transitclock.utils.Time" %> -<%@ page import="java.text.ParseException" %> <% +String sql = + "SELECT vehicleId, max(time) AS maxTime " + + "FROM avlreports WHERE time > now() + '-24 hours' " + + "GROUP BY vehicleId;"; String agencyId = request.getParameter("a"); -WebAgency agency = WebAgency.getCachedWebAgency(agencyId); -String dbtype = agency.getDbType(); -String sql = null; -if(dbtype.equals("mysql")){ - sql = - "SELECT a.vehicleId, maxTime, lat, lon " - + "FROM " - + "(SELECT vehicleId, max(time) AS maxTime " - + "FROM AvlReports WHERE time > date_sub(now(), interval 1 day) " - + "GROUP BY vehicleId) a " - + "JOIN AvlReports b ON a.vehicleId=b.vehicleId AND a.maxTime = b.time"; -} -if(dbtype.equals("postgresql")) -{ - sql = - "select a.vehicleId as \"vehicleId\", a.maxTime as \"maxTime\", lat, lon from ( " - + "SELECT vehicleId, max(time) AS maxTime " - + "FROM avlreports WHERE time > now() + '-24 hours' " - + "GROUP BY vehicleId) a " - + "JOIN AvlReports b ON a.vehicleId=b.vehicleId AND a.maxTime = b.time"; -} - - String jsonString = GenericJsonQuery.getJsonString(agencyId, sql); response.setHeader("Access-Control-Allow-Origin", "*"); response.getWriter().write(jsonString); diff --git a/transitclockWebapp/src/main/webapp/reports/lastAvlReport.jsp b/transitclockWebapp/src/main/webapp/reports/lastAvlReport.jsp index a29ce0da8..22c4489b3 100644 --- a/transitclockWebapp/src/main/webapp/reports/lastAvlReport.jsp +++ b/transitclockWebapp/src/main/webapp/reports/lastAvlReport.jsp @@ -1,5 +1,5 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> <% @@ -12,8 +12,8 @@ if (agencyId == null || agencyId.isEmpty()) { <%@include file="/template/includes.jsp" %> - -Last GPS Reports for Vehicles + +<fmt:message key="div.lastgpsreports" /> <% String currentDateStr = org.transitclock.utils.Time.dateStr(new java.util.Date()); %> - +
- - +
- - +
End date must be after the begin date." size="10" value="<%= currentDateStr%>" />
- +
- +
Format: hh:mm, as in '07:00' for 7AM." size="3" value="" /> (hh:mm)
- - + (hh:mm) -
\ No newline at end of file +
diff --git a/transitclockWebapp/src/main/webapp/reports/params/reportParams.css b/transitclockWebapp/src/main/webapp/reports/params/reportParams.css index b5ba37a7b..d524c8f8d 100644 --- a/transitclockWebapp/src/main/webapp/reports/params/reportParams.css +++ b/transitclockWebapp/src/main/webapp/reports/params/reportParams.css @@ -6,4 +6,4 @@ label {width: 200px; float: left; text-align: right; margin-top: 4px; margin-rig .submitDiv{ margin-top: 40px; text-align: center; } #radioButtonsDiv {margin-top: 13px; text-align: center;} .note {font-size: small;} -#allowableEarly, #allowableLate, #intervalPercentage1, #intervalPercentage2 { width: 3em; } \ No newline at end of file + \ No newline at end of file diff --git a/transitclockWebapp/src/main/webapp/reports/params/routeAllOrSingle.jsp b/transitclockWebapp/src/main/webapp/reports/params/routeAllOrSingle.jsp index 4fe318ecb..91c3d5a03 100644 --- a/transitclockWebapp/src/main/webapp/reports/params/routeAllOrSingle.jsp +++ b/transitclockWebapp/src/main/webapp/reports/params/routeAllOrSingle.jsp @@ -1,12 +1,18 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + + <%-- For creating a route selector parameter via a jsp include. - User can select all routes (r param then set to " ") or a single - route (but not an arbitrary multiple of routes). - Select is created by reading in routes via API for the agency + User can select all routes (r param then set to " ") or a single + route (but not an arbitrary multiple of routes). + Select is created by reading in routes via API for the agency specified by the "a" param. --%> + - + <%@include file="/template/header.jsp" %> - + @@ -93,7 +93,7 @@ if ((beginTime != null && !beginTime.isEmpty()) || (endTime != null && !endTime. - + - \ No newline at end of file diff --git a/transitclockWebapp/src/main/webapp/reports/predAccuracyIntervalsParams.jsp b/transitclockWebapp/src/main/webapp/reports/predAccuracyIntervalsParams.jsp index 9e2f9a30f..3cd23fb79 100644 --- a/transitclockWebapp/src/main/webapp/reports/predAccuracyIntervalsParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/predAccuracyIntervalsParams.jsp @@ -1,96 +1,108 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> + + + <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs3" /> - - + + <%@include file="/template/header.jsp" %>
- Select Parameters for Prediction Accuracy Intervals Chart +
- +
<%-- For passing agency param to the report --%> "> - + - + - - - +
- - + + + + +
+ +
+ +
- +
- +
- +
- + % + title="For when using a 'Percentage' interval type. Specifies the + percent of predictions that should lie within the minimum + and maximum intervals." + size="1" + value="70" /> %
- +
- + % + title="Optional value for when using a 'Percentage' interval type. + Specifies a second percent of predictions that should lie within + the minimum and maximum intervals." + size="1" /> %
- +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/predAccuracyRangeChart.jsp b/transitclockWebapp/src/main/webapp/reports/predAccuracyRangeChart.jsp index 41cf91992..ff9569716 100644 --- a/transitclockWebapp/src/main/webapp/reports/predAccuracyRangeChart.jsp +++ b/transitclockWebapp/src/main/webapp/reports/predAccuracyRangeChart.jsp @@ -1,8 +1,8 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> <%@page import="org.transitclock.db.webstructs.WebAgency"%> -<% +<% // Determine all the parameters from the query string // Determine agency using "a" param @@ -14,7 +14,7 @@ String routeIds[] = request.getParameterValues("r"); String titleRoutes = ""; if (routeIds != null && !routeIds[0].isEmpty()) { titleRoutes += ", route "; - if (routeIds.length > 1) + if (routeIds.length > 1) titleRoutes += "s"; titleRoutes += routeIds[0]; for (int i=1; i 1 ? "s" : ""); - + if ((beginTime != null && !beginTime.isEmpty()) || (endTime != null && !endTime.isEmpty())) { chartTitle += ", " + beginTime + " to " + endTime; } -%> - +%> + <%@include file="/template/includes.jsp" %> - - Prediction Accuracy + + <fmt:message key="div.predictionaccuracy4" /> - + <%@include file="/template/includes.jsp" %> - + - - + + Schedule Adherence <%@include file="/template/header.jsp" %> - + <% - String dateRange = request.getParameter("beginDate") + " (+" + request.getParameter("numDays") + " days)"; String allowableEarly = request.getParameter("allowableEarly");; String allowableLate = request.getParameter("allowableLate");; - String chartSubtitle = allowableEarly + " min early to " - + allowableLate + " min late
" + dateRange; + String chartSubtitle = allowableEarly + " min early to " + + allowableLate + " min late
" + + request.getParameter("dateRange"); String beginTime = request.getParameter("beginTime"); String endTime = request.getParameter("endTime"); @@ -64,7 +64,7 @@ if (endTime.isEmpty()) endTime = "24:00"; // default value chartSubtitle += ", " + beginTime + " to " + endTime; - } + } %>
Schedule Adherence by Route
@@ -79,37 +79,37 @@ var globalDataTable; var globalNumberOfRoutes; - function drawChart() { + function drawChart() { var vertSpaceForTitleAndHAxis = 150; var vertSpaceForChart = (globalNumberOfRoutes + 1) * 36; var chartDivHeight = vertSpaceForTitleAndHAxis + vertSpaceForChart; - + // Need to set height of the chart div if more than 5 elements // so that they fit properly if (globalNumberOfRoutes > 0) { $("#chart_div").height(chartDivHeight); } - + var options = { animation: { startup: true, - duration: 500, + duration: 500, easing: 'out' }, bars: 'horizontal', isStacked: 'percent', - + // Don't want lots of space between bars bar: { groupWidth: '95%' }, - + // Make chart area a fixed offset so won't have default behavior of // making offset really big if the chart is really tall. // Use small height than default to make sure units show for hAxis. // Use smaller width than default so that have room for route // names and the legend on the right chartArea: {top: 10, height: vertSpaceForChart, width: '70%'}, - - // Need to set font size for things since default is to use font + + // Need to set font size for things since default is to use font // size proportional to height of chart and since could show many // routes can end up with silly large fonts. annotations: {textStyle: {fontSize: 12}}, @@ -117,7 +117,7 @@ var globalNumberOfRoutes; vAxis: {textStyle: {fontSize: 16}}, hAxis: {textStyle: {fontSize: 16}}, legend: {textStyle: {fontSize: 16}, position: 'right'}, - + // Use proper colors for late, ontime, and early series: [{'color': '#F0DB56'}, {'color': '#6FD656'}, {'color': '#E84D5F'}], }; @@ -126,88 +126,88 @@ var globalNumberOfRoutes; // only seems to work with old style ones. var chart = new google.visualization.BarChart(document.getElementById('chart_div')); chart.draw(globalDataTable, options); - - // Following is for Google "Material" chart but found that many things + + // Following is for Google "Material" chart but found that many things // didn't work, like animation. //var chart = new google.charts.Bar(document.getElementById('chart_div')); //chart.draw(globalDataTable, google.charts.Bar.convertOptions(options)); } - + function createDataTableAndDrawChart(jsonData) { // Initialize dataArray with the column info var dataArray = [[ - 'Route', + 'Route', 'Late', {role: 'style'}, { role: 'tooltip'}, { role: 'annotation'}, 'On Time', {role: 'style'}, { role: 'tooltip'}, { role: 'annotation'}, 'Early', {role: 'style'}, { role: 'tooltip'}, { role: 'annotation'} ]]; - + // Add data for each route to the dataArray var totalEarly = 0; var totalOntime = 0; var totalLate = 0; for (var i=0; i 0 ? latePercent.toFixed(1) + '%' : '', - ontimePercent, - 'opacity: 1.0', - 'On time: ' + route.ontime + ' out of ' + route.total + ' stops', + ontimePercent, + 'opacity: 1.0', + 'On time: ' + route.ontime + ' out of ' + route.total + ' stops', route.ontime > 0 ? ontimePercent.toFixed(1) + '%' : '', - earlyPercent, - 'opacity: 1.0', - 'Early: ' + route.early + ' out of ' + route.total + ' stops', + earlyPercent, + 'opacity: 1.0', + 'Early: ' + route.early + ' out of ' + route.total + ' stops', (route.early > 0) ? earlyPercent.toFixed(1) + '%' : '' ]; dataArray.push(dataArrayForRoute); - + totalEarly += route.early; totalOntime += route.ontime; totalLate += route.late; } - + // Add totals row to output if showing data for more than a single route if (jsonData.data.length > 1) { var totalTotal = totalEarly + totalOntime + totalLate; - var earlyPercent = (100.0 * totalEarly / totalTotal); - var ontimePercent = (100.0 * totalOntime / totalTotal); - var latePercent = (100.0 * totalLate / totalTotal); + var earlyPercent = (100.0 * totalEarly / totalTotal); + var ontimePercent = (100.0 * totalOntime / totalTotal); + var latePercent = (100.0 * totalLate / totalTotal); var dataArrayForRoute = [ 'Combined', - latePercent, - 'opacity: 1.0', - 'Late: ' + totalLate + ' out of ' + totalTotal + ' stops', + latePercent, + 'opacity: 1.0', + 'Late: ' + totalLate + ' out of ' + totalTotal + ' stops', latePercent.toFixed(1) + '%', - ontimePercent, - 'opacity: 1.0', - 'On time: ' + totalOntime + ' out of ' + totalTotal + ' stops', + ontimePercent, + 'opacity: 1.0', + 'On time: ' + totalOntime + ' out of ' + totalTotal + ' stops', ontimePercent.toFixed(1) + '%', - earlyPercent, - 'opacity: 1.0', - 'Early: ' + totalEarly + ' out of ' + totalTotal + ' stops', + earlyPercent, + 'opacity: 1.0', + 'Early: ' + totalEarly + ' out of ' + totalTotal + ' stops', earlyPercent.toFixed(1) + '%' ]; - dataArray.push(dataArrayForRoute); + dataArray.push(dataArrayForRoute); } - + // Remember how many rows so can set height of chart when it is created globalNumberOfRoutes = jsonData.data.length; - - globalDataTable = + + globalDataTable = google.visualization.arrayToDataTable(dataArray); - + $("#loading").fadeOut("fast"); drawChart(); } - + function getDataAndDrawChart() { $.ajax({ // The page being requested @@ -220,9 +220,9 @@ var globalNumberOfRoutes; success: createDataTableAndDrawChart, // When there is an AJAX problem alert the user error: function(request, status, error) { - console.log(request.responseText) - var msg = $("

").html("
No data for requested parameters. Hit back button to try other parameters.") - $("#errorMessage").append(msg);; + //alert(error + '. ' + request.responseText); + $("#errorMessage").html(request.responseText + + "

Hit back button to try other parameters."); $("#errorMessage").fadeIn("fast"); $("#loading").fadeOut("slow"); }, @@ -246,4 +246,4 @@ var globalNumberOfRoutes; - \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByRouteData.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByRouteData.jsp index c6ba52655..fb1375471 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByRouteData.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByRouteData.jsp @@ -13,8 +13,8 @@ allowableEarlyMinutes - how early vehicle can be and still be OK. Decimal format OK. allowableLateMinutes - how early vehicle can be and still be OK. Decimal format OK. --%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.reports.GenericJsonQuery" %> <%@ page import="org.transitclock.reports.SqlUtils" %> <% @@ -31,24 +31,24 @@ String allowableLateMinutesStr = "'" + SqlUtils.convertMinutesToSecs(allowableLa String sql = "SELECT " - + " COUNT(CASE WHEN scheduledTime-time > " + allowableEarlyMinutesStr + " THEN 1 ELSE null END) as early, \n" - + " COUNT(CASE WHEN scheduledTime-time <= " + allowableEarlyMinutesStr + " AND time-scheduledTime <= " + + " COUNT(CASE WHEN scheduledtime-time > " + allowableEarlyMinutesStr + " THEN 1 ELSE null END) as early, \n" + + " COUNT(CASE WHEN scheduledtime-time <= " + allowableEarlyMinutesStr + " AND time-scheduledtime <= " + allowableLateMinutesStr + " THEN 1 ELSE null END) AS ontime, \n" - + " COUNT(CASE WHEN time-scheduledTime > " + allowableLateMinutesStr + " THEN 1 ELSE null END) AS late, \n" + + " COUNT(CASE WHEN time-scheduledtime > " + allowableLateMinutesStr + " THEN 1 ELSE null END) AS late, \n" + " COUNT(*) AS total, \n" + " r.name \n" - + "FROM ArrivalsDepartures ad, Routes r \n" + + "FROM arrivalsdepartures ad, routes r \n" + "WHERE " // For joining in route table to get route name + "ad.configrev = r.configrev \n" - + " AND ad.routeShortName = r.shortName \n" + + " AND ad.routeshortname = r.shortname \n" // Only need arrivals/departures that have a schedule time - + " AND ad.scheduledTime IS NOT NULL \n" + + " AND ad.scheduledtime IS NOT NULL \n" // Specifies which routes to provide data for + SqlUtils.routeClause(request, "ad") + "\n" + SqlUtils.timeRangeClause(request, "ad.time", 7) + "\n" // Grouping needed since want to output route name - + " GROUP BY r.name, r.routeOrder ORDER BY r.routeOrder, r.name;"; + + " GROUP BY r.name, r.routeorder ORDER BY r.routeorder, r.name;"; // Just for debugging System.out.println("\nFor schedule adherence by route query sql=\n" + sql); diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByRouteParams.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByRouteParams.jsp index 3a219c94a..d0ffb1b87 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByRouteParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByRouteParams.jsp @@ -1,55 +1,56 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.spcyfyparametrsn" /> - + <%@include file="/template/header.jsp" %>

- Select Parameters for Schedule Adherence by Route Chart +
<%-- For passing agency param to the report --%> "> - - + + + - +
- + minutes + value="1.0" />
- +
- + minutes + late." + size="1" + value="4.0"/>
- +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByStopChart.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByStopChart.jsp index ec8693bf8..25fdd656b 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByStopChart.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByStopChart.jsp @@ -1,5 +1,5 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> @@ -43,7 +43,7 @@ - + Schedule Adherence @@ -226,12 +226,11 @@ var routeName = routeData.routes[0].name; <% - String dateRange = request.getParameter("beginDate") + " (+" + request.getParameter("numDays") + " days)"; String allowableEarly = request.getParameter("allowableEarly");; String allowableLate = request.getParameter("allowableLate");; String chartParams = allowableEarly + " min early to " + allowableLate + " min late
" - + dateRange; + + request.getParameter("dateRange"); String beginTime = request.getParameter("beginTime"); String endTime = request.getParameter("endTime"); @@ -265,9 +264,9 @@ success: createDataTablesAndDrawCharts, // When there is an AJAX problem alert the user error: function(request, status, error) { - console.log(request.responseText) - var msg = $("

").html("
No data for requested parameters. Hit back button to try other parameters.") - $("#errorMessage").append(msg); + //alert(error + '. ' + request.responseText); + $("#errorMessage").html(request.responseText + + "

Hit back button to try other parameters."); $("#errorMessage").fadeIn("fast"); $("#loading").fadeOut("slow"); }, diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByStopData.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByStopData.jsp index 056167dc8..688958fe1 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByStopData.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByStopData.jsp @@ -1,20 +1,20 @@ <%-- Provides schedule adherence data in JSON format. Provides for the specified route the number arrivals/departures that are early, number late, number on time, and number total for each - direction for each stop. + direction for each stop. Request parameters are: a - agency ID - r - route ID or route short name. + r - route ID or route short name. dateRange - in format "xx/xx/xx to yy/yy/yy" beginDate - date to begin query. For if dateRange not used. numDays - number of days can do query. Limited to 31 days. For if dateRange not used. beginTime - for optionally specifying time of day for query for each day endTime - for optionally specifying time of day for query for each day - allowableEarlyMinutes - how early vehicle can be and still be OK. Decimal format OK. + allowableEarlyMinutes - how early vehicle can be and still be OK. Decimal format OK. allowableLateMinutes - how early vehicle can be and still be OK. Decimal format OK. --%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.reports.GenericJsonQuery" %> <%@ page import="org.transitclock.reports.SqlUtils" %> <% @@ -28,42 +28,42 @@ String allowableLateStr = request.getParameter("allowableLate"); if (allowableLateStr == null || allowableLateStr.isEmpty()) allowableLateStr = "4.0"; String allowableLateMinutesStr = "'" + SqlUtils.convertMinutesToSecs(allowableLateStr) + " seconds'"; - + String sql = - "SELECT " - + " COUNT(CASE WHEN scheduledTime-time > " + allowableEarlyMinutesStr + " THEN 1 ELSE null END) as early, \n" - + " COUNT(CASE WHEN scheduledTime-time <= " + allowableEarlyMinutesStr + " AND time-scheduledTime <= " - + allowableLateMinutesStr + " THEN 1 ELSE null END) AS ontime, \n" - + " COUNT(CASE WHEN time-scheduledTime > " + allowableLateMinutesStr + " THEN 1 ELSE null END) AS late, \n" + "SELECT " + + " COUNT(CASE WHEN scheduledtime-time > " + allowableEarlyMinutesStr + " THEN 1 ELSE null END) as early, \n" + + " COUNT(CASE WHEN scheduledtime-time <= " + allowableEarlyMinutesStr + " AND time-scheduledtime <= " + + allowableLateMinutesStr + " THEN 1 ELSE null END) AS ontime, \n" + + " COUNT(CASE WHEN time-scheduledtime > " + allowableLateMinutesStr + " THEN 1 ELSE null END) AS late, \n" + " COUNT(*) AS total, \n" + " s.name AS stop_name, \n" + " ad.directionid AS direction_id \n" - + "FROM ArrivalsDepartures ad, Stops s \n" + + "FROM arrivalsdepartures ad, stops s \n" + "WHERE " // To get stop name - + " ad.configRev = s.configRev \n" - + " AND ad.stopId = s.id \n" + + " ad.configrev = s.configrev \n" + + " AND ad.stopid = s.id \n" // Only need arrivals/departures that have a schedule time - + " AND ad.scheduledTime IS NOT NULL \n" + + " AND ad.scheduledtime IS NOT NULL \n" // Specifies which routes to provide data for + SqlUtils.routeClause(request, "ad") + "\n" + SqlUtils.timeRangeClause(request, "ad.time", 7) + "\n" // Grouping and ordering is a bit complicated since might also be looking // at old arrival/departure data that doen't have stoporder defined. Also, - // when configuration changes happen then the stop order can change. - // Therefore want to group by directionId and stop name. Need to also - // group by stop order so that can output it, which can be useful for + // when configuration changes happen then the stop order can change. + // Therefore want to group by directionId and stop name. Need to also + // group by stop order so that can output it, which can be useful for // debugging, plus need to order by stop order. For the ORDER BY clause // need to order by direction id and stop order, but also the stop name - // as a backup for if stoporder not defined for data and is therefore + // as a backup for if stoporder not defined for data and is therefore // always the same and doesn't provide any ordering info. - + " GROUP BY directionid, s.name, ad.stopOrder \n" - + " ORDER BY directionid, ad.stopOrder, s.name"; + + " GROUP BY directionid, s.name, ad.stoporder \n" + + " ORDER BY directionid, ad.stoporder, s.name"; // Just for debugging System.out.println("\nFor schedule adherence by stop query sql=\n" + sql); - -// Do the query and return result in JSON format + +// Do the query and return result in JSON format String agencyId = request.getParameter("a"); String jsonString = GenericJsonQuery.getJsonString(agencyId, sql); response.setContentType("application/json"); @@ -73,4 +73,4 @@ response.getWriter().write(jsonString); response.setStatus(400); response.getWriter().write(e.getMessage()); return; -}%> \ No newline at end of file +}%> diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByStopParams.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByStopParams.jsp index b07e0e0c0..3eb415820 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByStopParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByStopParams.jsp @@ -1,56 +1,56 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - + Specify Parameters - + <%@include file="/template/header.jsp" %>

- Select Parameters for Schedule Adherence by Stop Chart +
<%-- For passing agency param to the report --%> "> - + - - - + + +
- + minutes + value="1.0" />
- +
- + minutes + late." + size="1" + value="4.0"/>
- +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeChart.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeChart.jsp index c8e702674..df090406a 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeChart.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeChart.jsp @@ -1,5 +1,5 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> @@ -40,7 +40,7 @@ } - + Schedule Adherence @@ -50,12 +50,11 @@ <%@include file="/template/header.jsp" %> <% - String dateRange = request.getParameter("beginDate") + " (+" + request.getParameter("numDays") + " days)"; String allowableEarly = request.getParameter("allowableEarly");; String allowableLate = request.getParameter("allowableLate");; String chartSubtitle = allowableEarly + " min early to " + allowableLate + " min late
" - + dateRange; + + request.getParameter("dateRange"); String beginTime = request.getParameter("beginTime"); String endTime = request.getParameter("endTime"); @@ -226,9 +225,9 @@ function getDataAndDrawChart() { success: createDataTableAndDrawChart, // When there is an AJAX problem alert the user error: function(request, status, error) { - console.log(request.responseText) - var msg = $("

").html("
No data for requested parameters. Hit back button to try other parameters.") - $("#errorMessage").append(msg); + //alert(error + '. ' + request.responseText); + $("#errorMessage").html(request.responseText + + "

Hit back button to try other parameters."); $("#errorMessage").fadeIn("fast"); $("#loading").fadeOut("slow"); }, diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeData.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeData.jsp index 2dce19903..5417f876a 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeData.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeData.jsp @@ -17,18 +17,12 @@ allowableEarly - how early vehicle can be and still be OK. Decimal format OK. allowableLate - how early vehicle can be and still be OK. Decimal format OK. --%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> -<%@ page import="org.transitclock.db.webstructs.WebAgency" %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.reports.GenericJsonQuery" %> <%@ page import="org.transitclock.reports.SqlUtils" %> <% try { - String agencyId = request.getParameter("a"); - WebAgency agency = WebAgency.getCachedWebAgency(agencyId); - String dbtype = agency.getDbType(); - boolean isMysql = "mysql".equals(dbtype); - String allowableEarlyStr = request.getParameter("allowableEarly"); if (allowableEarlyStr == null || allowableEarlyStr.isEmpty()) allowableEarlyStr = "1.0"; @@ -41,23 +35,18 @@ String allowableLateMinutesStr = "'" + SqlUtils.convertMinutesToSecs(allowableLa // Group into timebuckets of 30 seconds int BUCKET_TIME = 30; -String epochCommandPre = "EXTRACT (EPOCH FROM "; -String epochCommandPost = ")"; -if (isMysql) { - epochCommandPre = "UNIX_TIMESTAMP"; - epochCommandPost = ""; -} + String sql = "SELECT " + " COUNT(*) AS counts_per_time_period, \n" // Put into time buckets of every BUCKET_TIME seconds. - + " FLOOR(" + epochCommandPre + " (scheduledTime-time)" + epochCommandPost + " / " + BUCKET_TIME + ")*" + BUCKET_TIME + " AS time_period \n" - + "FROM ArrivalsDepartures ad\n" + + " FLOOR(EXTRACT (EPOCH FROM (scheduledtime-time)) / " + BUCKET_TIME + ")*" + BUCKET_TIME + " AS time_period \n" + + "FROM arrivalsdepartures ad\n" + "WHERE " // Only need arrivals/departures that have a schedule time - + " ad.scheduledTime IS NOT NULL \n" + + " ad.scheduledtime IS NOT NULL \n" // Ignore stops where schedule adherence really far off - + " AND ABS(" + epochCommandPre + " (scheduledTime-time)" + epochCommandPost + ") < 3600\n" + + " AND ABS(EXTRACT (EPOCH FROM (scheduledtime-time))) < 3600\n" // Specifies which routes to provide data for + SqlUtils.routeClause(request, "ad") + "\n" + SqlUtils.timeRangeClause(request, "ad.time", 7) + "\n" @@ -70,6 +59,7 @@ String sql = System.out.println("\nFor schedule adherence by time buckets query sql=\n" + sql); // Do the query and return result in JSON format +String agencyId = request.getParameter("a"); String jsonString = GenericJsonQuery.getJsonString(agencyId, sql); response.setContentType("application/json"); response.setHeader("Access-Control-Allow-Origin", "*"); diff --git a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeParams.jsp b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeParams.jsp index ae3f17475..9f6834ac6 100644 --- a/transitclockWebapp/src/main/webapp/reports/schAdhByTimeParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/schAdhByTimeParams.jsp @@ -1,56 +1,56 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters + +<fmt:message key="div.specifyparametrs6" /> - + <%@include file="/template/header.jsp" %>

- Select Parameters for Schedule Adherence by Route Chart +
<%-- For passing agency param to the report --%> "> - + - + - +
- + minutes + value="1.0" />
- +
- + minutes + late." + size="1" + value="4.0"/>
- +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsParams.jsp b/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsParams.jsp index 9007b30ed..8d0c82f33 100644 --- a/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsParams.jsp @@ -1,36 +1,36 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters - + +<fmt:message key="div.specifyparametrs7" /> + - - + + <%@include file="/template/header.jsp" %>
- Select Parameters for Schedule Report +
- +
<%-- For passing agency param to the report --%> "> - + - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsReport.jsp b/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsReport.jsp index 12803e1ac..a3165ab33 100644 --- a/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsReport.jsp +++ b/transitclockWebapp/src/main/webapp/reports/scheduleHorizStopsReport.jsp @@ -1,6 +1,6 @@ <%-- Displays the schedule for a route--%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> <% @@ -13,7 +13,7 @@ if (agencyId == null || agencyId.isEmpty()) { <%@include file="/template/includes.jsp" %> - + - + - + - -Schedule Report + +<fmt:message key="div.scgedulareport" /> <%@include file="/template/header.jsp" %> diff --git a/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsParams.jsp b/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsParams.jsp index 2f12d29b0..4c012eb92 100644 --- a/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsParams.jsp +++ b/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsParams.jsp @@ -1,36 +1,36 @@ -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@include file="/template/includes.jsp" %> - -Specify Parameters - + +<fmt:message key="div.specifyparametrs8" /> + - - + + <%@include file="/template/header.jsp" %>
- Select Parameters for Schedule Report +
- +
<%-- For passing agency param to the report --%> "> - + - +
- \ No newline at end of file + diff --git a/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsReport.jsp b/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsReport.jsp index 9a15f796f..46ad11dbd 100644 --- a/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsReport.jsp +++ b/transitclockWebapp/src/main/webapp/reports/scheduleVertStopsReport.jsp @@ -1,6 +1,6 @@ <%-- Displays the schedule for a route--%> -<%@ page language="java" contentType="text/html; charset=ISO-8859-1" - pageEncoding="ISO-8859-1"%> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> <%@ page import="org.transitclock.utils.web.WebUtils" %> <% @@ -13,7 +13,7 @@ if (agencyId == null || agencyId.isEmpty()) { <%@include file="/template/includes.jsp" %> - + - + - + - + Schedule Report diff --git a/transitclockWebapp/src/main/webapp/smartphone/index.html b/transitclockWebapp/src/main/webapp/smartphone/index.html index b778964fa..6432b5fa4 100644 --- a/transitclockWebapp/src/main/webapp/smartphone/index.html +++ b/transitclockWebapp/src/main/webapp/smartphone/index.html @@ -1,7 +1,7 @@ - + Smartphone WebApp