Conver to bootstrap 5

This converts the page to use bootstrap 5

Change-Id: I213e7178931c293962c3ea7840175baa5eaf3537
This commit is contained in:
Ian Wienand 2021-10-22 15:34:59 +11:00
parent a511474934
commit 5855fdbe9b

View File

@ -1,87 +1,106 @@
<html> <!doctype html>
<head> <html lang="en">
<title>dstat</title> <head>
<link rel="stylesheet" type="text/css" href="css/nv.d3.min.css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" /> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/nv.d3.min.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body> <title>dstat</title>
<script src="js/jquery-2.1.4.js" type="text/javascript"></script>
</head>
<body>
<script src="js/bootstrap.bundle.min.js" type="text/javascript"></script>
<script src="js/jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="js/d3.min.js" type="text/javascript"></script> <script src="js/d3.min.js" type="text/javascript"></script>
<script src="js/nv.d3.js" type="text/javascript"></script> <script src="js/nv.d3.min.js" type="text/javascript"></script>
<script src="js/dashboard.js" type="text/javascript"></script> <script src="js/dashboard.js" type="text/javascript"></script>
<script src="js/graph.js" type="text/javascript"></script> <script src="js/graph.js" type="text/javascript"></script>
<script src="js/bootstrap.js" type="text/javascript"></script>
<div id="main"> <nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="page-header" id="header"> <div class="container-fluid">
<a class="navbar-brand" href="#">dstat</a>
<div id="menu"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<div class="btn-group" id="left-menu"> <span class="navbar-toggler-icon"></span>
<div class="btn-group">
<button id="btn_xaxis" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn-default btn">
X axis <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<li><a href="#" onclick="change_xaxis('time')">Time</a></li> <ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="divider"></li> <li class="nav-item dropdown">
<li><a href="#" onclick="change_xaxis('seq')">Sequential</a></li> <a class="nav-link dropdown-toggle" href="#" id="granularityDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Granularity
</a>
<ul class="dropdown-menu" aria-labelledby="granularityDropdown">
<li><a class="dropdown-item" href="#" onclick="change_granularity(1, 'avg');">all ticks</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(5, 'avg');">5 ticks / average</a></li>
<li><a class="dropdown-item"href="#" onclick="change_granularity(5, 'max');">5 ticks / maximum</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(15, 'avg');">15 ticks / average</a></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(15, 'max');">15 ticks / maximum</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(30, 'avg');">30 ticks / average</a></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(30, 'max');">30 ticks / maximum</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(60, 'avg');">60 ticks / average</a></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(60, 'max');">60 ticks / maximum</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(300, 'avg');">300 ticks / average</a></li>
<li><a class="dropdown-item" href="#" onclick="change_granularity(300, 'max');">300 ticks / maximum</a></li>
</ul> </ul>
</div> </li>
<div class="btn-group">
<div class="btn-group"> <li class="nav-item dropdown">
<button id="btn_xaxis" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn-default btn"> <a class="nav-link dropdown-toggle" href="#" id="xaxisDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Interface <span class="caret"></span> X-Axis
</button> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu" aria-labelledby="xaxisDropdown">
<li><a href="#" onclick="change_interface('standard');">Standard</a></li> <li><a class="dropdown-item" href="#" onclick="change_xaxis('time');">Time</a></li>
<li class="divider"></li> <li><a class="dropdown-item" href="#" onclick="change_xaxis('seq');">Sequential</a></li>
<li><a href="#" onclick="change_interface('compact')">Compact</a></li> </ul>
</li>
<!-- disabled for now, not sure what this is supposed to do
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="compactDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
X-Axis
</a>
<ul class="dropdown-menu" aria-labelledby="compactDropdown">
<li><a class="dropdown-item" href="#" onclick="change_interface('standard');">Standard</a></li>
<li><a class="dropdown-item" href="#" onclick="change_interface('compact');">Compact</a></li>
</ul>
</li>
-->
</ul> </ul>
</div> </div>
</div> </div>
<div class="btn-group"> </nav>
<div class="btn-group">
<button id="btn_xaxis" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="btn-default btn"> <!-- drag and drop modal -->
Granularity <span class="caret"></span> <div id="drop-background">
</button> <div id="drop">
<ul class="dropdown-menu"> <p>Drag & drop dstat files<img src="images/drop.png" alt=""/></p>
<li><a href="#" onclick="change_granularity(1, 'avg');">all ticks</a></li>
<li class="divider"></li>
<li><a href="#" onclick="change_granularity(5, 'avg');">5 ticks / average</a></li>
<li><a href="#" onclick="change_granularity(5, 'max');">5 ticks / maximum</a></li>
<li class="divider"></li>
<li><a href="#" onclick="change_granularity(15, 'avg');">15 ticks / average</a></li>
<li><a href="#" onclick="change_granularity(15, 'max');">15 ticks / maximum</a></li>
<li class="divider"></li>
<li><a href="#" onclick="change_granularity(30, 'avg');">30 ticks / average</a></li>
<li><a href="#" onclick="change_granularity(30, 'max');">30 ticks / maximum</a></li>
<li class="divider"></li>
<li><a href="#" onclick="change_granularity(60, 'avg');">60 ticks / average</a></li>
<li><a href="#" onclick="change_granularity(60, 'max');">60 ticks / maximum</a></li>
<li class="divider"></li>
<li><a href="#" onclick="change_granularity(300, 'avg');">300 ticks / average</a></li>
<li><a href="#" onclick="change_granularity(300, 'max');">300 ticks / maximum</a></li>
</ul>
</div>
</div>
</div>
<div class="btn-group" id="right-menu">
<a href"#" onclick="refresh();"><span class="glyphicon glyphicon-repeat"/></a>
</div> </div>
</div> </div>
<!-- the "focus box" slider that allows you to narrow the range the graphs show -->
<div class="container-fluid">
<h1>dstat</h1> <div class="row">
<div id="focus"></div> <div class="col">
<div id="menu-btn"><a href="#" onclick="toggle_menu();"><span class="glyphicon glyphicon-menu-hamburger"></a></span></div> <div class="d-flex justify-content-center" id="focus"></div>
</div> <small class="d-flex justify-content-center text-muted">Slide to select time range</small>
<div id="content"> </div> <!-- /col -->
<div id="drop-background"><div id="drop"><p>Drag & drop dstat files<img src="images/drop.png" alt=""/></p></div></div> </div> <!-- /row -->
<div id="dashboard" class="container-fluid list-group"></div>
</div>
</div>
</div>
</body> <div class="row">
<div class="col">
<ul id="dashboard" class="list-group"></ul>
</div> <!-- /col -->
</div> <!-- /row -->
</div> <!-- container-fluid -->
</body>
</html> </html>