open-nomad/ui/mirage/factories/task.js
2018-05-25 10:15:24 -07:00

17 lines
419 B
JavaScript

import { Factory, faker } from 'ember-cli-mirage';
import { generateResources } from '../common';
const DRIVERS = ['docker', 'java', 'rkt', 'qemu', 'exec', 'raw_exec'];
export default Factory.extend({
// Hidden property used to compute the Summary hash
groupNames: [],
JobID: '',
name: id => `task-${faker.hacker.noun()}-${id}`,
driver: faker.list.random(...DRIVERS),
Resources: generateResources,
});