Skip to content

Commit 08263f7

Browse files
Logs tab in UI: fix extractFromCloneName (#2926)
In order to make it more apparent that a log from a "clone_" mirror is actually an initial load of its parent, in the UI logs tab we do regex parsing to get the parent name and say (initial load). However the regex parsing doesn't work if the parent name has underscores. This PR fixes this via a stopgap regex fix. Long term would want to introduce and populate a parent name column in the logs table similar to the qrep stats tables
1 parent 21a4005 commit 08263f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/components/LogsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function colorForErrorType(errorType: string) {
2222
}
2323

2424
function extractFromCloneName(mirrorOrCloneName: string) {
25-
if (mirrorOrCloneName.includes('clone_')) {
26-
return mirrorOrCloneName.split('_')[1] + ' (initial load)';
25+
if (mirrorOrCloneName.startsWith('clone_')) {
26+
return mirrorOrCloneName.substring(6) + ' (initial load)';
2727
}
2828
return mirrorOrCloneName;
2929
}

0 commit comments

Comments
 (0)