<%-- 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.Node" %>
<% 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(node.isEnabled()) { // enable the links if(request.isUserInRole("admin")){ %> <% }//end admin } else { // do not provide links if(request.isUserInRole("admin")){ %> <% }//end admin } if(request.isUserInRole("admin")){ %> <%}//end admin } else if (collecting == -1) { // not collecting statistics %> <% if(node.isEnabled()) { // enable the links if(request.isUserInRole("admin")){ %> <% }//end admin } else { // do not provide links if(request.isUserInRole("admin")){ %> <% }//end admin } if(request.isUserInRole("admin")){ %> <%}//end admin } else { // collecting statistics if (node.isEnabled()) { %> <%if(request.isUserInRole("admin")){ %> <%}//end admin } else { %> <%if(request.isUserInRole("admin")){ %> <% }//end admin } } if(node.isEnabled()) { // enabled server if(request.isUserInRole("admin")){ %> <%}//end admin } else { // disabled server if(request.isUserInRole("admin")){ %> <%}//end admin } %> <%} %>
/
"><%=node.getName()%> "><%=node.getHost()%><%=node.getName()%> <%=node.getHost()%>Offline()">Enable QueryEnable Query">EditDisable QueryEnable Query">Edit<%=snapshotDuration/1000/60+" min. (running)"%>">Disable Query ">EditDisable Query ">Edit">Disable">Enable
<%if(request.isUserInRole("admin")){ %> <%} %>