aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js')
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js
index 8c239e9d812..7d10b92b669 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js
@@ -20,7 +20,7 @@
/* @flow */
import React from 'react';
import Tooltip from '../../../components/controls/Tooltip';
-import DeleteIcon from '../../../components/icons-components/DeleteIcon';
+import { DeleteButton } from '../../../components/ui/buttons';
import { translate } from '../../../helpers/l10n';
/*::
@@ -41,12 +41,6 @@ export default class Stats extends React.PureComponent {
/*:: props: Props; */
/*:: state: State; */
- handleCancelAllPending = (event /*: Object */) => {
- event.preventDefault();
- event.currentTarget.blur();
- this.props.onCancelAllPending();
- };
-
handleShowFailing = (event /*: Object */) => {
event.preventDefault();
event.currentTarget.blur();
@@ -65,12 +59,10 @@ export default class Stats extends React.PureComponent {
{translate('background_tasks.pending')}
{this.props.isSystemAdmin && (
<Tooltip overlay={translate('background_tasks.cancel_all_tasks')}>
- <a
- className="js-cancel-pending spacer-left link-no-underline"
- href="#"
- onClick={this.handleCancelAllPending}>
- <DeleteIcon className="text-text-top" />
- </a>
+ <DeleteButton
+ className="js-cancel-pending spacer-left"
+ onClick={this.props.onCancelAllPending}
+ />
</Tooltip>
)}
</span>