Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.13.0 #3200

Merged
merged 18 commits into from
Apr 11, 2023
Merged

7.13.0 #3200

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3f738db
fixes labels moving after placing them
misaugstad Mar 31, 2023
6b3921f
Merge pull request #3194 from ProjectSidewalk/2485-fix-sv-image-y
misaugstad Mar 31, 2023
72792da
adds Mapbox API key as an env variable
misaugstad Apr 3, 2023
c5fa7d4
fixes sv_image_x/y values for old data
misaugstad Apr 5, 2023
4c14229
adds logging of URL when doing anon signup
misaugstad Apr 6, 2023
bb08068
moves some pano data from label to gsv_data table
misaugstad Apr 6, 2023
68761b5
fixes rare bug where pano data was incorrect for a label
misaugstad Apr 6, 2023
265d6e0
GSV metadata now updates over time
misaugstad Apr 6, 2023
3612d74
now logging pano metadata when panoId changes
misaugstad Apr 6, 2023
50694bf
Merge pull request #3197 from ProjectSidewalk/3195-add-mapbox-api-key…
misaugstad Apr 6, 2023
d18ab35
renames a bunch of label/gsv related db columns
misaugstad Apr 10, 2023
119b24f
gives dev env containers more shared memory
misaugstad Apr 10, 2023
62a34b9
fixes indentation for some raw SQL queries
misaugstad Apr 10, 2023
60fd638
Merge branch 'develop' of https://github.com/ProjectSidewalk/Sidewalk…
misaugstad Apr 10, 2023
42cc191
fixes bug in down evolution for renaming sv_image_x/y cols
misaugstad Apr 10, 2023
b2c53bb
Merge pull request #3199 from ProjectSidewalk/2485-fix-old-sv-xy-data
misaugstad Apr 10, 2023
0a858a4
Merge branch 'master' of https://github.com/ProjectSidewalk/SidewalkW…
misaugstad Apr 11, 2023
9826a57
7.12.2 -> 7.13.0
misaugstad Apr 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ Make sure Docker is running on your machine. You should see a Docker whale in yo

