Skip to content

Commit f542d10

Browse files
Minor tweaks on deployment instructions, workbench enabled by default (#99)
- Workbench is enabled for deploy by default - Remove the text says that the workbench is experimental - Fixed missing spacing on DeploymentStep - Guide people on creating an empty API gateway key - Info notice on deploying a system with no Workbench
1 parent 2f907d5 commit f542d10

6 files changed

Lines changed: 105 additions & 18 deletions

File tree

src/simple-editor/deployment/Deployment.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import DeploymentInstructions from './DeploymentInstructions';
1313
import DeploymentVectorStore from './DeploymentVectorStore';
1414
import DeploymentGraphStore from './DeploymentGraphStore';
1515
import DeploymentWorkbench from './DeploymentWorkbench';
16+
import DeploymentGateway from './DeploymentGateway';
1617
import DeploymentDocumentRag from './DeploymentDocumentRag';
1718

1819
interface DeploymentProps {
@@ -89,13 +90,13 @@ const Deployment: React.FC<DeploymentProps> = ({
8990
<DeploymentConfig/>
9091
</Box>
9192

92-
{
93-
options.has(CONFIGURE_WORKBENCH) && (
94-
<Box>
95-
<DeploymentWorkbench/>
96-
</Box>
97-
)
98-
}
93+
<Box>
94+
<DeploymentGateway/>
95+
</Box>
96+
97+
<Box>
98+
<DeploymentWorkbench/>
99+
</Box>
99100

100101
{
101102
options.has(CONFIGURE_DOCUMENT_RAG) && (
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
2+
import React from 'react';
3+
4+
import { Typography, Box, Paper, Stack, Alert } from '@mui/material';
5+
import { Insights } from '@mui/icons-material';
6+
7+
import { useConfigurationStateStore } from '../state/Configuration';
8+
9+
import DeploymentCode from './DeploymentCode';
10+
import DeploymentStep from './DeploymentStep';
11+
12+
const DeploymentGateway : React.FC<{}> = ({
13+
}) => {
14+
15+
const platform = useConfigurationStateStore((state) => state.platform);
16+
17+
return (
18+
19+
<>
20+
21+
{
22+
23+
(platform == "gcp-k8s" ||
24+
platform == "minikube-k8s") &&
25+
26+
<Paper sx={{ minWidth: 375, mt: 2, p: 2 }} elevation={3}>
27+
<Stack
28+
direction="row" spacing={2}
29+
alignItems="center"
30+
sx={{mb: 2}}
31+
>
32+
<Insights color="primary" fontSize="large"/>
33+
<Typography variant="h6" component="h3">
34+
API gateway
35+
</Typography>
36+
</Stack>
37+
38+
<DeploymentStep>
39+
The API Gateway is an essential software component
40+
which supports using command-line utilities and the
41+
Data Workbench. It needs to be configured with a
42+
secret key. You should set the key to the empty
43+
string to leave authentication off unless you have
44+
a specific need. Note that the Data Workbench does
45+
not know how to use keys for authentication at the
46+
present time.
47+
</DeploymentStep>
48+
49+
<DeploymentCode>
50+
kubectl -n trustgraph create secret \<br/>
51+
{' '}generic gateway-secret \<br/>
52+
{' '}--from-literal=gateway-secret=
53+
</DeploymentCode>
54+
55+
</Paper>
56+
}
57+
58+
</>
59+
60+
);
61+
62+
};
63+
64+
export default DeploymentGateway;
65+

src/simple-editor/deployment/DeploymentStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface DeploymentStepProps extends React.PropsWithChildren {
99

1010
const DeploymentStep : React.FC<DeploymentStepProps> = ({children}) => {
1111
return (
12-
<Typography variant="body2">
12+
<Typography variant="body2" mt={1} mb={1}>
1313
{children}
1414
</Typography>
1515
);

src/simple-editor/deployment/DeploymentWorkbench.tsx

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11

22
import React from 'react';
33

4-
import {
5-
Typography, Box, Paper, Stack,
6-
} from '@mui/material';
4+
import { Typography, Box, Paper, Stack, Alert } from '@mui/material';
75
import { Insights } from '@mui/icons-material';
86

7+
import { useOptionsStore, CONFIGURE_WORKBENCH } from '../state/Options';
8+
9+
import { useConfigurationStateStore } from '../state/Configuration';
10+
911
import DeploymentCode from './DeploymentCode';
1012
import DeploymentStep from './DeploymentStep';
1113

1214
const DeploymentWorkbench: React.FC<{}> = ({
1315
}) => {
1416

17+
const options = useOptionsStore((state) => state.options);
18+
19+
const platform = useConfigurationStateStore((state) => state.platform);
20+
1521
return (
1622

1723
<>
1824

19-
<Box>
25+
{
26+
(!options.has(CONFIGURE_WORKBENCH)) &&
27+
<Paper sx={{ minWidth: 375, mt: 2, p: 2 }} elevation={3}>
28+
<Alert severity="info">
29+
You have selected to install without the
30+
Data Workbench which provides a useful web interface
31+
for interaction with the system. You can change
32+
this on the <strong>Customization</strong> tab.
33+
</Alert>
34+
</Paper>
35+
}
36+
37+
{
38+
39+
(options.has(CONFIGURE_WORKBENCH)) &&
40+
2041
<Paper sx={{ minWidth: 375, mt: 2, p: 2 }} elevation={3}>
2142
<Stack
2243
direction="row" spacing={2}
@@ -30,15 +51,15 @@ const DeploymentWorkbench: React.FC<{}> = ({
3051
</Stack>
3152

3253
<DeploymentStep>
33-
3454
Once the system is running, you can access the
3555
Data Workbench on port 8888, or access using the
3656
following URL:
37-
3857
</DeploymentStep>
3958

4059
<DeploymentCode>
41-
<a href="http://localhost:8888">http://localhost:8888/</a>
60+
<a href="http://localhost:8888">
61+
http://localhost:8888/
62+
</a>
4263
</DeploymentCode>
4364

4465
<DeploymentStep>
@@ -51,7 +72,7 @@ const DeploymentWorkbench: React.FC<{}> = ({
5172
</DeploymentStep>
5273

5374
</Paper>
54-
</Box>
75+
}
5576

5677
</>
5778

src/simple-editor/options/Options.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ const ParamsForm: React.FC = () => {
158158
onChange={onConfigureWorkbench}
159159
title="Data Workbench"
160160
>
161-
An experimental UI providing tools to explore extracted
161+
A UI providing tools to explore extracted
162162
data. Once launched, accessible on port 8888.
163163
</Option>
164164

src/simple-editor/state/Options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface Options {
1818
export const useOptionsStore = create<Options>()(
1919
(set) => ({
2020

21-
options: new Set<string>([]),
21+
options: new Set<string>([CONFIGURE_WORKBENCH]),
2222

2323
setOptions: (v) => set(() => ({
2424
options: v

0 commit comments

Comments
 (0)