Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/cat3/src/factory/workzoneServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@
getBotTypeList:function () {
var url ='/config-data/bot-type';
return $http.get(fullUrl(url),Auth.getHeaderObject());
},
getTaggingServer:function () {
var url ='/config-data/tagging-server';
return $http.get(fullUrl(url),Auth.getHeaderObject());
}
};
return serviceInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
});
var param2={
url:'/tasks/serviceDelivery/?serviceDeliveryCheck=true'
// url:'src/partials/sections/dashboard/bots/data/t.json'
//url:'src/partials/sections/dashboard/bots/data/t.json'
};
genSevs.promiseGet(param2).then(function (resultTask) {
angular.forEach(resultTask,function (val) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
$modal.open({
animate: true,
templateUrl: "src/partials/sections/dashboard/workzone/blueprint/popups/blueprintLaunchParams.html",
controller: "blueprintLaunchParamsCtrl",
controller: "blueprintLaunchParamsCtrl as bPLP",
backdrop : 'static',
keyboard: false,
resolve: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,20 @@
versionsList = bpItem.bp.blueprintConfig.infraManagerData.versionsList;
versionOptional = versionsList[versionsList.length-1].ver;
}
var selectedVersionBpId = bpItem.bp.selectedVersionBpId || bpItem._id;
workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName,bpItem.domainName,bpItem.tagServer).then(function(bpLaunchResponse) {
var selectedVersionBpId = bpItem.bp.selectedVersionBpId;
if(bpItem && bpItem.bp && bpItem.bp.selectedVersionBpId){
selectedVersionBpId = bpItem.bp.selectedVersionBpId;
} else {
selectedVersionBpId = bpItem.bp._id;
}
var lEnv=null;
if(envParams && envParams.env){
lEnv=envParams.env;
}
if(bpItem.launchEnv){
lEnv=bpItem.launchEnv;
}
workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, lEnv, bpItem.stackName,bpItem.domainName,bpItem.tagServer).then(function(bpLaunchResponse) {
$scope.isBPLogsLoading = false;
var launchingInstance;
if(bpLaunchResponse.data.id && bpLaunchResponse.data.id.length>0){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,44 @@ <h4 class="modal-title" ng-show="showARMInputs"> Enter ARM Deployment Name</h4>
<form name="cftForm" ng-submit="cftSubmitHandler(cftForm.$valid)" novalidate>
<div class="modal-body" ng-show="!isBPLogsLoading">
<fieldset>

<div ng-show="!showCFTInputs && !showARMInputs && !showBlueprintInputs">
Are you sure you want to launch the Blueprint? Press Ok To continue <br />
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding">
<label class="control-label">Tag Server: </label>
<input type="checkbox" ng-model="tagServerCheck" class="checkbox-list" ng-click="tagServerChecking()" />
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding" ng-show="tagServerStatus">
<span class="col-lg-3 col-md-3 col-sm-12 col-xs-12 no-padding">
<label class="control-label">Select server
<span class="control-label red">&nbsp;*</span>
</label>
</span>
<span class="col-lg-6 col-md-6 col-sm-12 col-xs-12 no-padding">
<select class="form-control" ng-modal="tagServer">
<option selected="selected" value="Monitoring">Monitoring Server</option>
<option value="LDAP">LDAP Server</option>
<option value="AD">AD Server</option>
</select>
</span>
</div>
</div>
Are you sure you want to launch the Blueprint? Press Ok To continue <br /><br />

<div class="col-lg-6 col-md-6 projectRepo margintop15">
<label for="" class="">Select server:</label>
<select class="form-control" ng-model="tagSerSelected">
<option selected="selected" value="">No Server</option>
<option ng-repeat="(key , value) in taggingServerList" value="{{value}}">{{value}}</option>
</select>
</div>

<div class="col-lg-6 col-md-6 projectRepo margintop15">
<label for="" class="">Organization:<span class="red">*</span></label>
<label id="spinnerForEnv" class="hidden"><img style="margin-left:5px;margin-right:25px;" src="img/select2-spinner.gif"></label>
<input type="text" ng-model="orgSeleted" class="width-100 form-control" readonly>
</div>

<div class="col-lg-6 col-md-6 projectRepo margintop15">
<label for="" class="">Business Groups:<span class="red">*</span></label>
<label id="spinnerForEnv" class="hidden"><img style="margin-left:5px;margin-right:25px;" src="img/select2-spinner.gif"></label>
<input type="text" ng-model="busSeleted" class="width-100 form-control" readonly>
</div>

<div class="col-lg-6 col-md-6 projectRepo margintop15">
<label for="" class="">project:<span class="red">*</span></label>
<label id="spinnerForEnv" class="hidden"><img style="margin-left:5px;margin-right:25px;" src="img/select2-spinner.gif"></label>
<input type="text" ng-model="projSeleted" class="width-100 form-control" readonly>
</div>

<div class="col-lg-6 col-md-6 projectRepo margintop15">
<label for="" class="">Choose Environment:<span class="red">*</span></label>
<label id="spinnerForEnv" class="hidden"><img style="margin-left:5px;margin-right:25px;" src="img/select2-spinner.gif"></label>
<select id="envSelect" ng-model="envSeleted" class="width-100 form-control" required>
<option value="">Select</option>
<option ng-repeat="envOption in envOptions" value="{{envOption.rowid}}">{{envOption.name}}</option>
</select>
</div>
</div>
<div ng-show="showCFTInputs || showARMInputs" class="CFTInputs-block">
<span class="acknowledge-text">(Only numbers,letters allowed. No spaces and underscores)</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,46 @@
(function(angular){
"use strict";
angular.module('workzone.blueprint')
.controller('blueprintLaunchParamsCtrl', ['$scope', '$modalInstance', 'items', function($scope, $modalInstance, items) {
.controller('blueprintLaunchParamsCtrl', ['$scope', '$modalInstance', 'items','workzoneServices','genericServices', function($scope, $modalInstance, items,workzoneServices,genericServices) {
console.log(items);
var launchHelper = {
launch : function(){
$modalInstance.close({bp:items,stackName:$scope.stackName,domainName:$scope.domainName,tagServer:$scope.tagServer});
$modalInstance.close({bp:items,stackName:$scope.stackName,domainName:$scope.domainName,tagServer:$scope.tagSerSelected,launchEnv:$scope.envSeleted});
}
};
var bPLP=this;
$scope.taggingServerList=[];
$scope.envOptions=[]
workzoneServices.getTaggingServer().then(function (topSer) {
$scope.taggingServerList=topSer.data;
});
genericServices.getTreeNew().then(function (envData) {
angular.forEach(envData,function(val){
if(val.rowid === items.orgId){
$scope.orgSeleted=val.name;
angular.forEach(val.businessGroups,function(busval){
if(busval.rowid === items.bgId){
$scope.busSeleted=busval.name;
angular.forEach(busval.projects,function(projval){
if(projval.rowId === items.projectId){
$scope.projSeleted=projval.name;
$scope.envOptions=projval.environments;
$scope.envSeleted=projval.environments[0].rowid;
}
});
}
});
}

});

});
$scope.stackName='';
$scope.domainName='';
$scope.tagServer = "Monitoring";
$scope.tagSerSelected = "";
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
};
$scope.tagServerChecking = function() {
if($scope.tagServerCheck){
$scope.tagServerStatus = true;
}else{
$scope.tagServerStatus = false;
$scope.tagServer = '';
}
};
$scope.launchBP = function() {
if(items.blueprintType === "aws_cf") {
$scope.showCFTInputs = true;
Expand Down