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 Sep 26, 2021
2 parents 2966a73 + ba8dab0 commit 375b2a6
Show file tree
Hide file tree
Showing 69 changed files with 1,049 additions and 594 deletions.
6 changes: 3 additions & 3 deletions gui/admin-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<artifactId>ojdbc11</artifactId>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -901,7 +901,7 @@
</exclude>
<exclude>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<artifactId>ojdbc11</artifactId>
</exclude>
</excludes>
-->
Expand Down Expand Up @@ -943,7 +943,7 @@
<!-- note how the archive is treated as a normal file directory -->
<directory>${project.build.directory}/midpoint-executable.war/WEB-INF/lib-provided</directory>
<includes>
<include>ojdbc8-*.jar</include>
<include>ojdbc11-*.jar</include>
<include>ucp-*.jar</include>
<include>oraclepki-*.jar</include>
<include>osdt_cert-*.jar</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,20 @@ public class GuiStyleConstants {

public static final String CLASS_ICON_WIZARD = "fa fa-magic";

public static final String CLASS_TASK_DISTRIBUTION_ICON = "fa fa-cubes";
public static final String CLASS_TASK_WORK_ICON = "fa fa-briefcase";
public static final String CLASS_TASK_CONTROL_FLOW_ICON = "fa fa-code-fork";
public static final String CLASS_TASK_SCHEDULE_ICON = "fa fa-calendar";
public static final String CLASS_TASK_STATISTICS_ICON = "fa fa-line-chart";
public static final String CLASS_TASK_ERRORS_ICON = "fa fa-exclamation-circle";
public static final String CLASS_TASK_ACTIVITY_ICON = "fa fa-cog";

public static final String CLASS_GROUP_ICON = "fa fa-users";
public static final String CLASS_APPLICABLE_POLICY_ICON = "fa fa-share-alt";
public static final String CLASS_LIFECYCLE_ICON = "fa fa-recycle";
public static final String CLASS_TRIGGER_ICON = "fa fa-calendar-check-o";
public static final String CLASS_PASSWORD_ICON = "fa fa-key";

public static final String CLASS_OPTIONS_BUTTON_ICON = "fa fa-bars";
public static final String CLASS_TRACING_BUTTON_ICON = "fa fa-stethoscope";
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public boolean isVisible() {
return getModelObject() != null && getModelObject().getLabel() != null;
}
});
label.add(AttributeAppender.append("class", getSpecialLabelClass()));
buttonContainer.add(label);

