Skip to content

Commit

Permalink
Merge branch 'main' into kie-issues#886
Browse files Browse the repository at this point in the history
  • Loading branch information
jomarko committed Sep 18, 2024
2 parents 1b7d807 + e21bbd8 commit dd67a91
Show file tree
Hide file tree
Showing 18 changed files with 662 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/jbpm-compact-architecture-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This example also demonstrates how to configure the whole _Kogito_ environment u
enable simplifying the communication among _Kogito_ services removing the need of events (Kafka/HTTP) between them. This can
be achieved using the following _Quarkus_ addons:

- `kogito-addons-quarkus-data-index-persistence-postgresql`: enables the _Kogito Runtime_ persisting directly into the
- `kogito-addons-quarkus-data-index-postgresql`: enables the _Kogito Runtime_ persisting directly into the
_Data-Index_ database.
- `kogito-addons-quarkus-jobs`: enables collocating the _Jobs Service_ inside the _Kogito Runtime_.

Expand Down
6 changes: 0 additions & 6 deletions examples/jbpm-compact-architecture-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,6 @@
<artifactId>kogito-addons-quarkus-data-index-postgresql</artifactId>
</dependency>

<!-- Data Index Persistence -->
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-data-index-persistence-postgresql</artifactId>
</dependency>

<!-- Jobs Service -->
<dependency>
<groupId>org.kie</groupId>
Expand Down
2 changes: 1 addition & 1 deletion packages/dashbuilder/appformer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<jboss.snapshots.repo.url
>https://repository.jboss.org/nexus/content/repositories/snapshots/</jboss.snapshots.repo.url>

<version.org.infinispan.protostream>4.3.5.Final</version.org.infinispan.protostream>
<version.org.infinispan.protostream>4.6.2.Final</version.org.infinispan.protostream>

<!-- Newer version in kie-parent causes ServiceLoader error -->
<version.ch.qos.logback>1.3.12</version.ch.qos.logback>
Expand Down
33 changes: 33 additions & 0 deletions packages/data-index-webapp/env/index.js
Original file line number Diff line number Diff line change
@@ -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: 9026,
},
},
};
},
});
36 changes: 36 additions & 0 deletions packages/data-index-webapp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@kie-tools/data-index-webapp",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
"keywords": [],
"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 --env dev",
"build:prod": "pnpm lint && pnpm test && rimraf dist && webpack",
"lint": "echo 'Linting'",
"start": "webpack serve --host 0.0.0.0 --env dev",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""
},
"devDependencies": {
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"copy-webpack-plugin": "^11.0.0",
"jest": "^29.7.0",
"rimraf": "^3.0.2",
"ts-node": "^10.9.2",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
}
}
50 changes: 50 additions & 0 deletions packages/data-index-webapp/src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
~ 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.
-->

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Data Index Webapp</title>
<link rel="stylesheet" href="styles.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.svg" />
</head>
<body>
<div class="maindiv">
<div class="container">
<div class="logo" style="display: flex; justify-content: center">
<img src="favicon.svg" alt="KIE Logo" />
<h1>Data Index Service</h1>
</div>
<div>
<h4>Your Data Index service is up and working!</h4>
</div>
<p>
Data Index service is a dedicated supporting service that stores the data related to the workflow and process
instances and their associated jobs. This service provides a GraphQL endpoint allowing users to query and
modify that data.
</p>
<div>
<a href="https://graphql.org/learn/" class="btn" target="_blank">GraphQL docs</a>
</div>
</div>
</div>
</body>
</html>
70 changes: 70 additions & 0 deletions packages/data-index-webapp/src/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
body {
margin: 0px;
padding: 0px;
}

.maindiv {
font-family: "RedHatText", "Overpass", overpass, helvetica, arial, 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;
}

@media (prefers-color-scheme: dark) {
.maindiv,
.container {
background-color: #232121;
}

h4,
p {
color: #fefefe;
}
}
44 changes: 44 additions & 0 deletions packages/data-index-webapp/static/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions packages/data-index-webapp/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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 { 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: {},
plugins: [
new CopyPlugin({
patterns: [
{ from: "./src/index.html", to: "./index.html" },
{ from: "./src/styles.css", to: "./styles.css" },
{ from: "./static/favicon.svg", to: "./favicon.svg" },
],
}),
],
ignoreWarnings: [/Failed to parse source map/],
devServer: {
static: {
directory: "./dist",
},
port: buildEnv.dataIndexWebapp.dev.port,
},
});
33 changes: 33 additions & 0 deletions packages/jobs-service-webapp/env/index.js
Original file line number Diff line number Diff line change
@@ -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, composeEnv } = require("@kie-tools-scripts/build-env");

module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({}),
get env() {
return {
jobsServiceWebapp: {
dev: {
port: 9028,
},
},
};
},
});
36 changes: 36 additions & 0 deletions packages/jobs-service-webapp/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@kie-tools/jobs-service-webapp",
"version": "0.0.0",
"description": "",
"license": "Apache-2.0",
"keywords": [],
"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 --env dev",
"build:prod": "pnpm lint && pnpm test && rimraf dist && webpack",
"lint": "echo 'Linting'",
"start": "webpack serve --host 0.0.0.0 --env dev",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\""
},
"devDependencies": {
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"copy-webpack-plugin": "^11.0.0",
"jest": "^29.7.0",
"rimraf": "^3.0.2",
"ts-node": "^10.9.2",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.15.1",
"webpack-merge": "^5.9.0"
}
}
Loading

0 comments on commit dd67a91

Please sign in to comment.