Merge pull request #1356 from Luis-Fernando-Molina/develop

Contribution: Bug fixed Education Project loading last
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-08-01 04:09:43 -04:00
commit 45ba451cf2
3 files changed
+161 -161

No files matched your search

@@ -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",
@@ -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)
}
}
+70 -70
View File
@@ -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": {}
}
]