Skip to content

Commit

Permalink
fix: Fixed missing Authrole values on ExecutionMetaDataExtra (#255)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Porter <[email protected]>
  • Loading branch information
jsonporter authored Jan 5, 2022
1 parent ec84ffd commit 71af238
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export const ExecutionMetadataExtra: React.FC<{
const commonStyles = useCommonStyles();
const styles = useStyles();

const { launchPlan: launchPlanId, maxParallelism } = execution.spec;
const {
launchPlan: launchPlanId,
maxParallelism,
authRole
} = execution.spec;

const [launchPlanSpec, setLaunchPlanSpec] = React.useState<
Partial<LaunchPlanSpec>
>({});
Expand All @@ -44,9 +49,17 @@ export const ExecutionMetadataExtra: React.FC<{
}, [launchPlanId]);

const details: DetailItem[] = [
{
label: ExecutionMetadataLabels.iam,
value:
authRole?.assumableIamRole ||
ExecutionMetadataLabels.securityContextDefault
},
{
label: ExecutionMetadataLabels.serviceAccount,
value: launchPlanSpec?.authRole?.kubernetesServiceAccount
value:
authRole?.kubernetesServiceAccount ||
ExecutionMetadataLabels.securityContextDefault
},
{
label: ExecutionMetadataLabels.rawOutputPrefix,
Expand Down
4 changes: 3 additions & 1 deletion src/components/Executions/ExecutionDetails/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ export enum ExecutionMetadataLabels {
relatedTo = 'Related to',
version = 'Version',
serviceAccount = 'Service Account',
iam = 'IAM Role',
rawOutputPrefix = 'Raw Output Prefix',
parallelism = 'Parallelism'
parallelism = 'Parallelism',
securityContextDefault = 'default'
}

export const tabs = {
Expand Down

0 comments on commit 71af238

Please sign in to comment.