Skip to content
4 changes: 2 additions & 2 deletions client/cat3/src/factory/workzoneServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
var url = '/blueprints/' + blueprintID;
return $http.delete(fullUrl(url), Auth.getHeaderObject());
},
launchBlueprint: function (blueprintID, version, envId, stackName) {
launchBlueprint: function (blueprintID, version, envId, stackName,domainName) {
var url = '/blueprints/' + blueprintID + '/launch?version=' + version +
'&envId=' + envId + '&stackName=' + stackName;
'&envId=' + envId + '&stackName=' + stackName + '&domainName=' + domainName;
return $http.get(fullUrl(url), Auth.getHeaderObject());
},
getBlueprintById: function(blueprintId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
versionOptional = versionsList[versionsList.length-1].ver;
}
var selectedVersionBpId = bpItem.bp.selectedVersionBpId;
workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName).then(function(bpLaunchResponse) {
workzoneServices.launchBlueprint(selectedVersionBpId, versionOptional, envParams.env, bpItem.stackName,bpItem.domainName).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
@@ -1,14 +1,15 @@
<div id="blueprintLaunchParamsPage">
<div class="modal-header">
<span class="close" ng-click="cancel()">×</span>
<h4 class="modal-title" ng-show="!showCFTInputs && !showARMInputs"> Confirmation</h4>
<h4 class="modal-title" ng-show="!showCFTInputs && !showARMInputs && !showBlueprintInputs"> Confirmation</h4>
<h4 class="modal-title" ng-show="showCFTInputs"> Enter a Unique Stack Name</h4>
<h4 class="modal-title" ng-show="showBlueprintInputs"> Enter a Domain Name</h4>
<h4 class="modal-title" ng-show="showARMInputs"> Enter ARM Deployment Name</h4>
</div>

<form name="cftForm" ng-submit="cftSubmitHandler(cftForm.$valid)" novalidate>
<div class="modal-body" ng-show="!isBPLogsLoading">
<div ng-show="!showCFTInputs && !showARMInputs">Are you sure you want to launch the Blueprint? Press Ok To continue</div>
<div ng-show="!showCFTInputs && !showARMInputs && !showBlueprintInputs">Are you sure you want to launch the Blueprint? Press Ok To continue</div>
<div ng-show="showCFTInputs || showARMInputs" class="CFTInputs-block">
<span class="acknowledge-text">(Only numbers,letters allowed. No spaces and underscores)</span>
<span class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
Expand All @@ -18,10 +19,23 @@ <h4 class="modal-title" ng-show="showARMInputs"> Enter ARM Deployment Name</h4>
</div>
</span>
</div>

<div ng-show="showBlueprintInputs" class="CFTInputs-block">
<span class="acknowledge-text">(Only letters allowed. No spaces and underscores)</span>
<span class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<input type="text" name="domainInpt" ng-model="domainName" ng-trim="false" ng-pattern="/^[a-zA-Z]*$/" class="form-control" required>
<div class="text-danger help-block" ng-messages="cftForm.domainInpt.$error">
<div id='messagesPage'>
<p ng-message="pattern">Only letters allowed. No spaces and underscores.</p>
</div>
</div>
</span>
</div>

</div>

<div class="modal-footer" ng-show="!isBPLogsLoading">
<div ng-show="!showCFTInputs && !showARMInputs">
<div ng-show="!showCFTInputs && !showARMInputs && !showBlueprintInputs">
<button type="button" class="btn cat-btn-cancel" ng-click="cancel()">
<i class="fa fa-times black"></i> Cancel
</button>
Expand All @@ -36,6 +50,12 @@ <h4 class="modal-title" ng-show="showARMInputs"> Enter ARM Deployment Name</h4>
</button>
<input type="submit" class="btn cat-btn-update" ng-disabled="cftForm.stackInpt.$dirty && cftForm.stackInpt.$invalid" ng-click="launchBP()" value="Ok" />
</div>
<div ng-show="showBlueprintInputs ">
<button type="button" class="btn cat-btn-cancel" ng-click="cancel()">
Cancel
</button>
<input type="button" class="btn cat-btn-update" ng-click="launchBPWithDomainName()" value="Ok" />
</div>
</div>
</div>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@
.controller('blueprintLaunchParamsCtrl', ['$scope', '$modalInstance', 'items', function($scope, $modalInstance, items) {
var launchHelper = {
launch : function(){
$modalInstance.close({bp:items,stackName:$scope.stackName});
$modalInstance.close({bp:items,stackName:$scope.stackName,domainName:$scope.domainName});
}
};
$scope.stackName='';
$scope.domainName='';
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
};
$scope.launchBP = function() {
if(items.blueprintType === "aws_cf") {
$scope.showCFTInputs = true;
} else if(items.blueprintType === "azure_arm") {
}else if(items.blueprintType === "azure_arm") {
$scope.showARMInputs = true;
}
else {
}else if(items.domainNameCheck === true || items.domainNameCheck === "true") {
$scope.showBlueprintInputs = true;
}else {
launchHelper.launch();
}
};
Expand All @@ -36,6 +38,9 @@
$scope.confirmCFTLaunch();
}
};
$scope.launchBPWithDomainName = function(){
launchHelper.launch();
};
}
]);
})(angular);
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ <h5>Script Details</h5>
</thead>
<tbody>
<tr ng-repeat="param in scriptParamsObj[selectedScript._id] track by $index">
<td>{{param}}</td>
<td ng-if="param !== ''">{{param}}</td>
<td ng-if="param === ''">.....</td>
<td>
<button title="Delete" type="button" ng-click="removeScriptParams(selectedScript._id,param);"><i class=" fa fa-trash-o"></i></button>
</td>
Expand All @@ -470,7 +471,6 @@ <h5>Script Details</h5>
</div>
</div>
</div>

<div class="modal-footer">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12" >
<span class="pull-left inputValidationMsg" ><h5 ng-bind="inputValidationMsg"></h5></span>
Expand Down
11 changes: 11 additions & 0 deletions client/htmls/private/ajax/Aws-Production.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@ <h4 class="panel-title">
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 margintop15">
<label>Do you want configure Domain Name at the time of Blueprint Launch:<span class="control-label redSpan">&nbsp;*</span></label>
<div class="input-groups">
<div class="radio">
<label><input type="radio" value="true" name="domainNameCheck">Yes</label>
</div>
<div class="radio">
<label><input type="radio" value="false" checked="true" name="domainNameCheck">No</label>
</div>
</div>
</div>
<!--To add the Swipe Functionality-->
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions client/htmls/private/ajax/DesignBlueprint.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ <h4 class="panel-title">
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 margintop15">
<label>Do you want configure Domain Name at the time of Blueprint Launch:<span class="control-label redSpan">&nbsp;*</span></label>
<div class="input-groups">
<div class="radio">
<label><input type="radio" name="domainNameCheck">Yes</label>
</div>
<div class="radio">
<label><input type="radio" checked="true" name="domainNameCheck">No</label>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6 foraws" style="margin-top:15px;">
<label for="region">Choose Region:<span style="color:red">*</span></label>
<div class="input-groups">
Expand Down
11 changes: 11 additions & 0 deletions client/htmls/private/ajax/DesignBlueprintAzure.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,17 @@ <h4 class="panel-title">
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 margintop15">
<label>Do you want configure Domain Name at the time of Blueprint Launch:<span class="control-label redSpan">&nbsp;*</span></label>
<div class="input-groups">
<div class="radio">
<label><input type="radio" name="domainNameCheck">Yes</label>
</div>
<div class="radio">
<label><input type="radio" checked="true" name="domainNameCheck">No</label>
</div>
</div>
</div>
<!--To add the Swipe Functionality-->
</div>
</div>
Expand Down
11 changes: 11 additions & 0 deletions client/htmls/private/ajax/DesignBlueprintVmware.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@ <h4 class="panel-title">
</select>
</div>
</div>
<div class="col-lg-6 col-md-6 margintop15">
<label>Do you want configure Domain Name at the time of Blueprint Launch:<span class="control-label redSpan">&nbsp;*</span></label>
<div class="input-groups">
<div class="radio">
<label><input type="radio" name="domainNameCheck">Yes</label>
</div>
<div class="radio">
<label><input type="radio" checked="true" name="domainNameCheck">No</label>
</div>
</div>
</div>
<div class="col-lg-6 col-md-6" style="margin-top:15px; display:none">
<label for="instanceCount">Instances to Launch:<span class="control-label redSpan">&nbsp;*</span></label>
<div class="input-groups">
Expand Down
2 changes: 1 addition & 1 deletion client/htmls/private/js/dev/awsProduction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ var saveblueprint = function(tempType) {
reqBody.providerId = providerId;
reqBody.region = region;
reqBody.name = $('#blueprintNameInput').val();

reqBody.domainNameCheck = $("input[name='domainNameCheck']:checked").val();
//Checking for docker blueprint images
if (($('.productdiv2.role-Selected').first().attr('templatetype') == "Docker" || $('.productdiv2.role-Selected').first().attr('templatetype') == "docker") && $('#dockerimageemptytr').length > 0) {
//no rows found add empty message
Expand Down
17 changes: 0 additions & 17 deletions client/htmls/private/js/scriptList.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,23 +244,6 @@ $('#scriptForm').submit(function(e) {
var formData = new FormData();
formData.append('file', $('input[type=file]')[0].files[0]);
var methodName ='';
if(scriptEditNew === "edit") {
if(hiddenFileName === availableFileName) {
url = '../scripts/update/scriptData';
methodName = 'PUT';
reqBody = {
"scriptId": scriptId,
"name": name,
"type": type,
"description": description,
"orgDetails": orgDetails,
"fileId": fileId
};
formSave(methodName,url,reqBody);
return false;
}
}

var isValidator = $('#scriptForm').valid();
if(isValidator){
e.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion server/app/cronjobs/cron-jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports.start = function start() {
var dockerContainerSyncJobId
= crontab.scheduleJob(dockerContainerSync.getInterval(), dockerContainerSync.execute);

logger.info('AWS S3 and RDS Provider Sync started with interval ==> '+ awsRDSS3ProviderSync.getInterval());
logger.info('AWS S3 and RDS Provider Sync started with interval ==> '+ awsRDSS3ProviderSync.getInterval());
var awsRDSS3ProviderSyncJobId
= crontab.scheduleJob(awsRDSS3ProviderSync.getInterval(), awsRDSS3ProviderSync.execute);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function saveAndUpdateContainers(containers,containerIds,instanceId,next){
return;
}else{
count++;

if(count === containers.length){
next(null,containers);
}
Expand Down
77 changes: 77 additions & 0 deletions server/app/lib/route53.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
Copyright [2016] [Relevance Lab]
loLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/


var aws = require('aws-sdk');
var logger = require('_pr/logger')(module);
var appConfig = require('_pr/config');

if (process.env.http_proxy) {
aws.config.update({
httpOptions: {
proxy: process.env.http_proxy
}
});
}

var route53 = function(awsSettings) {

var that = this;
var params = new Object();

if (typeof awsSettings.region !== undefined) {
params.region = awsSettings.region;
}
if (typeof awsSettings.access_key !== undefined && typeof awsSettings.secret_key !== undefined) {
params.accessKeyId = awsSettings.access_key;
params.secretAccessKey = awsSettings.secret_key;
}
var awsRoute53 = new aws.Route53(params);

this.listHostedZones = function(params,callback) {
awsRoute53.listHostedZones(params, function (err, data) {
if (err) {
logger.debug("Got listHostedZones info with error: ", err);
callback(err, null);
return;
}
callback(null,data );
});
};

this.listResourceRecordSets = function(params,callback) {
awsRoute53.listResourceRecordSets(params,function (err, data) {
if (err) {
logger.debug("Got getObject info with error: ", err);
callback(err, null);
return;
}
callback(null,data);
});
};

this.changeResourceRecordSets = function(params, callback) {
awsRoute53.changeResourceRecordSets(params, function (err, data) {
if (err) {
logger.debug("Got getObject info with error: ", err);
callback(err, null);
return;
}
callback(null,data);
});
};
}

module.exports = route53;
Loading