LandingPage: Include link to current commit on GitHub
This commit is contained in:
parent
f9f591476e
commit
9c65a705a3
5 changed files with 30 additions and 28 deletions
|
|
@ -1,4 +1,6 @@
|
|||
const { DefinePlugin } = require('webpack');
|
||||
const { resolve } = require('path');
|
||||
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
const { config: webpackConfig, plugins } = config({
|
||||
rootFolder: resolve(__dirname, '../'),
|
||||
|
|
@ -19,6 +21,10 @@ plugins.push(
|
|||
})
|
||||
);
|
||||
|
||||
plugins.push(new DefinePlugin({
|
||||
COMMITHASH: JSON.stringify((new GitRevisionPlugin()).commithash()),
|
||||
}));
|
||||
|
||||
module.exports = {
|
||||
...webpackConfig,
|
||||
plugins
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
const { DefinePlugin } = require('webpack');
|
||||
const { resolve } = require('path');
|
||||
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
const { config: webpackConfig, plugins } = config({
|
||||
rootFolder: resolve(__dirname, '../'),
|
||||
|
|
@ -15,6 +17,10 @@ plugins.push(
|
|||
})
|
||||
);
|
||||
|
||||
plugins.push(new DefinePlugin({
|
||||
COMMITHASH: JSON.stringify((new GitRevisionPlugin()).commithash()),
|
||||
}));
|
||||
|
||||
module.exports = {
|
||||
...webpackConfig,
|
||||
plugins
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
const { resolve } = require('path');
|
||||
const config = require('@redhat-cloud-services/frontend-components-config');
|
||||
const { config: webpackConfig, plugins } = config({
|
||||
rootFolder: resolve(__dirname, '../'),
|
||||
debug: true,
|
||||
port: 8002,
|
||||
useFileHash: false,
|
||||
skipChrome2: false,
|
||||
});
|
||||
|
||||
console.log('CONFIG', config);
|
||||
|
||||
plugins.push(
|
||||
require('@redhat-cloud-services/frontend-components-config/federated-modules')({
|
||||
root: resolve(__dirname, '../'),
|
||||
useFileHash: false,
|
||||
moduleName: 'image_builder',
|
||||
exposes: {
|
||||
'./RootApp': resolve(__dirname, '../src/AppEntry.js'),
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
module.exports = {
|
||||
...webpackConfig,
|
||||
plugins
|
||||
};
|
||||
|
|
@ -28,6 +28,9 @@
|
|||
"!src/**/stories/*",
|
||||
"!src/entry-dev.js"
|
||||
],
|
||||
"globals": {
|
||||
"COMMITHASH": "dummy"
|
||||
},
|
||||
"roots": [
|
||||
"<rootDir>/src/"
|
||||
],
|
||||
|
|
@ -59,6 +62,7 @@
|
|||
"eslint-plugin-jest-dom": "3.2.4",
|
||||
"eslint-plugin-react": "7.18.3",
|
||||
"eslint-plugin-testing-library": "3.10.0",
|
||||
"git-revision-webpack-plugin": "5.0.0",
|
||||
"identity-obj-proxy": "3.0.0",
|
||||
"jest": "26.1.0",
|
||||
"npm-run-all": "4.1.5",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
/* global COMMITHASH */
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
|
||||
import { PageHeader, PageHeaderTitle } from '@redhat-cloud-services/frontend-components';
|
||||
|
||||
import { Button, Popover, TextContent, Text } from '@patternfly/react-core';
|
||||
import { ExternalLinkAltIcon, HelpIcon } from '@patternfly/react-icons';
|
||||
import { ExternalLinkAltIcon, GithubIcon, HelpIcon } from '@patternfly/react-icons';
|
||||
|
||||
import ImagesTable from '../ImagesTable/ImagesTable';
|
||||
import './LandingPage.scss';
|
||||
|
|
@ -38,6 +40,17 @@ https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/up
|
|||
">
|
||||
Documentation
|
||||
</Button>
|
||||
<br />
|
||||
<Button
|
||||
component="a"
|
||||
target="_blank"
|
||||
variant="link"
|
||||
icon={ <GithubIcon /> }
|
||||
iconPosition="right"
|
||||
isInline
|
||||
href={ 'https://github.com/RedHatInsights/image-builder-frontend/tree/' + COMMITHASH }>
|
||||
Contribute on GitHub
|
||||
</Button>
|
||||
</TextContent> }>
|
||||
<button
|
||||
type="button"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue