github.com/outbrain/consul@v1.4.5/ui-v2/app/models/policy.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  
     8  const model = Model.extend({
     9    [PRIMARY_KEY]: attr('string'),
    10    [SLUG_KEY]: attr('string'),
    11    Name: attr('string', {
    12      defaultValue: '',
    13    }),
    14    Description: attr('string', {
    15      defaultValue: '',
    16    }),
    17    Rules: attr('string', {
    18      defaultValue: '',
    19    }),
    20    // frontend only for ordering where CreateIndex can't be used
    21    CreateTime: attr('date'),
    22    //
    23    Datacenter: attr('string'),
    24    Datacenters: attr(),
    25    CreateIndex: attr('number'),
    26    ModifyIndex: attr('number'),
    27  });
    28  export const ATTRS = writable(model, ['Name', 'Description', 'Rules', 'Datacenters']);
    29  export default model;