From 4809182989f87fa77402dee37872b9d74dfab266 Mon Sep 17 00:00:00 2001 From: Durgesh1988 Date: Fri, 20 Jan 2017 14:31:58 +0530 Subject: [PATCH] Change routes files in settings for customer --- .../cloud-formation-blueprint.js | 4 - server/app/routes/v1.0/routes.js | 3 + server/app/routes/v1.0/routes_d4dMasters.js | 85 ++++++++++++++++++- 3 files changed, 86 insertions(+), 6 deletions(-) diff --git a/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js b/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js index e27df5516..7b85924f1 100755 --- a/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js +++ b/server/app/model/blueprint/blueprint-types/cloud-formation-blueprint/cloud-formation-blueprint.js @@ -549,10 +549,6 @@ CloudFormationBlueprintSchema.methods.launch = function (launchParams, callback) } }); if (nodeIdWithActionLogId.length === instances.length && launchParams.auditTrailId !== null) { - var nodeIds = []; - for(var i = 0; i < nodeIdWithActionLogId.length;i++){ - nodeIds.push(nodeIdWithActionLogId[i].nodeId); - } var resultTaskExecution = { "actionLogId": logsReferenceIds[1], "auditTrailConfig.nodeIdsWithActionLog": nodeIdWithActionLogId, diff --git a/server/app/routes/v1.0/routes.js b/server/app/routes/v1.0/routes.js index 37bcc1fc0..425ed8790 100755 --- a/server/app/routes/v1.0/routes.js +++ b/server/app/routes/v1.0/routes.js @@ -77,6 +77,7 @@ var configData = require('./routes_config_data'); var monitors = require('./routes_monitors'); var bots = require('./routes_bots'); var gitHub = require('./routes_github'); +var routesCICD = require('./routes_d4dMastersCICD'); /* * @TODO * Change app to router in internal routes files @@ -193,6 +194,8 @@ module.exports.setRoutes = function(app) { gitHub.setRoutes(app, sessionVerificationFunc); + routesCICD.setRoutes(app, sessionVerificationFunc); + app.get('/', function(req, res) { res.redirect('/cat3'); diff --git a/server/app/routes/v1.0/routes_d4dMasters.js b/server/app/routes/v1.0/routes_d4dMasters.js index 14f98e52c..3e4b6b749 100755 --- a/server/app/routes/v1.0/routes_d4dMasters.js +++ b/server/app/routes/v1.0/routes_d4dMasters.js @@ -810,7 +810,48 @@ module.exports.setRoutes = function (app, sessionVerification) { return; }); - } else if (req.params.id === '6') { + } else if (req.params.id === '27') { + // For BitBucket + masterUtil.getBitbucket(orgList, function(err, bitbucketList) { + if (err) { + res.status(500).send('Not able to fetch Bitbucket.'); + } + res.send(bitbucketList); + return; + }); + + } else if (req.params.id === '28') { + // For Octopus + masterUtil.getOctopus(orgList, function(err, octopusList) { + if (err) { + res.status(500).send('Not able to fetch Octopus.'); + } + res.send(octopusList); + return; + }); + + } else if (req.params.id === '29') { + // For QA Portal + masterUtil.getFunctionalTest(orgList, function(err, functionaltestlist) { + if (err) { + res.status(500).send('Not able to fetch Functional Tests.'); + } + res.send(functionaltestlist); + return; + }); + + }else if (req.params.id === '23') { + // For Jira + logger.debug("Entering getJira"); + masterUtil.getJira(orgList, function(err, jiraList) { + if (err) { + res.status(500).send('Not able to fetch Jira.'); + } + res.send(jiraList); + return; + }); + + } else if (req.params.id === '6') { // For User Role masterUtil.getUserRoles(function (err, userRoleList) { if (err) { @@ -966,7 +1007,47 @@ module.exports.setRoutes = function (app, sessionVerification) { return; }); - } else if (req.params.id === '6') { + } else if (req.params.id === '27') { + // For Bitbucket + masterUtil.getBitbucket(orgList, function(err, bitbucketList) { + if (err) { + res.status(500).send('Not able to fetch bitbucket.'); + } + res.send(bitbucketList); + return; + }); + + }else if (req.params.id === '28') { + // For Octopus + masterUtil.getOctopus(orgList, function(err, octopusList) { + if (err) { + res.status(500).send('Not able to fetch Octopus.'); + } + res.send(octopusList); + return; + }); + + }else if (req.params.id === '29') { + // For QA Portal + masterUtil.getFunctionalTest(orgList, function(err, functionaltestlist) { + if (err) { + res.status(500).send('Not able to fetch Functional Tests.'); + } + res.send(functionaltestlist); + return; + }); + + }else if (req.params.id === '23') { + // For Jira + masterUtil.getJira(orgList, function(err, jiraList) { + if (err) { + res.status(500).send('Not able to fetch Jira.'); + } + res.send(jiraList); + return; + }); + + }else if (req.params.id === '6') { // For User Role masterUtil.getUserRoles(function (err, userRoleList) { if (err) {