Skip to content

Commit

Permalink
Add documentation and test set-up
Browse files Browse the repository at this point in the history
  • Loading branch information
aneelac22 committed Aug 20, 2024
1 parent 8f9448b commit 2f333d5
Show file tree
Hide file tree
Showing 9 changed files with 6,244 additions and 121 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,4 +342,7 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/go,vim,git,macos,linux,emacs,windows,eclipse,intellij+all,visualstudiocode
# End of https://www.gitignore.io/api/go,vim,git,macos,linux,emacs,windows,eclipse,intellij+all,visualstudiocode

# UI node-modules
node_modules
1 change: 0 additions & 1 deletion pkg/assets/assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ func TestContent(t *testing.T) {
"codereadyws-logo.svg", "index.html", "landingpage.js",
"redhat-logo.svg", "silent-check-sso.html", "favicon.ico",
"landingpage.css", "openshift-logo.svg", "rhdeveloper-logo.svg",
"redirectpage.html", "redirectpage.js",
}, names)
}
118 changes: 0 additions & 118 deletions pkg/assets/static/redirectpage.js

This file was deleted.

27 changes: 27 additions & 0 deletions pkg/assets/static/redirectpage/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

The redirectPage.js implements the redirect flow of pages from sandbox developer catalog.

== Test

1. In the assets static folder install node_modules by running
```
npm i
```
2. To run tests, execute
```
npm run test
```

== Implementation guidelines

1. When user clicks on a catalog item on developers.redhat.com it redirects to this url format
`${baseUrl}?link="catalogName"&keyword="keyword"&selectedId="selectedId"`
2. If the user is not authenticated, it redirects to sso page for user to login
3. Once the user is authenticated it redirects to the page user wants to access which is in the format
`${consoleUrl}/${link}/ns/${defaultUserNamespace}?keyword="keyword"&selectedId="selectedId"` with
most of the info coming from `api/v1/signup` and the original url

The below are exceptions to above mentioned redirect Url's format
For `Jupyter Notebooks` the url format is `${consoleUrl}/notebookController/spawner`
For `Red Hat Openshift DevSpaces` the url format is `${consoleUrl}/dashboard/`

Loading

0 comments on commit 2f333d5

Please sign in to comment.