-
Notifications
You must be signed in to change notification settings - Fork 46
/
deleteID.html
180 lines (139 loc) · 6.93 KB
/
deleteID.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
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Miscellaneous Parameters</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>
#agency-table {
height: 300px;
}
#calendar-table {
height: 300px;
}
#translations-table {
height: 400px;
}
.translationBig {
font-size: 2em;
}
input[type=checkbox]#deepActionsConfirm {
width: 20px; height: 20px;
-webkit-border-radius: 22px; -moz-border-radius: 22px; border-radius: 22px;
border: 1px solid #bbb;
vertical-align: middle;
}
#dryRunResults {
width:100%;
font-family: "Lucida Console", Monaco, monospace;
font-size: 0.8em;
}
</style></head>
<body>
<div id="navBar"></div>
<div class="container">
<h2>Delete ID</h2>
<br>
<div class="alert alert-warning"><small>
<p>This section is for making deep-level changes that need more than just a simple row edit, and can <i>potentially break your GTFS dataset</i>. You are strongly advised you to create a <u>backup</u> of the data first (go to home page, create an export) before doing any operations here.</p>
<p>It will be a multi-step process so we know exactly what we're doing:<br>
1. Choose an ID to be deleted. <br>
2. The backend will do a dry run and return details of all the operations to be done in the <b>large text box</b>. <br>
3. <i>No actual changes to the database will be made at this time.</i><br>
4. After reviewing and approving the changes to be done, you can click on <b class="btn-danger">the big red button</b> to make the changes to the database.<br>
5. After clicking the final button for making the changes, please <u>stay</u> on the page and wait for the results to come. These deep-level changes can take a longer time than average operations so please be <u>patient</u>.<br>
6. If you change your mind after seeing the dry run, you can simply <u>leave the page</u>. You will also be prompted once after clicking and can cancel out.<br>
</p>
</small></div>
<!-- Tabs Menu 2 -->
<div id="tabs2">
<ul>
<li><a href="#delStopDiv">Stop</a></li>
<li><a href="#delRouteDiv">Route</a></li>
<li><a href="#delTripDiv">Trip</a></li>
<li><a href="#delShapeDiv">Shape</a></li>
<li><a href="#delCalendarDiv">Calendar Service</a></li>
<li><a href="#delZoneDiv">Fare Zone</a></li>
<li><a href="#delFareIDDiv">Fare ID</a></li>
<li><a href="#delAgencyDiv">Agency</a></li>
</ul>
<!-- delStopDiv Delete Stop -->
<div id="delStopDiv">
<h4>Delete a Stop</h4>
<select id="stop2Delete"></select>
</div> <!-- END delStopDiv -->
<!-- delRouteDiv Delete Route -->
<div id="delRouteDiv">
<div class="row"><div class="col-md-5">
<h4>Delete a Route</h4>
<select id="route2Delete"></select>
</div><div class="col col-md-7 alert alert-warning">
<small>Note: Deleting a route will result in deleting all the trips under it as well as <i><b>all the timings data</b></i> under each of those trips. Handle with care. Also, this operation is likely to take quite long so please be patient. Another option is to just rename the route in the Change UID section.</small>
</div></div>
</div> <!-- END delRouteDiv -->
<!-- delTripDiv Delete Trip -->
<div id="delTripDiv">
<h4>Delete a Trip</h4>
<select id="trip2Delete"></select>
</div> <!-- END delTripDiv -->
<!-- delShapeDiv Delete Shape -->
<div id="delShapeDiv">
<h4>Delete a Shape</h4>
<select id="shape2Delete"></select>
</div> <!-- END delShapeDiv -->
<!-- delCalendarDiv Delete Calendar Service -->
<div id="delCalendarDiv">
<div class="row"><div class="col-md-5">
<h4>Delete a Calendar Service</h4>
<select id="service2Delete"></select>
</div><div class="col col-md-7 alert alert-warning">
<small>Note: Deleting a calendar service will result in deleting all the trips under it as well as <i><b>all the timings data</b></i> under each of those trips. Handle with care. Also, this operation is likely to take quite long so please be patient. Another option is to just rename the service_id in the Change UID section.</small>
</div></div>
</div> <!-- END delCalendarDiv -->
<!-- delZoneDiv Delete Fares Zone -->
<div id="delZoneDiv">
<h4>Delete a Fare Zone</h4>
<p>Used in Fares > Fare Rules (the origin and destination id's are fare zone id's). Created in Stops page (zone_id) column.</p>
<select id="zone2Delete"></select>
</div> <!-- END delZoneDiv -->
<!-- delFareIDDiv Delete Fares Zone -->
<div id="delFareIDDiv">
<h4>Delete a Fare ID</h4>
<p>Created in Fares > Fare Attributes. Each fare_id represents an amount. Used in Fare Rules tabs under Fares page to set the fare amount.</p>
<select id="fareID2Delete"></select>
</div> <!-- END delFareIDDiv -->
<!-- delAgencyDiv Delete Fares Zone -->
<div id="delAgencyDiv">
<h4>Delete an Agency ID</h4>
<p>Created in Misc > Agency Info. Used in Routes.</p>
<select id="agency2Delete"></select>
</div> <!-- END delAgencyDiv -->
</div> <!-- END Tabs 2 Content -->
<div class="container"><div class="container">
<h4>Dry Run:</h4>
<small>Showing the data in tab-separated form. Copy-paste the contents below into an excel doc for better viewing.</small><br>
<textarea id="dryRunResults" rows=10></textarea>
<p><label><input type="checkbox" name="deepActionsConfirm" value="deepActionsConfirm" id="deepActionsConfirm">Check this ON to confirm that you understand the risks to your data and have taken proper precautions before proceeding.</label></p>
<p><button class="btn btn-danger btn-bg" id="deepActionsButton">Alright Let's DELETE It</button><br>
<span id="deepActionsStatus"></span></p>
<p>Note: Please reload the page after doing a delete / rename operation to make the updated lists show in the selection menu.</p>
</div></div>
<hr>
</div>
<script src="config/settings.js" type="text/javascript"></script>
<script src="js/commonfuncs.js" type="text/javascript"></script>
<script src="js/deleteID.js"></script>
</body>
</html>