<%-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="/WEB-INF/CommonMsg.tld" prefix="CommonMsg"%> <%@ page import="java.util.List" %> <%@ page import="org.apache.geronimo.monitoring.console.MRCConnector" %> <%@ page import="org.apache.geronimo.monitoring.console.data.Graph" %> <%@ page import="org.apache.geronimo.monitoring.console.data.Node" %> <%@ page import="org.apache.geronimo.monitoring.console.data.View" %> <%if (request.isUserInRole("admin")){ %>
Note: To reset default servers/views/graphs, please click this link:   " onclick="return confirm_del()">
<%} %>
: <%----%> <%----%> <% List views = (List) request.getAttribute("views"); for (View view: views) { %> <%----%> <%----%> <%if(request.isUserInRole("admin")){ %> <%} %> <% } // rs.close(); %>
"><%=view.getName()%> <%="" + view.getGraphs().size()%><%=rs.getString("added").substring(0,16)%><%=rs.getString("modified").substring(0,16)%>">Edit
<% if (request.isUserInRole("admin")) {%>
">Create View
<% }%> : <% List nodes = (List) request.getAttribute("nodes"); for (Node node: nodes) { boolean online = false; Integer collecting = 0; MRCConnector mrc = null; Long snapshotDuration = new Long(0); if (node.isEnabled()) { try { mrc = new MRCConnector(node); online = true; } catch (Exception e) { online = false; } try { snapshotDuration = mrc.getSnapshotDuration(); collecting = mrc.isSnapshotRunning(); } catch (Exception e) { collecting = 0; online = false; } if(null != mrc) mrc.dispose(); } %> <% if(node.isEnabled()){ %> <% } else{ %> <% } if (online) { // online %> <% } else if(node.isEnabled()){ // offline %> <% } else { // Disabled %> <% } if (collecting == 0) { // not collecting statistics %> <%if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enable the links %> <% } else { // do not provide links %> <% } %> <% } //end admin } else if (collecting == -1) { // not collecting statistics %> <%if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enable the links %> <% } else { // do not provide links %> <% } %> <% }//end admin } else { // collecting statistics if (node.isEnabled()) { %> <% if (request.isUserInRole("admin")) {%> <% }//end admin } else { %> <% if (request.isUserInRole("admin")) {%> <% } } } if (request.isUserInRole("admin")) { if(node.isEnabled()) { // enabled server %> <% } else { // disabled server %> <% } }//end admin %> <%} %>
/
"><%=node.getName()%> "><%=node.getHost()%><%=node.getName()%> <%=node.getHost()%>Offline()">Enable QueryEnable Query">Edit Disable QueryDisable Query">Edit<%=snapshotDuration/1000/60+" min. "%>()">Disable Query ">EditDisable Query ">Edit">Disable">Enable
<%if (request.isUserInRole("admin")) {%>
">Add Server
<% } %> : <% List graphs = (List) request.getAttribute("graphs"); for (Graph graph: graphs) { %> <% if (graph.getNode().isEnabled()) { %> <%if(request.isUserInRole("admin")){ %> <%} } else { %> <%if(request.isUserInRole("admin")){ %> <% } %><% }%> <%} %>
<%=graph.getGraphName1() %> "><%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%>">Edit<%=graph.getGraphName1()%> <%=graph.getNode().getName()%> <%=graph.getTimeFrame()%> <%=graph.getDataName1()%><%if (graph.getOperation() != null && !graph.getOperation().equals("null")){%><%=graph.getOperation()%><%}%><%if (graph.getDataName2() != null && !graph.getDataName2().equals("null")){%><%=graph.getDataName2()%><%}%>Edit
<% if (request.isUserInRole("admin")) {%>
">Add Graph
<%}%>