Skip to content

Commit

Permalink
Merge pull request #494 from HSLdevcom/DT-6579
Browse files Browse the repository at this point in the history
DT-6579 walttitest theme
  • Loading branch information
Antiik91 authored Jan 13, 2025
2 parents 863f098 + a0c0172 commit 1b356e9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ app.use('/api/graphql', (req, res, next) => {
});

app.get('/api/geocoding/:endpoint', (req, res, next) => {
const endpoint = `/geocoding/v1/${req.params.endpoint}`;
const endpoint = `geocoding/v1/${req.params.endpoint}`;
const url = `${baseurl}/${endpoint}?${req._parsedUrl.query}&${apiSubscriptionParameter}`;

axiosPoolForApi
Expand Down
28 changes: 28 additions & 0 deletions src/monitorConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,32 @@ export default {
},
alertIcon: 'query-error-alert',
},
walttitest: {
name: 'walttitest',
uri: 'routing/v2/waltti-alt/gtfs/v1',
feedIds: ['WalttiTest'],
colors: {
primary: '#E10669',
monitorBackground: '#E10669',
},
modeIcons: {
colors: {
'mode-bus': '#E10669',
'mode-bus-express': '#E10669',
'mode-bus-local': '#E10669',
'mode-rail': '#E10669',
'mode-tram': '#E10669',
'mode-ferry': '#E10669',
'mode-subway': '#E10669',
},
},
login: {
inUse: true,
frontPageContent: 'front-page-paragraph-waltti',
favourites: false,
},
map: {
inUse: true,
},
},
};
3 changes: 3 additions & 0 deletions src/ui/logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const Logo: FC<ICommonProps> = props => {
case 'oulu':
logo = <OuluLogo />;
break;
case 'walttitest':
logo = <OuluLogo />;
break;
default:
break;
}
Expand Down
4 changes: 4 additions & 0 deletions src/util/getConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const getConfig = () => {
'jyvaskyla',
'vaasa',
'oulu',
'walttitest',
];
if (env && allowedThemes.indexOf(env) > -1) {
return mergeWith(defaultConfig, config[env], merger);
Expand All @@ -39,6 +40,8 @@ export const getConfig = () => {
theme = 'oulu';
} else if (domain.indexOf('osl') >= 0) {
theme = 'oulu';
} else if (domain.indexOf('waltti-test') >= 0) {
theme = 'walttitest';
} else {
theme = 'hsl';
}
Expand All @@ -52,4 +55,5 @@ export const getDomainIdentifierForTheme = {
jyvaskyla: 'jyvaskyla',
vaasa: 'vaasa',
oulu: 'oulu',
walttitest: 'waltti-test',
};
1 change: 1 addition & 0 deletions src/util/getResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export function getLoginUri(configName) {
case 'jyvaskyla':
case 'vaasa':
case 'oulu':
case 'walttitest':
return 'waltti-login';
case 'hsl':
return 'hsl-login?url=/&';
Expand Down

0 comments on commit 1b356e9

Please sign in to comment.