From 429dfb4314fbdf7e5e8037afa0768ca6cadaff0d Mon Sep 17 00:00:00 2001 From: jinapurapu <65002498+jinapurapu@users.noreply.github.com> Date: Fri, 6 Oct 2023 13:38:55 -0700 Subject: [PATCH] Add HelpTips to Console (#3054) --- .../Account/AddServiceAccountScreen.tsx | 23 +++- .../Console/Account/ServiceAccountPolicy.tsx | 12 +- .../BucketDetails/AccessDetailsPanel.tsx | 29 ++++- .../Buckets/BucketDetails/AccessRulePanel.tsx | 22 +++- .../Buckets/BucketDetails/AddAccessRule.tsx | 9 +- .../Buckets/BucketDetails/AddEvent.tsx | 12 +- .../BucketDetails/AddLifecycleModal.tsx | 59 +++++++++- .../BucketDetails/BucketEventsPanel.tsx | 20 +++- .../BucketDetails/BucketLifecyclePanel.tsx | 20 +++- .../BucketDetails/BucketReplicationPanel.tsx | 20 +++- .../BucketDetails/BucketSummaryPanel.tsx | 68 ++++++++++- .../Buckets/BucketDetails/SetAccessPolicy.tsx | 12 +- .../BucketDetails/SetRetentionConfig.tsx | 26 +++- .../SummaryItems/EditablePropertyItem.tsx | 48 +++++--- .../ListBuckets/AddBucket/AddBucket.tsx | 111 ++++++++++++++++++ .../AutocompleteWrapper.tsx | 9 +- .../CodeMirrorWrapper/CodeMirrorWrapper.tsx | 4 + .../Console/Policies/AddPolicyScreen.tsx | 10 ++ .../Console/Policies/PolicyDetails.tsx | 29 ++++- .../screens/Console/Policies/PolicyView.tsx | 25 +++- .../Users/AddUserServiceAccountScreen.tsx | 33 +++++- 21 files changed, 556 insertions(+), 45 deletions(-) diff --git a/portal-ui/src/screens/Console/Account/AddServiceAccountScreen.tsx b/portal-ui/src/screens/Console/Account/AddServiceAccountScreen.tsx index 7429a52a7..a5fd6f661 100644 --- a/portal-ui/src/screens/Console/Account/AddServiceAccountScreen.tsx +++ b/portal-ui/src/screens/Console/Account/AddServiceAccountScreen.tsx @@ -28,6 +28,7 @@ import { InputBox, Switch, ServiceAccountIcon, + HelpTip, } from "mds"; import { modalStyleUtils } from "../Common/FormComponents/common/styleLibrary"; import { NewServiceAccount } from "../Common/CredentialsPrompt/types"; @@ -190,10 +191,24 @@ const AddServiceAccount = () => { {isRestrictedByPolicy && ( - - Current User Policy - edit the JSON to remove permissions - for this Access Key - + + + Guide to access policy structure + + + } + placement="right" + > + + Current User Policy - edit the JSON to remove + permissions for this Access Key + + . -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, Fragment } from "react"; import { Button, ChangeAccessPolicyIcon, Grid } from "mds"; import { api } from "api"; import { errorToHandler } from "api/errors"; @@ -98,6 +98,16 @@ const ServiceAccountPolicy = ({ setPolicyDefinition(value); }} editorHeight={"350px"} + helptip={ + + + Guide to access policy structure + + + } /> diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessDetailsPanel.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessDetailsPanel.tsx index 8f3468874..8ad156008 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessDetailsPanel.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessDetailsPanel.tsx @@ -17,7 +17,7 @@ import React, { Fragment, useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { useNavigate, useParams } from "react-router-dom"; -import { DataTable, SectionTitle, Tabs } from "mds"; +import { DataTable, SectionTitle, Tabs, HelpTip } from "mds"; import { api } from "api"; import { errorToHandler } from "api/errors"; import { @@ -145,7 +145,32 @@ const AccessDetails = () => { return ( - Access Audit + + + Understand which{" "} + + Policies + {" "} + and{" "} + + Users + {" "} + are authorized to access this Bucket. + + } + placement="right" + > + Access Audit + + { diff --git a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx index e156ef625..69cdac637 100644 --- a/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx +++ b/portal-ui/src/screens/Console/Buckets/BucketDetails/AccessRulePanel.tsx @@ -15,7 +15,7 @@ // along with this program. If not, see . import React, { Fragment, useEffect, useState } from "react"; -import { AddIcon, Button, DataTable, SectionTitle } from "mds"; +import { AddIcon, Button, DataTable, SectionTitle, HelpTip } from "mds"; import { useSelector } from "react-redux"; import { useParams } from "react-router-dom"; import { api } from "api"; @@ -194,7 +194,25 @@ const AccessRule = () => { } > - Anonymous Access + + Setting an{" "} + + Anonymous + {" "} + policy allows clients to access the Bucket or prefix contents and + perform actions consistent with the specified policy without + authentication. + + } + placement="right" + > + Anonymous Access + . -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, Fragment } from "react"; import ModalWrapper from "../../Common/ModalWrapper/ModalWrapper"; import { AddAccessRuleIcon, @@ -115,6 +115,13 @@ const AddAccessRule = ({ value={selectedAccess} options={accessOptions} disabled={false} + helpTip={ + + Select the desired level of access available to unauthenticated + Users + + } + helpTipPlacement="right" />