diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/admin.html | 36 | ||||
| -rw-r--r-- | views/email/footer.html | 25 | ||||
| -rw-r--r-- | views/email/header.html | 15 | ||||
| -rw-r--r-- | views/email/index.html | 29 | ||||
| -rw-r--r-- | views/footer.html | 24 | ||||
| -rw-r--r-- | views/header.html | 9 | ||||
| -rw-r--r-- | views/index.html | 32 | ||||
| -rw-r--r-- | views/jobs_modal.html | 24 | ||||
| -rw-r--r-- | views/navbar.html | 4 | ||||
| -rw-r--r-- | views/register.html | 70 |
10 files changed, 222 insertions, 46 deletions
diff --git a/views/admin.html b/views/admin.html index ebec09c..86f38bc 100644 --- a/views/admin.html +++ b/views/admin.html @@ -1,11 +1,12 @@ {{template "header.html"}} {{template "navbar.html"}} +{{template "jobs_modal.html"}} {{if .Error}} <div class="container"> <div class="row"> {{range .Error}} -<p class="col-md-4 col-md-offset-4 alert alert-danger alert-dismissible shadow-z-2" role="alert"> +<p id="dd-alert-danger" class="col-md-4 col-md-offset-4 alert alert-danger alert-dismissible shadow-z-2" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">×</span></button> {{.}} </p> @@ -17,8 +18,7 @@ <div class="container"> <div class="row"> {{range .Success}} -<p class="col-md-4 col-md-offset-4 alert alert-success alert-dismissible shadow-z-2" role="alert"> - <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">×</span></button> +<p id="dd-alert-success" class="col-md-4 col-md-offset-4 alert alert-success alert-dismissible shadow-z-2" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">×</span></button> {{.}} </p> {{end}} @@ -32,17 +32,19 @@ <button class="btn btn-primary btn-raised" data-toggle="modal" data-target="#jobs-modal"><span class="glyphicon glyphicon-plus-sign"></span> Add new host</button> </div> <div class="pull-right"> - <form action="/logout"> - <button class="btn btn-danger btn-raised" href="/logout"><span class="glyphicon glyphicon-minus-sign"></span> Logout</button> + <form action="/logout" method="POST"> + <button class="btn btn-danger btn-raised"><span class="glyphicon glyphicon-minus-sign"></span> Logout</button> </form> </div> - <table class="table table-striped table-hover "> + <table class="table table-striped table-hover table-responsive"> <thead> <th>#</th> <th>Host</th> - <th>Url</th> + <th>Description</th> <th>Status</th> + <th>Public</th> <!--th>Status Code</th--> + <th>Last Update</th> <th class="hide">Failure Reason</th> <th>Delete</th> </thead> @@ -50,23 +52,33 @@ {{range $index, $results := .Hosts}} <tr class="{{.Class}}"> <td>{{add $index 1}}</td> - <td>{{.Host}}</td> - <td>{{.Url}}</td> + <td>{{.Host}} <a href="{{.Url}}" title="{{.Url}}" title="_blank"> <span class="fa fa-external-link-square"></span></a></td> + <td>{{.Description}}</td> <td>{{.Status}}</td> + <td><span class="glyphicon glyphicon-{{if .Private}}remove{{else}}ok{{end}}"></span> <!--td>{{.StatusCode}}</td--> + <td>{{.UpdatedAt}}</td> <td class="hide">{{.Reason}}</td> <!--td><span class="glyphicon glyphicon-pencil"></span></td--> - <td><a href="#" data-toggle="modal" data-target="delete-modal">×</a></td> + <td class="text-center"><a value="{{.Id}}" href="#" class="delete"> <span class="fa fa-close"></span></a></td> </tr> {{end}} </tbody> </table> - <div class="pull-left"> + <p>Next run: <strong>{{.NextRun}}</strong></p> + <div class="spull-left"> <form action="/refresh" method="POST"> <button class="btn btn-primary btn-raised"><span class="glyphicon glyphicon-refresh"></span> Update all</button> </form> </div> + <hr> + <form class="form-horizontal" method="POST" action="/sticky/new"> + <legend><h4>Information post</h4></legend> + <textarea class="form-control shadow-z-4" id="Sticky" name="Sticky" row="3" placeholder="Sticky post.">{{.Sticky}}</textarea> + <br> + <button class="btn btn-primary btn-raised" name="Action" value="add">Submit</button> + <button class="btn btn-danger btn-raised" name="Action" value="delete">Delete</button> + </form> </div> </div> -{{template "jobs_modal.html"}} {{template "footer.html"}} diff --git a/views/email/footer.html b/views/email/footer.html new file mode 100644 index 0000000..f74441b --- /dev/null +++ b/views/email/footer.html @@ -0,0 +1,25 @@ +<footer> +<div class='footer shadow-y-2'> + <div class='container-fluid'> + <div class='row center'> + <div class="text-right col-xs-12"> + <p class="pull-right"> Copyright 2015 <a class='footer-a' href='https://www.iamfabulous.de' title='Maximilian Möhring'>Maximilian Möhring</a></p> + </div> + </div> + </div> +</div> +</footer> +<script src='https://code.jquery.com/jquery-1.11.2.min.js'></script> +<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'></script> +<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.2/js/ripples.min.js'></script> +<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.2/js/material.min.js'></script> +<script> + $(document).ready(function() { + $.material.init(); + }); +</script> +<script src='/static/js/jquery.confirm.js' type='text/javascript' charset='utf-8'></script> +<script src='/static/js/app.js' type='text/javascript' charset='utf-8'></script> + + </body> +</html> diff --git a/views/email/header.html b/views/email/header.html new file mode 100644 index 0000000..b8c16a0 --- /dev/null +++ b/views/email/header.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> + +<html> + <head> + <meta http-equiv='Content-Type' content='text/html; charset=utf-8'> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name='viewport' content='width=device-width, initial-scale=1.0'> + <title>StatusPage</title> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> + <link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.2/css/material-wfont.min.css'> + <link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.2/css/material.min.css'> + <link rel='stylesheet' type='text/css' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-design/0.2.2/css/ripples.min.css'> + <link rel='stylesheet' type='text/css' href='/static/css/style.css'> + </head> + <body> diff --git a/views/email/index.html b/views/email/index.html new file mode 100644 index 0000000..02a3ef7 --- /dev/null +++ b/views/email/index.html @@ -0,0 +1,29 @@ +{{template "header.html"}} + +<div class="container"> + <div class="row"> + <table class="table table-striped table-hover "> + <thead> + <th>#</th> + <th>Host</th> + <th>Description</th> + <th>Status</th> + <th>Last Update</th> + <th>Failure Reason</th> + </thead> + <tbody> +{{range $index, $results := .}} + <tr class="{{.Class}}"> + <td>{{add $index 1}}</td> + <td>{{.Host}} <a href="{{.Url}}" title="{{.Host}}" target="_blank"> <span class="fa fa-external-link-square"></span></a></td> + <td>{{.Description}}</td> + <td>{{.Status}}</td> + <td>{{.UpdatedAt}}</td> + <td>{{.Reason}}</td> + </tr> +{{end}} + </tbody> + </table> + </div> +</div> +{{template "footer.html"}} diff --git a/views/footer.html b/views/footer.html index 7fb9d2d..9979195 100644 --- a/views/footer.html +++ b/views/footer.html @@ -1,25 +1,19 @@ -<div class='footer'> +<footer> +<div class='footer shadow-y-2'> <div class='container'> - <div class='row'> - <footer> - <!--p class="pull-left"><a class="footer-a" href="/admin" title="admin"><span class="glyphicon glyphicon-cog"></span> Admin</a></p--> - <p class="pull-right"> Copyright 2015 <a class='footer-a' href='//www.iamfabulous.de' title='Maximilian Möhring'>Maximilian Möhring</a></p> - </footer> + <div class='row center'> + <div class="xcol-xs-offset-3"> + <p class="pull-left"> Copyright 2015 | <a class='footer-a' href='//www.iamfabulous.de' title='Maximilian Möhring'>Maximilian Möhring <span class="fa fa-external-link"></span></a></p> + </div> </div> </div> </div> +</footer> <!--script src='//code.jquery.com/jquery-1.11.2.min.js'></script--> -<script src='/static/js/jquery-1.11.2.min.js'></script> <!--script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js'></script--> -<script src='/static/bootstrap/js/bootstrap.js'></script> -<script src='/static/js/ripples.min.js'></script> -<script src='/static/js/material.min.js'></script> +<script src='/static/js/functions.js' type='text/javascript' charset='utf-8'></script> +<script src='/static/js/drag-drop.js' type='text/javascript' charset='utf-8'></script> <script> - $(document).ready(function() { - $.material.init(); - }); </script> -<script src='/static/js/app.js' type='text/javascript' charset='utf-8'></script> - </body> </html> diff --git a/views/header.html b/views/header.html index bd1a3b0..8b0f9f4 100644 --- a/views/header.html +++ b/views/header.html @@ -7,14 +7,9 @@ <meta name='viewport' content='width=device-width, initial-scale=1.0'> <title>{{.title}}</title> <!--link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css'--> - <link rel='stylesheet' type='text/css' href='/static/bootstrap/css/bootstrap.min.css'> - <link rel='stylesheet' type='text/css' href='/static/css/ripples.min.css'> - <link rel='stylesheet' type='text/css' href='/static/css/material-wfont.min.css'> - <link rel='stylesheet' type='text/css' href='/static/css/style.css'> + <link rel='stylesheet' type='text/css' href='/static/css/main.css'> + <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel='shortcut icon' type='image/png' href='/static/img/favicon.ico'> - {{range .moreStyles}} - <link rel='stylesheet' type='text/css' href='/public/{{.}}'> - {{end}} <noscript> <style>.navbar{margin-bottom:0;}</style> </noscript> diff --git a/views/index.html b/views/index.html index cc6ca9d..2c75c8b 100644 --- a/views/index.html +++ b/views/index.html @@ -1,32 +1,54 @@ {{template "header.html"}} {{template "navbar.html"}} +{{if .Sticky}} +<div class="container"> + <div class="row"> + <!--div class="col-md-6 col-md-offset-3"--> + <!--div class="col-md-4 col-md-offset-4 panel panel-danger shadow-z-2" role="panel"--> + <div class="panel panel-info shadow-z-2" role="panel" id="dd-sticky"> + <div class="panel-heading"><h3 class="panel-title">Information</h3></div> + <div class="panel-body"> + <strong>{{print .Sticky}}</strong> + </div> + </div> + <!--/div--> + </div> +</div> +{{end}} + <div class="container"> <div class="row"> <button id="btn-reload" class="btn btn-primary btn-raised"><span class="glyphicon glyphicon-refresh"></span> Reload</button> <!--a id="" class="btn btn-success btn-raised toggle"><span class="glyphicon glyphicon-refresh"></span> Show failure reasons</a--> - <table class="table table-striped table-hover "> + <table class="table table-striped table-hover table-responsive"> <thead> <th>#</th> <th>Host</th> - <th>Url</th> + <th>Description</th> <th>Status</th> <!--th>Status Code</th--> + <th>Last Update</th> <th class="hide">Failure Reason</th> </thead> <tbody> -{{range $index, $results := .}} +{{range $index, $results := .Hosts}} <tr class="{{.Class}}"> <td>{{add $index 1}}</td> - <td>{{.Host}}</td> - <td>{{.Url}}</td> + <td>{{.Host}} <a href="{{.Url}}" title="{{.Host}}" target="_blank"> <span class="fa fa-external-link-square"></span></a></td> + <td>{{.Description}}</td> <td>{{.Status}}</td> <!--td>{{.StatusCode}}</td--> + <td>{{.UpdatedAt}}</td> <td class="hide">{{.Reason}}</td> </tr> {{end}} </tbody> </table> + <p>Next run: <strong>{{.NextRun}}</strong></p> + <!--button class="admin-link btn btn-raised btn-default"><h4 class=""><span class="glyphicon glyphicon-cog"></span> Admin</h4></button--> + <!--h4 class="admin-link"><a class="" href="/admin" title="admin"><span class="glyphicon glyphicon-cog"></span> Admin</a></h4--> + <h4 class="admin-link"><a class="" href="/admin" title="admin"><span class="fa fa-cog"></span> Admin</a></h4> </div> </div> {{template "footer.html"}} diff --git a/views/jobs_modal.html b/views/jobs_modal.html index 9a85a59..84c6340 100644 --- a/views/jobs_modal.html +++ b/views/jobs_modal.html @@ -1,6 +1,10 @@ <div id="jobs-modal" class="modal fade" tabindex="-1"> - <div class="modal-dialog modal-lg"> + <div class="modal-dialog modal-lg" id="dd-jobs"> <div class="modal-content"> + <div class="modal-header"> + <!--button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button--> + <button class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + </div> <div class="modal-body"> <form class="form-horizontal" method='post' action='/new'> <fieldset> @@ -12,23 +16,33 @@ <!-- Text input--> <div class="form-group"> - <label class="col-md-4 control-label" for="Url">Job Url:</label> + <label class="col-md-4 control-label" for="Url">Server Url:</label> <div class="col-md-6"> <div class="input-group"> <input id="Url" name="Url" placeholder="Url to monitor." class="form-control input-md" required="" type="text"> <span class="input-group-addon"> - <input name="Private" type="checkbox"> Check as private. + <input name="Private" type="checkbox"> Mark as private. </span> </div> <span class="help-block">Check to mark this host as private.</span> </div> </div> + <!-- Text input--> + <div class="form-group"> + <label class="col-md-4 control-label" for="Description">Description:</label> + <div class="col-md-6"> + <div class="input-group"> + <input id="Description" name="Description" placeholder="Phrase in one sentence what this server does." class="form-control input-md" required="" type="text"> + </div> + </div> + </div> + <!-- Button --> <div class="form-group"> <label class="col-md-4 control-label" for="submit"></label> <div class="col-md-4"> - <button class="btn btn-primary">Submit</button> + <button class="btn btn-primary btn-raised">Submit</button> </div> </div> @@ -36,7 +50,7 @@ </form> </div> <div class="modal-footer"> - <button class="btn btn-danger" data-dismiss="modal">Dismiss</button> + <button class="btn btn-danger btn-raised" data-dismiss="modal">Dismiss</button> </div> </div> </div> diff --git a/views/navbar.html b/views/navbar.html index a8a2fe8..48e3877 100644 --- a/views/navbar.html +++ b/views/navbar.html @@ -3,12 +3,12 @@ <div class='navbar-header'> <a class='navbar-brand' href='/'><span class='glyphicon glyphicon-home'></span> Home</a> </div> - <div class="collapse navbar-collapse" id="navbarCollapse"> + <!--div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="nav navbar-nav navbar-right"> <li> <a class="" href="/admin" title="admin"><span class="glyphicon glyphicon-cog"></span> Admin</a> </li> </ul> - </div> + </div--> </div> </nav> diff --git a/views/register.html b/views/register.html index e69de29..2ed6468 100644 --- a/views/register.html +++ b/views/register.html @@ -0,0 +1,70 @@ +{{template "header.html"}} +{{template "navbar.html"}} +<div class="container"> + <div class="row"> +{{range .Error}} +<h4 class="col-md-4 col-md-offset-4 alert alert-danger alert-dismissible" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">×</span></button> + {{.}} +</h4> +{{end}} +{{range .Success}} +<h4 class="col-md-4 col-md-offset-4 alert alert-success alert-dismissible" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="close"><span aria-hidden="true">×</span></button> + {{.}} +</h4> +{{end}} + </div> +</div> +<div class="container"> + <div class="row"> + </div> +</div> +<div class="container"> + <div class="row"> +<form class="form-horizontal" method='post' action='/register'> + <fieldset> + + <!-- Form Name --> + <div class="text-center"> + <legend>Register!</legend> + </div> + + <!-- Text input--> + <div class="form-group"> + <label class="col-md-4 control-label" for="Name">Name:</label> + <div class="col-md-4"> + <input id="Name" name="Name" placeholder="Your Name" class="form-control input-md" required="" type="text"> + </div> + </div> + + <!-- Text input--> + <div class="form-group"> + <label class="col-md-4 control-label" for="Password">Password:</label> + <div class="col-md-4"> + <input id="Password" name="Password" placeholder="Your Password" class="form-control input-md" required="" type="password"> + </div> + </div> + + <!-- Text input--> + <div class="form-group"> + <label class="col-md-4 control-label" for="Email">Email:</label> + <div class="col-md-4"> + <input id="Email" name="Email" placeholder="Your Email" class="form-control input-md" required="" type="text"> + </div> + </div> + + <!-- Button --> + <div class="form-group"> + <label class="col-md-4 control-label" for="submit"></label> + <div class="col-md-4"> + <button class="btn btn-primary">Submit</button> + </div> + </div> + + </fieldset> +</form> + + </div> +</div> +{{template "footer.html"}} |
