diff --git a/Projects/Foundations/Schemas/Docs-Topics/A/App/App-Commands-Errors/app-commands-errors-002-app-error-github-credentials-missing.json b/Projects/Foundations/Schemas/Docs-Topics/A/App/App-Commands-Errors/app-commands-errors-002-app-error-github-credentials-missing.json index f2905be87..32ce52fe2 100644 --- a/Projects/Foundations/Schemas/Docs-Topics/A/App/App-Commands-Errors/app-commands-errors-002-app-error-github-credentials-missing.json +++ b/Projects/Foundations/Schemas/Docs-Topics/A/App/App-Commands-Errors/app-commands-errors-002-app-error-github-credentials-missing.json @@ -77,6 +77,10 @@ "style": "List", "text": "App Update Command" }, + { + "style": "List", + "text": "Governance Workspaces" + }, { "style": "Include", "text": "Foundations->Topic->App Contribute Command->Block Authentication", diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index f07ebee7c..43f066723 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -40,104 +40,100 @@ function newGovernanceUserProfileSpace() { if (resultsArary.length === 0) { return } /* Find the Username and Password */ - try { - 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') - UI.projects.education.spaces.docsSpace.sidePanelTab.open() - return - } - if (apisNode.githubAPI === undefined) { - UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing') - UI.projects.education.spaces.docsSpace.sidePanelTab.open() - return + + 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') + UI.projects.education.spaces.docsSpace.sidePanelTab.open() + return + } + if (apisNode.githubAPI === undefined) { + UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing') + UI.projects.education.spaces.docsSpace.sidePanelTab.open() + 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') + UI.projects.education.spaces.docsSpace.sidePanelTab.open() + return + } + if (config.token === undefined || config.token === "") { + UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing') + UI.projects.education.spaces.docsSpace.sidePanelTab.open() + return + } + + + + requestStars() + + function requestStars() { + httpRequest( + undefined, + 'Gov/getGithubStars/' + + 'Superalgos' + '/' + + config.username + '/' + + config.token + , onGithubStarsResponse) + } + + function requestWatchers() { + httpRequest( + undefined, + 'Gov/getGithubWatchers/' + + 'Superalgos' + '/' + + config.username + '/' + + config.token + , onGithubWatchersResponse) + } + + function requestForks() { + httpRequest( + undefined, + 'Gov/getGithubForks/' + + 'Superalgos' + '/' + + config.username + '/' + + config.token + , onGithubForksResponse) + } + + function onGithubStarsResponse(err, githubData) { + //console.log(githubData) + /* Lets check the result of the call through the http interface */ + let githubStarsArray = JSON.parse(githubData) + + for (let i = 0; i < githubStarsArray.length; i++) { + let githubUsername = githubStarsArray[i] + thisObject.githubStars.set(githubUsername, 1) } - 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') - UI.projects.education.spaces.docsSpace.sidePanelTab.open() - return - } - if (config.token === undefined || config.token === "") { - UI.projects.education.spaces.docsSpace.navigateTo('Foundations', 'Topic', 'App Error - Github Credentials Missing', 'Anchor Github Credentials Missing') - UI.projects.education.spaces.docsSpace.sidePanelTab.open() - return + requestWatchers() + } + + function onGithubWatchersResponse(err, githubData) { + //console.log(githubData) + /* Lets check the result of the call through the http interface */ + let githubWatchersArray = JSON.parse(githubData) + + for (let i = 0; i < githubWatchersArray.length; i++) { + let githubUsername = githubWatchersArray[i] + thisObject.githubWatchers.set(githubUsername, 1) } + requestForks() + } + function onGithubForksResponse(err, githubData) { + //console.log(githubData) + /* Lets check the result of the call through the http interface */ + let githubForksArray = JSON.parse(githubData) - requestStars() - - function requestStars() { - httpRequest( - undefined, - 'Gov/getGithubStars/' + - 'Superalgos' + '/' + - config.username + '/' + - config.token - , onGithubStarsResponse) + for (let i = 0; i < githubForksArray.length; i++) { + let githubUsername = githubForksArray[i] + thisObject.githubForks.set(githubUsername, 1) } - - function requestWatchers() { - httpRequest( - undefined, - 'Gov/getGithubWatchers/' + - 'Superalgos' + '/' + - config.username + '/' + - config.token - , onGithubWatchersResponse) - } - - function requestForks() { - httpRequest( - undefined, - 'Gov/getGithubForks/' + - 'Superalgos' + '/' + - config.username + '/' + - config.token - , onGithubForksResponse) - } - - function onGithubStarsResponse(err, githubData) { - //console.log(githubData) - /* Lets check the result of the call through the http interface */ - let githubStarsArray = JSON.parse(githubData) - - for (let i = 0; i < githubStarsArray.length; i++) { - let githubUsername = githubStarsArray[i] - thisObject.githubStars.set(githubUsername, 1) - } - - requestWatchers() - } - - function onGithubWatchersResponse(err, githubData) { - //console.log(githubData) - /* Lets check the result of the call through the http interface */ - let githubWatchersArray = JSON.parse(githubData) - - for (let i = 0; i < githubWatchersArray.length; i++) { - let githubUsername = githubWatchersArray[i] - thisObject.githubWatchers.set(githubUsername, 1) - } - - requestForks() - } - - function onGithubForksResponse(err, githubData) { - //console.log(githubData) - /* Lets check the result of the call through the http interface */ - let githubForksArray = JSON.parse(githubData) - - for (let i = 0; i < githubForksArray.length; i++) { - let githubUsername = githubForksArray[i] - thisObject.githubForks.set(githubUsername, 1) - } - } - - } catch (err) { - console.log(err.stack) } } diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index a64c6178b..f5b0499ae 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -965,6 +965,76 @@ ] } }, + { + "name": "Education", + "propertyName": "education", + "UI": { + "globals": [ + { + "name": "Docs", + "propertyName": "docs", + "functionName": "newEducationGlobalsDocs" + } + ], + "functionLibraries": [], + "utilities": [ + { + "name": "Languages", + "propertyName": "languages", + "functionName": "newEducationUtilitiesLanguages" + }, + { + "name": "Docs", + "propertyName": "docs", + "functionName": "newEducationUtilitiesDocs" + } + ], + "spaces": [ + { + "name": "Docs Space", + "folderName": "Docs-Space", + "propertyName": "docsSpace", + "functionName": "newEducationDocSpace", + "initializationIndex": 0, + "animationPhysicsIndex": 0, + "animationDrawIndex": 0, + "onMouseWheelIndex": 0, + "onMouseOverIndex": 0, + "onMouseClickIndex": 0, + "onMouseDownIndex": 0 + }, + { + "name": "Tutorial Space", + "folderName": "Tutorial-Space", + "propertyName": "tutorialSpace", + "functionName": "newEducationTutorialSpace", + "initializationIndex": 1, + "animationPhysicsIndex": 1, + "animationDrawIndex": 1, + "onMouseWheelIndex": 1, + "onMouseOverIndex": 1, + "onMouseClickIndex": 1, + "onMouseDownIndex": 1 + } + ] + }, + "TS": { + "globals": [], + "functionLibraries": [], + "utilities": [ + { + "name": "Docs Functions", + "propertyName": "docsFunctions", + "functionName": "newEducationUtilitiesDocsFunctions", + "fileName": "DocsFunctions.js" + } + ], + "taskModules": [], + "processModules": [], + "botModules": [] + }, + "CL": {} + }, { "name": "Governance", "propertyName": "governance", @@ -1153,75 +1223,5 @@ "Features", "Positions" ] - }, - { - "name": "Education", - "propertyName": "education", - "UI": { - "globals": [ - { - "name": "Docs", - "propertyName": "docs", - "functionName": "newEducationGlobalsDocs" - } - ], - "functionLibraries": [], - "utilities": [ - { - "name": "Languages", - "propertyName": "languages", - "functionName": "newEducationUtilitiesLanguages" - }, - { - "name": "Docs", - "propertyName": "docs", - "functionName": "newEducationUtilitiesDocs" - } - ], - "spaces": [ - { - "name": "Docs Space", - "folderName": "Docs-Space", - "propertyName": "docsSpace", - "functionName": "newEducationDocSpace", - "initializationIndex": 0, - "animationPhysicsIndex": 0, - "animationDrawIndex": 0, - "onMouseWheelIndex": 0, - "onMouseOverIndex": 0, - "onMouseClickIndex": 0, - "onMouseDownIndex": 0 - }, - { - "name": "Tutorial Space", - "folderName": "Tutorial-Space", - "propertyName": "tutorialSpace", - "functionName": "newEducationTutorialSpace", - "initializationIndex": 1, - "animationPhysicsIndex": 1, - "animationDrawIndex": 1, - "onMouseWheelIndex": 1, - "onMouseOverIndex": 1, - "onMouseClickIndex": 1, - "onMouseDownIndex": 1 - } - ] - }, - "TS": { - "globals": [], - "functionLibraries": [], - "utilities": [ - { - "name": "Docs Functions", - "propertyName": "docsFunctions", - "functionName": "newEducationUtilitiesDocsFunctions", - "fileName": "DocsFunctions.js" - } - ], - "taskModules": [], - "processModules": [], - "botModules": [] - }, - "CL": {} } ] \ No newline at end of file