/* * Helper to find the ports we need for the proxy */ const findProxyPorts = (lando, status) => lando.Promise.try(() => { if (_.some(_.values(status))) { return scanPorts(lando, status).then(ports => _.merge(lando.config.proxyCurrentPorts, ports)); } else { return lando.engine.list() .filter(container => container.name === lando.config.proxyContainer) .then(containers => _.isEmpty(containers) ? scanPorts(lando) : lando.config.proxyLastPorts); }; })
return item.add_time; }); list.data = _.values(list.data);
if (_.max(_.values(urlCounts)) > 1) { app.log.error('You cannot assign url %s to more than one service!', _.findKey(urlCounts, c => c > 1));
async.eachSeries(_.values(ActionIndex.actions), (action, callback) => { action.info(req, res, (err, info) => { if (err) {
_send() { const { sendSequence } = this; if (!_.values(sendSequence).length) return; _.forEach(sendSequence, (args, op) => { this.ws.send(JSON.stringify({ op, args })); }); this.sendSequence = {}; }
var _parentsWithNode = function(node,tree){ return _.sortBy(_.filter(_.values(tree),function(check){ return check.lft <= node.lft && check.rgt >= node.rgt; }),"rgt"); }
Pg.DB.Exec("SELECT column_name as col,data_type as type,character_maximum_length as len,numeric_precision as numlen,numeric_scale as digits FROM information_schema.columns WHERE table_name = '"+TableName+"'",function(err,data){ if (err) return done(err); var Info = _.map(data.rows,_.values); var Answ = {}; Info.forEach(function(Arr){ Answ[_.first(Arr)] = _.compact(Arr.splice(1)); }) return done(null,Answ); })
value.forEach(function(VL) { var V = { CodeObj: VL.CodeObj ? Catalogue.GetHtml("obj", VL.CodeObj) : "", CodeGrp: VL.CodeGrp ? Catalogue.GetHtml("grp", VL.CodeGrp) : "", CodeObjType: VL.CodeObjType ? Catalogue.GetHtml("objtype", VL.CodeObjType) : "", } Html.push('<span class="label label-lg flat flatBack1">' + _.compact(_.values(V)).join(":") + '</span>'); })
schema.post('remove', function (doc) { var BindedModels = _.uniq(_.values(refs)); BindedModels.forEach(function(ModelName){ var M = mongoose.model(ModelName), Code = M.cfg().Code; var linkField = "Link_"+model, query = {}, updater = {'$pull':{}}; query[Code] = doc[Code]; updater['$pull'][linkField] = doc._id; M.findOneAndUpdate(query,updater, function(err){ if (err) console.log(err); }) }) })
roomExists(id) { return _.findWhere(_.values(this.state), { id: id }); }
_.map(_.sortBy(_.filter(_.values(Indexed),function(Node){ return Node.lft>N.lft && Node.rgt<N.rgt; }),{lft:1}),"CodeRow")
_.forEach(_.filter(_.values(PeriodsInfo),function(P){ return !_.isEmpty(P.Grps) }),function(P){ INFO_H.PeriodMap[P.CodePeriod] = P.Grps; })
var _children = function(node,tree){ return _.filter(_.values(tree),function(check){ return check.lft>node.lft && check.rgt<node.rgt; }) }