From b8e031856ce45af65f570481859f7c1af21dadee Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 27 Jul 2021 21:52:53 +0200 Subject: [PATCH] Github Program implemented. Reports still missing. --- .../UI/Spaces/Reports-Space/ReportsSpace.js | 3 +++ .../UI/Spaces/User-Profile-Space/UserProfile.js | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js b/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js index 29a701975..dc95dcf31 100644 --- a/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js +++ b/Projects/Governance/UI/Spaces/Reports-Space/ReportsSpace.js @@ -104,6 +104,9 @@ function newGobernanceReportsSpace() { } function initialize() { + /* + If the workspace is not related to governance, then we exit the Intialize Function + */ let resultsArary = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') if (resultsArary.length === 0) { return } diff --git a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js index 8fa131e74..250d5b8e1 100644 --- a/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js +++ b/Projects/Governance/UI/Spaces/User-Profile-Space/UserProfile.js @@ -33,6 +33,12 @@ function newGovernanceUserProfileSpace() { at the Github Program. */ + /* + If the workspace is not related to governance, then we exit the Intialize Function + */ + let resultsArary = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadsByNodeType('User Profile') + if (resultsArary.length === 0) { return } + /* Find the Username and Password */ let apisNode = UI.projects.foundations.spaces.designSpace.workspace.getHierarchyHeadByNodeType('APIs') if (apisNode === undefined) { @@ -58,7 +64,7 @@ function newGovernanceUserProfileSpace() { return } - requestStars() + requestStars() function requestStars() { httpRequest( @@ -102,7 +108,7 @@ function newGovernanceUserProfileSpace() { requestWatchers() } - + function onGithubWatchersResponse(err, githubData) { //console.log(githubData) /* Lets check the result of the call through the http interface */ @@ -115,7 +121,7 @@ function newGovernanceUserProfileSpace() { requestForks() } - + function onGithubForksResponse(err, githubData) { //console.log(githubData) /* Lets check the result of the call through the http interface */