From bad530af73c93f822182337bcf8de1cd2959d47e Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 16 Aug 2022 15:49:22 +0200 Subject: [PATCH] remote pull and resolved conflicts --- .../Client/CustomFields/CustomFields.js | 8 +- .../components/Client/Webhooks/Webhooks.js | 121 +++++++++--------- .../shared/AnimatedSVG/AnimatedSVG.tsx | 9 ++ 3 files changed, 77 insertions(+), 61 deletions(-) diff --git a/frontend/app/components/Client/CustomFields/CustomFields.js b/frontend/app/components/Client/CustomFields/CustomFields.js index d5abbb2c6..1d8c2b2cd 100644 --- a/frontend/app/components/Client/CustomFields/CustomFields.js +++ b/frontend/app/components/Client/CustomFields/CustomFields.js @@ -84,8 +84,12 @@ function CustomFields(props) { - -
No data available.
+ + {/*
*/} +
None added yet
+
} size="small" diff --git a/frontend/app/components/Client/Webhooks/Webhooks.js b/frontend/app/components/Client/Webhooks/Webhooks.js index 076ed0587..58350809f 100644 --- a/frontend/app/components/Client/Webhooks/Webhooks.js +++ b/frontend/app/components/Client/Webhooks/Webhooks.js @@ -13,71 +13,74 @@ import { toast } from 'react-toastify'; import { useModal } from 'App/components/Modal'; function Webhooks(props) { - const { webhooks, loading } = props; - const { showModal, hideModal } = useModal(); + const { webhooks, loading } = props; + const { showModal, hideModal } = useModal(); - const noSlackWebhooks = webhooks.filter((hook) => hook.type !== 'slack'); - useEffect(() => { - props.fetchList(); - }, []); + const noSlackWebhooks = webhooks.filter((hook) => hook.type !== 'slack'); + useEffect(() => { + props.fetchList(); + }, []); - const init = (v) => { - props.init(v); - showModal(); - }; + const init = (v) => { + props.init(v); + showModal(); + }; - const removeWebhook = async (id) => { - if ( - await confirm({ - header: 'Confirm', - confirmButton: 'Yes, delete', - confirmation: `Are you sure you want to remove this webhook?`, - }) - ) { - props.remove(id).then(() => { - toast.success('Webhook removed successfully'); - }); - hideModal(); - } - }; + const removeWebhook = async (id) => { + if ( + await confirm({ + header: 'Confirm', + confirmButton: 'Yes, delete', + confirmation: `Are you sure you want to remove this webhook?`, + }) + ) { + props.remove(id).then(() => { + toast.success('Webhook removed successfully'); + }); + hideModal(); + } + }; - return ( -
-
-

{'Webhooks'}

-
+ + + + +
None added yet
+
- - - - -
No webhooks available.
- - } - size="small" - show={noSlackWebhooks.size === 0} - > -
- {noSlackWebhooks.map((webhook) => ( - init(webhook)} /> - ))} -
-
-
- - ); + } + size="small" + show={noSlackWebhooks.size === 0} + > +
+ {noSlackWebhooks.map((webhook) => ( + init(webhook)} /> + ))} +
+
+ + + ); } export default connect( - (state) => ({ - webhooks: state.getIn(['webhooks', 'list']), - loading: state.getIn(['webhooks', 'loading']), - }), - { - init, - fetchList, - remove, - } + (state) => ({ + webhooks: state.getIn(['webhooks', 'list']), + loading: state.getIn(['webhooks', 'loading']), + }), + { + init, + fetchList, + remove, + } )(withPageTitle('Webhooks - OpenReplay Preferences')(Webhooks)); diff --git a/frontend/app/components/shared/AnimatedSVG/AnimatedSVG.tsx b/frontend/app/components/shared/AnimatedSVG/AnimatedSVG.tsx index c1d8b1799..df2fffce8 100644 --- a/frontend/app/components/shared/AnimatedSVG/AnimatedSVG.tsx +++ b/frontend/app/components/shared/AnimatedSVG/AnimatedSVG.tsx @@ -10,6 +10,8 @@ import NoBookmarks from '../../../svg/ca-no-bookmarked-session.svg'; import NoLiveSessions from '../../../svg/ca-no-live-sessions.svg'; import NoSessions from '../../../svg/ca-no-sessions.svg'; import NoSessionsInVault from '../../../svg/ca-no-sessions-in-vault.svg'; +import NoWebhooks from '../../../svg/ca-no-webhooks.svg'; +import NoMetadata from '../../../svg/ca-no-metadata.svg'; import NoIssues from '../../../svg/ca-no-issues.svg'; export enum ICONS { @@ -24,6 +26,9 @@ export enum ICONS { NO_LIVE_SESSIONS = 'ca-no-live-sessions', NO_SESSIONS = 'ca-no-sessions', NO_SESSIONS_IN_VAULT = 'ca-no-sessions-in-vault', + NO_WEBHOOKS = 'ca-no-webhooks', + NO_METADATA = 'ca-no-metadata', + NO_SESSIONS_IN_VAULT = 'ca-no-sessions-in-vault', NO_ISSUES = 'ca-no-issues', } @@ -57,6 +62,10 @@ function AnimatedSVG(props: Props) { return ; case ICONS.NO_SESSIONS_IN_VAULT: return ; + case ICONS.NO_WEBHOOKS: + return ; + case ICONS.NO_METADATA: + return ; case ICONS.NO_ISSUES: return ; default: