From 901c86076618043991d054b4ee73305266f864cb Mon Sep 17 00:00:00 2001 From: susrithasabbini Date: Mon, 16 Dec 2024 17:12:20 +0530 Subject: [PATCH 1/2] chore: Removed unused feature flags - user_journey_analytics, authentication_analytics, system_metrics, live_users_counter --- README.md | 8 ----- config/config.toml | 4 --- cypress/e2e/auth/auth.cy.js | 4 --- src/entryPoints/FeatureFlagUtils.res | 8 ----- src/entryPoints/HyperSwitchApp.res | 29 +-------------- src/entryPoints/SidebarValues.res | 36 ++----------------- .../HomePageOverviewComponent.res | 3 +- 7 files changed, 4 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 758814373..27f86080e 100644 --- a/README.md +++ b/README.md @@ -115,10 +115,6 @@ The `frm` feature flag enables the Fraud and Risk Management (FRM) module within The `sample_data` feature flag enables the ability to load simulated sample data into the dashboard for preview purposes. When enabled, dummy transactions, analytics, and reporting data can be generated. -#### System Metrics - -The `system_metrics` feature flag unlocks access to system monitoring and metrics pages within the dashboard. When enabled, users can view technical performance data like payment latency, uptime, API response times, error rates, and more. - #### Audit trail The `audit_trail` feature flag enables access to payment and refund audit logs within the dashboard. When turned on, users can view detailed trails showing the history of transactions including status changes, approvals, edits, and more. @@ -140,10 +136,6 @@ The `email` feature flag enables user sign-in and sign-up using magic links inst The `surcharge` feature flag enables the ability to apply surcharges to payments. When enabled, you can create advanced rules based on payment parameters like amount, currency, and payment method to enforce surcharges as needed. -### User Journey - -Enabling `user_journey_analytics` grants access to the user journey module within the analytics section of the dashboard. This feature provides comprehensive graphical representations of payment analytics, facilitating a deeper understanding of user behavior and usage patterns. - ### Branding Enabling `branding` feature flag enables customization of branding elements like logos, colors. diff --git a/config/config.toml b/config/config.toml index 06d19bee5..1936a8698 100644 --- a/config/config.toml +++ b/config/config.toml @@ -19,7 +19,6 @@ is_live_mode=false email=false quick_start=false audit_trail=false -system_metrics=false sample_data=false frm=false payout=true @@ -28,8 +27,6 @@ test_processors=true feedback=false mixpanel=false generate_report=false -user_journey_analytics=false -authentication_analytics=false surcharge=false dispute_evidence_upload=false paypal_automatic_flow=false @@ -39,7 +36,6 @@ global_search_filters=false dispute_analytics=false configure_pmts=false branding=false -live_users_counter=false granularity=false compliance_certificate=false pm_authentication_processor=true diff --git a/cypress/e2e/auth/auth.cy.js b/cypress/e2e/auth/auth.cy.js index b5bb0621e..d4c01c588 100644 --- a/cypress/e2e/auth/auth.cy.js +++ b/cypress/e2e/auth/auth.cy.js @@ -71,7 +71,6 @@ describe("Auth Module", () => { email: true, quick_start: false, audit_trail: false, - system_metrics: false, sample_data: false, frm: false, payout: true, @@ -80,8 +79,6 @@ describe("Auth Module", () => { feedback: false, mixpanel: false, generate_report: false, - user_journey_analytics: false, - authentication_analytics: false, surcharge: false, dispute_evidence_upload: false, paypal_automatic_flow: false, @@ -90,7 +87,6 @@ describe("Auth Module", () => { dispute_analytics: false, configure_pmts: false, branding: false, - live_users_counter: false, granularity: false, compliance_certificate: false, user_management_revamp: false, diff --git a/src/entryPoints/FeatureFlagUtils.res b/src/entryPoints/FeatureFlagUtils.res index 2ce2d4a47..df6c6d1d9 100644 --- a/src/entryPoints/FeatureFlagUtils.res +++ b/src/entryPoints/FeatureFlagUtils.res @@ -10,7 +10,6 @@ type featureFlag = { email: bool, isLiveMode: bool, auditTrail: bool, - systemMetrics: bool, sampleData: bool, frm: bool, payOut: bool, @@ -20,8 +19,6 @@ type featureFlag = { generateReport: bool, mixpanel: bool, mixpanelToken: string, - userJourneyAnalytics: bool, - authenticationAnalytics: bool, surcharge: bool, disputeEvidenceUpload: bool, paypalAutomaticFlow: bool, @@ -31,7 +28,6 @@ type featureFlag = { disputeAnalytics: bool, configurePmts: bool, branding: bool, - liveUsersCounter: bool, granularity: bool, complianceCertificate: bool, pmAuthenticationProcessor: bool, @@ -54,7 +50,6 @@ let featureFlagType = (featureFlags: JSON.t) => { email: dict->getBool("email", false), isLiveMode: dict->getBool("is_live_mode", false), auditTrail: dict->getBool("audit_trail", false), - systemMetrics: dict->getBool("system_metrics", false), sampleData: dict->getBool("sample_data", false), frm: dict->getBool("frm", false), payOut: dict->getBool("payout", false), @@ -64,8 +59,6 @@ let featureFlagType = (featureFlags: JSON.t) => { generateReport: dict->getBool("generate_report", false), mixpanel: dict->getBool("mixpanel", false), mixpanelToken: dict->getString("mixpanel_token", ""), - userJourneyAnalytics: dict->getBool("user_journey_analytics", false), - authenticationAnalytics: dict->getBool("authentication_analytics", false), surcharge: dict->getBool("surcharge", false), disputeEvidenceUpload: dict->getBool("dispute_evidence_upload", false), paypalAutomaticFlow: dict->getBool("paypal_automatic_flow", false), @@ -75,7 +68,6 @@ let featureFlagType = (featureFlags: JSON.t) => { disputeAnalytics: dict->getBool("dispute_analytics", false), configurePmts: dict->getBool("configure_pmts", false), branding: dict->getBool("branding", false), - liveUsersCounter: dict->getBool("live_users_counter", false), granularity: dict->getBool("granularity", false), complianceCertificate: dict->getBool("compliance_certificate", false), pmAuthenticationProcessor: dict->getBool("pm_authentication_processor", false), diff --git a/src/entryPoints/HyperSwitchApp.res b/src/entryPoints/HyperSwitchApp.res index 973b6cc78..1d9964b4d 100644 --- a/src/entryPoints/HyperSwitchApp.res +++ b/src/entryPoints/HyperSwitchApp.res @@ -39,7 +39,6 @@ let make = () => { merchantDetailsTypedValue.recon_status === Active }, [merchantDetailsTypedValue.merchant_id]) - let isLiveUsersCounterEnabled = featureFlagDetails.liveUsersCounter let hyperSwitchAppSidebars = SidebarValues.useGetSidebarValues(~isReconEnabled) sessionExpired := false @@ -134,13 +133,6 @@ let make = () => { }} /> - {switch url.path->urlPath { - | list{"home"} => - - - - | _ => React.null - }}
@@ -208,25 +200,6 @@ let make = () => { /> | list{"users", ..._} => - | list{"analytics-user-journey"} => - checkUserEntity} - authorization={userHasAccess(~groupAccess=AnalyticsView)}> - - - - - | list{"analytics-authentication"} => - checkUserEntity} - authorization={userHasAccess(~groupAccess=AnalyticsView)}> - - - - | list{"developer-api-keys"} => { | list{"developer-system-metrics"} => diff --git a/src/entryPoints/SidebarValues.res b/src/entryPoints/SidebarValues.res index dbb0d8c4b..f8bd09ef5 100644 --- a/src/entryPoints/SidebarValues.res +++ b/src/entryPoints/SidebarValues.res @@ -292,26 +292,8 @@ let refundAnalytics = SubLevelLink({ searchOptions: [("View analytics", "")], }) -let userJourneyAnalytics = SubLevelLink({ - name: "User Journey", - link: `/analytics-user-journey`, - access: Access, - iconTag: "betaTag", - searchOptions: [("View analytics", "")], -}) - -let authenticationAnalytics = SubLevelLink({ - name: "Authentication", - link: `/analytics-authentication`, - access: Access, - iconTag: "betaTag", - searchOptions: [("View analytics", "")], -}) - let analytics = ( isAnalyticsEnabled, - userJourneyAnalyticsFlag, - authenticationAnalyticsFlag, disputeAnalyticsFlag, performanceMonitorFlag, newAnalyticsflag, @@ -319,14 +301,6 @@ let analytics = ( ) => { let links = [paymentAnalytcis, refundAnalytics] - if userJourneyAnalyticsFlag { - links->Array.push(userJourneyAnalytics) - } - - if authenticationAnalyticsFlag { - links->Array.push(authenticationAnalytics) - } - if disputeAnalyticsFlag { links->Array.push(disputeAnalytics) } @@ -527,7 +501,6 @@ let paymentSettings = userHasResourceAccess => { let developers = ( isDevelopersEnabled, - systemMetrics, ~userHasResourceAccess, ~checkUserEntity, ~roleId, @@ -540,7 +513,7 @@ let developers = ( let defaultDevelopersOptions = [paymentSettings] - if isInternalUser && systemMetrics { + if isInternalUser { defaultDevelopersOptions->Array.push(systemMetric) } if !isProfileUser { @@ -666,9 +639,6 @@ let useGetSidebarValues = (~isReconEnabled: bool) => { payOut, recon, default, - systemMetrics, - userJourneyAnalytics: userJourneyAnalyticsFlag, - authenticationAnalytics: authenticationAnalyticsFlag, surcharge: isSurchargeEnabled, isLiveMode, threedsAuthenticator, @@ -700,8 +670,6 @@ let useGetSidebarValues = (~isReconEnabled: bool) => { ~userHasResourceAccess, ), default->analytics( - userJourneyAnalyticsFlag, - authenticationAnalyticsFlag, disputeAnalytics, performanceMonitorFlag, isNewAnalyticsEnable, @@ -714,7 +682,7 @@ let useGetSidebarValues = (~isReconEnabled: bool) => { ~userEntity, ), recon->reconAndSettlement(isReconEnabled, checkUserEntity, userHasResourceAccess), - default->developers(systemMetrics, ~userHasResourceAccess, ~checkUserEntity, ~roleId), + default->developers(~userHasResourceAccess, ~checkUserEntity, ~roleId), settings(~isConfigurePmtsEnabled=configurePmts, ~userHasResourceAccess, ~complianceCertificate), ] diff --git a/src/screens/Analytics/HomePageOverview/HomePageOverviewComponent.res b/src/screens/Analytics/HomePageOverview/HomePageOverviewComponent.res index 5820d5086..b94185467 100644 --- a/src/screens/Analytics/HomePageOverview/HomePageOverviewComponent.res +++ b/src/screens/Analytics/HomePageOverview/HomePageOverviewComponent.res @@ -197,7 +197,6 @@ module OverviewInfo = { @react.component let make = () => { - let {systemMetrics} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom let {userHasAccess} = GroupACLHooks.useUserGroupACLHook()
@@ -207,7 +206,7 @@ let make = () => { - +
From 3f4ecea5b1ae9ecbe5fdda1254ba7705b90abf34 Mon Sep 17 00:00:00 2001 From: susrithasabbini Date: Mon, 16 Dec 2024 17:13:39 +0530 Subject: [PATCH 2/2] chore: Removed unused feature flags - user_journey_analytics, authentication_analytics, system_metrics, live_users_counter --- src/entryPoints/SidebarValues.res | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/entryPoints/SidebarValues.res b/src/entryPoints/SidebarValues.res index f8bd09ef5..996b874de 100644 --- a/src/entryPoints/SidebarValues.res +++ b/src/entryPoints/SidebarValues.res @@ -499,12 +499,7 @@ let paymentSettings = userHasResourceAccess => { }) } -let developers = ( - isDevelopersEnabled, - ~userHasResourceAccess, - ~checkUserEntity, - ~roleId, -) => { +let developers = (isDevelopersEnabled, ~userHasResourceAccess, ~checkUserEntity, ~roleId) => { let isInternalUser = roleId->HyperSwitchUtils.checkIsInternalUser let isProfileUser = checkUserEntity([#Profile]) let apiKeys = apiKeys(userHasResourceAccess)