Skip to content
Open
Changes from all commits
Commits
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
4 changes: 1 addition & 3 deletions webapp/src/components/history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ export function History() {
const mapping: Record<string, string> = {};
for (let index = 0; index < data.length; index++) {
const backend = data[index] as BackendData;
mapping[backend.name] = backend.proxyTo;
mapping[backend.proxyTo] = backend.name;
mapping[backend.externalUrl] = backend.name;
}
setBackendMapping(mapping);
}).catch(() => { });
Expand Down Expand Up @@ -96,7 +94,7 @@ export function History() {
<Form.Select field="backendUrl" label='RoutedTo' style={{ width: 200 }} showClear placeholder={Locale.History.RoutedToTip}>
{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>
Copy link
Member

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

Copy link
Member Author

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>} />

<Text>{b.externalUrl}</Text>
</Form.Select.Option>
))}
Expand Down