+
+
+ {content}
+
+
+
+
+
);
});
diff --git a/src/containers/MobileAppVerification/__snapshots__/MobileAppVerification.test.tsx.snap b/src/containers/MobileAppVerification/__snapshots__/MobileAppVerification.test.tsx.snap
new file mode 100644
index 0000000000..bb4670cfe4
--- /dev/null
+++ b/src/containers/MobileAppVerification/__snapshots__/MobileAppVerification.test.tsx.snap
@@ -0,0 +1,5191 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`MobileAppVerification if we disconnect the app, it disconnects and fetches a new QR code 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ Note: the QR code is only valid for one minute. If you have issues connecting your mobile app, try refreshing this page to generate a new code.
+
+
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows a QR code if the app isn't already connected 1`] = `
+
+
+
+
+
+
+
+
+
+
+
+
+ Note: the QR code is only valid for one minute. If you have issues connecting your mobile app, try refreshing this page to generate a new code.
+
+
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows a loading message if it is currently disconnecting 1`] = `
+
+
+
+
+
+ Loading...
+
+
+
+
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows a loading message if it is currently fetching the QR code 1`] = `
+
+
+
+
+
+ Loading...
+
+
+
+
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows a message when the mobile app is already connected 1`] = `
+
+
+
+
+
+
+
+ Your mobile app is currently connected. Click below to disconnect.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows an error message if there was an error disconnecting the mobile app 1`] = `
+
+
+
+
+
+ There was an error disconnecting your mobile app. Please try again.
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
+
+exports[`MobileAppVerification it shows an error message if there was an error fetching the QR code 1`] = `
+
+
+
+
+
+ There was an error fetching your QR code. Please try again.
+
+
+
+
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+
+
+
+`;
diff --git a/src/containers/MobileAppVerification/parts/DisconnectButton/DisconnectButton.test.tsx b/src/containers/MobileAppVerification/parts/DisconnectButton/DisconnectButton.test.tsx
new file mode 100644
index 0000000000..b660d5af50
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DisconnectButton/DisconnectButton.test.tsx
@@ -0,0 +1,28 @@
+import React from 'react';
+
+import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+
+import DisconnectButton from '.';
+
+describe('DisconnectButton', () => {
+ test('it renders properly', () => {
+ const component = render( {}} />);
+ expect(component.container).toMatchSnapshot();
+ });
+
+ test('It calls the onClick handler when clicked', async () => {
+ const mockedOnClick = jest.fn();
+
+ const user = userEvent.setup();
+ render();
+
+ // click the button, which opens the modal
+ await user.click(screen.getByRole('button'));
+ // click the confirm button within the modal, which actually triggers the callback
+ await user.click(screen.getByText('Remove'));
+
+ expect(mockedOnClick).toHaveBeenCalledWith();
+ expect(mockedOnClick).toHaveBeenCalledTimes(1);
+ });
+});
diff --git a/src/containers/MobileAppVerification/parts/DisconnectButton/__snapshots__/DisconnectButton.test.tsx.snap b/src/containers/MobileAppVerification/parts/DisconnectButton/__snapshots__/DisconnectButton.test.tsx.snap
new file mode 100644
index 0000000000..88ffb190a7
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DisconnectButton/__snapshots__/DisconnectButton.test.tsx.snap
@@ -0,0 +1,16 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DisconnectButton it renders properly 1`] = `
+
+
+
+`;
diff --git a/src/containers/MobileAppVerification/parts/DisconnectButton/index.tsx b/src/containers/MobileAppVerification/parts/DisconnectButton/index.tsx
new file mode 100644
index 0000000000..ec108f47b7
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DisconnectButton/index.tsx
@@ -0,0 +1,20 @@
+import React, { FC } from 'react';
+
+import { Button } from '@grafana/ui';
+
+import WithConfirm from 'components/WithConfirm/WithConfirm';
+
+type Props = {
+ onClick: () => void;
+};
+
+// TODO: right now this shows a confirmation pop-up modal on top of the user settings modal, do we want to maybe change this?
+const DisconnectButton: FC = ({ onClick }) => (
+
+
+
+);
+
+export default DisconnectButton;
diff --git a/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.module.scss b/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.module.scss
new file mode 100644
index 0000000000..6f41181e81
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.module.scss
@@ -0,0 +1,16 @@
+.icon {
+ width: 25px;
+ height: auto;
+ margin-right: 12px;
+}
+
+.icon-text,
+.icon {
+ cursor: default;
+}
+
+.icon-block {
+ display: flex;
+ align-items: center;
+ min-height: 80px;
+}
diff --git a/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.test.tsx b/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.test.tsx
new file mode 100644
index 0000000000..bc2011e336
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DownloadIcons/DownloadIcons.test.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+
+import { render } from '@testing-library/react';
+
+import DownloadIcons from './';
+
+describe('DownloadIcons', () => {
+ test('it renders properly', () => {
+ const component = render();
+ expect(component.container).toMatchSnapshot();
+ });
+});
diff --git a/src/containers/MobileAppVerification/parts/DownloadIcons/__snapshots__/DownloadIcons.test.tsx.snap b/src/containers/MobileAppVerification/parts/DownloadIcons/__snapshots__/DownloadIcons.test.tsx.snap
new file mode 100644
index 0000000000..63cd089997
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DownloadIcons/__snapshots__/DownloadIcons.test.tsx.snap
@@ -0,0 +1,74 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`DownloadIcons it renders properly 1`] = `
+
+
+
+
+ Download
+
+
+
+
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+
+
+
+
+ iOS
+
+
+
+
+
+
+
+ Android
+
+
+
+
+
+
+
+`;
diff --git a/src/containers/MobileAppVerification/parts/DownloadIcons/index.tsx b/src/containers/MobileAppVerification/parts/DownloadIcons/index.tsx
new file mode 100644
index 0000000000..79b54f2e17
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/DownloadIcons/index.tsx
@@ -0,0 +1,36 @@
+import React, { FC } from 'react';
+
+import { VerticalGroup } from '@grafana/ui';
+import cn from 'classnames/bind';
+
+import AppleLogoSVG from 'assets/img/brand/apple-logo.svg';
+import PlayStoreLogoSVG from 'assets/img/brand/play-store-logo.svg';
+import Block from 'components/GBlock/Block';
+import Text from 'components/Text/Text';
+
+import styles from './DownloadIcons.module.scss';
+
+const cx = cn.bind(styles);
+
+const DownloadIcons: FC = () => (
+
+ Download
+ The Grafana IRM app is available on both the App Store and Google Play Store.
+
+
+
+
+ iOS
+
+
+
+
+
+ Android
+
+
+
+
+);
+
+export default DownloadIcons;
diff --git a/src/containers/MobileAppVerification/parts/QRCode/QRCode.test.tsx b/src/containers/MobileAppVerification/parts/QRCode/QRCode.test.tsx
new file mode 100644
index 0000000000..8c3e1554a4
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/QRCode/QRCode.test.tsx
@@ -0,0 +1,12 @@
+import React from 'react';
+
+import { render } from '@testing-library/react';
+
+import QRCode from './';
+
+describe('QRCode', () => {
+ test('it renders properly', () => {
+ const component = render();
+ expect(component.container).toMatchSnapshot();
+ });
+});
diff --git a/src/containers/MobileAppVerification/parts/QRCode/__snapshots__/QRCode.test.tsx.snap b/src/containers/MobileAppVerification/parts/QRCode/__snapshots__/QRCode.test.tsx.snap
new file mode 100644
index 0000000000..511496e956
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/QRCode/__snapshots__/QRCode.test.tsx.snap
@@ -0,0 +1,2221 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`QRCode it renders properly 1`] = `
+
+
+
+
+
+`;
diff --git a/src/containers/MobileAppVerification/parts/QRCode/index.tsx b/src/containers/MobileAppVerification/parts/QRCode/index.tsx
new file mode 100644
index 0000000000..98ec356150
--- /dev/null
+++ b/src/containers/MobileAppVerification/parts/QRCode/index.tsx
@@ -0,0 +1,17 @@
+import React, { FC } from 'react';
+
+import QRCodeBase from 'react-qr-code';
+
+import Block from 'components/GBlock/Block';
+
+type Props = {
+ value: string;
+};
+
+const QRCode: FC = ({ value }) => (
+
+
+
+);
+
+export default QRCode;
diff --git a/src/containers/PluginConfigPage/parts/ConfigurationForm/__snapshots__/ConfigurationForm.test.tsx.snap b/src/containers/PluginConfigPage/parts/ConfigurationForm/__snapshots__/ConfigurationForm.test.tsx.snap
index 08fcbc9eb4..8d36ea1716 100644
--- a/src/containers/PluginConfigPage/parts/ConfigurationForm/__snapshots__/ConfigurationForm.test.tsx.snap
+++ b/src/containers/PluginConfigPage/parts/ConfigurationForm/__snapshots__/ConfigurationForm.test.tsx.snap
@@ -209,7 +209,7 @@ exports[`ConfigurationForm It shows an error message if the self hosted plugin A