Search in sources :

Example 6 with ObjectTabVisibleBehavior

use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.

the class TaskMainPanel method createEnvironmentalPerformanceTab.

private void createEnvironmentalPerformanceTab(List<ITab> tabs, PageTask parentPage) {
    ObjectTabVisibleBehavior<TaskType> envPerfTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_ENVIRONMENTAL_PERFORMANCE_URL, parentPage) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isVisible() {
            return super.isVisible() && parentPage.getTaskTabVisibilty().isEnvironmentalPerformanceVisible();
        }
    };
    tabs.add(new PanelTab(parentPage.createStringResource("pageTask.environmentalPerformance.title"), envPerfTabVisibility) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new TaskPerformanceTabPanel(panelId, getObjectModel());
        }
    });
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ObjectTabVisibleBehavior(com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 7 with ObjectTabVisibleBehavior

use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.

the class TaskMainPanel method createScheduleTab.

private void createScheduleTab(List<ITab> tabs, PageTask parentPage) {
    ObjectTabVisibleBehavior<TaskType> scheduleTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_SCHEDULE_URL, parentPage) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isVisible() {
            return super.isVisible() && parentPage.getTaskTabVisibilty().isSchedulingVisible();
        }
    };
    tabs.add(new PanelTab(parentPage.createStringResource("pageTask.schedule.title"), scheduleTabVisibility) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new SingleContainerPanel<ScheduleType>(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), TaskType.F_SCHEDULE), ScheduleType.COMPLEX_TYPE) {

                @Override
                protected ItemEditabilityHandler getEditabilityHandler() {
                    return TaskMainPanel.this.getTaskEditabilityHandler();
                }
            };
        }
    });
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ItemEditabilityHandler(com.evolveum.midpoint.gui.api.prism.wrapper.ItemEditabilityHandler) ObjectTabVisibleBehavior(com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 8 with ObjectTabVisibleBehavior

use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.

the class TaskMainPanel method createErrorsTab.

private void createErrorsTab(List<ITab> tabs, PageTask parentPage) {
    ObjectTabVisibleBehavior<TaskType> errorsTabVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_ERRORS_URL, parentPage) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isVisible() {
            return super.isVisible() && parentPage.getTaskTabVisibilty().isErrorsVisible();
        }
    };
    tabs.add(new PanelTab(parentPage.createStringResource("pageTask.errors.title"), errorsTabVisibility) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new TaskErrorsTabPanel(panelId, getObjectModel());
        }
    });
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ObjectTabVisibleBehavior(com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 9 with ObjectTabVisibleBehavior

use of com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior in project midpoint by Evolveum.

the class TaskMainPanel method createOperationStatisticsPanel.

private void createOperationStatisticsPanel(List<ITab> tabs, PageTask parentPage) {
    ObjectTabVisibleBehavior<TaskType> operationStatsAndInternalPerfTabsVisibility = new ObjectTabVisibleBehavior<>(Model.of(getObjectWrapper().getObject()), ComponentConstants.UI_TASK_TAB_OPERATION_STATISTICS_URL, parentPage) {

        private static final long serialVersionUID = 1L;

        @Override
        public boolean isVisible() {
            return super.isVisible() && parentPage.getTaskTabVisibilty().isInternalPerformanceVisible();
        }
    };
    tabs.add(new PanelTab(parentPage.createStringResource("pageTask.operationStats.title"), operationStatsAndInternalPerfTabsVisibility) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new ActivitiesStatisticsPanelOld(panelId, getObjectModel());
        }
    });
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ObjectTabVisibleBehavior(com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)9 ObjectTabVisibleBehavior (com.evolveum.midpoint.gui.api.util.ObjectTabVisibleBehavior)9 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)9 ItemEditabilityHandler (com.evolveum.midpoint.gui.api.prism.wrapper.ItemEditabilityHandler)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1