diff --git a/src/components/DetailCard/index.jsx b/src/components/DetailCard/index.jsx
index 7f5f982a..47cf15e9 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 } from 'lodash';
+import { has, get, isNumber, isBoolean } from 'lodash';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { renderFilterMap } from 'utils/index';
@@ -39,7 +39,10 @@ const getContentValue = (value, dataIndex, data, copyable) => {
(/_?id/g.test(dataIndex.toLowerCase()) && copyable !== false) ||
copyable
) {
- return {value};
+ if (isBoolean(copyable)) {
+ return {value};
+ }
+ return {value};
}
}
return value || '-';
diff --git a/src/components/Form/index.jsx b/src/components/Form/index.jsx
index a28234eb..4254b21f 100644
--- a/src/components/Form/index.jsx
+++ b/src/components/Form/index.jsx
@@ -258,12 +258,13 @@ export default class BaseForm extends React.Component {
callback(true, false);
}
},
- (err) => {
+ (err = {}) => {
this.updateSumbitting(false);
this.responseError = err;
- this.showNotice && Notify.errorWithDetail(err, this.errorText);
+ const { response: { data } = {} } = err;
+ this.showNotice && Notify.errorWithDetail(data, this.errorText);
// eslint-disable-next-line no-console
- console.log('err', err);
+ console.log('err', err, data);
if (callback && isFunction(callback)) {
callback(false, true);
}
diff --git a/src/components/Tables/Base/ActionButton/index.jsx b/src/components/Tables/Base/ActionButton/index.jsx
index fe5a75d9..e91343c6 100644
--- a/src/components/Tables/Base/ActionButton/index.jsx
+++ b/src/components/Tables/Base/ActionButton/index.jsx
@@ -244,7 +244,7 @@ class ActionButton extends Component {
return;
}
const { submitErrorMsg } = this.props.action;
- const { data: responseData } = error.response || error || {};
+ const { data: responseData } = (error || {}).response || error || {};
const realError = responseData || error;
const message = submitErrorMsg
? submitErrorMsg(data, realError)
diff --git a/src/pages/storage/containers/Backup/Detail/BaseDetail.jsx b/src/pages/storage/containers/Backup/Detail/BaseDetail.jsx
index b286b6f5..094a0652 100644
--- a/src/pages/storage/containers/Backup/Detail/BaseDetail.jsx
+++ b/src/pages/storage/containers/Backup/Detail/BaseDetail.jsx
@@ -32,6 +32,9 @@ export default class BaseDetail extends Base {
{
label: t('Volume ID'),
dataIndex: 'volume_id',
+ copyable: {
+ text: this.detailData.volume_id,
+ },
render: (value) => (
{value}