Skip to content

Commit

Permalink
Merge branch 'master' into feature/provisioning-run-as
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Sep 10, 2018
2 parents d4a04c4 + 01f7d8a commit 10cdb26
Show file tree
Hide file tree
Showing 76 changed files with 916 additions and 6,494 deletions.
1 change: 1 addition & 0 deletions dist/pom.xml
Expand Up @@ -53,6 +53,7 @@
<artifactId>admin-gui</artifactId>
<version>3.9-SNAPSHOT</version>
<type>war</type>
<classifier>executable</classifier>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.tools</groupId>
Expand Down
72 changes: 41 additions & 31 deletions gui/admin-gui/pom.xml
Expand Up @@ -104,35 +104,6 @@
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
<skip>false</skip>
<jvmArguments>-Dserver.port=${server.port} -Dmidpoint.home=${midpoint.home} -Dmidpoint.schrodinger=${midpoint.schrodinger} -Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore} -Djavax.net.ssl.trustStoreType=${javax.net.ssl.trustStoreType}</jvmArguments><!-- TODO question: CAN this argument be active by default, or should be there a different profile defined for this? -->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<layoutFactory implementation="com.evolveum.midpoint.tools.layout.MidPointWarLayoutFactory"/>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.evolveum.midpoint</groupId>
<artifactId>midpoint-war-layout</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<dependencies>
Expand Down Expand Up @@ -911,13 +882,52 @@
<version>3.9-SNAPSHOT</version>
</dependency>
</dependencies>

<profiles>
<profile>
<id>tomcat</id>
<id>executable</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
<skip>false</skip>
<jvmArguments>-Dserver.port=${server.port} -Dmidpoint.home=${midpoint.home} -Dmidpoint.schrodinger=${midpoint.schrodinger} -Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore} -Djavax.net.ssl.trustStoreType=${javax.net.ssl.trustStoreType}</jvmArguments><!-- TODO question: CAN this argument be active by default, or should be there a different profile defined for this? -->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>executable</classifier>
<layoutFactory implementation="com.evolveum.midpoint.tools.layout.MidPointWarLayoutFactory"/>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.evolveum.midpoint</groupId>
<artifactId>midpoint-war-layout</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>tomcat</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<artifactId>jaxb-impl</artifactId>
Expand All @@ -934,8 +944,8 @@
<scope>runtime</scope>
</dependency>
</dependencies>

</profile>

<profile>
<!-- can be used for development e.g. in Intellij Idea -->
<id>ide</id>
Expand Down
Expand Up @@ -30,7 +30,6 @@
import com.evolveum.midpoint.gui.api.util.ModelServiceLocator;
import com.evolveum.midpoint.gui.api.util.WebComponentUtil;
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
import com.evolveum.midpoint.gui.impl.page.admin.configuration.component.SystemConfigPanelNew;
import com.evolveum.midpoint.model.api.*;
import com.evolveum.midpoint.model.api.expr.MidpointFunctions;
import com.evolveum.midpoint.model.api.validator.ResourceValidator;
Expand Down Expand Up @@ -1534,18 +1533,6 @@ protected List<SideBarMenuItem> createMenuItems() {
return menus;
}

// private MainMenuItem createSystemConfigurationItems() {
// MainMenuItem item = new MainMenuItem(GuiStyleConstants.CLASS_SYSTEM_CONFIGURATION_ICON_COLORED,
// createStringResource("PageAdmin.menu.top.configuration.basic.new"), PageSystemConfigurationNew.class);
//
// addMenuItem(item, "PageAdmin.menu.top.configuration.basic", SystemConfigPanelNew.class);
// addMenuItem(item, "PageAdmin.menu.top.configuration.objectPolicy", PageUsers.class);
// addMenuItem(item, "PageAdmin.menu.top.users.list", PageUsers.class);
//
// addUsersViewMenuItems(item.getItems());
//
// return item;
// }

