Couldn’t verify collection permissions. This does not mean there is
@@ -731,18 +792,9 @@ function DatasourcesPanelView({
No data sources connected.
{canManage ? (
- <>
-
- Connect a GitHub repository to start ingesting.
-
-
- >
+
+ Choose a provider above to start ingesting.
+
) : (
An organization administrator connects the repositories this
@@ -937,32 +989,6 @@ function DatasourcesPanelView({
}
/>
)}
- {canManage && showConnect && (
- setShowConnect(false)}
- isPending={addMutation.isPending}
- errorMessage={
- addMutation.isError ? messageOf(addMutation.error) : undefined
- }
- />
- )}
);
}
diff --git a/module/services/frontend/code/packages/saas-ui/src/datasources/gateway.ts b/module/services/frontend/code/packages/saas-ui/src/datasources/gateway.ts
index b7d8b8a65..f6234031e 100644
--- a/module/services/frontend/code/packages/saas-ui/src/datasources/gateway.ts
+++ b/module/services/frontend/code/packages/saas-ui/src/datasources/gateway.ts
@@ -1,3 +1,4 @@
+import { catalogProvider, sourceRequest } from "./catalog.js";
import { timestampDate } from "@bufbuild/protobuf/wkt";
import {
AccessBasis,
@@ -93,6 +94,14 @@ export function datasourceClientOverTransport(
): DatasourceClient {
const client = accounts.New(transport).datasource();
return {
+ async getCatalog() {
+ const response = await client.getDatasourceCatalog({});
+ return response.providers.map(catalogProvider);
+ },
+ async addSource(input) {
+ const response = await client.addSource(sourceRequest(input));
+ notifySourceSyncRequested(response.datasource?.id ?? "");
+ },
async beginAccountLink(orgId, connector, redirectUri, sourceId) {
const response = await client.beginDatasourceAccountLink({
orgId,
@@ -448,7 +457,9 @@ const syncPhaseNames: Partial