Skip to content

Commit

Permalink
Merge branch 'staging' into email-phone-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
katendejericho5 committed Jan 16, 2024
2 parents 59288db + da1a4d6 commit 1ba870d
Show file tree
Hide file tree
Showing 50 changed files with 1,755 additions and 902 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy-frontend-pr-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,16 @@ jobs:
--project=${{ secrets.FRONTEND_PROJECT_ID }} \
--quiet
- name: Delete Old Versions
run: |-
service="website-pr-previews"
versions=$(gcloud app versions list --service=$service --sort-by '~LAST_DEPLOYED' --format 'value(VERSION.ID)' | grep -v 'maintenance' | sort -r | tail -n +4)
for version in $versions; do
echo "Deleting version: $version for service: $service"
gcloud app versions delete "$version" --service=$service --quiet
done
website-pr-comment:
name: website-preview-link-comment
if: needs.check.outputs.run_website == 'true'
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/deploy-frontends-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ jobs:
--image-url=${{ env.REGISTRY_URL }}/${{ secrets.FRONTEND_PROJECT_ID }}/airqo-website:latest \
--project=${{ secrets.FRONTEND_PROJECT_ID }} \
--quiet
- name: Delete Old Versions
run: |-
service="default"
versions=$(gcloud app versions list --service=$service --sort-by '~LAST_DEPLOYED' --format 'value(VERSION.ID)' | grep -v 'maintenance' | sort -r | tail -n +4)
for version in $versions; do
echo "Deleting version: $version for service: $service"
gcloud app versions delete "$version" --service=$service --quiet
done
### build and push calibrate app image ###
calibrate-app:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/deploy-frontends-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,16 @@ jobs:
--project=${{ secrets.FRONTEND_PROJECT_ID }} \
--quiet
- name: Delete Old Versions
run: |-
service="staging"
versions=$(gcloud app versions list --service=$service --sort-by '~LAST_DEPLOYED' --format 'value(VERSION.ID)' | grep -v 'maintenance' | sort -r | tail -n +4)
for version in $versions; do
echo "Deleting version: $version for service: $service"
gcloud app versions delete "$version" --service=$service --quiet
done
### build and push calibrate app image ###
calibrate-app:
name: build-push-calibrate-app-image
Expand Down
19 changes: 19 additions & 0 deletions Maintenance/.gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file specifies files that are *not* uploaded to Google Cloud
# using gcloud. It follows the same syntax as .gitignore, with the addition of
# "#!include" directives (which insert the entries of the given .gitignore-style
# file at that point).
#
# For more information, run:
# $ gcloud topic gcloudignore
#
.gcloudignore
# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
.git
.gitignore

# Python pycache:
__pycache__/
# Ignored by the build system
/setup.cfg
11 changes: 11 additions & 0 deletions Maintenance/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
runtime: python38
service: website-pr-previews

handlers:
- url: /
static_files: www/index.html
upload: www/index.html

- url: /(.*)
static_files: www/\1
upload: www/(.*)
11 changes: 11 additions & 0 deletions Maintenance/default-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
runtime: python38
service: default

handlers:
- url: /
static_files: www/index.html
upload: www/index.html

- url: /(.*)
static_files: www/\1
upload: www/(.*)
11 changes: 11 additions & 0 deletions Maintenance/staging-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
runtime: python38
service: staging

handlers:
- url: /
static_files: www/index.html
upload: www/index.html

