feat: 🎸 Add host catalog type basic support

Add host catalog type basic support. Delete previous conditional
rendering to just render static types
This commit is contained in:
Carlos Alcaide Corvo committed 2022-01-11 15:34:22 -08:00
1 parent ff9c659ada
commit eb36be3688
4 files changed
+89 -40

No files matched your search

+19 -2
View File
@@ -2,9 +2,26 @@ import GeneratedHostCatalogModel from '../generated/models/host-catalog';
export default class HostCatalogModel extends GeneratedHostCatalogModel {
/**
* Returns if the host-catalog is a plugin or not.
* @type {boolean}
*/
get isStatic() {
return this.type === 'static';
get isPlugin() {
return this.type === 'plugin';
}
/**
* Returns if host-catalog plugin is AWS or not
* @type {boolean}
*/
get isAWS() {
return this.plugin.name === 'aws';
}
/**
* Return if host-catalog plugin is Azure or not.
* @type {boolean}
*/
get isAzure() {
return this.plugin.name === 'azure';
}
}