github.com/outbrain/consul@v1.4.5/ui-v2/app/models/intention.js (about) 1 import Model from 'ember-data/model'; 2 import attr from 'ember-data/attr'; 3 import writable from 'consul-ui/utils/model/writable'; 4 5 export const PRIMARY_KEY = 'uid'; 6 export const SLUG_KEY = 'ID'; 7 const model = Model.extend({ 8 [PRIMARY_KEY]: attr('string'), 9 [SLUG_KEY]: attr('string'), 10 Description: attr('string'), 11 SourceNS: attr('string'), 12 SourceName: attr('string'), 13 DestinationName: attr('string'), 14 DestinationNS: attr('string'), 15 Precedence: attr('number'), 16 SourceType: attr('string', { defaultValue: 'consul' }), 17 Action: attr('string', { defaultValue: 'deny' }), 18 DefaultAddr: attr('string'), 19 DefaultPort: attr('number'), 20 Meta: attr(), 21 Datacenter: attr('string'), 22 CreatedAt: attr('date'), 23 UpdatedAt: attr('date'), 24 CreateIndex: attr('number'), 25 ModifyIndex: attr('number'), 26 }); 27 export const ATTRS = writable(model, [ 28 'Action', 29 'SourceName', 30 'DestinationName', 31 'SourceType', 32 'Description', 33 ]); 34 export default model;