Add mirage support
This commit is contained in:
1 parent
929b020cf7
commit
bb9d99eefb
1 file changed
+5
-1
@@ -5,7 +5,6 @@ import { random, date, internet, datatype } from 'faker';
|
|||||||
* GeneratedHostModelFactory
|
* GeneratedHostModelFactory
|
||||||
*/
|
*/
|
||||||
export default Factory.extend({
|
export default Factory.extend({
|
||||||
type: 'static',
|
|
||||||
name: () => random.words(),
|
name: () => random.words(),
|
||||||
description: () => random.words(),
|
description: () => random.words(),
|
||||||
created_time: () => date.recent(),
|
created_time: () => date.recent(),
|
||||||
@@ -14,4 +13,9 @@ export default Factory.extend({
|
|||||||
attributes: () => {
|
attributes: () => {
|
||||||
return { address: internet.ipv6() };
|
return { address: internet.ipv6() };
|
||||||
},
|
},
|
||||||
|
plugin: function () {
|
||||||
|
if (this.type === 'plugin') {
|
||||||
|
return this.hostCatalog.plugin;
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user