private void createConfigurationMenu(SideBarMenuItem item) {
addMainMenuItem(item, "fa fa-bullseye", "PageAdmin.menu.top.configuration.bulkActions", PageBulkAction.class);
Expand All @@ -1559,53 +1546,40 @@ private void createConfigurationMenu(SideBarMenuItem item) {
PageDebugView.class, null, createVisibleDisabledBehaviorForEditMenu(PageDebugView.class));
debugs.getItems().add(menu);

MainMenuItem systemItemNew = addMainMenuItem(item, "fa fa-cog", "PageAdmin.menu.top.configuration.basic.new", null);
MainMenuItem systemItemNew = addMainMenuItem(item, "fa fa-cog", "PageAdmin.menu.top.configuration.basic", null);

addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.basic",
PageSystemConfigurationNew.CONFIGURATION_TAB_BASIC);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.objectPolicy",
PageSystemConfigurationNew.CONFIGURATION_TAB_OBJECT_POLICY);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.globalPolicyRule",
PageSystemConfigurationNew.CONFIGURATION_TAB_GLOBAL_POLICY_RULE);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.globalAccountSynchronization",
PageSystemConfigurationNew.CONFIGURATION_TAB_GLOBAL_ACCOUNT_SYNCHRONIZATION);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.cleanupPolicy",
PageSystemConfigurationNew.CONFIGURATION_TAB_CLEANUP_POLICY);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.notifications",
PageSystemConfigurationNew.CONFIGURATION_TAB_NOTIFICATION);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.logging",
PageSystemConfigurationNew.CONFIGURATION_TAB_LOGGING);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.profiling",
PageSystemConfigurationNew.CONFIGURATION_TAB_PROFILING);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.adminGui",
PageSystemConfigurationNew.CONFIGURATION_TAB_ADMIN_GUI);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.workflow",
PageSystemConfigurationNew.CONFIGURATION_TAB_WORKFLOW);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.roleManagement",
PageSystemConfigurationNew.CONFIGURATION_TAB_ROLE_MANAGEMENT);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.internals",
PageSystemConfigurationNew.CONFIGURATION_TAB_INTERNALS);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.deploymentInformation",
PageSystemConfigurationNew.CONFIGURATION_TAB_DEPLOYMENT_INFORMATION);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.accessCertification",
PageSystemConfigurationNew.CONFIGURATION_TAB_ACCESS_CERTIFICATION);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.infrastructure",
PageSystemConfigurationNew.CONFIGURATION_TAB_INFRASTRUCTURE);
addSystemMenuItemNew(systemItemNew, "PageAdmin.menu.top.configuration.fullTextSearch",
PageSystemConfigurationNew.CONFIGURATION_TAB_FULL_TEXT_SEARCH);

MainMenuItem systemItem = addMainMenuItem(item, "fa fa-cog", "PageAdmin.menu.top.configuration.basic", null);

addSystemMenuItem(systemItem, "PageAdmin.menu.top.configuration.basic",
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.basic",
PageSystemConfiguration.CONFIGURATION_TAB_BASIC);
addSystemMenuItem(systemItem, "PageAdmin.menu.top.configuration.notifications",
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.objectPolicy",
PageSystemConfiguration.CONFIGURATION_TAB_OBJECT_POLICY);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.globalPolicyRule",
PageSystemConfiguration.CONFIGURATION_TAB_GLOBAL_POLICY_RULE);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.globalAccountSynchronization",
PageSystemConfiguration.CONFIGURATION_TAB_GLOBAL_ACCOUNT_SYNCHRONIZATION);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.cleanupPolicy",
PageSystemConfiguration.CONFIGURATION_TAB_CLEANUP_POLICY);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.notifications",
PageSystemConfiguration.CONFIGURATION_TAB_NOTIFICATION);
addSystemMenuItem(systemItem, "PageAdmin.menu.top.configuration.logging",
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.logging",
PageSystemConfiguration.CONFIGURATION_TAB_LOGGING);
addSystemMenuItem(systemItem, "PageAdmin.menu.top.configuration.profiling",
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.profiling",
PageSystemConfiguration.CONFIGURATION_TAB_PROFILING);
addSystemMenuItem(systemItem, "PageAdmin.menu.top.configuration.adminGui",
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.adminGui",
PageSystemConfiguration.CONFIGURATION_TAB_ADMIN_GUI);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.workflow",
PageSystemConfiguration.CONFIGURATION_TAB_WORKFLOW);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.roleManagement",
PageSystemConfiguration.CONFIGURATION_TAB_ROLE_MANAGEMENT);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.internals",
PageSystemConfiguration.CONFIGURATION_TAB_INTERNALS);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.deploymentInformation",
PageSystemConfiguration.CONFIGURATION_TAB_DEPLOYMENT_INFORMATION);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.accessCertification",
PageSystemConfiguration.CONFIGURATION_TAB_ACCESS_CERTIFICATION);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.infrastructure",
PageSystemConfiguration.CONFIGURATION_TAB_INFRASTRUCTURE);
addSystemMenuItem(systemItemNew, "PageAdmin.menu.top.configuration.fullTextSearch",
PageSystemConfiguration.CONFIGURATION_TAB_FULL_TEXT_SEARCH);

