Skip to content

Commit

Permalink
chore: remove infra monitoring ff (#6571)
Browse files Browse the repository at this point in the history
  • Loading branch information
YounixM authored Dec 2, 2024
1 parent 3d092ec commit 507c060
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
12 changes: 0 additions & 12 deletions frontend/src/AppRoutes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,6 @@ function App(): JSX.Element {

setRoutes(newRoutes);
}

const isInfraMonitoringEnabled =
allFlags.find((flag) => flag.name === FeatureKeys.HOSTS_INFRA_MONITORING)
?.active || false;

if (!isInfraMonitoringEnabled) {
const newRoutes = routes.filter(
(route) => route?.path !== ROUTES.INFRASTRUCTURE_MONITORING_HOSTS,
);

setRoutes(newRoutes);
}
});

const isOnBasicPlan =
Expand Down
1 change: 0 additions & 1 deletion frontend/src/constants/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ export enum FeatureKeys {
PREMIUM_SUPPORT = 'PREMIUM_SUPPORT',
QUERY_BUILDER_SEARCH_V2 = 'QUERY_BUILDER_SEARCH_V2',
ANOMALY_DETECTION = 'ANOMALY_DETECTION',
HOSTS_INFRA_MONITORING = 'HOSTS_INFRA_MONITORING',
}
15 changes: 0 additions & 15 deletions frontend/src/container/SideNav/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,6 @@ function SideNav({
setMenuItems(items);
}

const isInfraMonitoringEnabled =
featureResponse.data?.find(
(feature) => feature.name === FeatureKeys.HOSTS_INFRA_MONITORING,
)?.active || false;

if (!isInfraMonitoringEnabled) {
let items = [...menuItems];

items = items.filter(
(item) => item.key !== ROUTES.INFRASTRUCTURE_MONITORING_HOSTS,
);

setMenuItems(items);
}

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [featureResponse.data]);

Expand Down

0 comments on commit 507c060

Please sign in to comment.