From 1d7cf9e634bc5fe145feb4b8de0283532cf90d33 Mon Sep 17 00:00:00 2001 From: answerquest Date: Thu, 6 Sep 2018 00:44:06 +0530 Subject: [PATCH] v2.0.1 --- GTFSManager.py | 1 + GTFSserverfunctions.py | 9 ++- README.md | 2 +- js/commonfuncs.js | 4 + js/fares.js | 166 ++++++++++++++++++++++------------------- js/misc.js | 98 +++++++++++------------- js/routes.js | 3 +- js/schedules.js | 26 +++++-- js/stops.js | 4 +- schedules.html | 3 +- 10 files changed, 172 insertions(+), 144 deletions(-) diff --git a/GTFSManager.py b/GTFSManager.py index 0dc725b..b18e7a7 100644 --- a/GTFSManager.py +++ b/GTFSManager.py @@ -84,6 +84,7 @@ class allStops(tornado.web.RequestHandler): def get(self): start = time.time() logmessage('\nallStops GET call') + allStopsJson = readTableDB('stops').to_json(orient='records', force_ascii=False) self.write(allStopsJson) # time check, from https://stackoverflow.com/a/24878413/4355695 diff --git a/GTFSserverfunctions.py b/GTFSserverfunctions.py index c528a44..8e2ad15 100644 --- a/GTFSserverfunctions.py +++ b/GTFSserverfunctions.py @@ -946,6 +946,8 @@ def deletefromDB(dbfile,key,value,tables): def replaceIDfunc(valueFrom,valueTo,tableKeys): returnList = [] + # to do: wean off tableKeys, bring in the deleteRules.csv code blocks from diagnose, delete functions. + if debugMode: logmessage('replaceIDfunc: valueFrom:',valueFrom,\ '\nvalueTo:',valueTo,'\ntableKeys:',tableKeys) @@ -1010,6 +1012,11 @@ def replaceIDfunc(valueFrom,valueTo,tableKeys): ###################### def replaceIDChunk(valueFrom,valueTo,tablename,column): + ''' + replaceIDChunk: this function finds the relevant chunks where replacement is to be done, and passes back the filenames in a list. + It does NOT do the actual replacing in the .h5 file. That is done by the subsequently called replaceTableCell function. + But it does edit the lookup JSON in case the column to be edited is the primary column of the chunked table. (like: stop_times > trip_id) + ''' # do NOT call any other function for replacing db etc now! # first, figure out if this is a key column or other column if column == chunkRules[tablename]['key']: @@ -1479,4 +1486,4 @@ def sequenceDel(column,value): sDb.close(); - return content \ No newline at end of file + return content diff --git a/README.md b/README.md index 1a1eefb..3146261 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ Big thanks to : - Srinivas from Hyderabad, India for connecting folks together and sharing guidance - Devdatta from Pune, India for a sharing a very simple [working example](https://github.com/devdattaT/sampleTornadoApp) to learn about Tornado web server serving asynchronous requests - Tony Laidig from the global GTFS community for helping build a docker image -- Aaron and other co-ordinators of the GTFS community for including this program on [Awesome Transit](https://github.com/CUTR-at-USF/awesome-transit#gtfs-tools) and giving encouragement and feedback on the GTFS forum. +- Sean Barbeau and other co-ordinators of the GTFS community for including this program on [Awesome Transit](https://github.com/CUTR-at-USF/awesome-transit#gtfs-tools) and giving encouragement and feedback on the GTFS forum. diff --git a/js/commonfuncs.js b/js/commonfuncs.js index 3e2db6d..7adc819 100644 --- a/js/commonfuncs.js +++ b/js/commonfuncs.js @@ -27,6 +27,10 @@ var navBarContentEnd = ' \ \ '; + +// loader: +const loaderHTML = '

