Commit 3feef9ec authored by Glenn Aarøen's avatar Glenn Aarøen 🐙
Browse files

updated rest of panel

parent 9ace4d9c
Pipeline #16687 passed with stages
in 2 minutes and 35 seconds
...@@ -119,34 +119,37 @@ class Component extends PureComponent { ...@@ -119,34 +119,37 @@ class Component extends PureComponent {
// } // }
return ( return (
<Panel header="HTTP Client using OAuth Access Token" eventKey="1" collapsible={true} defaultExpanded={true}> <Panel eventKey="1" collapsible={true} defaultExpanded={true}>
<Panel.Heading className={'panel-title'}>
HTTP Client using OAuth Access Token
</Panel.Heading>
{userinfo} {userinfo}
<Panel.Body>
<div> <div>
<p>Fetch data from</p> <p>Fetch data from</p>
{this.renderDropdownButton()} {this.renderDropdownButton()}
<FormGroup <FormGroup
className="gutter" className="gutter"
controlId="formBasicText" controlId="formBasicText"
> >
<FormControl <FormControl
type="text" type="text"
bsSize="large" bsSize="large"
placeholder="http://httpjs.net/foo" placeholder="http://httpjs.net/foo"
value={this.state.customEndpoint} value={this.state.customEndpoint}
onChange={this.updateAPIendpoint.bind(this)} onChange={this.updateAPIendpoint.bind(this)}
/> />
<HelpBlock>Fill out the hostname of your OAuth server. Will only work if your OAuth server support OpenID Connect Discovery. If not, please enter configuration manually.</HelpBlock> <HelpBlock>Fill out the hostname of your OAuth server. Will only work if your OAuth server support OpenID
</FormGroup> Connect Discovery. If not, please enter configuration manually.</HelpBlock>
</FormGroup>
<Button onClick={this.fetchCustom.bind(this)} bsStyle="default">
<FontAwesome name='arrow-circle-o-right' /> Perform HTTP call <Button onClick={this.fetchCustom.bind(this)} bsStyle="default">
</Button> <FontAwesome name='arrow-circle-o-right'/> Perform HTTP call
</div> </Button>
</div>
</Panel.Body>
</Panel> </Panel>
) )
} }
......
...@@ -25,8 +25,6 @@ class Component extends PureComponent { ...@@ -25,8 +25,6 @@ class Component extends PureComponent {
updateAPIendpoint() { updateAPIendpoint() {
} }
fetchUserinfo() { fetchUserinfo() {
...@@ -54,6 +52,7 @@ class Component extends PureComponent { ...@@ -54,6 +52,7 @@ class Component extends PureComponent {
} }
return null return null
} }
render() { render() {
// console.error("Component", this.props) // console.error("Component", this.props)
...@@ -79,24 +78,29 @@ class Component extends PureComponent { ...@@ -79,24 +78,29 @@ class Component extends PureComponent {
let loading = null let loading = null
if (this.props.http.isLoading) { if (this.props.http.isLoading) {
loading = ( loading = (
<LoadingIndicator /> <LoadingIndicator/>
) )
} }
return ( return (
<Panel header="HTTP Response" eventKey="1" collapsible={true} defaultExpanded={true}> <Panel eventKey="1" collapsible={true} defaultExpanded={true}>
<div> <Panel.Heading className={"panel-title"}>
<p><code>GET</code> request to <code>{this.props.http.url}</code></p> HTTP Reponse
{ loading } </Panel.Heading>
{this.getErrorMessage()} <Panel.Body>
<Table striped bordered condensed hover> <div>
<tbody> <p><code>GET</code> request to <code>{this.props.http.url}</code></p>
{loading}
{this.getErrorMessage()}
<Table striped bordered condensed hover>
<tbody>
{headers} {headers}
</tbody> </tbody>
</Table> </Table>
<pre>{ bodystr }</pre> <pre>{bodystr}</pre>
</div> </div>
</Panel.Body>
</Panel> </Panel>
) )
} }
......
...@@ -6,11 +6,6 @@ import FontAwesome from 'react-fontawesome' ...@@ -6,11 +6,6 @@ import FontAwesome from 'react-fontawesome'
const defaultHost = "https://auth.dataporten.no" const defaultHost = "https://auth.dataporten.no"
const fontStyling = {
fontWeight: 'bold',
fontFamily: 'colfaxBold,Helvetica,Arial,sans-serif'
}
class Component extends PureComponent { class Component extends PureComponent {
constructor(props) { constructor(props) {
...@@ -78,7 +73,7 @@ class Component extends PureComponent { ...@@ -78,7 +73,7 @@ class Component extends PureComponent {
console.log("STATE", this.state) console.log("STATE", this.state)
return ( return (
<Panel eventKey="1" collapsible={true} expanded={expanded}> <Panel eventKey="1" collapsible={true} expanded={expanded}>
<Panel.Heading onClick={this.actTogglePanel} className={"panel-title"} style={fontStyling}> <Panel.Heading onClick={this.actTogglePanel} className={"panel-title"}>
OpenID Connect Discovery OpenID Connect Discovery
</Panel.Heading> </Panel.Heading>
<Panel.Collapse> <Panel.Collapse>
......
...@@ -5,11 +5,6 @@ import FontAwesome from 'react-fontawesome' ...@@ -5,11 +5,6 @@ import FontAwesome from 'react-fontawesome'
import WhiteBox from './WhiteBox' import WhiteBox from './WhiteBox'
const fontStyling = {
fontWeight: 'bold',
fontFamily: 'colfaxBold,Helvetica,Arial,sans-serif'
}
class Component extends PureComponent { class Component extends PureComponent {
constructor(props) { constructor(props) {
...@@ -110,7 +105,7 @@ class Component extends PureComponent { ...@@ -110,7 +105,7 @@ class Component extends PureComponent {
let expanded = (this.state.overrideToggle === true) || this.props.expanded let expanded = (this.state.overrideToggle === true) || this.props.expanded
return ( return (
<Panel eventKey="2" collapsible={true} expanded={expanded}> <Panel eventKey="2" collapsible={true} expanded={expanded}>
<Panel.Heading onClick={this.actTogglePanel} className={"panel-title"} style={fontStyling}> <Panel.Heading onClick={this.actTogglePanel} className={"panel-title"}>
Configuration Configuration
</Panel.Heading> </Panel.Heading>
<Panel.Collapse> <Panel.Collapse>
......
...@@ -35,7 +35,6 @@ class Component extends PureComponent { ...@@ -35,7 +35,6 @@ class Component extends PureComponent {
// console.error("Component", this.props) // console.error("Component", this.props)
if (!this.props.token) { if (!this.props.token) {
return ( return (
<p>No token</p> <p>No token</p>
...@@ -51,13 +50,16 @@ class Component extends PureComponent { ...@@ -51,13 +50,16 @@ class Component extends PureComponent {
} }
return ( return (
<Panel header="Access Token" eventKey="1" collapsible={true} defaultExpanded={true}> <Panel eventKey="1" collapsible={true} defaultExpanded={true}>
<Panel.Heading className={"panel-title"}>
<p>This access token expires {extxt}</p> Access Token
<pre>{this.props.tokenstring}</pre> </Panel.Heading>
<Panel.Body>
{idtokenView} <p>This access token expires {extxt}</p>
<pre>{this.props.tokenstring}</pre>
{idtokenView}
</Panel.Body>
</Panel> </Panel>
) )
} }
......
...@@ -37,3 +37,8 @@ ...@@ -37,3 +37,8 @@
transition: all 80ms ease-in; transition: all 80ms ease-in;
transform: scale(1.05); transform: scale(1.05);
} }
.panel-title {
font-weight: bold;
font-family: 'colfaxBold', Helvetica, Arial, sans-serif;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment