OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
swagger-ui-5.17.14
/
src
/
core
/
components
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:11 AM
rwxr-xr-x
📄
app.jsx
621 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📁
auth
-
08/07/2024 04:34:04 AM
rwxr-xr-x
📄
clear.jsx
599 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
contact.jsx
1.14 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
content-type.jsx
1.71 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
copy-to-clipboard-btn.jsx
740 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
curl.jsx
1.11 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
debug.jsx
1.05 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
deep-link.jsx
475 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
errors.jsx
4.03 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
example.jsx
1.14 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
examples-select-value-retainer.jsx
8.08 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
examples-select.jsx
3.9 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
execute.jsx
3.4 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
footer.jsx
156 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
headers.jsx
1.81 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
info.jsx
3.99 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
initialized-input.jsx
1.43 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
jump-to-path.jsx
191 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
layout-utils.jsx
5.37 KB
08/07/2024 04:33:53 AM
rw-r--r--
📁
layouts
-
08/07/2024 04:34:05 AM
rwxr-xr-x
📄
license.jsx
1.01 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
live-response.jsx
4.67 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
online-validator-badge.jsx
3.15 KB
08/07/2024 04:33:53 AM
rw-r--r--
📄
openapi-version.jsx
314 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
operation-extension-row.jsx
411 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
operation-extensions.jsx
970 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
operation-summary-method.jsx
535 bytes
08/07/2024 04:33:53 AM
rw-r--r--
📄
operation-summary-path.jsx
1.38 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
operation-summary.jsx
3.57 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
operation-tag.jsx
3.63 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
operation.jsx
9.93 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
operations.jsx
2.8 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
overview.jsx
3.57 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
param-body.jsx
4.85 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
parameter-extension.jsx
302 bytes
08/07/2024 04:33:54 AM
rw-r--r--
📄
parameter-include-empty.jsx
1.43 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
parameter-row.jsx
14.28 KB
08/07/2024 04:33:54 AM
rw-r--r--
📁
parameters
-
08/07/2024 04:34:05 AM
rwxr-xr-x
📄
property.jsx
376 bytes
08/07/2024 04:33:54 AM
rw-r--r--
📁
providers
-
08/07/2024 04:34:05 AM
rwxr-xr-x
📄
response-body.jsx
5.97 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
response-extension.jsx
316 bytes
08/07/2024 04:33:54 AM
rw-r--r--
📄
response.jsx
9.31 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
responses.jsx
6.59 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
svg-assets.jsx
3.15 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
system-wrapper.jsx
0 bytes
08/07/2024 04:33:54 AM
rw-r--r--
📄
try-it-out-button.jsx
1.36 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
version-pragma-filter.jsx
1.84 KB
08/07/2024 04:33:54 AM
rw-r--r--
📄
version-stamp.jsx
271 bytes
08/07/2024 04:33:54 AM
rw-r--r--
Editing: errors.jsx
Close
import React from "react" import PropTypes from "prop-types" import { List } from "immutable" export default class Errors extends React.Component { static propTypes = { editorActions: PropTypes.object, errSelectors: PropTypes.object.isRequired, layoutSelectors: PropTypes.object.isRequired, layoutActions: PropTypes.object.isRequired, getComponent: PropTypes.func.isRequired, } render() { let { editorActions, errSelectors, layoutSelectors, layoutActions, getComponent } = this.props const Collapse = getComponent("Collapse") if(editorActions && editorActions.jumpToLine) { var jumpToLine = editorActions.jumpToLine } let errors = errSelectors.allErrors() // all thrown errors, plus error-level everything else let allErrorsToDisplay = errors.filter(err => err.get("type") === "thrown" ? true :err.get("level") === "error") if(!allErrorsToDisplay || allErrorsToDisplay.count() < 1) { return null } let isVisible = layoutSelectors.isShown(["errorPane"], true) let toggleVisibility = () => layoutActions.show(["errorPane"], !isVisible) let sortedJSErrors = allErrorsToDisplay.sortBy(err => err.get("line")) return ( <pre className="errors-wrapper"> <hgroup className="error"> <h4 className="errors__title">Errors</h4> <button className="btn errors__clear-btn" onClick={ toggleVisibility }>{ isVisible ? "Hide" : "Show" }</button> </hgroup> <Collapse isOpened={ isVisible } animated > <div className="errors"> { sortedJSErrors.map((err, i) => { let type = err.get("type") if(type === "thrown" || type === "auth") { return <ThrownErrorItem key={ i } error={ err.get("error") || err } jumpToLine={jumpToLine} /> } if(type === "spec") { return <SpecErrorItem key={ i } error={ err } jumpToLine={jumpToLine} /> } }) } </div> </Collapse> </pre> ) } } const ThrownErrorItem = ( { error, jumpToLine } ) => { if(!error) { return null } let errorLine = error.get("line") return ( <div className="error-wrapper"> { !error ? null : <div> <h4>{ (error.get("source") && error.get("level")) ? toTitleCase(error.get("source")) + " " + error.get("level") : "" } { error.get("path") ? <small> at {error.get("path")}</small>: null }</h4> <span className="message thrown"> { error.get("message") } </span> <div className="error-line"> { errorLine && jumpToLine ? <a onClick={jumpToLine.bind(null, errorLine)}>Jump to line { errorLine }</a> : null } </div> </div> } </div> ) } const SpecErrorItem = ( { error, jumpToLine = null } ) => { let locationMessage = null if(error.get("path")) { if(List.isList(error.get("path"))) { locationMessage = <small>at { error.get("path").join(".") }</small> } else { locationMessage = <small>at { error.get("path") }</small> } } else if(error.get("line") && !jumpToLine) { locationMessage = <small>on line { error.get("line") }</small> } return ( <div className="error-wrapper"> { !error ? null : <div> <h4>{ toTitleCase(error.get("source")) + " " + error.get("level") } { locationMessage }</h4> <span className="message">{ error.get("message") }</span> <div className="error-line"> { jumpToLine ? ( <a onClick={jumpToLine.bind(null, error.get("line"))}>Jump to line { error.get("line") }</a> ) : null } </div> </div> } </div> ) } function toTitleCase(str) { return (str || "") .split(" ") .map(substr => substr[0].toUpperCase() + substr.slice(1)) .join(" ") } ThrownErrorItem.propTypes = { error: PropTypes.object.isRequired, jumpToLine: PropTypes.func } SpecErrorItem.propTypes = { error: PropTypes.object.isRequired, jumpToLine: PropTypes.func }