- 
                Notifications
    
You must be signed in to change notification settings  - Fork 119
 
Cleanup backendmappings in history UI page #731
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: main
Are you sure you want to change the base?
Cleanup backendmappings in history UI page #731
Conversation
| 
           For UI change, could you include a picture of before and after so it's clear on what the changes are?  | 
    
| 
           Yes Thanks, I can include this. Though, for this change we dont expect any UI changes, it's mostly just code cleanup. I'll add the UI screenshot after running the branch locally  | 
    
| 
           @raj-manvar any update?  | 
    
d7257a2    to
    215252b      
    Compare
  
    | 
           Sorry @RoeyoOgen for the delay. Added screenshot and also rebased with latest main branch  | 
    
215252b    to
    334540f      
    Compare
  
    | 
           Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Raj Manvar. 
  | 
    
334540f    to
    8e1cb45      
    Compare
  
    | {backendData?.map(b => ( | ||
| <Form.Select.Option key={b.externalUrl} value={b.externalUrl}> | ||
| <Tag color={'blue'} style={{ marginRight: '5px' }}>{backendMapping[b.externalUrl]}</Tag> | ||
| <Tag color={'blue'} style={{ marginRight: '5px' }}>{b.name}</Tag> | 
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.
Do we still use backendMapping anywhere if you change it to b.name? Or we can completely remove it
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.
we still use it at
| <Column title="Name" dataIndex="backendUrl" key="backendUrlName" render={(text: string) => <Text>{backendMapping[text]}</Text>} /> | 




Description
Currently the history.tsx which is for rendering the Query history page has backendMapping defined at https://github.com/trinodb/trino-gateway/blob/main/webapp/src/components/history.tsx#L18
It stores mapping between:
backend name -> backend proxy URL
backend proxy URL -> backend name
backend external Url -> backend name.
From usage, only the ProxyUrl -> backend Name mapping is used while displaying the backend name in the list of query history, rest mapping can be cleaned up.
Additional context and related issues
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required, with the following suggested text: