(try resolving errors)

This commit is contained in:
gitforkgit committed 2021-10-26 12:33:37 +02:00
commit 095dc5f462
18 files changed
+5850 -2800

No files matched your search

+166
View File
@@ -862,6 +862,172 @@ exports.newHttpInterface = function newHttpInterface() {
break
}
case 'UserUpdate': {
try {
let commitMessage = unescape(requestPath[3])
const username = unescape(requestPath[4])
const token = unescape(requestPath[5])
const currentBranch = unescape(requestPath[6])
const contributionsBranch = unescape(requestPath[7])
let error
/* Unsaving # */
for (let i = 0; i < 10; i++) {
commitMessage = commitMessage.replace('_SLASH_', '/')
commitMessage = commitMessage.replace('_HASHTAG_', '#')
}
updateUser()
async function updateUser() {
await doGithub()
if (error !== undefined) {
let docs = {
project: 'Foundations',
category: 'Topic',
type: 'App Error - Contribution Not Sent',
anchor: undefined,
placeholder: {}
}
console.log('respond with docs ')
respondWithDocsObject(docs, error)
return
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(global.DEFAULT_OK_RESPONSE), httpResponse)
}
async function doGithub() {
const { Octokit } = SA.nodeModules.octokit
const octokit = new Octokit({
auth: token,
userAgent: 'Superalgos Beta 12'
})
const repo = 'Superalgos'
const owner = 'Superalgos'
const head = username + ':' + contributionsBranch
const base = currentBranch
const title = 'Contribution: ' + commitMessage
const path = 'Projects/Governance/Plugins/User-Profiles/' + username + '.json' ;
const sha = await getSHA(path, octokit);
let file = await SA.projects.communityPlugins.utilities.plugins.getPluginFileContent(
'Governance',
'User-Profiles',
username + '.json'
)
let buff = new Buffer.from(file, 'utf-8');
let encodedFile = buff.toString('base64');
try {
await octokit.repos.createOrUpdateFileContents({
owner: username,
repo: "Superalgos",
path,
message: title,
content: encodedFile,
sha,
branch: base
});
} catch (err) {
if (err.stack.indexOf('Error User Commit') >= 0) {
return
} else {
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> Method call produced an error.')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> err.stack = ' + err.stack)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> commitMessage = ' + commitMessage)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> username = ' + username)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token ends with = ' + '...' + token.substring(token.length - 10))
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> currentBranch = ' + currentBranch)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> contributionsBranch = ' + contributionsBranch)
error = err
}
}
try {
await octokit.pulls.create({
owner,
repo,
title,
head,
base,
});
} catch (err) {
if (err.stack.indexOf('A pull request already exists') >= 0) {
return
} else {
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> Method call produced an error.')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> err.stack = ' + err.stack)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> commitMessage = ' + commitMessage)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> username = ' + username)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token ends with = ' + '...' + token.substring(token.length - 10))
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> currentBranch = ' + currentBranch)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> contributionsBranch = ' + contributionsBranch)
error = err
}
}
}
async function getSHA(path, octokit) {
let sha = ''
try{
const result = await octokit.repos.getContent({
owner: username,
repo: "Superalgos",
path,
ref: currentBranch
});
sha = result.data.sha
return sha
} catch (err) {
if (err.message === 'Not Found') {
console.log("[User Not Found] -> Creating new user")
return sha
} else {
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> Method call produced an error.')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> err.stack = ' + err.stack)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> commitMessage = ' + commitMessage)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> username = ' + username)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> token ends with = ' + '...' + token.substring(token.length - 10))
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> currentBranch = ' + currentBranch)
console.log('[ERROR] httpInterface -> App -> Contribute -> doGithub -> contributionsBranch = ' + contributionsBranch)
return sha
}
}
}
} catch (err) {
console.log('[ERROR] httpInterface -> App -> Contribute -> Method call produced an error.')
console.log('[ERROR] httpInterface -> App -> Contribute -> err.stack = ' + err.stack)
console.log('[ERROR] httpInterface -> App -> Contribute -> commitMessage = ' + commitMessage)
console.log('[ERROR] httpInterface -> App -> Contribute -> username = ' + username)
console.log('[ERROR] httpInterface -> App -> Contribute -> token starts with = ' + token.substring(0, 10) + '...')
console.log('[ERROR] httpInterface -> App -> Contribute -> token ends with = ' + '...' + token.substring(token.length - 10))
console.log('[ERROR] httpInterface -> App -> Contribute -> currentBranch = ' + currentBranch)
console.log('[ERROR] httpInterface -> App -> Contribute -> contributionsBranch = ' + contributionsBranch)
let error = {
result: 'Fail Because',
message: err.message,
stack: err.stack
}
SA.projects.foundations.utilities.httpResponses.respondWithContent(JSON.stringify(error), httpResponse)
}
break
}
case 'Checkout': {
try {
const currentBranch = unescape(requestPath[3])
@@ -0,0 +1,238 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="96 11 512 512"
style="enable-background:new 96 11 512 512;"
xml:space="preserve"
sodipodi:docname="disable-saving-with-workspace.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="E:\Superalgos\Projects\Community-Plugins\Icons\disable-saving-with-workspace.png"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100"><metadata
id="metadata33"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs31" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview29"
showgrid="false"
inkscape:zoom="0.83007813"
inkscape:cx="52.865353"
inkscape:cy="305.68259"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" />
<style
type="text/css"
id="style2">
.st0{fill:#FFD1A9;}
.st1{fill:none;stroke:#4ACFD9;stroke-width:26;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:#9BAAAB;}
.st3{fill:#FD6A33;}
.st4{fill:#FF8C29;}
.st5{fill:#4ACFD9;}
.st6{fill:#0295AA;}
.st7{fill:#365558;}
</style>
<path
class="st0"
d="M96.1,171.9c0-7.9,6.5-14.3,14.3-14.3h81.1c7.9,0,14.3,6.5,14.3,14.3c0,0,0-0.8,0,9c0,9.9,3.5,17.5,17.5,17.5 c14,0,342.8,0,342.8,0c7.9,0,14.3,6.5,14.3,14.3v295.9c0,7.9-6.5,14.3-14.3,14.3H110.3c-7.9,0-14.3-6.5-14.3-14.3V171.9"
id="path4" />
<path
class="st1"
d="M343.9,420.5c20.9-31.3,49-71.2,43.7-111.6s-27.5-66.7-21-101.9"
id="path6" />
<circle
class="st2"
cx="366.7"
cy="206.9"
r="27.9"
id="circle8" />
<path
class="st3"
d="M384.9,86.3l-0.1-54.4c0-2.8,2.3-5.2,5.2-5.2h2.6c2.8,0,5.2,2.3,5.2,5.2v54.3c0,2.8-2.3,5.2-5.2,5.2H390 C387.2,91.4,384.9,89.1,384.9,86.3z"
id="path10" />
<path
class="st4"
d="M359.2,75.8V21.5c0-2.8,2.3-5.2,5.2-5.2h2.6c2.8,0,5.2,2.3,5.2,5.2v54.3c0,2.8-2.3,5.2-5.2,5.2h-2.6 C361.5,80.9,359.2,78.6,359.2,75.8z"
id="path12" />
<path
class="st3"
d="M342.4,85l-0.1-51.8c0-3.5-2.9-6.5-6.5-6.5l0,0c-3.5,0-6.5,2.9-6.5,6.5v51.7c0,3.5,2.9,6.5,6.5,6.5l0,0 C339.6,91.4,342.4,88.5,342.4,85z"
id="path14" />
<path
class="st5"
d="M414.7,206.1c12.7,0,23.1-10.4,23.1-23.1v-64.6c0-12.7-10.4-23.1-23.1-23.1h-49.8v110.8H414.7z"
id="path16" />
<path
class="st6"
d="M291.9,118.4V183c0,12.7,10.4,23.1,23.1,23.1l49.8,0l0-110.8H315C302.3,95.3,291.9,105.6,291.9,118.4z"
id="path18" />
<path
class="st6"
d="M398,106.4c6,0,11.1-5,11.1-11.1V86c0-6-5-11.1-11.1-11.1h-33.3v31.4L398,106.4z"
id="path20" />
<path
class="st7"
d="M320.5,86v9.3c0,6,5,11.1,11.1,11.1h33.3V75h-33.3C325.5,75,320.5,79.9,320.5,86z"
id="path22" />
<path
class="st4"
d="M564.9,523H109.2c-7.9,0-13.2-6.5-11.8-14.3l26.1-147.9c1.4-7.9,8.9-14.3,16.8-14.3H596 c7.9,0,13.2,6.5,11.8,14.3l-26.1,147.9C580.4,516.5,572.8,523,564.9,523z"
id="path24" />
<path
class="st7"
d="M123.3,505.4c-1.9,0-3.5-0.7-4.6-2c-1.1-1.4-1.5-3.3-1.2-5.4l1.3-6.9c1.8-5.4,5.6-9.5,8.2-9.5h434.8 c1.9,0,3.5,0.7,4.6,2c1.1,1.4,1.5,3.3,1.2,5.4l-1.3,6.9c-0.8,5.1-4.6,9.5-9.4,9.5H123.3z"
id="path26" />
<g
id="g938"><rect
x="-517.32117"
y="-7.1964717"
class="st1"
width="128"
height="128"
id="rect14"
style="fill:#f0353d" /><rect
x="-389.32117"
y="-7.1964717"
class="st2"
width="128"
height="128"
id="rect16"
style="fill:#fd6a33" /><rect
x="-261.32117"
y="-7.1964717"
class="st3"
width="128"
height="128"
id="rect18"
style="fill:#ff8c29" /><rect
x="-133.32117"
y="-7.1964717"
class="st4"
width="128"
height="128"
id="rect20"
style="fill:#ffd1a9" /><rect
x="-517.32117"
y="120.80353"
class="st5"
width="128"
height="128"
id="rect22"
style="fill:#365558" /><rect
x="-389.32117"
y="120.80353"
class="st6"
width="128"
height="128"
id="rect24"
style="fill:#0295aa" /><rect
x="-261.32117"
y="120.80353"
class="st7"
width="128"
height="128"
id="rect26"
style="fill:#4acfd9" /><rect
x="-517.32117"
y="248.80353"
class="st8"
width="128"
height="128"
id="rect28"
style="fill:#9baaab" /><rect
x="-389.32117"
y="248.80353"
class="st9"
width="128"
height="128"
id="rect30"
style="fill:#cdd4d5" /><rect
x="-261.32117"
y="248.80353"
class="st10"
width="128"
height="128"
id="rect32"
style="fill:#e6eaea" /><rect
x="-133.32117"
y="248.80353"
class="st11"
width="128"
height="128"
id="rect34"
style="fill:#ffffff" /><rect
x="-517.32117"
y="376.80353"
class="st12"
width="128"
height="128"
id="rect36"
style="fill:#bcd643" /></g><g
id="g969"
transform="matrix(0.77038955,0,0,0.77038955,-261.71998,171.77067)"><path
id="rect948"
style="opacity:1;fill:#365558;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
d="m 706.00706,-16.708235 h 302.55714 c 20.2631,0.223428 36.757,16.39992772 61.4379,41.427977 35.2757,35.77189 40.8092,44.366126 41.005,64.415093 V 388.29176 c 0,24.93 -20.07,45 -45,45 H 706.00706 c -24.93,0 -45,-20.07 -45,-45 V 28.291765 c 0,-24.9300003 20.07,-45 45,-45 z"
sodipodi:nodetypes="scscssssss" /><rect
style="opacity:1;fill:#e6eaea;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect959"
width="349.36472"
height="210.82353"
x="711.60474"
y="207.36705" /><rect
style="opacity:1;fill:#0295aa;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect953"
width="260.21646"
height="161.43059"
x="747.74591"
y="-1.0470586"
rx="20"
ry="20" /><rect
style="opacity:1;fill:#e6eaea;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect963"
width="53.007057"
height="119.26588"
x="920.01886"
y="20.637648" /></g><g
id="g1017"
transform="translate(132.693,140.52896)"><rect
style="opacity:1;fill:#f0353d;fill-opacity:1;stroke-width:10.9366;stroke-linejoin:round"
id="rect991"
width="101.24419"
height="377.13632"
x="291.71393"
y="-248.67224"
rx="19.248959"
ry="25.844498"
transform="rotate(45)" /><rect
style="opacity:1;fill:#f0353d;fill-opacity:1;stroke-width:10.9366;stroke-linejoin:round"
id="rect991-3"
width="101.24419"
height="377.13632"
x="-110.72624"
y="-530.90424"
rx="19.248959"
ry="25.844498"
transform="rotate(135)" /></g></svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="96 11 512 512"
style="enable-background:new 96 11 512 512;"
xml:space="preserve"
sodipodi:docname="enable-saving-with-workspace.svg"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:export-filename="E:\Superalgos\Projects\Community-Plugins\Icons\enable-saving-with-workspace.png"
inkscape:export-xdpi="100"
inkscape:export-ydpi="100"><metadata
id="metadata33"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs31" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1017"
id="namedview29"
showgrid="false"
inkscape:zoom="0.83007813"
inkscape:cx="52.865353"
inkscape:cy="305.68259"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
inkscape:document-rotation="0" />
<style
type="text/css"
id="style2">
.st0{fill:#FFD1A9;}
.st1{fill:none;stroke:#4ACFD9;stroke-width:26;stroke-linecap:round;stroke-miterlimit:10;}
.st2{fill:#9BAAAB;}
.st3{fill:#FD6A33;}
.st4{fill:#FF8C29;}
.st5{fill:#4ACFD9;}
.st6{fill:#0295AA;}
.st7{fill:#365558;}
</style>
<path
class="st0"
d="M96.1,171.9c0-7.9,6.5-14.3,14.3-14.3h81.1c7.9,0,14.3,6.5,14.3,14.3c0,0,0-0.8,0,9c0,9.9,3.5,17.5,17.5,17.5 c14,0,342.8,0,342.8,0c7.9,0,14.3,6.5,14.3,14.3v295.9c0,7.9-6.5,14.3-14.3,14.3H110.3c-7.9,0-14.3-6.5-14.3-14.3V171.9"
id="path4" />
<path
class="st1"
d="M343.9,420.5c20.9-31.3,49-71.2,43.7-111.6s-27.5-66.7-21-101.9"
id="path6" />
<circle
class="st2"
cx="366.7"
cy="206.9"
r="27.9"
id="circle8" />
<path
class="st3"
d="M384.9,86.3l-0.1-54.4c0-2.8,2.3-5.2,5.2-5.2h2.6c2.8,0,5.2,2.3,5.2,5.2v54.3c0,2.8-2.3,5.2-5.2,5.2H390 C387.2,91.4,384.9,89.1,384.9,86.3z"
id="path10" />
<path
class="st4"
d="M359.2,75.8V21.5c0-2.8,2.3-5.2,5.2-5.2h2.6c2.8,0,5.2,2.3,5.2,5.2v54.3c0,2.8-2.3,5.2-5.2,5.2h-2.6 C361.5,80.9,359.2,78.6,359.2,75.8z"
id="path12" />
<path
class="st3"
d="M342.4,85l-0.1-51.8c0-3.5-2.9-6.5-6.5-6.5l0,0c-3.5,0-6.5,2.9-6.5,6.5v51.7c0,3.5,2.9,6.5,6.5,6.5l0,0 C339.6,91.4,342.4,88.5,342.4,85z"
id="path14" />
<path
class="st5"
d="M414.7,206.1c12.7,0,23.1-10.4,23.1-23.1v-64.6c0-12.7-10.4-23.1-23.1-23.1h-49.8v110.8H414.7z"
id="path16" />
<path
class="st6"
d="M291.9,118.4V183c0,12.7,10.4,23.1,23.1,23.1l49.8,0l0-110.8H315C302.3,95.3,291.9,105.6,291.9,118.4z"
id="path18" />
<path
class="st6"
d="M398,106.4c6,0,11.1-5,11.1-11.1V86c0-6-5-11.1-11.1-11.1h-33.3v31.4L398,106.4z"
id="path20" />
<path
class="st7"
d="M320.5,86v9.3c0,6,5,11.1,11.1,11.1h33.3V75h-33.3C325.5,75,320.5,79.9,320.5,86z"
id="path22" />
<path
class="st4"
d="M564.9,523H109.2c-7.9,0-13.2-6.5-11.8-14.3l26.1-147.9c1.4-7.9,8.9-14.3,16.8-14.3H596 c7.9,0,13.2,6.5,11.8,14.3l-26.1,147.9C580.4,516.5,572.8,523,564.9,523z"
id="path24" />
<path
class="st7"
d="M123.3,505.4c-1.9,0-3.5-0.7-4.6-2c-1.1-1.4-1.5-3.3-1.2-5.4l1.3-6.9c1.8-5.4,5.6-9.5,8.2-9.5h434.8 c1.9,0,3.5,0.7,4.6,2c1.1,1.4,1.5,3.3,1.2,5.4l-1.3,6.9c-0.8,5.1-4.6,9.5-9.4,9.5H123.3z"
id="path26" />
<g
id="g938"><rect
x="-517.32117"
y="-7.1964717"
class="st1"
width="128"
height="128"
id="rect14"
style="fill:#f0353d" /><rect
x="-389.32117"
y="-7.1964717"
class="st2"
width="128"
height="128"
id="rect16"
style="fill:#fd6a33" /><rect
x="-261.32117"
y="-7.1964717"
class="st3"
width="128"
height="128"
id="rect18"
style="fill:#ff8c29" /><rect
x="-133.32117"
y="-7.1964717"
class="st4"
width="128"
height="128"
id="rect20"
style="fill:#ffd1a9" /><rect
x="-517.32117"
y="120.80353"
class="st5"
width="128"
height="128"
id="rect22"
style="fill:#365558" /><rect
x="-389.32117"
y="120.80353"
class="st6"
width="128"
height="128"
id="rect24"
style="fill:#0295aa" /><rect
x="-261.32117"
y="120.80353"
class="st7"
width="128"
height="128"
id="rect26"
style="fill:#4acfd9" /><rect
x="-517.32117"
y="248.80353"
class="st8"
width="128"
height="128"
id="rect28"
style="fill:#9baaab" /><rect
x="-389.32117"
y="248.80353"
class="st9"
width="128"
height="128"
id="rect30"
style="fill:#cdd4d5" /><rect
x="-261.32117"
y="248.80353"
class="st10"
width="128"
height="128"
id="rect32"
style="fill:#e6eaea" /><rect
x="-133.32117"
y="248.80353"
class="st11"
width="128"
height="128"
id="rect34"
style="fill:#ffffff" /><rect
x="-517.32117"
y="376.80353"
class="st12"
width="128"
height="128"
id="rect36"
style="fill:#bcd643" /></g><g
id="g969"
transform="matrix(0.77038955,0,0,0.77038955,-261.71998,171.77067)"><path
id="rect948"
style="opacity:1;fill:#365558;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
d="m 706.00706,-16.708235 h 302.55714 c 20.2631,0.223428 36.757,16.39992772 61.4379,41.427977 35.2757,35.77189 40.8092,44.366126 41.005,64.415093 V 388.29176 c 0,24.93 -20.07,45 -45,45 H 706.00706 c -24.93,0 -45,-20.07 -45,-45 V 28.291765 c 0,-24.9300003 20.07,-45 45,-45 z"
sodipodi:nodetypes="scscssssss" /><rect
style="opacity:1;fill:#e6eaea;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect959"
width="349.36472"
height="210.82353"
x="711.60474"
y="207.36705" /><rect
style="opacity:1;fill:#0295aa;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect953"
width="260.21646"
height="161.43059"
x="747.74591"
y="-1.0470586"
rx="20"
ry="20" /><rect
style="opacity:1;fill:#e6eaea;fill-opacity:1;stroke-width:10;stroke-linejoin:round"
id="rect963"
width="53.007057"
height="119.26588"
x="920.01886"
y="20.637648" /></g><path
id="rect989"
style="opacity:1;fill:#bcd643;fill-opacity:1;stroke-width:8.16418;stroke-linejoin:round"
d="m 549.56859,244.40334 c -6.03717,-6.03718 -16.85955,-4.93428 -24.26623,2.4724 L 383.81719,388.36091 318.96535,323.50907 c -6.75261,-6.75261 -17.06733,-7.31168 -23.12622,-1.25278 l -36.09859,36.09858 c -6.05888,6.05888 -5.49982,16.37361 1.25279,23.12623 l 109.97976,109.97975 c 6.75261,6.75262 17.06735,7.31168 23.12623,1.25279 l 20.16509,-20.16509 15.93349,-15.93349 152.4219,-152.42189 c 7.40666,-7.40667 8.50846,-18.23016 2.47129,-24.26733 z" /></svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -23,15 +23,15 @@
"action": "Enable Saving With Workspace",
"actionFunction": "payload.executeAction",
"label": "Enable Saving With Workspace",
"relatedUiObject": "Plugin File",
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
{
"action": "Disable Saving With Workspace",
"actionFunction": "payload.executeAction",
"label": "Disable Saving With Workspace",
"relatedUiObject": "Plugin File",
"workDoneLabel": "Enabled",
"secondaryAction": "Disable Saving With Workspace",
"secondaryLabel": "Disable Saving With Workspace",
"secondaryWorkDoneLabel": "Disabled",
"secondaryIcon": "disable-saving-with-workspace",
"booleanProperty": "saveWithWorkspace",
"iconPathOn": "enable-saving-with-workspace",
"iconPathOff": "enable-saving-with-workspace",
"iconProject": "Community-Plugins",
"actionProject": "Community-Plugins",
"relatedUiObjectProject": "Community-Plugins"
},
@@ -80,12 +80,12 @@ function newCommunityPluginsActionSwitch() {
break
case 'Enable Saving With Workspace':
{
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.enableSavingWithWorkspace(action.node, action.rootNodes)
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.enableSavingWithWorkspace(action.node, action.rootNodes, action.callBackFunction)
}
break
case 'Disable Saving With Workspace':
{
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.disableSavingWithWorkspace(action.node, action.rootNodes)
UI.projects.communityPlugins.functionLibraries.pluginsFunctions.disableSavingWithWorkspace(action.node, action.rootNodes, action.callBackFunction)
}
break
case 'Save Plugin':
@@ -193,14 +193,16 @@ function newPluginsFunctionLibraryPluginsFunctions() {
}
}
function enableSavingWithWorkspace(node, rootNodes) {
function enableSavingWithWorkspace(node, rootNodes, callBackFunction) {
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', true)
node.payload.uiObject.setInfoMessage('Saving with Workspace Enabled')
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE)
}
function disableSavingWithWorkspace(node, rootNodes) {
function disableSavingWithWorkspace(node, rootNodes, callBackFunction) {
UI.projects.visualScripting.utilities.nodeConfig.saveConfigProperty(node.payload, 'saveWithWorkspace', false)
node.payload.uiObject.setInfoMessage('Saving with Workspace Disabled')
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE)
}
function savePlugin(node, rootNodes) {
@@ -0,0 +1,14 @@
function newEducationFunctionLibraryDocsStats() {
let thisObject = {
printDocsStats: printDocsStats
}
return thisObject
function printDocsStats(
node,
rootNodes
) {
console.log("this is our docs stats")
}
}
@@ -26,6 +26,7 @@ function newFoundationsDocsCommmandInterface() {
function detectAppCommands() {
if (checkContributeCommand() === undefined) { return true }
if (checkUserUpdateCommand() === undefined) { return true }
if (checkUpdateCommand() === undefined) { return true }
if (fixAppSchema() === undefined) { return true }
@@ -98,6 +99,75 @@ function newFoundationsDocsCommmandInterface() {
}
}
function checkUserUpdateCommand() {
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.userupdate') {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Userupdate Command')
return
}
if (UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('App.UserUpdate') !== 0 && UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf('app.userupdate') !== 0) { return 'Not Contribute Commands' }
/* Set up the commit message */
let message = UI.projects.education.spaces.docsSpace.commandInterface.command.trim().substring(UI.projects.education.spaces.docsSpace.commandInterface.command.indexOf(' ') + 1, UI.projects.education.spaces.docsSpace.commandInterface.command.length)
if (message.toLowerCase() === 'app.userupdate') {
message = 'This is my UserUpdate to Superalgos'
}
/* Find the Username and Password */
let apisNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs')
if (apisNode === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
if (apisNode.githubAPI === undefined) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
let config = JSON.parse(apisNode.githubAPI.config)
if (config.username === undefined || config.username === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
if (config.token === undefined || config.token === "") {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing')
return
}
message = message.replaceAll('#', '_HASHTAG_')
message = message.replaceAll('/', '_SLASH_')
httpRequest(
undefined,
'App/UserUpdate/' +
message + '/' +
config.username + '/' +
config.token + '/' +
UI.projects.education.spaces.docsSpace.currentBranch + '/' +
UI.projects.education.spaces.docsSpace.contributionsBranch
, onResponse)
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Message - UserUpdate Request')
return
function onResponse(err, data) {
/* Lets check the result of the call through the http interface */
data = JSON.parse(data)
if (err.result === GLOBAL.DEFAULT_OK_RESPONSE.result && data.result === GLOBAL.DEFAULT_OK_RESPONSE.result) {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Message - UserUpdate Done')
} else {
UI.projects.education.spaces.docsSpace.navigateTo(
data.docs.project,
data.docs.category,
data.docs.type,
data.docs.anchor,
undefined,
data.docs.placeholder
)
}
}
}
function checkUpdateCommand() {
if (UI.projects.education.spaces.docsSpace.commandInterface.command.toLowerCase() === 'app.help app.update') {
UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Update Command')
@@ -26,7 +26,7 @@
"label": "Add Move To Phase Event",
"relatedUiObject": "Move To Phase Event",
"actionFunction": "payload.executeAction",
"relatedUiObjectProject": "Social-Bots",
"relatedUiObjectProject": "Foundations",
"actionProject": "Visual-Scripting"
},
{
@@ -504,27 +504,13 @@
},
{
"style": "List",
"text": "Step #18: At your Data Mine, set up an Indicator Bot and configure its Process Definition nodes to the framework that will convert from One-Min-Daily to Multi-Time-Frame-Daily and Multi-Perio-Market types of Datasets. See how it was done at the UI #1.",
"updated": 1622232795794,
"translations": [
{
"language": "DE",
"text": "Schritt #18: Richten Sie in Ihrer Data Mine einen Indicator Bot ein und konfigurieren Sie seine Process Definition nodes für das Framework, das Datensätze von One-Min-Daily zu Multi-Time-Frame-Daily und Multi-Perio-Market konvertiert. Sehen Sie sich an, wie das in der UI #1 gemacht wurde.",
"updated": 1635189302088
}
]
"text": "Step #18: At your Data Mine, set up an Indicator Bot and configure its Process Definition nodes to the framework that will convert from One-Min-Daily to Multi-Time-Frame-Daily and Multi-Period-Market types of Datasets. See how it was done at the UI #1.",
"updated": 1635193955563
},
{
"style": "List",
"text": "Step #19: At this Dataset Type Converter Indicator Bot, defined the Record Property nodes based on the information you would like to convert from Raw Data. Add a begin and end Record Property even if it does not exist at the Raw Data.",
"translations": [
{
"language": "DE",
"text": "Schritt #19: At this Dataset Type Converter Indicator Bot, defined the Record Property nodes based on the information you would lile to convert from Raw Data. Add a begin and end Record Property even if it does not exist at the Raw Data.",
"updated": 1635189922085
}
],
"updated": 1635189527449
"text": "Step #19: Within the Indicator Bot you just added, define the Record Property nodes based on the information you would like to convert from Raw Data. Make sure you add a begin and end Record Property even if it does not exist at the Raw Data in order for the indicator bot to run correctly.",
"updated": 1635194170557
},
{
"style": "List",
@@ -70,6 +70,7 @@ function newCircularMenu() {
menuItem.secondaryWorkDoneLabel = menuItemInitialValue.secondaryWorkDoneLabel
menuItem.secondaryWorkFailedLabel = menuItemInitialValue.secondaryWorkFailedLabel
menuItem.secondaryIcon = menuItemInitialValue.secondaryIcon
menuItem.booleanProperty = menuItemInitialValue.booleanProperty
menuItem.visible = menuItemInitialValue.visible
menuItem.iconPathOn = menuItemInitialValue.iconPathOn
menuItem.iconPathOff = menuItemInitialValue.iconPathOff
@@ -28,6 +28,7 @@ function newCircularMenuItem() {
secondaryWorkDoneLabel: undefined,
secondaryWorkFailedLabel: undefined,
secondaryIcon: undefined,
booleanProperty: undefined,
nextAction: undefined,
visible: false,
iconPathOn: undefined,
@@ -121,7 +122,18 @@ function newCircularMenuItem() {
containerPhysics()
thisObject.nextAction = thisObject.action
if(thisObject.booleanProperty !== undefined) {
let config = JSON.parse(thisObject.payload.node.config)
if (config[thisObject.booleanProperty] === true) {
thisObject.nextAction = thisObject.secondaryAction
setStatus(thisObject.secondaryLabel, defaultBackgroudColor, undefined, STATUS_PRIMARY_WORK_DONE)
} else {
thisObject.nextAction = thisObject.action
}
} else {
thisObject.nextAction = thisObject.action
}
}
function getContainer(point) {
@@ -265,8 +277,13 @@ function newCircularMenuItem() {
temporaryStatus === STATUS_SECONDARY_WORK_FAILED
) && thisObject.secondaryAction !== undefined
) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
if(thisObject.iconProject !== undefined) {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(thisObject.iconProject, thisObject.secondaryIcon)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName(thisObject.iconProject, thisObject.secondaryIcon)
} else {
thisObject.iconOn = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
thisObject.iconOff = UI.projects.foundations.spaces.designSpace.getIconByProjectAndName('Foundations', thisObject.secondaryIcon)
}
} else {
/*
@@ -676,7 +676,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -701,7 +701,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1064,7 +1064,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -136,7 +136,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -886,7 +886,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 2,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -1729,7 +1729,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
@@ -2911,7 +2911,7 @@
"floatingObject": {
"isPinned": false,
"isFrozen": false,
"isCollapsed": false,
"isCollapsed": true,
"angleToParent": 1,
"distanceToParent": 3,
"arrangementStyle": 0
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -1084,7 +1084,13 @@
"functionName": "newEducationGlobalsDocs"
}
],
"functionLibraries": [],
"functionLibraries": [
{
"name": "Docs Statistics Functions",
"propertyName": "docsStatisticsFunctions",
"functionName": "newEducationFunctionLibraryDocsStats"
}
],
"utilities": [
{
"name": "Languages",