statping/html/tmpl/plugins.html

102 lines
4.5 KiB
HTML
Raw Normal View History

2018-06-10 01:31:13 +00:00
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/base.css">
2018-06-11 03:41:02 +00:00
<title>Statup | Plugins</title>
2018-06-10 01:31:13 +00:00
</head>
<body>
<div class="container">
2018-06-12 07:21:16 +00:00
2018-06-11 03:41:02 +00:00
{{template "nav"}}
2018-06-10 01:31:13 +00:00
<div class="row">
2018-06-11 03:41:02 +00:00
<div class="col-4">
2018-06-10 01:31:13 +00:00
2018-06-11 03:41:02 +00:00
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href="#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true">Settings</a>
2018-06-12 07:21:16 +00:00
<a class="nav-link" id="v-pills-browse-tab" data-toggle="pill" href="#v-pills-browse" role="tab" aria-controls="v-pills-home" aria-selected="true">Browse Plugins</a>
2018-06-12 05:23:30 +00:00
{{ range .Plugins }}
2018-06-11 09:58:41 +00:00
<a class="nav-link text-capitalize" id="v-pills-{{.Name}}-tab" data-toggle="pill" href="#v-pills-{{.Name}}" role="tab" aria-controls="v-pills-profile" aria-selected="false">{{.Name}}</a>
2018-06-12 05:23:30 +00:00
{{end}}
2018-06-11 03:41:02 +00:00
</div>
</div>
<div class="col-8">
<div class="tab-content" id="v-pills-tabContent">
2018-06-12 07:21:16 +00:00
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
<h3>Settings</h3>
2018-06-19 00:01:03 +00:00
<form method="POST" action="/settings">
<div class="form-group">
<label for="formGroupExampleInput">Project Name</label>
<input type="text" name="project" class="form-control" value="{{ .Name }}" id="formGroupExampleInput" placeholder="Great Uptime">
</div>
<div class="form-group">
<label for="formGroupExampleInput">Project Description</label>
<input type="text" name="description" class="form-control" value="{{ .Description }}" id="formGroupExampleInput" placeholder="Great Uptime">
</div>
<button type="submit" class="btn btn-primary btn-block">Save Settings</button>
</form>
2018-06-12 07:21:16 +00:00
</div>
<div class="tab-pane fade" id="v-pills-browse" role="tabpanel" aria-labelledby="v-pills-browse-tab">
{{ range .Repos }}
<div class="card col-6" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">{{ .Name }}</h5>
<p class="card-text">{{ .Description }}</p>
<a href="/plugins/download/{{ .Name }}" class="card-link">Add</a>
</div>
</div>
{{ end }}
</div>
2018-06-11 09:58:41 +00:00
2018-06-12 05:23:30 +00:00
{{ range .Plugins }}
2018-06-14 06:38:15 +00:00
2018-06-12 05:23:30 +00:00
<div class="tab-pane fade" id="v-pills-{{.Name}}" role="tabpanel" aria-labelledby="v-pills-{{.Name}}-tab">
2018-06-14 01:19:00 +00:00
<h4 class="text-capitalize">{{ .Name }}</h4>
<span class="text-muted">{{ .Description }}</span>
2018-06-14 06:38:15 +00:00
<form class="mt-3" method="POST" action="/plugins/{{.Name}}/save">
{{ range .Form }}
<div class="form-group">
<label for="input_{{ .InputName }}" class="text-capitalize">{{ .Name }}</label>
<input type="text" class="form-control" name="{{ .InputName }}" value="{{ .Value }}" id="input_{{ .InputName }}" placeholder="Example input" aria-describedby="help_{{ .InputName }}">
{{ if .Description }}
<small id="help_{{ .InputName }}" class="form-text text-muted">
{{ .Description }}
</small>
{{ end }}
</div>
{{ end }}
<button type="submit" class="btn btn-primary">Save</button>
</form>
2018-06-12 05:23:30 +00:00
</div>
{{end}}
2018-06-11 09:58:41 +00:00
2018-06-11 03:41:02 +00:00
</div>
2018-06-10 01:31:13 +00:00
</div>
</div>
</div>
<script src="/js/jquery-3.3.1.slim.min.js"></script>
2018-06-11 03:41:02 +00:00
<script src="/js/bootstrap.min.js"></script>
2018-06-10 01:31:13 +00:00
</body>
</html>