MailHog/MailHog-UI/assets/templates/layout.html

147 lines
5.2 KiB
HTML
Raw Normal View History

2014-04-20 14:35:59 +00:00
<!DOCTYPE html>
<html ng-app="mailhogApp">
<head>
<title>MailHog</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
2014-04-20 14:35:59 +00:00
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.15/angular.js"></script>
2014-11-01 22:38:39 +00:00
<script src="/js/strutil.js"></script>
2014-04-20 14:35:59 +00:00
<script src="/js/controllers.js"></script>
<style>
2014-04-26 12:12:26 +00:00
body, html { height: 100%; overflow: hidden; }
2014-04-20 14:35:59 +00:00
.navbar {
margin-bottom: 0;
position: absolute;
top: 0;
right: 0;
width: 100%;
2014-04-26 13:43:54 +00:00
border-bottom: 1px solid #ccc;
2014-04-20 14:35:59 +00:00
}
.navbar-header img {
height: 35px;
margin: 8px 0 0 5px;
float: left;
}
.navbar-nav.navbar-right:last-child {
margin-right: 0; /* bootstrap fix?! */
}
2014-04-27 17:19:30 +00:00
.ajax-loader {
background: url('/images/ajax-loader.gif');
width: 16px;
height: 16px;
display: inline-block;
}
.ajax-event {
padding: 5px;
2014-04-27 17:34:28 +00:00
width: 225px;
2014-04-27 17:19:30 +00:00
}
.ajax-event h1 {
font-size: 1em;
padding: 2px;
margin: 0;
2014-04-27 18:06:27 +00:00
padding-left: 20px;
2014-04-27 17:19:30 +00:00
}
.ajax-event h2 {
font-size: 0.8em;
padding: 2px;
margin: 0;
2014-04-27 18:06:27 +00:00
padding-left: 20px;
}
.ajax-event .glyphicon {
float: left;
padding: 1px;
color: #666;
2014-04-27 17:19:30 +00:00
}
2014-04-27 17:34:28 +00:00
2014-04-27 18:13:22 +00:00
.dropdown-menu .glyphicon {
padding: 1px;
margin-right: 5px;
color: #666;
}
.dropdown-menu > li > a {
padding: 3px 10px;
}
2014-04-27 17:58:00 +00:00
/* http://stackoverflow.com/questions/18838964/add-bootstrap-glyphicon-to-input-box */
.left-inner-addon {
position: relative;
}
.left-inner-addon input {
2014-11-01 22:38:39 +00:00
padding-left: 30px;
2014-04-27 17:58:00 +00:00
}
.left-inner-addon i {
color: #aaa;
position: absolute;
padding: 9px 10px;
pointer-events: none;
}
2014-04-27 22:38:43 +00:00
.ev_good {
color: green;
}
.ev_bad {
color: red;
}
2014-04-20 14:35:59 +00:00
</style>
</head>
<body ng-controller="MailCtrl">
<nav class="navbar navbar-default navbar-static-top" role="navigation">
<div class="navbar-header">
<img src="/images/hog.png">
<a class="navbar-brand" href="#">MailHog</a>
</div>
2014-04-27 18:26:21 +00:00
<ul class="nav navbar-nav navbar-left navbar-subtext">
<li>
<a>[: .config.Hostname :]</a>
2014-04-27 18:26:21 +00:00
</li>
<li>
<a>{{ messagesDisplayed() }} {{ searchText ? "of " + messages.length : "" }} messages</a>
</li>
</ul>
2014-04-20 14:35:59 +00:00
<ul class="nav navbar-nav navbar-right">
2014-04-27 17:19:30 +00:00
<li ng-if="eventCount > 0" class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span ng-if="eventCount > eventDone" class="ajax-loader"></span>
2014-04-27 17:34:28 +00:00
{{ eventCount - eventDone }} pending<span ng-if="eventFailed > 0"> ({{ eventFailed}} failed)</span> <span ng-if="eventDone > 0"> ({{ eventDone}} complete)</span> <b class="caret"></b>
2014-04-27 17:19:30 +00:00
</a>
<ul class="dropdown-menu">
<li ng-class="e.getClass()" ng-repeat="(id, e) in eventsPending" class="ajax-event">
2014-04-27 18:06:27 +00:00
<span class="glyphicon {{ e.glyphicon }}"></span>
2014-04-27 17:34:28 +00:00
<button ng-if="e.failed" ng-click="e.remove()" class="btn btn-xs btn-danger pull-right"><span class="glyphicon glyphicon-remove"></span></button>
2014-04-27 17:19:30 +00:00
<h1>{{ e.name }}</h1>
<h2 ng-if="e.args">{{ e.args }}</h2>
2014-04-27 17:34:28 +00:00
<h2 ng-if="e.error">{{ e.error }}</h2>
2014-04-27 17:19:30 +00:00
</li>
</ul>
</li>
2014-04-27 18:06:27 +00:00
<li>
2014-04-27 22:52:42 +00:00
<a href="#" class="dropdown-toggle" data-toggle="dropdown" title="Event stream connected" ng-click="toggleStream()">
2014-04-27 22:38:43 +00:00
<span class="glyphicon glyphicon-asterisk {{ hasEventSource ? 'ev_good' : 'ev_bad' }}"></span>
</a>
</li>
<li>
2014-04-27 18:06:27 +00:00
<form class="navbar-form navbar-left" role="search">
<div class="form-group left-inner-addon">
<i class="glyphicon glyphicon-search"></i>
<input ng-model="searchText" type="text" class="form-control" placeholder="Search">
</div>
</form>
</li>
2014-04-20 14:35:59 +00:00
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Options <b class="caret"></b></a>
<ul class="dropdown-menu">
2014-04-27 18:13:22 +00:00
<li><a href="#" ng-click="refresh()"><span class="glyphicon glyphicon-download"></span> Refresh</a></li>
2014-04-20 14:35:59 +00:00
<li class="divider"></li>
2014-04-27 18:13:22 +00:00
<li><a href="#" ng-click="deleteAll()"><span class="glyphicon glyphicon-remove-circle"></span> Delete all messages</a></li>
2014-04-20 14:35:59 +00:00
</ul>
</li>
2014-04-27 18:13:22 +00:00
<li><a target="_blank" href="https://github.com/ian-kent/Go-MailHog"><img src="/images/github.png" style="width: 16px;" /> GitHub</a></li>
2014-04-20 14:35:59 +00:00
</ul>
</nav>
[: .Content :]
2014-04-20 14:35:59 +00:00
</body>
</html>