Search in sources :

Example 1 with DashboardOverviewPanel

use of org.apache.syncope.client.console.panels.DashboardOverviewPanel in project syncope by apache.

the class Dashboard method buildTabList.

private List<ITab> buildTabList() {
    final List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(new ResourceModel("overview")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardOverviewPanel(panelId);
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("accessTokens")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardAccessTokensPanel(panelId, getPageReference());
        }
    });
    tabs.add(new AbstractTab(new ResourceModel("control")) {

        private static final long serialVersionUID = -6815067322125799251L;

        @Override
        public Panel getPanel(final String panelId) {
            return new DashboardControlPanel(panelId, getPageReference());
        }
    });
    ClassPathScanImplementationLookup classPathScanImplementationLookup = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get().getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP);
    final List<Class<? extends BaseExtWidget>> extWidgetClasses = classPathScanImplementationLookup.getExtWidgetClasses();
    if (!extWidgetClasses.isEmpty()) {
        tabs.add(new AbstractTab(new ResourceModel("extensions")) {

            private static final long serialVersionUID = -6815067322125799251L;

            @Override
            public Panel getPanel(final String panelId) {
                return new DashboardExtensionsPanel(panelId, extWidgetClasses, getPageReference());
            }
        });
    }
    return tabs;
}
Also used : DashboardAccessTokensPanel(org.apache.syncope.client.console.panels.DashboardAccessTokensPanel) ArrayList(java.util.ArrayList) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) DashboardExtensionsPanel(org.apache.syncope.client.console.panels.DashboardExtensionsPanel) DashboardExtensionsPanel(org.apache.syncope.client.console.panels.DashboardExtensionsPanel) AjaxBootstrapTabbedPanel(de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel) Panel(org.apache.wicket.markup.html.panel.Panel) DashboardOverviewPanel(org.apache.syncope.client.console.panels.DashboardOverviewPanel) DashboardAccessTokensPanel(org.apache.syncope.client.console.panels.DashboardAccessTokensPanel) DashboardControlPanel(org.apache.syncope.client.console.panels.DashboardControlPanel) DashboardOverviewPanel(org.apache.syncope.client.console.panels.DashboardOverviewPanel) ClassPathScanImplementationLookup(org.apache.syncope.client.console.init.ClassPathScanImplementationLookup) DashboardControlPanel(org.apache.syncope.client.console.panels.DashboardControlPanel) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab) ResourceModel(org.apache.wicket.model.ResourceModel) BaseExtWidget(org.apache.syncope.client.console.widgets.BaseExtWidget)

Aggregations

AjaxBootstrapTabbedPanel (de.agilecoders.wicket.core.markup.html.bootstrap.tabs.AjaxBootstrapTabbedPanel)1 ArrayList (java.util.ArrayList)1 ClassPathScanImplementationLookup (org.apache.syncope.client.console.init.ClassPathScanImplementationLookup)1 DashboardAccessTokensPanel (org.apache.syncope.client.console.panels.DashboardAccessTokensPanel)1 DashboardControlPanel (org.apache.syncope.client.console.panels.DashboardControlPanel)1 DashboardExtensionsPanel (org.apache.syncope.client.console.panels.DashboardExtensionsPanel)1 DashboardOverviewPanel (org.apache.syncope.client.console.panels.DashboardOverviewPanel)1 BaseExtWidget (org.apache.syncope.client.console.widgets.BaseExtWidget)1 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 Panel (org.apache.wicket.markup.html.panel.Panel)1 ResourceModel (org.apache.wicket.model.ResourceModel)1