Package org.apache.geronimo.monitoring.console.data

Examples of org.apache.geronimo.monitoring.console.data.Graph


        try {
            userTransaction.begin();
            try {
                String graphIdString = request.getParameter("graph_id");
                int graphId = Integer.parseInt(graphIdString);
                Graph graph = (Graph) entityManager.createNamedQuery("graphById").setParameter("id", graphId).getSingleResult();
                StatsGraph statsGraph = new GraphsBuilder().getStatsGraph(graph);
                request.setAttribute("statsGraph", statsGraph);
            } finally {
                userTransaction.commit();
            }
View Full Code Here


        try {
            userTransaction.begin();
            try {
                String graphIdString = request.getParameter("graph_id");
                int graphId = Integer.parseInt(graphIdString);
                Graph graph = (Graph) entityManager.createNamedQuery("graphById").setParameter("id", graphId).getSingleResult();
                StatsGraph statsGraph = new GraphsBuilder().getStatsGraph(graph);
                request.setAttribute("statsGraph", statsGraph);
            } finally {
                userTransaction.commit();
            }
View Full Code Here

        try {
            userTransaction.begin();
            try {
                String graphIdString = request.getParameter("graph_id");
                int graphId = Integer.parseInt(graphIdString);
                Graph graph = entityManager.find(Graph.class, graphId);
                request.setAttribute("graph", graph);
            } finally {
                userTransaction.commit();
            }
        } catch (Exception e) {
View Full Code Here

               
                String[] graphsArray = actionRequest.getParameterValues("graph_ids");
                if (graphsArray != null) {
                    for (String graphIdString: graphsArray) {
                        int graphId = Integer.parseInt(graphIdString);
                        Graph graph = entityManager.find(Graph.class, graphId);
                        view.getGraphs().add(graph);
                        graph.getViews().add(view);
                    }
                }
            } finally {
                userTransaction.commit();
            }
View Full Code Here

                view.setDescription(actionRequest.getParameter("minxss_description"));
                String[] graphsArray = actionRequest.getParameterValues("graph_ids");
                if (graphsArray != null) {
                    for (String graphIdString: graphsArray) {
                        int graphId = Integer.parseInt(graphIdString);
                        Graph graph = entityManager.find(Graph.class, graphId);
                        view.getGraphs().add(graph);
                        graph.getViews().add(view);
                    }
                }
                entityManager.persist(view);
            } finally {
                userTransaction.commit();
View Full Code Here

        }
    }

    private void addGraph(ActionRequest actionRequest,
                          ActionResponse actionResponse) {
        Graph graph = new Graph();

        updateGraphFromRequest(actionRequest, graph);
        try {
            userTransaction.begin();
            try {
                Node node = entityManager.find(Node.class, actionRequest.getParameter("server_id"));
                graph.setNode(node);
                entityManager.persist(graph);
            } finally {
                userTransaction.commit();
            }
            addInfoMessage(actionRequest, getLocalizedString(actionRequest, "mconsole.infoMsg14", graph.getGraphName1()));
        } catch (Exception e) {
          addErrorMessage(actionRequest, getLocalizedString(actionRequest, "mconsole.errorMsg17"), e.getMessage());
        }
    }
View Full Code Here

        String graph_id = actionRequest.getParameter("graph_id");
        actionResponse.setRenderParameter("graph_id", graph_id);
        try {
            userTransaction.begin();
            try {
                Graph graph = entityManager.find(Graph.class, Integer.parseInt(graph_id));
                Node node = entityManager.find(Node.class, actionRequest.getParameter("server_id"));
                graph.setNode(node);
                updateGraphFromRequest(actionRequest, graph);
                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "mconsole.infoMsg15", graph.getGraphName1()));
            } finally {
                userTransaction.commit();
            }

        } catch (Exception e) {
View Full Code Here

        String graph_id = actionRequest.getParameter("graph_id");
        actionResponse.setRenderParameter("graph_id", graph_id);
        try {
            userTransaction.begin();
            try {
                Graph graph = entityManager.find(Graph.class, Integer.parseInt(graph_id));
                entityManager.remove(graph);
                addInfoMessage(actionRequest, getLocalizedString(actionRequest, "mconsole.infoMsg16", graph.getGraphName1()));
            } finally {
                userTransaction.commit();
            }

        } catch (Exception e) {
View Full Code Here

        return node;
    }
   
    private Graph createGraph(Node node, String name, String description, String timeframe, String mbean, String dataname1, String xlabel, String ylabel, String data1operation, String operation,
            String data2operation, String dataname2, String showArchive) throws Exception {
        Graph graph = new Graph();
        graph.setNode(node);
        graph.setGraphName1(name);
        graph.setDescription(description);
        graph.setXlabel(xlabel);
        graph.setYlabel(ylabel);
        graph.setTimeFrame(Integer.parseInt(timeframe));
        graph.setMBeanName(mbean);
        graph.setDataName1(dataname1);
        graph.setData1operation(data1operation.charAt(0));
        graph.setOperation(operation);
        graph.setShowArchive(showArchive != null && showArchive.equals("on"));
        graph.setDataName2(dataname2);
        graph.setData2operation(data2operation == null ? 'A' : data2operation.charAt(0));
        return graph;
    }
View Full Code Here

        try {
            userTransaction.begin();
            try {
                String graphIdString = request.getParameter("graph_id");
                int graphId = Integer.parseInt(graphIdString);
                Graph graph = (Graph) entityManager.createNamedQuery("graphById").setParameter("id", graphId).getSingleResult();
                StatsGraph statsGraph = new GraphsBuilder().getStatsGraph(graph);
                request.setAttribute("statsGraph", statsGraph);
            } finally {
                userTransaction.commit();
            }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.monitoring.console.data.Graph

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.