Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Neptune Analytics default connections #254

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ First, create a `config.json` file containing values for the connection attribut
"IAM": true, (Can be string or boolean)
"SERVICE_TYPE": "neptune-db",
"AWS_REGION": "us-west-2",
"GRAPH_TYPE": "gremlin" (Possible Values: "gremlin", "sparql", "opencypher"),
"GRAPH_TYPE": "gremlin" (Possible Values: "gremlin", "sparql", "openCypher"),
"GRAPH_EXP_HTTPS_CONNECTION": true (Can be string or boolean),
"PROXY_SERVER_HTTPS_CONNECTION": true, (Can be string or boolean),
"GRAPH_EXP_FETCH_REQUEST_TIMEOUT": 240000 (Can be number)
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-explorer/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const grabConfig = async (): Promise<RawConfiguration | undefined> => {
graphDbUrl: defaultConnectionData.GRAPH_EXP_CONNECTION_URL || "",
awsAuthEnabled: !!defaultConnectionData.GRAPH_EXP_IAM,
awsRegion: defaultConnectionData.GRAPH_EXP_AWS_REGION || "",
serviceType: defaultConnectionData.SERVICE_TYPE || DEFAULT_SERVICE_TYPE,
serviceType: defaultConnectionData.GRAPH_EXP_SERVICE_TYPE || DEFAULT_SERVICE_TYPE,
fetchTimeoutMs:
defaultConnectionData.GRAPH_EXP_FETCH_REQUEST_TIMEOUT || 240000,
},
Expand Down
12 changes: 11 additions & 1 deletion process-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,22 @@ else
echo -e "\nGRAPH_EXP_HTTPS_CONNECTION=true" >> ./packages/graph-explorer/.env
fi

# Update the .env file with the configuration values
# Update the default connection file with the configuration values
if [ -n "$PUBLIC_OR_PROXY_ENDPOINT" ]; then
echo -e "{\n\"GRAPH_EXP_PUBLIC_OR_PROXY_ENDPOINT\":\"${PUBLIC_OR_PROXY_ENDPOINT}\"," >> ./packages/graph-explorer/defaultConnection.json

if [ -n "$SERVICE_TYPE" ]; then
echo "\"GRAPH_EXP_SERVICE_TYPE\":\"${SERVICE_TYPE}\"," >> ./packages/graph-explorer/defaultConnection.json
else
echo "\"GRAPH_EXP_SERVICE_TYPE\":\"neptune-db\"," >> ./packages/graph-explorer/defaultConnection.json
fi

if [ -n "$GRAPH_TYPE" ]; then
echo "\"GRAPH_EXP_GRAPH_TYPE\":\"${GRAPH_TYPE}\"," >> ./packages/graph-explorer/defaultConnection.json
else
if [ "$SERVICE_TYPE" == "neptune-graph" ]; then
echo "\"GRAPH_EXP_GRAPH_TYPE\":\"openCypher\"," >> ./packages/graph-explorer/defaultConnection.json
fi
fi

if [ -n "$USING_PROXY_SERVER" ]; then
Expand Down
Loading