Skip to content

Commit 70f42cf

Browse files
Wenbin ZhangSkCQ
authored andcommitted
[perf] create report link on bug id column in anomalies table
Updates the bug column link to open the report page. It was pointing to buganizer. Also fixed a </td> to </a> in formatBug(). Bug: b/378968893 Change-Id: If5701197e40030adf52e0353071456658cdb3469 Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/928764 Commit-Queue: Wenbin Zhang <[email protected]> Reviewed-by: Eduardo Yap <[email protected]>
1 parent ec26433 commit 70f42cf

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

perf/modules/anomalies-table-sk/anomalies-table-sk.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export class AnomaliesTableSk extends ElementSk {
270270
<trending-up-icon-sk></trending-up-icon-sk>
271271
</td>
272272
<td>
273-
${AnomalySk.formatBug(this.bug_host_url, anomaly.bug_id)}
273+
${this.getReportLinkForBugId(anomaly.bug_id)}
274274
<close-icon-sk
275275
id="btnUnassociate"
276276
@click=${() => {
@@ -303,6 +303,19 @@ export class AnomaliesTableSk extends ElementSk {
303303
return rows;
304304
}
305305

306+
private getReportLinkForBugId(bug_id: number) {
307+
if (bug_id === 0) {
308+
return html``;
309+
}
310+
if (bug_id === -1) {
311+
return html`Invalid Alert`;
312+
}
313+
if (bug_id === -2) {
314+
return html`Ignored Alert`;
315+
}
316+
return html`<a href="/u/?bugID=${bug_id}" target="_blank">${bug_id}</a>`;
317+
}
318+
306319
private getRowClass(index: number, anomalyGroup: AnomalyGroup) {
307320
if (anomalyGroup.expanded) {
308321
if (index === 0) {

perf/modules/anomaly-sk/anomaly-sk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export class AnomalySk extends ElementSk {
165165
if (bugId === -2) {
166166
return html`Ignored Alert`;
167167
}
168-
return html`<a href="${`${bugHostUrl}/${bugId}`}" target=_blank>${bugId}</td>`;
168+
return html`<a href="${`${bugHostUrl}/${bugId}`}" target="_blank">${bugId}</a>`;
169169
}
170170

171171
private static template = (ele: AnomalySk) => {

0 commit comments

Comments
 (0)