Skip to content

Commit

Permalink
Merge pull request #19 from rtdi/master
Browse files Browse the repository at this point in the history
ui and java version update
  • Loading branch information
wernerdaehn authored Jan 21, 2025
2 parents 9bf4693 + d983672 commit e2c81bf
Show file tree
Hide file tree
Showing 121 changed files with 7,970 additions and 1,999 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 12
- name: Set up JDK 21
uses: actions/setup-java@main
with:
java-version: 12
java-version: 21
distribution: adopt
- name: Build and test project
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 12
- name: Set up JDK 21
uses: actions/setup-java@main
with:
java-version: 12
java-version: 21
distribution: adopt
- name: Build and test project
env:
Expand Down
21 changes: 13 additions & 8 deletions LICENSE_COMMERCIAL
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@

Preamble

The Commercial License is an addendum to the GPL license - see
The Commercial License is an addendum to the GPL license - see
LICENSE in the same folder - superseding certain license
related aspects.
It applies to productive environments only, not Test, QA or
development systems. For those, the GPL license applies providing
development systems. For those, the GPL license applies, providing
a free usage license.

The main purpose of the commercial license is to bill for the
The main purpose of the commercial license is to bill for the
usage of the Program on a monthly basis, thus allowing further
development.
The key metric used is the number of messages processed by the
Program per month.
program (sum of all instances) per month.

PAY-PER-USE

Expand All @@ -29,14 +29,19 @@ Programs are billed according to the following table

Example 1: In a test environment the Program is evaluated for
its performance over a long period of time.
--> The Program is used under the GPL license as it is executed in a
--> The program is used under the GPL license as it is executed in a
test environment, not a production system, hence no fees occur.

Example 2: The Program is used to copy productive data, the amount
Example 2: The program is used to copy productive data, the amount
of rows copied is 50'000rows per month.
--> The program is used under this Commercial License but the
fee is 0EUR according to above table. No contract needs to be signed,
no invoices will be created.
no invoices will be created.

Example 3: The program is started 20 times to process different Kafka
topics and partitions at speed, processing 5m records per month in
total. --> The program is used under this Commercial License and
100EUR/month are to be invoiced.

Once an order is placed for a defined volume, rtdi.io GmbH (Austria,
Europe), as the copyright owner, will send invoices on a monthly basis
Expand All @@ -53,7 +58,7 @@ GDPR - General Data Protection and Privacy - information)
DIFFERENCES TO SOFTWARE LICENSES

Unlike classic software licenses, where license and support contract
go in tandem, the monthly usage is charged and the Program provided
go in tandem, the monthly usage is charged and the program provided
as-is. As consequence no support and no warranties are provided. In
this regards all clauses of the GPL apply, specifically but not
exclusive Section 15 and Section 16.
Expand Down
163 changes: 123 additions & 40 deletions README.md

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions WebContent/Controller.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sap.ui.define([ "sap/ui/core/mvc/Controller"], function(Controller) {
"use strict";

return Controller.extend("io.rtdi.bigdata.rulesservice.Controller", {

onInit : function() {
var oModel = new sap.ui.model.json.JSONModel();
oModel.loadData("./rest/config/service");
this.getView().setModel(oModel);
}

});

});
116 changes: 116 additions & 0 deletions WebContent/View.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<mvc:View height="100%" class="sapUiSizeCompact"
controllerName="io.rtdi.bigdata.rulesservice.Controller"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:l="sap.ui.layout"
>
<FlexBox height="100%" direction="Column" >
<Page>
<layoutData>
<FlexItemData growFactor="1"/>
</layoutData>
<customHeader>
<OverflowToolbar>
<Text text="Settings" />
</OverflowToolbar>
</customHeader>
<HBox>
<ObjectStatus
text="Kafka"
inverted="true"
icon="{= %{/config/kafkaconnected} ? 'sap-icon://sys-enter-2' : 'sap-icon://error' }"
state="{= %{/config/kafkaconnected} ? 'Success' : 'Error' }" />
<ObjectStatus
text="Registry"
inverted="true"
icon="{= %{/config/schemaregconnected} ? 'sap-icon://sys-enter-2' : 'sap-icon://error' }"
state="{= %{/config/schemaregconnected} ? 'Success' : 'Error' }" />
<ObjectStatus
text="Service"
inverted="true"
icon="{= %{/config/servicerunning} ? 'sap-icon://sys-enter-2' : 'sap-icon://error' }"
state="{= %{/config/servicerunning} ? 'Success' : 'Error' }" />
</HBox>
<HBox
wrap="Wrap"
width="100%"
height="100%">
<VBox justifyContent="SpaceBetween" width="200px" height="150px" backgroundDesign="Solid" class="sapUiSmallMargin" tooltip="{tooltip}" >
<VBox class="sapUiSmallMargin">
<core:Icon src="sap-icon://wrench" class="sapUiTinyMarginBottom"/>
<Link text="Config" href="ui5/Config.html" target="_blank" class="sapUiTinyMarginTop" />
<Text text="Configure the connections" wrapping="true"/>
</VBox>
</VBox>

