Skip to content

Commit 79dcabf

Browse files
committed
HTTP API GET requests now show a clickable link.
1 parent e836de5 commit 79dcabf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

output/html/http.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { EmptyPanel } from '../panels/empty-panel';
22
import { TabularPanel } from '../panels/tabular-panel';
33
import * as Utils from '../utils';
44
import { Toggler } from '../components/toggler';
5+
import { Icon } from '../components/icon';
56
import { Warning } from '../components/warning';
67
import { getCallerCol, getComponentCol } from '../table';
78
import { Time } from '../components/time';
@@ -64,6 +65,11 @@ export const HTTP = ( { data }: PanelProps<DataTypes['http']> ) => {
6465
</div>
6566
) }
6667
{ Utils.formatURL( row.url ) }
68+
{ row.args.method === 'GET' && ! hasInterceptedWarning( row ) && (
69+
<a className="qm-external-link" href={ row.url } target="_blank" rel="noopener noreferrer" aria-label={ __( 'Open URL in new tab', 'query-monitor' ) }>
70+
<Icon name="external"/>
71+
</a>
72+
) }
6773
{ hasHttpsWarning( row ) && (
6874
<div>
6975
<Warning>

0 commit comments

Comments
 (0)