Skip to content

Commit

Permalink
Re-running prettier with no trailing comma.
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-fox committed Feb 1, 2019
1 parent a583d49 commit c048e0f
Show file tree
Hide file tree
Showing 44 changed files with 387 additions and 387 deletions.
24 changes: 12 additions & 12 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ config.endpoint = {
checkPath: '/check',
versionPath: '/version',
logPath: '/admin/log',
metricsPath: '/admin/metrics',
metricsPath: '/admin/metrics'
};

/**
Expand All @@ -64,7 +64,7 @@ config.mongo = {
// The URI to use for the database connection. It supports replica set URIs.
// mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
// I.e.: 'mongodb://user:pass@host1:27017,host2:27018,host3:27019/cep?replicaSet=myrep'
url: 'mongodb://localhost:27017/cep',
url: 'mongodb://localhost:27017/cep'
};

/**
Expand All @@ -74,7 +74,7 @@ config.orionDb = {
url: 'mongodb://localhost:27017/orion',
collection: 'entities',
prefix: 'orion',
batchSize: 500,
batchSize: 500
};

/**
Expand All @@ -86,7 +86,7 @@ config.orionDb = {
config.perseoCore = {
rulesURL: 'http://localhost:8080/perseo-core/rules',
noticesURL: 'http://localhost:8080/perseo-core/events',
interval: 60e3 * 5,
interval: 60e3 * 5
};
/**
* NEXT EPL core options (with HA)
Expand Down Expand Up @@ -117,8 +117,8 @@ config.smtp = {
*/
tls: {
// keep rejectUnauthorized to false when secure is also false
rejectUnauthorized: false,
},
rejectUnauthorized: false
}
};

/**
Expand All @@ -128,7 +128,7 @@ config.sms = {
URL: 'http://sms-endpoint/smsoutbound',
API_KEY: '',
API_SECRET: '',
from: 'tel:22012;phone-context=+34',
from: 'tel:22012;phone-context=+34'
};

/**
Expand All @@ -140,14 +140,14 @@ config.smpp = {
systemid: '',
password: '',
from: '346666666',
enabled: false,
enabled: false
};

/**
* Orion (Context Broker) endpoint options
*/
config.orion = {
URL: 'http://orion-endpoint:1026/NGSI10/updateContext',
URL: 'http://orion-endpoint:1026/NGSI10/updateContext'
};

/**
Expand All @@ -157,7 +157,7 @@ config.authentication = {
host: 'keystone',
port: '5001',
user: 'user',
password: 'password',
password: 'password'
};

/**
Expand All @@ -166,7 +166,7 @@ config.authentication = {
*/
config.collections = {
rules: 'rules',
executions: 'executions',
executions: 'executions'
};

