Added simple curl testfiles
This commit is contained in:
@@ -33,6 +33,7 @@ import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
|
||||
import ScrollToTop from "./components/ScrollToTop";
|
||||
import AlertTemplate from "./components/AlertTemplate";
|
||||
import { positions, Provider } from "react-alert";
|
||||
import {isMobile} from "react-device-detect";
|
||||
|
||||
// Production - backend proxy forwarding in nginx
|
||||
var globalUrl = window.location.origin
|
||||
@@ -147,7 +148,7 @@ const App = (message, props) => {
|
||||
<Route exact path="/schedules/:key" render={props => <EditSchedule globalUrl={globalUrl} {...props} />} />
|
||||
<Route exact path="/workflows" render={props => <Workflows cookies={cookies} removeCookie={removeCookie} isLoaded={isLoaded} isLoggedIn={isLoggedIn} globalUrl={globalUrl} cookies={cookies} userdata={userdata} {...props} />} />
|
||||
<Route exact path="/workflows/:key" render={props => <AngularWorkflow userdata={userdata} globalUrl={globalUrl} isLoaded={isLoaded} isLoggedIn={isLoggedIn} {...props} />} />
|
||||
<Route exact path="/docs/:key" render={props => <Docs isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||
<Route exact path="/docs/:key" render={props => <Docs isMobile={isMobile} isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||
<Route exact path="/docs" render={props => { window.location.pathname = "/docs/about" }} />
|
||||
<Route exact path="/introduction" render={props => <Introduction isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||
<Route exact path="/introduction/:key" render={props => <Introduction isLoaded={isLoaded} globalUrl={globalUrl} {...props} />} />
|
||||
|
||||
@@ -118,6 +118,39 @@ const Header = props => {
|
||||
|
||||
|
||||
// Should be based on some path
|
||||
const avatarMenu =
|
||||
<span>
|
||||
<IconButton color="primary" style={{marginRight: 15, }} aria-controls="simple-menu" aria-haspopup="true" onClick={(event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
}}>
|
||||
<Avatar style={{height: 35, width: 35,}} alt="Your username here" src="" />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="simple-menu"
|
||||
anchorEl={anchorEl}
|
||||
keepMounted
|
||||
open={Boolean(anchorEl)}
|
||||
onClose={() => {
|
||||
handleClose()
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={(event) => {
|
||||
event.preventDefault()
|
||||
handleClose()
|
||||
}}>
|
||||
<Link to="/settings" style={hrefStyle}>
|
||||
Settings
|
||||
</Link>
|
||||
</MenuItem>
|
||||
<MenuItem style={{color: "white"}} onClick={(event) => {
|
||||
event.preventDefault()
|
||||
handleClose()
|
||||
handleClickLogout()
|
||||
}}>
|
||||
Logout
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</span>
|
||||
const logoCheck = !homePage ? null : null
|
||||
|
||||
// Handle top bar or something
|
||||
@@ -197,36 +230,7 @@ const Header = props => {
|
||||
</List>
|
||||
</div>
|
||||
<div style={{flex: "10", display: "flex", flexDirection: "row-reverse"}}>
|
||||
<IconButton color="primary" style={{marginRight: 15, }} aria-controls="simple-menu" aria-haspopup="true" onClick={(event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
}}>
|
||||
<Avatar style={{height: 35, width: 35,}} alt="Your username here" src="" />
|
||||
</IconButton>
|
||||
<Menu
|
||||
id="simple-menu"
|
||||
anchorEl={anchorEl}
|
||||
keepMounted
|
||||
open={Boolean(anchorEl)}
|
||||
onClose={() => {
|
||||
handleClose()
|
||||
}}
|
||||
>
|
||||
<MenuItem onClick={(event) => {
|
||||
event.preventDefault()
|
||||
handleClose()
|
||||
}}>
|
||||
<Link to="/settings" style={hrefStyle}>
|
||||
Settings
|
||||
</Link>
|
||||
</MenuItem>
|
||||
<MenuItem style={{color: "white"}} onClick={(event) => {
|
||||
event.preventDefault()
|
||||
handleClose()
|
||||
handleClickLogout()
|
||||
}}>
|
||||
Logout
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
{avatarMenu}
|
||||
{userdata === undefined || userdata.admin === undefined || userdata.admin === null || !userdata.admin ? null :
|
||||
<Link to="/admin" style={hrefStyle}>
|
||||
<Button color="primary" variant="contained" style={{marginRight: 15, marginTop: 12}}>
|
||||
@@ -289,25 +293,9 @@ const Header = props => {
|
||||
</List>
|
||||
</div>
|
||||
<div style={{flex: "10", display: "flex", flexDirection: "row-reverse"}}>
|
||||
<List style={{display: 'flex', flexDirection: 'row-reverse'}} component="nav">
|
||||
<ListItem style={{flex: "1", textAlign: "center"}}>
|
||||
<div onMouseOver={handleLoginHover} onMouseOut={handleLoginHoverOut} onClick={handleClickLogout} style={{color: LoginHoverColor, cursor: "pointer"}}>
|
||||
Logout
|
||||
</div>
|
||||
</ListItem>
|
||||
{logoCheck}
|
||||
<ListItem style={{flex: "1", textAlign: "center"}}>
|
||||
<Link to="/settings" style={hrefStyle}>
|
||||
<Button
|
||||
style={{}}
|
||||
variant="contained"
|
||||
color="primary"> Settings</Button>
|
||||
</Link>
|
||||
</ListItem>
|
||||
<ListItem></ListItem>
|
||||
</List>
|
||||
{avatarMenu}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
// <Divider style={{height: "1px", width: "100%", backgroundColor: "rgb(91, 96, 100)"}}/>
|
||||
const loadedCheck =
|
||||
|
||||
@@ -1441,7 +1441,7 @@ const Admin = (props) => {
|
||||
}
|
||||
|
||||
const organizationView = curTab === 0 && selectedOrganization.id !== undefined ?
|
||||
<div>
|
||||
<div style={{position: "relative"}}>
|
||||
<div style={{ marginTop: 20, marginBottom: 20, }}>
|
||||
<h2 style={{ display: "inline", }}>Organization overview</h2>
|
||||
<span style={{ marginLeft: 25 }}>
|
||||
@@ -1457,6 +1457,25 @@ const Admin = (props) => {
|
||||
</div>
|
||||
:
|
||||
<div>
|
||||
<Tooltip title={"Copy Organization ID"} style={{}} aria-label={"Copy orgid"}>
|
||||
<IconButton style={{top: -10, right: 0, position: "absolute",}} onClick={() => {
|
||||
const elementName = "copy_element_shuffle"
|
||||
const org_id = selectedOrganization.id
|
||||
var copyText = document.getElementById(elementName);
|
||||
if (copyText !== null && copyText !== undefined) {
|
||||
navigator.clipboard.writeText(org_id)
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); /* For mobile devices */
|
||||
|
||||
/* Copy the text inside the text field */
|
||||
document.execCommand("copy");
|
||||
|
||||
alert.info(org_id + " copied to clipboard")
|
||||
}
|
||||
}}>
|
||||
<FileCopyIcon style={{color: "rgba(255,255,255,0.8)"}}/>
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
{selectedOrganization.name.length > 0 ?
|
||||
<OrgHeader setSelectedOrganization={setSelectedOrganization} globalUrl={globalUrl} selectedOrganization={selectedOrganization}/>
|
||||
:
|
||||
@@ -2034,7 +2053,7 @@ const Admin = (props) => {
|
||||
/* Copy the text inside the text field */
|
||||
document.execCommand("copy");
|
||||
|
||||
alert.info(file.id + "copied to clipboard")
|
||||
alert.info(file.id + " copied to clipboard")
|
||||
}
|
||||
}}>
|
||||
<FileCopyIcon style={{color: "white"}}/>
|
||||
|
||||
@@ -31,7 +31,7 @@ const hrefStyle = {
|
||||
}
|
||||
|
||||
const Docs = (props) => {
|
||||
const { isLoaded, globalUrl, inputColor, selectedDoc, serverside, isMobile, update} = props;
|
||||
const { isLoaded, globalUrl, selectedDoc, serverside, isMobile, update} = props;
|
||||
|
||||
const theme = useTheme();
|
||||
const [data, setData] = useState("");
|
||||
@@ -213,7 +213,7 @@ const Docs = (props) => {
|
||||
|
||||
function CodeHandler(props) {
|
||||
return (
|
||||
<pre style={{padding: 15, minWidth: "50%", maxWidth: "100%", backgroundColor: inputColor, overflowX: "auto", overflowY: "hidden",}}>
|
||||
<pre style={{padding: 15, minWidth: "50%", maxWidth: "100%", backgroundColor: theme.palette.inputColor, overflowX: "auto", overflowY: "hidden",}}>
|
||||
<code>
|
||||
{props.value}
|
||||
</code>
|
||||
@@ -286,8 +286,8 @@ const Docs = (props) => {
|
||||
|
||||
const mobileStyle = {
|
||||
color: "white",
|
||||
marginLeft: 15,
|
||||
marginRight: 15,
|
||||
marginLeft: 25,
|
||||
marginRight: 25,
|
||||
paddingBottom: 50,
|
||||
backgroundColor: "inherit",
|
||||
display: "flex",
|
||||
@@ -305,6 +305,7 @@ const Docs = (props) => {
|
||||
<Menu
|
||||
id="simple-menu"
|
||||
anchorEl={anchorEl}
|
||||
style={{}}
|
||||
keepMounted
|
||||
open={Boolean(anchorEl)}
|
||||
onClose={handleClose}
|
||||
@@ -313,7 +314,7 @@ const Docs = (props) => {
|
||||
const path = "/docs/"+item
|
||||
const newname = item.charAt(0).toUpperCase()+item.substring(1).split("_").join(" ").split("-").join(" ")
|
||||
return (
|
||||
<MenuItem key={index} onClick={() => {window.location.pathname = path}}>{newname}</MenuItem>
|
||||
<MenuItem key={index} style={{color: "white",}} onClick={() => {window.location.pathname = path}}>{newname}</MenuItem>
|
||||
)
|
||||
})}
|
||||
</Menu>
|
||||
|
||||
Reference in New Issue
Block a user