Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(site): remove experiment deployment_health_page#11572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 1 commit intomainfromcj/healthpage-ga
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletionscoderd/apidoc/docs.go
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

7 changes: 5 additions & 2 deletionscoderd/apidoc/swagger.json
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

9 changes: 2 additions & 7 deletionscodersdk/deployment.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2076,20 +2076,15 @@ func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) {
type Experiment string

const (
// Deployment health page
ExperimentDeploymentHealthPage Experiment = "deployment_health_page"

// Add new experiments here!
//ExperimentExample Experiment = "example"
ExperimentExample Experiment = "example" // This isn't used for anything.
)

// ExperimentsAll should include all experiments that are safe for
// users to opt-in to via --experimental='*'.
// Experiments that are not ready for consumption by all users should
// not be included here and will be essentially hidden.
var ExperimentsAll = Experiments{
ExperimentDeploymentHealthPage,
}
var ExperimentsAll = Experiments{}

// Experiments is a list of experiments.
// Multiple experiments may be enabled at the same time.
Expand Down
4 changes: 2 additions & 2 deletionsdocs/api/general.md
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

8 changes: 4 additions & 4 deletionsdocs/api/schemas.md
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

4 changes: 2 additions & 2 deletionssite/src/api/typesGenerated.ts
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,18 +3,14 @@ import { useQuery } from "react-query";
import { deploymentStats } from "api/queries/deployment";
import { usePermissions } from "hooks/usePermissions";
import { DeploymentBannerView } from "./DeploymentBannerView";
import { useDashboard } from "../DashboardProvider";
import { health } from "api/queries/debug";

export const DeploymentBanner: FC = () => {
const dashboard = useDashboard();
const permissions = usePermissions();
const deploymentStatsQuery = useQuery(deploymentStats());
const healthQuery = useQuery({
...health(),
enabled:
dashboard.experiments.includes("deployment_health_page") &&
permissions.viewDeploymentValues,
enabled: permissions.viewDeploymentValues,
});

if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {
Expand Down
6 changes: 1 addition & 5 deletionssite/src/components/Dashboard/Navbar/Navbar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,11 +18,7 @@ export const Navbar: FC = () => {
const canViewDeployment = Boolean(permissions.viewDeploymentValues);
const canViewAllUsers = Boolean(permissions.readAllUsers);
const proxyContextValue = useProxy();
const dashboard = useDashboard();
const canViewHealth =
canViewDeployment &&
dashboard.experiments.includes("deployment_health_page");

const canViewHealth = canViewDeployment;
return (
<NavbarView
user={me}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -40,7 +40,7 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
},
],
deploymentDAUs: MockDeploymentDAUResponse,
safeExperiments: ["deployment_health_page"],
safeExperiments: [],
},
};

Expand DownExpand Up@@ -102,6 +102,6 @@ export const allExperimentsEnabled: Story = {
hidden: false,
},
],
safeExperiments: ["deployment_health_page"],
safeExperiments: [],
},
};
11 changes: 3 additions & 8 deletionssite/src/pages/DeploySettingsPage/Sidebar.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,16 +9,13 @@ import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
import MonitorHeartOutlined from "@mui/icons-material/MonitorHeartOutlined";
// import Token from "@mui/icons-material/Token";
import { type FC } from "react";
import { useDashboard } from "components/Dashboard/DashboardProvider";
import { GitIcon } from "components/Icons/GitIcon";
import {
Sidebar as BaseSidebar,
SidebarNavItem,
} from "components/Sidebar/Sidebar";

export const Sidebar: FC = () => {
const dashboard = useDashboard();

return (
<BaseSidebar>
<SidebarNavItem href="general" icon={LaunchOutlined}>
Expand DownExpand Up@@ -52,11 +49,9 @@ export const Sidebar: FC = () => {
<SidebarNavItem href="observability" icon={InsertChartIcon}>
Observability
</SidebarNavItem>
{dashboard.experiments.includes("deployment_health_page") && (
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
Health
</SidebarNavItem>
)}
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
Health
</SidebarNavItem>
</BaseSidebar>
);
};
4 changes: 1 addition & 3 deletionssite/src/testHelpers/entities.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2047,9 +2047,7 @@ export const MockEntitlementsWithUserLimit: TypesGen.Entitlements = {
}),
};

export const MockExperiments: TypesGen.Experiment[] = [
"deployment_health_page",
];
export const MockExperiments: TypesGen.Experiment[] = [];

export const MockAuditLog: TypesGen.AuditLog = {
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp