Skip to content

Commit

Permalink
statistics panel and other stuffs around projection panel (MID-7547)
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Jan 12, 2022
1 parent 2642c01 commit cbf037d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ public void replacePanel(ContainerPanelConfigurationType config, AjaxRequestTarg
try {
initMainPanel(config, form);
target.add(form);
target.add(getFeedbackPanel());
} catch (Throwable e) {
error("Cannot instantiate panel, " + e.getMessage());
target.add(getFeedbackPanel());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,13 @@ protected MultivalueContainerDetailsPanel<ShadowType> getMultivalueContainerDeta
setOutputMarkupId(true);
}

private LoadableDetachableModel<List<PrismContainerValueWrapper<ShadowType>>> loadShadowModel() {
return new LoadableDetachableModel<>() {
@Override
protected List<PrismContainerValueWrapper<ShadowType>> load() {
private IModel<List<PrismContainerValueWrapper<ShadowType>>> loadShadowModel() {
return () -> {
List<PrismContainerValueWrapper<ShadowType>> items = new ArrayList<>();
for (ShadowWrapper projection : getProjectionsModel().getObject()) {
items.add(projection.getValue());
}
return items;
}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ShadowDetailsModel(LoadableDetachableModel<PrismObject<ShadowType>> prism
}

protected GuiObjectDetailsPageType loadDetailsPageConfiguration(PrismObject<ShadowType> prismObject) {
return getModelServiceLocator().getCompiledGuiProfile().findShadowDetailsConfiguration(createResourceShadowDiscriminator(prismObject.asObjectable()));
return getModelServiceLocator().getCompiledGuiProfile().findShadowDetailsConfiguration(createResourceShadowDiscriminator(getPrismObject().asObjectable()));
}

private ResourceShadowDiscriminator createResourceShadowDiscriminator(ShadowType shadow) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public PageParameters getParameters() {
@Override
public WebPage redirect() {
List<NewWindowNotifyingBehavior> behaviors = page.getBehaviors(NewWindowNotifyingBehavior.class);
// behaviors.forEach(behavior -> page.remove(behavior));
//
// page.add(new NewWindowNotifyingBehavior());
behaviors.forEach(behavior -> page.remove(behavior));

page.add(new NewWindowNotifyingBehavior());

return page;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@ public static List<ProvisioningStatisticsLineDto> extractFromOperationalInformat
public List<ProvisioningStatisticsOperationDto> getOperations() {
return operations;
}

public QName getObjectClass() {
return objectClass;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ private ProvisioningStatisticsLineDto getModelObject() {

private void initLayout() {
add(new Label(ID_PROVISIONING_RESOURCE, new ReadOnlyModel<>(() -> WebModelServiceUtils.resolveReferenceName(getModelObject().getResourceRef(), getPageBase()))));
add(new Label(ID_PROVISIONING_OBJECT_CLASS, new PropertyModel<>(getModel(), ProvisioningStatisticsLineDto.F_OBJECT_CLASS + ".localPart")));
add(new Label(ID_PROVISIONING_OBJECT_CLASS, new ReadOnlyModel<>(() -> getModelObject().getObjectClass() != null ? getModelObject().getObjectClass().getLocalPart() : "")));
}
}

Expand Down

0 comments on commit cbf037d

Please sign in to comment.