}
diff --git a/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.test.tsx b/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.test.tsx
index 415bf95b..56288a6e 100644
--- a/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.test.tsx
+++ b/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.test.tsx
@@ -21,12 +21,14 @@ describe('NotConnectedState', () => {
};
const refreshServers = jest.fn();
+ const handleRefreshPanel = jest.fn();
test('renders with connected state DUPLICATE', () => {
render();
expect(screen.getByText('Duplicate server')).toBeInTheDocument();
expect(screen.getByText('Delete')).toBeInTheDocument();
@@ -37,9 +39,11 @@ describe('NotConnectedState', () => {
connectedState={ConnectedState.PENDING}
jenkinsServer={mockServer}
refreshServers={refreshServers}
+ handleRefreshPanel={handleRefreshPanel}
/>);
expect(screen.getByText('Connection pending')).toBeInTheDocument();
- expect(screen.getByText('Connection settings')).toBeInTheDocument();
+ expect(screen.getByText('Refresh')).toBeInTheDocument();
+ expect(screen.getByText('Learn more')).toBeInTheDocument();
});
test('clicking delete button removes the server', async () => {
@@ -48,6 +52,7 @@ describe('NotConnectedState', () => {
connectedState={ConnectedState.DUPLICATE}
jenkinsServer={mockServer}
refreshServers={refreshServers}
+ handleRefreshPanel={handleRefreshPanel}
/>);
fireEvent.click(screen.getByText('Delete'));
diff --git a/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.tsx b/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.tsx
index 4913e57c..f8f8011b 100644
--- a/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.tsx
+++ b/app/jenkins-for-jira-ui/src/components/ConnectionPanel/NotConnectedState.tsx
@@ -1,29 +1,27 @@
import React, { useState } from 'react';
import { cx } from '@emotion/css';
-import Button from '@atlaskit/button';
-import { token } from '@atlaskit/tokens';
import Spinner from '@atlaskit/spinner';
import { ConnectedState } from '../StatusLabel/StatusLabel';
import {
notConnectedSpinnerContainer,
- notConnectedStateContainer,
- notConnectedStateHeader,
- notConnectedStateParagraph,
- notConnectedTempImgPlaceholder
+ notConnectedStateContainer
} from './ConnectionPanel.styles';
import { JenkinsServer } from '../../../../src/common/types';
import { disconnectJenkinsServer } from '../../api/disconnectJenkinsServer';
+import { ConnectionPanelContent } from './ConnectionPanelContent';
type NotConnectedStateProps = {
connectedState: ConnectedState;
jenkinsServer: JenkinsServer;
refreshServers(serverToRemove: JenkinsServer): void;
+ handleRefreshPanel(serverToRemove: JenkinsServer): void;
};
const NotConnectedState = ({
connectedState,
+ refreshServers,
jenkinsServer,
- refreshServers
+ handleRefreshPanel
}: NotConnectedStateProps): JSX.Element => {
const [isLoading, setIsLoading] = useState(false);
@@ -34,7 +32,7 @@ const NotConnectedState = ({
await disconnectJenkinsServer(serverToDelete.uuid);
} catch (e) {
console.log('Failed to disconnect server', e);
- // TODO - add error state ARC-2722
+ // TODO - ARC-2722 handle error state
} finally {
setIsLoading(false);
}
@@ -42,23 +40,15 @@ const NotConnectedState = ({
refreshServers(serverToDelete);
};
- const notConnectedHeader =
- connectedState === ConnectedState.PENDING ? 'Connection pending' : 'Duplicate server';
- const notConnectedContent =
- connectedState === ConnectedState.PENDING ? (
- <>
- This connection is pending completion by a Jenkins admin.
- Its set up guide will be available when the connection is complete.
-
- Open connection settings if your Jenkins admin needs to revisit the items they need.
- >
- ) : (
- <>
- This connection is a duplicate of SERVER NAME.
-
- Use SERVER NAME to manage this server.
- >
- );
+ const deleteServerWrapper = async () => {
+ await deleteServer(jenkinsServer);
+ };
+
+ const handleLearnMore = async () => {
+ // TODO - ARC-2736 IPH
+ };
+
+ const isPending = connectedState === ConnectedState.PENDING;
return (
@@ -68,23 +58,29 @@ const NotConnectedState = ({
) : (
<>
-
-
{notConnectedHeader}
-
{notConnectedContent}
- {/* TODO - add onClick handler for Connection settings
- - will be done when I build the new set up Jenkins screen */}
- {connectedState === ConnectedState.PENDING ? (
-
- ) : (
-
- )}
+
>
)}
To access features like this set up guide,
a Jenkins admin must log into this server and update the plugin.
- {/* TODO - implement link once the IPH mystery has been solved */}
-
- {/* TODO - uhh ummm when we figure out exactly how we intend this to work... :badpokerface: */}
+
+ {/* TODO - ARC-2738 */}
+
+ );
+};
diff --git a/app/jenkins-for-jira-ui/src/components/JenkinsConfigurationForm/InProductHelpActionType.java b/app/jenkins-for-jira-ui/src/components/JenkinsConfigurationForm/InProductHelpActionType.java
new file mode 100644
index 00000000..27ee7d71
--- /dev/null
+++ b/app/jenkins-for-jira-ui/src/components/JenkinsConfigurationForm/InProductHelpActionType.java
@@ -0,0 +1,13 @@
+import React from 'react';
+import { cx } from '@emotion/css';
+import { setUpGuideLink } from '../ConnectionPanel/ConnectionPanel.styles';
+
+export const InProductHelpDraw = (): JSX.Element => {
+ const inProductHelpTypeClassName = type === InProductHelpActionType.Link ? setUpGuideLink : '';
+
+ return (
+
+ );
+};
diff --git a/app/jenkins-for-jira-ui/src/components/ServerManagement/ServerManagement.tsx b/app/jenkins-for-jira-ui/src/components/ServerManagement/ServerManagement.tsx
index 47f7fdd6..619fb6c5 100644
--- a/app/jenkins-for-jira-ui/src/components/ServerManagement/ServerManagement.tsx
+++ b/app/jenkins-for-jira-ui/src/components/ServerManagement/ServerManagement.tsx
@@ -51,11 +51,11 @@ const ServerManagement = (): JSX.Element => {
const pageHeaderActions = (
- {/* TODO - add onClick event (will be done when I build the new server name form */}
+ {/* TODO handle empty state - ARC-2730 connection wizard */}
- {/* TODO - add onClick event (will be done after spike for ARC-2691 */}
+ {/* TODO - ARC-2723 share modal */}
);
diff --git a/app/jenkins-for-jira-ui/src/components/ServerManagement/TopPanel/TopPanel.tsx b/app/jenkins-for-jira-ui/src/components/ServerManagement/TopPanel/TopPanel.tsx
index 9152400b..1ea2ad6a 100644
--- a/app/jenkins-for-jira-ui/src/components/ServerManagement/TopPanel/TopPanel.tsx
+++ b/app/jenkins-for-jira-ui/src/components/ServerManagement/TopPanel/TopPanel.tsx
@@ -15,12 +15,13 @@ const TopPanel = (): JSX.Element => {
Server management
- {/* TODO - add link/drawer (will be done after I investigate 'proper' drawer usage) */}
-
Jenkins for Jira lets your teams keep track of code
- they build and deploy on Jenkins servers.
- {/* TODO - add link/drawer (will be done after I investigate 'proper' drawer usage) */}
-
Follow the set up guide for each server to
- receive build and deployment data.
+
Jenkins for Jira lets your teams keep track of code
+ they build and deploy on Jenkins servers.
+
+ To receive build and deployment data, your teams must follow the
+ {/* TODO - ARC-2736 IPH component for 'set up guide' */}
+ set up guide for each server connected.
+
diff --git a/app/jenkins-for-jira-ui/src/components/icons/ConnectionPendingIcon.tsx b/app/jenkins-for-jira-ui/src/components/icons/ConnectionPendingIcon.tsx
new file mode 100644
index 00000000..300a6bf0
--- /dev/null
+++ b/app/jenkins-for-jira-ui/src/components/icons/ConnectionPendingIcon.tsx
@@ -0,0 +1,106 @@
+import React from 'react';
+
+export function ConnectionPendingIcon(): JSX.Element {
+ return (
+
+
+
+ );
+}
diff --git a/app/jenkins-for-jira-ui/src/components/icons/DuplicateServerIcon.tsx b/app/jenkins-for-jira-ui/src/components/icons/DuplicateServerIcon.tsx
new file mode 100644
index 00000000..fa0bbbfe
--- /dev/null
+++ b/app/jenkins-for-jira-ui/src/components/icons/DuplicateServerIcon.tsx
@@ -0,0 +1,72 @@
+import React from 'react';
+
+export function DuplicateServerIcon(): JSX.Element {
+ return (
+
+
+
+
+ );
+}
diff --git a/app/jenkins-for-jira-ui/src/components/icons/NoDataIcon.tsx b/app/jenkins-for-jira-ui/src/components/icons/NoDataIcon.tsx
new file mode 100644
index 00000000..747761cf
--- /dev/null
+++ b/app/jenkins-for-jira-ui/src/components/icons/NoDataIcon.tsx
@@ -0,0 +1,39 @@
+import React from 'react';
+
+export function NoDataIcon(): JSX.Element {
+ return (
+