diff --git a/x-pack/legacy/plugins/monitoring/common/constants.ts b/x-pack/legacy/plugins/monitoring/common/constants.ts
index 67eff963e70d8..c17bb92b596ef 100644
--- a/x-pack/legacy/plugins/monitoring/common/constants.ts
+++ b/x-pack/legacy/plugins/monitoring/common/constants.ts
@@ -230,7 +230,7 @@ export const TELEMETRY_COLLECTION_INTERVAL = 86400000;
* as the only way to see the new UI and actually run Kibana alerts. It will
* be false until all alerts have been migrated, then it will be removed
*/
-export const KIBANA_ALERTING_ENABLED = true;
+export const KIBANA_ALERTING_ENABLED = false;
/**
* The prefix for all alert types used by monitoring
diff --git a/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/__snapshots__/step3.test.tsx.snap b/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/__snapshots__/step3.test.tsx.snap
index 61e721ff27136..ed15ae9a9cff7 100644
--- a/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/__snapshots__/step3.test.tsx.snap
+++ b/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/__snapshots__/step3.test.tsx.snap
@@ -59,3 +59,37 @@ exports[`Step3 should show a saving state 1`] = `
`;
+
+exports[`Step3 should show an error 1`] = `
+
+
+
+ Test error
+
+
+
+
+ Save
+
+
+`;
diff --git a/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/step3.test.tsx b/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/step3.test.tsx
index 09f1549d2f32f..9b1304c42a507 100644
--- a/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/step3.test.tsx
+++ b/x-pack/legacy/plugins/monitoring/public/components/alerts/configuration/step3.test.tsx
@@ -14,6 +14,7 @@ describe('Step3', () => {
isSaving: false,
isDisabled: false,
save: jest.fn(),
+ error: null,
};
it('should render normally', () => {
@@ -38,4 +39,10 @@ describe('Step3', () => {
const component = shallow();
expect(component).toMatchSnapshot();
});
+
+ it('should show an error', () => {
+ const customProps = { error: 'Test error' };
+ const component = shallow();
+ expect(component).toMatchSnapshot();
+ });
});
diff --git a/x-pack/legacy/plugins/monitoring/public/components/alerts/manage_email_action.tsx b/x-pack/legacy/plugins/monitoring/public/components/alerts/manage_email_action.tsx
index 36aad115d54d5..e57744b2952a4 100644
--- a/x-pack/legacy/plugins/monitoring/public/components/alerts/manage_email_action.tsx
+++ b/x-pack/legacy/plugins/monitoring/public/components/alerts/manage_email_action.tsx
@@ -28,7 +28,7 @@ import { ALERT_EMAIL_SERVICES } from '../../../common/constants';
export interface EmailActionData {
service: string;
host: string;
- port: number | string; // support a string to ensure the user can backspace to an empty field
+ port: number | ''; // support a string to ensure the user can backspace to an empty field
secure: boolean;
from: string;
user: string;
diff --git a/x-pack/legacy/plugins/monitoring/public/lib/setup_mode.tsx b/x-pack/legacy/plugins/monitoring/public/lib/setup_mode.tsx
index f5a9f0ab6c796..d805c10247b2e 100644
--- a/x-pack/legacy/plugins/monitoring/public/lib/setup_mode.tsx
+++ b/x-pack/legacy/plugins/monitoring/public/lib/setup_mode.tsx
@@ -11,9 +11,15 @@ import chrome from 'ui/chrome';
import { toastNotifications } from 'ui/notify';
import { i18n } from '@kbn/i18n';
import { npSetup } from 'ui/new_platform';
+import { PluginsSetup } from 'ui/new_platform/new_platform';
+import { CloudSetup } from '../../../../../plugins/cloud/public';
import { ajaxErrorHandlersProvider } from './ajax_error_handler';
import { SetupModeEnterButton } from '../components/setup_mode/enter_button';
+interface PluginsSetupWithCloud extends PluginsSetup {
+ cloud: CloudSetup;
+}
+
function isOnPage(hash: string) {
return contains(window.location.hash, hash);
}
@@ -95,7 +101,7 @@ export const updateSetupModeData = async (uuid?: string, fetchWithoutClusterUuid
const oldData = setupModeState.data;
const data = await fetchCollectionData(uuid, fetchWithoutClusterUuid);
setupModeState.data = data;
- const { cloud } = npSetup.plugins;
+ const { cloud } = npSetup.plugins as PluginsSetupWithCloud;
const isCloudEnabled = !!(cloud && cloud.isCloudEnabled);
const hasPermissions = get(data, '_meta.hasPermissions', false);
if (isCloudEnabled || !hasPermissions) {
@@ -176,7 +182,7 @@ export const setSetupModeMenuItem = () => {
}
const globalState = angularState.injector.get('globalState');
- const { cloud } = npSetup.plugins;
+ const { cloud } = npSetup.plugins as PluginsSetupWithCloud;
const isCloudEnabled = !!(cloud && cloud.isCloudEnabled);
const enabled = !globalState.inSetupMode && !isCloudEnabled;