@conorheffron/ironoc-frontend 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # ironoc-frontend
2
+
3
+ [![Node.js Package](https://github.com/conorheffron/ironoc/actions/workflows/npm-publish-github-packages.yml/badge.svg)](https://github.com/conorheffron/ironoc/actions/workflows/npm-publish-github-packages.yml)
4
+
5
+ - See project README.md [here](https://github.com/conorheffron/ironoc/blob/main/README.md)
6
+ - See published GitHub package details [here](https://github.com/conorheffron/ironoc/pkgs/npm/ironoc-frontend)
7
+
8
+ ## Getting Started with React App
9
+
10
+ This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
11
+
12
+ ## Available Scripts
13
+
14
+ In the project directory, you can run:
15
+
16
+ ### `npm start`
17
+
18
+ Runs the app in the development mode.\
19
+ Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
20
+
21
+ The page will reload when you make changes.\
22
+ You may also see any lint errors in the console.
23
+
24
+ ### `npm test`
25
+
26
+ Launches the test runner in the interactive watch mode.\
27
+ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
28
+
29
+ ### `npm run build`
30
+
31
+ Builds the app for production to the `build` folder.\
32
+ It correctly bundles React in production mode and optimizes the build for the best performance.
33
+
34
+ The build is minified and the filenames include the hashes.\
35
+ Your app is ready to be deployed!
36
+
37
+ See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
38
+
39
+ ### `npm run eject`
40
+
41
+ **Note: this is a one-way operation. Once you `eject`, you can't go back!**
42
+
43
+ If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
44
+
45
+ Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
46
+
47
+ You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
48
+
49
+ ## Learn More
50
+
51
+ You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
52
+
53
+ To learn React, check out the [React documentation](https://reactjs.org/).
54
+
55
+ ### Code Splitting
56
+
57
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
58
+
59
+ ### Analyzing the Bundle Size
60
+
61
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
62
+
63
+ ### Making a Progressive Web App
64
+
65
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
66
+
67
+ ### Advanced Configuration
68
+
69
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
70
+
71
+ ### Deployment
72
+
73
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
74
+
75
+ ### `npm run build` fails to minify
76
+
77
+ This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@conorheffron/ironoc-frontend",
3
+ "version": "2.1.2",
4
+ "private": false,
5
+ "dependencies": {
6
+ "@testing-library/jest-dom": "^5.17.0",
7
+ "@testing-library/react": "^13.4.0",
8
+ "@testing-library/user-event": "^13.5.0",
9
+ "bootstrap": "5.1",
10
+ "react": "^18.3.1",
11
+ "react-bootstrap": "^2.10.5",
12
+ "react-bootstrap-carousel": "^4.1.1",
13
+ "react-bootstrap-form": "^0.1.4-beta6",
14
+ "react-bootstrap-validation": "^0.1.11",
15
+ "react-cookie": "^7.2.2",
16
+ "react-dom": "^18.3.1",
17
+ "react-router-dom": "^5.3.0",
18
+ "react-scripts": "^5.0.1",
19
+ "reactstrap": "^8.10.0",
20
+ "web-vitals": "^4.2.3"
21
+ },
22
+ "scripts": {
23
+ "start": "react-scripts start",
24
+ "build": "CI=false && react-scripts build",
25
+ "test": "react-scripts test",
26
+ "eject": "react-scripts eject"
27
+ },
28
+ "eslintConfig": {
29
+ "extends": [
30
+ "react-app",
31
+ "react-app/jest"
32
+ ]
33
+ },
34
+ "browserslist": {
35
+ "production": [
36
+ ">0.2%",
37
+ "not dead",
38
+ "not op_mini all"
39
+ ],
40
+ "development": [
41
+ "last 1 chrome version",
42
+ "last 1 firefox version",
43
+ "last 1 safari version"
44
+ ]
45
+ },
46
+ "devDependencies": {
47
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
48
+ "web-vitals": "^4.2.3"
49
+ }
50
+ }
Binary file
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="Personal Portfolio for Conor Heffron"
10
+ content="Conor Heffron | Web Application Development | Software Engineering | Data Engineering | Cloud Deployments | DevOps"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/robot-logo.png" />
13
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
14
+ <title>iRonoc React App | Portfolio | Software Engineer | Data Analytics
15
+ | Conor Heffron | Web Application Development | Software Engineering
16
+ | Data Engineering | Cloud Deployments | DevOps</title>
17
+ </head>
18
+ <body>
19
+ <noscript>You need to enable JavaScript to run this app.</noscript>
20
+ <div id="root"></div>
21
+ </body>
22
+ </html>
@@ -0,0 +1,25 @@
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "robot-logo.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "robot-logo.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
Binary file
@@ -0,0 +1,3 @@
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
package/src/App.css ADDED
@@ -0,0 +1,75 @@
1
+ .App {
2
+ text-align: center;
3
+ }
4
+
5
+ .App-logo {
6
+ height: 70vmin;
7
+ pointer-events: none;
8
+ }
9
+
10
+ @media (prefers-reduced-motion: no-preference) {
11
+ .App-logo {
12
+ animation: App-logo-spin infinite 20s linear;
13
+ }
14
+ }
15
+
16
+ .App-header {
17
+ min-height: 100vh;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ justify-content: center;
22
+ font-size: calc(10px + 2vmin);
23
+ color: white;
24
+ background-color: #1D428A;
25
+ }
26
+
27
+ .App-link {
28
+ color: #61dafb;
29
+ }
30
+
31
+ @keyframes App-logo-spin {
32
+ from {
33
+ transform: rotate(0deg);
34
+ }
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
39
+
40
+ .carousel-caption {
41
+ top: 0;
42
+ bottom: auto;
43
+ }
44
+
45
+ .App-intro {
46
+ content: "";
47
+ display: inline-block;
48
+ }
49
+
50
+ #my-intro {
51
+ padding-left: 15%;
52
+ padding-right: 15%;
53
+ }
54
+
55
+ .strava-badge {
56
+ display: inline-block;
57
+ background-color: #FC5200;
58
+ color: #fff;
59
+ padding: 5px 10px 5px 30px;
60
+ font-size: 11px;
61
+ font-family: Helvetica, Arial, sans-serif;
62
+ white-space: nowrap;
63
+ text-decoration: none;
64
+ background-repeat: no-repeat;
65
+ background-position: 10px center;
66
+ border-radius: 3px;
67
+ background-image: url('https://badges.strava.com/logo-strava-echelon.png')
68
+ }
69
+
70
+ .strava-badge-img {
71
+ margin-left: 2px;
72
+ vertical-align: text-bottom;
73
+ height: 13;
74
+ width: 51;
75
+ }
package/src/App.js ADDED
@@ -0,0 +1,29 @@
1
+ import React, { Component } from 'react';
2
+ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
3
+ import './App.css';
4
+ import Home from './components/Home';
5
+ import NotFound from './components/NotFound';
6
+ import About from './components/About';
7
+ import RepoDetails from './components/RepoDetails';
8
+ import RepoIssues from './components/RepoIssues';
9
+ import ControlledCarousel from './components/ControlledCarousel';
10
+
11
+ class App extends Component {
12
+ render() {
13
+ return (
14
+ <Router forceRefresh={true}>
15
+ <Switch>
16
+ <Route path='/' exact={true} component={Home}/>
17
+ <Route path='/about' exact={true} component={About}/>
18
+ <Route path='/portfolio' exact={true} component={ControlledCarousel}/>
19
+ <Route path='/projects' exact={true} component={RepoDetails}/>
20
+ <Route path='/projects/:id' component={RepoDetails}/>
21
+ <Route path='/issues/:id/:repo' component={RepoIssues}/>
22
+ <Route path="*" component={NotFound} />
23
+ </Switch>
24
+ </Router>
25
+ )
26
+ }
27
+ }
28
+
29
+ export default App;
@@ -0,0 +1,8 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import Home from './components/Home';
3
+
4
+ test('renders learn react link', () => {
5
+ render(<Home />);
6
+ const element = screen.getByText(/Home/i);
7
+ expect(element).toBeInTheDocument();
8
+ });
@@ -0,0 +1,61 @@
1
+ import React from "react";
2
+ import "bootstrap/dist/css/bootstrap.min.css";
3
+ import {Navbar, NavbarText, Container, Collapse, NavbarBrand, Nav, UncontrolledDropdown, DropdownToggle, DropdownItem, DropdownMenu } from "reactstrap";
4
+ import logo from './img/robot-logo.png';
5
+
6
+ export default function AppNavBar() {
7
+ return (
8
+ <div>
9
+ <Navbar color="primary" light={false} dark={true} fixed="top" container={true} expand={true} className="nav-bar">
10
+ <Container>
11
+ <NavbarBrand href="/">
12
+ <img alt="" src={logo} width="30" height="30" className="d-inline-block align-top"/>
13
+ </NavbarBrand>
14
+ <Collapse navbar>
15
+ <Nav className="me-auto" navbar>
16
+ <UncontrolledDropdown inNavbar nav>
17
+ <DropdownToggle caret nav>iRonoc</DropdownToggle>
18
+ <DropdownMenu end>
19
+ <DropdownItem href="/about">About</DropdownItem>
20
+ <DropdownItem href="/portfolio">Portfolio</DropdownItem>
21
+ <DropdownItem divider />
22
+ <DropdownItem href="https://linktr.ee/conorheffron" target="_blank" rel="noreferrer">Link Tree</DropdownItem>
23
+ </DropdownMenu>
24
+ </UncontrolledDropdown>
25
+ <UncontrolledDropdown inNavbar nav>
26
+ <DropdownToggle caret nav>GitHub PM</DropdownToggle>
27
+ <DropdownMenu end>
28
+ <DropdownItem href="/projects/conorheffron">Projects</DropdownItem>
29
+ <DropdownItem href="/issues/conorheffron/ironoc">Issues</DropdownItem>
30
+ </DropdownMenu>
31
+ </UncontrolledDropdown>
32
+ <UncontrolledDropdown inNavbar nav>
33
+ <DropdownToggle caret nav>GitHub API</DropdownToggle>
34
+ <DropdownMenu end>
35
+ <DropdownItem target="_blank" href="/swagger-ui-ironoc.html">Swagger Doc</DropdownItem>
36
+ <DropdownItem divider />
37
+ <DropdownItem target="_blank" href="/get-repo-detail?username=conorheffron">GET Projects</DropdownItem>
38
+ <DropdownItem target="_blank" href="/get-repo-issue/conorheffron/ironoc/">GET Issues</DropdownItem>
39
+ </DropdownMenu>
40
+ </UncontrolledDropdown>
41
+ <UncontrolledDropdown inNavbar nav>
42
+ <DropdownToggle caret nav>GitHub Projects</DropdownToggle>
43
+ <DropdownMenu end>
44
+ <DropdownItem target="_blank" href="https://github.com/conorheffron/ironoc">iRonoc</DropdownItem>
45
+ <DropdownItem divider />
46
+ <DropdownItem target="_blank" href="https://github.com/conorheffron/ironoc-db">iRonoc-DB</DropdownItem>
47
+ <DropdownItem target="_blank" href="https://github.com/conorheffron/booking-sys">Booking System Sample</DropdownItem>
48
+ <DropdownItem target="_blank" href="https://github.com/conorheffron/nba-stats">NBA Stats Analysis</DropdownItem>
49
+ <DropdownItem target="_blank" href="https://github.com/conorheffron/ironoc-pytest">PyTest / GitHub Client Package</DropdownItem>
50
+ </DropdownMenu>
51
+ </UncontrolledDropdown>
52
+ </Nav>
53
+ <a href="/">
54
+ <NavbarText href="/">Home</NavbarText>
55
+ </a>
56
+ </Collapse>
57
+ </Container>
58
+ </Navbar>
59
+ </div>
60
+ );
61
+ }
@@ -0,0 +1,37 @@
1
+ import React, { Component } from 'react';
2
+ import { Container } from 'reactstrap';
3
+ import '.././App.css';
4
+ import AppNavbar from '.././AppNavbar';
5
+
6
+ class About extends Component {
7
+
8
+ render() {
9
+ return (
10
+ <div className="App">
11
+ <AppNavbar/>
12
+ <Container>
13
+ <header className="App-header">
14
+ <br /><br />
15
+ <a href="https://www.linkedin.com/in/conorheffron" target="_blank" rel="noreferrer">
16
+ <img src="https://static.licdn.com/scds/common/u/img/webpromo/btn_viewmy_160x33.png"
17
+ width="160" height="33" border="0" alt="View Conor Heffron's profile on LinkedIn"></img>
18
+ </a>
19
+ <p id="my-intro"><br />Welcome, I'm Conor Heffron, a Software Engineer hailing from County Meath, Ireland.
20
+ With over ten years of professional experience, I specialize in writing clean code and
21
+ developing high-performance applications. As a passionate Full Stack Developer, I am constantly
22
+ expanding my technical expertise across various tech stacks, languages, frameworks, and
23
+ tools in the realm of Software, Data, and DevOps. Let's connect and explore exciting
24
+ opportunities together! See above & beyond for contact details and further information.
25
+ </p><br />
26
+ <a class="strava-badge" href='https://strava.com/athletes/2582329' target="_clean">
27
+ Follow me on
28
+ <img class="strava-badge-img" src='https://badges.strava.com/logo-strava.png' alt='Strava' />
29
+ </a>
30
+ </header>
31
+ </Container>
32
+ </div>
33
+ );
34
+ }
35
+ }
36
+
37
+ export default About;
@@ -0,0 +1,111 @@
1
+ import React, { Component } from 'react';
2
+ import Carousel from 'react-bootstrap/Carousel';
3
+ import 'bootstrap/dist/css/bootstrap.css';
4
+ import '.././App.css';
5
+ import { Container } from 'reactstrap';
6
+ import AppNavbar from '.././AppNavbar';
7
+ import navy from '.././img/darkblue-bg.png';
8
+ import teal from '.././img/teal-bg.png';
9
+ import red from '.././img/red-bg.png';
10
+
11
+ class ControlledCarousel extends Component {
12
+
13
+ render() {
14
+ return (
15
+ <div>
16
+ <AppNavbar/>
17
+ <Container>
18
+ <Carousel className="App-header">
19
+ <Carousel.Item interval={500}>
20
+ <a href="https://github.com/conorheffron/ironoc-db" target="_blank" rel="noreferrer">
21
+ <img className="d-block w-100" src={navy} alt="navy1"/>
22
+ <Carousel.Caption>
23
+ <h1><u>ironoc-db</u></h1>
24
+ <h2>Sample Data Manager Service with UI</h2>
25
+ <br /><br />
26
+ <h3>Tech Stack:</h3>
27
+ <h4>Java & Spring Boot, Thymeleaf Templating Engine, & MySQL.</h4>
28
+ </Carousel.Caption>
29
+ </a>
30
+ </Carousel.Item>
31
+ <Carousel.Item interval={500}>
32
+ <a href="https://github.com/conorheffron/booking-sys" target="_blank" rel="noreferrer">
33
+ <img className="d-block w-100" src={teal} alt="teal2" />
34
+ <Carousel.Caption>
35
+ <h1><u>booking-sys</u></h1>
36
+ <h2>Sample Reservations & Viewer System</h2>
37
+ <br /><br />
38
+ <h3>Tech Stack:</h3>
39
+ <h4>Python & Django Web App, JavaScript, SQLite3 or MySQL database.</h4>
40
+ </Carousel.Caption>
41
+ </a>
42
+ </Carousel.Item>
43
+ <Carousel.Item interval={500}>
44
+ <a href="https://github.com/cph33/nba-stats" target="_blank" rel="noreferrer">
45
+ <img className="d-block w-100" src={navy} alt="navy3" />
46
+ <Carousel.Caption>
47
+ <h1><u>nba-stats</u></h1>
48
+ <h2>NBA Analytics (Seasons 2015 - 2023): Player Statistics</h2>
49
+ <br /><br />
50
+ <h3>Tech Stack:</h3>
51
+ <h4>Jupyter Notebooks, Python, Pandas, & Requests / JSON API.</h4>
52
+ </Carousel.Caption>
53
+ </a>
54
+ </Carousel.Item>
55
+ <Carousel.Item interval={500}>
56
+ <a href="https://github.com/conorheffron/cbio-skin-canc" target="_blank" rel="noreferrer">
57
+ <img className="d-block w-100" src={red} alt="red4" />
58
+ <Carousel.Caption>
59
+ <h1><u>cbio-skin-canc</u></h1>
60
+ <h2>Skin Cancer Dataset Analysis</h2>
61
+ <br /><br />
62
+ <h3>Tech Stack:</h3>
63
+ <h4>R, dplyr, plotly, knitr, testthat, covr, GIT.</h4>
64
+ </Carousel.Caption>
65
+ </a>
66
+ </Carousel.Item>
67
+ <Carousel.Item interval={500}>
68
+ <a href="https://github.com/conorheffron/gene-expr" target="_blank" rel="noreferrer">
69
+ <img className="d-block w-100" src={navy} alt="navy5" />
70
+ <Carousel.Caption>
71
+ <h1><u>gene-expr</u></h1>
72
+ <h2>Breast Cancer Dataset Analysis</h2>
73
+ <br /><br />
74
+ <h3>Tech Stack:</h3>
75
+ <h4>R, ggplot2, dplyr, deseq2-analysis, & R markdown.</h4>
76
+ </Carousel.Caption>
77
+ </a>
78
+ </Carousel.Item>
79
+ <Carousel.Item interval={500}>
80
+ <a href="https://github.com/conorheffron/bio-cell-red-edge" target="_blank" rel="noreferrer">
81
+ <img className="d-block w-100" src={red} alt="red6" />
82
+ <Carousel.Caption>
83
+ <h1><u>bio-cell-red-edge</u></h1>
84
+ <h2>Edge Detection of Biological Cell (Image Processing Script)</h2>
85
+ <br /><br />
86
+ <h3>Tech Stack:</h3>
87
+ <h4>Python, sci-kit-image, matplotlib.pyplot, & scipy.ndimage.</h4>
88
+ </Carousel.Caption>
89
+ </a>
90
+ </Carousel.Item>
91
+ <Carousel.Item interval={500}>
92
+ <a href="https://github.com/conorheffron/global-max-sim-matrix" target="_blank" rel="noreferrer">
93
+ <img className="d-block w-100" src={teal} alt="teal7" />
94
+ <Carousel.Caption>
95
+ <h1><u>global-max-sim-matrix</u></h1>
96
+ <h2>Compute Global Maximum Similarity Matrix</h2>
97
+ <br /><br />
98
+ <h3>Tech Stack:</h3>
99
+ <h4>R Package, testthat, stringr, & devtools.
100
+ </h4>
101
+ </Carousel.Caption>
102
+ </a>
103
+ </Carousel.Item>
104
+ </Carousel>
105
+ </Container>
106
+ </div>
107
+ );
108
+ }
109
+ }
110
+
111
+ export default ControlledCarousel;
@@ -0,0 +1,24 @@
1
+ import React, { Component } from 'react';
2
+ import { Container } from 'reactstrap';
3
+ import '.././App.css';
4
+ import AppNavbar from '.././AppNavbar';
5
+ import logo from '.././img/robot-logo.png';
6
+
7
+ class Home extends Component {
8
+
9
+ render() {
10
+ return (
11
+ <div className="App">
12
+ <AppNavbar/>
13
+ <Container>
14
+ <header className="App-header">
15
+ <a href="/"><img src={logo} className="App-logo" alt="iRonoc"/></a>
16
+ <p id="my-intro">Web Application Development | Software & Data Engineering | DevOps</p>
17
+ </header>
18
+ </Container>
19
+ </div>
20
+ );
21
+ }
22
+ }
23
+
24
+ export default Home;
@@ -0,0 +1,23 @@
1
+ import React, { Component } from 'react';
2
+ import { Container } from 'reactstrap';
3
+ import '.././App.css';
4
+ import AppNavbar from '.././AppNavbar';
5
+
6
+ class NotFound extends Component {
7
+
8
+ render() {
9
+ return (
10
+ <div className="App">
11
+ <AppNavbar/>
12
+ <Container>
13
+ <header className="App-header">
14
+ <h1>404 - Page Not Found</h1>
15
+ <p id="my-intro">Sorry, the page you are looking for could not be found.</p>
16
+ </header>
17
+ </Container>
18
+ </div>
19
+ );
20
+ }
21
+ }
22
+
23
+ export default NotFound;
@@ -0,0 +1,90 @@
1
+ import React, { Component } from 'react';
2
+ import { Button, ButtonGroup, Container, InputGroup, Table } from 'reactstrap';
3
+ import '.././App.css';
4
+ import Form from 'react-bootstrap/Form';
5
+ import AppNavbar from '.././AppNavbar';
6
+ import { Link } from 'react-router-dom';
7
+
8
+ class RepoDetails extends Component {
9
+
10
+ constructor(props) {
11
+ super(props);
12
+ this.state = {repoDetailList: [], isLoading: true, value: ''};
13
+
14
+ this.handleChange = this.handleChange.bind(this);
15
+ this.onSubmit = this.onSubmit.bind(this);
16
+ }
17
+
18
+ handleChange(event) {
19
+ const {repos, isL, value} = this.state;
20
+ this.setState({repoDetailList: repos, isLoading: isL, value: event.target.value});
21
+ }
22
+
23
+ onSubmit(event){
24
+ let id = this.state.value;
25
+ this.props.history.push(`/projects/${id}`, {
26
+ id: id
27
+ });
28
+ }
29
+
30
+ async componentDidMount() {
31
+ const response = await fetch(`/get-repo-detail?username=${this.props.match.params.id}`);
32
+ const body = await response.json();
33
+ console.log(body);
34
+ this.setState({repoDetailList: body, isLoading: false});
35
+ }
36
+
37
+ render() {
38
+ const {repoDetailList, isLoading} = this.state;
39
+
40
+ if (isLoading) {
41
+ return <p>Loading...</p>;
42
+ }
43
+
44
+ let gitUser = this.props.match.params.id;
45
+ const repoList = repoDetailList.map(repo => {
46
+ return <tr key={repo.name}>
47
+ <td className="table-info"><a href={repo.repoUrl} target="_blank" rel="noreferrer">{repo.fullName}</a></td>
48
+ <td>{repo.description}</td>
49
+ <td className="table-info"><a href={repo.appHome} target="_blank" rel="noreferrer">{repo.name}</a></td>
50
+ <td>{repo.topics}</td>
51
+ <td>
52
+ <ButtonGroup>
53
+ <Button size="sm" color="secondary" tag={Link} to={"/issues/" + gitUser + "/" + repo.name}>List Issues</Button>
54
+ </ButtonGroup>
55
+ </td>
56
+ </tr>
57
+ });
58
+
59
+ return (
60
+ <div>
61
+ <AppNavbar/><br /><br />
62
+ <Container fluid>
63
+ <br />
64
+ <InputGroup className="mb-3">
65
+ <Form.Control placeholder="Enter GitHub User ID... Example: conorheffron" aria-label="Enter GitHub User ID..."
66
+ aria-describedby="basic-addon2" value={this.state.value}
67
+ onChange={e => this.setState({ value: e.target.value })} type="text"/>
68
+ <Button color="primary" variant="outline-secondary" id="button-addon2"
69
+ onClick={this.onSubmit}>Search Projects</Button>
70
+ </InputGroup>
71
+ <h3>GitHub Projects for username: <b>{this.props.match.params.id}</b></h3>
72
+ <Table striped hover bordered>
73
+ <thead>
74
+ <tr className="table-primary">
75
+ <th width="10%">Repository</th>
76
+ <th width="50%">Description</th>
77
+ <th width="10%">App URL</th>
78
+ <th width="15%">Topics</th>
79
+ <th width="5%">Actions</th>
80
+ </tr>
81
+ </thead>
82
+ <tbody>{repoList}</tbody>
83
+ </Table>
84
+ </Container>
85
+ </div>
86
+ );
87
+ }
88
+ }
89
+
90
+ export default RepoDetails;
@@ -0,0 +1,83 @@
1
+ import React, { Component } from 'react';
2
+ import { Button, Container, InputGroup, Table } from 'reactstrap';
3
+ import '.././App.css';
4
+ import Form from 'react-bootstrap/Form';
5
+ import AppNavbar from '.././AppNavbar';
6
+
7
+ class RepoIssues extends Component {
8
+
9
+ constructor(props) {
10
+ super(props);
11
+ this.state = {repoIssueList: [], isLoading: true, value: ''};
12
+
13
+ this.handleChange = this.handleChange.bind(this);
14
+ this.onSubmit = this.onSubmit.bind(this);
15
+ }
16
+
17
+ handleChange(event) {
18
+ const {issues, isL, value} = this.state;
19
+ this.setState({repoIssueList: issues, isLoading: isL, value: event.target.value});
20
+ }
21
+
22
+ onSubmit(event){
23
+ let repo = this.state.value;
24
+ let id = this.props.match.params.id;
25
+ this.props.history.push(`/issues/${id}/${repo}`, {
26
+ id: id,
27
+ repo: repo
28
+ });
29
+ }
30
+
31
+ async componentDidMount() {
32
+ const response = await fetch(`/get-repo-issue/${this.props.match.params.id}/${this.props.match.params.repo}/`);
33
+ const body = await response.json();
34
+ console.log(body)
35
+ this.setState({repoIssueList: body, isLoading: false});
36
+ }
37
+
38
+ render() {
39
+ const {repoIssueList, isLoading} = this.state;
40
+ if (isLoading) {
41
+ return <p>Loading...</p>;
42
+ }
43
+ const repoList = repoIssueList.map(issue => {
44
+ let username = this.props.match.params.id
45
+ let repository = this.props.match.params.repo
46
+ const issueLink = `https://github.com/${username}/${repository}/issues/${issue.number}/`;
47
+ return <tr key={issue.number}>
48
+ <td className="table-info"><a href={issueLink} target="_blank" rel="noreferrer"><b><i>{issue.number}</i></b></a></td>
49
+ <td><b>{issue.title}</b></td>
50
+ <td>{issue.body}</td>
51
+ </tr>
52
+ });
53
+ const projectLink = `/projects/${this.props.match.params.id}/`;
54
+ return (
55
+ <div>
56
+ <AppNavbar/><br /><br />
57
+ <Container fluid>
58
+ <br />
59
+ <InputGroup className="mb-3">
60
+ <Form.Control placeholder="Enter Project Name... Example: ironoc-db" aria-label="Enter Project Name..."
61
+ aria-describedby="basic-addon2" type="text" value={this.state.value}
62
+ onChange={e => this.setState({ value: e.target.value })} />
63
+ <Button color="primary" variant="outline-secondary" id="button-addon2"
64
+ onClick={this.onSubmit}>Search Issues</Button>
65
+ </InputGroup>
66
+ <h3>Issues for project <b>{this.props.match.params.repo}</b> and account <a href={projectLink}><b>{this.props.match.params.id}</b></a></h3>
67
+ <Table striped hover bordered>
68
+ <thead>
69
+ <tr className="table-secondary">
70
+ <th width="3%">Issue No.</th>
71
+ <th width="27%">Title</th>
72
+ <th width="70%">Description</th>
73
+ </tr>
74
+ </thead>
75
+ <tbody>{repoList}</tbody>
76
+ </Table>
77
+ </Container>
78
+ </div>
79
+ );
80
+ }
81
+ }
82
+
83
+ export default RepoIssues;
Binary file
Binary file
Binary file
Binary file
package/src/index.css ADDED
@@ -0,0 +1,13 @@
1
+ body {
2
+ margin: 0;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
+ sans-serif;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ }
9
+
10
+ code {
11
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
+ monospace;
13
+ }
package/src/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import reportWebVitals from './reportWebVitals';
4
+ import 'bootstrap/dist/css/bootstrap.min.css';
5
+ import './index.css';
6
+ import App from './App';
7
+
8
+ const root = ReactDOM.createRoot(document.getElementById('root'));
9
+ root.render(
10
+ <React.StrictMode>
11
+ <App />
12
+ </React.StrictMode>
13
+ );
14
+
15
+ reportWebVitals();
@@ -0,0 +1,13 @@
1
+ const reportWebVitals = onPerfEntry => {
2
+ if (onPerfEntry && onPerfEntry instanceof Function) {
3
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4
+ getCLS(onPerfEntry);
5
+ getFID(onPerfEntry);
6
+ getFCP(onPerfEntry);
7
+ getLCP(onPerfEntry);
8
+ getTTFB(onPerfEntry);
9
+ });
10
+ }
11
+ };
12
+
13
+ export default reportWebVitals;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';