diff --git a/src/components/DetailCard/index.jsx b/src/components/DetailCard/index.jsx
index e81ddcd6..ef503fc9 100644
--- a/src/components/DetailCard/index.jsx
+++ b/src/components/DetailCard/index.jsx
@@ -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 {value};
- }
return {value};
}
}
@@ -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 ? {content} : content;
+ return copyable ? (
+ {content}
+ ) : (
+ content
+ );
}
let value = get(data, dataIndex);
if (!render) {
diff --git a/src/containers/TabDetail/index.jsx b/src/containers/TabDetail/index.jsx
index 1ad52647..9fb36b5d 100644
--- a/src/containers/TabDetail/index.jsx
+++ b/src/containers/TabDetail/index.jsx
@@ -356,7 +356,7 @@ export default class DetailBase extends React.Component {
dataIndex.toLowerCase().indexOf('_id') >= 0
) {
desc = (
-
+
{desc}
);
diff --git a/src/pages/network/containers/Certificate/Detail/Container/BaseDetail.jsx b/src/pages/network/containers/Certificate/Detail/Container/BaseDetail.jsx
index bc1e407c..785f0f10 100644
--- a/src/pages/network/containers/Certificate/Detail/Container/BaseDetail.jsx
+++ b/src/pages/network/containers/Certificate/Detail/Container/BaseDetail.jsx
@@ -38,7 +38,9 @@ export class BaseDetail extends Base {
const options = [
{
content: {secret_info.payload}
,
- copyable: true,
+ copyable: {
+ text: secret_info.payload,
+ },
},
];
return {
@@ -56,7 +58,9 @@ export class BaseDetail extends Base {
const options = [
{
content: {secret_info.payload}
,
- copyable: true,
+ copyable: {
+ text: secret_info.payload,
+ },
},
];
return {
diff --git a/src/pages/network/containers/Certificate/Detail/Secret/BaseDetail.jsx b/src/pages/network/containers/Certificate/Detail/Secret/BaseDetail.jsx
index 762240c9..6672f0d0 100644
--- a/src/pages/network/containers/Certificate/Detail/Secret/BaseDetail.jsx
+++ b/src/pages/network/containers/Certificate/Detail/Secret/BaseDetail.jsx
@@ -33,7 +33,9 @@ export class BaseDetail extends Base {
const options = [
{
content: {payload}
,
- copyable: true,
+ copyable: {
+ text: payload,
+ },
},
];
return {
diff --git a/src/pages/network/containers/LoadBalancers/LoadBalancerInstance/actions/Delete.jsx b/src/pages/network/containers/LoadBalancers/LoadBalancerInstance/actions/Delete.jsx
index 810dd257..7c27ba42 100644
--- a/src/pages/network/containers/LoadBalancers/LoadBalancerInstance/actions/Delete.jsx
+++ b/src/pages/network/containers/LoadBalancers/LoadBalancerInstance/actions/Delete.jsx
@@ -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'
);
};