Skip to content

Commit 59ce7d1

Browse files
[WINDUP-3407]-WINDUP Themed Release (#807)
* Allow multiple themes * Rename execution id * Replace favicon in case theme defines one * Fix cli dependency for multiple themes * use dynamic mta-cli artifact * Set Windup default theme * Set Windup default theme * Set Windup default theme
1 parent e05e4ae commit 59ce7d1

File tree

36 files changed

+328
-130
lines changed

36 files changed

+328
-130
lines changed

KEYCLOAK-SETUP.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/single/get
3939
* Startup with offset 200 to avoid conflicts with your local EAP and arquillian instances:
4040
* `./standalone.sh -Djboss.socket.binding.port-offset=200`
4141

42-
* Install the EAP 7 Adapter into the EAP instance that will run MTA Web Console
42+
* Install the EAP 7 Adapter into the EAP instance that will run WINDUP Web Console
4343
* Download the RH-SSO-7.0.0-eap7-adapter.zip and unzip it into the root directory of your EAP 7 installation
4444
* Run the installer:
4545
* `cd bin`
@@ -48,23 +48,23 @@ https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/single/get
4848

4949

5050

51-
## Common steps: Register the client in Keycloak for mta-web
51+
## Common steps: Register the client in Keycloak for windup-web
5252

5353
* Go to the Keycloak admin console [http://localhost:8280/auth/admin/](http://localhost:8280/auth/admin/) (or at [8080](http://localhost:8080/auth/admin/) for embedded)
5454
* Setup an admin user and password here
5555
* Then navigate to [Keycloak admin](http://localhost:8280/auth/admin/) and log in
56-
* Set up a new realm called "mta"
56+
* Set up a new realm called "windup"
5757
* Create a new Role called "user"
5858
* Add this new role to the "Default Roles"
5959
* Create a new test user(s) for this realm. Assign the user role to it.
6060

61-
* Create a new client with ID `mta-web`, root URL: [http://localhost:8080/mta-web/](http://localhost:8080/mta-web/)
61+
* Create a new client with ID `windup-web`, root URL: [http://localhost:8080/windup-web/](http://localhost:8080/windup-web/)
6262
* On the settings page, make sure that the following URL is listed as Valid Redirect URIs (add if if it is missing):
63-
* `http://localhost:8080/mta-web/*`
63+
* `http://localhost:8080/windup-web/*`
6464

6565
* Click on the "Installation" tab, and select the "Keycloak OIDC JBoss Subsystem XML" format option
66-
* With the MTA's server off, open up `standalone-full.xml` and paste this text into the`urn:jboss:domain:keycloak:1.1` subsystem element
67-
* Change the `WAR MODULE NAME.war` section to the war name (`mta-web.war`)
66+
* With the WINDUP's server off, open up `standalone-full.xml` and paste this text into the`urn:jboss:domain:keycloak:1.1` subsystem element
67+
* Change the `WAR MODULE NAME.war` section to the war name (`windup-web.war`)
6868
* Now we are going to move the Keycloak key and URL to system properties, so they are accessible from the app.
6969
Add the following system properties being sure to replace the key with the one from the copied section:
7070

@@ -85,6 +85,6 @@ https://access.redhat.com/documentation/en/red-hat-single-sign-on/7.0/single/get
8585
<auth-server-url>${keycloak.server.url}</auth-server-url>
8686
```
8787

88-
* Now **copy secure-deployment configuration for `mta-web/api`**.
89-
* Copy `<secure-deployment name="mta-web.war">` and insert it below, use name **mta-web/api.war** instead of **mta-web.war**.
88+
* Now **copy secure-deployment configuration for `windup-web/api`**.
89+
* Copy `<secure-deployment name="windup-web.war">` and insert it below, use name **windup-web/api.war** instead of **windup-web.war**.
9090
* All remaining configuration will be the same, only the name changes

addons/messaging-executor/impl/src/main/java/org/jboss/windup/web/messaging/executor/HttpPostSerializer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public Message serializeStatusUpdate(JMSContext context, Long projectId, WindupE
8989
File resultsArchivePathFile = resultsArchivePath.toFile();
9090
LOG.info("Completed generating result archive (" + (resultsArchivePathFile.length() / 1048576) + " MB), posting results to the server...");
9191

92-
// Send the post data to the mta core service
92+
// Send the post data to the windup core service
9393
try (FileInputStream fileInputStream = new FileInputStream(resultsArchivePathFile))
9494
{
9595
sendResults(execution.getId(), fileInputStream);

ear/pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<version>5.3.1-SNAPSHOT</version>
99
</parent>
1010

11-
<artifactId>mta-ear</artifactId>
12-
<name>MTA Web Console</name>
11+
<artifactId>windup-ear</artifactId>
12+
<name>Windup Web Console</name>
1313
<packaging>ear</packaging>
1414

1515
<dependencies>
@@ -28,7 +28,7 @@
2828
</dependencies>
2929

3030
<build>
31-
<finalName>mta</finalName>
31+
<finalName>windup</finalName>
3232
<plugins>
3333
<plugin>
3434
<groupId>org.apache.maven.plugins</groupId>
@@ -39,14 +39,14 @@
3939
<webModule>
4040
<groupId>org.jboss.windup.web</groupId>
4141
<artifactId>windup-web-services</artifactId>
42-
<contextRoot>/mta-web/api</contextRoot>
42+
<contextRoot>/windup-web/api</contextRoot>
4343
<bundleFileName>api.war</bundleFileName>
4444
</webModule>
4545
<webModule>
4646
<groupId>org.jboss.windup.web</groupId>
4747
<artifactId>windup-web-ui-pf4</artifactId>
48-
<contextRoot>/mta-ui</contextRoot>
49-
<bundleFileName>mta-ui.war</bundleFileName>
48+
<contextRoot>/windup-ui</contextRoot>
49+
<bundleFileName>windup-ui.war</bundleFileName>
5050
</webModule>
5151
</modules>
5252
<outputFileNameMapping>no-version</outputFileNameMapping>

furnace-service-provider/src/main/java/org/jboss/windup/web/furnaceserviceprovider/WebProperties.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -95,23 +95,23 @@ private void init()
9595

9696
if (addonRepository == null)
9797
{
98-
addonRepository = servletContextPath.resolve("WEB-INF").resolve("mta-cli").resolve("addons");
98+
addonRepository = servletContextPath.resolve("WEB-INF").resolve("windup-cli").resolve("addons");
9999

100100
if (!Files.isDirectory(addonRepository))
101101
throw new IllegalStateException("Cannot load addon repository: " + addonRepository);
102102
}
103103

104104
if (rulesRepository == null)
105105
{
106-
rulesRepository = servletContextPath.resolve("WEB-INF").resolve("mta-cli").resolve("rules");
106+
rulesRepository = servletContextPath.resolve("WEB-INF").resolve("windup-cli").resolve("rules");
107107
if (!Files.isDirectory(rulesRepository))
108108
throw new IllegalStateException("Cannot load rules repository: " + rulesRepository);
109109
}
110110
if (labelsRepository == null)
111111
{
112112
// TODO loading core labels from 'rules' directory because labels and rules are stored in the same folder
113-
// labelsRepository = servletContextPath.resolve("WEB-INF").resolve("mta-cli").resolve("labels");
114-
labelsRepository = servletContextPath.resolve("WEB-INF").resolve("mta-cli").resolve("rules");
113+
// labelsRepository = servletContextPath.resolve("WEB-INF").resolve("windup-cli").resolve("labels");
114+
labelsRepository = servletContextPath.resolve("WEB-INF").resolve("windup-cli").resolve("rules");
115115
if (!Files.isDirectory(labelsRepository))
116116
throw new IllegalStateException("Cannot load labels repository: " + labelsRepository);
117117
}
@@ -130,7 +130,7 @@ private Path getServletContextPhysicalPath()
130130
{
131131
// Below there are examples of different values for "pathUrl" depending on the OS where the Web Console is running:
132132
// In Linux: pathUrl=vfs:/content/api.war/WEB-INF/lib/furnace-service-provider-5.3.0.Final.jar
133-
// In Windows pathUrl=vfs:/C:/Users/myUsername/Downloads/mta-web/temp 1/content/api.war/WEB-INF/lib/furnace-service-provider-5.3.0.Final.jar
133+
// In Windows pathUrl=vfs:/C:/Users/myUsername/Downloads/windup-web/temp 1/content/api.war/WEB-INF/lib/furnace-service-provider-5.3.0.Final.jar
134134
// In Windows: due to the fact that "pathUrl" contains the full path, there is the possibility that
135135
// "pathUrl" might contain blank spaces which will generate an exception on "pathUrl.toURI()".
136136
if (OperatingSystemUtils.isWindows() && pathUrl.toString().contains(" ")) {

pom.xml

+15-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<windup.web.developer.connection>scm:git:[email protected]:windup/windup-web.git</windup.web.developer.connection>
3636
<windup.web.scm.url>http://github.com/windup/windup-web</windup.web.scm.url>
3737

38-
<windup.distribution.name>mta-cli</windup.distribution.name>
38+
<windup.distribution.name>windup-cli</windup.distribution.name>
3939
<version.hibernate>5.3.20.Final</version.hibernate>
4040
<version.undertow>2.2.5.Final</version.undertow>
4141
<version.httpcomponents>4.5.13</version.httpcomponents>
@@ -359,12 +359,25 @@
359359
</profile>
360360

361361
<profile>
362-
<id>mta</id>
362+
<id>windup</id>
363363
<activation>
364364
<property>
365365
<name>!downstream</name>
366366
</property>
367367
</activation>
368+
<properties>
369+
<product-name>windup</product-name>
370+
<windup.distribution.name>windup-cli</windup.distribution.name>
371+
</properties>
372+
</profile>
373+
<profile>
374+
<id>mta</id>
375+
<activation>
376+
<property>
377+
<name>downstream</name>
378+
<value>mta</value>
379+
</property>
380+
</activation>
368381
<properties>
369382
<product-name>mta</product-name>
370383
<windup.distribution.name>mta-cli</windup.distribution.name>
@@ -383,6 +396,5 @@
383396
<windup.distribution.name>tackle-cli</windup.distribution.name>
384397
</properties>
385398
</profile>
386-
387399
</profiles>
388400
</project>

services/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@
294294
</dependencies>
295295

296296
<build>
297-
<finalName>mta-web/api</finalName>
297+
<finalName>windup-web/api</finalName>
298298

299299
<resources>
300300
<resource>
@@ -393,7 +393,7 @@
393393
</goals>
394394
<configuration>
395395
<target>
396-
<move file="${project.build.directory}/${project.build.finalName}/WEB-INF/${windup.distribution.name}" tofile="${project.build.directory}/${project.build.finalName}/WEB-INF/mta-cli" />
396+
<move file="${project.build.directory}/${project.build.finalName}/WEB-INF/${windup.distribution.name}" tofile="${project.build.directory}/${project.build.finalName}/WEB-INF/windup-cli" />
397397
</target>
398398
</configuration>
399399
</execution>

services/src/main/java/org/jboss/windup/web/services/KeycloakAuthenticator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static void validateToken(boolean ssl, String serverHost, String token) t
5050
if (!keycloakUrl.endsWith("/"))
5151
keycloakUrl += "/";
5252

53-
String fullUrl = keycloakUrl + "realms/mta/protocol/openid-connect/userinfo";
53+
String fullUrl = keycloakUrl + "realms/windup/protocol/openid-connect/userinfo";
5454
try
5555
{
5656
URLConnection urlConnection = new URL(fullUrl).openConnection();
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<jboss-web>
3-
<context-root>mta-ui/api</context-root>
3+
<context-root>windup-ui/api</context-root>
44
</jboss-web>

services/src/test/resources/custom-rulesets-data/custom-ruleset.mta.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset id="mta-web-test-rules" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
<ruleset id="windup-web-test-rules" xmlns="http://windup.jboss.org/schema/jboss-ruleset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://windup.jboss.org/schema/jboss-ruleset http://windup.jboss.org/schema/jboss-ruleset/windup-jboss-ruleset.xsd">
44
<metadata>
55
<description>

tests/test-authentication-client/src/main/resources/keycloak.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"realm": "mta",
2+
"realm": "windup",
33
"auth-server-url": "http://localhost:8180/auth",
4-
"resource": "mta-web",
4+
"resource": "windup-web",
55
"credentials": {
6-
"client-id": "mta-web",
6+
"client-id": "windup-web",
77
"secret": "public",
88
"realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhzGkMexMJ/stKe4ApsQM725i5pqnNlc5M8CB2uj8Lc77juFRKIjYwCJ7Zc1Zy2w0uaOHYBWuRnJ+9uQX6WtYmq4+FH09LyAH2rN4pi/nvdP8f9rU/vEKLpeMwcSbPgp2xKY+G2Ow5Uxh+CEZ5+3ZkNnwn99b9MP2Wad/l1UN7ObepRCy7zZNxxbB6qV4uqCbE02ZV8AXzgVia22D4yo6qpTVzULsNCdXuMwDkMvqPYylZlxq6L6pXxDyNJSwPZ9mDQW5adpS+CC4Rs1A32rU432IWw45qloIMAzJbpjdAD8aNmfXw0V89qj2SKbRisrDDKAWblyxewlmj3DqNPfBWQIDAQAB",
99
"ssl-required": "external",

tests/wildfly-dist/src/main/resources/keycloak_config/standalone-full.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -480,25 +480,25 @@
480480
<subsystem xmlns="urn:jboss:domain:jsf:1.1"/>
481481
<subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
482482
<subsystem xmlns="urn:jboss:domain:keycloak:1.2">
483-
<secure-deployment name="mta-web.war">
484-
<realm>mta</realm>
485-
<resource>mta-web</resource>
483+
<secure-deployment name="windup-web.war">
484+
<realm>windup</realm>
485+
<resource>windup-web</resource>
486486
<public-client>true</public-client>
487487
<realm-public-key>${keycloak.realm.public.key}</realm-public-key>
488488
<auth-server-url>${keycloak.server.url}</auth-server-url>
489489
<ssl-required>EXTERNAL</ssl-required>
490490
</secure-deployment>
491-
<secure-deployment name="mta-ui.war">
492-
<realm>mta</realm>
493-
<resource>mta-web</resource>
491+
<secure-deployment name="windup-ui.war">
492+
<realm>windup</realm>
493+
<resource>windup-web</resource>
494494
<public-client>true</public-client>
495495
<realm-public-key>${keycloak.realm.public.key}</realm-public-key>
496496
<auth-server-url>${keycloak.server.url}</auth-server-url>
497497
<ssl-required>EXTERNAL</ssl-required>
498498
</secure-deployment>
499499
<secure-deployment name="api.war">
500-
<realm>mta</realm>
501-
<resource>mta-web</resource>
500+
<realm>windup</realm>
501+
<resource>windup-web</resource>
502502
<public-client>true</public-client>
503503
<realm-public-key>${keycloak.realm.public.key}</realm-public-key>
504504
<auth-server-url>${keycloak.server.url}</auth-server-url>

tools/graph-tool/src/main/java/org/jboss/windup/web/ui/FreemarkerServlet.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public Object exec(List arguments) throws TemplateModelException
8989

9090
/*
9191
* 1) Read env. variable, if set,
92-
* 2) If not, use system property mta.apiServer.url as fallback,
93-
* 3) If system property not set, use current address + mta-web-services as fallback
92+
* 2) If not, use system property windup.apiServer.url as fallback,
93+
* 3) If system property not set, use current address + windup-web-services as fallback
9494
*/
9595
String apiServerUrl = this.readEnvVariable(
96-
"MTA_API_SERVER_URL",
97-
System.getProperty("mta.apiServer.url", serverAddress + "/mta-ui/api")
96+
"WINDUP_API_SERVER_URL",
97+
System.getProperty("windup.apiServer.url", serverAddress + "/windup-ui/api")
9898
);
9999

100100
hashModel.put("apiServerUrl", apiServerUrl);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<jboss-web>
3-
<context-root>mta-web/graph-tool</context-root>
3+
<context-root>windup-web/graph-tool</context-root>
44
</jboss-web>

tools/graph-tool/src/main/webapp/src/app/components/app.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,20 @@ export class AppComponent implements AfterViewInit {
111111
}
112112

113113
private getAvailableTypes() {
114-
this._http.get("/mta-web/api/furnace/graph/introspect/type-list")
114+
this._http.get("/windup-web/api/furnace/graph/introspect/type-list")
115115
.map(res => res.json())
116116
.subscribe(result => {
117117
this.types = result;
118118
});
119119
}
120120

121121
private getAllExecutions() {
122-
this._http.get("/mta-web/api/windup/executions")
122+
this._http.get("/windup-web/api/windup/executions")
123123
.map(res => res.json())
124124
.subscribe((executions: any[]) => {
125125
this.executions = [];
126126
executions.forEach((execution) => {
127-
this._http.get("/mta-web/api/migrationProjects/get/" + execution.projectId)
127+
this._http.get("/windup-web/api/migrationProjects/get/" + execution.projectId)
128128
.map(res => res.json())
129129
.subscribe(project => {
130130
this.executions.push({execution: execution, project: project});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"realm": "mta",
2+
"realm": "windup",
33
"realm-public-key": "${keycloak.publicKey}",
44
"auth-server-url": "${keycloak.serverUrl}",
55
"ssl-required": "none",
6-
"resource": "mta-web",
6+
"resource": "windup-web",
77
"public-client": true
88
}

ui-pf4/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
</dependencies>
134134

135135
<build>
136-
<finalName>mta-ui</finalName>
136+
<finalName>windup-ui</finalName>
137137
<testResources>
138138
<testResource>
139139
<directory>src/test/resources</directory>

ui-pf4/src/main/java/org/jboss/windup/web/ui/PF4FreemarkerServlet.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ public Object exec(List arguments) throws TemplateModelException
8989

9090
/*
9191
* 1) Read env. variable, if set,
92-
* 2) If not, use system property mta.apiServer.url as fallback,
93-
* 3) If system property not set, use current address + mta-web-services as fallback
92+
* 2) If not, use system property windup.apiServer.url as fallback,
93+
* 3) If system property not set, use current address + windup-web-services as fallback
9494
*/
9595
String apiServerUrl = this.readEnvVariable(
96-
"MTA_API_SERVER_URL",
97-
System.getProperty("mta.apiServer.url", serverAddress + "/mta-ui/api")
96+
"WINDUP_API_SERVER_URL",
97+
System.getProperty("windup.apiServer.url", serverAddress + "/windup-ui/api")
9898
);
9999

100100
hashModel.put("apiServerUrl", apiServerUrl);

ui-pf4/src/main/webapp/README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MTA Web Console UI
1+
# WINDUP Web Console UI
22

33
UI based on [Patternfly 4](https://www.patternfly.org/v4/) and [ReactJS](https://reactjs.org/). This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
44

@@ -11,34 +11,34 @@ You need:
1111

1212
## Prepare the backend
1313

14-
You need to have MTA Web Console running. You can download it from [Red Hat Developers](https://developers.redhat.com/products/mta/download) or build it yourself from the source code following the instructions [building-the-windup-project](https://github.com/windup/windup-web#building-the-windup-project)
14+
You need to have WINDUP Web Console running. You can download it from [Red Hat Developers](https://developers.redhat.com/products/mta/download) or build it yourself from the source code following the instructions [building-the-windup-project](https://github.com/windup/windup-web#building-the-windup-project)
1515

16-
- Run the `$MTA_HOME/run_mta.sh` and wait until the server starts. Verify the server is running opening http://localhost:8080 in your browser.
16+
- Run the `$WINDUP_HOME/run_windup.sh` and wait until the server starts. Verify the server is running opening http://localhost:8080 in your browser.
1717
- Configure Keycloak's client to have http://localhost:3000 as a valid redirect URI, folow the steps below to do it.
1818

1919
Login to Keycloak:
2020

2121
```shell
22-
$MTA_HOME/bin/kcadm.sh config credentials \
22+
$WINDUP_HOME/bin/kcadm.sh config credentials \
2323
--server http://localhost:8080/auth \
2424
--realm master \
2525
--user admin \
2626
--password password \
2727
--client admin-cli
2828
```
2929

30-
Change Keycloak's client `mta-web`:
30+
Change Keycloak's client `windup-web`:
3131

3232
```shell
33-
$MTA_HOME/bin/kcadm.sh update realms/mta/clients/739a78cd-ab8d-427a-93f7-4af38f0eab31 \
33+
$WINDUP_HOME/bin/kcadm.sh update realms/windup/clients/739a78cd-ab8d-427a-93f7-4af38f0eab31 \
3434
-s id="739a78cd-ab8d-427a-93f7-4af38f0eab31" \
35-
-s clientId="mta-web" \
36-
-s adminUrl="/mta-web" \
37-
-s "redirectUris=[\"http://localhost:3000/*\", \"/mta-web/*\", \"/mta-ui/*\"]" \
35+
-s clientId="windup-web" \
36+
-s adminUrl="/windup-web" \
37+
-s "redirectUris=[\"http://localhost:3000/*\", \"/windup-web/*\", \"/windup-ui/*\"]" \
3838
-s "webOrigins=[\"http://localhost:3000\", \"/\"]"
3939
```
4040

41-
> `$MTA_HOME` represents the folder where MTA Web Console is running.
41+
> `$WINDUP_HOME` represents the folder where WINDUP Web Console is running.
4242
4343
## Run the UI in Dev mode
4444

0 commit comments

Comments
 (0)