fix: fix the heat tab in the system info

When the heat service is diabled, hide the heat tab in the system info

Change-Id: I87cd2dbdc7c3213accd6f6944a3cd84683fcbba7
This commit is contained in:
Jingwei.Zhang 2022-07-25 10:38:43 +08:00
parent bb133015a3
commit c9a1999f5f

View File

@ -25,6 +25,10 @@ export class Service extends Base {
return this.props.rootStore.checkEndpoint('cinder');
}
get enableHeat() {
return this.props.rootStore.checkEndpoint('heat');
}
get tabs() {
const tabs = [
{
@ -42,19 +46,21 @@ export class Service extends Base {
key: 'neutronAgent',
component: NeutronAgent,
},
{
title: t('Orchestration Services'),
key: 'heatService',
component: HeatService,
},
];
if (this.enableCinder) {
tabs.splice(3, 0, {
tabs.push({
title: t('Block Storage Services'),
key: 'cinderService',
component: CinderService,
});
}
if (this.enableHeat) {
tabs.push({
title: t('Orchestration Services'),
key: 'heatService',
component: HeatService,
});
}
return tabs;
}
}