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