open-nomad/ui/mirage/factories/policy.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
484 B
JavaScript
Raw Normal View History

2019-09-26 18:47:07 +00:00
import { Factory } from 'ember-cli-mirage';
import faker from 'nomad-ui/mirage/faker';
export default Factory.extend({
id: () => faker.hacker.verb(),
name() {
return this.id;
},
description: () => (faker.random.number(10) >= 2 ? faker.lorem.sentence() : null),
rules: `
# Allow read only access to the default namespace
namespace "default" {
policy = "read"
}
node {
policy = "read"
}`,
2022-01-05 17:49:15 +00:00
rulesJSON: () => ({
Node: {
Policy: 'read',
},
}),
});