Skip to content

Commit

Permalink
Delete RUMActions and RUMActionTarget (#4633)
Browse files Browse the repository at this point in the history
* Delete RUMActions and RUMActionTarget

* Delete athena service and RUM code (#4634)
  • Loading branch information
marians authored Oct 31, 2024
1 parent bf32980 commit 3fede0f
Show file tree
Hide file tree
Showing 36 changed files with 190 additions and 667 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ tsconfig.tsbuildinfo

# app-test-suite
/ats/test_results*.xml

# Python virtual environments
/venv
3 changes: 0 additions & 3 deletions helm/happa/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 0 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}}',
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,6 @@
"yarn lint:staged",
"yarn format:staged"
]
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
3 changes: 0 additions & 3 deletions scripts/getConfigurationValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface IConfigurationValues {
defaultRequestTimeoutSeconds: number;
environment: string;
happaVersion: string;
enableRealUserMonitoring: boolean;

awsCapabilitiesJSON: string;
azureCapabilitiesJSON: string;
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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'),
Expand Down
1 change: 0 additions & 1 deletion src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface IGlobalConfig {
athenaEndpoint: string;
mapiAudience: string;
defaultRequestTimeoutSeconds: number;
enableRealUserMonitoring: boolean;
environment: GlobalEnvironment;
happaVersion: string;
ingressBaseDomain: string;
Expand Down
30 changes: 13 additions & 17 deletions src/components/Cluster/AZSelection/AZSelectionCheckbox.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -34,21 +32,19 @@ const AZSelectionCheckbox: React.FC<
const id = `${uniqueIdentifier}-${typeName.toLowerCase()}`;

return (
<RUMActionTarget name={mergeActionNames(baseActionName!, typeName)}>
<RadioInput
id={id}
name={id}
checked={value === type}
onChange={() => onChange(type!)}
tabIndex={-1}
label={
<Text weight='normal' color='text'>
{label}
</Text>
}
{...rest}
/>
</RUMActionTarget>
<RadioInput
id={id}
name={id}
checked={value === type}
onChange={() => onChange(type!)}
tabIndex={-1}
label={
<Text weight='normal' color='text'>
{label}
</Text>
}
{...rest}
/>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -445,7 +444,7 @@ class AddNodePool extends Component {
<AZSelection
variant={AZSelectionVariants.NodePool}
uniqueIdentifier={`np-${id}-az`}
baseActionName={RUMActions.SelectAZSelection}
baseActionName=''
value={azSelection}
provider={provider}
onChange={this.toggleAZSelector}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Text } from 'grommet';
import { normalizeColor } from 'grommet/utils';
import { RUMActions } from 'model/constants/realUserMonitoring';
import React, { FC } from 'react';
import RUMActionTarget from 'RUM/RUMActionTarget';
import styled from 'styled-components';
import { TableCell, TableRow } from 'UI/Display/Table';
import RadioInput from 'UI/Inputs/RadioInput';
Expand Down Expand Up @@ -66,20 +64,18 @@ const InstanceTypeRow: FC<React.PropsWithChildren<IInstanceTypeRow>> = ({
aria-label={`${singular} ${name}`}
>
<TableCell>
<RUMActionTarget name={RUMActions.SelectInstanceType}>
<RadioInput
id={`select-${name}`}
title={`Select ${name}`}
checked={isSelected}
value={isSelected ? 'true' : 'false'}
name={`select-${name}`}
onChange={() => selectInstanceType(name)}
formFieldProps={{
margin: 'none',
}}
tabIndex={-1}
/>
</RUMActionTarget>
<RadioInput
id={`select-${name}`}
title={`Select ${name}`}
checked={isSelected}
value={isSelected ? 'true' : 'false'}
name={`select-${name}`}
onChange={() => selectInstanceType(name)}
formFieldProps={{
margin: 'none',
}}
tabIndex={-1}
/>
</TableCell>
<TableCell>
<Name>{name}</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -94,33 +92,25 @@ const InstanceTypeSelector: FC<IInstanceTypeSelector> = ({
</SelectedWrapper>
)}
<div>
<RUMActionTarget
name={
collapsed
? RUMActions.ExpandInstanceTypes
: RUMActions.CollapseInstanceTypes
}
<ListToggler
role='button'
id='machine-type-selector__toggler'
aria-expanded={!collapsed}
aria-labelledby='available-machines-label'
tabIndex={0}
onClick={() => setCollapsed(!collapsed)}
collapsible={true}
onKeyDown={handleTabSelect}
title={`Show/hide available ${plural}`}
>
<ListToggler
role='button'
id='machine-type-selector__toggler'
aria-expanded={!collapsed}
aria-labelledby='available-machines-label'
tabIndex={0}
onClick={() => setCollapsed(!collapsed)}
collapsible={true}
onKeyDown={handleTabSelect}
title={`Show/hide available ${plural}`}
>
<i
className={`fa fa-caret-${collapsed ? 'right' : 'bottom'}`}
aria-hidden='true'
aria-label='Toggle'
role='presentation'
/>
<span id='available-machines-label'>Available {plural}</span>
</ListToggler>
</RUMActionTarget>
<i
className={`fa fa-caret-${collapsed ? 'right' : 'bottom'}`}
aria-hidden='true'
aria-label='Toggle'
role='presentation'
/>
<span id='available-machines-label'>Available {plural}</span>
</ListToggler>
</div>
{!collapsed && (
<Keyboard onEsc={handleKeyDownCancel}>
Expand Down
16 changes: 6 additions & 10 deletions src/components/Cluster/ClusterDetail/V5ClusterDetailTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import produce from 'immer';
import { CSSBreakpoints } from 'model/constants';
import { nodePoolsURL } from 'model/constants/docs';
import * as Providers from 'model/constants/providers';
import { RUMActions } from 'model/constants/realUserMonitoring';
import * as clusterActions from 'model/stores/cluster/actions';
import { isClusterCreating } from 'model/stores/cluster/utils';
import { updateClusterLabels } from 'model/stores/clusterlabels/actions';
Expand All @@ -25,7 +24,6 @@ import React from 'react';
import { connect } from 'react-redux';
import ReactTimeout from 'react-timeout';
import { TransitionGroup } from 'react-transition-group';
import RUMActionTarget from 'RUM/RUMActionTarget';
import { css } from 'styled-components';
import styled from 'styled-components';
import { FlexRowWithTwoBlocksOnEdges, mq, Row } from 'styles';
Expand Down Expand Up @@ -578,14 +576,12 @@ class V5ClusterDetailTable extends React.Component {
actually run workloads.
</p>
)}
<RUMActionTarget name={RUMActions.AddNodePool}>
<Button
onClick={this.toggleAddNodePoolForm}
icon={<i className='fa fa-add-circle' />}
>
Add node pool
</Button>
</RUMActionTarget>
<Button
onClick={this.toggleAddNodePoolForm}
icon={<i className='fa fa-add-circle' />}
>
Add node pool
</Button>
{nodePools && nodePools.length === 1 && (
<p>
With additional node pools, you can add different types of
Expand Down
62 changes: 26 additions & 36 deletions src/components/Cluster/NewCluster/CreateNodePoolsCluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import MasterNodes from 'Cluster/NewCluster/MasterNodes';
import { Box } from 'grommet';
import produce from 'immer';
import { Constants } from 'model/constants';
import { RUMActions } from 'model/constants/realUserMonitoring';
import { batchedClusterCreate } from 'model/stores/batchActions';
import { BATCHED_CLUSTER_CREATION_REQUEST } from 'model/stores/cluster/constants';
import { selectLoadingFlagByAction } from 'model/stores/loading/selectors';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { TransitionGroup } from 'react-transition-group';
import RUMActionTarget from 'RUM/RUMActionTarget';
import styled from 'styled-components';
import SlideTransition from 'styles/transitions/SlideTransition';
import Button from 'UI/Controls/Button';
Expand Down Expand Up @@ -246,7 +244,7 @@ class CreateNodePoolsCluster extends Component {
<InputGroup label='Master node availability zones'>
<AZSelection
variant={AZSelectionVariants.Master}
baseActionName={RUMActions.SelectMasterAZSelection}
baseActionName=''
value={masterAZMode}
provider={provider}
onChange={this.setMasterAZMode}
Expand Down Expand Up @@ -277,54 +275,46 @@ class CreateNodePoolsCluster extends Component {
id={npId}
capabilities={capabilities}
/>
<RUMActionTarget name={RUMActions.RemoveNodePool}>
<i
className='fa fa-close clickable'
title='Remove node pool'
aria-hidden='true'
onClick={() => this.removeNodePoolForm(npId)}
/>
</RUMActionTarget>
<i
className='fa fa-close clickable'
title='Remove node pool'
aria-hidden='true'
onClick={() => this.removeNodePoolForm(npId)}
/>
</AddNodePoolFlexColumnDiv>
</AddNodePoolWrapperDiv>
</SlideTransition>
);
})}
</NodePoolsTransitionGroup>
<RUMActionTarget name={RUMActions.AddNodePool}>
<Button
onClick={this.addNodePoolForm}
icon={<i className='fa fa-add-circle' />}
>
Add node pool
</Button>
</RUMActionTarget>
<Button
onClick={this.addNodePoolForm}
icon={<i className='fa fa-add-circle' />}
>
Add node pool
</Button>
<HorizontalLine />
</Box>
<FlexRow>
<Box gap='small' direction='row'>
<RUMActionTarget name={RUMActions.CreateClusterSubmit}>
<Button
primary={true}
disabled={!this.isValid()}
loading={isClusterCreating}
onClick={this.createCluster}
type='button'
>
Create cluster
</Button>
{/* We want to hide cancel button when the Create NP button has been clicked */}
{!isClusterCreating && (
<Button
primary={true}
disabled={!this.isValid()}
loading={isClusterCreating}
onClick={this.createCluster}
onClick={this.props.closeForm}
type='button'
>
Create cluster
Cancel
</Button>
</RUMActionTarget>
{/* We want to hide cancel button when the Create NP button has been clicked */}
{!isClusterCreating && (
<RUMActionTarget name={RUMActions.CreateClusterCancel}>
<Button
loading={isClusterCreating}
onClick={this.props.closeForm}
type='button'
>
Cancel
</Button>
</RUMActionTarget>
)}
</Box>
</FlexRow>
Expand Down
Loading

0 comments on commit 3fede0f

Please sign in to comment.