This repository has been archived by the owner on Oct 22, 2020. It is now read-only.
forked from WRI-Cities/static-GTFS-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tripstimings.html
187 lines (155 loc) · 7.75 KB
/
tripstimings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Trips and Timings (stop_times) Management</title>
<link href="lib/jquery-ui.min.css" rel="stylesheet">
<link href="lib/tabulator.min.css" rel="stylesheet">
<link href="lib/bootstrap.v4.0.0.min.css" crossorigin="anonymous" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" rel="stylesheet">
<link rel="stylesheet" href="lib/chosen/chosen.min.css">
<link href="js/commonstyle.css" rel="stylesheet">
<!-- Put the CSSs first and JSs next -->
<script src="lib/jquery-3.3.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-ui.min.js" type="text/javascript"></script>
<script src="lib/tabulator.js" type="text/javascript"></script>
<script src="lib/popper.v1.12.9.min.js" crossorigin="anonymous" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" alt="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="lib/bootstrap.v4.0.0.min.js" crossorigin="anonymous" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" alt="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js">
</script>
<script src="lib/papaparse.min.js" type="text/javascript"></script>
<script src="lib/chosen/chosen.jquery.min.js" type="text/javascript"></script>
<style>
#trips-table{
height: 350px;
}
#stop-times-table {
height: 300px;
}
.ui-autocomplete {
font-size: 1em;
}
#newTripHTML {
border-radius: 5px;
padding: 15px;
border: 1px black solid;
/*box-shadow:0px 0px 20px black; */
}
#shapeApplyHTML {
border-radius: 5px;
padding: 15px;
border: 1px black solid;
/*box-shadow:0px 0px 20px black; */
}
</style></head>
<body>
<div id="navBar"></div>
<div class="container">
<h2>Trips and Timings (Stop_times)</h2>
<div id="accordion">
<h4>Instructions</h4>
<div>
<b>Trips tab</b>
<ul>
<li>Pick a Route from the dropdown. In some time, all the trips under this route will load.</li>
<li>In case it's a new route, the table will be empty.</li>
<li>If the chosen route's default sequence has been saved to the DB in the Routes page Sequence tab, then a "Create new trip" box will be visible below the table.</li>
<li>You can create a new trip by filling in or selecting the fields provided : Calendar service, start time, direction.</li>
<li>On clicking "Add a Trip", new entry will be created in the Trips table.</li>
<li>Many columns will be populated based on your selection, but you can change the values (other than route and trip ids) by clicking on the respective cells.</li>
<li>If you have set default shapes for this route in Routes page, then below the table on the right you will have options to assign these shapes to all the trips under the chosen route, repsectively by direction.</li>
<li><b>block_id</b> field is for the vehicle indentifier.</li>
<li>To access a trip's timings, select a trip (click on left side handle) and move to Timings tab.</li>
<li>After making changes, be sure to click the big green button at the bottom to commit your changes to the DB.</li>
</ul>
<b>Stop_times tab</b>
<ul>
<li>The trip you have chosen will be displayed in green. Click the "load timings" button.</li>
<li>In some seconds the timings should load in the table</li>
<li>You can edit some columns like arrival_time and departure_time, and other columns on left side are fixed.</li>
<li>After making changes, be sure to click the big green button at the bottom to commit your changes to the DB.</li>
</ul>
<p>Read the <a href="https://developers.google.com/transit/gtfs/reference/#tripstxt">trips reference</a> docs for learning more about trips, and read the <a href="https://developers.google.com/transit/gtfs/reference/#stop_timestxt">stop_times reference</a> for learning more about the way the timings data is stored in GTFS.</p>
<p>Note: Arrival time and departure time must be specified for the first and the last stop in a trip; rest may be left blank. (if so, set timepoint to 0-Estimated ).
</div>
</div><!-- Accordion over -->
<br>
<!-- Tabs Menu -->
<div id="tabs">
<ul>
<li><a href="#tab1">Trips</a></li>
<li><a href="#tab2">Stop_times</a></li>
</ul>
<!-- TRIPS -->
<div id="tab1">
<h5>Pick a route: <select id="routeSelect"></select> <small><span id="routeSelectStatus"></span></small></h5>
<h5>Trips</h5>
<div id="trips-table"></div>
<br>
<div class="row">
<div class="col col-md-8">
<div id="newTripHTML">
<p>This route's <a href="sequence.html">default sequence</a> has been set, so you can <b>Create a new trip:</b></p>
<!--<input placeholder="trip_short_name" id="trip2add" size="8">-->
<p>Calendar service: <select id="trip_calendar"></select></p>
<p>
Start time:<input id="trip_time" type="time" name="time">
Direction: <select id="trip_direction">
<option value="0" selected="selected">Onward</option>
<option value="1">Return</option>
<option value="none">None</option>
<option value="both">Both</option>
</select>
<button class="btn btn-apple btn-sm " id="addTripButton" type="button">Add a Trip</button></p>
<p><small id="addTripStatus"><i>A new row will be added at the top of the table. Please fill in all the values appropriately and then save to DB.</i></small></p>
</div>
<div id="noSequenceAlert" style="display:none" class="alert alert-warning">
Note: Cannot add new trips to this route right now as this route's sequence is not finalized yet. Please do so by visiting the <a class="btn btn-outline-info" href="sequence.html">Default Sequence</a> page.
</div>
<br>
<p>If you edit any trip's information, make sure to <button id="saveTrips" class="btn btn-normal" disabled>Save Trips to DB</button> before changing to another route above.</p>
<p><span id="tripsSaveStatus"></span></p>
</div><div class="col col-md-4">
<div id="shapeApplyHTML" style="display:none" class="alert alert-warning">
<p>This route has default shape(s) set:
<br><span id="defaultShapesInfo"></span>
<br>Would you like to apply them to all the trips?
<br><button class="btn btn-outline-info" id="defaultShapesApplyButton">Apply shapes to all trips</button></p>
<p id="defaultShapesApplyStatus"></p>
</div>
</div>
</div>
<small>
To delete a trip you have just added, just reload this page without saving changes.
<br>
To delete an existing trip that has already been saved in the db, please go to the <a href="misc.html">Miscellaneous page</a>, Maintenance tab.
</small>
</div> <!-- TRIPS tab end -->
<!-- STOP_TIMES -->
<div id="tab2">
<h5>Stop_times (timings)</h5>
<div class="row">
<div class="col-md-4 alert alert-info"><small>
Select a Trip from the trips table in the previous tab, then click the load button here to edit its timings in the table below. You can select a row by clicking on the left side handle.</small>
</div>
<div class="col-md-8">
<p>For the trip_id <span id="chosenTrip">[select in Trips tab]</span> chosen,
<button id="loadTimingsButton" class="btn btn-sm btn-outline-apple"><font size=4><b>⌚</b></font> click to load timings</button> <br><br>
<small><span id="loadTimingsStatus"></span></small></p>
</div>
</div>
<div id="stop-times-table"></div>
<br>
<p>If you edit any of the timings, make sure to <button id="saveTimings" class="btn btn-normal" disabled>Save Timings to DB</button> before changing to another trip above.</p>
<p><small id="timingsSaveStatus"></small></p>
<br>
<p class="alert alert-warning col-md-6">Note: To change the default stops sequence for new trips, please go to <a href="sequence.html">Default Route Sequence</a> page and change the sequence from there.</p>
</div>
</div>
</div>
<br><br><br>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js"></script>
<script src="js/tripstimings.js"></script>
</body>
</html>