<nav class="navbar navbar-default navbar-fixed-top">
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar_menus" aria-expanded="false">
		        <span class="sr-only">切换导航</span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
		        <span class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="/" onclick="return false;"><strong>RedisDog</strong></a>
		</div>
		<div class="collapse navbar-collapse" id="navbar_menus">
			<ul class="nav navbar-nav">
				<li class="{{if or (eq .Req.URL.Path "/") (eq .Req.URL.Path "/index")}}active{{end}}">
					<a class="" href="/index"><i class="glyphicon glyphicon-home"></i>&nbsp;首页</a>
				</li>
				<li class="ropdown {{if has_prefix .Req.URL.Path "/log/"}}active{{end}}">
					<a class="dropdown-toggle" href="#" id="nav_log" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
						<i class="glyphicon glyphicon-info-sign"></i>&nbsp;日志查看&nbsp;<span class="caret"></span>
					</a>
					<ul class="dropdown-menu" aria-labelledby="nav_log">
						<li><a class="{{if eq .Req.URL.Path "/log/monitor"}}active{{end}}" href="/log/monitor">Redis监控日志</a></li>
						<li><a class="{{if eq .Req.URL.Path "/log/warn"}}active{{end}}" href="/log/warn">Redis报警日志</a></li>
						<li><a class="{{if eq .Req.URL.Path "/log/autoprocess"}}active{{end}}" href="/log/autoprocess">Redis扩容日志</a></li>
						<li><a class="{{if eq .Req.URL.Path "/log/syslog"}}active{{end}}" href="/log/syslog">系统日志</a></li>
					</ul>
				</li>
				<li class="dropdown {{if has_prefix .Req.URL.Path "/syscfg/"}}active{{end}}">
					<a class="dropdown-toggle" href="#" id="nav_syscfg" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
						<i class="glyphicon glyphicon-cog"></i>&nbsp;系统管理&nbsp;<span class="caret"></span>
					</a>
					<ul class="dropdown-menu" aria-labelledby="nav_syscfg">
						<li><a class="{{if eq .Req.URL.Path "/syscfg/redis"}}active{{end}}" href="/syscfg/redis">Redis列表管理</a></li>
						{{if .Sess.Account.IsSuper}}
						<li><a class="{{if eq .Req.URL.Path "/syscfg/warn"}}active{{end}}" href="/syscfg/warn">报警配置</a></li>
						<li><a class="{{if eq .Req.URL.Path "/syscfg/account"}}active{{end}}" href="/syscfg/account">账号管理</a></li>
						<li><a class="{{if eq .Req.URL.Path "/syscfg/misc"}}active{{end}}" href="/syscfg/misc">其它配置</a></li>
						{{end}}
					</ul>
				</li>
			</ul>
			<ul class="nav navbar-nav navbar-right">
				<li class="nav-item dropdown {{if has_prefix .Req.URL.Path "/profile/"}}active{{end}}">
					<a class="dropdown-toggle" href="#" id="nav_profile" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;{{.Sess.Account.Name}}&nbsp;({{.Sess.Account.Account}})&nbsp;<span class="caret"></span>
					</a>
					<ul class="dropdown-menu" aria-labelledby="nav_profile">
						<li><a class="{{if eq .Req.URL.Path "/profile/passwd"}}active{{end}}" href="/profile/passwd">修改密码</a></li>
						<li><a class="{{if eq .Req.URL.Path "/profile/logout"}}active{{end}}" href="/profile/logout">退出登录</a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
</nav>
