Skip to content

Commit

Permalink
chore(RHIF-224): Update /beta to /preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Johnson committed Apr 5, 2023
1 parent 74ef891 commit b18dd9e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Note: You will need to set up the Insights environment if you want to develop wi
2. ```npm run start:beta```
- with CI beta env

3. visit ```https://prod.foo.redhat.com:1337/insights/malware/``` OR ```https://prod.foo.redhat.com:1337/beta/insights/malware/``` for beta env
3. visit ```https://prod.foo.redhat.com:1337/insights/malware/``` OR ```https://prod.foo.redhat.com:1337/preview/insights/malware/``` for beta env

### Testing

Expand Down
4 changes: 2 additions & 2 deletions config/dev.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const commonPlugins = require('./plugins');
const { config: webpackConfig, plugins } = config({
rootFolder: resolve(__dirname, '../'),
debug: true,
deployment: process.env.BETA ? 'beta/apps' : 'apps',
deployment: process.env.BETA ? 'preview/apps' : 'apps',
useProxy: true,
appUrl: process.env.BETA ? '/beta/insights/malware' : '/insights/malware',
appUrl: process.env.BETA ? '/preview/insights/malware' : '/insights/malware',
env: process.env.BETA ? 'stage-beta' : 'stage-stable',
standalone: Boolean(process.env.STANDALONE)
});
Expand Down
2 changes: 1 addition & 1 deletion config/prod.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

const { config: webpackConfig, plugins } = config({
rootFolder: resolve(__dirname, '../'),
...(process.env.BETA && { deployment: 'beta/apps' })
...(process.env.BETA && { deployment: 'preview/apps' })
});
plugins.push(...commonPlugins);

Expand Down
4 changes: 2 additions & 2 deletions profiles/local-frontend-and-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const FRONTEND_PORT = 8002;
const API_PORT = 3000;
const routes = {};

routes[`/beta/${SECTION}/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };
routes[`/preview/${SECTION}/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };
routes[`/${SECTION}/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };
routes[`/beta/apps/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };
routes[`/preview/apps/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };
routes[`/apps/${APP_ID}`] = { host: `https://localhost:${FRONTEND_PORT}` };

routes[`/api/${APP_ID}`] = { host: `http://localhost:${API_PORT}` };
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const gqlProps = {
error: propTypes.object
};

const isBeta = () => window.location.pathname.split('/')[1] === 'beta' ? '/beta' : '';
const isBeta = () => window.location.pathname.split('/')[1] === 'preview' ? '/preview' : '';

// Parse the match.metadata object and return a string of its 'key: value' items each on a separate line
const expandMatchMetadata = (md) => {
Expand Down
4 changes: 2 additions & 2 deletions src/entry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('Utilities/getBaseName', () => {
});

it('should find the right base name on Beta ', () => {
expect(getBaseName('/beta/insights/foo/bar/baz')).toEqual('/beta/insights/foo');
expect(getBaseName('/beta/test/fff/bar/baz')).toEqual('/beta/test/fff');
expect(getBaseName('/preview/insights/foo/bar/baz')).toEqual('/preview/insights/foo');
expect(getBaseName('/preview/test/fff/bar/baz')).toEqual('/preview/test/fff');
});
});

0 comments on commit b18dd9e

Please sign in to comment.