layoutConfig.map((layouts) => ({ view: { type: "panel", views: layouts.map((config) => _.merge(config, { type: "panel" })) }, getPosition: _.identity }))
return this.listContainers(options) .filter(_.identity)
port: cred.port, user: cred.username, }, _.identity)) .value(), internal_connection: {
function conformer(f, unf = _.identity) { return { conform: f, unform: unf, gen: () => functions.gen(f) }; }
function mapOf(kpred, vpred, options = {}) { return { conform: _.partial(_conform, kpred, vpred, options), unform: _.identity, gen: () => tcg.object(gen(kpred), gen(vpred)), describe: () => [mapOf.name, ...describe([kpred, vpred])], explain: function*(value, {via}) { yield* explainInvalid(value, kpred, vpred, via); } }; }
function tuple(...predicates) { return { conform: values => (values.length === predicates.length && _.every(_.zip(predicates, values), _.spread(isValid))) ? values : invalidString, unform: _.identity, gen: () => tcg.array(_.map(predicates, gen)), describe: () => [tuple.name, ...describe(predicates)], explain: function*(values, {via}) { yield* explainPredicate(values, predicates, {via}); yield* explainInvalid(values, predicates, via); } }; }
constructor (name, schema) { ow(schema, ow.object.partialShape({ fields: ow.object.valuesOfType(ow.any(ow.object.hasKeys('type'), ow.null, ow.undefined)), access: ow.object.nonEmpty, })) // remove null fields (may be overridden) schema.fields = _.pickBy(schema.fields, _.identity) this.name = name this.schema = schema this._type = GQL_LIST_SCHEMA_TYPE this._keystone = null }
_.chain(aggData[0]) .map(function(item) { return item.Timestamp + ' ' + item.EventType; }) .countBy(_.identity) .value()
function intIn(start, end) { return { conform: value => isValidType(value) && isIntInRange(start, end, value) ? value : invalidString, unform: _.identity, gen: () => tcg.intWithin(start, end - 1), describe: () => ['and', 'isInt', ['isIntInRange', start, end]], explain: function*(value, {via}) { yield* explainType(value, via); yield* explainInvalid(value, start, end, via); } }; }
function createObjectSpec(predicate, gen) { if (isSpec(predicate)) { return predicate; } else { return { conform: (value, unwrap = false) => conform(value, unwrap, _.partial(_.has, predicate)), unform: _.identity, gen }; } }
function star(spec) { return { op: 'star', conform: _.partial(_conform, spec), unform: _.identity, gen: () => tcg.null.then(() => tcg.array(gen(spec), {size: _.random(0, 5)})), describe: () => [star.name, ...describe([spec])], explain: function*(values, {via}) { yield* explainInvalid(values, spec, via); } }; }
function plus(spec) { return { op: 'plus', conform: values => (values.length > 0 && _.every(values, value => isValid(spec, value))) ? values : invalidString, unform: _.identity, gen: () => tcg.null.then(() => tcg.array(gen(spec), {size: _.random(1, 5)})), describe: () => [plus.name, ...describe([spec])], explain: function*(values, {via}) { yield* explainLength(values, via); yield* explainInvalid(values, spec, via); } }; }
function instIn(start, end) { return { conform: value => isInstInRange(start, end, value) ? value : invalidString, unform: _.identity, gen: () => tcg.intWithin(start.getTime(), end.getTime() - 1).then(t => new Date(t)), describe: () => ['and', 'isInst', ['isInstInRange', start, end]], explain: function*(value, {via}) { yield* explainType(value, via); yield* explainInvalid(value, start, end, via); } }; }
constructor (name, schema) { ow(schema, ow.object.partialShape({ fields: ow.object.valuesOfType(ow.any(ow.object.hasKeys('type'), ow.null, ow.undefined)), access: ow.object.nonEmpty, })) // remove null fields (may be overridden) schema.fields = _.pickBy(schema.fields, _.identity) this.name = name this.schema = schema this._type = GQL_LIST_SCHEMA_TYPE this._keystone = null }