Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feature/hibernate5
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Dec 4, 2017
2 parents 2be4727 + 592f692 commit d94a04b
Show file tree
Hide file tree
Showing 20 changed files with 205 additions and 125 deletions.
6 changes: 3 additions & 3 deletions build-system/pom.xml
Expand Up @@ -51,7 +51,7 @@
<commons.cli>1.2</commons.cli>
<cxf.version>3.2.1</cxf.version>
<cxf-xjc.version>3.2.0</cxf-xjc.version>
<wss4j.version>2.1.5</wss4j.version>
<wss4j.version>2.2.0</wss4j.version>
<dbunit.version>2.4.7</dbunit.version>
<jaxb-api.version>2.2.10</jaxb-api.version>
<jaxb.version>2.2.10</jaxb.version>
Expand Down Expand Up @@ -615,8 +615,8 @@
<version>${wss4j.version}</version>
<exclusions>
<exclusion> <!-- conflict with javax.mail:mail -->
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-javamail_1.4_spec</artifactId>
<groupId>org.apache.geronimo.javamail</groupId>
<artifactId>geronimo-javamail_1.4_mail</artifactId>
</exclusion>
<exclusion> <!-- conflict with jasper -->
<groupId>org.bouncycastle</groupId>
Expand Down
6 changes: 5 additions & 1 deletion dist/src/main/bin/springboot.sh
@@ -1,6 +1,6 @@
#!/bin/bash
SCRIPT_PATH=$(cd $(dirname "$0") && pwd -P)/$(basename "$2")

USE_NOHUP="true"
JAVA_OPTS="$JAVA_OPTS -Xms2048M -Xmx2048M -XX:PermSize=128m -XX:MaxPermSize=256m -Dmidpoint.home=$SCRIPT_PATH../var"

# resolve links - $0 may be a softlink
Expand Down Expand Up @@ -68,6 +68,10 @@ else
_RUNJAVA="$JAVA_HOME"/bin/java
fi

if [ "$USE_NOHUP" = "true" ]; then
_NOHUP=nohup
fi

# ----- Execute The Requested Command -----------------------------------------

if [ $have_tty -eq 1 ]; then
Expand Down
Expand Up @@ -21,9 +21,11 @@
</form>

<wicket:fragment wicket:id="buttonBar">
<a wicket:id="newObject" class="btn btn-success btn-sm"/>
<a wicket:id="refresh" class="btn btn-default btn-sm"/>
<a wicket:id="importObject" class="btn btn-primary btn-sm"/>
<span wicket:id="exportData"/>
<div class="btn-group">
<button wicket:id="newObject" class="btn btn-success btn-sm" type="button"/>
<button wicket:id="refresh" class="btn btn-default btn-sm" type="button"/>
<button wicket:id="importObject" class="btn btn-default btn-sm" type="button"/>
<span wicket:id="exportData"/>
</div>
</wicket:fragment>
</wicket:panel>
Expand Up @@ -17,6 +17,6 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<a wicket:id="exportData" class="btn btn-primary btn-sm"/>
<button wicket:id="exportData" class="btn btn-default btn-sm" type="button"/>
</wicket:panel>
</html>
Expand Up @@ -17,12 +17,14 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<a wicket:id="buttonContainer" class="btn" data-toggle="dropdown">
<button wicket:id="buttonContainer" class="btn dropdown-toggle" type="button" data-toggle="dropdown">
<span class="badge bg-teal" wicket:id="info"></span>
<i class="fa " wicket:id="icon"></i>
<label wicket:id="label"></label>
&nbsp;<span class="caret"/>
</a>
<wicket:enclosure child="label">
<label wicket:id="label"></label>&nbsp;
</wicket:enclosure>
<span class="caret"/>
</button>
<ul class="dropdown-menu pull-right" role="menu">
<li wicket:id="menuItem">
<div wicket:id="menuItemBody"/>
Expand Down
Expand Up @@ -28,8 +28,15 @@
import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem;
import com.evolveum.midpoint.web.component.menu.cog.MenuLinkPanel;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;

