From b9873fa4716d8a163336e53155a08ab4648054b5 Mon Sep 17 00:00:00 2001
From: Prakash Senthil Vel <23444145+prakashsvmx@users.noreply.github.com>
Date: Fri, 26 Nov 2021 05:27:24 +0000
Subject: [PATCH] UX Notification endpoints (#1257)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
---
portal-ui/src/common/BackLink.tsx | 2 +-
.../AddNotificationEndpoint.tsx | 82 ++++++-----------
.../CustomForms/ConfMySql.tsx | 28 +++---
.../CustomForms/ConfPostgres.tsx | 30 +++---
.../ListNotificationEndpoints.tsx | 92 +++++++++----------
.../NotificationTypeSelector.tsx | 78 +++++++---------
6 files changed, 143 insertions(+), 169 deletions(-)
diff --git a/portal-ui/src/common/BackLink.tsx b/portal-ui/src/common/BackLink.tsx
index 0e67c9d60..668d399d0 100644
--- a/portal-ui/src/common/BackLink.tsx
+++ b/portal-ui/src/common/BackLink.tsx
@@ -55,7 +55,7 @@ const BackLink = ({ to, label, classes }: IBackLink) => {
- {label}
+ {label}
);
};
diff --git a/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx b/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx
index 869eeec60..8179f9d4b 100644
--- a/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx
+++ b/portal-ui/src/screens/Console/NotificationEndpoints/AddNotificationEndpoint.tsx
@@ -40,10 +40,11 @@ import { ErrorResponseHandler } from "../../../common/types";
import { IElementValue } from "../Configurations/types";
import PageHeader from "../Common/PageHeader/PageHeader";
-import { BackSettingsIcon } from "../../../icons";
import history from "../../../history";
import withSuspense from "../Common/Components/withSuspense";
+import BackLink from "../../../common/BackLink";
+import PageLayout from "../Common/Layout/PageLayout";
const ConfMySql = withSuspense(
React.lazy(() => import("./CustomForms/ConfMySql"))
@@ -61,23 +62,6 @@ const styles = (theme: Theme) =>
createStyles({
...modalBasic,
...settingsCommon,
- strongText: {
- fontWeight: 700,
- },
- keyName: {
- marginLeft: 5,
- },
- buttonContainer: {
- textAlign: "right",
- },
- lambdaFormIndicator: {
- display: "flex",
- marginBottom: 40,
- },
- customTitle: {
- ...settingsCommon.customTitle,
- marginTop: 0,
- },
lambdaNotif: {
background:
"linear-gradient(90deg, rgba(249,249,250,1) 0%, rgba(250,250,251,1) 68%, rgba(254,254,254,1) 100%)",
@@ -88,7 +72,6 @@ const styles = (theme: Theme) =>
alignItems: "center",
justifyContent: "start",
marginBottom: 16,
- marginRight: 8,
cursor: "pointer",
padding: 0,
overflow: "hidden",
@@ -112,13 +95,9 @@ const styles = (theme: Theme) =>
fontFamily: "Lato,sans-serif",
paddingLeft: 18,
},
- mainCont: {
- maxWidth: 1180,
- paddingLeft: 38,
- paddingRight: 38,
- },
- backTo: {
- margin: "20px 0px 0",
+ formBox: {
+ border: "1px solid #EAEAEA",
+ padding: 15,
},
});
@@ -208,20 +187,13 @@ const AddNotificationEndpoint = ({
return (
-
+
+
);
};
diff --git a/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/ConfMySql.tsx b/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/ConfMySql.tsx
index d6aa3c4f6..cea97b7cf 100644
--- a/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/ConfMySql.tsx
+++ b/portal-ui/src/screens/Console/NotificationEndpoints/CustomForms/ConfMySql.tsx
@@ -22,7 +22,10 @@ import Grid from "@mui/material/Grid";
import InputBoxWrapper from "../../Common/FormComponents/InputBoxWrapper/InputBoxWrapper";
import RadioGroupSelector from "../../Common/FormComponents/RadioGroupSelector/RadioGroupSelector";
import { IElementValue } from "../../Configurations/types";
-import { modalBasic } from "../../Common/FormComponents/common/styleLibrary";
+import {
+ formFieldStyles,
+ modalBasic,
+} from "../../Common/FormComponents/common/styleLibrary";
import CommentBoxWrapper from "../../Common/FormComponents/CommentBoxWrapper/CommentBoxWrapper";
import FormSwitchWrapper from "../../Common/FormComponents/FormSwitchWrapper/FormSwitchWrapper";
import PredefinedList from "../../Common/FormComponents/PredefinedList/PredefinedList";
@@ -35,6 +38,7 @@ interface IConfMySqlProps {
const styles = (theme: Theme) =>
createStyles({
...modalBasic,
+ ...formFieldStyles,
});
const ConfMySql = ({ onChange, classes }: IConfMySqlProps) => {
@@ -146,7 +150,7 @@ const ConfMySql = ({ onChange, classes }: IConfMySqlProps) => {
{useDsnString ? (
-
+
{
-
+
{
}}
/>
-
+
{
}}
/>
-
+
{
/>
-
+
{
}}
/>
-
+
{
)}
-
+
{
}}
/>
-
+
{
]}
/>
-
+
{
}}
/>
-
+
{
}}
/>
-
+
{useConnectionString ? (
-
+
{
-
+
{
}}
/>
-
+
{
}}
/>
-
+
{
}}
/>
-
+
{
]}
/>
-
+
{
}}
/>
-
+
{
)}
-
+
{
}}
/>
-
+
{
]}
/>
-
+
{
}}
/>
-
+
{
}}
/>
-
+