fix: Fix copyable and delete lb
1. Fix copyable in Paragraph 2. Rollback permission of delete loadbalancers Change-Id: I2621974d64e9c149c7138c0f2d3da301bdf0d73e
This commit is contained in:
parent
339468d054
commit
16d14b5cf1
@ -15,7 +15,7 @@
|
||||
import React from 'react';
|
||||
import { Row, Col, Skeleton, Tooltip, Typography, Popover } from 'antd';
|
||||
import { InfoCircleOutlined } from '@ant-design/icons';
|
||||
import { has, get, isNumber, isBoolean } from 'lodash';
|
||||
import { has, get, isNumber } from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import { renderFilterMap } from 'utils/index';
|
||||
@ -39,9 +39,6 @@ const getContentValue = (value, dataIndex, data, copyable) => {
|
||||
(/_?id/g.test(dataIndex.toLowerCase()) && copyable !== false) ||
|
||||
copyable
|
||||
) {
|
||||
if (isBoolean(copyable)) {
|
||||
return <Paragraph copyable>{value}</Paragraph>;
|
||||
}
|
||||
return <Paragraph copyable={copyable}>{value}</Paragraph>;
|
||||
}
|
||||
}
|
||||
@ -51,7 +48,11 @@ const getContentValue = (value, dataIndex, data, copyable) => {
|
||||
const getContent = (data, option) => {
|
||||
const { content, dataIndex, render, valueRender, copyable } = option;
|
||||
if (has(option, 'content')) {
|
||||
return copyable ? <Paragraph copyable>{content}</Paragraph> : content;
|
||||
return copyable ? (
|
||||
<Paragraph copyable={copyable}>{content}</Paragraph>
|
||||
) : (
|
||||
content
|
||||
);
|
||||
}
|
||||
let value = get(data, dataIndex);
|
||||
if (!render) {
|
||||
|
@ -356,7 +356,7 @@ export default class DetailBase extends React.Component {
|
||||
dataIndex.toLowerCase().indexOf('_id') >= 0
|
||||
) {
|
||||
desc = (
|
||||
<Paragraph style={{ margin: 0 }} copyable>
|
||||
<Paragraph style={{ margin: 0 }} copyable={copyable}>
|
||||
{desc}
|
||||
</Paragraph>
|
||||
);
|
||||
|
@ -38,7 +38,9 @@ export class BaseDetail extends Base {
|
||||
const options = [
|
||||
{
|
||||
content: <pre>{secret_info.payload}</pre>,
|
||||
copyable: true,
|
||||
copyable: {
|
||||
text: secret_info.payload,
|
||||
},
|
||||
},
|
||||
];
|
||||
return {
|
||||
@ -56,7 +58,9 @@ export class BaseDetail extends Base {
|
||||
const options = [
|
||||
{
|
||||
content: <pre>{secret_info.payload}</pre>,
|
||||
copyable: true,
|
||||
copyable: {
|
||||
text: secret_info.payload,
|
||||
},
|
||||
},
|
||||
];
|
||||
return {
|
||||
|
@ -33,7 +33,9 @@ export class BaseDetail extends Base {
|
||||
const options = [
|
||||
{
|
||||
content: <pre>{payload}</pre>,
|
||||
copyable: true,
|
||||
copyable: {
|
||||
text: payload,
|
||||
},
|
||||
},
|
||||
];
|
||||
return {
|
||||
|
@ -55,8 +55,7 @@ export default class DeleteAction extends ConfirmAction {
|
||||
return true;
|
||||
}
|
||||
return (
|
||||
(this.isCurrentProject(item) &&
|
||||
['ACTIVE', 'PENDING_UPDATE'].includes(item.provisioning_status)) ||
|
||||
(this.isCurrentProject(item) && item.provisioning_status === 'ACTIVE') ||
|
||||
item.provisioning_status === 'ERROR'
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user