Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
60 changes: 60 additions & 0 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: client

on:
workflow_dispatch:
push:
paths:
- 'packages/client/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/client/**'
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
name: Check for Linting Errors
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install --only=dev
shell: bash

- name: Check for Linting Issues
run: npm run prettier --workspace=packages/client

build:
runs-on: ubuntu-latest
name: Build Code
defaults:
run:
working-directory: packages/client
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install
shell: bash

- name: Build
run: npm run build
60 changes: 60 additions & 0 deletions .github/workflows/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: gateway

on:
workflow_dispatch:
push:
paths:
- 'packages/gateway/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/gateway/**'
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
name: Check for Linting Errors
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install --only=dev
shell: bash

- name: Check for Linting Issues
run: npm run prettier --workspace=packages/gateway

build:
runs-on: ubuntu-latest
name: Build Code
defaults:
run:
working-directory: packages/gateway
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install
shell: bash

- name: Build
run: npm run build
60 changes: 60 additions & 0 deletions .github/workflows/server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: server

on:
workflow_dispatch:
push:
paths:
- 'packages/server/**'
branches:
- main
tags:
- "v*.*.*"
pull_request:
paths:
- 'packages/server/**'
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
name: Check for Linting Errors
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install --only=dev
shell: bash

- name: Check for Linting Issues
run: npm run prettier --workspace=packages/server

build:
runs-on: ubuntu-latest
name: Build Code
defaults:
run:
working-directory: packages/server
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 18

- name: NPM Install
run: npm install
shell: bash

- name: Build
run: npm run build
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
printWidth: 120,
singleQuote: true,
trailingComma: "none"
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "npm run build --workspaces --if-present",
"prettier": "npm run prettier --workspaces --if-present",
"prettier:fix": "npm run prettier:fix --workspaces --if-present"
},
"workspaces": [
"packages/*"
Expand Down
5 changes: 0 additions & 5 deletions packages/client/.prettierrc

This file was deleted.

3 changes: 3 additions & 0 deletions packages/client/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
...require('../../.prettierrc.js'),
}
8 changes: 4 additions & 4 deletions packages/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ const App: FC = () => {
return {
headers: {
...headers,
authorization: token ? `Bearer ${token}` : '',
authorization: token ? `Bearer ${token}` : ''
}
}
};
});

const apolloClient = new ApolloClient({
Expand All @@ -81,7 +81,7 @@ const App: FC = () => {
</BrowserRouter>
</ThemeProvider>
);
}
};

const AppInternal: FC = () => {
const [drawerOpen, setDrawerOpen] = useState(true);
Expand All @@ -107,7 +107,7 @@ const AppInternal: FC = () => {
</ProjectProvider>
);

return (<>{ authenticated ? mainView : <UnauthenticatedView /> }</>);
return <>{authenticated ? mainView : <UnauthenticatedView />}</>;
};

const UnauthenticatedView: FC = () => {
Expand Down
9 changes: 8 additions & 1 deletion packages/client/src/components/AddDataset.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ export const AddDataset: React.FC<ShowProps> = (props: ShowProps) => {
<Dialog open={props.show} onClose={props.toggleModal}>
<DialogTitle>Create New Dataset</DialogTitle>
<DialogContent>
<JsonForms schema={schema} uischema={uischema} data={data} renderers={materialRenderers} cells={materialCells} onChange={({ data }) => handleChange(data)} />
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={materialRenderers}
cells={materialCells}
onChange={({ data }) => handleChange(data)}
/>
</DialogContent>
<DialogActions>
<button onClick={props.toggleModal} type="submit">
Expand Down
20 changes: 15 additions & 5 deletions packages/client/src/components/Environment.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export const Environment: FC = () => {

return (
<Paper sx={{ padding: 1 }}>
<Typography variant='body1' sx={{ paddingBottom: 1 }}>Environment</Typography>
<Typography variant="body1" sx={{ paddingBottom: 1 }}>
Environment
</Typography>
<Stack sx={{ width: '100%' }} spacing={2}>
{/* Project Selection */}
<FieldSelector
Expand All @@ -35,7 +37,7 @@ export const Environment: FC = () => {
};

interface FieldSelectorProps<T> {
value: T | null,
value: T | null;
setValue: Dispatch<SetStateAction<T | null>>;
label: string;
options: T[];
Expand All @@ -55,9 +57,17 @@ function FieldSelector<T>(props: FieldSelectorProps<T>) {
return (
<FormControl sx={{ minWidth: '200px' }}>
<InputLabel>{props.label}</InputLabel>
<Select value={props.value || ''} onChange={(event, _child) => handleChange(event.target.value)} renderValue={(option) => props.display(option)}>
{props.options.map((option) => <MenuItem value={option as any} key={props.getKey(option)}>{props.display(option)}</MenuItem>)}
<Select
value={props.value || ''}
onChange={(event, _child) => handleChange(event.target.value)}
renderValue={(option) => props.display(option)}
>
{props.options.map((option) => (
<MenuItem value={option as any} key={props.getKey(option)}>
{props.display(option)}
</MenuItem>
))}
</Select>
</FormControl>
);
};
}
11 changes: 9 additions & 2 deletions packages/client/src/components/NavigationBar.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ export const NavBar: FC<NavBarProps> = ({ drawerOpen, setDrawerOpen }) => {
return (
<AppBar>
<Toolbar sx={{ backgroundColor: 'white' }}>
<IconButton size='large' edge='start' color='inherit' aria-label='menu' sx={{ mr: 4, ml: 2 }} onClick={() => setDrawerOpen(!drawerOpen)}>
<IconButton
size="large"
edge="start"
color="inherit"
aria-label="menu"
sx={{ mr: 4, ml: 2 }}
onClick={() => setDrawerOpen(!drawerOpen)}
>
<Menu sx={{ color: 'black' }} />
</IconButton>
<Typography
Expand All @@ -28,4 +35,4 @@ export const NavBar: FC<NavBarProps> = ({ drawerOpen, setDrawerOpen }) => {
</Toolbar>
</AppBar>
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export const NewStudyJsonForm: React.FC = () => {
}
}}
>
<JsonForms schema={schema} uischema={uischema} data={data} renderers={materialRenderers} cells={materialCells} onChange={({ data }) => handleChange(data)} />
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={materialRenderers}
cells={materialCells}
onChange={({ data }) => handleChange(data)}
/>
</Box>
);
};
Loading