Skip to content

Commit

Permalink
Merge pull request #1689 from HDRUK/features/GAT-5664
Browse files Browse the repository at this point in the history
update from www to old
  • Loading branch information
dnhdruk authored Nov 6, 2024
2 parents 374f32d + 132036c commit 65c7393
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v5.0.2
v5.0.3
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script>
(function (w, a, y, f) {
var openAthensId = '5614d0c5-9fbf-46a0-8311-baf34df79bdb';
if (window.location.href.includes('.www.')) openAthensId = '57227ab3-80a2-4bbe-a367-04fe13abbddd'
if (window.location.href.includes('.old.')) openAthensId = '57227ab3-80a2-4bbe-a367-04fe13abbddd'
else if (window.location.href.includes('.uat.')) openAthensId = '685d4935-3c71-4716-afdd-9fb92d218ac6'
else if (window.location.href.includes('.uatbeta.')) openAthensId = '5b5b4f69-c4a4-472f-92fe-e60678da6b04'
else if (window.location.href.includes('.latest.')) openAthensId = '9e3ed49e-7566-4d2c-925e-6a6a86555d79'
Expand All @@ -40,7 +40,7 @@
// Disable tracking if the opt-out cookie exists.
window.gaConsent = !(document.cookie.indexOf('ga-disable-UA-166025838-1=true') > -1);

if (window.location.href.includes('.www.')) {
if (window.location.href.includes('.old.')) {
window.gtmId = 'GTM-NL9B25X';
}
})();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exports[`Given the GatewayAdvancedSearchBanner component When it is rendered The
>
<img
alt="search.advanced.dataUtilityWizard.mediaAlt"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
</div>
Expand Down Expand Up @@ -162,7 +162,7 @@ exports[`Given the GatewayAdvancedSearchBanner component When it is rendered The
>
<img
alt="Cohort Discovery feature image"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Given the GatewayAdvancedSearchDataUtilityWizard component', () => {
});

it('Then goes to the web subdomain', async () => {
expect(window.location.assign).toHaveBeenCalledWith('https://web.www.healthdatagateway.org/search=&tab=datasets');
expect(window.location.assign).toHaveBeenCalledWith('https://web.old.healthdatagateway.org/search=&tab=datasets');
});
});
});
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('Given the GatewayAdvancedSearchDataUtilityWizard component', () => {
});

