mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Alerting] removes unimplemented buttons from Alert Details page (#60934)
Removed the "Edit" and "View in Activity Log" buttons as they have not yet been implemented.
This commit is contained in:
parent
7062542919
commit
4dbcb3c0e9
2 changed files with 1 additions and 76 deletions
|
@ -8,16 +8,8 @@ import uuid from 'uuid';
|
|||
import { shallow } from 'enzyme';
|
||||
import { AlertDetails } from './alert_details';
|
||||
import { Alert, ActionType } from '../../../../types';
|
||||
import {
|
||||
EuiTitle,
|
||||
EuiBadge,
|
||||
EuiFlexItem,
|
||||
EuiButtonEmpty,
|
||||
EuiSwitch,
|
||||
EuiBetaBadge,
|
||||
} from '@elastic/eui';
|
||||
import { EuiTitle, EuiBadge, EuiFlexItem, EuiSwitch, EuiBetaBadge } from '@elastic/eui';
|
||||
import { times, random } from 'lodash';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { ViewInApp } from './view_in_app';
|
||||
|
||||
|
@ -218,31 +210,6 @@ describe('alert_details', () => {
|
|||
});
|
||||
|
||||
describe('links', () => {
|
||||
it('links to the Edit flyout', () => {
|
||||
const alert = mockAlert();
|
||||
|
||||
const alertType = {
|
||||
id: '.noop',
|
||||
name: 'No Op',
|
||||
actionGroups: [{ id: 'default', name: 'Default' }],
|
||||
actionVariables: { context: [], state: [] },
|
||||
defaultActionGroupId: 'default',
|
||||
};
|
||||
|
||||
expect(
|
||||
shallow(
|
||||
<AlertDetails alert={alert} alertType={alertType} actionTypes={[]} {...mockAlertApis} />
|
||||
).containsMatchingElement(
|
||||
<EuiButtonEmpty disabled={true} iconType="pencil">
|
||||
<FormattedMessage
|
||||
id="xpack.triggersActionsUI.sections.alertDetails.editAlertButtonLabel"
|
||||
defaultMessage="Edit"
|
||||
/>
|
||||
</EuiButtonEmpty>
|
||||
)
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('links to the app that created the alert', () => {
|
||||
const alert = mockAlert();
|
||||
|
||||
|
@ -260,31 +227,6 @@ describe('alert_details', () => {
|
|||
).containsMatchingElement(<ViewInApp alert={alert} />)
|
||||
).toBeTruthy();
|
||||
});
|
||||
|
||||
it('links to the activity log', () => {
|
||||
const alert = mockAlert();
|
||||
|
||||
const alertType = {
|
||||
id: '.noop',
|
||||
name: 'No Op',
|
||||
actionGroups: [{ id: 'default', name: 'Default' }],
|
||||
actionVariables: { context: [], state: [] },
|
||||
defaultActionGroupId: 'default',
|
||||
};
|
||||
|
||||
expect(
|
||||
shallow(
|
||||
<AlertDetails alert={alert} alertType={alertType} actionTypes={[]} {...mockAlertApis} />
|
||||
).containsMatchingElement(
|
||||
<EuiButtonEmpty disabled={true} iconType="menuLeft">
|
||||
<FormattedMessage
|
||||
id="xpack.triggersActionsUI.sections.alertDetails.activityLogButtonLabel"
|
||||
defaultMessage="Activity Log"
|
||||
/>
|
||||
</EuiButtonEmpty>
|
||||
)
|
||||
).toBeTruthy();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import {
|
|||
EuiBadge,
|
||||
EuiPage,
|
||||
EuiPageContentBody,
|
||||
EuiButtonEmpty,
|
||||
EuiSwitch,
|
||||
EuiCallOut,
|
||||
EuiSpacer,
|
||||
|
@ -87,25 +86,9 @@ export const AlertDetails: React.FunctionComponent<AlertDetailsProps> = ({
|
|||
</EuiPageContentHeaderSection>
|
||||
<EuiPageContentHeaderSection>
|
||||
<EuiFlexGroup responsive={false} gutterSize="xs">
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty disabled={true} iconType="pencil">
|
||||
<FormattedMessage
|
||||
id="xpack.triggersActionsUI.sections.alertDetails.editAlertButtonLabel"
|
||||
defaultMessage="Edit"
|
||||
/>
|
||||
</EuiButtonEmpty>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<ViewInApp alert={alert} />
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiButtonEmpty disabled={true} iconType="menuLeft">
|
||||
<FormattedMessage
|
||||
id="xpack.triggersActionsUI.sections.alertDetails.activityLogButtonLabel"
|
||||
defaultMessage="Activity Log"
|
||||
/>
|
||||
</EuiButtonEmpty>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</EuiPageContentHeaderSection>
|
||||
</EuiPageContentHeader>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue