From 191042e081dc0f03c3af9173a7e503f6bc88a413 Mon Sep 17 00:00:00 2001 From: Radhika Vissamsetty Date: Mon, 20 Nov 2023 13:52:47 +0530 Subject: [PATCH] Format and tooltip changes sa model dialog --- .../NamespaceAdmin/ServiceAccounts/EditConfirmDialog.tsx | 1 + app/cdap/components/shared/ConfirmDialog/Status.tsx | 6 ++++-- app/cdap/components/shared/ConfirmDialog/index.tsx | 3 +++ app/cdap/text/text-en.yaml | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/cdap/components/NamespaceAdmin/ServiceAccounts/EditConfirmDialog.tsx b/app/cdap/components/NamespaceAdmin/ServiceAccounts/EditConfirmDialog.tsx index e03440f79ee..311e148eefd 100644 --- a/app/cdap/components/NamespaceAdmin/ServiceAccounts/EditConfirmDialog.tsx +++ b/app/cdap/components/NamespaceAdmin/ServiceAccounts/EditConfirmDialog.tsx @@ -168,6 +168,7 @@ export const EditConfirmDialog = ({ statusMessage={saveStatusMsg} extendedMessage={saveStatusDetails} copyableExtendedMessage={copyableExtendedMessage} + isExpandedDefault={true} > ); }; diff --git a/app/cdap/components/shared/ConfirmDialog/Status.tsx b/app/cdap/components/shared/ConfirmDialog/Status.tsx index a6d1ae82416..059bbabebcd 100644 --- a/app/cdap/components/shared/ConfirmDialog/Status.tsx +++ b/app/cdap/components/shared/ConfirmDialog/Status.tsx @@ -30,6 +30,7 @@ interface IStatusProps { statusMessage?: string | ReactNode; extendedMessage?: IExtendedMessage | string; copyableExtendedMessage?: string | ReactNode; + isExpandedDefault?: boolean; } export const Status = ({ @@ -37,8 +38,9 @@ export const Status = ({ statusMessage, extendedMessage, copyableExtendedMessage, + isExpandedDefault, }: IStatusProps) => { - const [isExpanded, setIsExpanded] = useState(false); + const [isExpanded, setIsExpanded] = useState(isExpandedDefault); const handleToggleExtendedMessage = () => { setIsExpanded(!isExpanded); @@ -64,7 +66,7 @@ export const Status = ({ {isExpanded && ( {typeof extendedMessage === 'string' ? ( -
{extendedMessage}
+
) : (
{extendedMessage.response}
)} diff --git a/app/cdap/components/shared/ConfirmDialog/index.tsx b/app/cdap/components/shared/ConfirmDialog/index.tsx index 63c2f657113..5b16e84c241 100644 --- a/app/cdap/components/shared/ConfirmDialog/index.tsx +++ b/app/cdap/components/shared/ConfirmDialog/index.tsx @@ -48,6 +48,7 @@ interface IConfirmDialogProps { extendedMessage?: IExtendedMessage | string; disableAction?: boolean; copyableExtendedMessage?: string | ReactNode; + isExpandedDefault?: boolean; } export const ConfirmDialog = ({ @@ -64,6 +65,7 @@ export const ConfirmDialog = ({ extendedMessage, disableAction, copyableExtendedMessage, + isExpandedDefault, }: IConfirmDialogProps) => { return ( @@ -75,6 +77,7 @@ export const ConfirmDialog = ({ extendedMessage={extendedMessage} copyableExtendedMessage={copyableExtendedMessage} key={statusMessage.toString()} + isExpandedDefault={isExpandedDefault} > )} diff --git a/app/cdap/text/text-en.yaml b/app/cdap/text/text-en.yaml index 5b43ce43f5c..9abfd0c1be0 100644 --- a/app/cdap/text/text-en.yaml +++ b/app/cdap/text/text-en.yaml @@ -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
export GSA_PROJECT_ID=<PROJECT_ID> # Google Cloud Project ID where the IAM service account is located.

2. Copy and Run below command" inputHelperText: Provide details of the service account for authorization serviceAccount : Service account SourceControlManagement: