Merge branch 'ft/dev-server-watch' into ft/oas3
This commit is contained in:
@@ -140,8 +140,8 @@ export default class Oauth2 extends React.Component {
|
||||
isAuthorized ? <code> { this.state.passwordType } </code>
|
||||
: <Col tablet={10} desktop={10}>
|
||||
<select id="password_type" data-name="passwordType" onChange={ this.onInputChange }>
|
||||
<option value="basic">Basic auth</option>
|
||||
<option value="request-body">Request body</option>
|
||||
<option value="basic">Basic auth</option>
|
||||
<option value="query">Query parameters</option>
|
||||
</select>
|
||||
</Col>
|
||||
|
||||
@@ -5,14 +5,18 @@ import Collapse from "react-collapse"
|
||||
export default class Errors extends React.Component {
|
||||
|
||||
static propTypes = {
|
||||
jumpToLine: PropTypes.func,
|
||||
editorActions: PropTypes.object,
|
||||
errSelectors: PropTypes.object.isRequired,
|
||||
layoutSelectors: PropTypes.object.isRequired,
|
||||
layoutActions: PropTypes.object.isRequired
|
||||
}
|
||||
|
||||
render() {
|
||||
let { jumpToLine, errSelectors, layoutSelectors, layoutActions } = this.props
|
||||
let { editorActions, errSelectors, layoutSelectors, layoutActions } = this.props
|
||||
|
||||
if(editorActions && editorActions.jumpToLine) {
|
||||
var jumpToLine = editorActions.jumpToLine
|
||||
}
|
||||
|
||||
let errors = errSelectors.allErrors()
|
||||
|
||||
@@ -37,10 +41,11 @@ export default class Errors extends React.Component {
|
||||
<Collapse isOpened={ isVisible } animated >
|
||||
<div className="errors">
|
||||
{ sortedJSErrors.map((err, i) => {
|
||||
if(err.get("type") === "thrown") {
|
||||
let type = err.get("type")
|
||||
if(type === "thrown" || type === "auth") {
|
||||
return <ThrownErrorItem key={ i } error={ err.get("error") || err } jumpToLine={jumpToLine} />
|
||||
}
|
||||
if(err.get("type") === "spec") {
|
||||
if(type === "spec") {
|
||||
return <SpecErrorItem key={ i } error={ err } jumpToLine={jumpToLine} />
|
||||
}
|
||||
}) }
|
||||
@@ -95,7 +100,7 @@ const SpecErrorItem = ( { error, jumpToLine } ) => {
|
||||
<div>
|
||||
<h4>{ toTitleCase(error.get("source")) + " " + error.get("level") } { locationMessage }</h4>
|
||||
<span style={{ whiteSpace: "pre-line"}}>{ error.get("message") }</span>
|
||||
<div>
|
||||
<div style={{ "text-decoration": "underline", "cursor": "pointer" }}>
|
||||
{ jumpToLine ? (
|
||||
<a onClick={jumpToLine.bind(null, error.get("line"))}>Jump to line { error.get("line") }</a>
|
||||
) : null }
|
||||
|
||||
@@ -48,11 +48,10 @@ export default class Operations extends React.Component {
|
||||
return (
|
||||
<div className={showTag ? "opblock-tag-section is-open" : "opblock-tag-section"} key={"operation-" + tag}>
|
||||
|
||||
<h4 className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" }>
|
||||
<span onClick={() => layoutActions.show(isShownKey, !showTag)}>{tag}</span>
|
||||
|
||||
<h4 onClick={() => layoutActions.show(isShownKey, !showTag)} className={!tagDescription ? "opblock-tag no-desc" : "opblock-tag" }>
|
||||
<span>{tag}</span>
|
||||
{ !tagDescription ? null :
|
||||
<small onClick={() => layoutActions.show(isShownKey, !showTag)} >
|
||||
<small>
|
||||
{ tagDescription }
|
||||
</small>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user