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

Feature/ns to gw #1071

Draft
wants to merge 128 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
830d0ef
changes for local dev w/ npm
rustyjux Apr 17, 2024
25011f8
new page for no gateways - WIP
rustyjux Apr 22, 2024
160081a
CliCommand component
rustyjux Apr 22, 2024
e034ab4
restore IconButton
rustyjux Apr 22, 2024
413fe49
create all elements
rustyjux Apr 23, 2024
e432021
smooth scroll
rustyjux Apr 23, 2024
b46d347
fix scroll
rustyjux Apr 23, 2024
a7f2dd6
move no-gateways content into new component
rustyjux Apr 25, 2024
de0bc29
add query to see if there are gateways
rustyjux Apr 25, 2024
74d202e
changes for local dev w/ npm
rustyjux Apr 17, 2024
54b0d1b
Move ns dropdown
rustyjux May 1, 2024
aeda668
save and load recently viewed gws
rustyjux May 1, 2024
e8cff9f
search namespaces
rustyjux May 2, 2024
c9c032a
oops - remove local dev changes
rustyjux May 3, 2024
136dbdb
fix UserData.userId property reference
rustyjux May 3, 2024
b0fa764
fix ip
rustyjux May 3, 2024
9e1c0b4
maintain focus, style, fix type errors
rustyjux May 3, 2024
0bdc95d
ns to gw in text
rustyjux May 3, 2024
bc63b36
include current gw in recently viewed
rustyjux May 3, 2024
8e54df1
add query to whitelist
rustyjux May 3, 2024
757e905
remove old menu for no NSs
rustyjux May 3, 2024
db43e06
remove current gw from recently viewed
rustyjux May 30, 2024
346066e
edit display name - WIP, query and mutation inc
rustyjux May 31, 2024
1bdca86
touch up ns search
rustyjux Jun 3, 2024
56be561
style edit display name
rustyjux Jun 3, 2024
17bbf94
fix error
rustyjux Jun 3, 2024
1f549c5
add displayName to mocks
rustyjux Jun 3, 2024
5dde66f
show ns displayname on namespaces page
rustyjux Jun 3, 2024
58eb847
remove files / changes accidentally committed
rustyjux Jun 3, 2024
98a97f2
refine Getting Started content
rustyjux Jun 3, 2024
0217134
Feature/display name backend for selector (#1058)
ikethecoder Jun 4, 2024
840b1c7
cleanup
rustyjux Jun 4, 2024
07c68bf
make full gateways list link a MenuItem
rustyjux Jun 4, 2024
6ffafd1
cleanup
rustyjux Jun 4, 2024
8e71187
update Your Products page header
rustyjux Jun 4, 2024
f3abe75
refresh namespaces when opening menu
rustyjux Jun 4, 2024
a89a7c0
first draft
ikethecoder Jun 4, 2024
a497909
hide Recently Viewed heading if none
rustyjux Jun 4, 2024
74774be
udp babel config
ikethecoder Jun 4, 2024
422c566
adj to run sonarscan
ikethecoder Jun 4, 2024
6d6b48d
default to v3 of api
ikethecoder Jun 4, 2024
d1dc8c5
search both name and displayName
rustyjux Jun 5, 2024
7d83ab8
change Your Products header
rustyjux Jun 5, 2024
78f9429
add cypress tests for v3 of api
ikethecoder Jun 5, 2024
8c77220
cleanup bit of cypress
ikethecoder Jun 5, 2024
ab31df5
new page for get-started
rustyjux Jun 5, 2024
d02a5ba
added Get Started to links to show in nav for dev
rustyjux Jun 5, 2024
8fb827c
divide up api v2 tests
ikethecoder Jun 6, 2024
455903e
add endpoint availability check
ikethecoder Jun 6, 2024
71a3397
make available a boolean
ikethecoder Jun 6, 2024
f322e01
upd route availability
ikethecoder Jun 6, 2024
7553ab7
replace gatewayId in create-gateway call
rustyjux Jun 11, 2024
90d6720
v3 upds generate display name and dataset resources contacts
ikethecoder Jun 12, 2024
955b8dc
remove unused file
ikethecoder Jun 12, 2024
3b5aaa6
fix the org and product batch loading
ikethecoder Jun 13, 2024
b9d19d3
fix unit test
ikethecoder Jun 13, 2024
88165cb
Merge pull request #1050 from bcgov/feature/ns-to-gw-selector
ikethecoder Jun 13, 2024
7612f5e
Merge pull request #1061 from bcgov/feature/ns-to-gw-v3-api
ikethecoder Jun 13, 2024
4092080
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-new-provider
ikethecoder Jun 13, 2024
899ca04
Merge pull request #1045 from bcgov/feature/ns-to-gw-new-provider
ikethecoder Jun 13, 2024
d5e34e9
My gateways page changes copied over
Elson9 Jun 14, 2024
4b92b6f
Merge pull request #1069 from bcgov/feature/my-gateways-page-new
ikethecoder Jun 14, 2024
3ebeada
Added and updated breadcrumbs
Elson9 Jun 18, 2024
79fef16
redirect provider to /manager/gateways on login
rustyjux Jun 19, 2024
4e9a214
upd namespace display name validation and default value
ikethecoder Jun 19, 2024
8eb965a
upd route endpoint availability
ikethecoder Jun 19, 2024
72f363d
restrict new My Gateways to signed in portal-user
rustyjux Jun 19, 2024
ae98e63
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jun 19, 2024
7c82ace
hide gateway selector on Get Started page
rustyjux Jun 19, 2024
2635f0f
use consts for help URLs
rustyjux Jun 19, 2024
b29a5dc
Breadcrumbs display name support
Elson9 Jun 19, 2024
58ae174
upd proxy to gwa-api to keep using v2
ikethecoder Jun 20, 2024
03ba6b2
Update api-proxy to gwa-api to fix routing to v2
ikethecoder Jun 20, 2024
42420fd
use existing whitelisted query
rustyjux Jun 20, 2024
50174ce
conditionally push to Get Started page, simplify query
rustyjux Jun 20, 2024
f4293f0
show banner if gateways on Get Started
rustyjux Jun 20, 2024
d499f23
show all GWs if no recently viewed GWs
rustyjux Jun 21, 2024
e257919
show displayName on selector button
rustyjux Jun 21, 2024
9af6815
handle null currentNamespace
rustyjux Jun 24, 2024
b589ea8
link to My Gateways
rustyjux Jun 24, 2024
bb1367d
remove Get Started from nav links
rustyjux Jun 24, 2024
55fa508
use appendedBreadcrumbs to check if it's the gateway details page. Re…
Elson9 Jun 24, 2024
8d0767d
don't refetch on search change
rustyjux Jun 24, 2024
2611538
Merge pull request #1073 from bcgov/feature/gateway-breadcrumbs
Elson9 Jun 24, 2024
e3c600b
Gateways restructure and redirect logic
Elson9 Jun 24, 2024
6248bae
My gateways page redirects to detail page when gateway selected
Elson9 Jun 24, 2024
7fea734
update recentlyViewedNamespaces on change from list
rustyjux Jun 24, 2024
c580470
add GRAFANA_URL to .env.local
rustyjux Jun 24, 2024
01baa0c
don't show gw selector on list
rustyjux Jun 24, 2024
de2078a
Gateways redirect logic optimization
Elson9 Jun 25, 2024
c8d7e3d
add details to 'test your gateway' step
rustyjux Jun 25, 2024
32604f9
update labels in /nextapp
rustyjux Jun 26, 2024
a22c849
a few more renames
rustyjux Jun 26, 2024
fb02632
gw switch toast messages
rustyjux Jun 26, 2024
50ce477
replace use of namespace.name
rustyjux Jun 26, 2024
303ce72
fix links.ts for new gateways pages
rustyjux Jun 26, 2024
58b7c3a
Reduce space after title (header)
Elson9 Jun 26, 2024
9b1d320
Remove New tag
Elson9 Jun 26, 2024
0ae0620
Detail page: redirect to list if no gateway selected
Elson9 Jun 26, 2024
b158c92
Naming updates
Elson9 Jun 26, 2024
abe3ddb
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jun 26, 2024
bd7ada8
Remove unused POC content
rustyjux Jun 26, 2024
6647b54
Sort alphabetically by displayName, secondarily by name
Elson9 Jun 26, 2024
47bc3cf
Remove check for existence of displayName (assume always exists)
Elson9 Jun 26, 2024
f137491
Fixed TypeError: Cannot read properties of undefined (reading 'locale…
Elson9 Jun 26, 2024
0a8d50c
rename Namespace permissions to Gateway
rustyjux Jun 27, 2024
e8b455e
rename namespace-access page to admin-access
rustyjux Jun 27, 2024
b36d9e4
lowercase gateway in selector menu
rustyjux Jun 27, 2024
915326b
Use global techdocs URL
Elson9 Jun 27, 2024
32b9f3e
update gateways report output
rustyjux Jun 27, 2024
807556c
delete unused resources content
rustyjux Jun 27, 2024
9639e87
modify Get Started
rustyjux Jun 27, 2024
5c3e1d6
Other manager pages: redirect to list if no gateway selected
Elson9 Jun 28, 2024
09299f4
Merge branch 'feature/ns-to-gw' of https://github.com/bcgov/api-servi…
rustyjux Jul 2, 2024
f55b4a3
set host commands based on portal environment
rustyjux Jul 3, 2024
a5832b1
default access manage to new gateway owner
ikethecoder Jul 3, 2024
b1c0c02
default a gw display name when blank
ikethecoder Jul 3, 2024
74e9cb8
undo setting api root - setting during build does not allow override …
ikethecoder Jul 4, 2024
b158bc2
remove some unnecessary logging
ikethecoder Jul 4, 2024
1db929d
Gateways nav bar link no longer redirects to details page
Elson9 Jul 4, 2024
a1a840b
fix check availability
ikethecoder Jul 4, 2024
d4613f7
Adding or removing gateway shows up instantly in list page
Elson9 Jul 4, 2024
5e159c7
complete review suggestions
rustyjux Jul 5, 2024
99aedb1
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
31e2f21
Merge branch 'feature/ns-to-gw' into feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
dfd02fc
Merge pull request #1077 from bcgov/feature/ns-to-gw-portal-labels
rustyjux Jul 5, 2024
04dd9fb
add toast during gw delete
rustyjux Jul 5, 2024
fe831ce
fix incomplete data on revisit to gateways/list
rustyjux Jul 5, 2024
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
9 changes: 8 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LOG_LEVEL=info
LOG_LEVEL=debug
DISABLE_LOGGING='true'
AUTH_STRATEGY=Oauth2Proxy
KNEX_HOST=kong-db
Expand Down Expand Up @@ -31,3 +31,10 @@ NEXT_PUBLIC_DEVELOPER_IDS=idir,bceid,bcsc,github
NEXT_PUBLIC_PROVIDER_IDS=idir
NEXT_PUBLIC_ACCOUNT_BCEID_URL=https://www.test.bceid.ca/logon.aspx?returnUrl=/profile_management
NEXT_PUBLIC_ACCOUNT_BCSC_URL=https://idtest.gov.bc.ca/account/

# For automated integrated testing
TEST_PORTAL_CLIENT_ID=aps-portal
TEST_PORTAL_CLIENT_SECRET=8e1a17ed-cb93-4806-ac32-e303d1c86018
TEST_PORTAL_USERNAME=janis@idir
TEST_PORTAL_PASSWORD=awsummer

2 changes: 1 addition & 1 deletion .github/workflows/ci-build-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
NEXT_PUBLIC_HELP_ISSUE_URL:
value: 'https://github.com/bcgov/api-services-portal/issues'
NEXT_PUBLIC_HELP_API_DOCS_URL:
value: '/ds/api/v2/console/'
value: '/ds/api/v3/console/'
NEXT_PUBLIC_HELP_SUPPORT_URL:
value: 'https://developer.gov.bc.ca/docs/default/component/aps-infra-platform-docs/'
NEXT_PUBLIC_HELP_RELEASE_URL:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-feat-sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Run Tests
run: |
docker compose up kong-db -d
docker compose up keycloak -d

set -o allexport
source ./.env.local
Expand Down
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,19 @@ Use the following configuration to run the Portal locally (outside of Docker) ag

1. If using Node version > 17, run `npm install --legacy-peer-deps`

1. Turn off the docker compose Portal: `docker stop apsportal`
1. Configure the `oauth2-proxy` that is running in Docker:
1. Turn off the docker compose Portal and OAuth2 Proxy: `docker stop apsportal oauth2-proxy`

1. Update `upstreams` in `local/oauth2-proxy/oauth2-proxy-local.cfg` to include the IP address of your local machine, e.g. `upstreams=["http://172.100.100.01:3000"]`
<br>You can obtain the IP address using `hostname -I`.
1. Start the OAuth2 Proxy locally:

1. Restart the oauth2-proxy: `docker compose restart oauth2-proxy`
1. Update `DESTINATION_URL` in `local/feeds/.env.local` to include the IP address of your local machine
1. Restart the feeder: `docker compose restart feeder`
1. Update `PORTAL_ACTIVITY_URL` in `local/gwa-api/.env.local` to include the IP address of your local machine
1. Restart the feeder: `docker compose restart gwa-api`
```sh
hostip=$(ifconfig en0 | awk '$1 == "inet" {print $2}')

docker run -ti --rm --name proxy --net=host \
--add-host portal.localtest.me:$hostip \
-v `pwd`/local/oauth2-proxy/oauth2-proxy-dev.cfg:/oauth2.config \
quay.io/oauth2-proxy/oauth2-proxy:v7.2.0 \
--config /oauth2.config
```

1. Start the Portal locally:

Expand Down
5 changes: 4 additions & 1 deletion e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default defineConfig({
'./cypress/tests/16-*/*.ts',
'./cypress/tests/17-*/*.ts',
'./cypress/tests/18-*/*.ts',
'./cypress/tests/19-*/*.ts',
]
return config
},
Expand All @@ -59,7 +60,7 @@ export default defineConfig({
env: {
CLIENT_ID: 'aps-portal',
CLIENT_SECRET: '8e1a17ed-cb93-4806-ac32-e303d1c86018',
OIDC_ISSUER: 'http://keycloak.localtest.me:9081',
OIDC_ISSUER: 'http://keycloak.localtest.me:9081/auth/realms/master',
TOKEN_URL:
'http://keycloak.localtest.me:9081/auth/realms/master/protocol/openid-connect/token',
GWA_API_URL: 'http://gwa-api.localtest.me:2000/v2',
Expand All @@ -69,6 +70,8 @@ export default defineConfig({
BASE_URL: 'http://oauth2proxy.localtest.me:4180',
KEYCLOAK_URL: 'http://keycloak.localtest.me:9081',
WEBAPP_URL: 'http://html-sample-app.localtest.me:4242',
DEV_USERNAME: 'janis@idir',
DEV_PASSWORD: 'awsummer',
},
retries: {
runMode: 2,
Expand Down
Loading
Loading