File tree 4 files changed +64
-13
lines changed
pages/DeploySettingsPage/GeneralSettingsPage
4 files changed +64
-13
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,10 @@ const SettingsGroupPage = lazy(
71
71
( ) => import ( "./pages/GroupsPage/SettingsGroupPage" ) ,
72
72
)
73
73
const GeneralSettingsPage = lazy (
74
- ( ) => import ( "./pages/DeploySettingsPage/GeneralSettingsPage" ) ,
74
+ ( ) =>
75
+ import (
76
+ "./pages/DeploySettingsPage/GeneralSettingsPage/GeneralSettingsPage"
77
+ ) ,
75
78
)
76
79
const SecuritySettingsPage = lazy (
77
80
( ) => import ( "./pages/DeploySettingsPage/SecuritySettingsPage" ) ,
Original file line number Diff line number Diff line change
1
+ import { useDeploySettings } from "components/DeploySettingsLayout/DeploySettingsLayout"
2
+ import React from "react"
3
+ import { Helmet } from "react-helmet-async"
4
+ import { pageTitle } from "util/page"
5
+ import { GeneralSettingsPageView } from "./GeneralSettingsPageView"
6
+
7
+ const GeneralSettingsPage : React . FC = ( ) => {
8
+ const { deploymentConfig : deploymentConfig } = useDeploySettings ( )
9
+
10
+ return (
11
+ < >
12
+ < Helmet >
13
+ < title > { pageTitle ( "General Settings" ) } </ title >
14
+ </ Helmet >
15
+ < GeneralSettingsPageView deploymentConfig = { deploymentConfig } />
16
+ </ >
17
+ )
18
+ }
19
+
20
+ export default GeneralSettingsPage
Original file line number Diff line number Diff line change
1
+ import { ComponentMeta , Story } from "@storybook/react"
2
+ import {
3
+ GeneralSettingsPageView ,
4
+ GeneralSettingsPageViewProps ,
5
+ } from "./GeneralSettingsPageView"
6
+
7
+ export default {
8
+ title : "pages/GeneralSettingsPageView" ,
9
+ component : GeneralSettingsPageView ,
10
+ argTypes : {
11
+ deploymentConfig : {
12
+ defaultValue : {
13
+ access_url : {
14
+ name : "Access URL" ,
15
+ usage :
16
+ "External URL to access your deployment. This must be accessible by all provisioned workspaces." ,
17
+ value : "https://dev.coder.com" ,
18
+ } ,
19
+ wildcard_access_url : {
20
+ name : "Wildcard Access URL" ,
21
+ usage :
22
+ 'Specifies the wildcard hostname to use for workspace applications in the form "*.example.com".' ,
23
+ value : "*--apps.dev.coder.com" ,
24
+ } ,
25
+ } ,
26
+ } ,
27
+ } ,
28
+ } as ComponentMeta < typeof GeneralSettingsPageView >
29
+
30
+ const Template : Story < GeneralSettingsPageViewProps > = ( args ) => (
31
+ < GeneralSettingsPageView { ...args } />
32
+ )
33
+ export const Page = Template . bind ( { } )
Original file line number Diff line number Diff line change 1
- import { useDeploySettings } from "components/DeploySettingsLayout/DeploySettingsLayout "
1
+ import { DeploymentConfig } from "api/typesGenerated "
2
2
import { Header } from "components/DeploySettingsLayout/Header"
3
3
import OptionsTable from "components/DeploySettingsLayout/OptionsTable"
4
- import React from "react"
5
- import { Helmet } from "react-helmet-async"
6
- import { pageTitle } from "util/page"
7
-
8
- const GeneralSettingsPage : React . FC = ( ) => {
9
- const { deploymentConfig : deploymentConfig } = useDeploySettings ( )
10
4
5
+ export type GeneralSettingsPageViewProps = {
6
+ deploymentConfig : Pick < DeploymentConfig , "access_url" | "wildcard_access_url" >
7
+ }
8
+ export const GeneralSettingsPageView = ( {
9
+ deploymentConfig,
10
+ } : GeneralSettingsPageViewProps ) : JSX . Element => {
11
11
return (
12
12
< >
13
- < Helmet >
14
- < title > { pageTitle ( "General Settings" ) } </ title >
15
- </ Helmet >
16
13
< Header
17
14
title = "General"
18
15
description = "Information about your Coder deployment."
@@ -27,5 +24,3 @@ const GeneralSettingsPage: React.FC = () => {
27
24
</ >
28
25
)
29
26
}
30
-
31
- export default GeneralSettingsPage
You can’t perform that action at this time.
0 commit comments