<VBox justifyContent="SpaceBetween" width="200px" height="150px" backgroundDesign="Solid" class="sapUiSmallMargin" tooltip="{tooltip}" >
<VBox class="sapUiSmallMargin">
<core:Icon src="sap-icon://document-text" class="sapUiTinyMarginBottom"/>
<Link text="Rules" href="ui5/Rules.html" target="_blank" class="sapUiTinyMarginTop" />
<Text text="List or create rules for a subject" wrapping="true"/>
</VBox>
</VBox>

<VBox justifyContent="SpaceBetween" width="200px" height="150px" backgroundDesign="Solid" class="sapUiSmallMargin" tooltip="{tooltip}" >
<VBox class="sapUiSmallMargin">
<core:Icon src="sap-icon://inventory" class="sapUiTinyMarginBottom"/>
<Link text="Topics" href="ui5/Topics.html" target="_blank" class="sapUiTinyMarginTop" />
<Text text="Rules to be applied to topic data" wrapping="true"/>
</VBox>
</VBox>

<VBox justifyContent="SpaceBetween" width="200px" height="150px" backgroundDesign="Solid" class="sapUiSmallMargin" tooltip="{tooltip}" >
<VBox class="sapUiSmallMargin">
<core:Icon src="sap-icon://download" class="sapUiTinyMarginBottom"/>
<Link text="Sample" href="ui5/Sample.html" target="_blank" class="sapUiTinyMarginTop" />
<Text text="Generate sample data" wrapping="true"/>
</VBox>
</VBox>
</HBox>
</Page>
<Page>
<layoutData>
<FlexItemData growFactor="3"/>
</layoutData>
<customHeader>
<OverflowToolbar>
<Text text="All topics with rules" />
</OverflowToolbar>
</customHeader>

<HBox id="Rules"
wrap="Wrap"
items="{/topicstatus}"
width="100%"
height="100%">
<VBox justifyContent="SpaceBetween" width="200px" height="150px" backgroundDesign="Solid" class="sapUiSmallMargin" tooltip="{tooltip}" >
<VBox class="sapUiSmallMargin">
<Text text="Topic: {topicname}" wrapping="true"/>
<ObjectNumber
number="{rulecount}"
unit="rule(s)"
emphasized="false"
state="None" />
<ObjectNumber
number="{avgtime}"
unit="ms avg"
emphasized="false"
state="None" />
<ObjectNumber
number="{rowsprocessed}"
unit="rows"
emphasized="false"
state="None" />
<ObjectStatus
class="sapUiSmallMarginBottom"
text="{= ${status} === true ? 'Active' : 'Inactive' }"
inverted="true"
icon="{= ${status} === true ? 'sap-icon://sys-enter-2' : 'sap-icon://alert' }"
state="{= ${status} === true ? 'Success' : 'Warning' }" />
</VBox>
</VBox>
</HBox>
</Page>
</FlexBox>
</mvc:View>
23 changes: 10 additions & 13 deletions WebContent/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
<display-name>RulesService</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>jersey-servlet</servlet-name>
Expand All @@ -18,6 +13,7 @@
<param-value>io.rtdi.bigdata.rulesservice.JerseyApplicationSettings</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>jersey-servlet</servlet-name>
Expand All @@ -29,21 +25,22 @@
<url-pattern>/ui5/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>connectorview</role-name>
<role-name>rulesview</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<!-- <login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login</form-login-page>
<form-error-page>/error</form-error-page>
<form-login-page>/login.html</form-login-page>
<form-error-page>/login-failed.html</form-error-page>
</form-login-config>
</login-config>
</login-config> -->
<security-role>
<role-name>connectorconfig</role-name>
<role-name>connectorview</role-name>
<role-name>connectorschema</role-name>
<role-name>connectoroperator</role-name>
<role-name>rulesview</role-name>
<role-name>rulesadmin</role-name>
</security-role>
</web-app>

