Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Dec 7, 2017
2 parents c72fa39 + dc9f0c5 commit eac7d55
Show file tree
Hide file tree
Showing 85 changed files with 2,473 additions and 358 deletions.
2 changes: 1 addition & 1 deletion build-system/pom.xml
Expand Up @@ -76,7 +76,7 @@
<jdbc.postgres>9.4.1212.jre7</jdbc.postgres>
<jdbc.mariadb>1.5.5</jdbc.mariadb>
<jdbc.mysql>6.0.5</jdbc.mysql>
<wicket.version>7.8.0</wicket.version>
<wicket.version>7.9.0</wicket.version>
<groovy.version>2.4.0</groovy.version>
<activiti-engine.version>5.22.0</activiti-engine.version>
<activiti-spring.version>5.22.0</activiti-spring.version>
Expand Down
69 changes: 69 additions & 0 deletions dist/src/main/bin/springboot.bat
@@ -0,0 +1,69 @@
@echo off

setlocal

set "BIN_DIR=%~dp0%~2"
if not "%MIDPOINT_HOME%" == "" goto gotHome
cd "%BIN_DIR%.."
mkdir var
cd var
mkdir log
cd "%BIN_DIR%.."
set "MIDPOINT_HOME=%cd%\var"
echo %MIDPOINT_HOME%
echo %BIN_DIR%
:gotHome

rem if script for start and stop exists
if exist "%BIN_DIR%\springboot.bat" goto okBoot
echo %BIN_DIR%
echo The springboot.bat file is not in \bin directory or is no accessible
goto end
:okBoot

rem if start/stop out file exists
if not "%BOOT_OUT%" == "" goto okOut
set "BOOT_OUT=%MIDPOINT_HOME%\log\springboot.out"
echo %BOOT_OUT%
:okOut

rem MIDPOINT_WAR if not defined
if exist "%cd%\lib\midpoint.war" goto gotWar
echo The midpoint.war is not in \lib directory
echo Can not start midPoint
goto end
:gotWar

if "%MIDPOINT_HOME%" == "%MIDPOINT_HOME:;=%" goto homeNoSemicolon
echo Using MIDPOINT_HOME: "%MIDPOINT_HOME%"
echo Unable to start as MIDPOINT_HOME contains a semicolon (;) character
goto end
:homeNoSemicolon


rem ----- Execute The Requested Command ---------------------------------------

echo Using MIDPOINT_HOME: "%MIDPOINT_HOME%"

set _EXECJAVA=%_RUNJAVA%
set _NOHUP=nohup
set ACTION=start

if ""%1"" == ""start"" goto doStart
if ""%1"" == ""stop"" goto doStop

:doStart
shift
goto execStart

:doStop
shift
goto execStop

:execStart
echo "%cd%\lib\midpoint.war"
start /b javaw -jar -Xms2048M -Xmx2048M -Djavax.net.ssl.trustStore=%MIDPOINT_HOME%\keystore.jceks -Djavax.net.ssl.trustStoreType=jceks -Dmidpoint.home=%MIDPOINT_HOME% %cd%\lib\midpoint.war > %BOOT_OUT% 2>&1 &

:execStop
echo "%cd%\lib\midpoint.war"
FOR /F "usebackq tokens=5" %%i IN (`netstat -aon ^| findstr "0.0.0.0:8080"`) DO taskkill /F /PID %%i
4 changes: 3 additions & 1 deletion dist/src/main/bin/springboot.sh
Expand Up @@ -20,7 +20,9 @@ USE_NOHUP="true"
if [ -z "$MIDPOINT_HOME" ] ; then
MIDPOINT_HOME="$SCRIPT_PATH../var"
fi
JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m -Dmidpoint.home=$MIDPOINT_HOME"
JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m
-Djavax.net.ssl.trustStore=$MIDPOINT_HOME/keystore.jceks -Djavax.net.ssl.trustStoreType=jceks
-Dmidpoint.home=$MIDPOINT_HOME"

# resolve links - $0 may be a softlink
PRG="$0"
Expand Down
45 changes: 43 additions & 2 deletions dist/src/main/bin/start.bat
@@ -1,2 +1,43 @@
echo "Starting midPoint"
java -jar -Xms1024M -Xmx2048M -Dmidpoint.home=%~dp0%~1..\var %~dp0%~1..\lib\midpoint.war
@echo off

setlocal

set "BIN_DIR=%~dp0%~1"
if not "%MIDPOINT_HOME%" == "" goto gotHome
cd "%BIN_DIR%.."
mkdir var
cd var
mkdir log
cd "%BIN_DIR%.."
set "MIDPOINT_HOME=%cd%\var"
echo %MIDPOINT_HOME%
:gotHome

if exist "%BIN_DIR%\springboot.bat" goto okHome
echo The MIDPOINT_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%BIN_DIR%\springboot.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" start %CMD_LINE_ARGS%

:end

45 changes: 43 additions & 2 deletions dist/src/main/bin/stop.bat 100755 → 100644
@@ -1,2 +1,43 @@
echo "Stopping midPoint"
FOR /F "usebackq tokens=5" %%i IN (`netstat -aon ^| find "8080"`) DO taskkill /F /PID %%i
@echo off

