Skip to content

Commit

Permalink
IDS-10107 -- CWS: Add output fields to the Configuration Page
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrodjpl committed Jan 24, 2024
1 parent 70721dc commit 8f174ea
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 2 deletions.
6 changes: 6 additions & 0 deletions ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ default_cws_auth_scheme=CAMUNDA
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
camunda_version=${CAMUNDA_VER}
java_version=JAVA_HOME_VERSION
java_home=${JAVA_HOME}
EOF


Expand Down Expand Up @@ -180,6 +183,9 @@ aws_cloudwatch_endpoint=monitoring.us-west-1.amazonaws.com
default_history_level=full
default_shutdown_port=38005
metrics_publishing_interval=10
camunda_version=${CAMUNDA_VER}
java_version=JAVA_HOME_VERSION
java_home=${JAVA_HOME}
EOF


Expand Down
12 changes: 12 additions & 0 deletions cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ public class CwsInstaller {
private static String aws_sqs_dispatcher_sqsUrl;
private static String aws_sqs_dispatcher_msgFetchLimit;

private static String camunda_version;

private static String java_version;
private static String java_home = System.getenv("JAVA_HOME");


private static Boolean reconfigure = false;

Expand Down Expand Up @@ -344,6 +349,9 @@ private static void init() {
ldap_identity_plugin_class = getPreset(LDAP_IDENTITY_PLUGIN_CLASS);
ldap_security_filter_class = getPreset(LDAP_SECURITY_FILTER_CLASS);
camunda_security_filter_class = getPreset(CAMUNDA_SECURITY_FILTER_CLASS);
camunda_version = getPreset("camunda_version");

java_version = getPreset("java_version");
}

private static void exit(int status) {
Expand Down Expand Up @@ -2842,6 +2850,10 @@ private static void updateCwsUiProperties() throws IOException {
content = content.replace("__AWS_SQS_DISPATCHER_MSG_FETCH_LIMIT__", aws_sqs_dispatcher_msgFetchLimit);
}

content = content.replace("__CWS_CAMUNDA_VERSION__", camunda_version);
content = content.replace("__CWS_JAVA_VERSION__", java_version);
content = content.replace("__CWS_JAVA_HOME__", java_home);

writeToFile(filePath, content);
copy(
Paths.get(config_work_dir + SEP + "cws-ui" + SEP + "cws-ui.properties"),
Expand Down
12 changes: 11 additions & 1 deletion cws-service/src/main/java/jpl/cws/controller/MvcCore.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public class MvcCore {
@Value("${cws.history.days.to.live}") private String historyDaysToLive;
@Value("${cws.history.level}") private String historyLevel;

@Value("${cws.camunda.version}") private String camundaVersion;

@Value("${cws.java.home}") private String javaHome;
@Value("${cws.java.version}") private String javaVersion;

public MvcCore() {}

protected ModelAndView buildModel(String page, String message) {
Expand Down Expand Up @@ -183,7 +188,12 @@ protected ModelAndView buildConfigurationModel(String message) {
model.addObject("tomcatWebapps", tomcatWebapps);
model.addObject("historyDaysToLive", historyDaysToLive);
model.addObject("historyLevel", historyLevel);


model.addObject("camundaVersion", camundaVersion);

model.addObject("javaHome", javaHome);
model.addObject("javaVersion", javaVersion);

DiskUsage diskUsage = cwsConsoleService.getDiskUsage();

model.addObject("databaseSize", diskUsage.databaseSize);
Expand Down
13 changes: 13 additions & 0 deletions install/cws-ui/configuration.ftl
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@
<td>CWS Version</td>
<td>${version}</td>
</tr>
<tr>
<td>Camunda Version</td>
<td>${camundaVersion}</td>
</tr>

<tr>
<td>CWS Database Type</td>
<td>${dbType}</td>
Expand Down Expand Up @@ -245,6 +250,14 @@
<td>CWS History Days To Live</td>
<td>${historyDaysToLive}</td>
</tr>
<tr>
<td>Java Version</td>
<td>${javaVersion}</td>
</tr>
<tr>
<td>Java Home Path</td>
<td>${javaHome}</td>
</tr>
</table>
</div>

Expand Down
14 changes: 13 additions & 1 deletion install/cws-ui/cws-ui.properties
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,16 @@ cws.metrics.publishing.interval=__CWS_METRICS_PUBLISHING_INTERVAL__
aws.default.region=__AWS_DEFAULT_REGION__
aws.sqs.dispatcher.sqsUrl=__AWS_SQS_DISPATCHER_SQS_URL__
aws.sqs.dispatcher.msgFetchLimit=__AWS_SQS_DISPATCHER_MSG_FETCH_LIMIT__
aws.sqs.dispatcher.maxThreads=100
aws.sqs.dispatcher.maxThreads=100

#
# CAMUNDA PROPERTIES
#
cws.camunda.version=__CWS_CAMUNDA_VERSION__

#
# JAVA PROPERTIES
#
cws.java.version=__CWS_JAVA_VERSION__
cws.java.home=__CWS_JAVA_HOME__

5 changes: 5 additions & 0 deletions utils.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ function auto_conf_data () {
CWS_CONSOLE_SSL_PORT=38443
AMQ_PORT=31616

check_java_requirements

if [[ "${INSTALL_TYPE}" == "console-and-worker" ]]; then
INSTALL_TYPE_CODE=1
WORKER_TYPE="run_all"
Expand Down Expand Up @@ -317,5 +319,8 @@ function auto_conf_data () {
cws_notification_emails=${NOTIFICATION_EMAILS}
cws_token_expiration_hours=240
user_provided_logstash=n
camunda_version=${CAMUNDA_VER}
java_version=${JAVA_HOME_VERSION}
java_home=${JAVA_HOME}
EOF
}

0 comments on commit 8f174ea

Please sign in to comment.