diff --git a/CHANGELOG.md b/CHANGELOG.md index c61f24424..8b0e6a17a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Move the copy clipboard of the VM's UUID to the header [#3221](https://github.com/vatesfr/xen-orchestra/issues/3221) (PR [#3248](https://github.com/vatesfr/xen-orchestra/pull/3248)) - [Health / Orphaned VMs] Homogenize action buttons in table and enable bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3274](https://github.com/vatesfr/xen-orchestra/pull/3274)) - [Health / Orphaned snapshot VDIs] Homogenize action buttons in table and enable bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3270](https://github.com/vatesfr/xen-orchestra/pull/3270)) +- [Health / Alarms] Homogenize action buttons in table and enable bulk deletion [#3179](https://github.com/vatesfr/xen-orchestra/issues/3179) (PR [#3271](https://github.com/vatesfr/xen-orchestra/pull/3271)) ### Bug fixes diff --git a/packages/xo-web/src/xo-app/dashboard/health/index.js b/packages/xo-web/src/xo-app/dashboard/health/index.js index 162097422..cdf3d1658 100644 --- a/packages/xo-web/src/xo-app/dashboard/health/index.js +++ b/packages/xo-web/src/xo-app/dashboard/health/index.js @@ -1,16 +1,13 @@ import _ from 'intl' -import ActionRowButton from 'action-row-button' import Component from 'base-component' import Icon from 'icon' import Link from 'link' import NoObjects from 'no-objects' import React from 'react' import SortedTable from 'sorted-table' -import TabButton from 'tab-button' import Tooltip from 'tooltip' import Upgrade from 'xoa-upgrade' import xml2js from 'xml2js' -import { confirm } from 'modal' import { SelectPool } from 'select-objects' import { fromCallback } from 'promise-toolbox' import { Container, Row, Col } from 'grid' @@ -20,6 +17,7 @@ import { flatten, get, includes, isEmpty, map, mapValues } from 'lodash' import { connectStore, formatSize, noop, resolveIds } from 'utils' import { deleteMessage, + deleteMessages, deleteOrphanedVdis, deleteVbd, deleteVbds, @@ -371,16 +369,16 @@ const ALARM_COLUMNS = [ name: _('alarmPool'), itemRenderer: message => , }, +] + +const ALARM_ACTIONS = [ { - name: _('logAction'), - itemRenderer: message => ( - - ), + handler: deleteMessages, + individualHandler: deleteMessage, + individualLabel: _('logDelete'), + icon: 'delete', + label: _('logsDelete'), + level: 'danger', }, ] @@ -455,20 +453,6 @@ export default class Health extends Component { }, noop) } - _deleteAllLogs = () => - confirm({ - title: _('removeAllLogsModalTitle'), - body: ( -
-

{_('removeAllLogsModalWarning')}

-

{_('definitiveMessageModal')}

-
- ), - }).then( - () => Promise.all(map(this.props.alertMessages, deleteMessage)), - noop - ) - _getSrUrl = sr => `srs/${sr.id}` _getPoolPredicate = createSelector( @@ -609,26 +593,11 @@ export default class Health extends Component { emptyMessage={_('noAlarms')} > {() => ( -
- - - - - - - - - - -
+ )}