setlocal

set "BIN_DIR=%~dp0%~1"
if not "%MIDPOINT_HOME%" == "" goto gotHome
cd "%BIN_DIR%.."
mkdir var
cd var
mkdir log
cd "%BIN_DIR%.."
set "MIDPOINT_HOME=%cd%\var"
echo %MIDPOINT_HOME%
:gotHome

if exist "%BIN_DIR%\springboot.bat" goto okHome
echo The MIDPOINT_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome

set "EXECUTABLE=%BIN_DIR%\springboot.bat"

rem Check that target executable exists
if exist "%EXECUTABLE%" goto okExec
echo Cannot find "%EXECUTABLE%"
echo This file is needed to run this program
goto end
:okExec

rem Get remaining unshifted command line arguments and save them in the
set CMD_LINE_ARGS=
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto setArgs
:doneSetArgs

call "%EXECUTABLE%" stop %CMD_LINE_ARGS%

:end

@@ -1,3 +1,18 @@
/*
* Copyright (c) 2010-2017 Evolveum
*
* Licensed 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.
*/
package com.evolveum.midpoint.web.component.dialog;

import org.apache.wicket.Component;
Expand Down
Expand Up @@ -39,18 +39,30 @@ <h3 style="margin-left: 20px;">
<h3 style="margin-left: 20px">
<wicket:message key="SystemConfigPanel.cleanupPolicy"/>
</h3>
<div class="form-group">
<div wicket:id="auditRecordsCleanup"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
</div>

<div class="form-group">
<div wicket:id="closedTasksCleanup"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="container-fluid">
<div class="col-md-6">
<div class="form-group" wicket:id="auditRecordsCleanupAge"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="auditRecordsCleanupRecords"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="closedTasksCleanupAge"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="certificationCampaignsCleanupAge"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
</div>
<div class="col-md-6">
<div class="form-group" wicket:id="certificationCampaignsCleanupRecords"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="reportsCleanupAge"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="resultsCleanupAge"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
<div class="form-group" wicket:id="resultsCleanupRecords"
wicket:message="placeholder:SystemConfigPanel.cleanupPolicy.placeholder"/>
</div>
</div>


<h3>
<h3 style="margin-left: 20px;">
<wicket:message key="SystemConfigPanel.title.deploymentInformation"/>
</h3>
<div class="form-group" wicket:id="deploymentInfoContainer">
Expand Down Expand Up @@ -79,7 +91,7 @@ <h3>

<hr style="margin-right: 20px;">
</div>
<h3>
<h3 style="margin-left: 20px;">
<wicket:message key="SystemConfigPanel.title.misc"/>
</h3>

Expand Down
Expand Up @@ -23,7 +23,6 @@
import com.evolveum.midpoint.web.component.form.TextAreaFormGroup;
import com.evolveum.midpoint.web.component.form.TextFormGroup;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.*;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
Expand All @@ -35,9 +34,7 @@
import com.evolveum.midpoint.web.page.admin.configuration.dto.ObjectPolicyConfigurationTypeDto;
import com.evolveum.midpoint.web.page.admin.configuration.dto.SystemConfigurationDto;
import com.evolveum.midpoint.web.page.admin.dto.ObjectViewDto;
import com.evolveum.midpoint.web.util.InfoTooltipBehavior;
import com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityPolicyType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ValuePolicyType;