- url: /(.*)
static_files: www/\1
upload: www/(.*)
3 changes: 3 additions & 0 deletions Maintenance/www/imgs/Logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions Maintenance/www/imgs/Oops.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions Maintenance/www/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html>
<head>
<title>Site Under Maintenance</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="./imgs/Logo.svg" />
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f3f3f3;
font-family: Arial, sans-serif;
}
.navbar {
display: flex;
justify-content: left;
width: 100%;
padding: 10px 0;
border-bottom: 1px solid #a1a1a1;
}
.logo {
margin-left: 20px;
}
.container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
flex-grow: 1;
text-align: center;
width: 100%;
max-width: 640px;
margin: 0 auto;
}
.icon {
fill: #ff6347;
width: 300px;
height: 300px;
margin-bottom: 20px;
}
.message {
font-size: 25px;
font-weight: 500;
color: #333;
}
@media (max-width: 600px) {
.icon {
width: 200px;
height: 200px;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="logo">
<img src="./imgs/Logo.svg" alt="Logo" loading="lazy"/>
</div>
</nav>
<div class="container">
<img class="icon" src="./imgs/Oops.svg" alt="maintenance" loading="lazy"/>
<div class="message">
The site is currently undergoing scheduled maintenance. We apologize for any inconvenience caused and appreciate your patience. Please check back later.
</div>
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion inventory/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# deploy .
# AirQo Hardware Inventory
metadata
2 changes: 1 addition & 1 deletion k8s/inventory/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-inventory
tag: prod-98b27f61-1700079645
tag: prod-ead7c21a-1705327678
pullPolicy: Always
imagePullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/inventory/values-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-inventory
tag: stage-da9849e0-1700073280
tag: stage-fcff95f3-1705327162
pullPolicy: Always
imagePullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/netmanager/values-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-platform-frontend
tag: prod-c144865b-1702298458
tag: prod-ead7c21a-1705327678
pullPolicy: Always
imagePullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/netmanager/values-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
replicaCount: 2
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-platform-frontend
tag: stage-ce577706-1702298410
tag: stage-46a4f02f-1705327525
pullPolicy: Always
imagePullSecrets: []
nameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/platform/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: eu.gcr.io/airqo-250220/airqo-next-platform
pullPolicy: Always
tag: prod-8a8c7e6f-1702302188
tag: prod-48ba24f3-1704658079
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/platform/values-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-next-platform
pullPolicy: Always
tag: stage-dfe786a8-1702302133
tag: stage-93bdb5ea-1704484427
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
Expand Down
3 changes: 2 additions & 1 deletion mobile/lib/constants/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class AirQoUrls {
static String get appVersion =>
'${Config.airqoApi}/v2/view/mobile-app/version-info';

static String get measurements => '${Config.airqoApi}/v2/devices/events';
static String get measurements =>
'${Config.airqoApi}/v2/devices/readings/map';

static String get emailReAuthentication =>
'${Config.airqoApi}/v2/users/emailAuth';
Expand Down
13 changes: 0 additions & 13 deletions mobile/lib/services/rest_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,19 +433,6 @@ class AirqoApiClient {
final locale = prefs.getString("language") ?? "en";
final airQualityReadings = <AirQualityReading>[];
final queryParams = <String, String>{}
..putIfAbsent('recent', () => 'yes')
..putIfAbsent('metadata', () => 'site_id')
..putIfAbsent('external', () => 'no')
..putIfAbsent(
'startTime',
() => '${DateFormat('yyyy-MM-dd').format(
DateTime.now().toUtc().subtract(
const Duration(days: 1),
),
)}T00:00:00Z',
)
..putIfAbsent('frequency', () => 'hourly')
..putIfAbsent('tenant', () => 'airqo')
..putIfAbsent('token', () => Config.airqoApiV2Token);

if (locale != "en") {
Expand Down
12 changes: 6 additions & 6 deletions netmanager/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion netmanager/src/AppRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const AppRoutes = ({ auth, logoutUser }) => {
<PrivateRoute exact path="/sites" component={SiteRegistry} layout={MainLayout} />
<PrivateRoute exact path="/sites/:id" component={SiteView} layout={MainLayout} />
<PrivateRoute exact path="/sim" component={SimRegistry} layout={MainLayout} />
<PrivateRoute exact path="/heatMap" component={HeatMapOverlay} layout={MainLayout} />

<PrivateRoute exact path="/overview" component={Overview} layout={MainLayout} />
<PrivateRoute
Expand Down
Loading

0 comments on commit 1ba870d

Please sign in to comment.