-
Notifications
You must be signed in to change notification settings - Fork 51
Initial POC for a facility that uses redirects #1357
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
base: dev
Are you sure you want to change the base?
Conversation
|
@Fingel is there a branch of the OCS that this relies on to work? The redirection to the OCS looks good, but I'm guessing this relies on OCS changes to be fully functional. It would be nice to have something running locally before merging this. |
|
OCS PR here: LCOGT/observation-portal-frontend#130 |
Screencast-2025-12-03-13_02.mp4 |
jchate6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. I love the simplicity.
Let's add some small notes for ourselves in the ReadtheDocs about what's expected from a redirect facility on the TOM side and on the Facility side to make this work.
Specifically what the facility should expect and what they need to pass back.
| } | ||
| return urllib.parse.urlencode(set_fields) | ||
|
|
||
| def observation_portal_uri(self) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to url?
| user = request.user | ||
| if not all([facility, target_id, observation_id]): | ||
| messages.error(self.request, 'Missing required parameters: facility, target_id, observation_id') | ||
| return redirect(reverse('tom_observations:list')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to redirect back to target detail page if target_id exists
|
I added a couple paragraphs about the Redirect Facility to the sphinx docs. I'm reluctant to add anything more specific as the implementation might change. |
I think that's exactly the right level of detail. |
This is how this flow works:
User is at the TOM:
Now at the OCS:
Now back at the TOM: