Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import Validator from '../../mixins/model-validator';
export default Model.extend(Validator, {
anInteger: attr('number'),
anIntegerLessThan4: attr('number'),
anIntegerGreaterThan4: attr('number'),
anIntegerGreaterThanOrEqual7: attr('number'),
anIntegerLessThanOrEqual6: attr('number'),
aTenNumber: attr('number'),
anOddNumber: attr('number'),
anEvenNumber: attr('number'),
anOptionalNumber: attr('number'),
init() {
this._super(...arguments);
this.validations = {
anInteger: {
numericality: { onlyInteger: true }
},
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import Validator from '../../mixins/model-validator';
export default Model.extend(Validator, {
fullName: attr('string'),
fruit: attr('string'),
color: attr('string'),
init() {
this._super(...arguments);
this.validations = {
fullName: {
presence: true
},
fruit: {
presence: true
}
};
}
});
import attr from 'ember-data/attr'
import Model from 'ember-data/model'
import {hasMany} from 'ember-data/relationships'
export default Model.extend({
label: attr('string'),
models: hasMany('model'),
view: attr()
})
import attr from 'ember-data/attr'
import Model from 'ember-data/model'
import {hasMany} from 'ember-data/relationships'
export default Model.extend({
label: attr('string'),
models: hasMany('model'),
value: attr()
})
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
import { resourceAction } from 'ember-custom-actions';
export default Model.extend({
name: attr(),
burnAll: resourceAction('burn', { method: 'GET' })
});
import Model from 'ember-data/model';
export default Model.extend({
});
import Model from 'ember-data/model';
import { customAction } from 'ember-custom-actions';
export default Model.extend({
drive: customAction('drive'),
clean: customAction('clean'),
fix: customAction('fix'),
moveAll: customAction('move-all'),
cleanAll: customAction('clean-all'),
fixAll: customAction('fixAll')
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
export const PRIMARY_KEY = 'uid';
export const SLUG_KEY = 'Node,ServiceID';
export default Model.extend({
[PRIMARY_KEY]: attr('string'),
ID: attr('string'),
ServiceName: attr('string'),
ServiceID: attr('string'),
Node: attr('string'),
ServiceProxy: attr(),
SyncTime: attr('number'),
Datacenter: attr('string'),
Namespace: attr('string'),
});
import Model from "ember-data/model";
import attr from "ember-data/attr";
export default Model.extend({
name: attr("string"),
payload: attr("string"),
createdAt: attr("date", {
defaultValue() {
return new Date();
},
}),
});
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
export const PRIMARY_KEY = 'uid';
export const SLUG_KEY = 'ID';
export default Model.extend({
[PRIMARY_KEY]: attr('string'),
[SLUG_KEY]: attr('string'),
Name: attr('string'),
Node: attr('string'),
CreateIndex: attr('number'),
ModifyIndex: attr('number'),
LockDelay: attr('number'),
Behavior: attr('string'),
TTL: attr('string'),
Checks: attr({
defaultValue: function() {
return [];
},
}),
Datacenter: attr('string'),
Namespace: attr('string'),