Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Jul 12, 2021
2 parents 33f4325 + 89489c7 commit 5fa4d4b
Show file tree
Hide file tree
Showing 14 changed files with 209 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3670,10 +3670,25 @@ public static CompositedIcon createAccountIcon(ShadowType shadow, PageBase pageB
} else {
builder.appendLayerIcon(icon, IconCssStyle.TOP_RIGHT_STYLE);
}

}
builder.setBasicIcon(iconCssClass, IconCssStyle.BOTTOM_RIGHT_FOR_COLUMN_STYLE);

if (shadow.getResourceRef() != null && shadow.getResourceRef().getObject() != null
&& ResourceTypeUtil.isInMaintenance(shadow.getResourceRef().getObject())) {
IconType icon = new IconType();
icon.setCssClass("fa fa-wrench " + GuiStyleConstants.CLASS_ICON_STYLE_MAINTENANCE);
if (isColumn) {
builder.appendLayerIcon(icon, IconCssStyle.BOTTOM_LEFT_FOR_COLUMN_STYLE);
} else {
builder.appendLayerIcon(icon, IconCssStyle.BOTTOM_LEFT_STYLE);
}
if (StringUtils.isNotBlank(title)){
title = title + "\n " + pageBase.createStringResource("ChangePasswordPanel.legendMessage.maintenance").getString();
} else {
title = pageBase.createStringResource("ChangePasswordPanel.legendMessage.maintenance").getString();
}
}

