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 Sep 17, 2018
2 parents 5fd0194 + 3eb9898 commit ca2eadf
Show file tree
Hide file tree
Showing 9 changed files with 518 additions and 36 deletions.
Expand Up @@ -27,7 +27,6 @@
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.FormComponent;
Expand Down Expand Up @@ -72,30 +71,23 @@ public PasswordPanel(String id, IModel<ProtectedStringType> model) {
public PasswordPanel(String id, IModel<ProtectedStringType> model, boolean isReadOnly) {
super(id);
this.passwordInputVisble = model.getObject() == null;
initLayout(model, isReadOnly, false);
initLayout(model, isReadOnly);
}

public PasswordPanel(String id, IModel<ProtectedStringType> model, boolean isReadOnly, boolean isInputVisible) {
this(id, model, isReadOnly, isInputVisible, false);
}

public PasswordPanel(String id, IModel<ProtectedStringType> model, boolean isReadOnly, boolean isInputVisible, boolean isSimilarAsPropertyPanel) {
super(id);
this.passwordInputVisble = isInputVisible;
initLayout(model, isReadOnly, isSimilarAsPropertyPanel);
initLayout(model, isReadOnly);
}

private void initLayout(final IModel<ProtectedStringType> model, final boolean isReadOnly, boolean isSimilarAsPropertyPanel) {
private void initLayout(final IModel<ProtectedStringType> model, final boolean isReadOnly) {
setOutputMarkupId(true);
final WebMarkupContainer inputContainer = new WebMarkupContainer(ID_INPUT_CONTAINER) {
@Override
public boolean isVisible() {
return passwordInputVisble;
}
};
if(!isSimilarAsPropertyPanel) {
inputContainer.add(AttributeAppender.prepend("class", "col-md-11"));
}
inputContainer.setOutputMarkupId(true);
add(inputContainer);

Expand Down Expand Up @@ -301,4 +293,4 @@ public void setObject(String object) {
}

}
}
}
Expand Up @@ -38,6 +38,7 @@
import com.evolveum.midpoint.web.component.prism.PrismPropertyPanel;
import com.evolveum.midpoint.web.component.prism.PropertyWrapper;
import com.evolveum.midpoint.web.component.prism.ValueWrapper;
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour;
import com.evolveum.midpoint.xml.ns._public.common.common_3.AbstractLoggerConfigurationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.LoggingConfigurationType;
Expand Down Expand Up @@ -86,7 +87,15 @@ private IModel<ContainerWrapper<ProfilingConfigurationType>> getProfilingModel()
protected void initLayout() {

WebMarkupContainer profilingEnabledNote = new WebMarkupContainer(ID_PROFILING_ENABLED_NOTE);
profilingEnabledNote.setVisible(!getPageBase().getMidpointConfiguration().isProfilingEnabled());
profilingEnabledNote.add(new VisibleEnableBehaviour() {

private static final long serialVersionUID = 1L;

@Override
public boolean isVisible() {
return !getPageBase().getMidpointConfiguration().isProfilingEnabled();
}
});
add(profilingEnabledNote);

PrismContainerPanel<ProfilingConfigurationType> profilingPanel = new PrismContainerPanel<ProfilingConfigurationType>(ID_PROFILING, getProfilingModel(), true, new Form<>("form"), null, getPageBase());
Expand Down
Expand Up @@ -586,10 +586,10 @@ public void detach() {

if (!(getPageBase() instanceof PageUser)) {
return new PasswordPanel(id, new PropertyModel<>(getModel(), baseExpression),
getModel().getObject().isReadonly(), true, true);
getModel().getObject().isReadonly(), true);
}
PropertyModel propModel = new PropertyModel<>(getModel(), baseExpression);
panel = new PasswordPanel(id, propModel, getModel().getObject().isReadonly(), propModel.getObject() == null, true);
panel = new PasswordPanel(id, new PropertyModel<>(getModel(), baseExpression),
getModel().getObject().isReadonly());

} else if (DOMUtil.XSD_BOOLEAN.equals(valueType)) {
panel = new TriStateComboPanel(id, new PropertyModel<>(getModel(), baseExpression));
Expand Down
Expand Up @@ -28,10 +28,10 @@
<h3 class="box-title"><wicket:message key="PageAbout.title.basic"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr>
<td><wicket:message key="PageAbout.midPointVersionTitle" /></td>
<td><wicket:message key="PageAbout.midPointVersion" /></td>
<td class="col-xs-3"><wicket:message key="PageAbout.midPointVersionTitle" /></td>
<td class="col-xs-9"><wicket:message key="PageAbout.midPointVersion" /></td>
</tr>
<tr>
<td><wicket:message key="PageAbout.midPointRevisionTitle" /></td>
Expand All @@ -53,10 +53,10 @@ <h3 class="box-title"><wicket:message key="PageAbout.title.basic"/></h3>
<h3 class="box-title"><wicket:message key="PageAbout.title.repository"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr>
<td><wicket:message key="PageAbout.repoDiag.implementationShortName" /></td>
<td><span wicket:id="implementationShortName"/></td>
<td class="col-xs-3"><wicket:message key="PageAbout.repoDiag.implementationShortName" /></td>
<td class="col-xs-9"><span wicket:id="implementationShortName"/></td>
</tr>
<tr>
<td><wicket:message key="PageAbout.repoDiag.implementationDescription" /></td>
Expand Down Expand Up @@ -86,10 +86,10 @@ <h3 class="box-title"><wicket:message key="PageAbout.title.repository"/></h3>
<h3 class="box-title"><wicket:message key="PageAbout.title.repository.additional"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr wicket:id="additionalDetails">
<td><span wicket:id="detailName" /></td>
<td><span wicket:id="detailValue" /></td>
<td class="col-xs-3"><span wicket:id="detailName" /></td>
<td class="col-xs-9"><span wicket:id="detailValue" /></td>
</tr>
</table>
</div>
Expand All @@ -99,10 +99,10 @@ <h3 class="box-title"><wicket:message key="PageAbout.title.repository.additional
<h3 class="box-title"><wicket:message key="PageAbout.title.provisioning"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr wicket:id="provisioningAdditionalDetails">
<td><span wicket:id="provisioningDetailName" /></td>
<td><span wicket:id="provisioningDetailValue" /></td>
<td class="col-xs-3"><span wicket:id="provisioningDetailName" /></td>
<td class="col-xs-9"><span wicket:id="provisioningDetailValue" /></td>
</tr>
</table>
</div>
Expand All @@ -116,10 +116,10 @@ <h3 class="box-title"><wicket:message key="PageAbout.title.provisioning"/></h3>
<h3 class="box-title"><wicket:message key="PageAbout.title.systemProperties"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr wicket:id="listSystemItems">
<td><span wicket:id="property" /></td>
<td><span wicket:id="value" /></td>
<td class="col-xs-3"><span wicket:id="property" /></td>
<td class="col-xs-9"><span wicket:id="value" /></td>
</tr>
</table>
</div>
Expand All @@ -129,7 +129,7 @@ <h3 class="box-title"><wicket:message key="PageAbout.title.systemProperties"/></
<h3 class="box-title"><wicket:message key="PageAbout.title.jvmProperties"/></h3>
</div>
<div class="box-body no-padding">
<table class="table table-striped">
<table class="table table-striped table-word-break">
<tr>
<td wicket:id="jvmProperties"/>
</tr>
Expand Down
Expand Up @@ -150,14 +150,14 @@
</object>
</authorization>
<authorization>
<name>assignment-target-read</name>
<name>assignment-target-get</name>
<description>
Authorization that allows to read all the object that are possible assignment targets. We want that
to display the targets in the selection windows.
Note that this authorization may be too broad for production use. Normally it should be limited to just
selected properties such as name and description.
</description>
<action>http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read</action>
<action>http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#get</action>
<object>
<type>OrgType</type>
</object>
Expand Down
Expand Up @@ -1392,4 +1392,8 @@ th.countLabel{
// Lines will still wrap if they are longer than the default max-width of the container.
.tooltip-inner {
white-space:pre-wrap;
}

.table-striped {
table-layout: fixed; // fix for text in cells
}
Expand Up @@ -62,6 +62,7 @@
</display>
<category>policy</category>
<category>governance</category>
<defaultFor>owner</defaultFor>
</relation>
</relations>
</roleManagement>
Expand Down
Expand Up @@ -698,8 +698,17 @@ public void execute(Connection connection) throws SQLException {
SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl) sessionFactory;
// we try to override configuration which was read from sql repo configuration with
// real configuration from session factory
String dialect = sessionFactoryImpl.getDialect() != null ? sessionFactoryImpl.getDialect().getClass().getName() : null;
details.add(new LabeledString(DETAILS_HIBERNATE_DIALECT, dialect));
if(sessionFactoryImpl.getDialect() != null) {
for(int i =0; i<details.size(); i++) {
if(details.get(i).getLabel().equals(DETAILS_HIBERNATE_DIALECT)) {
details.remove(i);
break;
}
}
String dialect = sessionFactoryImpl.getDialect().getClass().getName();
details.add(new LabeledString(DETAILS_HIBERNATE_DIALECT, dialect));
}

} catch (Throwable th) {
//nowhere to report error (no operation result available)
session.getTransaction().rollback();
Expand Down

0 comments on commit ca2eadf

Please sign in to comment.