diff --git a/web/src/app/admin/connectors/confluence/page.tsx b/web/src/app/admin/connectors/confluence/page.tsx
index 9e8c26f3f..4aa0464e0 100644
--- a/web/src/app/admin/connectors/confluence/page.tsx
+++ b/web/src/app/admin/connectors/confluence/page.tsx
@@ -65,7 +65,7 @@ const Main = () => {
return (
<>
- Step 1: Provide your Credentials
+ Step 1: Provide your access token
{confluenceCredential ? (
@@ -139,103 +139,127 @@ const Main = () => {
>
)}
- {/* TODO: make this periodic */}
Step 2: Which spaces do you want to make searchable?
-
- To use the Confluence connector, you must first follow the guide
- described{" "}
-
- here
- {" "}
- to give the Danswer backend read access to your documents. Once that is
- setup, specify any link to a Confluence page below and click
- "Index" to Index. Based on the provided link, we will index
- the ENTIRE SPACE, not just the specified page. For example, entering{" "}
- https://danswer.atlassian.net/wiki/spaces/Engineering/overview{" "}
- and clicking the Index button will index the whole Engineering{" "}
- Confluence space.
-
-
- {confluenceConnectorIndexingStatuses.length > 0 && (
+ {confluenceCredential ? (
<>
-
- We pull the latest pages and comments from each space listed below
- every 10 minutes.
+
+ To use the Confluence connector, you must first follow the guide
+ described{" "}
+
+ here
+ {" "}
+ to give the Danswer backend read access to your documents. Once that
+ is setup, specify any link to a Confluence page below and click
+ "Index" to Index. Based on the provided link, we will
+ index the ENTIRE SPACE, not just the specified page. For example,
+ entering{" "}
+
+ https://danswer.atlassian.net/wiki/spaces/Engineering/overview
+ {" "}
+ and clicking the Index button will index the whole{" "}
+ Engineering Confluence space.
-
-
- connectorIndexingStatuses={confluenceConnectorIndexingStatuses}
- liveCredential={confluenceCredential}
- getCredential={(credential) => {
- return (
-
-
{credential.credential_json.confluence_access_token}
-
- );
+
+ {confluenceConnectorIndexingStatuses.length > 0 && (
+ <>
+
+ We pull the latest pages and comments from each space listed
+ below every 10 minutes.
+
+
+
+ connectorIndexingStatuses={
+ confluenceConnectorIndexingStatuses
+ }
+ liveCredential={confluenceCredential}
+ getCredential={(credential) => {
+ return (
+
+
+ {credential.credential_json.confluence_access_token}
+
+
+ );
+ }}
+ onCredentialLink={async (connectorId) => {
+ if (confluenceCredential) {
+ await linkCredential(
+ connectorId,
+ confluenceCredential.id
+ );
+ mutate("/api/manage/admin/connector/indexing-status");
+ }
+ }}
+ specialColumns={[
+ {
+ header: "Url",
+ key: "url",
+ getValue: (connector) => (
+
+ {connector.connector_specific_config.wiki_page_url}
+
+ ),
+ },
+ ]}
+ onUpdate={() =>
+ mutate("/api/manage/admin/connector/indexing-status")
+ }
+ />
+
+ >
+ )}
+
+
+
Add a New Space
+
+ nameBuilder={(values) =>
+ `ConfluenceConnector-${values.wiki_page_url}`
+ }
+ source="confluence"
+ inputType="load_state"
+ formBody={
+ <>
+
+ >
+ }
+ validationSchema={Yup.object().shape({
+ wiki_page_url: Yup.string().required(
+ "Please enter any link to your confluence e.g. https://danswer.atlassian.net/wiki/spaces/Engineering/overview"
+ ),
+ })}
+ initialValues={{
+ wiki_page_url: "",
}}
- onCredentialLink={async (connectorId) => {
- if (confluenceCredential) {
- await linkCredential(connectorId, confluenceCredential.id);
+ refreshFreq={10 * 60} // 10 minutes
+ onSubmit={async (isSuccess, responseJson) => {
+ if (isSuccess && responseJson) {
+ await linkCredential(
+ responseJson.id,
+ confluenceCredential.id
+ );
mutate("/api/manage/admin/connector/indexing-status");
}
}}
- specialColumns={[
- {
- header: "Url",
- key: "url",
- getValue: (connector) => (
-
- {connector.connector_specific_config.wiki_page_url}
-
- ),
- },
- ]}
- onUpdate={() =>
- mutate("/api/manage/admin/connector/indexing-status")
- }
/>
>
+ ) : (
+
+ Please provide your access token in Step 1 first! Once done with that,
+ you can then specify which Confluence spaces you want to make
+ searchable.
+
)}
-
-
-
Add a New Space
-
- nameBuilder={(values) =>
- `ConfluenceConnector-${values.wiki_page_url}`
- }
- source="confluence"
- inputType="load_state"
- formBody={
- <>
-
- >
- }
- validationSchema={Yup.object().shape({
- wiki_page_url: Yup.string().required(
- "Please enter any link to your confluence e.g. https://danswer.atlassian.net/wiki/spaces/Engineering/overview"
- ),
- })}
- initialValues={{
- wiki_page_url: "",
- }}
- refreshFreq={10 * 60} // 10 minutes
- onSubmit={async (isSuccess, responseJson) => {
- if (isSuccess && responseJson) {
- await linkCredential(responseJson.id, confluenceCredential.id);
- mutate("/api/manage/admin/connector/indexing-status");
- }
- }}
- />
-
>
);
};
diff --git a/web/src/app/admin/connectors/github/page.tsx b/web/src/app/admin/connectors/github/page.tsx
index 23a83f7c6..7c915c1f8 100644
--- a/web/src/app/admin/connectors/github/page.tsx
+++ b/web/src/app/admin/connectors/github/page.tsx
@@ -168,41 +168,49 @@ const Main = () => {
>
)}
-
-
Connect to a New Repository
-
- nameBuilder={(values) =>
- `GithubConnector-${values.repo_owner}/${values.repo_name}`
- }
- source="github"
- inputType="load_state"
- formBody={
- <>
-
-
- >
- }
- validationSchema={Yup.object().shape({
- repo_owner: Yup.string().required(
- "Please enter the owner of the repository to index e.g. danswer-ai"
- ),
- repo_name: Yup.string().required(
- "Please enter the name of the repository to index e.g. danswer "
- ),
- })}
- initialValues={{
- repo_owner: "",
- repo_name: "",
- }}
- refreshFreq={10 * 60} // 10 minutes
- onSubmit={async (isSuccess, responseJson) => {
- if (isSuccess && responseJson) {
- await linkCredential(responseJson.id, githubCredential.id);
- mutate("/api/manage/admin/connector/indexing-status");
+ {githubCredential ? (
+
+
Connect to a New Repository
+
+ nameBuilder={(values) =>
+ `GithubConnector-${values.repo_owner}/${values.repo_name}`
}
- }}
- />
-
+ source="github"
+ inputType="load_state"
+ formBody={
+ <>
+
+
+ >
+ }
+ validationSchema={Yup.object().shape({
+ repo_owner: Yup.string().required(
+ "Please enter the owner of the repository to index e.g. danswer-ai"
+ ),
+ repo_name: Yup.string().required(
+ "Please enter the name of the repository to index e.g. danswer "
+ ),
+ })}
+ initialValues={{
+ repo_owner: "",
+ repo_name: "",
+ }}
+ refreshFreq={10 * 60} // 10 minutes
+ onSubmit={async (isSuccess, responseJson) => {
+ if (isSuccess && responseJson) {
+ await linkCredential(responseJson.id, githubCredential.id);
+ mutate("/api/manage/admin/connector/indexing-status");
+ }
+ }}
+ />
+
+ ) : (
+
+ Please provide your access token in Step 1 first! Once done with that,
+ you can then specify which Github repositories you want to make
+ searchable.
+
+ )}
>
);
};