Fixed code in docs

This commit is contained in:
frikky
2020-06-13 16:52:38 +02:00
parent 54ed729056
commit 4f25d9c2e7
4 changed files with 13 additions and 15 deletions
+3 -2
View File
@@ -10,8 +10,9 @@
* Cloud: Register at https://shuffler.io/register and get cooking (there are some differences!) * Cloud: Register at https://shuffler.io/register and get cooking (there are some differences!)
## Blogposts ## Blogposts
[1. Introducing Shuffle](https://medium.com/security-operation-capybara/introducing-shuffle-an-open-source-soar-platform-part-1-58a529de7d12) * [1. Introducing Shuffle](https://medium.com/security-operation-capybara/introducing-shuffle-an-open-source-soar-platform-part-1-58a529de7d12)
[2. Getting started with Shuffle](https://medium.com/security-operation-capybara/getting-started-with-shuffle-an-open-source-soar-platform-part-2-1d7c67a64244) * [2. Getting started with Shuffle](https://medium.com/security-operation-capybara/getting-started-with-shuffle-an-open-source-soar-platform-part-2-1d7c67a64244)
* [3. Integrating Shuffle with Virustotal and TheHive](https://medium.com/@Frikkylikeme/integrating-shuffle-with-virustotal-and-thehive-open-source-soar-part-3-8e2e0d3396a9)
## Documentation ## Documentation
[Documentation](https://shuffler.io/docs) can be found on https://shuffler.io/docs/about or in your own instance. Currently lacking: [Documentation](https://shuffler.io/docs) can be found on https://shuffler.io/docs/about or in your own instance. Currently lacking:
-2
View File
@@ -379,8 +379,6 @@ func makePythoncode(swagger *openapi3.Swagger, name, url, method string, paramet
verifyAddin, verifyAddin,
) )
log.Printf("CODE: %s", data)
//log.Println(data) //log.Println(data)
//log.Println(functionname) //log.Println(functionname)
return functionname, data return functionname, data
+1 -1
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: frikky/shuffle:frontend image: frikky/shuffle:frontend
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
+9 -10
View File
@@ -58,8 +58,6 @@ const Docs = (props) => {
// Continue this, and find the h2 with the data in it lol // Continue this, and find the h2 with the data in it lol
if (window.location.hash.length > 0) { if (window.location.hash.length > 0) {
console.log("HELLO")
var parent = document.getElementById("markdown_wrapper") var parent = document.getElementById("markdown_wrapper")
if (parent !== null) { if (parent !== null) {
var elements = parent.getElementsByTagName('h2') var elements = parent.getElementsByTagName('h2')
@@ -166,6 +164,7 @@ const Docs = (props) => {
flex: "1", flex: "1",
maxWidth: 750, maxWidth: 750,
overflow: "hidden", overflow: "hidden",
paddingBottom: 200,
} }
function OuterLink(props) { function OuterLink(props) {
@@ -180,15 +179,20 @@ const Docs = (props) => {
} }
function CodeHandler(props) { function CodeHandler(props) {
return <code style={{padding: 5, backgroundColor: inputColor}}>{props.value}</code> return (
<pre style={{padding: 10, minWidth: "50%", maxWidth: "100%", backgroundColor: inputColor}}>
<code>
{props.value}
</code>
</pre>
)
} }
function Heading(props) { function Heading(props) {
const element = React.createElement(`h${props.level}`, {style: {marginTop: 25}}, props.children) const element = React.createElement(`h${props.level}`, {style: {marginTop: 25}}, props.children)
console.log(props)
return ( return (
<span> <span>
<Divider style={{width: "90%", marginTop: 25, backgroundColor: inputColor}} /> {props.level !== 1 ? <Divider style={{width: "90%", marginTop: 25, backgroundColor: inputColor}} /> : null}
{element} {element}
</span> </span>
) )
@@ -208,11 +212,6 @@ const Docs = (props) => {
<div style={Body}> <div style={Body}>
<div style={SideBar}> <div style={SideBar}>
<ul style={{listStyle: "none", paddingLeft: "0"}}> <ul style={{listStyle: "none", paddingLeft: "0"}}>
<li style={{marginTop: "10px"}}>
<a style={hrefStyle} href="/">
<h2>Home</h2>
</a>
</li>
{list.map(item => { {list.map(item => {
const path = "/docs/"+item const path = "/docs/"+item
const newname = item.charAt(0).toUpperCase()+item.substring(1).split("_").join(" ") const newname = item.charAt(0).toUpperCase()+item.substring(1).split("_").join(" ")