/**
Expand Down Expand Up @@ -200,7 +200,7 @@ config.checkDB = {
delay: 5e3,
reconnectTries: 1e3,
reconnectInterval: 5e3,
bufferMaxEntries: 5,
bufferMaxEntries: 5
};

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ module.exports = {
CORRELATOR_HEADER: 'fiware-correlator',
AUTH_HEADER: 'X-Auth-Token',
REALIP_HEADER: 'X-Real-IP',
COMPONENT_NAME: 'perseo-fe',
COMPONENT_NAME: 'perseo-fe'
};
10 changes: 5 additions & 5 deletions lib/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ function getDbAux(url, component, callback) {
{
db: {
bufferMaxEntries: config.checkDB.bufferMaxEntries,
domainsEnabled: true,
domainsEnabled: true
},
server: {
reconnectTries: config.checkDB.reconnectTries,
reconnectInterval: config.checkDB.reconnectInterval,
domainsEnabled: true,
},
domainsEnabled: true
}
},
function(err, db) {
if (err) {
Expand Down Expand Up @@ -124,9 +124,9 @@ function setUp(cbSU) {
ensureIndex.bind(null, rulesCollection, {
name: 1,
subservice: 1,
service: 1,
service: 1
}),
ensureIndexTTL.bind(null, executionsCollection, { lastTime: 1 }, config.executionsTTL),
ensureIndexTTL.bind(null, executionsCollection, { lastTime: 1 }, config.executionsTTL)
],
cbSU
);
Expand Down
2 changes: 1 addition & 1 deletion lib/middleware/logRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ exports.middleware = function() {
headers: req.headers,
body: req.body,
subservice: req.subservice,
service: req.service,
service: req.service
});
next();
};
Expand Down
4 changes: 2 additions & 2 deletions lib/models/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function conditionalExec(task, lastTime, callbackW) {
return callbackS(localError, null);
}
},
executionsStore.Update.bind(null, task),
executionsStore.Update.bind(null, task)
],
callbackW
);
Expand Down Expand Up @@ -255,7 +255,7 @@ function DoAction(event, callback) {
queue.push({
action: actions[i],
event: event,
context: event.fiwarePerseoContext,
context: event.fiwarePerseoContext
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion lib/models/actionsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
}
return callback(null, data.action);
});
},
}
};
/**
* Constructors for possible errors from this module
Expand Down
2 changes: 1 addition & 1 deletion lib/models/emailAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function buildMailOptions(action, event) {
from: myutils.expandVar(action.parameters.from, event),
to: myutils.expandVar(action.parameters.to, event),
subject: myutils.expandVar(action.parameters.subject || '', event),
text: myutils.expandVar(action.template, event),
text: myutils.expandVar(action.template, event)
};
}

Expand Down
6 changes: 3 additions & 3 deletions lib/models/entitiesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function findSilentEntities(service, subservice, ruleData, func, callback) {

db = orionServiceDb(service);
criterion['attrs.' + ruleData.attribute + '.modDate'] = {
$lt: Date.now() / 1000 - ruleData.reportInterval,
$lt: Date.now() / 1000 - ruleData.reportInterval
};
criterion['_id.servicePath'] = subservice;
if (ruleData.id) {
Expand Down Expand Up @@ -76,7 +76,7 @@ function findSilentEntities(service, subservice, ruleData, func, callback) {
func(one);
count++;
});
},
}
],
function(err, result) {
logger.debug(context, 'findSilentEntities %s', myutils.firstChars(result));
Expand All @@ -86,5 +86,5 @@ function findSilentEntities(service, subservice, ruleData, func, callback) {
}

module.exports = {
FindSilentEntities: findSilentEntities,
FindSilentEntities: findSilentEntities
};
10 changes: 5 additions & 5 deletions lib/models/executionsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = {
col.findOne(
{
$query: { name: ruleName, subservice: subservice, service: service, id: id, index: index },
$orderby: { lastTime: -1 },
$orderby: { lastTime: -1 }
},
function(err, data) {
myutils.logErrorIf(err);
Expand Down Expand Up @@ -77,7 +77,7 @@ module.exports = {
service: service,
id: id,
notice: noticeId,
index: index,
index: index
},
function(err, data) {
myutils.logErrorIf(err);
Expand Down Expand Up @@ -108,19 +108,19 @@ module.exports = {
service: service,
id: id,
notice: noticeId,
index: index,
index: index
},
{ $currentDate: { lastTime: true } },
{ upsert: true },
cb
);
},
}
],
function(err, result) {
myutils.logErrorIf(err);
logger.info('executionsStore.Update %j', result);
return callback(err, result);
}
);
},
}
};
18 changes: 9 additions & 9 deletions lib/models/keystone.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ function getToken(trust, callback) {
password: {
user: {
domain: {
name: 'admin_domain',
name: 'admin_domain'
},
name: config.authentication.user,
password: config.authentication.password,
},
},
password: config.authentication.password
}
}
},
scope: {
'OS-TRUST:trust': {
id: trust,
},
},
},
},
id: trust
}
}
}
}
};

logger.debug('retrieving token from Keystone using trust [%s]', trust);
Expand Down
4 changes: 2 additions & 2 deletions lib/models/noSignal.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function alertFunc(nsLineRule, entity) {
ruleName: nsLineRule[NAME],
reportInterval: nsLineRule[REPORT_INTERVAL],
id: entity._id.id,
type: entity._id.type,
type: entity._id.type
};

// Search for modDate of the entity's attribute
Expand Down Expand Up @@ -110,7 +110,7 @@ function checkNoSignal(period) {
id: nsrule[ID],
idRegexp: nsrule[ID_REGEXP],
type: nsrule[TYPE],
reportInterval: nsrule[REPORT_INTERVAL],
reportInterval: nsrule[REPORT_INTERVAL]
},
alertFunc.bind({}, nsrule),
function(err, data) {
Expand Down
8 changes: 4 additions & 4 deletions lib/models/notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function parseLocation(locStr) {
lat: lat,
lon: lon,
x: utmResult.coord.x,
y: utmResult.coord.y,
y: utmResult.coord.y
};
}

Expand Down Expand Up @@ -101,7 +101,7 @@ function parseDate(isoStr) {
hourUTC: date.getUTCHours(),
minuteUTC: date.getUTCMinutes(),
secondUTC: date.getUTCSeconds(),
millisecondUTC: date.getUTCMilliseconds(),
millisecondUTC: date.getUTCMilliseconds()
};
}
}
Expand Down Expand Up @@ -385,7 +385,7 @@ function DoNotice(orionN, callback) {
{
url: config.perseoCore.noticesURL,
json: notice,
headers: h,
headers: h
},
function(err, data) {
if (err) {
Expand All @@ -402,7 +402,7 @@ function DoNotice(orionN, callback) {
{
url: config.nextCore.noticesURL,
json: notice,
headers: h,
headers: h
},
myutils.logErrorIf
);
Expand Down
4 changes: 2 additions & 2 deletions lib/models/postAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function buildPostOptions(action, event) {
method: action.parameters.method || 'post',
url: myutils.expandVar(action.parameters.url, event),
qs: myutils.expandObject(action.parameters.qs, event),
headers: myutils.expandObject(action.parameters.headers, event),
headers: myutils.expandObject(action.parameters.headers, event)
};

if (action.parameters.json) {
Expand All @@ -50,7 +50,7 @@ function doIt(action, event, callback) {
requestOptions = {
url: options.url,
qs: options.qs,
headers: options.headers,
headers: options.headers
};
if (options.json) {
requestOptions.json = true;
Expand Down
Loading

0 comments on commit c048e0f

Please sign in to comment.