fix: Hide vCPUs & ram in hypervisor
vCPUs and ram are not used for bare metal scheduling Change-Id: I7272aad91429828f2fae4d44e3bf9552fe63741c
This commit is contained in:
parent
5d69f66eac
commit
3069f72333
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,6 +13,7 @@ coverage
|
|||||||
test/e2e/results
|
test/e2e/results
|
||||||
test/e2e/report
|
test/e2e/report
|
||||||
*.qcow2
|
*.qcow2
|
||||||
|
/packages
|
||||||
|
|
||||||
# config
|
# config
|
||||||
test/e2e/config/local_config.yaml
|
test/e2e/config/local_config.yaml
|
||||||
|
@ -47,6 +47,9 @@ module.exports = (env) => {
|
|||||||
target: 'http://localhost',
|
target: 'http://localhost',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
secure: false,
|
secure: false,
|
||||||
|
headers: {
|
||||||
|
Connection: 'keep-alive',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1990,6 +1990,7 @@
|
|||||||
"users": "users",
|
"users": "users",
|
||||||
"vCPU": "vCPU",
|
"vCPU": "vCPU",
|
||||||
"vCPUs": "vCPUs",
|
"vCPUs": "vCPUs",
|
||||||
|
"vCPUs and ram are not used for bare metal scheduling": "vCPUs and ram are not used for bare metal scheduling",
|
||||||
"virtual adapter": "virtual adapter",
|
"virtual adapter": "virtual adapter",
|
||||||
"virtual adapters": "virtual adapters",
|
"virtual adapters": "virtual adapters",
|
||||||
"volume": "volume",
|
"volume": "volume",
|
||||||
|
@ -1990,6 +1990,7 @@
|
|||||||
"users": "用户",
|
"users": "用户",
|
||||||
"vCPU": "虚拟CPU",
|
"vCPU": "虚拟CPU",
|
||||||
"vCPUs": "虚拟CPU",
|
"vCPUs": "虚拟CPU",
|
||||||
|
"vCPUs and ram are not used for bare metal scheduling": "vCPUs 和 ram 不用于裸机调度",
|
||||||
"virtual adapter": "虚拟网卡",
|
"virtual adapter": "虚拟网卡",
|
||||||
"virtual adapters": "虚拟网卡",
|
"virtual adapters": "虚拟网卡",
|
||||||
"volume": "云硬盘",
|
"volume": "云硬盘",
|
||||||
|
@ -12,10 +12,12 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { HypervisorStore } from 'stores/nova/hypervisor';
|
import { HypervisorStore } from 'stores/nova/hypervisor';
|
||||||
import Base from 'containers/TabDetail';
|
import Base from 'containers/TabDetail';
|
||||||
import Members from 'pages/compute/containers/Instance';
|
import Members from 'pages/compute/containers/Instance';
|
||||||
|
import { Tooltip } from 'antd';
|
||||||
|
|
||||||
export class HypervisorDetail extends Base {
|
export class HypervisorDetail extends Base {
|
||||||
get name() {
|
get name() {
|
||||||
@ -43,13 +45,30 @@ export class HypervisorDetail extends Base {
|
|||||||
{
|
{
|
||||||
title: t('VCPU (Core)'),
|
title: t('VCPU (Core)'),
|
||||||
dataIndex: 'vcpus_used_percent',
|
dataIndex: 'vcpus_used_percent',
|
||||||
render: (value, record) => `${record.vcpus_used} / ${record.vcpus}`,
|
render: (value, record) =>
|
||||||
|
record.hypervisor_type === 'ironic' ? (
|
||||||
|
<Tooltip
|
||||||
|
title={t('vCPUs and ram are not used for bare metal scheduling')}
|
||||||
|
>
|
||||||
|
<span>-</span>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
`${record.vcpus_used} / ${record.vcpus}`
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('Configured Memory (GB)'),
|
title: t('Configured Memory (GB)'),
|
||||||
dataIndex: 'memory_mb_percent',
|
dataIndex: 'memory_mb_percent',
|
||||||
render: (value, record) =>
|
render: (value, record) =>
|
||||||
`${record.memory_mb_used_gb} / ${record.memory_mb_gb}`,
|
record.hypervisor_type === 'ironic' ? (
|
||||||
|
<Tooltip
|
||||||
|
title={t('vCPUs and ram are not used for bare metal scheduling')}
|
||||||
|
>
|
||||||
|
<span>-</span>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
|
`${record.memory_mb_used_gb} / ${record.memory_mb_gb}`
|
||||||
|
),
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Progress from 'components/Progress';
|
import Progress from 'components/Progress';
|
||||||
|
import { Tooltip } from 'antd';
|
||||||
|
|
||||||
export const hypervisorColumns = [
|
export const hypervisorColumns = [
|
||||||
{
|
{
|
||||||
@ -27,7 +28,14 @@ export const hypervisorColumns = [
|
|||||||
{
|
{
|
||||||
title: t('VCPU (Core)'),
|
title: t('VCPU (Core)'),
|
||||||
dataIndex: 'vcpus_used_percent',
|
dataIndex: 'vcpus_used_percent',
|
||||||
render: (value, record) => (
|
render: (value, record) =>
|
||||||
|
record.hypervisor_type === 'ironic' ? (
|
||||||
|
<Tooltip
|
||||||
|
title={t('vCPUs and ram are not used for bare metal scheduling')}
|
||||||
|
>
|
||||||
|
<span>-</span>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
<Progress
|
<Progress
|
||||||
value={value}
|
value={value}
|
||||||
label={`${record.vcpus_used} / ${record.vcpus}`}
|
label={`${record.vcpus_used} / ${record.vcpus}`}
|
||||||
@ -42,7 +50,14 @@ export const hypervisorColumns = [
|
|||||||
{
|
{
|
||||||
title: t('Configured Memory (GB)'),
|
title: t('Configured Memory (GB)'),
|
||||||
dataIndex: 'memory_mb_percent',
|
dataIndex: 'memory_mb_percent',
|
||||||
render: (value, record) => (
|
render: (value, record) =>
|
||||||
|
record.hypervisor_type === 'ironic' ? (
|
||||||
|
<Tooltip
|
||||||
|
title={t('vCPUs and ram are not used for bare metal scheduling')}
|
||||||
|
>
|
||||||
|
<span>-</span>
|
||||||
|
</Tooltip>
|
||||||
|
) : (
|
||||||
<Progress
|
<Progress
|
||||||
value={value}
|
value={value}
|
||||||
label={`${record.memory_mb_used_gb} / ${record.memory_mb_gb}`}
|
label={`${record.memory_mb_used_gb} / ${record.memory_mb_gb}`}
|
||||||
|
Loading…
Reference in New Issue
Block a user