Skip to content

Commit 7df71c4

Browse files
committed
fixes to perfherder and links
1 parent f4030cc commit 7df71c4

File tree

10 files changed

+38
-33
lines changed

10 files changed

+38
-33
lines changed

comparison-tools/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Visual regression testing using Puppeteer to compare UI between environments.
138138
node ui_comparator.js [options]
139139

140140
Options:
141-
--local URL Local base URL (default: http://localhost:5001)
141+
--local URL Local base URL (default: http://localhost:5000)
142142
--staging URL Staging base URL (default: https://treeherder.allizom.org)
143143
--output DIR Output directory for screenshots and reports
144144
--timeout MS Page load timeout (default: 30000)
@@ -268,7 +268,7 @@ Options:
268268
When running locally via Docker Compose:
269269

270270
- **Backend API**: `http://localhost:8000`
271-
- **Frontend**: `http://localhost:5001` (note: port may vary)
271+
- **Frontend**: `http://localhost:5000` (note: port may vary)
272272
- **Database**: `postgresql://postgres:mozilla1234@localhost:5499/treeherder`
273273
- **Redis**: `redis://localhost:6388`
274274

@@ -304,8 +304,8 @@ When running locally via Docker Compose:
304304
# Check frontend port
305305
docker-compose ps frontend
306306

307-
# Frontend might be on port 5000 or 5001
308-
curl http://localhost:5001
307+
# Frontend might be on port 5000 or 5000
308+
curl http://localhost:5000
309309
```
310310

311311
4. **Missing Python dependencies**:
@@ -325,7 +325,7 @@ When running locally via Docker Compose:
325325
If you encounter port conflicts, check your `docker-compose.yml` for port mappings:
326326

327327
- Backend: `8000:8000`
328-
- Frontend: `5001:5000` (or `5000:5000`)
328+
- Frontend: `5000:5000` (or `5000:5000`)
329329
- PostgreSQL: `5499:5432` (or `5432:5432`)
330330
- Redis: `6388:6379` (or `6379:6379`)
331331

comparison-tools/run_comparison.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def run_ui_comparison(self):
9090
"node",
9191
str(self.tools_dir / "ui_comparator.js"),
9292
"--local",
93-
self.local_base_url.replace("8000", "5001"), # Frontend port
93+
self.local_base_url.replace("8000", "5000"), # Frontend port
9494
"--staging",
9595
self.staging_base_url,
9696
"--output",

comparison-tools/ui_comparator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const { createHash } = require('crypto');
1111

1212
class TreeherderUIComparator {
1313
constructor(options = {}) {
14-
this.localBaseUrl = options.localBaseUrl || 'http://localhost:5001';
14+
this.localBaseUrl = options.localBaseUrl || 'http://localhost:5000';
1515
this.stagingBaseUrl =
1616
options.stagingBaseUrl || 'https://treeherder.allizom.org';
1717
this.outputDir = options.outputDir || './comparison-results';

fixbugs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Think deeply. Create a plan to fix issues within the /perfherder route.
44

5-
The local running app is at <http://localhost:5001/perfherder>
5+
The local running app is at <http://localhost:5000/perfherder>
66

77
Fixes needed for the /perfherder/graphs route:
88

treeherder-comparison-analysis.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Overview
44

5-
This document tracks differences found between the local development version of Treeherder (<http://localhost:5001>) and the staging version (<https://treeherder.allizom.org>) when comparing the Perfherder interface.
5+
This document tracks differences found between the local development version of Treeherder (<http://localhost:5000>) and the staging version (<https://treeherder.allizom.org>) when comparing the Perfherder interface.
66

77
## Comparison URLs
88

9-
- **Local**: <http://localhost:5001/perfherder/alerts?hideDwnToInv=1&page=1>
9+
- **Local**: <http://localhost:5000/perfherder/alerts?hideDwnToInv=1&page=1>
1010
- **Staging**: <https://treeherder.allizom.org/perfherder/alerts?hideDwnToInv=1&page=1>
1111

1212
## Navigation Tabs to Compare
@@ -132,7 +132,7 @@ Since no code issues were found, these are optional improvements for development
132132
### 🔧 Infrastructure Configuration (Optional)
133133

134134
1. **Backend Configuration**: The local setup is already correctly configured to use staging backend data
135-
2. **Port Configuration**: Successfully modified webpack config to use port 5001
135+
2. **Port Configuration**: Successfully modified webpack config to use port 5000
136136
3. **Development Server**: Running successfully with appropriate proxy settings
137137

138138
## Action Items

ui/css/perf.css

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ h1 {
6969
}
7070

7171
.show-hide-check {
72-
float: right;
73-
position: static;
74-
margin-right: 13px !important;
75-
margin-top: -27px;
72+
position: absolute;
73+
bottom: 8px;
74+
right: 8px;
75+
margin: 0;
76+
cursor: pointer;
7677
}
7778

7879
.graph-right-padding {

ui/css/treeherder-custom-styles.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ a {
2929
font-size: 1rem;
3030
}
3131

32+
/* Remove underlines from links globally */
33+
a {
34+
text-decoration: none;
35+
}
36+
3237
/* Bootstrap 4 will not show <a> as a link style if it has no href.
3338
This adds that style back. */
3439
.link-style {

ui/perfherder/graphs/LegendCard.jsx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
3-
import { Badge, Button, Form } from 'react-bootstrap';
4-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5-
import { faTimes } from '@fortawesome/free-solid-svg-icons';
3+
import { Badge, Button, Form, CloseButton } from 'react-bootstrap';
64

75
import { getFrameworkName } from '../perf-helpers/helpers';
86
import { graphColors } from '../perf-helpers/constants';
@@ -129,33 +127,27 @@ const LegendCard = ({
129127
}
130128
};
131129

132-
const subtitleStyle = 'p-0 mb-0 border-0 text-secondary text-left';
130+
const subtitleStyle = 'p-0 mb-0 border-0 text-secondary text-start';
133131
const symbolType = series.symbol || ['circle', 'outline'];
134132

135133
const { suite, platform, framework_id: frameworkId } = series;
136134
const framework = getFrameworkName(frameworks, frameworkId);
137135
const perfdocs = new Perfdocs(framework, suite, platform);
138136
const hasDocumentation = perfdocs.hasDocumentation();
139137
return (
140-
<Form.Group className="ps-0 border">
141-
<Button
142-
className="close me-3 my-2 ms-2 bg-transparent"
138+
<Form.Group className="ps-0 border position-relative">
139+
<CloseButton
140+
className="position-absolute top-0 end-0 m-2"
143141
onClick={removeTest}
144142
data-testid="remove-test-button"
145-
>
146-
<FontAwesomeIcon
147-
className="pointer"
148-
icon={faTimes}
149-
size="xs"
150-
title=""
151-
/>
152-
</Button>
143+
aria-label="Remove test"
144+
/>
153145
<div className={`${series.color[0]} graph-legend-card p-3`}>
154146
<Button
155147
variant="outline-link"
156148
className={`p-0 mb-0 pointer border-0 ${
157149
series.visible ? series.color[0] : 'text-muted'
158-
} text-left`}
150+
} text-start`}
159151
onClick={() => addTestData('addRelatedConfigs')}
160152
title="Add related configurations"
161153
>
@@ -213,7 +205,7 @@ const LegendCard = ({
213205
<div className="small">{`alert_threshold: ${series.alertThreshold}`}</div>
214206
<div className="small">{`${series.signatureHash.slice(0, 16)}...`}</div>
215207
</div>
216-
<Form.Control
208+
<Form.Check
217209
className="show-hide-check"
218210
type="checkbox"
219211
checked={series.visible}

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const developmentConfig = {
120120

121121
devServer: {
122122
host: '0.0.0.0',
123-
port: process.env.PORT || 5001,
123+
port: process.env.PORT || 5000,
124124
hot: true,
125125
historyApiFallback: true,
126126
open: true,

yarn.lock

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,13 @@
19321932
dependencies:
19331933
"@sinonjs/commons" "^3.0.0"
19341934

1935+
"@swc/helpers@^0.5.0":
1936+
version "0.5.17"
1937+
resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.17.tgz#5a7be95ac0f0bf186e7e6e890e7a6f6cda6ce971"
1938+
integrity sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==
1939+
dependencies:
1940+
tslib "^2.8.0"
1941+
19351942
"@testing-library/[email protected]":
19361943
version "10.4.1"
19371944
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.4.1.tgz#d444f8a889e9a46e9a3b4f3b88e0fcb3efb6cf95"

0 commit comments

Comments
 (0)