Skip to content

Commit

Permalink
Minor updates to in-progress ECS infrastructure page work.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichaels-harvard committed Jul 12, 2023
1 parent fad3f4d commit 18abc68
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
9 changes: 8 additions & 1 deletion foursight_core/react/api/auth0_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,14 @@ def get_config_raw_data(self) -> dict:
Returns raw data (dictionary) from the Auth0 config URL.
"""
try:
return requests.get(self.get_config_url()).json() or {}
auth0_config_response = requests.get(self.get_config_url()).json() or {}
allowed_connections = auth0_config_response.get("auth0Options", {}).get("allowedConnections")
if isinstance(allowed_connections, str):
# Slight temporary hack to deal with fact that at some points in
# time the allowedConnections property from the /auth0_config Portal
# endpoint returned a JSON-ized string of a ist rather than a list.
auth0_config_response["auth0Options"]["allowedConnections"] = json.loads(allowed_connections)
return auth0_config_response
except Exception as e:
logger.error(f"Exception fetching Auth0 config ({self.get_config_url()}): {get_error_message(e)}")
return {}
Expand Down
4 changes: 2 additions & 2 deletions foursight_core/react/ui/static/js/main.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions react/src/pages/aws/InfrastructurePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,12 @@ const EcsClusterServices = (props) => {
<ExternalLink
href={`https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/${props.cluster}/services/${service.service_name}/health?region=us-east-1`}
style={{marginLeft:"6pt"}} />
&nbsp;|&nbsp;
<small><b>Logs</b>
<ExternalLink
href={`https://us-east-1.console.aws.amazon.com/ecs/v2/clusters/${props.cluster}/services/${service.service_name}/logs?region=us-east-1`}
style={{marginLeft:"4pt"}} />
</small>
<br />
<small>
<b>Service ARN</b>: {service.service_arn} <br />
Expand All @@ -1137,11 +1143,11 @@ const EcsClusterServices = (props) => {
<b>Task Definition</b>: {service.task_display_name}
<ExternalLink
href={`https://us-east-1.console.aws.amazon.com/ecs/v2/task-definitions/${service.task_name}?region=us-east-1`}
style={{marginLeft:"6pt"}} /> <br />
<b>Task</b>: {service.task_arn}
style={{marginLeft:"4pt"}} /> <br />
<b>Task Definition ARN</b>: {service.task_arn}
<ExternalLink
href={`https://us-east-1.console.aws.amazon.com/ecs/v2/task-definitions/${service.task_name}/1/containers?region=us-east-1`}
style={{marginLeft:"6pt"}} />
style={{marginLeft:"4pt"}} />
</small>
{ index < props.services.length - 1 && <><br /><br /></> }
</li>
Expand Down Expand Up @@ -1198,7 +1204,7 @@ const EcsTaskDetail = (props) => {
<JsonToggleDiv data={task.data} yaml={true} both={true}>
<small>
<table><tbody>
<tr><td style={tdl}><b>Task Name</b>:</td><td style={tdr}>{task.data?.task_display_name}</td></tr>
<tr><td style={tdl}><b>Task Name</b>:</td><td style={tdr}><u>{task.data?.task_display_name}</u></td></tr>
<tr><td style={tdl}><b>Task ARN</b>:</td><td style={tdr}>
{task.data?.task_arn}
<ExternalLink
Expand Down

0 comments on commit 18abc68

Please sign in to comment.