mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix pr review for databricks integration
This commit is contained in:
@@ -458,9 +458,11 @@ const getAppsCircleCI = async ({ accessToken }: { accessToken: string }) => {
|
||||
/**
|
||||
* Return list of projects for Databricks integration
|
||||
*/
|
||||
const getAppsDatabricks = async ({ accessToken }: { accessToken: string }) => {
|
||||
const getAppsDatabricks = async ({ url, accessToken }: { url?: string | null; accessToken: string }) => {
|
||||
const databricksApiUrl = `${url}/api`;
|
||||
|
||||
const res = await request.get<{ scopes: { name: string; backend_type: string }[] }>(
|
||||
`${IntegrationUrls.DATABRICKS_API_URL}/2.0/secrets/scopes/list`,
|
||||
`${databricksApiUrl}/2.0/secrets/scopes/list`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
@@ -1128,6 +1130,7 @@ export const getApps = async ({
|
||||
|
||||
case Integrations.DATABRICKS:
|
||||
return getAppsDatabricks({
|
||||
url,
|
||||
accessToken
|
||||
});
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ export enum IntegrationUrls {
|
||||
RAILWAY_API_URL = "https://backboard.railway.app/graphql/v2",
|
||||
FLYIO_API_URL = "https://api.fly.io/graphql",
|
||||
CIRCLECI_API_URL = "https://circleci.com/api",
|
||||
DATABRICKS_API_URL = "https:/dbc-5e0185c0-20ac.cloud.databricks.com/api",
|
||||
DATABRICKS_API_URL = "https:/xxxx.com/api",
|
||||
TRAVISCI_API_URL = "https://api.travis-ci.com",
|
||||
SUPABASE_API_URL = "https://api.supabase.com",
|
||||
LARAVELFORGE_API_URL = "https://forge.laravel.com",
|
||||
|
||||
@@ -36,20 +36,16 @@ export default function DatabricksCreateIntegrationPage() {
|
||||
|
||||
const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]);
|
||||
|
||||
console.log("integrationAuthId", integrationAuthId)
|
||||
|
||||
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||
(integrationAuthId as string) ?? ""
|
||||
);
|
||||
|
||||
console.log("integrationAuth", integrationAuth)
|
||||
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
|
||||
useGetIntegrationAuthApps({
|
||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||
});
|
||||
|
||||
console.log("integrationAuthScopes", integrationAuthScopes)
|
||||
const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState("");
|
||||
const [targetScope, setTargetScope] = useState("");
|
||||
const [secretPath, setSecretPath] = useState("/");
|
||||
|
||||
Reference in New Issue
Block a user