it('Then goes to the web subdomain', async () => {
expect(window.location.assign).toHaveBeenCalledWith('https://web.www.healthdatagateway.org/search=&tab=datasets');
expect(window.location.assign).toHaveBeenCalledWith('https://web.old.healthdatagateway.org/search=&tab=datasets');
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ exports[`Given the GatewayAdvancedSearchDataUtilityWizard component When it is r
>
<img
alt="Cohort Discovery feature image"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Given the GatewayAdvancedSearchDataUtilityWizard component', () => {
});

it('Then goes to the web subdomain', async () => {
expect(window.location.assign).toHaveBeenCalledWith('https://web.www.healthdatagateway.org/search?search=&tab=Datasets');
expect(window.location.assign).toHaveBeenCalledWith('https://web.old.healthdatagateway.org/search?search=&tab=Datasets');
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ exports[`Given the GatewayAdvancedSearchDataUtilityWizard component When it is r
>
<img
alt="search.advanced.dataUtilityWizard.mediaAlt"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/configs/url.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const _buildUrl = urlType => {
export const getWidgetAPI = () => {
const { href } = window.location;
let widgetAPIURL = 'https://dev-datause-widget.dev.hdruk.dev';
if (href.includes('.www.')) {
if (href.includes('.old.')) {
widgetAPIURL = 'https://datause-widget.healthdatagateway.org';
}
if (href.includes('.uat.')) {
Expand All @@ -66,7 +66,7 @@ export const getWidgetAPI = () => {

export const addCmsGatewayApiHostname = path => {
const { hostname } = window.location;
let webHostname = 'https://api.www.healthdatagateway.org';
let webHostname = 'https://api.old.healthdatagateway.org';

if (hostname.includes('uat2.')) {
webHostname = 'https://api.uat2.healthdatagateway.org';
Expand All @@ -87,7 +87,7 @@ export const addCmsGatewayApiHostname = path => {

export const addCmsGatewayHostname = path => {
const { hostname } = window.location;
let webHostname = 'https://web.www.healthdatagateway.org';
let webHostname = 'https://web.old.healthdatagateway.org';

if (hostname.includes('uat2.')) {
webHostname = 'https://web.uat2.healthdatagateway.org';
Expand Down
4 changes: 2 additions & 2 deletions src/configs/url.config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Given the addCmsGatewayHostname helper', () => {
describe('When it is called with any other hostname', () => {
it('Then returns the correct url', () => {
window.location.hostname = 'test';
expect(addCmsGatewayHostname('path/to/something')).toEqual('https://web.www.healthdatagateway.org/path/to/something');
expect(addCmsGatewayHostname('path/to/something')).toEqual('https://web.old.healthdatagateway.org/path/to/something');
});
});
});
Expand Down Expand Up @@ -69,7 +69,7 @@ describe('Given the addCmsGatewayApiHostname helper', () => {
describe('When it is called with any other hostname', () => {
it('Then returns the correct url', () => {
window.location.hostname = 'test';
expect(addCmsGatewayApiHostname('path/to/something')).toEqual('https://api.www.healthdatagateway.org/path/to/something');
expect(addCmsGatewayApiHostname('path/to/something')).toEqual('https://api.old.healthdatagateway.org/path/to/something');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ const AboutApplication = props => {
id='infoGovernanceLink'
target='_blank'
rel='noopener noreferrer'
href='https://web.www.healthdatagateway.org/collection/4782731178031727'>
href='https://web.old.healthdatagateway.org/collection/4782731178031727'>
Information governance training recognised by some data custodians
</a>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const Summary = props => {
id='exampleDataset1'
target='_blank'
rel='noopener noreferrer'
href='https://web.www.healthdatagateway.org/dataset/594cfe55-96e3-45ff-874c-2c0006eeb881'>
href='https://web.old.healthdatagateway.org/dataset/594cfe55-96e3-45ff-874c-2c0006eeb881'>
[COVID-19 Symptom tracker]
</a>
</div>
Expand All @@ -97,7 +97,7 @@ const Summary = props => {
id='exampleDataset2'
target='_blank'
rel='noopener noreferrer'
href='https://web.www.healthdatagateway.org/dataset/31f0148b-f965-4136-ab39-6c5bbbf8c2d9'>
href='https://web.old.healthdatagateway.org/dataset/31f0148b-f965-4136-ab39-6c5bbbf8c2d9'>
[National COVID-19 Chest Imaging Database]
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`Given the AdvancedSearchCohortDiscovery component When it is rendered A
>
<img
alt="Cohort Discovery feature image"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports[`Given the AdvancedSearchDataUtilityWizard component When it is rendered
>
<img
alt="search.advanced.dataUtilityWizard.mediaAlt"
src="https://web.www.healthdatagateway.org/"
src="https://web.old.healthdatagateway.org/"
/>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dataset/DatasetPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class DatasetDetail extends Component {
linkedDatasets.push({
title: relation,
info:
relation.slice(0, 46) === 'https://web.www.healthdatagateway.org/dataset/'
relation.slice(0, 46) === 'https://web.old.healthdatagateway.org/dataset/'
? 'Dataset on the gateway'
: 'Dataset not on the gateway',
type: 'externallink',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dataset/DatasetSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const DatasetSchema = ({ data }) => {
'@context': 'http://schema.org/',
'@type': 'Dataset',
identifier: data.pid,
url: `https://web.www.healthdatagateway.org/dataset/${data.pid}`,
url: `https://web.old.healthdatagateway.org/dataset/${data.pid}`,
name: data.datasetv2.summary.title,
description: data.datasetv2.summary.abstract,
keywords: data.datasetv2.summary.keywords,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export const data = [
title: 'MRC Regulatory Support Centre: Research Data and Confidentiality e-learning - DISCONTINUED',
provider: 'Medical Research Council',
description:
'** THIS COURSE HAS BEEN DISCONTINUED**\n\nThis MRC course has been discontinued but is still accepted as approved training for researchers to conduct research in the SAIL and EPCC Scotland Trust Research Environments if they have completed it previously. \n\nCourse Duration: 3 hours online\n\nMRC provides an alternative course that is recognized by SAIL and EPCC Scotland: https://web.www.healthdatagateway.org/course/7853810507803276',
'** THIS COURSE HAS BEEN DISCONTINUED**\n\nThis MRC course has been discontinued but is still accepted as approved training for researchers to conduct research in the SAIL and EPCC Scotland Trust Research Environments if they have completed it previously. \n\nCourse Duration: 3 hours online\n\nMRC provides an alternative course that is recognized by SAIL and EPCC Scotland: https://web.old.healthdatagateway.org/course/7853810507803276',
myEntity: false,
},
{
Expand Down
4 changes: 2 additions & 2 deletions src/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ global.redefineWindow = () => {
value: jest.fn(),
},
hostname: {
value: 'web.www.healthdatagateway.org',
value: 'web.old.healthdatagateway.org',
},
}
);
Expand Down Expand Up @@ -143,6 +143,6 @@ Object.defineProperty(window, 'location', {
value: {
href: 'https://www.healthdatagateway.org',
assign: jest.fn(),
hostname: 'web.www.healthdatagateway.org',
hostname: 'web.old.healthdatagateway.org',
},
});

0 comments on commit 65c7393

Please sign in to comment.