mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 09:25:59 +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
|
* 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 }[] }>(
|
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: {
|
headers: {
|
||||||
Authorization: `Bearer ${accessToken}`,
|
Authorization: `Bearer ${accessToken}`,
|
||||||
@@ -1128,6 +1130,7 @@ export const getApps = async ({
|
|||||||
|
|
||||||
case Integrations.DATABRICKS:
|
case Integrations.DATABRICKS:
|
||||||
return getAppsDatabricks({
|
return getAppsDatabricks({
|
||||||
|
url,
|
||||||
accessToken
|
accessToken
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export enum IntegrationUrls {
|
|||||||
RAILWAY_API_URL = "https://backboard.railway.app/graphql/v2",
|
RAILWAY_API_URL = "https://backboard.railway.app/graphql/v2",
|
||||||
FLYIO_API_URL = "https://api.fly.io/graphql",
|
FLYIO_API_URL = "https://api.fly.io/graphql",
|
||||||
CIRCLECI_API_URL = "https://circleci.com/api",
|
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",
|
TRAVISCI_API_URL = "https://api.travis-ci.com",
|
||||||
SUPABASE_API_URL = "https://api.supabase.com",
|
SUPABASE_API_URL = "https://api.supabase.com",
|
||||||
LARAVELFORGE_API_URL = "https://forge.laravel.com",
|
LARAVELFORGE_API_URL = "https://forge.laravel.com",
|
||||||
|
|||||||
@@ -36,20 +36,16 @@ export default function DatabricksCreateIntegrationPage() {
|
|||||||
|
|
||||||
const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]);
|
const { integrationAuthId } = queryString.parse(router.asPath.split("?")[1]);
|
||||||
|
|
||||||
console.log("integrationAuthId", integrationAuthId)
|
|
||||||
|
|
||||||
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
const { data: workspace } = useGetWorkspaceById(localStorage.getItem("projectData.id") ?? "");
|
||||||
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
const { data: integrationAuth, isLoading: isintegrationAuthLoading } = useGetIntegrationAuthById(
|
||||||
(integrationAuthId as string) ?? ""
|
(integrationAuthId as string) ?? ""
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log("integrationAuth", integrationAuth)
|
|
||||||
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
|
const { data: integrationAuthScopes, isLoading: isIntegrationAuthScopesLoading } =
|
||||||
useGetIntegrationAuthApps({
|
useGetIntegrationAuthApps({
|
||||||
integrationAuthId: (integrationAuthId as string) ?? ""
|
integrationAuthId: (integrationAuthId as string) ?? ""
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("integrationAuthScopes", integrationAuthScopes)
|
|
||||||
const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState("");
|
const [selectedSourceEnvironment, setSelectedSourceEnvironment] = useState("");
|
||||||
const [targetScope, setTargetScope] = useState("");
|
const [targetScope, setTargetScope] = useState("");
|
||||||
const [secretPath, setSecretPath] = useState("/");
|
const [secretPath, setSecretPath] = useState("/");
|
||||||
|
|||||||
Reference in New Issue
Block a user