Skip to content
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

feat(TCOMP-2059): upgrade talend-ui #904

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b7fe409
chore(TCOMP-2059): hardcode talend-ui version in package-template.json
undx Jun 26, 2024
5a8440d
chore(TCOMP-2059): remove org.talend.tools:java-formatter
undx Jun 26, 2024
71ef017
chore(TCOMP-2059): remove milestones handling in generator
undx Jun 26, 2024
e618f8e
Merge branch 'master' into undx/TCOMP-2059-talend-ui-upgrade
undx Jun 27, 2024
0dc610f
first step to bump starter-server
tlnd-mhuchet Jul 4, 2024
f7b1b53
chore: bump and fix some import and sass files
jmfrancois Jul 4, 2024
f765110
migrate router to v6
tlnd-mhuchet Jul 9, 2024
d40b2d3
fix lint command
tlnd-mhuchet Jul 9, 2024
8313e92
fix: import too deep
jmfrancois Jul 11, 2024
4a57d6c
tools-webapp
tlnd-mhuchet Jul 11, 2024
4a4ed6d
deletions
tlnd-mhuchet Jul 11, 2024
662e9c7
fix: version of node and npm
jmfrancois Jul 11, 2024
b2db499
fix: package.json and theme
jmfrancois Jul 11, 2024
1096c21
fix: bad merge and pick only usefull changes
jmfrancois Jul 11, 2024
561d500
fix: make it work
jmfrancois Jul 11, 2024
9f97497
chore: codemode css module
jmfrancois Jul 11, 2024
e3eacfe
chore: migrate to css module
jmfrancois Jul 11, 2024
304383a
fix: router routes
jmfrancois Jul 11, 2024
6c78c5f
fix: router
jmfrancois Jul 11, 2024
0745a60
feat: add package-lock.json
jmfrancois Jul 11, 2024
c1b7bec
fix: dev config
jmfrancois Jul 11, 2024
30d5bbb
fix: make it start
jmfrancois Jul 11, 2024
b01f3c3
redux version adjustment
tlnd-mhuchet Jul 16, 2024
7d0e6a0
fix: location is a global now
jmfrancois Aug 29, 2024
bd0f397
fix: router and css glitch
jmfrancois Aug 29, 2024
4acc74d
fix: realign deps
jmfrancois Sep 5, 2024
a146fa9
fix: remove defaultProps
jmfrancois Sep 5, 2024
3ec118d
fix: initial display of the left Menu
jmfrancois Sep 5, 2024
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ coverage
.env.production.local

# generated from the filtered version
component-starter-server/src/main/frontend/package.json
component-tools-webapp/src/main/frontend/package.json
# component-starter-server/src/main/frontend/package.json
# component-tools-webapp/src/main/frontend/package.json
documentation/src/main/frontend/package.json
documentation/src/main/antora/site.yml
documentation/src/main/antora/site-dev.yml
Expand Down
4 changes: 2 additions & 2 deletions component-starter-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

<properties>
<!--TODO: bump node/npm when issue TCOMP-2059 Update talend/ui to 6.x will be done-->
<node.version>v12.13.0</node.version>
<npm.version>6.12.0</npm.version>
<node.version>v20.12.0</node.version>
<npm.version>10.5.0</npm.version>
<talend.build.name>${talend.build.name.base}.starter</talend.build.name>
<rat.numUnapprovedLicenses>10</rat.numUnapprovedLicenses>
</properties>
Expand Down
9 changes: 9 additions & 0 deletions component-starter-server/src/main/frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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'\""
export JAVA_HOME=/opt/homebrew/opt/openjdk@17

./bin/meecrowave.sh run
46 changes: 37 additions & 9 deletions component-starter-server/src/main/frontend/backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const configuration = require('./configuration.json');
*/ const configuration = require('./configuration.json');
const bodyParser = require('body-parser');
const atob = require('atob');

Expand All @@ -33,7 +33,7 @@ function downloadZip(req, res) {
};

const fileName = 'example.zip';
res.sendFile(fileName, options, err => {
res.sendFile(fileName, options, (err) => {
if (err) {
res.status(500).send(err);
} else {
Expand All @@ -47,13 +47,41 @@ function createOnGithub(req, res) {
res.json({ success: true });
}

function setup(app) {
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.get('/api/project/configuration', getConfiguration);
app.post('/api/project/zip/form', downloadZip);
app.post('/api/project/openapi/zip/form', downloadZip);
app.post('/api/project/github', createOnGithub);
function setup(middlewares, devServer) {
if (!devServer) {
throw new Error('webpack-dev-server is not defined');
}

devServer.app.use(bodyParser.urlencoded({ extended: true }));
devServer.app.use(bodyParser.json());

// Use the `unshift` method if you want to run a middleware before all other middlewares
// or when you are migrating from the `onBeforeSetupMiddleware` option
middlewares.unshift({
name: 'project-configuration',
path: '/api/project/configuration',
middleware: getConfiguration,
});

middlewares.unshift({
name: 'project-zip',
path: '/api/project/zip/form',
middleware: downloadZip,
});

middlewares.unshift({
name: 'project-openapi-zip',
path: '/api/project/openapi/zip/form',
middleware: downloadZip,
});

middlewares.unshift({
name: 'project-github',
path: '/api/project/github',
middleware: createOnGithub,
});

return middlewares;
}

module.exports = setup;
Loading