Files
threshold-ui/addons/api/addon/models/host-catalog.js
T
Carlos Alcaide Corvo eb36be3688 feat: 🎸 Add host catalog type basic support
Add host catalog type basic support. Delete previous conditional
rendering to just render static types
2022-01-11 15:34:22 -08:00

28 lines
587 B
JavaScript

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 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';
}
}