<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%@ taglib prefix="cui" tagdir="/WEB-INF/tags"%>
<script type="text/javascript">
			function arrowClick(groupId){
				if(jQuery("#arrow"+groupId).hasClass("arrow-right")){
					jQuery(".p"+groupId).prop({"style":"display:block"});
					jQuery("#arrow"+groupId).removeClass('arrow-right');
					jQuery("#arrow"+groupId).addClass('arrow-down');
				}else{
					jQuery(".p"+groupId).prop({"style":"display:none"});
					jQuery("#arrow"+groupId).removeClass('arrow-down');
					jQuery("#arrow"+groupId).addClass('arrow-right');
				}
				
			}
		</script>
<div class="header-title table">
	<div class="cell">
		<h1>监控总览</h1>
	</div>
</div>
<div class="table widget-placeholder">
	<div class="row">
		<div class="cell">
			<div class="dashbrd-widget" id="hoststat_widget">

				<table class="list-table" id="t58f082b5a8b82">
					<thead>
						<tr>
							<th>所有主机</th>

						</tr>
					</thead>
					<tbody>

						<c:forEach items="${groups}" var="group">
							<tr>
								<td><span style="padding-left: 0em;"><button
											type="button" class="treeview"
											onclick='arrowClick(${group.groupid})'>
											<span id="arrow${group.groupid}" class="arrow-right"></span>
										</button> ${group.name}</span></td>
							</tr>
							<c:forEach items="${group.hosts}" var="host">
								<tr class="p${group.groupid}" style="display: none;">
									<td><span style="padding-left: 2em;"><a href="#"
											onclick="window.open('host.html?hostid=${host.hostid}')">${host.name}</a></span></td>

								</tr>
							</c:forEach>
						</c:forEach>
					</tbody>
				</table>
			</div>
		</div>
		<div class="cell">
			<div class="dashbrd-widget" id="lastiss_widget">
				<iframe id="map" width="${map.width+100}px"
					height="${map.height+100}px"
					src="../php/zabbix.php?action=map.view2&sysmapid=${map.sysmapid}&fullscreen=1"
					onload="setTimeout('externalLinks()',5000)"></iframe>
			</div>
		</div>
	</div>
</div>