On Windows, we recommend [Windows Powershell](https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7) (built in to Win10). On Mac, use the basic terminal or, even better, [iTerm2](https://www.iterm2.com/). On Linux (or if you're using WSL2 on Windows), the default Linux Shell (such as [Bash](https://www.gnu.org/software/bash/)) is a great choice.

1. Email Mikey (michaelssaugstad@gmail.com) and ask for a database dump and a Google Maps API key & secret (if you are not part of our team, you'll have to [create a Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key) yourself). Rename the database dump `sidewalk-dump` and put it in the `db/` directory (other files in this dir include `init.sh` and `schema.sql`, for example).
1. Modify the `GOOGLE_MAPS_API_KEY` and `GOOGLE_MAPS_SECRET` lines in the `docker-compose.yml` using the key and secret you've acquired.
1. Email Mikey (michaelssaugstad@gmail.com) and ask for a database dump, a Mapbox API key, and a Google Maps API key & secret (if you are not part of our team, you'll have to [create a Google Maps API key](https://developers.google.com/maps/documentation/javascript/get-api-key) yourself). Rename the database dump `sidewalk-dump` and put it in the `db/` directory (other files in this dir include `init.sh` and `schema.sql`, for example).
1. Modify the `MAPBOX_API_KEY`, `GOOGLE_MAPS_API_KEY`, and `GOOGLE_MAPS_SECRET` lines in the `docker-compose.yml` using the keys and secret you've acquired.
1. Modify the `SIDEWALK_CITY_ID` line in the `docker-compose.yml` to use the ID of the appropriate city. You can find the list of IDs for the cities starting at line 7 of `conf/cityparams.conf`.
1. From the root SidewalkWebpage dir, run `make dev`. This will take time (20-30 mins or more depending on your Internet connection) as the command downloads the docker images, spins up the containers, and opens a Docker shell into the webpage container in that same terminal. The containers (running Ubuntu Stretch) will have all the necessary packages and tools so no installation is necessary. This command also initializes the database, though we still need to import the data. Successful output of this command will look like:

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/AdminController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import javassist.NotFoundException
import models.attribute.{GlobalAttribute, GlobalAttributeTable}
import models.audit.{AuditTaskInteractionTable, AuditTaskTable, AuditedStreetWithTimestamp, InteractionWithLabel}
import models.daos.slick.DBTableDefinitions.UserTable
import models.gsv.{GSVDataExtended, GSVDataTable}
import models.gsv.{GSVDataSlim, GSVDataTable}
import models.label.LabelTable.{LabelCVMetadata, LabelMetadata}
import models.label.{LabelLocationWithSeverity, LabelPointTable, LabelTable, LabelTypeTable, LabelValidationTable}
import models.mission.MissionTable
Expand Down Expand Up @@ -407,7 +407,7 @@ class AdminController @Inject() (implicit val env: Environment[User, SessionAuth
* TODO remove the /adminapi/labels/panoid endpoint once all have shifted to /adminapi/panos
*/
def getAllPanoIds = UserAwareAction.async { implicit request =>
val panos: List[GSVDataExtended] = GSVDataTable.getAllPanosWithLabels
val panos: List[GSVDataSlim] = GSVDataTable.getAllPanosWithLabels
val json: JsValue = Json.toJson(panos.map(p => Json.toJson(p)))
Future.successful(Ok(json))
}
Expand Down
4 changes: 4 additions & 0 deletions app/controllers/ConfigController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ConfigController @Inject() (implicit val env: Environment[User, SessionAut
* Get the city-specific parameters used to pan/zoom maps to correct location.
*/
def getCityMapParams() = Action.async { implicit request =>
val mapboxApiKey: String = Play.configuration.getString("mapbox-api-key").get
val cityStr: String = Play.configuration.getString("city-id").get
val cityLat: Double = Play.configuration.getDouble("city-params.city-center-lat." + cityStr).get
val cityLng: Double = Play.configuration.getDouble("city-params.city-center-lng." + cityStr).get
Expand All @@ -32,6 +33,7 @@ class ConfigController @Inject() (implicit val env: Environment[User, SessionAut
val northeastLng: Double = Play.configuration.getDouble("city-params.northeast-boundary-lng." + cityStr).get
val defaultZoom: Double = Play.configuration.getDouble("city-params.default-map-zoom." + cityStr).get
Future.successful(Ok(Json.obj(
"mapbox_api_key" -> mapboxApiKey,
"city_center" -> Json.obj("lat" -> cityLat, "lng" -> cityLng),
"southwest_boundary" -> Json.obj("lat" -> southwestLat, "lng" -> southwestLng),
"northeast_boundary" -> Json.obj("lat" -> northeastLat, "lng" -> northeastLng),
Expand All @@ -52,6 +54,7 @@ class ConfigController @Inject() (implicit val env: Environment[User, SessionAut
* Get all city-specific parameters needed for the API page demos.
*/
def getCityAPIDemoParams() = Action.async { implicit request =>
val mapboxApiKey: String = Play.configuration.getString("mapbox-api-key").get
val cityStr: String = Play.configuration.getString("city-id").get
val southwestLat: Double = Play.configuration.getDouble("city-params.southwest-boundary-lat." + cityStr).get
val southwestLng: Double = Play.configuration.getDouble("city-params.southwest-boundary-lng." + cityStr).get
Expand Down Expand Up @@ -83,6 +86,7 @@ class ConfigController @Inject() (implicit val env: Environment[User, SessionAut
val regionLng2: Double = Play.configuration.getDouble("city-params.api-demos.region-lng2." + cityStr).get

Future.successful(Ok(Json.obj(
"mapbox_api_key" -> mapboxApiKey,
"southwest_boundary" -> Json.obj("lat" -> southwestLat, "lng" -> southwestLng),
"northeast_boundary" -> Json.obj("lat" -> northeastLat, "lng" -> northeastLng),
"attribute" -> Json.obj(
Expand Down
16 changes: 8 additions & 8 deletions app/controllers/LabelController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ class LabelController @Inject() (implicit val env: Environment[User, SessionAuth
"labelId" -> label.labelData.labelId,
"labelType" -> label.labelType,
"panoId" -> label.labelData.gsvPanoramaId,
"panoramaLat" -> label.labelData.panoramaLat,
"panoramaLng" -> label.labelData.panoramaLng,
"panoLat" -> label.panoLat,
"panoLng" -> label.panoLng,
"originalPov" -> Json.obj(
"heading" -> label.pointData.heading,
"pitch" -> label.pointData.pitch,
"zoom" -> label.pointData.zoom
),
"photographerHeading" -> label.labelData.photographerHeading,
"photographerPitch" -> label.labelData.photographerPitch,
"svImageWidth" -> label.svImageWidth,
"svImageHeight" -> label.svImageHeight,
"cameraHeading" -> label.cameraHeading,
"cameraPitch" -> label.cameraPitch,
"panoWidth" -> label.panoWidth,
"panoHeight" -> label.panoHeight,
"tagIds" -> label.tagIds,
"severity" -> label.labelData.severity,
"tutorial" -> label.labelData.tutorial,
Expand All @@ -55,8 +55,8 @@ class LabelController @Inject() (implicit val env: Environment[User, SessionAuth
"description" -> label.labelData.description,
"canvasX" -> label.pointData.canvasX,
"canvasY" -> label.pointData.canvasY,
"svImageX" -> label.pointData.svImageX,
"svImageY" -> label.pointData.svImageY,
"panoX" -> label.pointData.panoX,
"panoY" -> label.pointData.panoY,
"auditTaskId" -> label.labelData.auditTaskId,
"missionId" -> label.labelData.missionId,
"labelLat" -> label.pointData.lat,
Expand Down
Loading