WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit ed0e9e2

Browse files
committed
Update URLs to use the new CDN for static assets and reports
1 parent 3f78742 commit ed0e9e2

File tree

8 files changed

+24
-24
lines changed

8 files changed

+24
-24
lines changed

src/js/components/drilldownHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setTitle(title) {
88

99
function setIcon(icon) {
1010
const img = document.querySelector('h1 .title-img');
11-
const imgUrl = `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/icons/${icon}`;
11+
const imgUrl = `https://cdn.httparchive.org/v1/static/icons/${icon}`;
1212
img.setAttribute('style', `background-image: url(${imgUrl})`);
1313
}
1414

src/js/histogram.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const [COLOR_DESKTOP, COLOR_MOBILE, COLOR_DESKTOP_ALT, COLOR_MOBILE_ALT] = Color
1111
function histogram(metric, date, options) {
1212
options.date = date;
1313
options.metric = metric;
14-
const dataUrl = `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${options.lens ? `${options.lens.id}/` : ''}${date}/${metric}.json`;
14+
const dataUrl = `https://cdn.httparchive.org/v1/static/reports/${options.lens ? `${options.lens.id}/` : ''}${date}/${metric}.json`;
1515
fetch(dataUrl)
1616
.then(response => {
1717
if (!response.ok) {

src/js/techreport/combobox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ComboBox {
3131
option.id = `${this.element.dataset.id}-${row.technology.replaceAll(' ','-')}`;
3232
const logo = document.createElement('img');
3333
logo.setAttribute('alt', '');
34-
logo.setAttribute('src', `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/icons/${icon}`);
34+
logo.setAttribute('src', `https://cdn.httparchive.org/v1/static/icons/${icon}`);
3535
logo.setAttribute('loading', 'lazy');
3636
option.append(logo);
3737
if(this.selected.includes(row.technology)) {
@@ -200,7 +200,7 @@ class ComboBox {
200200

201201
/* Add the app logo */
202202
const appIcon = document.createElement('img');
203-
appIcon.setAttribute('src', `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/icons/${encodeURI(icon)}`);
203+
appIcon.setAttribute('src', `https://cdn.httparchive.org/v1/static/icons/${encodeURI(icon)}`);
204204
appIcon.setAttribute('alt', '');
205205
appIcon.classList.add('logo');
206206
deleteSelection.append(appIcon);

src/js/techreport/tableLinked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class TableLinked {
107107
wrapper.classList.add('app-wrapper');
108108

109109
const img = document.createElement('span');
110-
const imgUrl = `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/icons/${encodeURI(technology[0]?.icon)}`;
110+
const imgUrl = `https://cdn.httparchive.org/v1/static/icons/${encodeURI(technology[0]?.icon)}`;
111111
img.setAttribute('aria-hidden', 'true');
112112
img.setAttribute('style', `background-image: url(${imgUrl})`);
113113
img.classList.add('app-img');

src/js/techreport/utils/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const apiBase = 'https://reports-prod-2vzgiib6.uc.gateway.dev/v1';
1+
const apiBase = 'https://cdn.httparchive.org/v1';
22

33
export const Constants = {
44
apiBase,

src/js/timeseries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { el, prettyDate, chartExportOptions, drawMetricSummary, callOnceWhenVisi
88

99

1010
function timeseries(metric, options, start, end) {
11-
const dataUrl = `https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${options.lens ? `${options.lens.id}/` : ''}${metric}.json`;
11+
const dataUrl = `https://cdn.httparchive.org/v1/static/reports/${options.lens ? `${options.lens.id}/` : ''}${metric}.json`;
1212
options.chartId = `${metric}-chart`;
1313
options.tableId = `${metric}-table`;
1414
options.metric = metric;

templates/report/report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
{% block head %}
1616
{{ super() }}
1717
<link rel="stylesheet" href="{{ get_versioned_filename('/static/css/report.css') }}" />
18-
<link rel="preconnect" href="https://reports-prod-2vzgiib6.uc.gateway.dev" />
18+
<link rel="preconnect" href="https://cdn.httparchive.org" />
1919
<link rel="canonical" href="https://httparchive.org{{ request.path }}" />
2020
{% endblock %}
2121

tools/scripts/test_reports.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ LENSES="drupal magento wordpress top1k top10k top100k top1m"
2222
# These dated report URLs are tested for 200 status
2323
# We test the first and last report for each lens
2424
REPORT_MONTHLY_URLS=$(cat <<-END
25-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${REPORT_DATE}/bootupJs.json
26-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${REPORT_DATE}/tcp.json
27-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${CRUX_REPORT_DATE}/cruxCls.json
28-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${CRUX_REPORT_DATE}/cruxOl.json
25+
https://cdn.httparchive.org/v1/static/reports/${REPORT_DATE}/bootupJs.json
26+
https://cdn.httparchive.org/v1/static/reports/${REPORT_DATE}/tcp.json
27+
https://cdn.httparchive.org/v1/static/reports/${CRUX_REPORT_DATE}/cruxCls.json
28+
https://cdn.httparchive.org/v1/static/reports/${CRUX_REPORT_DATE}/cruxOl.json
2929
END
3030
)
3131

3232
for LENS in ${LENSES}
3333
do
3434
REPORT_MONTHLY_URLS_LENS=$(cat <<-END
35-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/${REPORT_DATE}/bootupJs.json
36-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/${REPORT_DATE}/tcp.json
37-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/${CRUX_REPORT_DATE}/cruxCls.json
38-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/${CRUX_REPORT_DATE}/cruxOl.json
35+
https://cdn.httparchive.org/v1/static/reports/${LENS}/${REPORT_DATE}/bootupJs.json
36+
https://cdn.httparchive.org/v1/static/reports/${LENS}/${REPORT_DATE}/tcp.json
37+
https://cdn.httparchive.org/v1/static/reports/${LENS}/${CRUX_REPORT_DATE}/cruxCls.json
38+
https://cdn.httparchive.org/v1/static/reports/${LENS}/${CRUX_REPORT_DATE}/cruxOl.json
3939
END
4040
)
4141
REPORT_MONTHLY_URLS="${REPORT_MONTHLY_URLS} ${REPORT_MONTHLY_URLS_LENS}"
@@ -45,16 +45,16 @@ done
4545
# These timeseries URLs are tested if the date exists in the returned body
4646
# We test the first and last report for each lens
4747
TIMESERIES_URLS=$(cat <<-END
48-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/numUrls.json
49-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/a11yButtonName.json
48+
https://cdn.httparchive.org/v1/static/reports/numUrls.json
49+
https://cdn.httparchive.org/v1/static/reports/a11yButtonName.json
5050
END
5151
)
5252

5353
for LENS in ${LENSES}
5454
do
5555
TIMESERIES_URLS_LENS=$(cat <<-END
56-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/numUrls.json
57-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/a11yButtonName.json
56+
https://cdn.httparchive.org/v1/static/reports/${LENS}/numUrls.json
57+
https://cdn.httparchive.org/v1/static/reports/${LENS}/a11yButtonName.json
5858
END
5959
)
6060
TIMESERIES_URLS="${TIMESERIES_URLS} ${TIMESERIES_URLS_LENS}"
@@ -64,16 +64,16 @@ done
6464
# For CrUX we always test the month before (unless an explicit date was passed)
6565
# We test the first and last report
6666
CRUX_TIMESERIES_URLS=$(cat <<-END
67-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/cruxFastDcl.json
68-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/cruxSmallCls.json
67+
https://cdn.httparchive.org/v1/static/reports/cruxFastDcl.json
68+
https://cdn.httparchive.org/v1/static/reports/cruxSmallCls.json
6969
END
7070
)
7171

7272
for LENS in ${LENSES}
7373
do
7474
CRUX_TIMESERIES_URLS_LENS=$(cat <<-END
75-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/cruxFastDcl.json
76-
https://reports-prod-2vzgiib6.uc.gateway.dev/v1/static/reports/${LENS}/cruxSmallCls.json
75+
https://cdn.httparchive.org/v1/static/reports/${LENS}/cruxFastDcl.json
76+
https://cdn.httparchive.org/v1/static/reports/${LENS}/cruxSmallCls.json
7777
END
7878
)
7979
CRUX_TIMESERIES_URLS="${CRUX_TIMESERIES_URLS} ${CRUX_TIMESERIES_URLS_LENS}"

0 commit comments

Comments
 (0)