8000 feat: add storybook for /deployment/security by jsjoeio · Pull Request #5610 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: add storybook for /deployment/security #5610

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: add storybook for security page
  • Loading branch information
jsjoeio committed Jan 6, 2023
commit 8e0f2ea6460364eae6ab669033f4c98b7f80ae5b
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { ComponentMeta, Story } from "@storybook/react"
import {
SecuritySettingsPageView,
SecuritySettingsPageViewProps,
} from "./SecuritySettingsPageView"

export default {
title: "pages/SecuritySettingsPageView",
component: SecuritySettingsPageView,
argTypes: {
deploymentConfig: {
defaultValue: {
ssh_keygen_algorithm: {
name: "key",
usage: "something",
value: "1234",
},
secure_auth_cookie: {
name: "key",
usage: "something",
value: "1234",
},
tls: {
enable: {
name: "yes or no",
usage: "something",
value: true,
},
cert_file: {
name: "yes or no",
usage: "something",
value: ["something"],
},
key_file: {
name: "yes or no",
usage: "something",
value: ["something"],
},
min_version: {
name: "yes or no",
usage: "something",
value: "something",
},
},
},
},
featureAuditLogEnabled: {
defaultValue: true,
},
featureBrowserOnlyEnabled: {
defaultValue: true,
},
},
} as ComponentMeta<typeof SecuritySettingsPageView>

const Template: Story<SecuritySettingsPageViewProps> = (args) => (
<SecuritySettingsPageView {...args} />
)
export const Page = Template.bind({})
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Stack } from "components/Stack/Stack"
import { Helmet } from "react-helmet-async"
import { pageTitle } from "util/page"

type SecuritySettingsPageViewProps = {
export type SecuritySettingsPageViewProps = {
deploymentConfig: Pick<
DeploymentConfig,
"tls" | "ssh_keygen_algorithm" | "secure_auth_cookie"
Expand All @@ -25,9 +25,6 @@ export const SecuritySettingsPageView = ({
featureBrowserOnlyEnabled,
}: SecuritySettingsPageViewProps): JSX.Element => (
<>
<Helmet>
<title>{pageTitle("Security Settings")}</title>
</Helmet>
<Stack direction="column" spacing={6}>
<div>
<Header
Expand Down
0