From 3fede0f1b6eac18c016aa0866c73c33aac72b214 Mon Sep 17 00:00:00 2001 From: Marian Steinbach Date: Thu, 31 Oct 2024 08:59:07 +0100 Subject: [PATCH] Delete RUMActions and RUMActionTarget (#4633) * Delete RUMActions and RUMActionTarget * Delete athena service and RUM code (#4634) --- .gitignore | 3 + helm/happa/templates/configmap.yaml | 3 - jest.config.ts | 1 - package.json | 3 +- scripts/getConfigurationValues.ts | 3 - src/@types/global.d.ts | 1 - .../AZSelection/AZSelectionCheckbox.tsx | 30 ++--- .../ClusterDetail/AddNodePool/AddNodePool.js | 3 +- .../InstanceTypeSelector/InstanceTypeRow.tsx | 28 ++--- .../InstanceTypeSelector.tsx | 46 +++---- .../ClusterDetail/V5ClusterDetailTable.js | 16 +-- .../NewCluster/CreateNodePoolsCluster.js | 62 ++++----- .../NewCluster/CreateRegularCluster.js | 32 ++--- .../NewCluster/ReleaseSelector/ReleaseRow.tsx | 77 +++++------- .../ReleaseSelector/ReleaseSelector.tsx | 48 +++---- .../CreateClusterControlPlaneNodeAZs.tsx | 3 +- .../CreateCluster/CreateClusterReleaseRow.tsx | 30 ++--- .../CreateClusterReleaseSelector.tsx | 40 +++--- ...erNodesCreateNodePoolAvailabilityZones.tsx | 3 +- src/components/RUM/RUMActionTarget.tsx | 27 ---- .../RUM/__tests__/RUMActionTarget.tsx | 29 ----- .../UI/Controls/Navigation/Navigation.js | 10 +- .../AvailabilityZonesLabel.tsx | 28 ++--- src/components/index.tsx | 4 - src/index.ejs | 1 - src/model/clients/GraphQLClient.ts | 76 ----------- src/model/clients/GraphQLError.ts | 18 --- src/model/constants/realUserMonitoring.ts | 38 ------ src/model/services/athena/analytics.ts | 18 --- src/model/services/athena/index.ts | 2 - .../mutations/CreateAnalyticsEvent.graphql | 10 -- src/model/services/athena/types.ts | 23 ---- src/utils/RUMService.ts | 119 ------------------ .../__tests__/realUserMonitoringUtils.ts | 16 --- src/utils/realUserMonitoringUtils.ts | 5 - webpack.dev.ts | 1 - 36 files changed, 190 insertions(+), 667 deletions(-) delete mode 100644 src/components/RUM/RUMActionTarget.tsx delete mode 100644 src/components/RUM/__tests__/RUMActionTarget.tsx delete mode 100644 src/model/clients/GraphQLClient.ts delete mode 100644 src/model/clients/GraphQLError.ts delete mode 100644 src/model/constants/realUserMonitoring.ts delete mode 100644 src/model/services/athena/analytics.ts delete mode 100644 src/model/services/athena/index.ts delete mode 100644 src/model/services/athena/mutations/CreateAnalyticsEvent.graphql delete mode 100644 src/model/services/athena/types.ts delete mode 100644 src/utils/RUMService.ts delete mode 100644 src/utils/__tests__/realUserMonitoringUtils.ts delete mode 100644 src/utils/realUserMonitoringUtils.ts diff --git a/.gitignore b/.gitignore index cf2604e28f..c11f7242d5 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,6 @@ tsconfig.tsbuildinfo # app-test-suite /ats/test_results*.xml + +# Python virtual environments +/venv diff --git a/helm/happa/templates/configmap.yaml b/helm/happa/templates/configmap.yaml index 6f7e4535f1..ce2d259ead 100644 --- a/helm/happa/templates/configmap.yaml +++ b/helm/happa/templates/configmap.yaml @@ -46,9 +46,6 @@ data: sentry-debug: false sentry-sample-rate: 0.5 - # Enables real user monitoring (RUM) - enable-rum: true - # Feature flags feature-mapi-auth: {{ .Values.happa.featureFlags.mapiAuth }} feature-mapi-clusters: {{ .Values.happa.featureFlags.mapiClusters }} diff --git a/jest.config.ts b/jest.config.ts index fee2a2c981..df3e8cce4a 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -68,7 +68,6 @@ const config: Config.InitialOptions = { passageEndpoint: 'http://5.6.7.8', environment: 'development', ingressBaseDomain: 'k8s.sample.io', - enableRealUserMonitoring: false, defaultRequestTimeoutSeconds: 10, awsCapabilitiesJSON: '{"m4.xlarge":{"cpu_cores":4,"description":"M4 General Purpose Extra Large","memory_size_gb":16,"storage_size_gb":0},"m3.large":{"description":"M3 General Purpose Large","memory_size_gb":7.5,"cpu_cores":2,"storage_size_gb":32},"m3.xlarge":{"description":"M3 General Purpose Extra Large","memory_size_gb":15,"cpu_cores":4,"storage_size_gb":80},"m3.2xlarge":{"description":"M3 General Purpose Double Extra Large","memory_size_gb":30,"cpu_cores":8,"storage_size_gb":160}, "m5.xlarge":{"cpu_cores":4,"description":"M5 General Purpose Extra Large","memory_size_gb":16,"storage_size_gb":0}}', diff --git a/package.json b/package.json index 24b5451e2a..e263cd11bb 100644 --- a/package.json +++ b/package.json @@ -260,5 +260,6 @@ "yarn lint:staged", "yarn format:staged" ] - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/scripts/getConfigurationValues.ts b/scripts/getConfigurationValues.ts index c71f7d9c51..208402e4d3 100644 --- a/scripts/getConfigurationValues.ts +++ b/scripts/getConfigurationValues.ts @@ -11,7 +11,6 @@ export interface IConfigurationValues { defaultRequestTimeoutSeconds: number; environment: string; happaVersion: string; - enableRealUserMonitoring: boolean; awsCapabilitiesJSON: string; azureCapabilitiesJSON: string; @@ -80,7 +79,6 @@ export async function getConfigurationValues( config.setDefault('mapi-audience', 'http://localhost:8000'); config.setDefault('passage-endpoint', 'http://localhost:8000'); config.setDefault('athena-endpoint', 'http://localhost:8000'); - config.setDefault('enable-rum', true); config.setDefault('installation-name', 'development'); config.setDefault('default-request-timeout-seconds', 10); config.setDefault('ingress-base-domain', 'k8s.sample.io'); @@ -119,7 +117,6 @@ export async function getConfigurationValues( ), environment: config.getString('installation-name'), happaVersion: config.getString('version'), - enableRealUserMonitoring: config.getBoolean('enable-rum'), awsCapabilitiesJSON: config.getString('aws-capabilities-json'), azureCapabilitiesJSON: config.getString('azure-capabilities-json'), diff --git a/src/@types/global.d.ts b/src/@types/global.d.ts index 09eb6386c5..1bd0c1b810 100644 --- a/src/@types/global.d.ts +++ b/src/@types/global.d.ts @@ -14,7 +14,6 @@ interface IGlobalConfig { athenaEndpoint: string; mapiAudience: string; defaultRequestTimeoutSeconds: number; - enableRealUserMonitoring: boolean; environment: GlobalEnvironment; happaVersion: string; ingressBaseDomain: string; diff --git a/src/components/Cluster/AZSelection/AZSelectionCheckbox.tsx b/src/components/Cluster/AZSelection/AZSelectionCheckbox.tsx index 0f9089750a..f65a6cd519 100644 --- a/src/components/Cluster/AZSelection/AZSelectionCheckbox.tsx +++ b/src/components/Cluster/AZSelection/AZSelectionCheckbox.tsx @@ -1,8 +1,6 @@ import { Text } from 'grommet'; import * as React from 'react'; -import RUMActionTarget from 'RUM/RUMActionTarget'; import RadioInput from 'UI/Inputs/RadioInput'; -import { mergeActionNames } from 'utils/realUserMonitoringUtils'; import { AvailabilityZoneSelection } from './AZSelectionUtils'; @@ -34,21 +32,19 @@ const AZSelectionCheckbox: React.FC< const id = `${uniqueIdentifier}-${typeName.toLowerCase()}`; return ( - - onChange(type!)} - tabIndex={-1} - label={ - - {label} - - } - {...rest} - /> - + onChange(type!)} + tabIndex={-1} + label={ + + {label} + + } + {...rest} + /> ); }; diff --git a/src/components/Cluster/ClusterDetail/AddNodePool/AddNodePool.js b/src/components/Cluster/ClusterDetail/AddNodePool/AddNodePool.js index 00ed9c3b71..372675e644 100644 --- a/src/components/Cluster/ClusterDetail/AddNodePool/AddNodePool.js +++ b/src/components/Cluster/ClusterDetail/AddNodePool/AddNodePool.js @@ -8,7 +8,6 @@ import AddNodePoolSpotInstances from 'Cluster/ClusterDetail/AddNodePool/AddNodeP import { Box } from 'grommet'; import produce from 'immer'; import { Constants, Providers } from 'model/constants'; -import { RUMActions } from 'model/constants/realUserMonitoring'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import NodeCountSelector from 'shared/NodeCountSelector'; @@ -445,7 +444,7 @@ class AddNodePool extends Component { > = ({ aria-label={`${singular} ${name}`} > - - selectInstanceType(name)} - formFieldProps={{ - margin: 'none', - }} - tabIndex={-1} - /> - + selectInstanceType(name)} + formFieldProps={{ + margin: 'none', + }} + tabIndex={-1} + /> {name} diff --git a/src/components/Cluster/ClusterDetail/InstanceTypeSelector/InstanceTypeSelector.tsx b/src/components/Cluster/ClusterDetail/InstanceTypeSelector/InstanceTypeSelector.tsx index 6996f550c0..dbce7d7d69 100644 --- a/src/components/Cluster/ClusterDetail/InstanceTypeSelector/InstanceTypeSelector.tsx +++ b/src/components/Cluster/ClusterDetail/InstanceTypeSelector/InstanceTypeSelector.tsx @@ -1,7 +1,5 @@ import { Keyboard } from 'grommet'; -import { RUMActions } from 'model/constants/realUserMonitoring'; import React, { FC, useState } from 'react'; -import RUMActionTarget from 'RUM/RUMActionTarget'; import styled from 'styled-components'; import { ListToggler, @@ -94,33 +92,25 @@ const InstanceTypeSelector: FC = ({ )}
- setCollapsed(!collapsed)} + collapsible={true} + onKeyDown={handleTabSelect} + title={`Show/hide available ${plural}`} > - setCollapsed(!collapsed)} - collapsible={true} - onKeyDown={handleTabSelect} - title={`Show/hide available ${plural}`} - > -