docklet/web/templates/base_AdminLTE.html

291 lines
9.0 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% block title %}Docklet | Dashboard{% endblock %}</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="shortcut icon" href="/static/img/favicon.ico">
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="//cdn.bootcss.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Ionicons -->
<link href="//cdn.bootcss.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/animate.css/3.5.1/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
<!-- Theme style -->
<link rel="stylesheet" href="/static/dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="/static/dist/css/skins/skin-blue.min.css">
{%block css_src %}{% endblock %}
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<!-- Main Header -->
<header class="main-header">
<!-- Logo -->
<a href="" class="logo">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b>Docklet</b></span>
</a>
<!-- Header Navbar -->
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
2016-06-21 17:56:27 +08:00
<li class="dropdown user user-menu">
<!-- Menu Toggle Button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<!-- The user image in the navbar-->
<img src="{{ mysession['avatar'] }}" class="user-image" alt="User Image">
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span class="hidden-xs">{{ mysession['nickname'] }}</span>
</a>
<ul class="dropdown-menu">
<!-- The user image in the menu -->
<li class="user-header">
<img src="{{ mysession['avatar'] }}" class="img-circle" alt="User Image">
<p>
{{ mysession['nickname'] }}
<small>{{ mysession['description'] }}</small>
</p>
</li>
<!-- Menu Body -->
<!-- Menu Footer-->
<li class="user-footer" style="background-color:#e6e6e6">
<div class="pull-left">
<a href="/user/info/" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<a href="/logout/" class="btn btn-default btn-flat">Sign out</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
<li>
<a href="/document/" target="_blank"><strong>Help</strong></a>
</li>
<li>
<a href="/logout/" ><strong>Logout</strong></a>
</li>
</ul>
</div>
</nav>
</header>
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel (optional) -->
<div class="user-panel">
<div class="pull-left image">
<img src="{{ mysession['avatar'] }}" class="img-circle" alt="User Image">
</div>
<div class="pull-left info">
<p>{{ mysession['nickname'] }}</p>
<!-- Status -->
<a href="#"><i class="fa fa-circle text-success"></i> {{ mysession['status']}}</a>
</div>
</div>
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
<li class="header">USER OPERATIONS</li>
<!-- Optionally, you can add icons to the links -->
<li class="active" id="nav_Dashboard">
<a href="/dashboard/"><i class="fa fa-th-large"></i> <span class="nav-label">Dashboard</span></a>
</li>
<li id="nav_Config">
<a href="/config/"><i class="fa fa-gears"></i> <span class="nav-label">Config</span></a>
</li>
<li id="nav_Status">
<a href='/vclusters/'><i class="fa fa-bar-chart"></i> <span class="nav-label">Status</span></a>
</li>
{% if mysession['usergroup'] == 'root' or mysession['usergroup'] == 'admin'%}
<li class="header">ADMIN OPERATIONS</li>
2016-06-21 17:56:27 +08:00
<li id="nav_Hosts">
<a href='/hosts/'><i class="fa fa-sitemap"></i> <span class="nav-label">Hosts</span></a>
</li>
<li id="user_List">
2016-06-21 17:56:27 +08:00
<a href='/user/list/'><i class="fa fa-users"></i> <span class="nav-label">Users</span></a>
</li>
<li id="admin">
2016-06-21 17:56:27 +08:00
<a href='/admin/'><i class="fa fa-gears"></i> <span class="nav-label">Admin</span></a>
</li>
{% endif %}
</ul>
<!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<strong>{% block panel_title %}Dashboard{% endblock %}</strong>
</h1>
{% block panel_list %}
<ol class="breadcrumb">
<li>
<a href="/dashboard/"><i class="fa fa-dashboard"></i>Home</a>
</li>
<li class="active">
<strong>Dashboard</strong>
</li>
</ol>
{% endblock %}
</section>
<!-- Main content -->
<section class="content">
{% block content %}
{% endblock %}
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Main Footer -->
<footer class="main-footer">
<!-- To the right -->
<div class="pull-right hidden-xs">
<i>Docklet {{ version }}</i>
</div>
<!-- Default to the left -->
<strong>Copyright</strong>&copy;&nbsp;2016 <a href="http://docklet.unias.org">UniAS</a>@<a href="http://www.sei.pku.edu.cn"> SEI, PKU</a>
</footer>
</div>
<!-- ./wrapper -->
<!-- REQUIRED JS SCRIPTS -->
<!-- jQuery 2.2.1 -->
<script src="//cdn.bootcss.com/jquery/2.2.1/jquery.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- AdminLTE App -->
<script src="/static/dist/js/app.min.js"></script>
<script src="//cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js"></script>
<script src="//cdn.bootcss.com/jQuery-slimScroll/1.3.7/jquery.slimscroll.min.js"></script>
<script src="//cdn.bootcss.com/toastr.js/latest/js/toastr.min.js"></script>
<script type="text/javascript">
var pathname = window.location.pathname;
pathname = pathname.split(/\//);
if(pathname[1] != 'dashboard')
$("#nav_Dashboard").removeClass("active");
if(pathname[1] == 'vclusters')
$("#nav_Status").addClass("active");
else if(pathname[1] == 'hosts')
$("#nav_Hosts").addClass("active");
else if(pathname[1] == 'config')
$("#nav_Config").addClass("active");
else if(pathname[1] == 'user')
{
if (pathname[2] == 'list')
$("#user_List").addClass("active");
}
2016-06-07 12:25:40 +08:00
</script>
{% if mysession['status'] == 'init' %}
<script type="text/javascript">
$(document).ready(function() {
toastr.options = {
"closeButton": false,
"debug": true,
"progressBar": false,
"preventDuplicates": false,
"positionClass": "toast-top-left",
"onclick": function(){
window.location.href="/activate/";
},
"showDuration": "0",
"hideDuration": "0",
"timeOut": "0",
"extendedTimeOut": "0",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
toastr.error("You are not activated. Click this notification to activate your account.");
});
</script>
{% endif %}
{% if mysession['status'] == 'applying' %}
<script type="text/javascript">
$(document).ready(function() {
toastr.options = {
"closeButton": false,
"debug": true,
"progressBar": false,
"preventDuplicates": false,
"positionClass": "toast-top-left",
"onclick": function(){
},
"showDuration": "0",
"hideDuration": "0",
"timeOut": "0",
"extendedTimeOut": "0",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
toastr.warning("You applying is being checked.");
});
</script>
{% endif %}
{% block script_src %}
{% endblock %}
</body>
</html>