Expand Down
37 changes: 37 additions & 0 deletions WebContent/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html style="height: 100%;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Application Directory</title>
<style type="text/css">
*.fragmentimage {max-height: 2.625rem; max-width: 150px;}
</style>

<script id="sap-ui-bootstrap"
src="/openui5/resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-libs="sap.m"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-xx-supportedLanguages="en"
data-sap-ui-resourceroots='{
"io.rtdi.bigdata.rulesservice": "./"
}'
data-sap-ui-async="true"
data-sap-ui-compatVersion="edge"
data-sap-ui-frameOptions="trusted" >
</script>
<script>
sap.ui.getCore().attachInit(function () {
document.body.innerHTML=''
new sap.ui.xmlview({
viewName: "io.rtdi.bigdata.rulesservice.View"
}).placeAt("content");
});
</script>
</head>

<body class="sapUiBody" id="content" style="height: 100%;">
<p>Loading OpenUI5 from <a href="/openui5/resources/sap-ui-core.js">here</a></p>
</body>
</html>
31 changes: 31 additions & 0 deletions WebContent/ui5/Config.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
sap.ui.define(["sap/ui/core/mvc/Controller"],
function(Controller) {"use strict";
return Controller.extend("io.rtdi.bigdata.rulesservice.ui5.Config", {
onInit : function() {
var model = new sap.ui.model.json.JSONModel();
model.attachRequestFailed(function(event) {
var text = event.getParameter("responseText");
sap.m.MessageToast.show("Reading config failed: " + text);
});
model.loadData("../rest/config");
this.getView().setModel(model);
},
onSave : function(event) {
var model = this.getView().getModel();
var post = new sap.ui.model.json.JSONModel();
post.attachRequestFailed(function(event) {
var text = event.getParameter("responseText");
sap.m.MessageToast.show("Save failed: " + text);
});
post.attachRequestCompleted(function() {
console.log(post.getProperty("/"));
});
var json = JSON.stringify(model.getProperty("/"));
var headers = {
"Content-Type": "application/json;charset=utf-8"
}
post.loadData("../rest/config", json, true, "POST", false, true, headers);
},
});
});

35 changes: 35 additions & 0 deletions WebContent/ui5/Config.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html style="height: 100%;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Connector</title>

<script id="sap-ui-bootstrap"
src="/openui5/resources/sap-ui-core.js"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-libs="sap.m"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-xx-supportedLanguages="en"
data-sap-ui-resourceroots='{
"io.rtdi.bigdata.rulesservice.ui5": "./"
}'
data-sap-ui-async="true"
data-sap-ui-compatVersion="edge"
data-sap-ui-frameOptions="trusted" >
</script>
<script>
sap.ui.getCore().attachInit(function () {
document.body.innerHTML=''
new sap.ui.xmlview({
viewName: "io.rtdi.bigdata.rulesservice.ui5.Config"
}).placeAt("content");
});
</script>
</head>

<body class="sapUiBody" id="content" style="height: 100%;">
<p>Loading OpenUI5 from <a href="/openui5/resources/sap-ui-core.js">here</a></p>
</body>
</html>

Loading

0 comments on commit e2c81bf

Please sign in to comment.