1
0
mirror of https://github.com/lensapp/lens.git synced 2024-11-28 11:53:41 +03:00

chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-05-15 11:02:10 -04:00
parent 27a14714c3
commit d37a765ac2
3 changed files with 9 additions and 9 deletions

View File

@ -256,7 +256,7 @@ const scenarios = [
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-horizontal-pod-auto-scalers",
sidebarItemTestId: "link-for-sidebar-item-horizontal-pod-autoscalers",
},
{

View File

@ -9,15 +9,15 @@ import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
import routeIsActiveInjectable from "../../routes/route-is-active.injectable";
import navigateToHorizontalPodAutoscalersInjectable from "../../../common/front-end-routing/routes/cluster/config/horizontal-pod-autoscalers/navigate-to-horizontal-pod-autoscalers.injectable";
const horizontalPodAutoScalersSidebarItemInjectable = getInjectable({
id: "sidebar-item-horizontal-pod-auto-scalers",
const horizontalPodAutoscalersSidebarItemInjectable = getInjectable({
id: "sidebar-item-horizontal-pod-autoscalers",
instantiate: (di) => {
const route = di.inject(horizontalPodAutoscalersRouteInjectable);
return {
parentId: configSidebarItemInjectable.id,
title: "HPA",
title: "Horizontal Pod Autoscalers",
onClick: di.inject(navigateToHorizontalPodAutoscalersInjectable),
isActive: di.inject(routeIsActiveInjectable, route),
isVisible: route.isEnabled,
@ -28,4 +28,4 @@ const horizontalPodAutoScalersSidebarItemInjectable = getInjectable({
injectionToken: sidebarItemInjectionToken,
});
export default horizontalPodAutoScalersSidebarItemInjectable;
export default horizontalPodAutoscalersSidebarItemInjectable;

View File

@ -9,15 +9,15 @@ import { sidebarItemInjectionToken } from "@k8slens/cluster-sidebar";
import routeIsActiveInjectable from "../../routes/route-is-active.injectable";
import navigateToVerticalPodAutoscalersInjectable from "../../../common/front-end-routing/routes/cluster/config/vertical-pod-autoscalers/navigate-to-vertical-pod-autoscalers.injectable";
const verticalPodAutoScalersSidebarItemInjectable = getInjectable({
id: "sidebar-item-vertical-pod-auto-scalers",
const verticalPodAutoscalersSidebarItemInjectable = getInjectable({
id: "sidebar-item-vertical-pod-autoscalers",
instantiate: (di) => {
const route = di.inject(verticalPodAutoscalersRouteInjectable);
return {
parentId: configSidebarItemInjectable.id,
title: "VPA",
title: "Vertical Pod Autoscalers",
onClick: di.inject(navigateToVerticalPodAutoscalersInjectable),
isActive: di.inject(routeIsActiveInjectable, route),
isVisible: route.isEnabled,
@ -28,4 +28,4 @@ const verticalPodAutoScalersSidebarItemInjectable = getInjectable({
injectionToken: sidebarItemInjectionToken,
});
export default verticalPodAutoScalersSidebarItemInjectable;
export default verticalPodAutoscalersSidebarItemInjectable;