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
katkav committed Jun 25, 2019
2 parents ac675f5 + b160503 commit 09b36ac
Show file tree
Hide file tree
Showing 843 changed files with 3,226 additions and 157,476 deletions.
2 changes: 1 addition & 1 deletion build-system/pom.xml
Expand Up @@ -86,7 +86,7 @@
<jasper.version>6.5.0</jasper.version>
<derby.version>10.11.1.1</derby.version>
<wro4j.version>1.8.0</wro4j.version>
<jackson.version>2.9.8</jackson.version>
<jackson.version>2.9.9</jackson.version>
<snakeyaml.version>1.19</snakeyaml.version>
<surefire.version>3.0.0-M2</surefire.version>
<reflections.version>0.9.11</reflections.version>
Expand Down
7 changes: 6 additions & 1 deletion dist/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ Copyright (c) 2010-2018 Evolveum
~ Copyright (c) 2010-2019 Evolveum
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,6 +60,11 @@
<artifactId>ninja</artifactId>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.evolveum.midpoint</groupId>
<artifactId>midpoint-samples</artifactId>
<version>4.0-SNAPSHOT</version>
</dependency>
<dependency><!-- Not used, but required for surefire plugin not to complain -->
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
Expand Down
26 changes: 12 additions & 14 deletions dist/src/main/assembly/dist.xml
Expand Up @@ -43,20 +43,6 @@
<include>NEWS</include>
</includes>
</fileSet>
<fileSet>
<directory>../samples</directory>
<outputDirectory>/doc/samples</outputDirectory>
<excludes>
<exclude>.project</exclude>
<exclude>.classpath</exclude>
<exclude>.settings/</exclude>
<exclude>pom.xml</exclude>
<exclude>*~</exclude>
<exclude>**/*~</exclude>
<exclude>model-client-sample/</exclude>
<exclude>samples-test/</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>../config</directory>
<outputDirectory>/doc/config</outputDirectory>
Expand Down Expand Up @@ -119,5 +105,17 @@
</includes>
<unpack>true</unpack>
</dependencySet>
<dependencySet>
<outputDirectory>/doc/samples</outputDirectory>
<includes>
<include>com.evolveum.midpoint:midpoint-samples</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<exclude>META-INF/</exclude>
</excludes>
</unpackOptions>
</dependencySet>
</dependencySets>
</assembly>
Expand Up @@ -17,9 +17,9 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<div class="col-md-4">
<div class="col-md-1" wicket:id="icon" />
<div class="col-md-10" wicket:id="name" />
<div>
<div class="pull-left" wicket:id="icon" />
<div style="padding-left: 20px;" wicket:id="name" />
</div>
</wicket:panel>
</html>
Expand Up @@ -23,6 +23,7 @@
import com.evolveum.midpoint.gui.api.util.WebModelServiceUtils;
import com.evolveum.midpoint.prism.PrismObject;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.web.component.data.column.ColumnUtils;
import com.evolveum.midpoint.web.component.data.column.ImagePanel;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
Expand Down Expand Up @@ -84,9 +85,16 @@ private void initLayout(){
setOutputMarkupId(true);

DisplayType displayType = WebComponentUtil.getArchetypePolicyDisplayType(referencedObjectModel.getObject(), getPageBase());
if (displayType == null){
displayType = new DisplayType();
}
if (displayType.getIcon() == null){
displayType.setIcon(WebComponentUtil.createIconType(WebComponentUtil.createDefaultBlackIcon(
WebComponentUtil.classToQName(getPageBase().getPrismContext(), referencedObjectModel.getObject().getClass()))));
}
ImagePanel imagePanel = new ImagePanel(ID_ICON, displayType);
imagePanel.setOutputMarkupId(true);
imagePanel.add(new VisibleBehaviour(() -> displayType != null && displayType.getIcon() != null && StringUtils.isNotEmpty(displayType.getIcon().getCssClass())));
// imagePanel.add(new VisibleBehaviour(() -> displayType != null && displayType.getIcon() != null && StringUtils.isNotEmpty(displayType.getIcon().getCssClass())));
add(imagePanel);

Label nameLabel = new Label(ID_NAME, Model.of(WebComponentUtil.getEffectiveName(referencedObjectModel.getObject(), AbstractRoleType.F_DISPLAY_NAME)));
Expand Down
Expand Up @@ -17,14 +17,14 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<wicket:panel>
<!--<div class="box" wicket:id="nextStagesContainer">-->
<!--<div class="box-header">-->
<!--<h3 class="box-title"><wicket:message key="ItemApprovalPanel.nextStages"/></h3> <i wicket:id="nextStagesHelp" wicket:message="title:TaskWfChildPanel.nextStagesHelp"/>-->
<!--</div>-->
<!--<div class="box-body">-->
<!--<div wicket:id="nextStages" />-->
<!--</div>-->
<!--</div>-->
<div class="box" wicket:id="nextStagesContainer">
<div class="box-header">
<h3 class="box-title"><wicket:message key="ItemApprovalPanel.nextStages"/></h3> <i wicket:id="nextStagesHelp" wicket:message="title:TaskWfChildPanel.nextStagesHelp"/>
</div>
<div class="box-body">
<div wicket:id="nextStages" />
</div>
</div>
<div class="box" wicket:id="wholeProcessContainer">
<div class="box-header">
<h3 class="box-title"><wicket:message key="ItemApprovalPanel.wholeProcess"/></h3> <i wicket:id="wholeProcessHelp" wicket:message="title:TaskWfChildPanel.wholeProcessHelp"/>
Expand Down
Expand Up @@ -137,11 +137,11 @@ private ApprovalProcessExecutionInformationDto createApprovalProcessExecutionInf
private void initLayout(IModel<Boolean> showNextStagesModel) {
setOutputMarkupId(true);

// WebMarkupContainer nextStagesContainer = new WebMarkupContainer(ID_NEXT_STAGES_CONTAINER);
// nextStagesContainer.add(new ApprovalProcessExecutionInformationPanel(ID_NEXT_STAGES, nextStagesModel));
// nextStagesContainer.add(WebComponentUtil.createHelp(ID_NEXT_STAGES_HELP));
//// nextStagesContainer.add(new VisibleBehaviour(() -> displayedProcessInfoBox == ProcessInfoBox.NEXT_STAGES));
// add(nextStagesContainer);
WebMarkupContainer nextStagesContainer = new WebMarkupContainer(ID_NEXT_STAGES_CONTAINER);
nextStagesContainer.add(new ApprovalProcessExecutionInformationPanel(ID_NEXT_STAGES, nextStagesModel));
nextStagesContainer.add(WebComponentUtil.createHelp(ID_NEXT_STAGES_HELP));
// nextStagesContainer.add(new VisibleBehaviour(() -> displayedProcessInfoBox == ProcessInfoBox.NEXT_STAGES));
add(nextStagesContainer);

WebMarkupContainer wholeProcessContainer = new WebMarkupContainer(ID_WHOLE_PROCESS_CONTAINER);
wholeProcessContainer.add(new ApprovalProcessExecutionInformationPanel(ID_WHOLE_PROCESS, wholeProcessModel));
Expand Down
Expand Up @@ -135,7 +135,7 @@ private void savePerformed(AjaxRequestTarget target, CaseWorkItemType workItem,
try {
assumePowerOfAttorneyIfRequested(result);
//todo fix comment and delta
getPageBase().getWorkflowService().completeWorkItem(WorkItemId.of(workItem), approved, "",
getPageBase().getWorkflowService().completeWorkItem(WorkItemId.of(workItem), approved, getApproverComment(),
null, task, result);
} finally {
dropPowerOfAttorneyIfRequested(result);
Expand All @@ -148,6 +148,10 @@ private void savePerformed(AjaxRequestTarget target, CaseWorkItemType workItem,
getPageBase().redirectBack();
}

protected String getApproverComment(){
return "";
}

private boolean isParentCaseClosed(){
return CaseTypeUtil.isClosed(CaseWorkItemUtil.getCase(getCaseWorkItemModelObject()));
}
Expand Down
Expand Up @@ -66,6 +66,7 @@ public abstract class CaseWorkItemListWithDetailsPanel extends MultivalueContain
private static final long serialVersionUID = 1L;

private static final String ID_CASE_WORK_ITEM_ACTIONS_PANEL = "caseWorkItemActionsPanel";
private WorkItemDetailsPanel workItemDetails = null;

public CaseWorkItemListWithDetailsPanel(String id, IModel<PrismContainerWrapper<CaseWorkItemType>> model, UserProfileStorage.TableId tableId, PageStorage pageStorage){
super(id, model, tableId, pageStorage);
Expand All @@ -75,7 +76,15 @@ public CaseWorkItemListWithDetailsPanel(String id, IModel<PrismContainerWrapper<
protected void onInitialize(){
super.onInitialize();

CaseWorkItemActionsPanel actionsPanel = new CaseWorkItemActionsPanel(ID_CASE_WORK_ITEM_ACTIONS_PANEL, Model.of(unwrapPanelModel()));
CaseWorkItemActionsPanel actionsPanel = new CaseWorkItemActionsPanel(ID_CASE_WORK_ITEM_ACTIONS_PANEL, Model.of(unwrapPanelModel())){
private static final long serialVersionUID = 1L;

@Override
protected String getApproverComment(){
return workItemDetails != null ? workItemDetails.getApproverComment() : null;
}

};
actionsPanel.setOutputMarkupId(true);
getDetailsPanelContainer().add(actionsPanel);
}
Expand Down Expand Up @@ -159,7 +168,7 @@ protected IModel<String> getDescriptionLabelModel() {
@Override
protected void addBasicContainerValuePanel(String idPanel) {
//todo fix implement with WorkItemDetailsPanelFactory
WorkItemDetailsPanel workItemDetails = new WorkItemDetailsPanel(idPanel, Model.of(item.getModel().getObject().getRealValue()));
workItemDetails = new WorkItemDetailsPanel(idPanel, Model.of(item.getModel().getObject().getRealValue()));
workItemDetails.setOutputMarkupId(true);
add(workItemDetails);
}
Expand Down
Expand Up @@ -208,7 +208,14 @@ public void onClick(AjaxRequestTarget target) {
back.setOutputMarkupId(true);
add(back);

CaseWorkItemActionsPanel actionsPanel = new CaseWorkItemActionsPanel(ID_CASE_WORK_ITEM_ACTIONS_PANEL, caseWorkItemModel);
CaseWorkItemActionsPanel actionsPanel = new CaseWorkItemActionsPanel(ID_CASE_WORK_ITEM_ACTIONS_PANEL, caseWorkItemModel){
private static final long serialVersionUID = 1L;

@Override
protected String getApproverComment(){
return workItemDetailsPanel.getApproverComment();
}
};
actionsPanel.setOutputMarkupId(true);
actionsPanel.add(new VisibleBehaviour(() -> !SchemaConstants.CASE_STATE_CLOSED.equals(caseModel.getObject().getState())));
add(actionsPanel);
Expand Down
Expand Up @@ -650,12 +650,7 @@ public IModel<String> getDataModel(IModel<SelectableBean<ShadowType>> rowModel)
@Override
public void onClick(AjaxRequestTarget target, IModel<SelectableBean<ShadowType>> rowModel) {
OperationResultType resultType = getResult(rowModel);
OperationResult result;
try {
result = OperationResult.createOperationResult(resultType);
} catch (SchemaException e) {
throw new SystemException(e.getMessage(), e);
}
OperationResult result = OperationResult.createOperationResult(resultType);

OperationResultPanel body = new OperationResultPanel(
ResourceContentPanel.this.getPageBase().getMainPopupBodyId(),
Expand Down
Expand Up @@ -35,28 +35,42 @@
<td class="col-md-9"><span wicket:id="requestedFor"/></td>
</tr>
<tr>
<td>
<td class="col-md-3">
<wicket:message key="workItemPanel.target"/>
</td>
<td><span wicket:id="target"/></td>
<td class="col-md-9"><span wicket:id="target"/></td>
</tr>
<tr>
<td>
<td class="col-md-3">
<wicket:message key="workItemPanel.reason"/>
</td>
<td><b><span wicket:id="reason"/></b></td>
<td class="col-md-9"><span wicket:id="reason"/></td>
</tr>
<tr>
<td class="col-md-3">
<wicket:message key="workItemPanel.requesterComment"/>
</td>
<td class="col-md-9" style="max-width: 600px; word-wrap: break-word;"><span wicket:id="requesterCommentMessage"/></td>
</tr>
<!--<tr>-->
<!--<td>-->
<!--<wicket:message key="workItemPanel.requesterComment"/>-->
<!--</td>-->
<!--<td style="max-width: 600px; word-wrap: break-word;"><b><span wicket:id="requesterCommentMessage"/></b>-->
<!--</td>-->
<!--</tr>-->
</table>
</div>
</div>

<div wicket:id="deltasToBeApproved"/>

<div class="box box-info" wicket:id="additionalAttributes">
<div class="box-header">
<h3 class="box-title"><wicket:message key="workItemPanel.additionalAttributes"/></h3>
</div>
<div class="box-body">
<div wicket:id="customForm" />
</div>
</div>


<h3><wicket:message key="workItemPanel.approverComment"/></h3>
<textarea wicket:id="approverComment" class="form-control input-sm" rows="2"></textarea>
<p/>

</wicket:panel>
</html>

0 comments on commit 09b36ac

Please sign in to comment.