diff --git a/.gitignore b/.gitignore index 2678a58e..f9e91950 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ coverage test/e2e/results test/e2e/report *.qcow2 +/packages # config test/e2e/config/local_config.yaml diff --git a/config/webpack.dev.js b/config/webpack.dev.js index 01e0e2b3..0552b56f 100644 --- a/config/webpack.dev.js +++ b/config/webpack.dev.js @@ -47,6 +47,9 @@ module.exports = (env) => { target: 'http://localhost', changeOrigin: true, secure: false, + headers: { + Connection: 'keep-alive', + }, }, }; } diff --git a/src/locales/en.json b/src/locales/en.json index c67c21b9..f66c41c4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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", diff --git a/src/locales/zh.json b/src/locales/zh.json index 885e8a92..da24d745 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -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": "云硬盘", diff --git a/src/pages/compute/containers/Hypervisors/Hypervisor/Detail/index.jsx b/src/pages/compute/containers/Hypervisors/Hypervisor/Detail/index.jsx index 785a932b..7f57a3ec 100644 --- a/src/pages/compute/containers/Hypervisors/Hypervisor/Detail/index.jsx +++ b/src/pages/compute/containers/Hypervisors/Hypervisor/Detail/index.jsx @@ -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' ? ( + + - + + ) : ( + `${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' ? ( + + - + + ) : ( + `${record.memory_mb_used_gb} / ${record.memory_mb_gb}` + ), }, ]; } diff --git a/src/resources/hypervisor.jsx b/src/resources/hypervisor.jsx index c6d26619..a055deab 100644 --- a/src/resources/hypervisor.jsx +++ b/src/resources/hypervisor.jsx @@ -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) => ( - - ), + render: (value, record) => + record.hypervisor_type === 'ironic' ? ( + + - + + ) : ( + + ), 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) => ( - - ), + render: (value, record) => + record.hypervisor_type === 'ironic' ? ( + + - + + ) : ( + + ), width: 180, stringify: (value, record) => `${value}% (${t('Used')}: ${record.memory_mb_used_gb} / ${t('Total')}: ${