diff --git a/scm-ui/src/admin/plugins/containers/PluginsOverview.js b/scm-ui/src/admin/plugins/containers/PluginsOverview.js index e9958bc358..29c23be159 100644 --- a/scm-ui/src/admin/plugins/containers/PluginsOverview.js +++ b/scm-ui/src/admin/plugins/containers/PluginsOverview.js @@ -173,7 +173,7 @@ class PluginsOverview extends React.Component { key={"updateAll"} icon={"sync-alt"} label={this.computeUpdateAllSize()} - onClick={() => this.setState({ showUpdateAllModal: true })} + action={() => this.setState({ showUpdateAllModal: true })} /> ); } @@ -195,8 +195,30 @@ class PluginsOverview extends React.Component { }; render() { - const { loading, error, collection, pendingPlugins } = this.props; + const { loading, error, collection } = this.props; + if (error) { + return ; + } + + if (!collection || loading) { + return ; + } + + const actions = this.createActions(); + return ( + <> + {this.renderHeader(actions)} +
+ {this.renderPluginsList()} + {this.renderFooter(actions)} + {this.renderModals()} + + ); + } + + renderModals = () => { + const { collection, pendingPlugins } = this.props; const { showPendingModal, showCancelModal, @@ -229,25 +251,7 @@ class PluginsOverview extends React.Component { /> ); } - - if (error) { - return ; - } - - if (!collection || loading) { - return ; - } - - const actions = this.createActions(); - return ( - <> - {this.renderHeader(actions)} -
- {this.renderPluginsList()} - {this.renderFooter(actions)} - - ); - } + }; renderPluginsList() { const { collection, t } = this.props;