diff options
Diffstat (limited to 'web/templates/html')
-rw-r--r-- | web/templates/html/error.html | 5 | ||||
-rw-r--r-- | web/templates/html/events.html | 15 | ||||
-rw-r--r-- | web/templates/html/footer.html | 13 | ||||
-rw-r--r-- | web/templates/html/header.html | 46 | ||||
-rw-r--r-- | web/templates/html/index.html | 67 | ||||
-rw-r--r-- | web/templates/html/mappings.html | 40 |
6 files changed, 186 insertions, 0 deletions
diff --git a/web/templates/html/error.html b/web/templates/html/error.html new file mode 100644 index 0000000..17e3687 --- /dev/null +++ b/web/templates/html/error.html @@ -0,0 +1,5 @@ +$def with (errmsg) + +<div class="container"> + <h3>$errmsg</h3> +</div> diff --git a/web/templates/html/events.html b/web/templates/html/events.html new file mode 100644 index 0000000..4a0a825 --- /dev/null +++ b/web/templates/html/events.html @@ -0,0 +1,15 @@ +{{ define "events" }} + +<div class="col-md-12"> + <div class="card card-default"> + <!-- Default card contents --> + <div class="card-header"> + Event History + </div> + + <div class="card-body event-log"> + </div> + + </div> +</div> +{{ end }} diff --git a/web/templates/html/footer.html b/web/templates/html/footer.html new file mode 100644 index 0000000..d2d3889 --- /dev/null +++ b/web/templates/html/footer.html @@ -0,0 +1,13 @@ +{{ define "footer" }} + + </div> <!-- id=main --> + </div> + <footer> + <div class="container"> + <p class="text-muted text-center">Brought to you with <span style="color:#ef5e21">♥</span> by ThousandEyes</p> + </div> + </footer> + </body> +</html> + +{{ end }} diff --git a/web/templates/html/header.html b/web/templates/html/header.html new file mode 100644 index 0000000..b02e4a2 --- /dev/null +++ b/web/templates/html/header.html @@ -0,0 +1,46 @@ +{{ define "header" }} +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <!-- Latest compiled and minified CSS --> + <title>shoelaces - painless server bootstrapping</title> + + <script src="/static/js/jquery.min.js"></script> + <script src="/static/js/bootstrap.min.js"></script> + <script src="/static/js/local.js"></script> + + <link href="static/css/bootstrap.min.css" rel="stylesheet"/> + <link href="static/css/default.css" rel="stylesheet"/> + <link href="static/css/spinner.css" rel="stylesheet"/> + + <link rel="icon" type="image/png" href="static/img/favicon-32x32.png"/> + <meta charset="utf-8"/> + </head> + <body> + <header> + <nav class="navbar navbar-expand-lg rounded fixed-top"> + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample10" aria-controls="navbarsExample10" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <div class="collapse navbar-collapse justify-content-md-center" id="navbarsExample10"> + <a class="navbar-brand" href="/"><img src="static/img/shoelaces-logo.png" alt="shoelaces-logo" /></a> + <ul class="navbar-nav"> + <li class="nav-item"> + <a class="nav-link text-light" href="/">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link text-light" href="/mappings">Mappings</a> + </li> + <li class="nav-item"> + <a class="nav-link text-light" href="/events">Events</a> + </li> + </ul> + </div> + </nav> + </header> + + <div class="container main-container"> + <div id="main" role="main"> + +{{ end }} diff --git a/web/templates/html/index.html b/web/templates/html/index.html new file mode 100644 index 0000000..4f09ba9 --- /dev/null +++ b/web/templates/html/index.html @@ -0,0 +1,67 @@ +{{ define "index" }} + +<div class="container theme-showcase col-md-12" role="main"> + + <div id="loading"> + <div class="row"> + <div class="col-md-3"></div> + <div class="center-block col-md-6"> + <h3 class="text-center">Waiting for MACs...</h3> + </div> + <div class="col-md-3"></div> + </div> + <div class="row"> + <div class="sk-circle"> + <div class="sk-circle1 sk-child"></div> + <div class="sk-circle2 sk-child"></div> + <div class="sk-circle3 sk-child"></div> + <div class="sk-circle4 sk-child"></div> + <div class="sk-circle5 sk-child"></div> + <div class="sk-circle6 sk-child"></div> + <div class="sk-circle7 sk-child"></div> + <div class="sk-circle8 sk-child"></div> + <div class="sk-circle9 sk-child"></div> + <div class="sk-circle10 sk-child"></div> + <div class="sk-circle11 sk-child"></div> + <div class="sk-circle12 sk-child"></div> + </div> + </div> + <div class="row"> + <div class="col-md-3"></div> + <div class="center-block col-md-6"> + <div class="card"> + <div class="card-body"> + <p class="text-center">Shoelaces is waiting for a server to boot. Using iPXE, your server should reach the following endpoint: <br /> <b class="text-primary-custom">http://{{ .BaseURL }}/poll/1/<MAC></b> </p> + <p class="text-center">You can automate this process by setting up a DHCP server.</p> + </div> + </div> + </div> + <div class="col-md-3"></div> + </div> + </div> + + <form action="/update/target" method="POST" id="systems" class="hide"> + <div class="form-group"> + <label for="mac">Select a server</label> + <select required id="mac" name="mac" class="form-control" size=5> + {{ range .HostnameMaps }} + <option value="{{ .Hostname.String }}">{{ .Hostname.String }}</option> + {{ end }} + </select> + </div> + <div class="form-group"> + <select required id="target" name="target" class="form-control"> + <option value="">Select an iPXE script</option> + {{ range .Scripts }} + <option value="{{ .Name }}" data-script="{{ .Name }}" data-env="{{ .Env }}">{{ .Name }}{{ if .Env }} [{{ .Env }}]{{end}}</option> + {{ end }} + </select> + </div> + <div class="form-group form-row params-container"> + <!-- filled by JQ code --> + </div> + <input class="btn btn-primary" type="submit" value="Boot!"/> + </form> +</div> + +{{ end }} diff --git a/web/templates/html/mappings.html b/web/templates/html/mappings.html new file mode 100644 index 0000000..dd7d8a5 --- /dev/null +++ b/web/templates/html/mappings.html @@ -0,0 +1,40 @@ +{{ define "mappings" }} + +<div class="col-md-12"> + {{ if .NetworkMaps }} + <div class="card card-default"> + <!-- Default card contents --> + <div class="card-header">Network Mappings</div> + <table class="table"> + <tr> + <th>Subnet</th> + <th>IPXE script to use</th> + </tr> + + {{ range .NetworkMaps }} + <tr> + <td>{{ .Network }}</td> + <td>{{ .Script.String }}</td> + </tr> + {{ end }} + </table> + </div> + <div class="card card-default"> + <!-- Default card contents --> + <div class="card-header">Hostname Mappings</div> + <table class="table"> + <tr> + <th>Hostname</th> + <th>IPXE script to use</th> + </tr> + {{ range .HostnameMaps }} + <tr> + <td><code>/{{ .Hostname.String }}/</code></td> + <td>{{ .Script.String }}</td> + </tr> + {{ end }} + </table> + </div> + {{ end }} +</div> +{{ end }} |