Fixed another python script bug and enabled debugging
This commit is contained in:
@@ -97,6 +97,15 @@ const OrgHeader = (props) => {
|
|||||||
? ""
|
? ""
|
||||||
: selectedOrganization.defaults.notification_workflow
|
: selectedOrganization.defaults.notification_workflow
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const [documentationReference, setDocumentationReference] = React.useState(
|
||||||
|
selectedOrganization.defaults === undefined
|
||||||
|
? ""
|
||||||
|
: selectedOrganization.defaults.documentation_reference === undefined ||
|
||||||
|
selectedOrganization.defaults.documentation_reference.length === 0
|
||||||
|
? ""
|
||||||
|
: selectedOrganization.defaults.documentation_reference
|
||||||
|
);
|
||||||
const [openidClientId, setOpenidClientId] = React.useState(
|
const [openidClientId, setOpenidClientId] = React.useState(
|
||||||
selectedOrganization.sso_config === undefined
|
selectedOrganization.sso_config === undefined
|
||||||
? ""
|
? ""
|
||||||
@@ -245,6 +254,7 @@ const OrgHeader = (props) => {
|
|||||||
workflow_download_repo: workflowDownloadUrl,
|
workflow_download_repo: workflowDownloadUrl,
|
||||||
workflow_download_branch: workflowDownloadBranch,
|
workflow_download_branch: workflowDownloadBranch,
|
||||||
notification_workflow: notificationWorkflow,
|
notification_workflow: notificationWorkflow,
|
||||||
|
documentation_reference: documentationReference,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
sso_entrypoint: ssoEntrypoint,
|
sso_entrypoint: ssoEntrypoint,
|
||||||
@@ -449,6 +459,38 @@ const OrgHeader = (props) => {
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid item xs={12} style={{}}>
|
||||||
|
<span>
|
||||||
|
<Typography>Org Documentation reference</Typography>
|
||||||
|
<TextField
|
||||||
|
required
|
||||||
|
style={{
|
||||||
|
flex: "1",
|
||||||
|
marginTop: "5px",
|
||||||
|
marginRight: "15px",
|
||||||
|
backgroundColor: theme.palette.inputColor,
|
||||||
|
}}
|
||||||
|
fullWidth={true}
|
||||||
|
type="name"
|
||||||
|
id="outlined-with-placeholder"
|
||||||
|
margin="normal"
|
||||||
|
variant="outlined"
|
||||||
|
placeholder="URL to an external reference for this implementation"
|
||||||
|
value={documentationReference}
|
||||||
|
onChange={(e) => {
|
||||||
|
setDocumentationReference(e.target.value);
|
||||||
|
}}
|
||||||
|
InputProps={{
|
||||||
|
classes: {
|
||||||
|
notchedOutline: classes.notchedOutline,
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</Grid>
|
||||||
{isCloud ? null :
|
{isCloud ? null :
|
||||||
<Grid item xs={12} style={{marginTop: 50 }}>
|
<Grid item xs={12} style={{marginTop: 50 }}>
|
||||||
<Typography variant="h4" style={{textAlign: "center",}}>OpenID connect</Typography>
|
<Typography variant="h4" style={{textAlign: "center",}}>OpenID connect</Typography>
|
||||||
|
|||||||
@@ -2744,6 +2744,21 @@ const Admin = (props) => {
|
|||||||
<FileCopyIcon style={{ color: "rgba(255,255,255,0.8)" }} />
|
<FileCopyIcon style={{ color: "rgba(255,255,255,0.8)" }} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
{selectedOrganization.defaults !== undefined && selectedOrganization.defaults.documentation_reference !== undefined && selectedOrganization.defaults.documentation_reference !== null && selectedOrganization.defaults.documentation_reference.includes("http") ?
|
||||||
|
<Tooltip
|
||||||
|
title={"Open Organization Documentation"}
|
||||||
|
style={{ top: -10, right: 50, position: "absolute" }}
|
||||||
|
aria-label={"Open org docs"}
|
||||||
|
>
|
||||||
|
<a href={selectedOrganization.defaults.documentation_reference} target="_blank" style={{ textDecoration: "none", }} rel="noopener noreferrer">
|
||||||
|
<IconButton
|
||||||
|
style={{ top: -10, right: 50, position: "absolute" }}
|
||||||
|
>
|
||||||
|
<DescriptionIcon style={{ color: "rgba(255,255,255,0.8)" }} />
|
||||||
|
</IconButton>
|
||||||
|
</a>
|
||||||
|
</Tooltip>
|
||||||
|
: null}
|
||||||
{selectedOrganization.name.length > 0 ? (
|
{selectedOrganization.name.length > 0 ? (
|
||||||
<OrgHeader
|
<OrgHeader
|
||||||
isCloud={isCloud}
|
isCloud={isCloud}
|
||||||
@@ -2782,6 +2797,7 @@ const Admin = (props) => {
|
|||||||
<a
|
<a
|
||||||
href="https://shuffler.io/docs/organizations#cloud_sync"
|
href="https://shuffler.io/docs/organizations#cloud_sync"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
style={{ textDecoration: "none", color: "#f85a3e" }}
|
style={{ textDecoration: "none", color: "#f85a3e" }}
|
||||||
>
|
>
|
||||||
cloud sync
|
cloud sync
|
||||||
@@ -3423,6 +3439,7 @@ const Admin = (props) => {
|
|||||||
Add, edit, block or change passwords.{" "}
|
Add, edit, block or change passwords.{" "}
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
href="https://shuffler.io/docs/organizations#user_management"
|
href="https://shuffler.io/docs/organizations#user_management"
|
||||||
style={{ textDecoration: "none", color: "#f85a3e" }}
|
style={{ textDecoration: "none", color: "#f85a3e" }}
|
||||||
>
|
>
|
||||||
@@ -3799,6 +3816,7 @@ const Admin = (props) => {
|
|||||||
Files from Workflows.{" "}
|
Files from Workflows.{" "}
|
||||||
<a
|
<a
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
href="https://shuffler.io/docs/organizations#files"
|
href="https://shuffler.io/docs/organizations#files"
|
||||||
style={{ textDecoration: "none", color: "#f85a3e" }}
|
style={{ textDecoration: "none", color: "#f85a3e" }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3712,7 +3712,11 @@ const AppCreator = (defaultprops) => {
|
|||||||
headers += key + "=" + value + "\n";
|
headers += key + "=" + value + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
setActionField("headers", headers.trim());
|
try {
|
||||||
|
setActionField("headers", headers.trim());
|
||||||
|
} catch (e) {
|
||||||
|
console.log("Failed to parse header: ", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (request.body !== undefined && request.body !== null) {
|
if (request.body !== undefined && request.body !== null) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# Created by Shuffle, AS. <frikky@shuffler.io>.
|
# Created by Shuffle, AS. <frikky@shuffler.io>.
|
||||||
# Based on the Slack integration using Webhooks
|
# Based on the Slack integration using Webhooks
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ except Exception as e:
|
|||||||
|
|
||||||
# Global vars
|
# Global vars
|
||||||
|
|
||||||
debug_enabled = False
|
debug_enabled = True
|
||||||
pwd = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
pwd = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
||||||
json_alert = {}
|
json_alert = {}
|
||||||
now = time.strftime("%a %b %d %H:%M:%S %Z %Y")
|
now = time.strftime("%a %b %d %H:%M:%S %Z %Y")
|
||||||
@@ -56,8 +56,8 @@ def main(args):
|
|||||||
debug("# Processing alert")
|
debug("# Processing alert")
|
||||||
try:
|
try:
|
||||||
debug(json_alert)
|
debug(json_alert)
|
||||||
except:
|
except Exception as e:
|
||||||
debug("Failed getting json_alert")
|
debug("Failed getting json_alert %s" % e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
debug("# Generating message")
|
debug("# Generating message")
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ require (
|
|||||||
github.com/docker/go-connections v0.4.0 // indirect
|
github.com/docker/go-connections v0.4.0 // indirect
|
||||||
github.com/mackerelio/go-osstat v0.2.1
|
github.com/mackerelio/go-osstat v0.2.1
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/shuffle/shuffle-shared v0.2.64
|
github.com/shuffle/shuffle-shared v0.2.82
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -792,6 +792,8 @@ github.com/shuffle/shuffle-shared v0.2.63 h1:IF82o5WS4+6wEIirqAd1qEm/pBCuQMbn2CJ
|
|||||||
github.com/shuffle/shuffle-shared v0.2.63/go.mod h1:YuMle0RjwXb3hxR5PdaOOD9e+hUyK34OABS0UbrT/Sk=
|
github.com/shuffle/shuffle-shared v0.2.63/go.mod h1:YuMle0RjwXb3hxR5PdaOOD9e+hUyK34OABS0UbrT/Sk=
|
||||||
github.com/shuffle/shuffle-shared v0.2.64 h1:WpCKiL5tNt7wTJaHkf1zXhjeUB5ltFap1dXgU6ijKq4=
|
github.com/shuffle/shuffle-shared v0.2.64 h1:WpCKiL5tNt7wTJaHkf1zXhjeUB5ltFap1dXgU6ijKq4=
|
||||||
github.com/shuffle/shuffle-shared v0.2.64/go.mod h1:YuMle0RjwXb3hxR5PdaOOD9e+hUyK34OABS0UbrT/Sk=
|
github.com/shuffle/shuffle-shared v0.2.64/go.mod h1:YuMle0RjwXb3hxR5PdaOOD9e+hUyK34OABS0UbrT/Sk=
|
||||||
|
github.com/shuffle/shuffle-shared v0.2.82 h1:V3bYw7MxHPQgydUuWLGHONpX7NwbRPPAALovKqsdaW0=
|
||||||
|
github.com/shuffle/shuffle-shared v0.2.82/go.mod h1:YuMle0RjwXb3hxR5PdaOOD9e+hUyK34OABS0UbrT/Sk=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||||
|
|||||||
@@ -834,6 +834,18 @@ func checkSwarmService(ctx context.Context) {
|
|||||||
|
|
||||||
// Initial loop etc
|
// Initial loop etc
|
||||||
func main() {
|
func main() {
|
||||||
|
startupDelay := os.Getenv("SHUFFLE_ORBORUS_STARTUP_DELAY")
|
||||||
|
if len(startupDelay) > 0 {
|
||||||
|
log.Printf("[DEBUG] Setting startup delay to %#v", startupDelay)
|
||||||
|
|
||||||
|
tmpInt, err := strconv.Atoi(startupDelay)
|
||||||
|
if err == nil {
|
||||||
|
time.Sleep(time.Duration(tmpInt) * time.Second)
|
||||||
|
} else {
|
||||||
|
log.Printf("[WARNING] Env SHUFFLE_ORBORUS_STARTUP_DELAY must be a number, not %s", startupDelay)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.Println("[INFO] Setting up execution environment")
|
log.Println("[INFO] Setting up execution environment")
|
||||||
|
|
||||||
//FIXME
|
//FIXME
|
||||||
|
|||||||
Reference in New Issue
Block a user