-
Notifications
You must be signed in to change notification settings - Fork 61
/
base.html
102 lines (98 loc) · 4.67 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<title>{% block title %}{% endblock %}</title>
<link rel='stylesheet' type='text/css' href='/static/lib/css/font-awesome.css'>
<link rel='stylesheet' type='text/css' href='/static/css/components.css'>
<link rel='stylesheet' type='text/css' href='/static/css/flat-ui.min.css'>
<link rel='stylesheet' type='text/css' href='/static/css/bootstrap.css'>
<link rel='stylesheet' type='text/css' href='/static/css/common.css'>
<script src='/static/js/jquery.min.js'></script>
<script src='/static/js/jquery.localize.min.js'></script>
<script src='/static/js/flat-ui.min.js'></script>
<script src='/static/js/common.js'></script>
<script src='/static/js/application.js'></script>
<script src='/static/js/components.js'></script>
{% if lang or g.lang %}
<script src='/static/trans/{{ lang or g.lang }}.js'></script>
{% endif %}
<script>
function selectHash() {
var e = document.getElementById(window.location.hash.slice(1));
if (e) {
$(e).addClass('selected');
setTimeout(function() {
$(window).scrollTop($(window).scrollTop() - 80);
}, 1);
}
}
$(window).on('hashchange', function() {
$('.selected').removeClass('selected');
selectHash();
});
$(document).ready(function() {
if (window.location.hash) {
selectHash();
}
});
</script>
{% block head %}{% endblock %}
</head>
{% set body_cls = body_classes() %}
<body{% if body_cls %} class='{{ ' '.join(body_cls) }}'{% endif %}>
<header style='padding-left: 0px; padding-right: 0px; padding-bottom: 0px; padding-top: 0px;'>
<nav class='navbar navbar-inverse navbar-embossed' role='navigation' style='margin-bottom:0px;'>
<div class='navbar-header'>
<a class='navbar-brand' style="padding-left: 45px;" href='/'>RedisCtl</a>
</div>
<div class='collapse navbar-collapse'>
<ul class='nav navbar-nav navbar-right'>
{% if g.display_login_entry %}
<li><a class='nav-link' href='{{ login_url() }}' data-localize='login'>Login</a></li>
{% else %}
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>
<i class='fa fa-plus'></i> <span data-localize='nav-add'>Add</span>...
</a>
<ul class='dropdown-menu'>
<li><a class='nav-link' href='/redis/register'><i class='fa fa-database'></i> Redis</a></li>
<li><a class='nav-link' href='/cluster/create'><i class='fa fa-cubes'></i> <span data-localize='cluster'>Cluster</span></a></li>
<li class='container-display'><a class='nav-link' href='/containerize/'><i class='fa fa-cube'></i> <span data-localize='container-nodes-mgr'>Containerize</span></a></li>
</ul>
</li>
<li><a class='nav-link' href='/task/list_all'><i class='fa fa-tasks'></i> <span data-localize='global-cluster-tasks-list'>All Tasks</span></a></li>
<li><a class='nav-link' href='/audit/nodes'><i class='fa fa-list-alt'></i> <span data-localize='audit-nodes'>Audit</span></a></li>
<li class='dropdown'>
<a href='#' class='dropdown-toggle' data-toggle='dropdown' role='button' aria-haspopup='true' aria-expanded='false'>
{{ icon('support') }} <span data-localize='nav-status'>Server Status</span>...
</a>
<ul class='dropdown-menu'>
<li><a class='nav-link' href='/stats/pollings'>{{ icon('calendar') }} <span data-localize='polling-stats'>Pollings</span></a></li>
<li><a class='nav-link' href='/myself/3rd'>{{ icon('cogs') }} <span data-localize='thirdparty-utils'>Thirdparty</span></a></li>
</ul>
</li>
{#
To change what is displayed after user login
* either override `render_me` in the App class to return a piece of HTML
* or just change the template below in the <li> tag
#}
<li id='nav-current-user'>
{% autoescape false %}
{{ render_me() }}
{% endautoescape %}
</li>
{% endif %}
</ul>
</div>
</header>
<div style='width: 80%; min-width: 1200px; margin: auto'>{% block body %}{% endblock %}</div>
<footer style='margin-top: 0px;'>
<div class='main-width'>
<span style='float: right'>
© HunanTV Platform developers - v0.9.2-2016-09-19
<a href='https://github.com/HunanTV/redis-ctl'><i class='fa fa-github'></i></a>
</span>
</div>
</footer>
<script>$('[data-localize]').localize('/trans/')</script>