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

Maintain backward compatibility with url's from old webui #131

Open
2 of 9 tasks
Tracked by #301
maany opened this issue Feb 3, 2023 · 2 comments
Open
2 of 9 tasks
Tracked by #301

Maintain backward compatibility with url's from old webui #131

maany opened this issue Feb 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@maany
Copy link
Member

maany commented Feb 3, 2023

Description

The new webui will recieve requests from panda or clients of old webui that use the older routes.

Therefore, to be a hot swap of the old UI, it is important to maintain a map that is used to redirect the user from old URL to the correct new URL.

Change

This would require exporting a redirect configuration in Next.js

https://nextjs.org/docs/api-reference/next.config.js/redirects

Redirect targets

  • Page DID
  • List DID
  • Page RSE
  • List RSE
  • Page Subscription
  • List Subscription
  • Page Rule
  • Create Rule
  • List Rule
@maany maany added the enhancement New feature or request label Feb 3, 2023
@maany maany added this to the 1.31.0 milestone Feb 3, 2023
@maany maany modified the milestones: 1.31.0, 1.32.0 Apr 5, 2023
@ThePhisch ThePhisch self-assigned this Aug 24, 2023
@ThePhisch
Copy link
Contributor

ThePhisch commented Aug 29, 2023

Quick analysis of the old webui routes searching to map the routes to the url_param they use can be done using the following snippet:

for file in *.html; do
    echo -e "\n===================="
    echo Route ${file%.html}
    echo "===================="
    jspath=../../static/${file%.html}.js
    regex="(?<=url_param\(')[a-z_]+(?='\))"
    grep -oP $regex $jspath | sort -u
done

Output:

account

  • account

accounting

account_rse_usage

  • account

accounts

account_usage_history

account_usage

add_rse

approve_rules

  • account
  • activity
  • age
  • interval
  • name
  • rse
  • rse_expression
  • state

atlas_index

backlog_mon

  • account
  • activity
  • age
  • age_mode
  • datatype
  • endpoint
  • project
  • state
  • stream

bad_replicas

  • rse
  • state

bad_replicas_summary

  • rse_expression

base

cond

dbrelease

did

  • name
  • scope

dumps

grep: ../../static/dumps.js: No such file or directory

heartbeats

index

infrastructure

grep: ../../static/infrastructure.js: No such file or directory

lifetime_exception

list_lifetime_exceptions

list_rules

  • account
  • activity
  • interval
  • rse
  • state

login

no_certificate

grep: ../../static/no_certificate.js: No such file or directory

problem

grep: ../../static/problem.js: No such file or directory

request_rule

rse_account_usage

  • rse

rse_add_protocol

  • rse

rse

  • rse

rse_locks

  • expression
  • rses

rses

rse_usage

  • max
  • min
  • rses

rule

  • action
  • lock_state
  • name
  • rule_id
  • show_locks

rules

search

  • pattern

select_login_method

grep: ../../static/select_login_method.js: No such file or directory

subscription

  • account
  • id
  • name
  • rule_id

subscriptionrules

  • account
  • name
  • state

subscriptions_editor

  • account
  • name

subscriptions

  • account

suspicious_replicas

@ThePhisch
Copy link
Contributor

It seems that there is no native nextjs method to prevent the query string parameters from the old url to be added to the new (redirected) url. this should not be a problem though, since excess query string parameters are simply ignored.

@maany maany modified the milestones: 32.0, 34.0 Jan 12, 2024
@maany maany modified the milestones: 34.0, 35.0 Apr 5, 2024
@maany maany assigned maany and unassigned ThePhisch Apr 5, 2024
@maany maany modified the milestones: 35.0, 37.0.0 Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants