Merge "fix: Fix flavor show for which ram < 1 GB"
This commit is contained in:
commit
c6118d915e
@ -18,6 +18,7 @@ import Base from 'containers/TabDetail';
|
||||
import { flavorCategoryList, flavorArchitectures } from 'resources/flavor';
|
||||
import Members from 'pages/compute/containers/Instance';
|
||||
import { emptyActionConfig } from 'utils/constants';
|
||||
import { formatSize } from 'utils';
|
||||
import actionConfigs from '../actions';
|
||||
import BaseDetail from './BaseDetail';
|
||||
|
||||
@ -63,7 +64,7 @@ export class Detail extends Base {
|
||||
title: t('Memory'),
|
||||
dataIndex: 'ram',
|
||||
isHideable: true,
|
||||
render: (ram) => `${Number.parseInt(ram / 1024, 10)}G`,
|
||||
render: (ram) => formatSize(ram, 2),
|
||||
},
|
||||
{
|
||||
title: t('Public'),
|
||||
|
@ -12,6 +12,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import { formatSize } from 'utils';
|
||||
|
||||
export const cpuPolicyList = {
|
||||
dedicated: t('Dedicated'),
|
||||
shared: t('Shared'),
|
||||
@ -151,7 +153,7 @@ export const getBaseColumns = (self) => [
|
||||
title: t('Memory'),
|
||||
dataIndex: 'ram',
|
||||
isHideable: true,
|
||||
render: (ram) => `${Number.parseInt(ram / 1024, 10)}G`,
|
||||
render: (ram) => formatSize(ram, 2),
|
||||
},
|
||||
{
|
||||
title: t('Internal Network Bandwidth(Gbps)'),
|
||||
|
Loading…
Reference in New Issue
Block a user