if (BooleanUtils.isTrue(shadow.isDead())) {
IconType icon = new IconType();
icon.setCssClass("fa fa-times-circle " + GuiStyleConstants.RED_COLOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ public static <T extends ObjectType> String getIconColumnTitle(T object, Operati
} else if (type.equals(UserType.class)) {
String iconClass = object != null ? WebComponentUtil.createUserIcon(object.asPrismContainer()) : null;
String compareStringValue = GuiStyleConstants.CLASS_OBJECT_USER_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE;
String compareStringValueNormal = GuiStyleConstants.CLASS_OBJECT_USER_ICON + " " + GuiStyleConstants.CLASS_ICON_STYLE_NORMAL;
String titleValue = "";
if (iconClass.equals(compareStringValueNormal)) {
return "";
}
if (iconClass != null &&
iconClass.startsWith(compareStringValue) &&
iconClass.length() > compareStringValue.length()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div wicket:id="type" />
</div>
</div>
<div class="form-group col-sm-12" style="padding-bottom: 5px;">
<div wicket:id="relationContainer" class="form-group col-sm-12" style="padding-bottom: 5px;">
<label class="col-sm-4"><wicket:message key="ReferencePopupPanel.relation"/></label>
<div class="col-sm-8" style="padding: 0px;">
<div wicket:id="relation" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class ReferenceValueSearchPopupPanel<O extends ObjectType> extends Popove
private static final String ID_OID = "oid";
private static final String ID_NAME = "name";
private static final String ID_TYPE = "type";
private static final String ID_RELATION_CONTAINER = "relationContainer";
private static final String ID_RELATION = "relation";
private static final String ID_SELECT_OBJECT_BUTTON = "selectObject";
private static final String ID_FEEDBACK = "feedback";
Expand Down Expand Up @@ -129,6 +130,9 @@ public boolean isEnabled() {
type.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
midpointForm.add(type);

WebMarkupContainer relationContainer = new WebMarkupContainer(ID_RELATION_CONTAINER);
midpointForm.add(relationContainer);
relationContainer.add(new VisibleBehaviour(() -> getAllowedRelations().size() > 0));
List<QName> allowedRelations = new ArrayList<>(getAllowedRelations());
DropDownChoicePanel<QName> relation = new DropDownChoicePanel<QName>(ID_RELATION,
new PropertyModel<>(getModel(), "relation"),
Expand All @@ -144,7 +148,7 @@ public boolean isEnabled() {
}
});
relation.getBaseFormComponent().add(new EmptyOnBlurAjaxFormUpdatingBehaviour());
midpointForm.add(relation);
relationContainer.add(relation);

AjaxButton selectObject = new AjaxButton(ID_SELECT_OBJECT_BUTTON,
createStringResource("ReferenceValueSearchPopupPanel.selectObject")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.evolveum.midpoint.web.component.search;

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

import com.evolveum.midpoint.web.component.util.EnableBehaviour;
Expand Down Expand Up @@ -36,6 +37,8 @@
import com.evolveum.midpoint.web.page.admin.configuration.component.EmptyOnBlurAjaxFormUpdatingBehaviour;
import com.evolveum.midpoint.xml.ns._public.common.common_3.LookupTableType;

import javax.xml.namespace.QName;

/**
* @author Viliam Repan (lazyman)
* @author lskublik
Expand Down Expand Up @@ -84,6 +87,14 @@ public Boolean isItemPanelEnabled() {
protected boolean isAllowedNotFoundObjectRef() {
return item.getSearch().getTypeClass().equals(AuditEventRecordType.class);
}

@Override
protected List<QName> getAllowedRelations() {
if (item.getSearch().getTypeClass().equals(AuditEventRecordType.class)) {
return Collections.emptyList();
}
return super.getAllowedRelations();
}
};
break;
case BOOLEAN:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ protected void onSavePerformed(AjaxRequestTarget target) {
if (result.isError()) {
error(createStringResource("PageAbstractSelfCredentials.message.resultInTable.error").getString());
} else {
info(createStringResource("PageAbstractSelfCredentials.message.resultInTable").getString());
success(createStringResource("PageAbstractSelfCredentials.message.resultInTable").getString());
}
}
if (!result.isError()) {
Expand Down
66 changes: 36 additions & 30 deletions model/model-intest/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
~ Copyright (c) 2010-2019 Evolveum and contributors
~ Copyright (C) 2010-2021 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
Expand Down Expand Up @@ -31,19 +31,19 @@
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>task-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>common</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -66,145 +66,151 @@
<dependency>
<groupId>com.evolveum.midpoint.infra</groupId>
<artifactId>schema</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-common</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>notifications-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>audit-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>security-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>security-enforcer-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-cache</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
<artifactId>provisioning-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.icf</groupId>
<artifactId>dummy-connector</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.icf</groupId>
<artifactId>dummy-connector-fake</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.icf</groupId>
<artifactId>dummy-resource</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
<artifactId>provisioning-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
<artifactId>ucf-api</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>task-quartz-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>audit-log-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>security-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>security-enforcer-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-sql-impl-test</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>model-test</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.model</groupId>
<artifactId>notifications-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-sql-impl</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-sqale</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>repo-test-util</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -215,7 +221,7 @@
<dependency>
<groupId>com.evolveum.midpoint.provisioning</groupId>
<artifactId>ucf-impl-builtin</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -262,7 +268,7 @@
<dependency>
<groupId>com.evolveum.midpoint.repo</groupId>
<artifactId>system-init</artifactId>
<version>4.4-SNAPSHOT</version>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
7 changes: 5 additions & 2 deletions repo/repo-sql-impl-test/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
~ Copyright (c) 2010-2019 Evolveum and contributors
~ Copyright (C) 2010-2021 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
Expand Down Expand Up @@ -95,6 +95,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>

<dependency>
<groupId>net.ttddyy</groupId>
Expand Down Expand Up @@ -170,7 +174,6 @@
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<scope>test</scope>
</dependency>
<dependency> <!-- needed as runtime dependency otherwise spring won't start -->
<groupId>org.springframework</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2020 Evolveum and contributors
* Copyright (C) 2010-2021 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
Expand All @@ -14,12 +14,7 @@
import net.ttddyy.dsproxy.ExecutionInfo;
import net.ttddyy.dsproxy.QueryInfo;
import net.ttddyy.dsproxy.listener.QueryExecutionListener;
import org.springframework.stereotype.Component;

/**
* TODO
*/
@Component
public class TestQueryListener implements QueryExecutionListener {

public static class Entry {
Expand Down

0 comments on commit 5fa4d4b

Please sign in to comment.