Loading data.. please wait..'; + // ############################ // RUN ON ALL PAGES $(document).ready(function() { diff --git a/js/fares.js b/js/fares.js index c6c8161..55785b2 100644 --- a/js/fares.js +++ b/js/fares.js @@ -1,6 +1,6 @@ //######################### // Global variables -var allStopsKeyed = ''; +//var allStopsKeyed = ''; // not sure if this is used anywhere.. // ######################################### // Function-variables to be used in tabulator @@ -59,6 +59,11 @@ $("#fare-attributes-table").tabulator({ {title:"currency_type", field:"currency_type", headerSort:false, width:120 }, {title:"route_id", field:"route_id", headerSort:false, width:120, tooltip:'' } ], + ajaxURL: APIpath + 'fareAttributes', //ajax URL + ajaxLoaderLoading: loaderHTML, + ajaxError:function(xhr, textStatus, errorThrown){ + console.log('GET request to fareAttributes failed. Returned status of: ' + errorThrown); + }, cellEdited:function(cell){ // on editing a cell, log changes let fare_id = cell.getRow().getIndex(); //get corresponding stop_id for that cell @@ -92,13 +97,12 @@ $("#fare-attributes-table").tabulator({ logmessage(message); }, dataLoaded: function(data){ - var list = []; + // populate Fare id dropdown in simple fare rules tab + var dropdown = ''; data.forEach(function(row){ - list.push(row.fare_id); - }); - /* just ditch the autocomplete for now yaar, for just fare ids this is overkill - $( "#targetFareid" ).autocomplete({ - source: list */ + dropdown += ``; + }); + $('#fareSelect').html(dropdown); }, rowSelected:function(row){ $('#targetFareid').val(row.getIndex()); @@ -124,19 +128,24 @@ $("#fare-rules-simple-table").tabulator({ if(confirm('Are you sure you want to delete this entry?')) cell.getRow().delete(); }} - ] + ], + ajaxURL: APIpath + 'fareRules', //ajax URL + ajaxLoaderLoading: loaderHTML, + ajaxError:function(xhr, textStatus, errorThrown){ + console.log('GET request to API fareRules failed. Returned status of: ' + errorThrown); + } }); //####################### // initiating commands $(document).ready(function(){ - //Initiate fare attributes table - getPythonFareAttributes(); // Initiating Fare Rules table. getPythonFareRules(); - getPythonSimpleFareRules(); - getPythonStopsKeyed(); getPythonRouteIdList(); getPythonZones(); + // getPythonSimpleFareRules(); + // getPythonStopsKeyed(); + //Initiate fare attributes table + //getPythonFareAttributes(); // tabulator will self-load by ajax }); @@ -261,51 +270,6 @@ function getPythonFareRules() { xhr.send(); } -function getPythonSimpleFareRules() { - // Here we want to fetch JSON from backend, which will take it from fare_rules.txt - let xhr = new XMLHttpRequest(); - //make API call from with this as get parameter name - xhr.open('GET', `${APIpath}fareRules`); - xhr.onload = function () { - if (xhr.status === 200) { //we have got a Response - console.log(`Loaded Simple Fare Rules data from Server API/fareRules .`); - var data = JSON.parse(xhr.responseText); - if(data.length) $("#fare-rules-simple-table").tabulator('setData',data); - else $("#fare-rules-simple-table").html('No fare rules data found.'); - } - else { - console.log('Server request to API/fareRules failed. Returned status of ' + xhr.status + ', message: ' + xhr.responseText ); - } - }; - xhr.send(); -} - -function getPythonFareAttributes(){ - // Here we want to fetch JSON from backend, which will take it from fare_attributes.txt - let xhr = new XMLHttpRequest(); - //make API call from with this as get parameter name - xhr.open('GET', `${APIpath}fareAttributes`); - xhr.onload = function () { - if (xhr.status === 200) { //we have got a Response - console.log(`Loaded Fare Attributes data from Server API/fareAttributes .`); - var data = JSON.parse(xhr.responseText); - $("#fare-attributes-table").tabulator('setData', data); - - // populate Fare id dropdown in simple fare rules tab - var dropdown = ''; - data.forEach(function(row){ - dropdown += ``; - }); - $('#fareSelect').html(dropdown); - - } - else { - console.log('Server request to API/fareAttributes failed. Returned status of ' + xhr.status ); - } - }; - xhr.send(); - -} function initiateFareRules(rulesData) { // check if already initialized @@ -457,22 +421,6 @@ function saveFareRulesSimple() { }); } -function getPythonStopsKeyed() { - // loading KEYED JSON of the stops.txt data, keyed by stop_id. - let xhr = new XMLHttpRequest(); - xhr.open('GET', `API/allStopsKeyed`); - xhr.onload = function () { - if (xhr.status === 200) { //we have got a Response - console.log(`Loaded data from Server API/allStopsKeyed .`); - var data = JSON.parse(xhr.responseText); - allStopsKeyed = data; - } - else { - console.log('Server request to API/allStopsKeyed failed. Returned status of ' + xhr.status + ', message: ' + xhr.responseText); - } - }; - xhr.send(); -} function getPythonZones() { let xhr = new XMLHttpRequest(); @@ -503,8 +451,7 @@ function getPythonZones() { } function getPythonRouteIdList() { - // loading KEYED JSON of the stops.txt data, keyed by stop_id. - let xhr = new XMLHttpRequest(); + let xhr = new XMLHttpRequest(); xhr.open('GET', `API/routeIdList`); xhr.onload = function () { if (xhr.status === 200) { //we have got a Response @@ -532,4 +479,71 @@ function addFareRule() { var fare_id = $('#fareSelect').val(); $("#fare-rules-simple-table").tabulator('addRow', {fare_id:fare_id, origin_id:origin_id, destination_id:destination_id, route_id:route_id}, true ); -} \ No newline at end of file +} + +/* retired functions + +function getPythonFareAttributes(){ + // Here we want to fetch JSON from backend, which will take it from fare_attributes.txt + let xhr = new XMLHttpRequest(); + //make API call from with this as get parameter name + xhr.open('GET', `${APIpath}fareAttributes`); + xhr.onload = function () { + if (xhr.status === 200) { //we have got a Response + console.log(`Loaded Fare Attributes data from Server API/fareAttributes .`); + var data = JSON.parse(xhr.responseText); + $("#fare-attributes-table").tabulator('setData', data); + + // populate Fare id dropdown in simple fare rules tab + var dropdown = ''; + data.forEach(function(row){ + dropdown += ``; + }); + $('#fareSelect').html(dropdown); + + } + else { + console.log('Server request to API/fareAttributes failed. Returned status of ' + xhr.status ); + } + }; + xhr.send(); + +} + +function getPythonStopsKeyed() { + // loading KEYED JSON of the stops.txt data, keyed by stop_id. + let xhr = new XMLHttpRequest(); + xhr.open('GET', `API/allStopsKeyed`); + xhr.onload = function () { + if (xhr.status === 200) { //we have got a Response + console.log(`Loaded data from Server API/allStopsKeyed .`); + var data = JSON.parse(xhr.responseText); + allStopsKeyed = data; + } + else { + console.log('Server request to API/allStopsKeyed failed. Returned status of ' + xhr.status + ', message: ' + xhr.responseText); + } + }; + xhr.send(); +} + +function getPythonSimpleFareRules() { + // Here we want to fetch JSON from backend, which will take it from fare_rules.txt + let xhr = new XMLHttpRequest(); + //make API call from with this as get parameter name + xhr.open('GET', `${APIpath}fareRules`); + xhr.onload = function () { + if (xhr.status === 200) { //we have got a Response + console.log(`Loaded Simple Fare Rules data from Server API/fareRules .`); + var data = JSON.parse(xhr.responseText); + if(data.length) $("#fare-rules-simple-table").tabulator('setData',data); + //else $("#fare-rules-simple-table").html('No fare rules data found.'); + // what're you doing here, let the user create new fare rules! + } + else { + console.log('Server request to API/fareRules failed. Returned status of ' + xhr.status + ', message: ' + xhr.responseText ); + } + }; + xhr.send(); +} +*/ \ No newline at end of file diff --git a/js/misc.js b/js/misc.js index d3e4d69..8872183 100644 --- a/js/misc.js +++ b/js/misc.js @@ -38,7 +38,8 @@ $("#calendar-table").tabulator({ addRowPos: "top", movableColumns: true, layout:"fitDataFill", - + ajaxURL: `${APIpath}calendar`, //ajax URL + ajaxLoaderLoading: loaderHTML, columns:[ {rowHandle:true, formatter:"handle", headerSort:false, frozen:true, width:30, minWidth:30 }, {title:"service_id", field:"service_id", frozen:true, headerFilter:"input", headerFilterPlaceholder:"filter by id", bottomCalc:calendarTotal }, @@ -51,13 +52,10 @@ $("#calendar-table").tabulator({ {title:"sunday", field:"sunday", editor:"select", editorParams:operationalChoices, headerSort:false }, {title:"start_date", field:"start_date", editor:"input", headerFilter:"input", headerFilterPlaceholder:"yyyymmdd" }, {title:"end_date", field:"end_date", editor:"input", headerFilter:"input", headerFilterPlaceholder:"yyyymmdd" } - /* removing as to delete an entry we need to zap its entries from trips table too. Shift deleting to Maintenance section. - {formatter:"buttonCross", align:"center", title:"del", headerSort:false, cellClick:function(e, cell){ - if(confirm('Are you sure you want to delete this entry?')) - cell.getRow().delete(); - }} - */ - ] + ], + ajaxError:function(xhr, textStatus, errorThrown){ + console.log('GET request to calendar failed. Returned status of: ' + errorThrown); + } }); $("#agency-table").tabulator({ @@ -68,7 +66,8 @@ $("#agency-table").tabulator({ addRowPos: "top", movableColumns: true, layout:"fitDataFill", - // trans_id,lang,translation + ajaxURL: `${APIpath}agency`, //ajax URL + ajaxLoaderLoading: loaderHTML, columns:[ {rowHandle:true, formatter:"handle", headerSort:false, frozen:true, width:30, minWidth:30 }, {title:"agency_id", field:"agency_id", editor:"input", headerSort:false }, @@ -76,7 +75,10 @@ $("#agency-table").tabulator({ {title:"agency_url", field:"agency_url", editor:"input", headerSort:false }, {title:"agency_timezone", field:"agency_timezone", editor:"input", headerSort:false, tooltip:'Get your timezone from TZ column in https://en.wikipedia.org/wiki/List_of_tz_database_time_zones' } - ] + ], + ajaxError:function(xhr, textStatus, errorThrown){ + console.log('GET request to agency failed. Returned status of: ' + errorThrown); + } }); $("#translations-table").tabulator({ @@ -87,7 +89,8 @@ $("#translations-table").tabulator({ addRowPos: "top", movableColumns: true, layout:"fitDataFill", - // agency_id,agency_name,agency_url,agency_timezone + ajaxURL: `${APIpath}translations`, //ajax URL + ajaxLoaderLoading: loaderHTML, columns:[ {rowHandle:true, formatter:"handle", headerSort:false, frozen:true, width:30, minWidth:30 }, {title:"trans_id", field:"trans_id", editor:"input", headerFilter:"input", headerSort:false, width:120, bottomCalc:translationsTotal }, @@ -100,7 +103,10 @@ $("#translations-table").tabulator({ if(confirm('Are you sure you want to delete this entry?')) cell.getRow().delete(); }} - ] + ], + ajaxError:function(xhr, textStatus, errorThrown){ + console.log('GET request to translations failed. Returned status of: ' + errorThrown); + } }); // ################### @@ -124,9 +130,9 @@ $(document).ready(function() { resetGlobals(); } }); - getPythonAgency(); - getPythonCalendar(); - getPythonTranslations(); + //getPythonAgency(); + //getPythonCalendar(); + //getPythonTranslations(); getPythonAllIDs(); }); @@ -213,6 +219,7 @@ $("#agency2add").bind("change keyup", function(){ // ######################### // Functions +/* function getPythonCalendar() { let xhr = new XMLHttpRequest(); //make API call from with this as get parameter name @@ -249,6 +256,23 @@ function getPythonAgency() { xhr.send(); } +function getPythonTranslations() { + let xhr = new XMLHttpRequest(); + //make API call from with this as get parameter name + xhr.open('GET', `${APIpath}translations`); + xhr.onload = function () { + if (xhr.status === 200) { //we have got a Response + console.log(`Loaded translations data from Server API/translations .`); + var data = JSON.parse(xhr.responseText); + $('#translations-table').tabulator('setData',data); + } + else { + console.log('Server request to API/translations failed. Returned status of ' + xhr.status); + } + }; + xhr.send(); +} +*/ function saveCalendar() { $('#calendarSaveStatus').html('Sending data to server.. Please wait..'); @@ -367,22 +391,6 @@ function delCalendar() { $('#calendarAddStatus').html('' + service_id + ' is not there.'); } -function getPythonTranslations() { - let xhr = new XMLHttpRequest(); - //make API call from with this as get parameter name - xhr.open('GET', `${APIpath}translations`); - xhr.onload = function () { - if (xhr.status === 200) { //we have got a Response - console.log(`Loaded translations data from Server API/translations .`); - var data = JSON.parse(xhr.responseText); - $('#translations-table').tabulator('setData',data); - } - else { - console.log('Server request to API/translations failed. Returned status of ' + xhr.status); - } - }; - xhr.send(); -} function addTranslation() { $('#translationSaveStatus').html(' '); @@ -632,7 +640,8 @@ function populateMaintenanceLists() { // ################################# -function diagnoseID(column,value,tables,secondarytables) { +function diagnoseID(column,value) { + $('#dryRunResults').val('Loading...'); if(value == 'No Selection' || value == '') { resetGlobals(); return; @@ -642,29 +651,6 @@ function diagnoseID(column,value,tables,secondarytables) { var jqxhr = $.get( `${APIpath}diagnoseID?column=${column}&value=${value}`, function( returndata ) { console.log('diagnoseID API GET request successful.'); $('#dryRunResults').val(returndata); - /* - returndata = JSON.parse(data); - var content = 'Listing changes that will happen for deleting ' + key + ' = ' + value + '\n'; - - if(Object.keys(returndata['main']).length) { - content += '\n' + Array(100).join("#") + '\nThe following table entries will be deleted:\n\n'; - for(tablename in returndata['main']) { - content += tablename + ' (' + returndata['main'][tablename].length + ' rows):\n' + Papa.unparse(returndata['main'][tablename], {delimiter: "\t"}) + '\n\n'; - } - } - - if(key == 'route_id') content += '\n' + Array(100).join("#") + '\nNOTE: Since it is a route being deleted, all trips under it will be deleted and all the timings data in stop_times table for each of these trips will also be deleted.\n\n'; - - if(Object.keys(returndata['zap']).length) { - content+= '\n' + Array(100).join("#") + '\nThe following table entries will have "' + value + '" zapped (replaced with blank) in the '+key+' column:\n\n'; - - for(tablename in returndata['zap']) { - content += tablename + ' (' + returndata['zap'][tablename].length + ' rows):\n' + Papa.unparse(returndata['zap'][tablename], {delimiter: "\t"}) + '\n\n'; - } - } - - $('#dryRunResults').val(content); - */ }) .fail( function() { console.log('GET request to API/diagnoseID failed.'); @@ -706,7 +692,7 @@ function deleteByKey() { } var jqxhr = $.get( `${APIpath}deleteByKey?pw=${pw}&key=${key}&value=${value}`, function( returndata ) { console.log('deleteByKey API GET request successful. Message: ' + returndata); - $('#deepActionsStatus').html('
' + returndata +'
'); + $('#deepActionsStatus').html('
' + returndata +'
'); // resetting global vars and emptying of dry run textbox so that pressing this button again doesn't send the API request. resetGlobals(); diff --git a/js/routes.js b/js/routes.js index 8593467..18f4d68 100644 --- a/js/routes.js +++ b/js/routes.js @@ -45,6 +45,7 @@ $("#routes-table").tabulator({ {title:"agency_id", field:"agency_id", headerSort:false, editor:"select", editorParams:agencyLister, tooltip:"Needed to fill when there is more than one agency." } ], ajaxURL: APIpath + 'routes', //ajax URL + ajaxLoaderLoading: loaderHTML, dataLoaded:function(data) { // this fires after the ajax response and after table has loaded the data. console.log(`routes GET request successful.`); @@ -980,4 +981,4 @@ function getPythonAgency() { } }; xhr.send(); -} \ No newline at end of file +} diff --git a/js/schedules.js b/js/schedules.js index deb678a..c4c1bf7 100644 --- a/js/schedules.js +++ b/js/schedules.js @@ -49,7 +49,7 @@ $("#trips-table").tabulator({ {title:"route_id", field:"route_id",headerSort:false, visible:true }, {title:"trip_id", field:"trip_id", headerFilter:"input", headerSort:false }, {title:"Calendar service", field:"service_id", editor:"select", editorParams:serviceLister, headerFilter:"input", validator:"required", headerSort:false }, - {title:"direction_id", field:"direction_id", editor:"select", editorParams:{0:"Onward(0)", 1:"Return(1)"}, headerFilter:"input", headerSort:false, formatter:"lookup", formatterParams:{0:'Onward',1:'Return'} }, + {title:"direction_id", field:"direction_id", editor:"select", editorParams:{0:"Onward(0)", 1:"Return(1)", '':"None(blank)"}, headerFilter:"input", headerSort:false, formatter:"lookup", formatterParams:{0:'Onward',1:'Return','':''} }, {title:"trip_headsign", field:"trip_headsign", editor:"input", headerFilter:"input", headerSort:false }, {title:"trip_short_name", field:"trip_short_name", editor:"input", headerFilter:"input", headerSort:false, bottomCalc:tripsTotal }, {title:"block_id", field:"block_id", editor:"input", headerFilter:"input", tooltip:"Vehicle identifier", headerSort:false }, @@ -418,9 +418,13 @@ function addTrip() { var direction = $('#trip_direction').val(); // if "both" is selected then we need to loop. Hence, array. + // 5.9.18: addind in support for blank direction + if (direction == 'both') directionsArray = [0,1]; + else if (parseInt(direction) == 0) directionsArray = [0]; + else if (parseInt(direction) == 1) directionsArray = [1]; + else directionsArray = ['']; - directionsArray = (direction == 'both' ? [0,1] : [ parseInt(direction) ] ); - console.log(directionsArray); + // console.log(directionsArray); var counter = 1; var message = ''; @@ -430,16 +434,24 @@ function addTrip() { // search next available id var tripsTableList = $("#trips-table").tabulator('getData').map(a => a.trip_id); var allTrips = trip_id_list.concat(tripsTableList); + + // loop till you find an available id: while ( allTrips.indexOf(route_id + pad(counter) ) > -1 ) counter++; - var trip_id = route_id + pad(counter); - let sequence = sequenceHolder[directionsArray[i]]; + dirIndex = ( directionsArray[i] == '' ? 0 : directionsArray[i]); + + var trip_id = route_id + '.'pad(counter); + // to do: change this, adopt naming conventions. + //var trip_id = `${route_id}.${service_id}.${dirIndex}.${}` + '.'pad(counter); + + + let sequence = sequenceHolder[dirIndex]; var last_stop_id = sequence[ sequence.length - 1]; var trip_headsign = allStopsKeyed[ last_stop_id ]['stop_name']; var trip_short_name = chosenRouteShortName + ' ' + trip_time + ' to ' + trip_headsign; var shape_id = ''; - if(sequenceHolder[ 'shape' + directionsArray[i] ] ) shape_id = sequenceHolder[ 'shape' + directionsArray[i] ]; + if(sequenceHolder[ 'shape' + dirIndex ] ) shape_id = sequenceHolder[ 'shape' + dirIndex ]; $("#trips-table").tabulator('addRow',{ route_id:route_id, trip_id: trip_id, service_id:service_id, direction_id:directionsArray[i], shape_id:shape_id, @@ -609,4 +621,4 @@ function defaultShapesApply() { $("#defaultShapesApplyStatus").html( ' Done! Save Changes to save to DB.'); setSaveTrips(true); -} \ No newline at end of file +} diff --git a/js/stops.js b/js/stops.js index 6bade32..d011314 100644 --- a/js/stops.js +++ b/js/stops.js @@ -22,6 +22,8 @@ $("#stops-table").tabulator({ history:true, layout:"fitDataFill", addRowPos: "top", + ajaxURL: APIpath + 'allStops', //ajax URL + ajaxLoaderLoading: loaderHTML, columns:[ //Define Table Columns // stop_id,stop_name,stop_lat,stop_lon,zone_id,wheelchair_boarding {rowHandle:true, formatter:"handle", headerSort:false, frozen:true, width:30, minWidth:30}, @@ -32,6 +34,7 @@ $("#stops-table").tabulator({ {title:"zone_id", field:"zone_id", editor:"input", validator:["string", "minLength:3"] }, {title:"wheelchair_boarding", field:"wheelchair_boarding", editor:"select", editorParams:{0:"No (0)", 1:"Yes (1)"}, headerSort:false } ], + rowSelected:function(row){ //when a row is selected //console.log("Row " + row.getData().stop_id + " Clicked, index: " + row.getIndex() ); mapPop(row.getData().stop_id); @@ -84,7 +87,6 @@ $("#stops-table").tabulator({ logmessage('Changed "' + cell.getOldValue() + '" to "' + cell.getValue() + '" for stop_id: ' + stop_id); $("#undoredo").show('slow'); }, - ajaxURL: APIpath + 'allStops', //ajax URL dataLoaded:function(data) { // this fires after the ajax response and after table has loaded the data. console.log(`Loaded all stops data from Server API/allStops .`); diff --git a/schedules.html b/schedules.html index 86c3ec9..0b8fa48 100644 --- a/schedules.html +++ b/schedules.html @@ -113,6 +113,7 @@
Trips
Direction:    @@ -181,4 +182,4 @@
Timings
- \ No newline at end of file +