Skip to content

Commit

Permalink
fix: make it work
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Jul 11, 2024
1 parent 1096c21 commit 561d500
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 18 deletions.
8 changes: 8 additions & 0 deletions component-starter-server/src/main/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mvn package
cd target
unzip component-starter-server-meecrowave-distribution.zip
cd component-starter-server-distribution

export JDK_JAVA_OPTIONS="-Dtalend.component.starter.security.csp=\"default-src 'self' data: unpkg.com; frame-ancestors 'none' ; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'\""

./bin/meecrowave.sh run
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import DatasetContext from '../../DatasetContext';
import ComponentsContext from '../../ComponentsContext';
import ProjectContext from '../../ProjectContext';

import theme from './App.scss';
import theme from './App.module.scss';

function ModeSwitcher() {
const navigate = useNavigate();
Expand Down Expand Up @@ -85,8 +85,8 @@ function App() {
<DatasetContext.Provider>
<ComponentsContext.Provider>
<Routes>
<Route path="/openapi" component={OpenAPIWizard} />
<Route component={Generator} />
<Route path="/" element={<Generator />} />
<Route path="/openapi" element={<OpenAPIWizard />} />
</Routes>
</ComponentsContext.Provider>
</DatasetContext.Provider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
}

.content {
margin-top: 48px;
height: 100vh;
overflow: auto;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/
import React from 'react';
import { Route } from 'react-router-dom';
import { Route, Routes } from 'react-router-dom';

import theme from './Generator.scss';

Expand All @@ -38,13 +38,20 @@ export default function Generator() {
</div>
<div className={theme.content}>
<main>
<Route exact path="/" component={ProjectMetadata} />
<Route exact path="/project" component={ProjectMetadata} />
<Route exact path="/datastore" component={DatastoreList} />
<Route exact path="/dataset" component={DatasetList} />
<Route path="/component/:componentId" component={Component} />
<Route path="/add-component" component={ComponentAddForm} />
<Route path="/export" render={props => <Finish {...props} actionUrl={GENERATOR_ZIP_URL} openapi={false} />} />
<Routes>
<Route exact path="/" element={<ProjectMetadata />} />
<Route exact path="/project" element={<ProjectMetadata />} />
<Route exact path="/datastore" element={<DatastoreList />} />
<Route exact path="/dataset" element={<DatasetList />} />
<Route path="/component/:componentId" element={<Component />} />
<Route path="/add-component" element={<ComponentAddForm />} />
<Route
path="/export"
render={(props) => (
<Finish {...props} actionUrl={GENERATOR_ZIP_URL} openapi={false} />
)}
/>
</Routes>
</main>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
</p>
<![endif]-->
<div id="app"><%= htmlWebpackPlugin.options.appLoader %></div>
<div id="root"></div>
<div id="tooltip-root"></div>
<!-- the portal-root element is for attaching Portal widget children -->
<div id="portal-root"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ i18n.use(initReactI18next).init({
});
i18n.addResourceBundle('en', 'Help', helpTexts);

ReactDOM.render(<App />, document.getElementById('root'));
ReactDOM.render(<App />, document.getElementById('app'));
10 changes: 5 additions & 5 deletions component-starter-server/src/main/frontend/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ module.exports = {
// output: {
// publicPath: './',
// },
// devServer: {
// setupMiddlewares: setupBackend,
// host: '0.0.0.0',
// historyApiFallback: true,
// },
devServer: {
setupMiddlewares: setupBackend,
host: '0.0.0.0',
historyApiFallback: true,
},
// resolve: {
// symlinks: false,
// },
Expand Down

0 comments on commit 561d500

Please sign in to comment.