Examples of Dashboard


Examples of org.jboss.dashboard.ui.Dashboard

    // 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

Examples of org.jboss.dashboard.ui.Dashboard

        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

Examples of org.jboss.dashboard.ui.Dashboard

    // 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

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

Examples of org.jboss.dashboard.ui.Dashboard

     * @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

Examples of org.jboss.dashboard.ui.Dashboard

        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

Examples of org.jboss.dashboard.ui.Dashboard

            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

Examples of org.jboss.dashboard.ui.Dashboard

        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

Examples of org.jboss.dashboard.ui.Dashboard

    protected Command createCommand(String commandName) {
        Command command = super.createCommand(commandName);
        if (command != null && RequestContext.lookup() != null) {

            // Pass the current dashboard filter to the command.
            Dashboard dashboard = DashboardHandler.lookup().getCurrentDashboard();
            command.setDataFilter(dashboard.getDashboardFilter());

        }
        return command;
    }
View Full Code Here

Examples of org.jboss.dashboard.ui.Dashboard

            Object minValue = result[1];
            Object maxValue = result[2];
            if (allowedValues == null && minValue == null && maxValue == null) continue;

            // Set the filter with this property.
            Dashboard currentDashboard = DashboardHandler.lookup().getCurrentDashboard();
            if (currentDashboard.filter(dashboardFilterProperty.getPropertyId(), minValue, true, maxValue, true, allowedValues, FilterByCriteria.ALLOW_ANY)) {
                return new ShowCurrentScreenResponse();
            }
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.