mirror of
https://github.com/cjdenio/uta-trax-api.git
synced 2026-08-04 22:06:34 +00:00
show trip ID
This commit is contained in:
+1
-1
@@ -157,7 +157,6 @@ func feedifyVehicles(vehicles []*pb.VehiclePosition, header *pb.FeedHeader, rout
|
|||||||
var route_long_name sql.NullString
|
var route_long_name sql.NullString
|
||||||
|
|
||||||
if !rows.Next() {
|
if !rows.Next() {
|
||||||
fmt.Println(rows.Err())
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,6 +195,7 @@ func feedifyVehicles(vehicles []*pb.VehiclePosition, header *pb.FeedHeader, rout
|
|||||||
ShortName: route_short_name.String,
|
ShortName: route_short_name.String,
|
||||||
LongName: route_long_name.String,
|
LongName: route_long_name.String,
|
||||||
},
|
},
|
||||||
|
TripId: *vehicle.Trip.TripId,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-3
@@ -385,6 +385,7 @@ type VehicleFeed_Vehicle struct {
|
|||||||
NearestStation *VehicleFeed_Station `protobuf:"bytes,6,opt,name=nearest_station,json=nearestStation,proto3" json:"nearest_station,omitempty"`
|
NearestStation *VehicleFeed_Station `protobuf:"bytes,6,opt,name=nearest_station,json=nearestStation,proto3" json:"nearest_station,omitempty"`
|
||||||
Headsign string `protobuf:"bytes,7,opt,name=headsign,proto3" json:"headsign,omitempty"`
|
Headsign string `protobuf:"bytes,7,opt,name=headsign,proto3" json:"headsign,omitempty"`
|
||||||
Route *VehicleFeed_Route `protobuf:"bytes,8,opt,name=route,proto3" json:"route,omitempty"`
|
Route *VehicleFeed_Route `protobuf:"bytes,8,opt,name=route,proto3" json:"route,omitempty"`
|
||||||
|
TripId string `protobuf:"bytes,10,opt,name=trip_id,json=tripId,proto3" json:"trip_id,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -482,11 +483,18 @@ func (x *VehicleFeed_Vehicle) GetRoute() *VehicleFeed_Route {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *VehicleFeed_Vehicle) GetTripId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TripId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_proto_schema_proto protoreflect.FileDescriptor
|
var File_proto_schema_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_proto_schema_proto_rawDesc = "" +
|
const file_proto_schema_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\x12proto/schema.proto\"\xcf\x06\n" +
|
"\x12proto/schema.proto\"\xe8\x06\n" +
|
||||||
"\vVehicleFeed\x120\n" +
|
"\vVehicleFeed\x120\n" +
|
||||||
"\bvehicles\x18\x01 \x03(\v2\x14.VehicleFeed.VehicleR\bvehicles\x12)\n" +
|
"\bvehicles\x18\x01 \x03(\v2\x14.VehicleFeed.VehicleR\bvehicles\x12)\n" +
|
||||||
"\x04info\x18\x02 \x01(\v2\x15.VehicleFeed.FeedInfoR\x04info\x1a+\n" +
|
"\x04info\x18\x02 \x01(\v2\x15.VehicleFeed.FeedInfoR\x04info\x1a+\n" +
|
||||||
@@ -511,7 +519,7 @@ const file_proto_schema_proto_rawDesc = "" +
|
|||||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||||
"\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" +
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\x10\n" +
|
||||||
"\x03lat\x18\x03 \x01(\x02R\x03lat\x12\x10\n" +
|
"\x03lat\x18\x03 \x01(\x02R\x03lat\x12\x10\n" +
|
||||||
"\x03lon\x18\x04 \x01(\x02R\x03lon\x1a\xa1\x02\n" +
|
"\x03lon\x18\x04 \x01(\x02R\x03lon\x1a\xba\x02\n" +
|
||||||
"\aVehicle\x12\x10\n" +
|
"\aVehicle\x12\x10\n" +
|
||||||
"\x03lat\x18\x01 \x01(\x02R\x03lat\x12\x10\n" +
|
"\x03lat\x18\x01 \x01(\x02R\x03lat\x12\x10\n" +
|
||||||
"\x03lon\x18\x02 \x01(\x02R\x03lon\x12\x18\n" +
|
"\x03lon\x18\x02 \x01(\x02R\x03lon\x12\x18\n" +
|
||||||
@@ -521,7 +529,9 @@ const file_proto_schema_proto_rawDesc = "" +
|
|||||||
"\x02id\x18\x05 \x01(\tR\x02id\x12=\n" +
|
"\x02id\x18\x05 \x01(\tR\x02id\x12=\n" +
|
||||||
"\x0fnearest_station\x18\x06 \x01(\v2\x14.VehicleFeed.StationR\x0enearestStation\x12\x1a\n" +
|
"\x0fnearest_station\x18\x06 \x01(\v2\x14.VehicleFeed.StationR\x0enearestStation\x12\x1a\n" +
|
||||||
"\bheadsign\x18\a \x01(\tR\bheadsign\x12(\n" +
|
"\bheadsign\x18\a \x01(\tR\bheadsign\x12(\n" +
|
||||||
"\x05route\x18\b \x01(\v2\x12.VehicleFeed.RouteR\x05route\"Z\n" +
|
"\x05route\x18\b \x01(\v2\x12.VehicleFeed.RouteR\x05route\x12\x17\n" +
|
||||||
|
"\atrip_id\x18\n" +
|
||||||
|
" \x01(\tR\x06tripId\"Z\n" +
|
||||||
"\x04Line\x12\x14\n" +
|
"\x04Line\x12\x14\n" +
|
||||||
"\x10LINE_UNSPECIFIED\x10\x00\x12\t\n" +
|
"\x10LINE_UNSPECIFIED\x10\x00\x12\t\n" +
|
||||||
"\x05GREEN\x10\x01\x12\a\n" +
|
"\x05GREEN\x10\x01\x12\a\n" +
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ message VehicleFeed {
|
|||||||
Station nearest_station = 6;
|
Station nearest_station = 6;
|
||||||
string headsign = 7;
|
string headsign = 7;
|
||||||
Route route = 8;
|
Route route = 8;
|
||||||
|
string trip_id = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
repeated Vehicle vehicles = 1;
|
repeated Vehicle vehicles = 1;
|
||||||
|
|||||||
+1
-1
@@ -300,6 +300,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module" src="/js/main.js?v=7"></script>
|
<script type="module" src="/js/main.js?v=8"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+1
-1
@@ -178,7 +178,7 @@ function vehiclePopupContent(vehicle) {
|
|||||||
content += `<br />@ ${vehicle.nearest_station.name}`
|
content += `<br />@ ${vehicle.nearest_station.name}`
|
||||||
}
|
}
|
||||||
|
|
||||||
content += `<br /><br /><small>vehicle #: ${vehicle.id}</small>`
|
content += `<br /><br /><small>vehicle #: ${vehicle.id} · trip ID: ${vehicle.trip_id}</small>`
|
||||||
|
|
||||||
return content
|
return content
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user