Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jan 25, 2022
2 parents a5a68d6 + 5c4a208 commit 6f37faa
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import java.util.stream.Collectors;
import javax.xml.namespace.QName;

import com.evolveum.midpoint.gui.impl.page.admin.report.PageReport;

import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -80,7 +82,6 @@
import com.evolveum.midpoint.web.component.util.SerializableSupplier;
import com.evolveum.midpoint.web.component.util.VisibleBehaviour;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import com.evolveum.midpoint.web.page.admin.reports.PageReport;
import com.evolveum.midpoint.web.page.admin.server.dto.OperationResultStatusPresentationProperties;
import com.evolveum.midpoint.web.session.PageStorage;
import com.evolveum.midpoint.web.session.UserProfileStorage;
Expand Down Expand Up @@ -1283,7 +1284,7 @@ protected void createReportPerformed(AjaxRequestTarget target) {
report.getArchetypeRef()
.add(ObjectTypeUtil.createObjectRef(SystemObjectsType.ARCHETYPE_COLLECTION_REPORT.value(), ObjectTypes.ARCHETYPE));

PageReport pageReport = new PageReport(report.asPrismObject(), true);
PageReport pageReport = new PageReport(report.asPrismObject());
getPageBase().navigateToNext(pageReport);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ private AjaxSubmitButton getButton(String buttonId) {
public boolean isKeepDisplayingResults() {
return executeOptions.isKeepDisplayingResults();
}

public ExecuteChangeOptionsDto getExecuteOptions() {
return executeOptions;
}
// mess

public void addRefreshingProgressPanel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

import java.util.Collection;
import java.util.Collections;
import java.util.Locale;
import java.util.*;

@PanelType(name = "internalPerformance")
@PanelInstance(identifier = "internalPerformance", applicableForType = TaskType.class, childOf = TaskPerformancePanel.class,
Expand All @@ -59,9 +57,8 @@ public TaskInternalPerformancePanel(String id, TaskDetailsModel taskModel, Conta
private final IModel<SortBy> sortByModel = Model.of(SortBy.NAME);

protected void initLayout() {

DropDownChoicePanel<Format> formatPanel =
WebComponentUtil.createEnumPanel(Format.class, ID_FORMAT, formatModel, this, false);
WebComponentUtil.createEnumPanel(Format.class, ID_FORMAT, createFormatListModel(), formatModel, this, false);
formatPanel.getBaseFormComponent().add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
Expand Down Expand Up @@ -97,6 +94,13 @@ public boolean isResizeToMaxHeight() {

}

private IModel<List<Format>> createFormatListModel() {
List<Format> formatList = new ArrayList<>();
Collections.addAll(formatList, Format.values());
formatList.remove(Format.RAW);
return Model.ofList(formatList);
}

private IModel<String> createStringModel() {
return new IModel<>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.evolveum.midpoint.web.application.PanelDisplay;
import com.evolveum.midpoint.web.application.PanelInstance;
import com.evolveum.midpoint.web.application.PanelType;
import com.evolveum.midpoint.web.component.AjaxIconButton;
import com.evolveum.midpoint.web.component.data.ISelectableDataProvider;
import com.evolveum.midpoint.web.component.util.SelectableBean;
import com.evolveum.midpoint.web.component.util.SelectableListDataProvider;
Expand Down Expand Up @@ -86,6 +87,11 @@ protected ISelectableDataProvider<TaskType, SelectableBean<TaskType>> createProv
return createSelectableBeanObjectDataProvider(() -> createSubtasksQuery(), null);
}

@Override
protected List<Component> createToolbarButtonsList(String buttonId) {
return new ArrayList<>();
}

@Override
protected List<IColumn<SelectableBean<TaskType>, String>> createDefaultColumns() {
List<IColumn<SelectableBean<TaskType>, String>> columns = super.createDefaultColumns();
Expand Down Expand Up @@ -135,6 +141,11 @@ protected boolean isHeaderVisible() {
return false;
}

@Override
protected List<Component> createToolbarButtonsList(String buttonId) {
return new ArrayList<>();
}

@Override
protected @NotNull TaskInformation getAttachedTaskInformation(SelectableBean<TaskType> selectableTaskBean) {
return TaskInformationUtil.getOrCreateInfo(selectableTaskBean, getObjectDetailsModels().getRootTaskModelObject());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected void processAdditionalFocalObjectsForPreview(Map<PrismObject<UserType>
}

private ModelExecuteOptions getDelegationPreviewOptions() {
ModelExecuteOptions options = getExecuteChangesOptionsDto().createOptions(getPrismContext());
ModelExecuteOptions options = getProgressPanel().getExecuteOptions().createOptions(getPrismContext());
options.getOrCreatePartialProcessing().setApprovals(PartialProcessingTypeType.PROCESS);
return options;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ private ToggleIconButton<Void> getSortButton() {
}

private void refreshPanel(AjaxRequestTarget target) {
target.add(PrismContainerValuePanel.this.findParent(ItemPanel.class));
target.add(PrismContainerValuePanel.this);
target.add(getPageBase().getFeedbackPanel());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,7 @@ private void computePolyStringVisit(Visitable visitable) {
}
for (PrismPropertyValue<PolyString> pval : ((PrismProperty<PolyString>) visitable).getValues()) {
PolyString polyString = pval.getValue();
if (polyString.getOrig() == null) {
if (polyString != null && polyString.getOrig() == null) {
String orig = localizationService.translate(polyString);
LOGGER.trace("PPPP1: Filling out orig value of polyString {}: {}", polyString, orig);
polyString.setComputedOrig(orig);
Expand Down

0 comments on commit 6f37faa

Please sign in to comment.