Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Evolveum/midpoint
- Loading branch information
Showing
40 changed files
with
1,209 additions
and
1,919 deletions.
There are no files selected for viewing
492 changes: 254 additions & 238 deletions
492
gui/admin-gui/src/main/java/com/evolveum/midpoint/gui/api/component/DisplayNamePanel.java
Large diffs are not rendered by default.
Oops, something went wrong.
1,026 changes: 519 additions & 507 deletions
1,026
...um/midpoint/gui/impl/page/admin/configuration/component/LoggingConfigurationTabPanel.java
Large diffs are not rendered by default.
Oops, something went wrong.
150 changes: 75 additions & 75 deletions
150
.../com/evolveum/midpoint/gui/impl/page/admin/configuration/component/SystemConfigPanel.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 |
---|---|---|
@@ -1,75 +1,75 @@ | ||
/* | ||
* Copyright (c) 2018 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.configuration.component; | ||
|
||
import com.evolveum.midpoint.gui.impl.prism.ItemPanelSettingsBuilder; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; | ||
import org.apache.wicket.markup.html.panel.Panel; | ||
import org.apache.wicket.model.IModel; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.gui.api.prism.ItemWrapper; | ||
import com.evolveum.midpoint.gui.api.prism.PrismObjectWrapper; | ||
import com.evolveum.midpoint.prism.path.ItemPath; | ||
import com.evolveum.midpoint.util.exception.SchemaException; | ||
import com.evolveum.midpoint.util.logging.Trace; | ||
import com.evolveum.midpoint.util.logging.TraceManager; | ||
import com.evolveum.midpoint.web.component.prism.ItemVisibility; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType; | ||
|
||
/** | ||
* @author skublik | ||
*/ | ||
public class SystemConfigPanel extends BasePanel<PrismObjectWrapper<SystemConfigurationType>> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final Trace LOGGER = TraceManager.getTrace(SystemConfigPanel.class); | ||
|
||
private static final String ID_SYSTEM_CONFIG = "basicSystemConfiguration"; | ||
|
||
|
||
public SystemConfigPanel(String id, IModel<PrismObjectWrapper<SystemConfigurationType>> model) { | ||
super(id, model); | ||
|
||
setOutputMarkupId(true); | ||
|
||
} | ||
|
||
@Override | ||
protected void onInitialize() { | ||
super.onInitialize(); | ||
|
||
initLayout(); | ||
} | ||
|
||
protected void initLayout() { | ||
try { | ||
ItemPanelSettingsBuilder builder = new ItemPanelSettingsBuilder().visibilityHandler(itemWrapper -> getBasicTabVisibity(itemWrapper)); | ||
Panel panel = getPageBase().initItemPanel(ID_SYSTEM_CONFIG, SystemConfigurationType.COMPLEX_TYPE, getModel(), builder.build()); | ||
add(panel); | ||
} catch (SchemaException e) { | ||
LOGGER.error("Cannot create basic panel for system configuration."); | ||
getSession().error("Cannot create basic panel for system configuration."); | ||
} | ||
|
||
} | ||
|
||
private ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?, ?, ?> itemWrapper) { | ||
if(itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create(ItemPath.EMPTY_PATH, SystemConfigurationType.F_DESCRIPTION)) || itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create( | ||
ItemPath.EMPTY_PATH, SystemConfigurationType.F_GLOBAL_SECURITY_POLICY_REF))) { | ||
return ItemVisibility.AUTO; | ||
} | ||
|
||
if(itemWrapper.getPath().isSuperPathOrEquivalent(ItemPath.create(ObjectType.F_EXTENSION))) { | ||
return ItemVisibility.AUTO; | ||
} | ||
|
||
return ItemVisibility.HIDDEN; | ||
} | ||
} | ||
/* | ||
* Copyright (c) 2018 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.configuration.component; | ||
|
||
import com.evolveum.midpoint.gui.impl.prism.ItemPanelSettingsBuilder; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType; | ||
import org.apache.wicket.markup.html.panel.Panel; | ||
import org.apache.wicket.model.IModel; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.gui.api.prism.ItemWrapper; | ||
import com.evolveum.midpoint.gui.api.prism.PrismObjectWrapper; | ||
import com.evolveum.midpoint.prism.path.ItemPath; | ||
import com.evolveum.midpoint.util.exception.SchemaException; | ||
import com.evolveum.midpoint.util.logging.Trace; | ||
import com.evolveum.midpoint.util.logging.TraceManager; | ||
import com.evolveum.midpoint.web.component.prism.ItemVisibility; | ||
import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType; | ||
|
||
/** | ||
* @author skublik | ||
*/ | ||
public class SystemConfigPanel extends BasePanel<PrismObjectWrapper<SystemConfigurationType>> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final Trace LOGGER = TraceManager.getTrace(SystemConfigPanel.class); | ||
|
||
private static final String ID_SYSTEM_CONFIG = "basicSystemConfiguration"; | ||
|
||
|
||
public SystemConfigPanel(String id, IModel<PrismObjectWrapper<SystemConfigurationType>> model) { | ||
super(id, model); | ||
|
||
setOutputMarkupId(true); | ||
|
||
} | ||
|
||
@Override | ||
protected void onInitialize() { | ||
super.onInitialize(); | ||
|
||
initLayout(); | ||
} | ||
|
||
protected void initLayout() { | ||
try { | ||
ItemPanelSettingsBuilder builder = new ItemPanelSettingsBuilder().visibilityHandler(this::getBasicTabVisibity); | ||
Panel panel = getPageBase().initItemPanel(ID_SYSTEM_CONFIG, SystemConfigurationType.COMPLEX_TYPE, getModel(), builder.build()); | ||
add(panel); | ||
} catch (SchemaException e) { | ||
LOGGER.error("Cannot create basic panel for system configuration."); | ||
getSession().error("Cannot create basic panel for system configuration."); | ||
} | ||
|
||
} | ||
|
||
private ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?, ?, ?> itemWrapper) { | ||
if(itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create(ItemPath.EMPTY_PATH, SystemConfigurationType.F_DESCRIPTION)) || itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create( | ||
ItemPath.EMPTY_PATH, SystemConfigurationType.F_GLOBAL_SECURITY_POLICY_REF))) { | ||
return ItemVisibility.AUTO; | ||
} | ||
|
||
if(itemWrapper.getPath().isSuperPathOrEquivalent(ItemPath.create(ObjectType.F_EXTENSION))) { | ||
return ItemVisibility.AUTO; | ||
} | ||
|
||
return ItemVisibility.HIDDEN; | ||
} | ||
} |
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
Oops, something went wrong.