github.com/manicqin/nomad@v0.9.5/ui/mirage/factories/policy.js (about)

     1  import { Factory } from 'ember-cli-mirage';
     2  import faker from 'nomad-ui/mirage/faker';
     3  
     4  export default Factory.extend({
     5    id: () => faker.hacker.verb(),
     6    name() {
     7      return this.id;
     8    },
     9    description: () => (faker.random.number(10) >= 2 ? faker.lorem.sentence() : null),
    10    rules: `
    11  # Allow read only access to the default namespace
    12  namespace "default" {
    13      policy = "read"
    14  }
    15  
    16  node {
    17      policy = "read"
    18  }`,
    19  });