Default state for type, then if there is host-catalog as parent, inherit its type
This commit is contained in:
1 parent
f0b2152130
commit
92b4dccf78
2 files changed
+6
-1
No files matched your search
@@ -12,6 +12,11 @@ export default factory.extend({
|
||||
'remove-hosts',
|
||||
],
|
||||
id: (i) => `host-set-id-${i}`,
|
||||
type() {
|
||||
if (this.hostCatalog) {
|
||||
return this.hostCatalog.type;
|
||||
}
|
||||
},
|
||||
plugin() {
|
||||
if (this.type === 'plugin') {
|
||||
return this.hostCatalog.plugin;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { random, date, datatype } from 'faker';
|
||||
* GeneratedHostSetModelFactory
|
||||
*/
|
||||
export default Factory.extend({
|
||||
type: () => this.hostCatalog.type,
|
||||
type: 'static',
|
||||
name: () => random.words(),
|
||||
description: () => random.words(),
|
||||
created_time: () => date.recent(),
|
||||
|
||||
Reference in new issue
Block a user