-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/master'
- Loading branch information
Showing
61 changed files
with
927 additions
and
536 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
.../evolveum/midpoint/gui/impl/page/admin/systemconfiguration/component/MailServerPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- | ||
~ Copyright (c) 2022 Evolveum and contributors | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:wicket="http://wicket.apache.org"> | ||
<body> | ||
<wicket:panel> | ||
<div class="row no-gutters mb-3"> | ||
<div class="col-xl-2 col-md-4 col-xs-12 prism-property-label">Host</div> | ||
<div class="prism-property-value col-xl-10 col-md-8 col-xs-12" wicket:id="host"/> | ||
</div> | ||
<div class="row no-gutters mb-3"> | ||
<div class="col-xl-2 col-md-4 col-xs-12 prism-property-label">Port</div> | ||
<div class="prism-property-value col-xl-10 col-md-8 col-xs-12" wicket:id="port"/> | ||
</div> | ||
<div class="row no-gutters mb-3"> | ||
<div class="col-xl-2 col-md-4 col-xs-12 prism-property-label">Username</div> | ||
<div class="prism-property-value col-xl-10 col-md-8 col-xs-12" wicket:id="username"/> | ||
</div> | ||
<div class="row no-gutters mb-3"> | ||
<div class="col-xl-2 col-md-4 col-xs-12 prism-property-label">Password</div> | ||
<div class="prism-property-value col-xl-10 col-md-8 col-xs-12" wicket:id="password"/> | ||
</div> | ||
</wicket:panel> | ||
</body> | ||
</html> |
69 changes: 69 additions & 0 deletions
69
.../evolveum/midpoint/gui/impl/page/admin/systemconfiguration/component/MailServerPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.page.admin.systemconfiguration.component; | ||
|
||
import org.apache.wicket.markup.html.form.FormComponent; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.PropertyModel; | ||
|
||
import com.evolveum.midpoint.gui.api.component.password.PasswordPanel; | ||
import com.evolveum.midpoint.gui.api.model.LoadableModel; | ||
import com.evolveum.midpoint.web.component.input.TextPanel; | ||
import com.evolveum.midpoint.web.component.prism.InputPanel; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.MailServerConfigurationType; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class MailServerPanel extends InputPanel { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_HOST = "host"; | ||
private static final String ID_PORT = "port"; | ||
private static final String ID_USERNAME = "username"; | ||
private static final String ID_PASSWORD = "password"; | ||
|
||
private IModel<MailServerConfigurationType> model; | ||
|
||
public MailServerPanel(String id, IModel<MailServerConfigurationType> model) { | ||
super(id); | ||
|
||
this.model = new LoadableModel<>() { | ||
|
||
@Override | ||
protected MailServerConfigurationType load() { | ||
if (model == null) { | ||
return new MailServerConfigurationType(); | ||
} | ||
|
||
MailServerConfigurationType config = model.getObject(); | ||
|
||
return config != null ? config : new MailServerConfigurationType(); | ||
} | ||
}; | ||
|
||
initLayout(); | ||
} | ||
|
||
public IModel<MailServerConfigurationType> getModel() { | ||
return model; | ||
} | ||
|
||
private void initLayout() { | ||
add(new TextPanel<>(ID_HOST, new PropertyModel<>(model, MailServerConfigurationType.F_HOST.getLocalPart()))); | ||
add(new TextPanel<>(ID_PORT, new PropertyModel<>(model, MailServerConfigurationType.F_PORT.getLocalPart()))); | ||
add(new TextPanel<>(ID_USERNAME, new PropertyModel<>(model, MailServerConfigurationType.F_USERNAME.getLocalPart()))); | ||
add(new PasswordPanel(ID_PASSWORD, new PropertyModel<>(model, MailServerConfigurationType.F_PASSWORD.getLocalPart()))); | ||
} | ||
|
||
@Override | ||
public FormComponent getBaseFormComponent() { | ||
return ((TextPanel) get(ID_HOST)).getBaseFormComponent(); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...um/midpoint/gui/impl/page/admin/systemconfiguration/component/MailServerPanelFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
|
||
package com.evolveum.midpoint.gui.impl.page.admin.systemconfiguration.component; | ||
|
||
import javax.annotation.PostConstruct; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper; | ||
import com.evolveum.midpoint.gui.impl.factory.panel.AbstractInputGuiComponentFactory; | ||
import com.evolveum.midpoint.gui.impl.factory.panel.PrismPropertyPanelContext; | ||
import com.evolveum.midpoint.web.component.prism.InputPanel; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.MailServerConfigurationType; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
@Component | ||
public class MailServerPanelFactory extends AbstractInputGuiComponentFactory<MailServerConfigurationType> { | ||
|
||
@PostConstruct | ||
public void register() { | ||
getRegistry().addToRegistry(this); | ||
} | ||
|
||
@Override | ||
public <IW extends ItemWrapper<?, ?>> boolean match(IW wrapper) { | ||
return MailServerConfigurationType.COMPLEX_TYPE.equals(wrapper.getTypeName()); | ||
} | ||
|
||
@Override | ||
protected InputPanel getPanel(PrismPropertyPanelContext<MailServerConfigurationType> panelCtx) { | ||
return new MailServerPanel(panelCtx.getComponentId(), panelCtx.getRealValueModel()); | ||
} | ||
} |
Oops, something went wrong.