Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting UI] Changed alerting UIs use new rule APIs. #96018

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,13 @@ describe('health check', () => {

it('renders children if keys are enabled', async () => {
useKibanaMock().services.http.get = jest.fn().mockResolvedValue({
isSufficientlySecure: true,
hasPermanentEncryptionKey: true,
is_sufficiently_secure: true,
has_permanent_encryption_key: true,
alerting_framework_heath: {
decryption_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
execution_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
read_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
},
isAlertsAvailable: true,
});
const { queryByText } = render(
Expand All @@ -78,8 +83,13 @@ describe('health check', () => {

test('renders warning if TLS is required', async () => {
useKibanaMock().services.http.get = jest.fn().mockImplementation(async () => ({
isSufficientlySecure: false,
hasPermanentEncryptionKey: true,
is_sufficiently_secure: false,
has_permanent_encryption_key: true,
alerting_framework_heath: {
decryption_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
execution_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
read_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
},
isAlertsAvailable: true,
}));
const { queryAllByText } = render(
Expand Down Expand Up @@ -110,8 +120,13 @@ describe('health check', () => {

test('renders warning if encryption key is ephemeral', async () => {
useKibanaMock().services.http.get = jest.fn().mockImplementation(async () => ({
isSufficientlySecure: true,
hasPermanentEncryptionKey: false,
is_sufficiently_secure: true,
has_permanent_encryption_key: false,
alerting_framework_heath: {
decryption_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
execution_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
read_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
},
isAlertsAvailable: true,
}));
const { queryByText, queryByRole } = render(
Expand Down Expand Up @@ -139,8 +154,13 @@ describe('health check', () => {

test('renders warning if encryption key is ephemeral and keys are disabled', async () => {
useKibanaMock().services.http.get = jest.fn().mockImplementation(async () => ({
isSufficientlySecure: false,
hasPermanentEncryptionKey: false,
is_sufficiently_secure: false,
has_permanent_encryption_key: false,
alerting_framework_heath: {
decryption_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
execution_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
read_health: { status: 'ok', timestamp: '2021-04-01T21:29:22.991Z' },
},
isAlertsAvailable: true,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { i18n } from '@kbn/i18n';

import { EuiEmptyPrompt, EuiCode } from '@elastic/eui';
import { DocLinksStart } from 'kibana/public';
import { alertingFrameworkHealth } from '../lib/alert_api';
import './health_check.scss';
import { useHealthContext } from '../context/health_context';
import { useKibana } from '../../common/lib/kibana';
import { CenterJustifiedSpinner } from './center_justified_spinner';
import { triggersActionsUiHealth } from '../../common/lib/health_api';
import { alertingFrameworkHealth } from '../lib/alert_api';

interface Props {
inFlyout?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

import { i18n } from '@kbn/i18n';

export { LEGACY_BASE_ALERT_API_PATH } from '../../../../alerting/common';
export {
BASE_ALERTING_API_PATH,
INTERNAL_BASE_ALERTING_API_PATH,
} from '../../../../alerting/common';
export { BASE_ACTION_API_PATH } from '../../../../actions/common';

export type Section = 'connectors' | 'rules';
Expand Down
Loading