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
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ ARMTemplateBlueprintSchema.methods.launch = function(launchParams, callback) {
providerId: self.cloudProviderId,
providerType: 'azure',
tagServer: launchParams.tagServer,
monitorId: launchParams.monitorId,
keyPairId: 'azure',
region: self.region,
chefNodeName: instanceData.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ AWSInstanceBlueprintSchema.methods.launch = function(launchParams, callback) {
region: aKeyPair.region,
chefNodeName: instanceData.InstanceId,
tagServer: launchParams.tagServer,
monitorId: launchParams.monitorId,
runlist: paramRunList,
attributes: paramAttributes,
platformId: instanceData.InstanceId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ azureInstanceBlueprintSchema.methods.launch = function(launchParams, callback) {
providerId: self.cloudProviderId,
providerType: self.cloudProviderType,
tagServer: launchParams.tagServer,
monitorId: launchParams.monitorId,
keyPairId: 'azure',
region: self.region,
chefNodeName: launchparamsazure.VMName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ openstackInstanceBlueprintSchema.methods.launch = function(launchParams, callbac
providerId: self.cloudProviderId,
providerType: self.cloudProviderType,
tagServer: launchParams.tagServer,
monitorId: launchParams.monitorId,
keyPairId: 'unknown',
region: self.region,
chefNodeName: instanceData.server.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ vmwareInstanceBlueprintSchema.methods.launch = function(launchParams, callback)
providerId: self.cloudProviderId,
providerType: self.cloudProviderType,
tagServer: launchParams.tagServer,
monitorId: launchParams.monitorId,
keyPairId: 'unknown',
region: self.region,
chefNodeName: createserverdata["vm_name"],
Expand Down
6 changes: 2 additions & 4 deletions server/app/model/blueprint/blueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,7 @@ BlueprintSchema.methods.launch = function(opts, callback) {
sessionUser: opts.sessionUser,
users: self.users,
blueprintData: self,
tagServer: opts.tagServer,
monitorId: opts.monitorId
tagServer: opts.tagServer
}, function(err, launchData) {
callback(err, launchData);
});
Expand All @@ -368,8 +367,7 @@ BlueprintSchema.methods.launch = function(opts, callback) {
sessionUser: opts.sessionUser,
users: self.users,
blueprintData: self,
tagServer: opts.tagServer,
monitorId: opts.monitorId
tagServer: opts.tagServer
}, function(err, launchData) {
callback(err, launchData);
});
Expand Down
30 changes: 18 additions & 12 deletions server/app/model/d4dmasters/d4dmastersmodelnew.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
Copyright [2016] [Relevance Lab]

Licensed 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.
Expand All @@ -24,12 +24,12 @@ var logger = require('_pr/logger')(module);
var extend = require('mongoose-validator').extend;
var Schema = mongoose.Schema;

extend('is_ValidName', function(val) {
extend('is_ValidName', function (val) {
var pattern = /^[a-zA-Z0-9-_]+$/;
return pattern.test(val);
}, 'Name can contain alphabets, numbers,dash, underscore');

extend('isValidDesc', function(val) {
extend('isValidDesc', function (val) {
var pattern = /^[a-zA-Z0-9-_.,\s]+$/;
return pattern.test(val);
}, 'Name can contain alphabets, numbers,dash, underscore');
Expand Down Expand Up @@ -105,8 +105,8 @@ var d4dMastersOrg = new mongoose.Schema({
},
plannedCost: {
type: Number,
required:false,
default:0.0
required: false,
default: 0.0
},
active: {
type: Boolean,
Expand Down Expand Up @@ -379,9 +379,9 @@ var d4dMastersProjects = new mongoose.Schema({
default: true
},
appdeploy: [{
applicationname: String,
appdescription: String
}],
applicationname: String,
appdescription: String
}],
repositories: {
nexus: [String],
docker: [String]
Expand Down Expand Up @@ -472,6 +472,12 @@ var d4dMastersConfigManagement = new mongoose.Schema({
type: String,
required: true,
trim: true
},
monitorId: {
type: String,
required: false,
trim: true,
default: null
}
}, {
collection: 'd4dmastersnew'
Expand Down Expand Up @@ -534,7 +540,7 @@ var d4dMastersDockerConfig = new mongoose.Schema({
required: false,
trim: true
},
repositories:Schema.Types.Mixed,
repositories: Schema.Types.Mixed,
folderpath: {
type: String,
trim: true
Expand Down Expand Up @@ -1276,7 +1282,7 @@ var d4dMastersNexusServer = new mongoose.Schema({
required: false,
trim: true
},
repositories:Schema.Types.Mixed,
repositories: Schema.Types.Mixed,
orgrowid: {
type: String,
trim: true
Expand Down
4 changes: 2 additions & 2 deletions server/app/model/monitors/monitors.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var MonitorsSchema = new Schema({
}
});

var hiddenFields = { '_id': 0, 'isDeleted': 0 };
var hiddenFields = { 'isDeleted': 0 };

MonitorsSchema.statics.createNew = function createNew(data, callback) {
var self = this;
Expand Down Expand Up @@ -100,7 +100,7 @@ MonitorsSchema.statics.getById = function(monitorId, callback) {
callback(null, null);
return;
} else {
return callback(null, monitors);
return callback(null, monitors[0]);
}
}
);
Expand Down
Loading