WebMarkupContainer icon = new WebMarkupContainer(ID_ICON);
Expand Down Expand Up @@ -111,7 +112,7 @@ public boolean isVisible() {

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

Expand All @@ -126,8 +127,8 @@ protected boolean visibleCaret() {
return true;
}

private void initMenuItem(ListItem<InlineMenuItem> menuItem) {
MenuLinkPanel menuItemBody = new MenuLinkPanel(ID_MENU_ITEM_BODY, menuItem.getModel()){
protected void populateMenuItem(String componentId, ListItem<InlineMenuItem> menuItem) {
MenuLinkPanel menuItemBody = new MenuLinkPanel(componentId, menuItem.getModel()){
@Override
protected void onClick(AjaxRequestTarget target, InlineMenuItemAction action, IModel<InlineMenuItem> item) {
onBeforeClickMenuItem(target, action, item);
Expand Down Expand Up @@ -156,4 +157,7 @@ protected String getSpecialDropdownMenuClass() {
return "pull-right";
}

protected String getSpecialLabelClass() {
return "";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,23 +161,6 @@ private Panel initSummaryPanel() {
private void initButtons(MidpointForm form) {
OperationalButtonsPanel opButtonPanel = createButtonsPanel(ID_BUTTONS, objectDetailsModels.getObjectWrapperModel());
opButtonPanel.setOutputMarkupId(true);

AjaxSelfUpdatingTimerBehavior behavior = new AjaxSelfUpdatingTimerBehavior(Duration.ofMillis(getRefreshInterval())) {
private static final long serialVersionUID = 1L;

@Override
protected void onPostProcessTarget(AjaxRequestTarget target) {
refresh(target);
}

@Override
protected boolean shouldTrigger() {
return isRefreshEnabled();
}
};

opButtonPanel.add(behavior);

form.add(opButtonPanel);
}

Expand Down Expand Up @@ -244,6 +227,7 @@ public Collection<ObjectDeltaOperation<? extends ObjectType>> saveOrPreviewPerfo
Collection<ObjectDeltaOperation<? extends ObjectType>> executedDeltas = executeChanges(deltas, previewOnly, options, task, result, target);

result.computeStatusIfUnknown();
postProcessResult(result, executedDeltas);
showResult(result);
if (!previewOnly && result.isSuccess()) {
redirectBack();
Expand All @@ -253,6 +237,10 @@ public Collection<ObjectDeltaOperation<? extends ObjectType>> saveOrPreviewPerfo
return executedDeltas;
}

protected void postProcessResult(OperationResult result, Collection<ObjectDeltaOperation<? extends ObjectType>> executedDeltas) {

}

protected Collection<ObjectDeltaOperation<? extends ObjectType>> executeChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, boolean previewOnly, ExecuteChangeOptionsDto options, Task task, OperationResult result, AjaxRequestTarget target) {
if (deltas.isEmpty()) {
//nothing to do;
Expand Down Expand Up @@ -303,14 +291,6 @@ protected void initStateButtons(RepeatingView stateButtonsView) {

}

public int getRefreshInterval() {
return 30;
}

public boolean isRefreshEnabled() {
return false;
}

public void refresh(AjaxRequestTarget target) {
refresh(target, true);
}
Expand All @@ -323,6 +303,7 @@ public void refresh(AjaxRequestTarget target, boolean soft) {
target.add(getSummaryPanel());
target.add(getOperationalButtonsPanel());
target.add(getFeedbackPanel());
target.add(get(ID_DETAILS_VIEW));
refreshTitle(target);

// if (soft) {
Expand All @@ -339,15 +320,25 @@ public void refresh(AjaxRequestTarget target, boolean soft) {
}

private ContainerPanelConfigurationType findDefaultConfiguration() {
//TODO support for second level panel as a default, e.g. assignment -> role
Optional<ContainerPanelConfigurationType> basicPanelConfig = getPanelConfigurations().getObject().stream().filter(panel -> BooleanUtils.isTrue(panel.isDefault())).findFirst();
if (basicPanelConfig.isPresent()) {
return basicPanelConfig.get();
}
ContainerPanelConfigurationType defaultConfiguration = findDefaultConfiguration(getPanelConfigurations().getObject());

if (defaultConfiguration != null) {
return defaultConfiguration;
}
return getPanelConfigurations().getObject().stream().findFirst().get();
}

private ContainerPanelConfigurationType findDefaultConfiguration(List<ContainerPanelConfigurationType> configs) {
List<ContainerPanelConfigurationType> subConfigs = new ArrayList<>();
for (ContainerPanelConfigurationType config : configs) {
if (BooleanUtils.isTrue(config.isDefault())) {
return config;
}
subConfigs.addAll(config.getPanel());
}
return findDefaultConfiguration(subConfigs);
}

private void initMainPanel(ContainerPanelConfigurationType panelConfig, MidpointForm form) {
getSessionStorage().setObjectDetailsStorage("details" + getType().getSimpleName(), panelConfig);
String panelType = panelConfig.getPanelType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,27 @@
@PanelInstance(identifier = "roleMembers",
applicableForType = RoleType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.members", order = 80)),
display = @PanelDisplay(label = "pageRole.members", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 80)),
@PanelInstance(identifier = "roleGovernance",
applicableForType = RoleType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.governance", order = 90)),
display = @PanelDisplay(label = "pageRole.governance", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 90)),
@PanelInstance(identifier = "serviceMembers",
applicableForType = ServiceType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.members", order = 80)),
display = @PanelDisplay(label = "pageRole.members", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 80)),
@PanelInstance(identifier = "serviceGovernance",
applicableForType = ServiceType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.governance", order = 90)),
display = @PanelDisplay(label = "pageRole.governance", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 90)),
@PanelInstance(identifier = "archetypeMembers",
applicableForType = ArchetypeType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.members", order = 80)),
display = @PanelDisplay(label = "pageRole.members", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 80)),
@PanelInstance(identifier = "archetypeGovernance",
applicableForType = ArchetypeType.class,
applicableForOperation = OperationTypeType.MODIFY,
display = @PanelDisplay(label = "pageRole.governance", order = 90))
display = @PanelDisplay(label = "pageRole.governance", icon = GuiStyleConstants.CLASS_GROUP_ICON, order = 90))
})
@PanelDisplay(label = "Members", order = 60)
public class AbstractRoleMemberPanel<R extends AbstractRoleType> extends AbstractObjectMainPanel<R, FocusDetailsModels<R>> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
package com.evolveum.midpoint.gui.impl.page.admin.abstractrole.component;

import com.evolveum.midpoint.gui.api.GuiStyleConstants;
import com.evolveum.midpoint.gui.impl.page.admin.AbstractObjectMainPanel;
import com.evolveum.midpoint.gui.impl.page.admin.assignmentholder.FocusDetailsModels;
import com.evolveum.midpoint.web.application.PanelDisplay;
Expand All @@ -26,7 +27,7 @@
@PanelType(name = "applicablePolicies")
@PanelInstance(identifier = "applicablePolicies",
applicableForType = AbstractRoleType.class,
display = @PanelDisplay(label = "pageAdminFocus.applicablePolicies", order = 60))
display = @PanelDisplay(label = "pageAdminFocus.applicablePolicies", icon = GuiStyleConstants.CLASS_APPLICABLE_POLICY_ICON , order = 60))
public class FocusApplicablePoliciesPanel<AR extends AbstractRoleType> extends AbstractObjectMainPanel<AR, FocusDetailsModels<AR>> {
private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<wicket:panel>
<wicket:extend>
<fieldset class="objectButtons col-lg-2">
<legend>Case related operations</legend>
<legend><wicket:message key="CaseOperationalButtonsPanel.buttons.case" /></legend>
<span class="btn btn-margin-right" wicket:id="caseButtons"/>
</fieldset>
</wicket:extend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,16 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<a class="btn btn-default btn-sm" wicket:id="forceContainer"/>
<a class="btn btn-default btn-sm" wicket:id="reconcileContainer"/>
<a class="btn btn-default btn-sm" wicket:id="reconcileAffectedContainer"/>
<a class="btn btn-default btn-sm" wicket:id="executeAfterAllApprovalsContainer"/>
<a class="btn btn-default btn-sm" wicket:id="keepDisplayingResultsContainer"/>
<a class="btn btn-default btn-sm" wicket:id="saveInBackgroundContainer"/>
<!-- TODO style -->
<div class="option-checkbox" wicket:id="tracingContainer">
<div class="checkbox">
<i class="helpTextIcon fa fa-fw fa-lightbulb-o text-warning" wicket:message="title:ItemHeaderPanel.experimentalFeature"></i>s
<label style="padding-left: 0;" wicket:message="title:ExecuteChangeOptionsPanel.label.trace.help">
<wicket:message key="ExecuteChangeOptionsPanel.label.trace"/>
<select wicket:id="tracing"></select>
</label>
</div>
</div>
<div class="pull-left" wicket:id="options"/>

<div class="pull-left" wicket:id="tracing"/>

<wicket:fragment wicket:id="tracingContainer">
<div wicket:id="tracing" />

<a wicket:id="resetChoices">
<wicket:message key="ExecuteChangesOptionsPanel.reset"/>
</a>
</wicket:fragment>
</wicket:panel>
</html>

0 comments on commit 375b2a6

Please sign in to comment.