1- <script setup lang="ts ">
1+ <script setup lang="tsx ">
22import {ref , Ref } from " vue" ;
33
44import {getJson } from " ../../utils/requests" ;
@@ -28,11 +28,15 @@ const dataNew: Ref<
2828 (StatusResponse & {collectorJobMap: CollectorJobMap }) | null
2929> = ref (null );
3030
31- function pullRequestUrlAsHtml( reqType : BenchmarkRequestType ) : string {
32- if (reqType .type === ReleaseCommit ) {
31+ function PullRequestLink({ request } : {request : BenchmarkRequestType }) {
32+ if (request .type === ReleaseCommit ) {
3333 return " " ;
3434 }
35- return ` <a href="https://github.com/rust-lang/rust/pull/${reqType .pr }">#${reqType .pr }</a> ` ;
35+ return (
36+ <a href = { ` https://github.com/rust-lang/rust/pull/${request .pr } ` } >
37+ #{ request .pr }
38+ </a >
39+ );
3640}
3741
3842function formatDuration(milliseconds : number ): string {
@@ -77,7 +81,7 @@ loadStatusNew(loading);
7781 <tbody >
7882 <template v-for =" req in dataNew .completed " >
7983 <tr >
80- <td v-html = " pullRequestUrlAsHtml( req.requestType) " ></td >
84+ <td >< PullRequestLink :request = " req.requestType" / ></td >
8185 <td >{{ req.requestType.type }}</td >
8286 <td >{{ req.requestType.tag }}</td >
8387 <td >{{ req.status.state }}</td >
@@ -103,7 +107,7 @@ loadStatusNew(loading);
103107 <tbody >
104108 <template v-for =" req in dataNew .queue " >
105109 <tr >
106- <td v-html = " pullRequestUrlAsHtml( req.requestType) " ></td >
110+ <td >< PullRequestLink :request = " req.requestType" / ></td >
107111 <td >{{ req.requestType.type }}</td >
108112 <td >{{ req.requestType.tag }}</td >
109113 <td >{{ req.status.state }}</td >
0 commit comments