Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jira view #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions react-web/src/components/JiraLogin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import { Alert } from 'patternfly-react';
import { JiraLoginForm } from './JiraLoginForm'

export class JiraLogin extends React.Component {

render() {
return(
<div>
<header className="text-center">
<h1>Link to Jira</h1>
</header>
<div>
<Alert type="info">
Username and password are never stored. They are only used to generate a session token.
</Alert>

<JiraLoginForm />
</div>
</div>
);
}
}
51 changes: 51 additions & 0 deletions react-web/src/components/JiraLoginForm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React from 'react';
import { Form, FormGroup, ControlLabel, FormControl, Button } from 'patternfly-react';

export class JiraLoginForm extends React.Component {

constructor(props) {
super(props);

this.state = {
'jira-host': '',
'jira-username': '',
'jira-password': ''
};

this.handleControlChange = this.handleControlChange.bind(this);
}

handleControlChange(evt) {
this.setState({[evt.target.id]: evt.target.value.trim()});
}

render() {
return (
<div>
<Form>
<FormGroup>
<ControlLabel>
Jira Host:
</ControlLabel>
<FormControl type="text" id="jira-host" required onChange={this.handleControlChange} />
</FormGroup>
<FormGroup>
<ControlLabel>
Jira Username:
</ControlLabel>
<FormControl type="text" id="jira-username" required onChange={this.handleControlChange} />
</FormGroup>
<FormGroup>
<ControlLabel>
Jira Password:
</ControlLabel>
<FormControl type="text" id="jira-password" required onChange={this.handleControlChange} />
</FormGroup>
<Button className="pull-right" bsStyle="primary" type="submit" value="Submit">
Link to Jira
</Button>
</Form>
</div>
);
}
}
3 changes: 2 additions & 1 deletion react-web/src/components/Session.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { Nav, NavItem, TabContent, TabPane, Tabs } from 'patternfly-react';

import { StoryPointer } from './StoryPointer';
import { JiraLogin } from './JiraLogin';

export class Session extends React.Component {
render() {
Expand All @@ -24,7 +25,7 @@ export class Session extends React.Component {
<StoryPointer sessionId={this.props.sessionId} userName={this.props.userName}></StoryPointer>
</TabPane>
<TabPane eventKey={2}>
{/* JIRA Content */}
<JiraLogin />
</TabPane>
<TabPane eventKey={3}>
{/* Issues Content */}
Expand Down
5 changes: 0 additions & 5 deletions react-web/src/components/_createSession.scss

This file was deleted.