addMainMenuItem(item, "fa fa-archive", "PageAdmin.menu.top.configuration.internals", PageInternals.class);
addMainMenuItem(item, "fa fa-search", "PageAdmin.menu.top.configuration.repoQuery", PageRepositoryQuery.class);
Expand All @@ -1620,8 +1594,6 @@ private void addSystemMenuItem(MainMenuItem mainItem, String key, int tabIndex)
params.add(PageSystemConfiguration.SELECTED_TAB_INDEX, tabIndex);
MenuItem menu = new MenuItem(createStringResource(key), PageSystemConfiguration.class, params, null) {

private static final long serialVersionUID = 1L;

@Override
public boolean isMenuActive(WebPage page) {
if (!PageSystemConfiguration.class.equals(page.getClass())) {
Expand All @@ -1634,24 +1606,6 @@ public boolean isMenuActive(WebPage page) {
};
mainItem.getItems().add(menu);
}

private void addSystemMenuItemNew(MainMenuItem mainItem, String key, int tabIndex) {
PageParameters params = new PageParameters();
params.add(PageSystemConfigurationNew.SELECTED_TAB_INDEX, tabIndex);
MenuItem menu = new MenuItem(createStringResource(key), PageSystemConfigurationNew.class, params, null) {

@Override
public boolean isMenuActive(WebPage page) {
if (!PageSystemConfigurationNew.class.equals(page.getClass())) {
return false;
}

int index = getSelectedTabForNewConfiguration(page);
return tabIndex == index ? true : false;
}
};
mainItem.getItems().add(menu);
}

private MainMenuItem addMainMenuItem(SideBarMenuItem item, String icon, String key, Class<? extends PageBase> page) {
MainMenuItem mainItem = new MainMenuItem(icon, createStringResource(key), page);
Expand Down Expand Up @@ -1803,17 +1757,6 @@ private int getSelectedTabForConfiguration(WebPage page) {

return StringUtils.isNumeric(value) ? Integer.parseInt(value) : PageSystemConfiguration.CONFIGURATION_TAB_BASIC;
}

private int getSelectedTabForNewConfiguration(WebPage page) {
PageParameters params = page.getPageParameters();
StringValue val = params.get(PageSystemConfigurationNew.SELECTED_TAB_INDEX);
String value = null;
if (val != null && !val.isNull()) {
value = val.toString();
}

return StringUtils.isNumeric(value) ? Integer.parseInt(value) : PageSystemConfigurationNew.CONFIGURATION_TAB_BASIC;
}

private void createSelfServiceMenu(SideBarMenuItem menu) {
addMainMenuItem(menu, GuiStyleConstants.CLASS_ICON_DASHBOARD, "PageAdmin.menu.selfDashboard",
Expand Down
Expand Up @@ -17,15 +17,15 @@

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div class="col-xs-2 prism-property-label" wicket:id="labelContainer">
<div wicket:id="labelContainer">
<span wicket:id="label"/>
<span wicket:id="required" style="color: #f00; font-weight: bold;"
wicket:message="title:prismPropertyPanel.required">*</span>
<i wicket:id="tooltip"/>
</div>

<div class="col-md-10 prism-property-value">
<div class="row">
<div wicket:id="propertyLabel">
<div wicket:id="row">
<div wicket:id="valueWrapper">
<div wicket:id="value"/>
<span class="text-danger" wicket:id="feedback"/>
Expand Down
Expand Up @@ -47,26 +47,43 @@ public class TriStateFormGroup extends BasePanel<Boolean> {
private static final String ID_TOOLTIP = "tooltip";
private static final String ID_REQUIRED = "required";
private static final String ID_FEEDBACK = "feedback";
private static final String ID_PROPERTY_LABEL = "propertyLabel";
private static final String ID_ROW = "row";

public TriStateFormGroup(String id, IModel<Boolean> value, IModel<String> label, String labelCssClass, String textCssClass, boolean required, boolean isSimilarAsPropertyPanel) {
this(id, value, label, null, false, labelCssClass, textCssClass, required, isSimilarAsPropertyPanel);
}

public TriStateFormGroup(String id, IModel<Boolean> value, IModel<String> label, String labelCssClass, String textCssClass, boolean required) {
this(id, value, label, null, false, labelCssClass, textCssClass, required);
this(id, value, label, null, false, labelCssClass, textCssClass, required, false);
}

public TriStateFormGroup(String id, IModel<Boolean> value, IModel<String> label, String tooltipKey,
boolean isTooltipInModal, String labelCssClass, String textCssClass, boolean required) {
this(id, value, label, null, false, labelCssClass, textCssClass, required, false);
}

public TriStateFormGroup(String id, IModel<Boolean> value, IModel<String> label, String tooltipKey,
boolean isTooltipInModal, String labelCssClass, String textCssClass, boolean required) {
boolean isTooltipInModal, String labelCssClass, String textCssClass, boolean required, boolean isSimilarAsPropertyPanel) {
super(id, value);

initLayout(label, tooltipKey, isTooltipInModal, labelCssClass, textCssClass, required);
initLayout(label, tooltipKey, isTooltipInModal, labelCssClass, textCssClass, required, isSimilarAsPropertyPanel);
}

private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelCssClass, String textCssClass, boolean required) {
private void initLayout(IModel<String> label, final String tooltipKey, boolean isTooltipInModal, String labelCssClass, String textCssClass,
boolean required, boolean isSimilarAsPropertyPanel) {
WebMarkupContainer labelContainer = new WebMarkupContainer(ID_LABEL_CONTAINER);
add(labelContainer);
Label l = new Label(ID_LABEL, label);

if (StringUtils.isNotEmpty(labelCssClass)) {
labelContainer.add(AttributeAppender.prepend("class", labelCssClass));
}
if(isSimilarAsPropertyPanel) {
labelContainer.add(AttributeAppender.prepend("class", " col-xs-2 prism-property-label "));
} else {
labelContainer.add(AttributeAppender.prepend("class", " control-label "));
}
labelContainer.add(l);

Label tooltipLabel = new Label(ID_TOOLTIP, new Model<>());
Expand Down Expand Up @@ -98,11 +115,19 @@ public boolean isVisible() {
});
labelContainer.add(requiredContainer);

WebMarkupContainer propertyLabel = new WebMarkupContainer(ID_PROPERTY_LABEL);
WebMarkupContainer rowLabel = new WebMarkupContainer(ID_ROW);
WebMarkupContainer valueWrapper = new WebMarkupContainer(ID_VALUE_WRAPPER);
if (StringUtils.isNotEmpty(textCssClass)) {
valueWrapper.add(AttributeAppender.prepend("class", textCssClass));
}
add(valueWrapper);
if(isSimilarAsPropertyPanel) {
propertyLabel.add(AttributeAppender.prepend("class", " col-md-10 prism-property-value "));
rowLabel.add(AttributeAppender.prepend("class", " row "));
}
propertyLabel.add(rowLabel);
rowLabel.add(valueWrapper);
add(propertyLabel);

TriStateComboPanel triStateCombo = new TriStateComboPanel(ID_VALUE, getModel());;
valueWrapper.add(triStateCombo);
Expand Down

0 comments on commit 10cdb26

Please sign in to comment.