Skip to content

Commit

Permalink
Merge pull request #1147 from cdapio/sa-model-help-changes
Browse files Browse the repository at this point in the history
Format and tooltip changes for helper commands in service accounts modal dialog
  • Loading branch information
radhikav1 authored Nov 20, 2023
2 parents f543feb + 191042e commit f004df9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export const EditConfirmDialog = ({
statusMessage={saveStatusMsg}
extendedMessage={saveStatusDetails}
copyableExtendedMessage={copyableExtendedMessage}
isExpandedDefault={true}
></ConfirmDialog>
);
};
6 changes: 4 additions & 2 deletions app/cdap/components/shared/ConfirmDialog/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ interface IStatusProps {
statusMessage?: string | ReactNode;
extendedMessage?: IExtendedMessage | string;
copyableExtendedMessage?: string | ReactNode;
isExpandedDefault?: boolean;
}

export const Status = ({
severity,
statusMessage,
extendedMessage,
copyableExtendedMessage,
isExpandedDefault,
}: IStatusProps) => {
const [isExpanded, setIsExpanded] = useState(false);
const [isExpanded, setIsExpanded] = useState(isExpandedDefault);

const handleToggleExtendedMessage = () => {
setIsExpanded(!isExpanded);
Expand All @@ -64,7 +66,7 @@ export const Status = ({
{isExpanded && (
<StyledBox>
{typeof extendedMessage === 'string' ? (
<div>{extendedMessage}</div>
<div dangerouslySetInnerHTML={{ __html: extendedMessage.toString() }}></div>
) : (
<pre>{extendedMessage.response}</pre>
)}
Expand Down
3 changes: 3 additions & 0 deletions app/cdap/components/shared/ConfirmDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ interface IConfirmDialogProps {
extendedMessage?: IExtendedMessage | string;
disableAction?: boolean;
copyableExtendedMessage?: string | ReactNode;
isExpandedDefault?: boolean;
}

export const ConfirmDialog = ({
Expand All @@ -64,6 +65,7 @@ export const ConfirmDialog = ({
extendedMessage,
disableAction,
copyableExtendedMessage,
isExpandedDefault,
}: IConfirmDialogProps) => {
return (
<StyledDialog open={isOpen} fullWidth>
Expand All @@ -75,6 +77,7 @@ export const ConfirmDialog = ({
extendedMessage={extendedMessage}
copyableExtendedMessage={copyableExtendedMessage}
key={statusMessage.toString()}
isExpandedDefault={isExpandedDefault}
></Status>
)}
<DialogContent>
Expand Down
4 changes: 2 additions & 2 deletions app/cdap/text/text-en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3184,8 +3184,8 @@ features:
failedToDelete: Unable to delete service account
failedToValidate: Service account validation failed
failedToSave: Failed to save the service account changes
helpTitle: Provided Google Service Accounts (GSA) will be leveraged as workload identity, more details on gcloud commands help ...
helpContent: "Internal Kubernetes Service Account(KSA) will be leveraged as workload identity users for Google Service Accounts (GSA) to enhance security and access control in the namespace to perform pipeline design-time operations (pipeline preview, Wrangler, pipeline validation) which requires granting Workload Identity User role to the namespace identity kubernetes service account on the IAM service account which can be done using the gcloud command : "
helpTitle: To use the service account with the namespace, Workload Identity Permission is required. Please grant the permission by running the below commands in CLI.
helpContent: "1. Run below command and export the GSA Project ID <br/> export GSA_PROJECT_ID=<i>&lt;PROJECT_ID&gt;</i> # Google Cloud Project ID where the IAM service account is located.<br/> <br/>2. Copy and Run below command"
inputHelperText: Provide details of the service account for authorization
serviceAccount : Service account
SourceControlManagement:
Expand Down

0 comments on commit f004df9

Please sign in to comment.