Skip to content

Commit 95fd0bb

Browse files
authored
feat(site): remove experiment deployment_health_page (#11572)
1 parent 26f5ce6 commit 95fd0bb

File tree

11 files changed

+28
-42
lines changed

11 files changed

+28
-42
lines changed

coderd/apidoc/docs.go

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,20 +2076,15 @@ func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) {
20762076
type Experiment string
20772077

20782078
const (
2079-
// Deployment health page
2080-
ExperimentDeploymentHealthPage Experiment = "deployment_health_page"
2081-
20822079
// Add new experiments here!
2083-
// ExperimentExample Experiment = "example"
2080+
ExperimentExample Experiment = "example" // This isn't used for anything.
20842081
)
20852082

20862083
// ExperimentsAll should include all experiments that are safe for
20872084
// users to opt-in to via --experimental='*'.
20882085
// Experiments that are not ready for consumption by all users should
20892086
// not be included here and will be essentially hidden.
2090-
var ExperimentsAll = Experiments{
2091-
ExperimentDeploymentHealthPage,
2092-
}
2087+
var ExperimentsAll = Experiments{}
20932088

20942089
// Experiments is a list of experiments.
20952090
// Multiple experiments may be enabled at the same time.

docs/api/general.md

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/components/Dashboard/DeploymentBanner/DeploymentBanner.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@ import { useQuery } from "react-query";
33
import { deploymentStats } from "api/queries/deployment";
44
import { usePermissions } from "hooks/usePermissions";
55
import { DeploymentBannerView } from "./DeploymentBannerView";
6-
import { useDashboard } from "../DashboardProvider";
76
import { health } from "api/queries/debug";
87

98
export const DeploymentBanner: FC = () => {
10-
const dashboard = useDashboard();
119
const permissions = usePermissions();
1210
const deploymentStatsQuery = useQuery(deploymentStats());
1311
const healthQuery = useQuery({
1412
...health(),
15-
enabled:
16-
dashboard.experiments.includes("deployment_health_page") &&
17-
permissions.viewDeploymentValues,
13+
enabled: permissions.viewDeploymentValues,
1814
});
1915

2016
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {

site/src/components/Dashboard/Navbar/Navbar.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ export const Navbar: FC = () => {
1818
const canViewDeployment = Boolean(permissions.viewDeploymentValues);
1919
const canViewAllUsers = Boolean(permissions.readAllUsers);
2020
const proxyContextValue = useProxy();
21-
const dashboard = useDashboard();
22-
const canViewHealth =
23-
canViewDeployment &&
24-
dashboard.experiments.includes("deployment_health_page");
25-
21+
const canViewHealth = canViewDeployment;
2622
return (
2723
<NavbarView
2824
user={me}

site/src/pages/DeploySettingsPage/GeneralSettingsPage/GeneralSettingsPageView.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
4040
},
4141
],
4242
deploymentDAUs: MockDeploymentDAUResponse,
43-
safeExperiments: ["deployment_health_page"],
43+
safeExperiments: [],
4444
},
4545
};
4646

@@ -102,6 +102,6 @@ export const allExperimentsEnabled: Story = {
102102
hidden: false,
103103
},
104104
],
105-
safeExperiments: ["deployment_health_page"],
105+
safeExperiments: [],
106106
},
107107
};

site/src/pages/DeploySettingsPage/Sidebar.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
99
import MonitorHeartOutlined from "@mui/icons-material/MonitorHeartOutlined";
1010
// import Token from "@mui/icons-material/Token";
1111
import { type FC } from "react";
12-
import { useDashboard } from "components/Dashboard/DashboardProvider";
1312
import { GitIcon } from "components/Icons/GitIcon";
1413
import {
1514
Sidebar as BaseSidebar,
1615
SidebarNavItem,
1716
} from "components/Sidebar/Sidebar";
1817

1918
export const Sidebar: FC = () => {
20-
const dashboard = useDashboard();
21-
2219
return (
2320
<BaseSidebar>
2421
<SidebarNavItem href="general" icon={LaunchOutlined}>
@@ -52,11 +49,9 @@ export const Sidebar: FC = () => {
5249
<SidebarNavItem href="observability" icon={InsertChartIcon}>
5350
Observability
5451
</SidebarNavItem>
55-
{dashboard.experiments.includes("deployment_health_page") && (
56-
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
57-
Health
58-
</SidebarNavItem>
59-
)}
52+
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
53+
Health
54+
</SidebarNavItem>
6055
</BaseSidebar>
6156
);
6257
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy