-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
21 changed files
with
558 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/BadgePanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- | ||
~ Copyright (c) 2010-2018 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<!DOCTYPE html> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<wicket:panel> | ||
<i class="mr-1" wicket:id="icon"></i> | ||
<span wicket:id="text"/> | ||
</wicket:panel> | ||
</html> |
54 changes: 54 additions & 0 deletions
54
gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/BadgePanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.api.component; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.apache.wicket.behavior.AttributeAppender; | ||
import org.apache.wicket.markup.ComponentTag; | ||
import org.apache.wicket.markup.html.WebMarkupContainer; | ||
import org.apache.wicket.markup.html.basic.Label; | ||
import org.apache.wicket.model.IModel; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.web.component.util.VisibleBehaviour; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class BadgePanel extends BasePanel<Badge> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
private static final String ID_ICON = "icon"; | ||
private static final String ID_TEXT = "text"; | ||
|
||
public BadgePanel(String id, IModel<Badge> model) { | ||
super(id, model); | ||
|
||
initLayout(); | ||
} | ||
|
||
@Override | ||
protected void onComponentTag(ComponentTag tag) { | ||
super.onComponentTag(tag); | ||
|
||
checkComponentTag(tag, "span"); | ||
} | ||
|
||
private void initLayout() { | ||
add(AttributeAppender.append("class", () -> getModelObject().getCssClass())); | ||
add(new VisibleBehaviour(() -> StringUtils.isNotEmpty(getModelObject().getText()) || StringUtils.isNotEmpty(getModelObject().getIconCssClass()))); | ||
|
||
WebMarkupContainer icon = new WebMarkupContainer(ID_ICON); | ||
icon.add(AttributeAppender.append("class", () -> getModelObject().getIconCssClass())); | ||
icon.add(new VisibleBehaviour(() -> StringUtils.isNotEmpty(getModelObject().getIconCssClass()))); | ||
add(icon); | ||
|
||
Label text = new Label(ID_TEXT, () -> getModelObject().getText()); | ||
add(text); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/page/self/requestAccess/Conflict.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.page.self.requestAccess; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class Conflict implements Serializable { | ||
|
||
private ConflictItem added; | ||
|
||
private ConflictItem exclusion; | ||
|
||
private ConflictState state = ConflictState.UNRESOLVED; | ||
|
||
private boolean warning; | ||
|
||
public Conflict(ConflictItem added, ConflictItem exclusion, boolean warning) { | ||
this.added = added; | ||
this.exclusion = exclusion; | ||
this.warning = warning; | ||
} | ||
|
||
public ConflictItem getAdded() { | ||
return added; | ||
} | ||
|
||
public ConflictItem getExclusion() { | ||
return exclusion; | ||
} | ||
|
||
public ConflictState getState() { | ||
return state; | ||
} | ||
|
||
public void setState(ConflictState state) { | ||
this.state = state; | ||
} | ||
|
||
public boolean isWarning() { | ||
return warning; | ||
} | ||
} |
Oops, something went wrong.