From 46a144e0e0793c600a5bfa05b173cb7014029fed Mon Sep 17 00:00:00 2001 From: hrushikesh07 Date: Tue, 25 Oct 2016 12:43:28 +0530 Subject: [PATCH 1/2] Remove the design angular form dev --- client/cat3/main.html | 2 - .../design/controllers/appUrlCreateCtrl.js | 16 - .../design/controllers/blueprintCreateCtrl.js | 509 ------------------ .../design/controllers/blueprintListCtrl.js | 100 ---- .../design/controllers/createCompositeCtrl.js | 78 --- .../dashboard/design/data/providers.json | 30 -- .../sections/dashboard/design/design.html | 71 +-- .../sections/dashboard/design/designCtrl.js | 83 +-- .../services/blueprintCreateServices.js | 267 --------- .../design/services/blueprintListServices.js | 108 ---- .../design/view/blueprintCreate.html | 490 ----------------- .../design/view/createComposite.html | 164 ------ .../dashboard/design/view/designListView.html | 75 --- .../dashboard/design/view/designSubMenu.html | 37 -- .../dashboard/design/view/filterSidebar.html | 24 - .../design/view/popups/blueprintCopy.html | 40 -- .../design/view/popups/blueprintLaunch.html | 40 -- 17 files changed, 4 insertions(+), 2130 deletions(-) delete mode 100644 client/cat3/src/partials/sections/dashboard/design/controllers/appUrlCreateCtrl.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/controllers/blueprintListCtrl.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/data/providers.json delete mode 100644 client/cat3/src/partials/sections/dashboard/design/services/blueprintCreateServices.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/services/blueprintListServices.js delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/blueprintCreate.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/createComposite.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/designListView.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/designSubMenu.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/filterSidebar.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintCopy.html delete mode 100644 client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintLaunch.html diff --git a/client/cat3/main.html b/client/cat3/main.html index 74fa09a2d..476a55985 100644 --- a/client/cat3/main.html +++ b/client/cat3/main.html @@ -105,8 +105,6 @@ - - diff --git a/client/cat3/src/partials/sections/dashboard/design/controllers/appUrlCreateCtrl.js b/client/cat3/src/partials/sections/dashboard/design/controllers/appUrlCreateCtrl.js deleted file mode 100644 index 289f94e82..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/controllers/appUrlCreateCtrl.js +++ /dev/null @@ -1,16 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('dashboard.design') - .controller('appUrlCreateCtrl',['$scope', '$modalInstance', function ($scope,$modalInstance) { - $scope.cancel = function() { - $modalInstance.dismiss('cancel'); - }; - $scope.ok=function(){ - $scope.appUrls = { - name: $scope.appUrlItem.name, - url: $scope.appUrlItem.url - }; - $modalInstance.close($scope.appUrls); - }; - }]); -})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js b/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js deleted file mode 100644 index e49a69e57..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/controllers/blueprintCreateCtrl.js +++ /dev/null @@ -1,509 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('dashboard.design') - .controller('blueprintCreateCtrl',['$scope','$modal','toastr','$state', 'blueprintCreateService','confirmbox', function ($scope,$modal,toastr,$state,bpCreateSer,confirmbox) { - var blueprintCreation = this; - //to get the templates listing. - if($state.params && $state.params.subItem && $state.params.templateObj){ - $scope.providerType = $state.params.subItem.toUpperCase(); - $scope.bpTypeName = $state.params.templateObj.templatetypename; - } - $scope.logo = 'images/global/cat-logo.png'; - $scope.osImageLogo = 'images/global/linux.png'; - $scope.isOSImage = false; - $scope.imageList = []; - //on initial load. - $scope.nextEnabled = false; - $scope.previousEnabled = false; - $scope.isNextVisible = true; - $scope.isSubmitVisible = false; - /*Open only One Accordian-Group at a time*/ - $scope.oneAtATime = true; - /*Initialising First Accordian-group open on load*/ - $scope.isFirstOpen = true; - if( $scope.bpTypeName === 'Composite'){ - $scope.isNextVisible = false; - $scope.isSubmitComposite = true; - } - blueprintCreation.newEnt = []; - blueprintCreation.osListing = []; - blueprintCreation.providerListing = []; - blueprintCreation.imageListing = []; - blueprintCreation.regionListing = ''; - blueprintCreation.keyPairListing = ''; - blueprintCreation.vpcListing = []; - blueprintCreation.subnetListing = []; - blueprintCreation.securityGroupListing = []; - blueprintCreation.instanceType = []; - blueprintCreation.orgBUProjListing = []; - blueprintCreation.buProjListing = []; - blueprintCreation.projListing = []; - blueprintCreation.appUrlList = []; - blueprintCreation.getCFTDetails = []; - blueprintCreation.providerListingAzure = []; - blueprintCreation.regionListingAzure = []; - blueprintCreation.subnetListingAzure = []; - blueprintCreation.dataStore = []; - - blueprintCreation.templateListing = function(){ - bpCreateSer.getTemplates().then(function(data){ - $scope.templateList = data; - }); - }; - - $scope.blueprintTemplateClick = function(templateDetail) { - templateDetail.selected = true; - $scope.nextEnabled = true; - $scope.templateSelected = templateDetail; - }; - - blueprintCreation.getImages = function(){ - bpCreateSer.getImages().then(function(data){ - //Note: The provider type should come in lowercase from the API. - var providerType = $scope.providerType.toLowerCase(); - for(var i=0;i ' + - '  ' + - '  ' + - '  '} - ]; - }); - } - }; - pbList.blueprintInfo = $scope.blueprintInfo =function($event,bpDetails,bpType){ - $event.stopPropagation(); - gencSers.moreInfo(bpDetails,bpType); - }; - pbList.launchInstance = $scope.launchInstance =function($event,pbId){ - $event.stopPropagation(); - bpServ.launchBp(pbId); - }; - pbList.selectCard = function (cardObj){ - pbList[cardObj._id] = !pbList[cardObj._id]; - if(pbList.selectedCards.indexOf(cardObj._id) === -1){ - pbList.selectedCards.push(cardObj._id); - } else { - pbList.selectedCards.splice(pbList.selectedCards.indexOf(cardObj._id),1); - } - - }; - pbList.copyBp = $scope.copyBp =function(ids){ - bpServ.copyBp(ids); - }; - pbList.deleteBp = $scope.deleteBp =function(ids){ - bpServ.deleteBp(ids); - }; - pbList.cloneBlueprint = $scope.cloneBlueprint =function($event,pbId){ - $event.stopPropagation(); - $rootScope.stateItems.current.params.blueId=pbId; - $state.go('dashboard.designSubView',{subItem:$state.params.subItem,view:'edit'}); - - }; - pbList.createList(); - }]).controller('bpLaunchInstanceCtrl',['$rootScope','$modalInstance',function ($rootScope,$modalInstance) { - var lanIns = this; - lanIns.newEnt=[]; - if($rootScope.organObject){ - lanIns.envOptions=$rootScope.organObject[$rootScope.organNewEnt.org].environments; - lanIns.newEnt.org =$rootScope.organObject[$rootScope.organNewEnt.org].name; - lanIns.newEnt.buss=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].name; - lanIns.newEnt.proj=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].projects[$rootScope.organNewEnt.proj].name; - } - lanIns.launch = function (){ - $modalInstance.close(lanIns.newEnt.env); - }; - }]).controller('bpCopyCtrl',['$rootScope','$modalInstance',function ($rootScope,$modalInstance) { - var bpCopy = this; - bpCopy.newEnt=[]; - bpCopy.newEnt.copyOrg='0'; - bpCopy.newEnt.copyBuss='0'; - bpCopy.newEnt.copyProj='0'; - bpCopy.cancel = function (){ - $modalInstance.dismiss('cancel'); - }; - bpCopy.copySelectedBlueprint = function (){ - $modalInstance.close(bpCopy.newEnt); - }; - }]); -})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js b/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js deleted file mode 100644 index 92345cd45..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/controllers/createCompositeCtrl.js +++ /dev/null @@ -1,78 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('dashboard.design') - .controller('createCompositeCtrl',['$scope','$rootScope','$state','toastr','blueprintService','genericServices','designServices', function ($scope,$rootScope,$state,toastr,bpServ,gencSers,designServices) { - var createCBP = this; - createCBP.ExBlueprintList=[]; - createCBP.SelectedBPList=[]; - createCBP.selectBlueprintId=''; - createCBP.selectedBPDetails=''; - createCBP.compositeBPType='chef'; - createCBP.onSubmit =false; - createCBP.newEnt={ - bpName:'' - }; - createCBP.createList = function (){ - createCBP.ExBlueprintList=[]; - createCBP.SelectedBPList=[]; - var getResult = bpServ.createList(createCBP.compositeBPType); - if(getResult){ - getResult.then(function (result){ - createCBP.ExBlueprintList=result; - }); - } - }; - createCBP.addBP = function (indexArr){ - createCBP.SelectedBPList.push(createCBP.ExBlueprintList[indexArr]); - createCBP.ExBlueprintList.splice(indexArr,1); - }; - createCBP.deSelect =function ($event,indexArr){ - $event.stopPropagation(); - createCBP.ExBlueprintList.push(createCBP.SelectedBPList[indexArr]); - if(createCBP.SelectedBPList[indexArr]._id === createCBP.selectBlueprintId){ - createCBP.selectBlueprintId=''; - createCBP.selectedBPDetails=''; - } - createCBP.SelectedBPList.splice(indexArr,1); - - }; - createCBP.selectBpInfo =function ($event,bpDetails){ - $event.stopPropagation(); - gencSers.moreInfo(bpDetails,null); - }; - createCBP.editSelectBpInfo =function ($event,bpDetails){ - createCBP.selectBlueprintId=bpDetails._id; - createCBP.selectedBPDetails=bpDetails; - }; - createCBP.ord =function (){ - console.log(createCBP.selectedBpOrder); - }; - $rootScope.compositeSave =function (vali) { - createCBP.onSubmit =true; - if(!createCBP.newEnt.bpName || !createCBP.SelectedBPList.length > 0){ - return true; - } - if($rootScope.organObject){ - createCBP.newEnt.org =$rootScope.organObject[$rootScope.organNewEnt.org].rowid; - createCBP.newEnt.buss=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].rowid; - createCBP.newEnt.proj=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].projects[$rootScope.organNewEnt.proj].rowid; - } - var params = { - url: '/composite-blueprints/', - data:{ - "name": createCBP.newEnt.bpName, - "organizationId":createCBP.newEnt.org, - "businessGroupId": createCBP.newEnt.buss, - "projectId":createCBP.newEnt.proj, - "blueprints": createCBP.SelectedBPList, - "cloudProviderType": 'aws' - } - }; - designServices.promisePost(params).then(function () { - toastr.success('Successfully Created.'); - $state.go('dashboard.designSubView',{subItem:$state.params.subItem,view:'list'}); - }); - }; - createCBP.createList(); - }]); -})(angular); diff --git a/client/cat3/src/partials/sections/dashboard/design/data/providers.json b/client/cat3/src/partials/sections/dashboard/design/data/providers.json deleted file mode 100644 index 457f16c69..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/data/providers.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "name": "AWS", - "parent": "design", - "abstract": true, - "icon":"aws.png", - "filterArray":["arm"] - }, - { - "name": "AZURE", - "parent": "design", - "abstract": true, - "icon":"openstak.png", - "filterArray":["cft","composite"] - }, - { - "name": "OPENSTACK", - "parent": "design", - "abstract": true, - "icon":"azure-card.png", - "filterArray":["cft","arm","composite"] - }, - { - "name": "VMWARE", - "parent": "design", - "abstract": true, - "icon":"vmware-card.png", - "filterArray":["cft","arm","composite"] - } -] \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/design.html b/client/cat3/src/partials/sections/dashboard/design/design.html index 6e487d836..b87c31477 100644 --- a/client/cat3/src/partials/sections/dashboard/design/design.html +++ b/client/cat3/src/partials/sections/dashboard/design/design.html @@ -1,71 +1,2 @@ -
-
- - -
- -
-
- - -
-
- -
-
-
-
\ No newline at end of file +design \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/designCtrl.js b/client/cat3/src/partials/sections/dashboard/design/designCtrl.js index 0d04bee96..a454f3b1d 100644 --- a/client/cat3/src/partials/sections/dashboard/design/designCtrl.js +++ b/client/cat3/src/partials/sections/dashboard/design/designCtrl.js @@ -1,84 +1,7 @@ (function (angular) { "use strict"; - angular.module('dashboard.design', []).config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'modulePermissionProvider', function($stateProvider, $urlRouterProvider, $httpProvider, modulePermissionProvider) { - var modulePerms = modulePermissionProvider.$get(); - $stateProvider.state('dashboard.design.list', { - url: "/:provider/list", - templateUrl: "src/partials/sections/dashboard/design/view/designListView.html", - controller: "blueprintListCtrl as bpList", - params:{templateObj:null}, - resolve: { - auth: ["$q", function ($q) { - var deferred = $q.defer(); - // instead, go to a different page - if (modulePerms.analyticsBool()) { - // everything is fine, proceed - deferred.resolve(); - } else { - deferred.reject({redirectTo: 'dashboard'}); - } - return deferred.promise; - }] - } - }).state('dashboard.design.add', { - url: "/:provider/new", - templateUrl: "src/partials/sections/dashboard/design/view/blueprintCreate.html", - controller: "blueprintCreateCtrl as bpAdd", - params:{templateObj:null}, - resolve: { - auth: ["$q", function ($q) { - var deferred = $q.defer(); - // instead, go to a different page - if (modulePerms.analyticsBool()) { - // everything is fine, proceed - deferred.resolve(); - } else { - deferred.reject({redirectTo: 'dashboard'}); - } - return deferred.promise; - }] - } - }) - }]).filter('inArray',['$filter', function($filter){ - return function(list, arrayFilter, element){ - if(arrayFilter){ - return $filter("filter")(list, function(listItem){ - return arrayFilter.indexOf(listItem[element]) === -1; - }); - } - }; - }]) - .controller('designCtrl',['$scope','$state','genericServices', function ($scope,$state,genericServices) { - var design= this; - design.providersList= function () { - var params = { - url: 'src/partials/sections/dashboard/design/data/providers.json' - }; - genericServices.promiseGet(params).then(function (data){ - design.providersMenu=data; - design.tempType(data); - // $state.go('dashboard.designSubView',{subItem:data[0].name,view:'list'}); - }); + angular.module('dashboard.design', []) + .controller('designCtrl', function () { - }; - design.tempType=function (providers) { - var params = { - url: '/d4dMasters/readmasterjsonnew/16' - }; - genericServices.promiseGet(params).then(function (template){ - design.templateTypes=template; - - //var treeNames=['DESIGN', $state.params.subItem,template[0].templateName,'list']; - //$rootScope.$emit('treeNameUpdate', treeNames); - //$state.go('dashboard.designSubView',{subItem:providers[0].name,view:'list',templateObj:template[0]}); - - }); - // get organigetion - genericServices.getTreeNew().then(function (orgs) { - design.organObject=orgs; - }); - }; - design.providersList(); - return design; - }]); + }); })(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/services/blueprintCreateServices.js b/client/cat3/src/partials/sections/dashboard/design/services/blueprintCreateServices.js deleted file mode 100644 index 739ccca0f..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/services/blueprintCreateServices.js +++ /dev/null @@ -1,267 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('design.bpCreate',[]) - .service('blueprintCreateService',['$rootScope','$http','$q','toastr', 'designServices', function ($rootScope,$http,$q,toastr,designServices) { - var blueprintServices = this; - //for getting the list of templates. - blueprintServices.getTemplates = function () { - var params = { - url: '/d4dMasters/readmasterjsonnew/17', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //services listed for aws blueprints save and update. - blueprintServices.getImages = function () { - var params = { - url: '/vmimages', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //list of operatig systems supported. - blueprintServices.getOperatingSytems = function () { - var params = { - url: '/aws/ec2/amiids', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the aws providers. - blueprintServices.getAWSProviders = function () { - var params = { - url: '/aws/providers', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - /*getting the aws provider with respect to ID that can be used to list down the vmimage. - (gives region, key pair as well)*/ - blueprintServices.getAWSProviderWithId = function (providerId) { - var params = { - url: '/aws/providers/' + providerId, - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the images created on the basis on aws providers. - blueprintServices.getImageLists = function (providerId) { - var params = { - url: '/vmimages/providers/' + providerId, - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the images created on the basis on aws providers. - blueprintServices.getRegionLists = function () { - var params = { - url: '/vmimages/regions/list', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the instance type based upon the image selected. - blueprintServices.getInstanceType = function () { - var params = { - url: '/vmimages/instancesizes/all/list', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the vpcs for aws providers. - blueprintServices.postVpcs = function (providerId,region) { - var params = { - url: '/aws/providers/describe/vpcs', - inlineLoader:true, - data: { - "providerId": providerId, - "region": region - } - }; - return designServices.promisePost(params); - }; - //listing down the subnets based upon the VPC ID.(set the instance count to 10 from Ctrl) - blueprintServices.postSubnets = function (vpcId,providerId,region) { - var params = { - url: '/aws/providers/vpc/'+ vpcId +'/subnets', - inlineLoader:true, - data: { - "providerId": providerId, - "region": region - } - }; - return designServices.promisePost(params); - }; - //listing down the security groups based upon the VPC ID. - blueprintServices.postSecurityGroups = function (vpcId,providerId,region) { - var params = { - url: '/aws/providers/vpc/'+ vpcId +'/securitygroups', - inlineLoader:true, - data: { - "providerId": providerId, - "region": region - } - }; - return designServices.promisePost(params); - }; - //listing down the subnets based upon the VPC ID.(set the instance count to 10 from Ctrl) - blueprintServices.getOrgBuProj = function () { - var params = { - url: '/organizations/getTreeNew' - }; - return designServices.promiseGet(params); - }; - //listing down the nexus server details associated to a project(on enabling checkbox, get GroupId) - blueprintServices.getNexusServerList = function () { - var params = { - url: '/d4dMasters/readmasterjsonnew/26', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the docker details associate to a project(on enabling checkbox) - blueprintServices.getDockerList = function () { - var params = { - url: '/d4dMasters/readmasterjsonnew/18', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the repos for nexus and docker based upon project and projectId(RepoName & group) - blueprintServices.getRepoList = function (projectId) { - var params = { - url: '/d4dMasters/project/' + projectId, - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the repo url related to the repository selected based upon nexusId - blueprintServices.getRepoUrl = function (nexusId) { - var params = { - url: '/nexus/'+ nexusId +'/repositories', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the artifacts based upon nexusId,repo selected & the group. - blueprintServices.getArtifacts = function (nexusId, repoName, groupId) { - var params = { - url: '/nexus/' + nexusId + '/repositories/' + repoName + '/group/' + groupId + '/artifact', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the versions based upon the nexuId, repo selected, group and artifact selected. - blueprintServices.getVersions = function (nexusId, repoName, groupId, artifactId) { - var params = { - url: '/nexus/' + nexusId + '/repositories/' + repoName + '/group/' + groupId + '/artifact/' + artifactId + '/versions', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //list down the chefServer. - blueprintServices.getChefServer = function () { - var params = { - url: '/d4dMasters/readmasterjsonnew/10', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //get the cft file details. - blueprintServices.getCFTParams = function (cftTemplateFileName) { - var params = { - url: '/d4dMasters/cftTemplate?templateFile=' + cftTemplateFileName, - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //save api for creating a blueprint - blueprintServices.postBlueprintSave = function (orgId,bgId,projectId,blueprintData) { - var params = { - url: '/organizations/' + orgId + '/businessgroups/' + bgId + '/projects/' + projectId + '/blueprints', - data: blueprintData - }; - return designServices.promisePost(params); - }; - - //services listed for azure blueprints save and update. - - //listing down the azure providers - blueprintServices.getAzureProviders = function() { - var params = { - url: '/azure/providers', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down azure locations - blueprintServices.getAzureLocations = function (azureProviderId) { - var params = { - //displayName - url: '/azure/' + azureProviderId + '/locations', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the azure networks(VPC) - blueprintServices.getAzureVPC = function (azureProviderId) { - var params = { - url: '/azure/'+ azureProviderId +'/networks', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - - //services listed for openstack blueprints save and update. - //listing down openstack providers - blueprintServices.getOpenStackProviders = function() { - var params = { - url: '/openstack/providers', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the openstack flavors related to provider - blueprintServices.getProviderFlavors = function(providerId) { - var params = { - url: '/openstack/' + providerId + '/flavors', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the openstack networks related to provider - blueprintServices.getProviderNetwork = function(providerId) { - var params = { - url: '/openstack/' + providerId + '/networks', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down the security groups related to provider - blueprintServices.getProviderSecurityGroup = function(providerId) { - var params = { - url: '/openstack/' + providerId + '/securityGroups', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - - //services listed for vmware blueprints save and update. - //listing down vmware providers. - blueprintServices.getVmWareProviders = function() { - var params = { - url: '/vmware/providers', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - //listing down dataStore related to Provider. - blueprintServices.getProviderDataStore = function(providerId) { - var params = { - url: '/vmware/' + providerId + '/datastores', - inlineLoader:true - }; - return designServices.promiseGet(params); - }; - }]); -})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/services/blueprintListServices.js b/client/cat3/src/partials/sections/dashboard/design/services/blueprintListServices.js deleted file mode 100644 index 3e484a3f4..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/services/blueprintListServices.js +++ /dev/null @@ -1,108 +0,0 @@ -(function (angular) { - "use strict"; - angular.module('design.BpList',[]) - .service('blueprintService',['$rootScope','$http','$q','toastr','$state','$modal','confirmbox','designServices',function ($rootScope,$http,$q,toastr,$state,$modal,confirmbox,designServices) { - var bpServ={}; - bpServ.createList = function(bpType){ - var organObjectId=[]; - ///organObjectId.envOptions=$rootScope.organObject[$rootScope.organNewEnt.org].environments; - if($rootScope.organObject){ - var tempType=(bpType) ? bpType :$state.params.templateObj.templatetype; - var pagination =(bpType) ? false :true; - organObjectId.org =$rootScope.organObject[$rootScope.organNewEnt.org].rowid; - organObjectId.buss=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].rowid; - organObjectId.proj=$rootScope.organObject[$rootScope.organNewEnt.org].businessGroups[$rootScope.organNewEnt.buss].projects[$rootScope.organNewEnt.proj].rowid; - var params = { - url: '/organizations/'+organObjectId.org+'/businessgroups/'+organObjectId.buss+'/projects/'+organObjectId.proj+'/blueprintList?pagination='+pagination+'&templateType='+tempType+'&providerType='+angular.lowercase($state.params.subItem) - }; - return designServices.promiseGet(params); - } - }; - bpServ.launchBp = function (id) { - $modal.open({ - animate: true, - templateUrl: "src/partials/sections/dashboard/design/view/popups/blueprintLaunch.html", - controller: "bpLaunchInstanceCtrl as lanIns", - backdrop: 'static', - keyboard: false, - resolve: { - bpItem: function() { - return { - id:id, - organObject:$rootScope.organObject - }; - } - } - }).result.then(function(env) { - var params = { - url: '/blueprint-frames/', - data:{ - "blueprintId": id, - "environmentId": env - } - }; - designServices.promisePost(params).then(function () { - toastr.success('Successfully launched.'); - }); - }); - }; - bpServ.copyBp = function (ids) { - $modal.open({ - animate: true, - templateUrl: "src/partials/sections/dashboard/design/view/popups/blueprintCopy.html", - controller: "bpCopyCtrl as bpCopy", - backdrop: 'static', - keyboard: false, - resolve: { - bpItem: function() { - return { - ids:ids, - organObject:$rootScope.organObject - }; - } - } - }).result.then(function(orgDetails) { - var params = { - url: '/blueprints/copy/', - data:{ - "orgid": $rootScope.organObject[orgDetails.copyOrg].rowid, - "buid": $rootScope.organObject[orgDetails.copyOrg].businessGroups[orgDetails.copyBuss].rowid, - "projid": $rootScope.organObject[orgDetails.copyOrg].businessGroups[orgDetails.copyBuss].projects[orgDetails.copyProj].rowid, - "blueprints":ids - } - }; - designServices.promisePost(params).then(function () { - toastr.success('Successfully copied.'); - }); - }); - }; - bpServ.deleteBp = function (ids) { - var modalOptions = { - closeButtonText: 'Cancel', - actionButtonText: 'Delete', - actionButtonStyle: 'cat-btn-delete', - headerText: 'Delete Blueprint', - bodyText: 'Are you sure you would like to remove the selected blueprints ?' - }; - confirmbox.showModal({}, modalOptions).then(function() { - var bPIds=[]; - if(angular.isArray(ids)){ - bPIds=ids; - } else { - bPIds.push(ids); - } - var params = { - url: '/blueprints', - data:{blueprints:bPIds} - }; - return designServices.promiseDelete(params).then(function(){ - toastr.success('Successfully deleted'); - angular.each(ids,function (val) { - angular.element('#'+val).hide(); - }); - }); - }); - }; - return bpServ; - }]); -})(angular); \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/view/blueprintCreate.html b/client/cat3/src/partials/sections/dashboard/design/view/blueprintCreate.html deleted file mode 100644 index d6eea0036..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/blueprintCreate.html +++ /dev/null @@ -1,490 +0,0 @@ -
-
-
-
-
-
- -
-
-
-
-
-
    -
  • - templateLogo -
  • -
  • {{templateDetail.templatename}}
  • -
  • {{item}}
  • -
-
-
-
    -
  • - templateLogo -
  • -
  • {{templateDetail.name}}
  • -
-
-
-
-
-
    -
  • - templateLogo -
  • -
  • - OSImage -
  • -
  • {{templateSelected.templatename}}
  • -
  • {{templateSelected.name}}
  • -
  • {{item}}
  • -
-
-
- - - - - Configure Provider Parameters - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
    -
  • -
-
- -
-
- - -
-
- - -
- -
- - - - - Configure Organization Parameters - -
- - -
-
- - -
-
- - -
-
- - -
- - -
- - Add - - - - - - - - - - - -
NameImage PathTagLaunch ParamsRe-Order
-
- -
- - - - - Configure Runlist Parameters - -
- - - - -
- - - - - - - - - - - -
View Runlist
{{item}}
-
-
-
- - - - - - - Configure Application - - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
- Application URL - - - - - - - - - - - - - - - - - - - -
-
- - - - - Configure Stack Parameters - -
- - -
-
- - -
-
- - -
-
-
- - - - - Configure Resource : {{key}} - -
- - -
-
- - - -
- - - - - - - -
View Runlist
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - -
-
diff --git a/client/cat3/src/partials/sections/dashboard/design/view/createComposite.html b/client/cat3/src/partials/sections/dashboard/design/view/createComposite.html deleted file mode 100644 index 214400814..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/createComposite.html +++ /dev/null @@ -1,164 +0,0 @@ - -
-
-
- Composite Blueprint: -
-
- -
-
- - -
-
- -
- -
- Please enter Composite Blueprint name! -
-
-
-
-
-
-
-
-
-
-
- -
-
- No Data Found! -
    -
  • - - - Zabix and Logstash  {{bp.name}} -
  • -
-
-
-
-
-
-
-
-
- - Selected Blueprints   Please select blueprint. -
-
-
    -
  • - - - - {{(+createCBP.SelectedBPList.indexOf(selectedp)) +1}}Zabix and Logstash  {{selectedp.name}} -
  • -
- -
-
-
-
- -
-
-
-
- - - -
- - - - - Edit attribute of Composed Roles and Cookbooks - -
-
- - -
-
-
-
-
-
-
- \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/view/designListView.html b/client/cat3/src/partials/sections/dashboard/design/view/designListView.html deleted file mode 100644 index 39301e1d7..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/designListView.html +++ /dev/null @@ -1,75 +0,0 @@ -
-
-
- {{stateItems.params.templateObj.templatetypename}} blueprints -
-
- - - - - -
-
-
-
-
No Data Found!
-
-
-
-
-
-
    -
  • {{blueprint.name}}
  • -
  • - -
  • -
    - - - -
- -
-
-
-
- -
-
-
-
-
-
-
    -
  • {{blueprint.name}}
  • - - - - - - -
    - - - -
- -
-
-
-
-
-
-
-
-
- -
diff --git a/client/cat3/src/partials/sections/dashboard/design/view/designSubMenu.html b/client/cat3/src/partials/sections/dashboard/design/view/designSubMenu.html deleted file mode 100644 index e18d503eb..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/designSubMenu.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/view/filterSidebar.html b/client/cat3/src/partials/sections/dashboard/design/view/filterSidebar.html deleted file mode 100644 index ae93a094e..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/filterSidebar.html +++ /dev/null @@ -1,24 +0,0 @@ - \ No newline at end of file diff --git a/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintCopy.html b/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintCopy.html deleted file mode 100644 index 23820ad36..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintCopy.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - diff --git a/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintLaunch.html b/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintLaunch.html deleted file mode 100644 index cda51b860..000000000 --- a/client/cat3/src/partials/sections/dashboard/design/view/popups/blueprintLaunch.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - \ No newline at end of file From 987d8fcdf6b333549787e5e36bdbe7ab967f7734 Mon Sep 17 00:00:00 2001 From: Udesh Date: Wed, 26 Oct 2016 11:58:21 +0530 Subject: [PATCH 2/2] fix for certificate file id --- server/app/services/monitorsService.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/app/services/monitorsService.js b/server/app/services/monitorsService.js index 7200e95e2..88738ca59 100644 --- a/server/app/services/monitorsService.js +++ b/server/app/services/monitorsService.js @@ -71,9 +71,7 @@ monitorsService.createMonitor = function (monitorsObj, callback) { saveobj['orgId'] = monitorsObj['orgId']; saveobj['type'] = monitorsObj['type']; saveobj['name'] = monitorsObj['name']; - saveobj['parameters'] = { - - }; + saveobj['parameters'] = {}; saveobj['parameters']['url'] = monitorsObj['parameters']['url']; saveobj['parameters']['transportProtocol'] = monitorsObj['parameters']['transportProtocol']; saveobj['parameters']['transportProtocolParameters'] = {}; @@ -86,6 +84,7 @@ monitorsService.createMonitor = function (monitorsObj, callback) { saveobj['parameters']['transportProtocolParameters']['heartbeat'] = monitorsObj['parameters']['transportProtocolParameters']['heartbeat']; saveobj['parameters']['transportProtocolParameters']['prefetch'] = monitorsObj['parameters']['transportProtocolParameters']['prefetch']; if (monitorsObj['parameters']['transportProtocolParameters']['ssl']) { + saveobj['parameters']['transportProtocolParameters']['ssl'] = {}; saveobj['parameters']['transportProtocolParameters']['ssl']['certChainFileId'] = monitorsObj['parameters']['transportProtocolParameters']['ssl']['certChainFileId']; saveobj['parameters']['transportProtocolParameters']['ssl']['privateKeyFileId'] = monitorsObj['parameters']['transportProtocolParameters']['ssl']['privateKeyFileId']; }