public class DropdownButtonPanel extends BasePanel<DropdownButtonDto>{
/**
* Universal button to display drop-down menus. The button itself can have numerous decorations: icon, label and tag with count (info)
*
* @author katkav
*
*/
public class DropdownButtonPanel extends BasePanel<DropdownButtonDto> {

private static final long serialVersionUID = 1L;
private static final String ID_BUTTON_CONTAINER = "buttonContainer";
Expand All @@ -46,36 +53,56 @@ public DropdownButtonPanel(String id, DropdownButtonDto model) {
initLayout(model);
}

private void initLayout(DropdownButtonDto model){
private void initLayout(DropdownButtonDto model) {
WebMarkupContainer buttonContainer = new WebMarkupContainer(ID_BUTTON_CONTAINER);
buttonContainer.setOutputMarkupId(true);
buttonContainer.add(AttributeAppender.append("class", getSpecialButtonClass()));
add(buttonContainer);

Label info = new Label(ID_INFO, model.getInfo());
info.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return model.getInfo() != null;
}
});
buttonContainer.add(info);

Label label = new Label(ID_LABEL, model.getLabel());
label.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return model.getLabel() != null;
}
});
buttonContainer.add(label);

WebMarkupContainer icon = new WebMarkupContainer(ID_ICON);
icon.add(AttributeModifier.append("class", model.getIcon()));
icon.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return model.getIcon() != null;
}
});
buttonContainer.add(icon);

ListView<InlineMenuItem> li = new ListView<InlineMenuItem>(ID_MENU_ITEM, new Model((Serializable) model.getMenuItems())) {
private static final long serialVersionUID = 1L;

ListView<InlineMenuItem> li = new ListView<InlineMenuItem>(ID_MENU_ITEM, new Model((Serializable) model.getMenuItems())) {

@Override
protected void populateItem(ListItem<InlineMenuItem> item) {
initMenuItem(item);
}
};

add(li);
@Override
protected void populateItem(ListItem<InlineMenuItem> item) {
initMenuItem(item);
}
};

add(li);
}

public WebMarkupContainer getButtonContainer(){
public WebMarkupContainer getButtonContainer() {
return (WebMarkupContainer)get(ID_BUTTON_CONTAINER);
}

Expand All @@ -85,10 +112,10 @@ private void initMenuItem(ListItem<InlineMenuItem> menuItem) {
WebMarkupContainer menuItemBody = new MenuLinkPanel(ID_MENU_ITEM_BODY, menuItem.getModel());
menuItemBody.setRenderBodyOnly(true);
menuItem.add(menuItemBody);
}
}

protected String getSpecialButtonClass(){
return "btn-app";
}
protected String getSpecialButtonClass() {
return "btn-app";
}

}
Expand Up @@ -952,7 +952,7 @@ public static <C extends Containerable> String getDisplayName(PrismContainerValu
if (containerable instanceof ExclusionPolicyConstraintType){
ExclusionPolicyConstraintType exclusionConstraint = (ExclusionPolicyConstraintType) containerable;
String displayName = (exclusionConstraint.getName() != null ? exclusionConstraint.getName() :
exclusionConstraint.asPrismContainerValue().getPath().last()) + " - "
exclusionConstraint.asPrismContainerValue().getParent().getPath().last()) + " - "
+ StringUtils.defaultIfEmpty(getName(exclusionConstraint.getTargetRef()), "");
return StringUtils.isNotEmpty(displayName) ? displayName : "Not defined exclusion name";
}
Expand Down
@@ -1,5 +1,5 @@
<!--
~ Copyright (c) 2010-2015 Evolveum
~ 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.
Expand All @@ -16,15 +16,10 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<table style="min-width: 75px;">
<tr>
<td>
<a wicket:id="buttons" style="margin-right: 3px;"/>
</td>
<td>
<div wicket:id="inlineMenuPanel"/>
</td>
</tr>
</table>
<div class="btn-group">
<button type="button" wicket:id="buttons"/>
<div class="btn-group" wicket:id="inlineMenuPanel">
</div>
</div>
</wicket:panel>
</html>
Expand Up @@ -16,12 +16,15 @@

package com.evolveum.midpoint.web.component.data;

import com.evolveum.midpoint.gui.api.component.button.DropdownButtonDto;
import com.evolveum.midpoint.gui.api.component.button.DropdownButtonPanel;
import com.evolveum.midpoint.web.component.menu.cog.InlineMenu;
import com.evolveum.midpoint.web.component.menu.cog.InlineMenuItem;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import org.apache.wicket.model.IModel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
Expand All @@ -30,8 +33,9 @@
* todo rewrite
*/
public class MenuMultiButtonPanel<T extends Serializable> extends MultiButtonPanel<T> {
private static final long serialVersionUID = 1L;

private static final String ID_INLINE_MENU_PANEL = "inlineMenuPanel";
private static final String ID_INLINE_MENU_PANEL = "inlineMenuPanel";
private static final String ID_MENU_ITEM_BODY = "menuItemBody";
private static final String ID_MENU_BUTTON_CONTAINER = "menuButtonContainer";

Expand All @@ -42,38 +46,22 @@ public MenuMultiButtonPanel(String id, int buttonsCount, IModel<T> model, IModel
@Override
protected void initLayout() {
super.initLayout();

// wtf, magic numbers, lots of css ??
InlineMenu inlineMenu = new InlineMenu(ID_INLINE_MENU_PANEL, menuItemsModel) {

@Override
protected String getIconClass() {
return "fa fa-fw fa-ellipsis-h";
}

@Override
protected String getAdditionalButtonClass() {
return "btn btn-default btn-xs";
}

@Override
protected String getMenuItemContainerClass() {
return "none";
}

@Override
protected String getMenuItemButtonStyle() {
return "";
}

@Override
protected String getMenuItemContainerStyle() {
return "margin-left: -40px; margin-bottom: -1px; list-style: none;";
}


DropdownButtonPanel inlineMenu = new DropdownButtonPanel(ID_INLINE_MENU_PANEL,
new DropdownButtonDto(null, null, null, menuItemsModel.getObject())) {
private static final long serialVersionUID = 1L;

@Override
protected String getSpecialButtonClass() {
return "btn-xs btn-default";
}

};

inlineMenu.add(new VisibleEnableBehaviour() {
@Override
private static final long serialVersionUID = 1L;

@Override
public boolean isVisible() {
return !(numberOfButtons < 2);
}
Expand Down
Expand Up @@ -17,6 +17,8 @@
package com.evolveum.midpoint.web.component.data;

import com.evolveum.midpoint.gui.api.component.BasePanel;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.web.component.AjaxButton;
import com.evolveum.midpoint.web.component.AjaxIconButton;
import com.evolveum.midpoint.web.component.data.column.DoubleButtonColumn;
Expand All @@ -28,19 +30,22 @@
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.AbstractReadOnlyModel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import java.util.List;

/**
* @author shood
* @author mederly
* <p>
* todo rewrite
* @deprecated generates incorrect HTML, buttons have different dimensions, looks bad. Overcomplicated code.
* todo rewrite, Overcomplicated code.
*/
public class MultiButtonPanel<T> extends BasePanel<T> {
private static final long serialVersionUID = 1L;

private static final String ID_BUTTONS = "buttons";
protected static final Trace LOGGER = TraceManager.getTrace(MultiButtonPanel.class);

private static final String ID_BUTTONS = "buttons";

protected IModel<List<InlineMenuItem>> menuItemsModel = null;
protected int numberOfButtons;
Expand All @@ -65,7 +70,7 @@ protected void initLayout() {
final int finalId = getButtonId(id);
AjaxIconButton button = new AjaxIconButton(String.valueOf(finalId),
createIconModel(finalId),
createStringResource(getCaption(finalId))) {
Model.of(getButtonTitle(finalId))) {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -102,15 +107,15 @@ public boolean isVisible() {
button.add(AttributeAppender.append("class", "disabled"));
}

button.add(new AttributeAppender("title", getButtonTitle(finalId)));

buttons.add(button);
}
}

private IModel<String> createIconModel(int id) {
return new AbstractReadOnlyModel<String>() {
@Override
private static final long serialVersionUID = 1L;

@Override
public String getObject() {
return getButtonIconCss(id);
}
Expand Down

0 comments on commit d94a04b

Please sign in to comment.