diff --git a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json index 0c1f7ddbc..4e57860f3 100644 --- a/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json +++ b/Projects/Governance/Plugins/User-Profiles/Luis-Fernando-Molina.json @@ -7535,12 +7535,12 @@ "id": "af09a15d-8328-4339-937e-18fab88321d3", "savedPayload": { "position": { - "x": 8430.64114924828, - "y": 38341.91768925331 + "x": 29191.64114924828, + "y": 25131.91768925331 }, "targetPosition": { - "x": 8580.64114924828, - "y": 38082.110068117974 + "x": 29341.64114924828, + "y": 24872.110068117978 }, "floatingObject": { "isPinned": false, @@ -7566,12 +7566,12 @@ "id": "8e503813-fd88-48fa-af53-ba2df9e714de", "savedPayload": { "position": { - "x": 8580.64114924828, - "y": 38082.110068117974 + "x": 29341.64114924828, + "y": 24872.110068117978 }, "targetPosition": { - "x": 8730.64114924828, - "y": 37822.30244698264 + "x": 29491.64114924828, + "y": 24612.302446982645 }, "floatingObject": { "isPinned": false, @@ -7607,12 +7607,12 @@ "id": "fcc95efc-0523-40f6-bae6-a1860824b961", "savedPayload": { "position": { - "x": 8182.51387466272, - "y": 38066.344432828126 + "x": 28943.51387466272, + "y": 24856.344432828122 }, "targetPosition": { - "x": 8456.5775119555, - "y": 37944.32343990538 + "x": 29217.5775119555, + "y": 24734.323439905384 }, "floatingObject": { "isPinned": false, @@ -7638,12 +7638,12 @@ "id": "4e117bfc-fd6c-41ba-9627-cee37e0b79b1", "savedPayload": { "position": { - "x": 8456.5775119555, - "y": 37944.32343990538 + "x": 29217.5775119555, + "y": 24734.323439905384 }, "targetPosition": { - "x": 8730.64114924828, - "y": 37822.30244698264 + "x": 29491.64114924828, + "y": 24612.302446982645 }, "floatingObject": { "isPinned": false, @@ -7679,12 +7679,12 @@ "id": "9ad43160-b86e-4b87-acc8-140c043b1970", "savedPayload": { "position": { - "x": 8143.752588807997, - "y": 37697.55543249199 + "x": 28904.752588807998, + "y": 24487.55543249199 }, "targetPosition": { - "x": 8437.19686902814, - "y": 37759.928939737314 + "x": 29198.19686902814, + "y": 24549.928939737318 }, "floatingObject": { "isPinned": false, @@ -7710,12 +7710,12 @@ "id": "fdc3d063-ccee-49ee-8dea-cc35f573fca4", "savedPayload": { "position": { - "x": 8437.19686902814, - "y": 37759.928939737314 + "x": 29198.19686902814, + "y": 24549.928939737318 }, "targetPosition": { - "x": 8730.64114924828, - "y": 37822.30244698264 + "x": 29491.64114924828, + "y": 24612.302446982645 }, "floatingObject": { "isPinned": false, @@ -7751,12 +7751,12 @@ "id": "0982ba01-748d-4846-8a96-f59428419fc0", "savedPayload": { "position": { - "x": 8329.162785432964, - "y": 37376.4155516962 + "x": 29090.162785432964, + "y": 24166.41555169621 }, "targetPosition": { - "x": 8529.901967340622, - "y": 37599.35899933942 + "x": 29290.901967340622, + "y": 24389.358999339427 }, "floatingObject": { "isPinned": false, @@ -7782,12 +7782,12 @@ "id": "6491ea8b-52ad-46ea-ad43-1595c663190a", "savedPayload": { "position": { - "x": 8529.901967340622, - "y": 37599.35899933942 + "x": 29290.901967340622, + "y": 24389.358999339427 }, "targetPosition": { - "x": 8730.64114924828, - "y": 37822.30244698264 + "x": 29491.64114924828, + "y": 24612.302446982645 }, "floatingObject": { "isPinned": false, @@ -7810,12 +7810,12 @@ "id": "b856fe5a-4f77-4fad-8c41-1b172b9f01df", "savedPayload": { "position": { - "x": 8730.64114924828, - "y": 37822.30244698264 + "x": 29491.64114924828, + "y": 24612.302446982645 }, "targetPosition": { - "x": 9028.997717858761, - "y": 37790.943908002344 + "x": 29789.99771785876, + "y": 24580.943908002348 }, "floatingObject": { "isPinned": false, @@ -7843,15 +7843,15 @@ "id": "9017ca73-7bbd-4228-a59a-9fb85a130e1a", "savedPayload": { "position": { - "x": 9028.997717858761, - "y": 37790.943908002344 + "x": 29789.99771785876, + "y": 24580.943908002348 }, "targetPosition": { "x": 30088.354286469243, "y": 24549.58536902205 }, "floatingObject": { - "isPinned": true, + "isPinned": false, "isFrozen": false, "isCollapsed": false, "angleToParent": 2, diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 5a6ddaae7..f07ebee7c 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -40,97 +40,104 @@ function newGovernanceUserProfileSpace() { if (resultsArary.length === 0) { return } /* 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') - 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) + 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 } - 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) + 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 } - 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) + 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) + } + + 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) } }