Package org.jboss.dashboard.ui

Examples of org.jboss.dashboard.ui.Dashboard


        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        for (String workspaceId : selectedSectionIds.keySet()) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            Set<Section> sections = getSelectedSections(workspace);
            for (Section section : sections) {
                Dashboard dash = dashboardHandler.getDashboard(section);
                Iterator it = section.getPanels().iterator();
                while (it.hasNext()) {
                    KPI kpi = dash.getKPI((Panel) it.next());
                    if (kpi != null && !results.contains(kpi)) results.add(kpi);
                }
            }
        }
        final Locale l = LocaleManager.currentLocale();
View Full Code Here


        tp.processTemplate(html, cp);
        List<Command> commandList = cp.getSuccessfulCommands();
        if (commandList.isEmpty()) return results;

        // Get the data providers used by the commands.
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Set<DataProvider> dataProviders = dashboard.getDataProviders();
        for (DataProvider dataProvider : dataProviders) {
            DataProperty[] dataProperties = dataProvider.getDataSet().getProperties();
            for (int i = 0; i < dataProperties.length; i++) {
                DataProperty dataProperty = dataProperties[i];
                for (Command command : commandList) {
View Full Code Here

    // DashboardDriver interface

    public Set<DataProvider> getDataProvidersUsed(Panel panel) throws Exception {
        Set<DataProvider> results = new HashSet<DataProvider>();
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        DashboardFilterHandler handler = dashboard.getDashboardFilter().getHandler(panel);
        if (handler == null) return results; // It happens on drill down.

        for (DashboardFilterProperty filterProperty : handler.getVisibleProperties()) {
            DataProvider dataProvider = filterProperty.getDataProperty().getDataSet().getDataProvider();
            results.add(dataProvider);
View Full Code Here

        TemplateProcessor tp = DataProviderServices.lookup().getTemplateProcessor();
        tp.processTemplate(html, cp);
        List<Command> commandList = cp.getSuccessfulCommands();

        // Get the data providers used by the commands.
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Set<DataProvider> dataProviders = dashboard.getDataProviders();
        for (DataProvider dataProvider : dataProviders) {
            DataProperty[] dataProperties = dataProvider.getDataSet().getProperties();
            for (int i = 0; i < dataProperties.length; i++) {
                DataProperty dataProperty = dataProperties[i];
                for (Command command : commandList) {
View Full Code Here

    // DashboardDriver interface

    public Set<DataProvider> getDataProvidersUsed(Panel panel) throws Exception {
        Set<DataProvider> results = new HashSet<DataProvider>();
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        DashboardFilterHandler handler = dashboard.getDashboardFilter().getHandler(panel);
        for (DashboardFilterProperty filterProperty : handler.getVisibleProperties()) {
            DataProvider dataProvider = filterProperty.getDataProperty().getDataSet().getDataProvider();
            results.add(dataProvider);
        }
        return results;
View Full Code Here

        DashboardHandler dashboardHandler = DashboardHandler.lookup();
        for (String workspaceId : selectedSectionIds.keySet()) {
            WorkspaceImpl workspace = (WorkspaceImpl) UIServices.lookup().getWorkspacesManager().getWorkspace(workspaceId);
            Set<Section> sections = getSelectedSections(workspace);
            for (Section section : sections) {
                Dashboard dash = dashboardHandler.getDashboard(section);
                Iterator it = section.getPanels().iterator();
                while (it.hasNext()) {
                    KPI kpi = dash.getKPI((Panel) it.next());
                    if (kpi != null && !results.contains(kpi)) results.add(kpi);
                }
            }
        }
        final Locale l = LocaleManager.currentLocale();
View Full Code Here

     * @return If request must be processed. Always <code>true</code>
     * @throws Exception An error while processing request.
     */
    @Override
    protected boolean processRequest() throws Exception {
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        if (dashboard != null) {
            String refresh = getRequest().getParameter(PARAM_REFRESH);
            boolean isRefresh = toBoolean(refresh);
            if (isRefresh) dashboard.refresh();
        }

        // Handle embedded mode.
        String embedded = getRequest().getParameter(PARAM_EMBEDDED);
        if (embedded == null) embedded = getRequest().getParameter(PARAM_EMBEDDED2);
View Full Code Here

        int rowIndex = Integer.parseInt(request.getRequestObject().getParameter("rowindex"));
        int columnIndex = Integer.parseInt(request.getRequestObject().getParameter("columnindex"));

        DataSetTable dataSetTable = (DataSetTable) getTable();
        DataProperty selectedProperty = dataSetTable.getDataProperty(columnIndex);
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Object selectedValue = dataSetTable.getValueAt(rowIndex, columnIndex);
        if (selectedValue instanceof Interval) {
            if (dashboard.filter(selectedProperty.getPropertyId(), (Interval) selectedValue, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        } else {
            Collection values = new ArrayList();
            values.add(selectedValue);
            if (dashboard.filter(selectedProperty.getPropertyId(), null, false, null, false, values, FilterByCriteria.ALLOW_ANY)) {
                // If drill-down then force the whole screen to be refreshed.
                return new ShowCurrentScreenResponse();
            }
        }
        return null;
View Full Code Here

            AbstractChartDisplayer abstractChartDisplayer = (AbstractChartDisplayer) getDataDisplayer();
            DataProperty property = abstractChartDisplayer.getDomainProperty();
            Integer series = Integer.decode(request.getRequestObject().getParameter(PARAM_NSERIE));
            DataSet dataSet = abstractChartDisplayer.buildXYDataSet();
            Interval interval = (Interval) dataSet.getValueAt(series, 0);
            Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
            if (dashboard.filter(property.getPropertyId(), interval, FilterByCriteria.ALLOW_ANY)) {
                return new ShowCurrentScreenResponse();
            }
        } catch (Exception e) {
            log.error("Cannot apply filter.",e);
        }
View Full Code Here

        tp.processTemplate(html, cp);
        List<Command> commandList = cp.getSuccessfulCommands();
        if (commandList.isEmpty()) return results;

        // Get the data providers used by the commands.
        Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
        Set<DataProvider> dataProviders = dashboard.getDataProviders();
        for (DataProvider dataProvider : dataProviders) {
            DataProperty[] dataProperties = dataProvider.getDataSet().getProperties();
            for (DataProperty dataProperty : dataProperties) {
                for (Command command : commandList) {
                    if (command.containsProperty(dataProperty.getPropertyId())) {
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.Dashboard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.