/**
* @author lazyman
Expand All @@ -48,8 +45,14 @@ public class SystemConfigPanel extends BasePanel<SystemConfigurationDto> {
private static final String ID_GLOBAL_SECURITY_POLICY_CHOOSER = "securityPolicyChooser";
private static final String ID_OBJECT_POLICY_EDITOR = "objectPolicyEditor";
private static final String ID_GLOBAL_CHOOSEASSIGNEMNTPOLICYENFORCEMENT = "chooseAssignmentPolicyEnforcement";
private static final String ID_CLEANUP_AUDIT_RECORDS = "auditRecordsCleanup";
private static final String ID_CLEANUP_CLOSED_TASKS = "closedTasksCleanup";
private static final String ID_AUDIT_RECORDS_CLEANUP_AGE = "auditRecordsCleanupAge";
private static final String ID_AUDIT_RECORDS_CLEANUP_RECORDS = "auditRecordsCleanupRecords";
private static final String ID_CLOSED_TASKS_CLEANUP_AGE = "closedTasksCleanupAge";
private static final String ID_CERTIFICATION_CAMPAIGNS_CLEANUP_AGE = "certificationCampaignsCleanupAge";
private static final String ID_CERTIFICATION_CAMPAIGNS_CLEANUP_RECORDS = "certificationCampaignsCleanupRecords";
private static final String ID_REPORTS_CLEANUP_AGE = "reportsCleanupAge";
private static final String ID_RESULTS_CLEANUP_AGE = "resultsCleanupAge";
private static final String ID_RESULTS_CLEANUP_RECORDS = "resultsCleanupRecords";

private static final String ID_DEPLOYMENT_INFO_NAME = "deploymentInfoName";
private static final String ID_DEPLOYMENT_INFO_DESCRIPTION = "deploymentInfoDescription";
Expand All @@ -69,6 +72,8 @@ public class SystemConfigPanel extends BasePanel<SystemConfigurationDto> {
private static final String ID_LABEL_SIZE = "col-md-4";
private static final String ID_INPUT_SIZE = "col-md-4";

private static final String CLEANUP_SIZE = "col-md-6";


public SystemConfigPanel(String id, IModel<SystemConfigurationDto> model) {
super(id, model);
Expand Down Expand Up @@ -96,11 +101,47 @@ protected void initLayout() {
assignmentPolicyEnforcementLevel.getInput().add(new EmptyOnChangeAjaxFormUpdatingBehavior());
add(assignmentPolicyEnforcementLevel);

TextFormGroup auditRecordsField = new TextFormGroup(ID_CLEANUP_AUDIT_RECORDS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_AUDIT_CLEANUP), createStringResource("SystemConfigPanel.cleanupPolicy.auditRecords"), "SystemConfigPanel.tooltip.duration", true, ID_LABEL_SIZE, ID_INPUT_SIZE, false, false);
TextFormGroup closedTasksField = new TextFormGroup(ID_CLEANUP_CLOSED_TASKS, new PropertyModel<String>(getModel(), SystemConfigurationDto.F_TASK_CLEANUP), createStringResource("SystemConfigPanel.cleanupPolicy.closedTasks"), "SystemConfigPanel.tooltip.duration", true, ID_LABEL_SIZE, ID_INPUT_SIZE, false, false);

add(auditRecordsField);
add(closedTasksField);
final String DURATION_TOOLTIP_KEY = "SystemConfigPanel.tooltip.duration";
TextFormGroup auditRecordsAgeField = new TextFormGroup(ID_AUDIT_RECORDS_CLEANUP_AGE,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_AUDIT_CLEANUP_AGE),
createStringResource("SystemConfigPanel.cleanupPolicy.auditRecords"),
DURATION_TOOLTIP_KEY, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(auditRecordsAgeField);
TextFormGroup auditRecordsRecordsField = new TextFormGroup(ID_AUDIT_RECORDS_CLEANUP_RECORDS,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_AUDIT_CLEANUP_RECORDS),
createStringResource("SystemConfigPanel.cleanupPolicy.auditRecords.records"),
null, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(auditRecordsRecordsField);
TextFormGroup closedTasksAgeField = new TextFormGroup(ID_CLOSED_TASKS_CLEANUP_AGE,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_TASK_CLEANUP_AGE),
createStringResource("SystemConfigPanel.cleanupPolicy.closedTasks"),
DURATION_TOOLTIP_KEY, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(closedTasksAgeField);
TextFormGroup campaignsAgeField = new TextFormGroup(ID_CERTIFICATION_CAMPAIGNS_CLEANUP_AGE,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_CAMPAIGN_CLEANUP_AGE),
createStringResource("SystemConfigPanel.cleanupPolicy.certificationCampaigns"),
DURATION_TOOLTIP_KEY, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(campaignsAgeField);
TextFormGroup campaignsRecordsField = new TextFormGroup(ID_CERTIFICATION_CAMPAIGNS_CLEANUP_RECORDS,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_CAMPAIGN_CLEANUP_RECORDS),
createStringResource("SystemConfigPanel.cleanupPolicy.certificationCampaigns.records"),
null, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(campaignsRecordsField);
TextFormGroup reportsAgeField = new TextFormGroup(ID_REPORTS_CLEANUP_AGE,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_REPORT_CLEANUP_AGE),
createStringResource("SystemConfigPanel.cleanupPolicy.reports"),
DURATION_TOOLTIP_KEY, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(reportsAgeField);
TextFormGroup resultsAgeField = new TextFormGroup(ID_RESULTS_CLEANUP_AGE,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_RESULT_CLEANUP_AGE),
createStringResource("SystemConfigPanel.cleanupPolicy.results"),
DURATION_TOOLTIP_KEY, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(resultsAgeField);
TextFormGroup resultsRecordsField = new TextFormGroup(ID_RESULTS_CLEANUP_RECORDS,
new PropertyModel<>(getModel(), SystemConfigurationDto.F_RESULT_CLEANUP_RECORDS),
createStringResource("SystemConfigPanel.cleanupPolicy.results.records"),
null, true, CLEANUP_SIZE, CLEANUP_SIZE, false, false);
add(resultsRecordsField);

TextFormGroup deploymentInfoName = new TextFormGroup(ID_DEPLOYMENT_INFO_NAME, new PropertyModel<String>(getModel(), "deploymentInformation.name"), createStringResource("SystemConfigPanel.deploymentInformation.name"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
TextAreaFormGroup deploymentInfoDescription = new TextAreaFormGroup(ID_DEPLOYMENT_INFO_DESCRIPTION, new PropertyModel<String>(getModel(), "deploymentInformation.description"), createStringResource("SystemConfigPanel.deploymentInformation.description"), ID_LABEL_SIZE, ID_INPUT_SIZE, false);
Expand Down

0 comments on commit eac7d55

Please sign in to comment.