Skip to content

Commit

Permalink
Merge pull request #1090 from GowthamShanmugam/cleanup_dead_code
Browse files Browse the repository at this point in the history
Removing dead code and minor refactoring for 4.15
  • Loading branch information
openshift-ci[bot] authored Oct 30, 2023
2 parents 98d5b16 + 5ba28f4 commit d768d0b
Show file tree
Hide file tree
Showing 29 changed files with 105 additions and 2,401 deletions.
27 changes: 4 additions & 23 deletions locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"Reveal password": "Reveal password",
"Pool name": "Pool name",
"Volume mode": "Volume mode",
"Data policies": "Data policies",
"Disaster recovery": "Disaster recovery",
"Create DRPolicy": "Create DRPolicy",
"Get a quick recovery in a remote or secondary cluster with a disaster recovery (DR) policy": "Get a quick recovery in a remote or secondary cluster with a disaster recovery (DR) policy",
"Policy name": "Policy name",
Expand All @@ -47,6 +45,8 @@
"Replication policy": "Replication policy",
"Sync schedule": "Sync schedule",
"Information unavailable": "Information unavailable",
"Data policies": "Data policies",
"Disaster recovery": "Disaster recovery",
"Validated": "Validated",
"Not Validated": "Not Validated",
"Application": "Application",
Expand Down Expand Up @@ -266,27 +266,6 @@
"No matching application found": "No matching application found",
"Namespace": "Namespace",
"Type": "Type",
"There are no applications under Available list.": "There are no applications under Available list.",
"There are no more applications under Available list to protect.": "There are no more applications under Available list to protect.",
"No protected applications": "No protected applications",
"You can create applications from the <2> Create application set </2> page.": "You can create applications from the <2> Create application set </2> page.",
"There are no applications under the Protected list. Move applications from the available list to assign DR policy.": "There are no applications under the Protected list. Move applications from the available list to assign DR policy.",
"Available": "Available",
"{{ selected }} of {{ total }} applications selected": "{{ selected }} of {{ total }} applications selected",
"Protected": "Protected",
"Add label": "Add label",
"Cannot unassign the policy": "Cannot unassign the policy",
"You cannot unassign the policy as this action is not yet supported.": "You cannot unassign the policy as this action is not yet supported.",
"Assign policy to protect critical applications and ensure quick recovery. Unassign policy from an application when they no longer require to be managed.": "Assign policy to protect critical applications and ensure quick recovery. Unassign policy from an application when they no longer require to be managed.",
"Manage policy for ApplicationSets": "Manage policy for ApplicationSets",
"Save": "Save",
"Application search": "Application search",
"Select the applications for assigning the DRPolicy": "Select the applications for assigning the DRPolicy",
"Assign policy to Subscriptions": "Assign policy to Subscriptions",
"PVC label": "PVC label",
"A selector label to DR protect only specific PVCs within an application.": "A selector label to DR protect only specific PVCs within an application.",
"When multiple applications are selected, DR protection will be applied for all the PVCs under the application's namespace.": "When multiple applications are selected, DR protection will be applied for all the PVCs under the application's namespace.",
"Protect all PVCs within the application's namespace": "Protect all PVCs within the application's namespace",
"Asynchronous": "Asynchronous",
"Synchronous": "Synchronous",
"minutes": "minutes",
Expand Down Expand Up @@ -374,6 +353,7 @@
"Throughput": "Throughput",
"Raw capacity": "Raw capacity",
"Used": "Used",
"Available": "Available",
"Available versus Used Capacity": "Available versus Used Capacity",
"Used of {{capacity}}": "Used of {{capacity}}",
"Not Available": "Not Available",
Expand Down Expand Up @@ -478,6 +458,7 @@
"Try Again": "Try Again",
"Finish": "Finish",
"Go To PVC List": "Go To PVC List",
"Save": "Save",
"BlockPool Update Form": "BlockPool Update Form",
"Filesystem name": "Filesystem name",
"Enter filesystem name": "Enter filesystem name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import {
REPLICATION_TYPE,
ODFMCO_OPERATOR,
HUB_CLUSTER_NAME,
} from '../../../constants';
import { DRPolicyModel, MirrorPeerModel } from '../../../models';
import { DRPolicyKind, MirrorPeerKind } from '../../../types';
} from '../../constants';
import { DRPolicyModel, MirrorPeerModel } from '../../models';
import { DRPolicyKind, MirrorPeerKind } from '../../types';
import {
drPolicyReducer,
drPolicyInitialState,
Expand All @@ -42,7 +42,7 @@ import { SelectClusterList } from './select-cluster-list';
import { DRReplicationType } from './select-replication-type';
import { SelectedCluster } from './selected-cluster-view';
import './create-dr-policy.scss';
import '../../../style.scss';
import '../../style.scss';

const fetchMirrorPeer = (
mirrorPeers: MirrorPeerKind[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import {
ClusterClaimTypes,
MANAGED_CLUSTER_JOINED,
MANAGED_CLUSTER_CONDITION_AVAILABLE,
} from '../../../constants';
import { ACMManagedClusterModel } from '../../../models';
import { ACMManagedClusterKind } from '../../../types';
} from '../../constants';
import { ACMManagedClusterModel } from '../../models';
import { ACMManagedClusterKind } from '../../types';
import {
DRPolicyState,
DRPolicyAction,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import {
REPLICATION_DISPLAY_TEXT,
TIME_UNITS,
SYNC_SCHEDULE_DISPLAY_TEXT,
} from '../../../constants';
} from '../../constants';
import {
DRPolicyState,
DRPolicyAction,
DRPolicyActionType,
Cluster,
} from './reducer';
import '../../../style.scss';
import '../../style.scss';

type SyncScheduleProps = {
state: DRPolicyState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { HorizontalNav, useFlag } from '@openshift-console/dynamic-plugin-sdk';
import { Helmet } from 'react-helmet';
import { RouteComponentProps } from 'react-router';
import { ACM_OBSERVABILITY_FLAG, ADMIN_FLAG } from '../../constants';
import { DRPolicyListPage } from '../disaster-recovery/drpolicy-list-page/drpolicy-list-page';
import { DRPolicyListPage } from '../drpolicy-list-page/drpolicy-list-page';
import DRDashboard from '../mco-dashboard/data-policy/dr-dashboard';

type DataPoliciesPageProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jest.mock('react-router', () => ({
useHistory: jest.fn(() => []),
}));

jest.doMock('../../../assets/EmptyPageIcon.png', () => '');
jest.doMock('../../assets/EmptyPageIcon.png', () => '');

jest.mock('react-i18next', () => ({
useTranslation: (_ns: string) => ({ t: (children: any) => children }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ import {
} from '@openshift-console/dynamic-plugin-sdk';
import { Trans } from 'react-i18next';
import { useHistory, useLocation } from 'react-router';
import { HUB_CLUSTER_NAME } from '../../../constants';
import { HUB_CLUSTER_NAME } from '../../constants';
import {
ApplicationRefKind,
getDRPolicyResourceObj,
useApplicationsWatch,
} from '../../../hooks';
import { DRPolicyModel } from '../../../models';
import { DRPolicyKind } from '../../../types';
} from '../../hooks';
import { DRPolicyModel } from '../../models';
import { DRPolicyKind } from '../../types';
import {
getReplicationType,
findAppsUsingDRPolicy,
isDRPolicyValidated,
} from '../../../utils';
import EmptyPage from '../../empty-state-page/empty-page';
import { ConnectedApplicationsModal } from '../../modals/connected-apps-modal/connected-apps-modal';
} from '../../utils';
import EmptyPage from '../empty-state-page/empty-page';
import { ConnectedApplicationsModal } from '../modals/connected-apps-modal/connected-apps-modal';
import { Header, kebabActionItems, tableColumnInfo } from './helper';
import './drpolicy-list-page.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ModalKeys } from '@odf/shared/modals/types';
import classNames from 'classnames';
import { TFunction } from 'i18next';
import { sortable, wrappable } from '@patternfly/react-table';
import { Actions } from '../../../constants';
import { Actions } from '../../constants';

export const Header = (t: TFunction) => [
{
Expand Down

This file was deleted.

Loading

0 comments on commit d768d0b

Please sign in to comment.