Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fireDanger: 'string'
},
session: {
active: 'boolean'
},
derived: {
classes: {
deps: ['something', 'fireDanger', 'active'],
fn: function () {
return this.something + this.active;
}
}
}
});
var Collection = AmpersandCollection.extend({
model: Model
});
var ItemView = AmpersandView.extend({
template: '<li><a href=""></a><span></span><input></li>',
initialize: function () {
// register a misc handler so we can test release
this.listenTo(this.model, 'change:something', function () {});
},
render: function () {
this.renderWithTemplate();
this.el.id = '_' + this.model.id;
return this;
}
});
/* global app */
var AmpCollection = require('ampersand-rest-collection')
var SingleRequest = require('ampersand-collection-single-request-mixin')
var PaginationMixin = require('ampersand-pagination-mixin')
var Member = require('./member')
module.exports = AmpCollection.extend({
model: Member,
url: '/api/members',
data: {
sort: 'id',
limit: 30
},
initialize: function () {
this.url += '?event=' + app.me.selectedEvent
}
}, SingleRequest, PaginationMixin)
console.log("Running JS " + performance.now())
//var Router = require('./router');
//var ConvertModelView = require('./convertToSpatial/model');
var _ = require('underscore');
var AmpersandCollection = require('ampersand-rest-collection');
var Model = require('./models/model');
var Mesh = require('./models/mesh');
var util = require('./forms/util');
console.log("Requesting models " + performance.now())
ModelCollection = AmpersandCollection.extend( {
url: "/models",
comparator: util.alphaNumByName,
model: Model,
ajaxConfig: function () {
return {
xhrFields: {
timeout : 120000
}
};
}
});
PublicModelCollection = AmpersandCollection.extend( {
url: "/publicModels",
comparator: util.alphaNumByName,
var Collection = require('ampersand-rest-collection')
var Log = require('./log')
module.exports = Collection.extend({
url: function () {
return `${this.parent.collection.parent.url}/processes/${this.parent.name}/logs`
},
ajaxConfig: {
xhrFields: {
withCredentials: true
}
},
model: Log
})
var Collection = require('ampersand-rest-collection');
var ModelVersion = require('./model-version');
module.exports = Collection.extend({
model: ModelVersion
});
var app = require('ampersand-app');
var RestCollection = require('ampersand-rest-collection');
var Model = require('./model');
var path = require('path');
module.exports = RestCollection.extend({
model: Model,
url: function () {
return path.join(
app.getApiPath(),
'models',
String(app.me.name)
)
}
});
var Collection = require('ampersand-rest-collection');
var Person = require('./person');
module.exports = Collection.extend({
model: Person,
url: '/api/people'
});
var AmpCollection = require('ampersand-rest-collection')
var tagModel = require('./tag')
module.exports = AmpCollection.extend({
model: tagModel,
url: '/api/tags'
})
var Model = require('./models/model');
var Mesh = require('./models/mesh');
var AmpersandCollection = require('ampersand-rest-collection');
var util = require('./forms/util');
ModelCollection = AmpersandCollection.extend( {
url: "/models",
comparator: util.alphaNumByName,
model: Model,
ajaxConfig: function () {
return {
xhrFields: {
timeout : 120000
}
};
}
});
PublicModelCollection = AmpersandCollection.extend( {
url: "/publicModels",
comparator: util.alphaNumByName,
PublicModelCollection = AmpersandCollection.extend( {
url: "/publicModels",
comparator: util.alphaNumByName,
model: Model,
ajaxConfig: function () {
return {
xhrFields: {
timeout : 120000
}
};
}
});
MeshCollection = AmpersandCollection.extend( {
url: "/meshes",
comparator: util.alphaNumByName,
model: Mesh,
ajaxConfig: function () {
return {
xhrFields: {
timeout : 120000
}
};
}
});
var publicModelCollection = new PublicModelCollection();
var modelCollection = new ModelCollection();
var meshCollection = new MeshCollection();