Skip to content

Commit

Permalink
Merge pull request #3730 from ProjectSidewalk/3722-new-city-configs-a…
Browse files Browse the repository at this point in the history
…nd-dev-env-updates

Adds configs for Knox County, Taichung, and Kaohsing
  • Loading branch information
misaugstad authored Nov 9, 2024
2 parents 62d3000 + 331818d commit e219d1c
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 33 deletions.
13 changes: 1 addition & 12 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,9 @@
}

<script>
var oldAnalyticsStr = "@{Play.configuration.getString(s"city-params.old-google-analytics-id.${environmentType}.${cityId}")}";
if (oldAnalyticsStr) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', oldAnalyticsStr, 'auto');
ga('send', 'pageview');
}

// Log clicks on links in the footer to WebpageActivityTable
// Depending on column, form of log varies by the following:
// Column is 'Project Sidewalk' or "Developer'
// Column is 'Project Sidewalk' or 'Developer'
// log is of form: "Click_module=Footer_section=<"sidewalk" or "developer">_target=<link>"
// Column is 'Connect'
// log is of form: "Click_module=Footer_section=connect_platform=<"github", "twitter", or "email">"
Expand Down
52 changes: 31 additions & 21 deletions conf/cityparams.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ city-params {
"st-louis-mo"
"la-ca"
"mendota-il"
"knox-oh"
"kaohsiung-tw"
"taichung-tw"
]
city-short-name {
washington-dc = "DC"
Expand All @@ -53,6 +56,7 @@ city-params {
st-louis-mo = "missouri"
la-ca = "california"
mendota-il = "illinois"
knox-oh = "ohio"
}
country-id {
newberg-or = "usa"
Expand Down Expand Up @@ -81,6 +85,9 @@ city-params {
st-louis-mo = "usa"
la-ca = "usa"
mendota-il = "usa"
knox-oh = "usa"
kaohsiung-tw = "taiwan"
taichung-tw = "taiwan"
}
status {
newberg-or = "public"
Expand Down Expand Up @@ -109,6 +116,9 @@ city-params {
st-louis-mo = "public"
la-ca = "private"
mendota-il = "public"
knox-oh = "public"
kaohsiung-tw = ${city-params.status.taipei}
taichung-tw = ${city-params.status.taipei}
}
launch-date {
newberg-or = "2019-01-31"
Expand Down Expand Up @@ -136,6 +146,9 @@ city-params {
st-louis-mo = "2024-4-10"
la-ca = "2024-9-16"
mendota-il = "2024-9-16"
knox-oh = "2024-11-11"
kaohsiung-tw = "2024-11-11"
taichung-tw = "2024-11-11"
}
skyline-img = {
newberg-or = "skyline1.png"
Expand Down Expand Up @@ -164,6 +177,9 @@ city-params {
st-louis-mo = "skyline1.png"
la-ca = "skyline1.png"
mendota-il = "skyline1.png"
knox-oh = "skyline1.png"
kaohsiung-tw = ${city-params.skyline-img.taipei}
taichung-tw = ${city-params.skyline-img.taipei}
}
logo-img = {
newberg-or = "sidewalk-logo.png"
Expand Down Expand Up @@ -192,6 +208,9 @@ city-params {
st-louis-mo = "sidewalk-logo.png"
la-ca = "sidewalk-logo.png"
mendota-il = "sidewalk-logo.png"
knox-oh = "sidewalk-logo.png"
kaohsiung-tw = ${city-params.logo-img.taipei}
taichung-tw = ${city-params.logo-img.taipei}
}
landing-page-url {
prod {
Expand Down Expand Up @@ -221,6 +240,9 @@ city-params {
st-louis-mo = "https://sidewalk-st-louis.cs.washington.edu"
la-ca = "https://sidewalk-la.cs.washington.edu"
mendota-il = "https://sidewalk-mendota.cs.washington.edu"
knox-oh = "https://sidewalk-knox.cs.washington.edu"
kaohsiung-tw = "https://sidewalk-kaohsiung.cs.washington.edu"
taichung-tw = "https://sidewalk-taichung.cs.washington.edu"
}
test {
newberg-or = "https://sidewalk-newberg-test.cs.washington.edu"
Expand Down Expand Up @@ -249,6 +271,9 @@ city-params {
st-louis-mo = "https://sidewalk-st-louis-test.cs.washington.edu"
la-ca = "https://sidewalk-la-test.cs.washington.edu"
mendota-il = "https://sidewalk-mendota-test.cs.washington.edu"
knox-oh = "https://sidewalk-knox-test.cs.washington.edu"
kaohsiung-tw = "https://sidewalk-kaohsiung-test.cs.washington.edu"
taichung-tw = "https://sidewalk-taichung-test.cs.washington.edu"
}
}
google-analytics-4-id {
Expand Down Expand Up @@ -279,6 +304,9 @@ city-params {
st-louis-mo = "G-3HL22FM4BS"
la-ca = "G-815WLSJ888"
mendota-il = "G-1CYXWS6195"
knox-oh = "G-QKX0CSTXXE"
kaohsiung-tw = "G-GCWWM428SX"
taichung-tw = "G-M24PL5F2Z7"
}
test {
newberg-or = "G-P2JPSFFN3H"
Expand Down Expand Up @@ -306,27 +334,9 @@ city-params {
st-louis-mo = "G-DJMP9QBM0M"
la-ca = "G-LJKNZP9DYK"
mendota-il = "G-2V84GVCHV4"
}
}
// New cities have ony GA 4. Old cities also retain the old GA tracking.
old-google-analytics-id {
prod {
newberg-or = "UA-136713858-1"
washington-dc = "UA-76528208-1"
seattle-wa = "UA-136685580-1"
columbus-oh = "UA-151353296-1"
cdmx = "UA-153189107-1"
spgg = "UA-167201803-1"
pittsburgh-pa = "UA-173904238-1"
}
test {
newberg-or = "UA-136713858-2"
washington-dc = "UA-76528208-3"
seattle-wa = "UA-136685580-2"
columbus-oh = "UA-151353296-2"
cdmx = "UA-153189107-2"
spgg = "UA-167201803-2"
pittsburgh-pa = "UA-173904238-2"
knox-oh = "G-X55P3NXCSX"
kaohsiung-tw = "G-QKLBVC4YR4"
taichung-tw = "G-J9CWR4T8T6"
}
}
}
3 changes: 3 additions & 0 deletions conf/messages
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ city.name.walla-walla-wa = Walla Walla
city.name.st-louis-mo = St. Louis
city.name.la-ca = Los Angeles
city.name.mendota-il = Mendota
city.name.knox-oh = Knox County
city.name.kaohsiung-tw = Kaohsiung
city.name.taichung-tw = Taichung

state.name.oregon = Oregon
state.name.dc = DC
Expand Down
1 change: 1 addition & 0 deletions conf/messages.es
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ city.name.zurich = Zúrich
city.name.new-taipei-tw = Nuevo Taipei
city.name.st-louis-mo = San Luis
city.name.la-ca = Los Ángeles
city.name.knox = Condado de Knox

state.name.oregon = Oregón
state.name.pennsylvania = Pensilvania
Expand Down
3 changes: 3 additions & 0 deletions conf/messages.zh-TW
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ city.name.walla-walla-wa = 瓦拉瓦拉
city.name.st-louis-mo = 聖路易
city.name.la-ca = 洛杉磯
city.name.mendota-il = 門多塔
city.name.knox = 諾克斯縣
city.name.kaohsiung-tw = 高雄市
city.name.taichung-tw = 臺中市

state.name.oregon = 奧勒岡州
state.name.dc = 特區
Expand Down
1 change: 1 addition & 0 deletions db/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ psql -v ON_ERROR_STOP=1 -U sidewalk -d sidewalk <<-EOSQL
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
EOSQL

pg_restore -U sidewalk -Fc -d sidewalk /opt/sidewalk_init_users_dump
pg_restore -U sidewalk -Fc -d sidewalk /opt/sidewalk_init_dump

# Remove any password authentication on databases. This should be used for dev environment only.
Expand Down
Binary file modified db/sidewalk_init_dump
Binary file not shown.
Binary file added db/sidewalk_init_users_dump
Binary file not shown.

0 comments on commit e219d1c

Please sign in to comment.