diff --git a/src/components/Tables/Base/ActionButton/index.jsx b/src/components/Tables/Base/ActionButton/index.jsx index 53decebb..138443dc 100644 --- a/src/components/Tables/Base/ActionButton/index.jsx +++ b/src/components/Tables/Base/ActionButton/index.jsx @@ -64,6 +64,7 @@ export class ActionButton extends Component { isAllowed: PropTypes.bool, needHide: PropTypes.bool, buttonType: PropTypes.string, + isDanger: PropTypes.bool, items: PropTypes.array, isBatch: PropTypes.bool, path: PropTypes.string, @@ -83,6 +84,7 @@ export class ActionButton extends Component { confirm: false, needHide: true, buttonType: 'link', + isDanger: false, isLink: false, items: [], isBatch: false, @@ -493,7 +495,7 @@ export class ActionButton extends Component { name, id, title, - danger, + isDanger, style, maxLength, isFirstAction, @@ -509,7 +511,7 @@ export class ActionButton extends Component { const button = ( diff --git a/src/components/Tables/Base/ItemActionButtons/index.jsx b/src/components/Tables/Base/ItemActionButtons/index.jsx index cdf6dfe4..e9193568 100644 --- a/src/components/Tables/Base/ItemActionButtons/index.jsx +++ b/src/components/Tables/Base/ItemActionButtons/index.jsx @@ -32,7 +32,7 @@ function getActionConf(action) { name: buttonText || title, actionType, action, - danger: isDanger, + isDanger, }; } diff --git a/src/pages/compute/containers/Instance/actions/Reboot.jsx b/src/pages/compute/containers/Instance/actions/Reboot.jsx index f39414ef..04ef73e7 100644 --- a/src/pages/compute/containers/Instance/actions/Reboot.jsx +++ b/src/pages/compute/containers/Instance/actions/Reboot.jsx @@ -35,6 +35,10 @@ export default class RebootAction extends ConfirmAction { return t('reboot instance'); } + get isDanger() { + return true; + } + get passiveAction() { return t('be rebooted'); } diff --git a/src/pages/compute/containers/Instance/actions/Resize.jsx b/src/pages/compute/containers/Instance/actions/Resize.jsx index a5cf2129..fffa3893 100644 --- a/src/pages/compute/containers/Instance/actions/Resize.jsx +++ b/src/pages/compute/containers/Instance/actions/Resize.jsx @@ -29,6 +29,8 @@ export class Resize extends ModalAction { static title = t('Resize'); + static isDanger = true; + init() { this.store = globalFlavorStore; } diff --git a/src/pages/compute/containers/Instance/actions/ResizeOnline.jsx b/src/pages/compute/containers/Instance/actions/ResizeOnline.jsx index a231b4bd..56ca4469 100644 --- a/src/pages/compute/containers/Instance/actions/ResizeOnline.jsx +++ b/src/pages/compute/containers/Instance/actions/ResizeOnline.jsx @@ -30,6 +30,8 @@ export class ResizeOnline extends ModalAction { static title = t('Online Resize'); + static isDanger = true; + init() { this.store = globalFlavorStore; }