fantonangeli commented on code in PR #2551: URL: https://github.com/apache/incubator-kie-tools/pull/2551#discussion_r1742287015
########## packages/data-index-webapp/env/index.js: ########## @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, 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 { varsWithName, getOrDefault, composeEnv } = require("@kie-tools-scripts/build-env"); + +module.exports = composeEnv([require("@kie-tools/root-env/env")], { + vars: varsWithName({}), + get env() { + return { + dataIndexWebapp: { + dev: { + port: 9024, Review Comment: This port is already used in serverless-workflow-dev-ui-webapp, can you please use a port not used by other packages? packages/serverless-workflow-dev-ui-webapp/env/index.js:28 ########## packages/data-index-webapp/src/styles.css: ########## @@ -0,0 +1,120 @@ +/* Default light mode */ +.body { + margin: 0px; + padding: 0px; +} + +.maindiv { + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; + background-color: #fff; + color: #fff; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.container { + text-align: center; + background-color: #fff; + max-width: 700px; +} + +.logo img { + width: 80px; + height: auto; +} + +h1 { + font-size: 48px; + color: #e44c3b; + padding-left: 15px; +} + +h4 { + font-size: 30px; + color: #c94848; + margin-top: 10px; +} + +p { + font-size: 16px; + color: #1f1e1e; + margin-top: 5px; + margin-bottom: 40px; +} + +.btn { + padding: 10px 20px; + background-color: #e44c3b; + color: #fff; + text-decoration: none; + border-radius: 5px; + font-size: 16px; + transition: background-color 0.3s; +} + +.btn:hover { + background-color: #c73828; +} + +/* Dark mode */ +@media (prefers-color-scheme: dark) { Review Comment: Please remove anything which is not `color` or `background` from this media query without leaving comments. ########## packages/data-index-webapp/webpack.config.js: ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, 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 CopyPlugin = require("copy-webpack-plugin"); +const TerserPlugin = require("terser-webpack-plugin"); +const { merge } = require("webpack-merge"); +const common = require("@kie-tools-core/webpack-base/webpack.common.config"); +const { env } = require("./env"); +const buildEnv = env; + +module.exports = async (env) => + merge(common(env), { + entry: {}, + optimization: { + minimizer: [ + new TerserPlugin({ + terserOptions: { + format: { + comments: false, + }, + }, + extractComments: false, + }), + ], + }, Review Comment: This part which was needed in sonataflow-deployment-webapp to compress the code, but we don't need compression in this webapp. Can you please remove this block and the TerserPlugin dependency? ########## packages/data-index-webapp/package.json: ########## @@ -0,0 +1,35 @@ +{ + "private": true, + "name": "@kie-tools/data-index-webapp", + "version": "1.0.0", + "description": "", + "license": "Apache-2.0", + "homepage": "https://github.com/apache/incubator-kie-tools", + "repository": { + "type": "git", + "url": "https://github.com/apache/incubator-kie-tools.git" + }, + "bugs": { + "url": "https://github.com/apache/incubator-kie-tools/issues" + }, + "types": "./dist/index.d.ts", + "main": "dist/index.js", + "scripts": { + "build:dev": "rimraf dist && webpack --config webpack.config.ts dev", + "build:prod": "pnpm lint && pnpm test && rimraf dist && webpack && pnpm test-e2e", Review Comment: Please apply this suggestion. It is also needed to add jest to the package: `pnpm i -D jest` after this running the following command from the root should work: `pnpm -r -F data-index-webapp... build:prod` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
