Last active
January 20, 2019 08:45
-
-
Save shreddedbacon/43001ed7f2e93d35671a50964f698384 to your computer and use it in GitHub Desktop.
NUT UPS Better Visualisations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>Starter Template for Bootstrap</title> | |
| <!-- Bootstrap core CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| </head> | |
| <body> | |
| <main role="main" class="container"> | |
| <div class="starter-template"> | |
| <h2>Network UPS Tools upsstats | |
| @VERSION@ | |
| </h2> | |
| <h5> | |
| @DATE %a %b %d %X %Z %Y@ | |
| </h5> | |
| <!-- START EACH HERE --> | |
| @IFSUPP battery.charge@ | |
| @IFSUPP battery.voltage@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Battery Charge</h5> | |
| <p class="card-text"> | |
| <div class="progress"> | |
| <div class="progress-bar bg-info" role="progressbar" style="width: @VAR battery.charge@%;" aria-valuenow="@VAR battery.charge@" aria-valuemin="0" aria-valuemax="100">@VAR battery.charge@%</div> | |
| </div> | |
| <div>Voltage<br>@VAR battery.voltage@</div> | |
| </p> | |
| </div> | |
| </div> | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Battery Voltage</h5> | |
| <p class="card-text"> | |
| <div>Voltage<br>@VAR battery.voltage@</div> | |
| </p> | |
| </div> | |
| </div> | |
| @ELSE@ | |
| @IFSUPP battery.charge@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Battery Charge</h5> | |
| <p class="card-text"> | |
| <div class="progress"> | |
| <div class="progress-bar bg-info" role="progressbar" style="width: @VAR battery.charge@%;" aria-valuenow="@VAR battery.charge@" aria-valuemin="0" aria-valuemax="100">@VAR battery.charge@%</div> | |
| </div> | |
| </p> | |
| </div> | |
| </div> | |
| @ELSE@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Battery Charge</h5> | |
| <p class="card-text"> | |
| <div>Voltage<br>@VAR battery.voltage@</div> | |
| </p> | |
| </div> | |
| </div> | |
| @ENDIF@ | |
| @IFSUPP input.L2-L3.voltage@ | |
| <td ALIGN="CENTER">L1-L2<br>@IMG input.L1-L2.voltage width=68@</td> | |
| <td ALIGN="CENTER">L2-L3<br>@IMG input.L2-L3.voltage width=68@</td> | |
| <td ALIGN="CENTER">L3-L1<br>@IMG input.L3-L1.voltage width=68@</td> | |
| @ELSE@ | |
| @IFSUPP input.L2-N.voltage@ | |
| <td ALIGN="CENTER">L1-N<br>@IMG input.L1-N.voltage width=68@</td> | |
| <td ALIGN="CENTER">L2-N<br>@IMG input.L2-N.voltage width=68@</td> | |
| <td ALIGN="CENTER">L3-N<br>@IMG input.L3-N.voltage width=68@</td> | |
| @ELSE@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Input Voltage</h5> | |
| <p class="card-text"> | |
| <div class="progress"> | |
| <div id="inputvoltage" class="progress-bar bg-dark" role="progressbar" style="width: @VAR input.voltage@%;" aria-valuenow="@VAR input.voltage@" aria-valuemin="0" aria-valuemax="280">@VAR input.voltage@ VAC</div> | |
| </div> | |
| </p> | |
| </div> | |
| </div> | |
| <script> | |
| var perc=""; | |
| perc = ((@VAR input.voltage@/280) * 100).toFixed(3); | |
| document.getElementById('inputvoltage').style.width = perc+"%"; | |
| </script> | |
| @ENDIF@ | |
| @IFSUPP output.L2-L3.voltage@ | |
| <td ALIGN="CENTER">L1-L2<br>@IMG output.L1-L2.voltage width=68@</td> | |
| <td ALIGN="CENTER">L2-L3<br>@IMG output.L2-L3.voltage width=68@</td> | |
| <td ALIGN="CENTER">L3-L1<br>@IMG output.L3-L1.voltage width=68@</td> | |
| @ELSE@ | |
| @IFSUPP output.L2-N.voltage@ | |
| <td ALIGN="CENTER">L1-N<br>@IMG output.L1-N.voltage width=68@</td> | |
| <td ALIGN="CENTER">L2-N<br>@IMG output.L2-N.voltage width=68@</td> | |
| <td ALIGN="CENTER">L3-N<br>@IMG output.L3-N.voltage width=68@</td> | |
| @ELSE@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">Output Voltage</h5> | |
| <p class="card-text"> | |
| <div class="progress"> | |
| <div id="outputvoltage" class="progress-bar bg-secondary" role="progressbar" style="width: @VAR output.voltage@%;" aria-valuenow="@VAR output.voltage@" aria-valuemin="0" aria-valuemax="280">@VAR output.voltage@ VAC</div> | |
| </div> | |
| </p> | |
| </div> | |
| </div> | |
| <script> | |
| var perc=""; | |
| perc = ((@VAR output.voltage@/280) * 100).toFixed(3); | |
| document.getElementById('outputvoltage').style.width = perc+"%"; | |
| </script> | |
| @ENDIF@ | |
| @IFSUPP output.L2.power.percent@ | |
| <td ALIGN="CENTER">L1<br>@IMG output.L1.power.percent width=68@</td> | |
| <td ALIGN="CENTER">L2<br>@IMG output.L2.power.percent width=68@</td> | |
| <td ALIGN="CENTER">L3<br>@IMG output.L3.power.percent width=68@</td> | |
| @ELSE@ | |
| @IFSUPP output.L2.realpower.percent@ | |
| <td ALIGN="CENTER">L1<br>@IMG output.L1.realpower.percent width=68@</td> | |
| <td ALIGN="CENTER">L2<br>@IMG output.L2.realpower.percent width=68@</td> | |
| <td ALIGN="CENTER">L3<br>@IMG output.L3.realpower.percent width=68@</td> | |
| @ELSE@ | |
| <div class="card"> | |
| <div class="card-body"> | |
| <h5 class="card-title">UPS Load</h5> | |
| <p class="card-text"> | |
| <div class="progress"> | |
| <div id="upsload" class="progress-bar bg-success" role="progressbar" style="width: @VAR ups.load@%;" aria-valuenow="@VAR ups.load@" aria-valuemin="0" aria-valuemax="115">@VAR ups.load@%</div> | |
| </div> | |
| </p> | |
| </div> | |
| </div> | |
| <script> | |
| var perc=""; | |
| perc = ((@VAR ups.load@/115) * 100).toFixed(3); | |
| document.getElementById('upsload').style.width = perc+"%"; | |
| </script> | |
| @ENDIF@ | |
| <!-- END EACH HERE --> | |
| </div> | |
| </main><!-- /.container --> | |
| <!-- Bootstrap core JavaScript | |
| ================================================== --> | |
| <!-- Placed at the end of the document so the pages load faster --> | |
| <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>Starter Template for Bootstrap</title> | |
| <!-- Bootstrap core CSS --> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| </head> | |
| <body> | |
| <main role="main" class="container"> | |
| <div class="starter-template"> | |
| <h2>Network UPS Tools upsstats | |
| @VERSION@ | |
| </h2> | |
| <h5> | |
| @DATE %a %b %d %X %Z %Y@ | |
| </h5> | |
| <!-- START EACH HERE --> | |
| @FOREACHUPS@ | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <h3>System - | |
| <a class="btn btn-primary" href="?host=@HOST@">@HOSTDESC@</a> | |
| </h3> | |
| <div class="row"><!-- /.ROW--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-primary mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Status</div> | |
| <div class="card-body"> | |
| <p class="card-text">@STATUS@</p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-secondary mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Battery</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP battery.charge@ | |
| @VAR battery.charge@ | |
| % | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-success mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Input (VAC)</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP input.L2-L3.voltage@ | |
| @VAR input.L1-L2.voltage@ | |
| @VAR input.L2-L3.voltage@ | |
| @VAR input.L3-L1.voltage@ | |
| @ELSE@ | |
| @IFSUPP input.L2-N.voltage@ | |
| @VAR input.L1-N.voltage@ | |
| @VAR input.L2-N.voltage@ | |
| @VAR input.L3-N.voltage@ | |
| @ELSE@ | |
| @IFSUPP input.voltage@ | |
| @VAR input.voltage@ | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-danger mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Output (VAC)</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP output.L2-L3.voltage@ | |
| @VAR output.L1-L2.voltage@ | |
| @VAR output.L2-L3.voltage@ | |
| @VAR output.L3-L1.voltage@ | |
| @ELSE@ | |
| @IFSUPP output.L2-N.voltage@ | |
| @VAR output.L1-N.voltage@ | |
| @VAR output.L2-N.voltage@ | |
| @VAR output.L3-N.voltage@ | |
| @ELSE@ | |
| @IFSUPP output.voltage@ | |
| @VAR output.voltage@ | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-warning mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Load (%)</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP output.L2.power.percent@ | |
| @VAR output.L1.power.percent@ | |
| @VAR output.L2.power.percent@ | |
| @VAR output.L3.power.percent@ | |
| @ELSE@ | |
| @IFSUPP output.L2.realpower.percent@ | |
| @VAR output.L1.realpower.percent@ | |
| @VAR output.L2.realpower.percent@ | |
| @VAR output.L3.realpower.percent@ | |
| @ELSE@ | |
| @IFSUPP ups.load@ | |
| @VAR ups.load@ | |
| % | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card bg-light mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">UPS Temp (°C)</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP ups.temperature@ | |
| @UPSTEMP@ | |
| @DEGREES@ | |
| @ELSE@ | |
| @IFSUPP battery.temperature@ | |
| @BATTTEMP@ | |
| @DEGREES@ | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-dark mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Battery Runtime</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @IFSUPP battery.runtime@ | |
| @RUNTIME@ | |
| @ENDIF@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| <!--SMALL PANEL--> | |
| <div class="col-md-3 col-sm-6 col-xs-6"> | |
| <div class="card text-white bg-dark mb-3" style="max-width: 18rem;"> | |
| <div class="card-header">Model</div> | |
| <div class="card-body"> | |
| <p class="card-text"> | |
| @VAR ups.model@ | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| <!--SMALL PANEL--> | |
| </div><!-- /.ROW--> | |
| </div> | |
| </div> | |
| </div> | |
| @ENDFOR@ | |
| <!-- END EACH HERE --> | |
| </div> | |
| </main><!-- /.container --> | |
| <!-- Bootstrap core JavaScript | |
| ================================================== --> | |
| <!-- Placed at the end of the document so the pages load faster --> | |
| <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment