mirror of https://github.com/statping/statping
194 lines
9.5 KiB
HTML
194 lines
9.5 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="https://assets.statup.io/bootstrap.min.css">
|
|
<link rel="stylesheet" href="https://assets.statup.io/codemirror.css">
|
|
<link rel="stylesheet" href="https://assets.statup.io/codemirror-colorpicker.css"/>
|
|
<link rel="stylesheet" href="/css/base.css">
|
|
|
|
<title>Statup | Settings</title>
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<div class="container col-md-7 col-sm-12 mt-md-5 bg-light">
|
|
|
|
|
|
{{template "nav"}}
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-3 col-sm-12">
|
|
|
|
<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>
|
|
<a class="nav-link" id="v-pills-style-tab" data-toggle="pill" href="#v-pills-style" role="tab" aria-controls="v-pills-style" aria-selected="false">Theme Editor</a>
|
|
<a class="nav-link" id="v-pills-email-tab" data-toggle="pill" href="#v-pills-email" role="tab" aria-controls="v-pills-email" aria-selected="true">Email Settings</a>
|
|
{{ range .Communications }}
|
|
|
|
{{ end }}
|
|
<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="false">Browse Plugins</a>
|
|
{{ range .Plugins }}
|
|
<a class="nav-link text-capitalize" id="v-pills-{{underscore .Name}}-tab" data-toggle="pill" href="#v-pills-{{underscore .Name}}" role="tab" aria-controls="v-pills-profile" aria-selected="false">{{.Name}}</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8 col-sm-12">
|
|
<div class="tab-content" id="v-pills-tabContent">
|
|
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">
|
|
<h3>Settings</h3>
|
|
|
|
<form method="POST" action="/settings">
|
|
|
|
<div class="form-group">
|
|
<label for="project">Project Name</label>
|
|
<input type="text" name="project" class="form-control" value="{{ .Name }}" id="project" placeholder="Great Uptime">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="description">Project Description</label>
|
|
<input type="text" name="description" class="form-control" value="{{ .Description }}" id="description" placeholder="Great Uptime">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="domain">Domain</label>
|
|
<input type="text" name="domain" class="form-control" value="{{ .Domain }}" id="domain">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="footer">Custom Footer</label>
|
|
<textarea rows="4" name="footer" class="form-control" id="footer">{{ .Footer }}</textarea>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary btn-block">Save Settings</button>
|
|
|
|
<div class="form-group mt-3">
|
|
<label for="api_key">API Key</label>
|
|
<input type="text" class="form-control" value="{{ .ApiKey }}" id="api_key" readonly>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="api_secret">API Secret</label>
|
|
<input type="text" class="form-control" value="{{ .ApiSecret }}" id="api_secret" readonly>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="v-pills-style" role="tabpanel" aria-labelledby="v-pills-style-tab">
|
|
|
|
{{if not .UsingAssets }}
|
|
<a href="/settings/build" class="btn btn-primary btn-block">Enable Local Assets</a>
|
|
{{ else }}
|
|
<form method="POST" action="/settings/css">
|
|
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
|
<li class="nav-item col text-center">
|
|
<a class="nav-link active" id="pills-vars-tab" data-toggle="pill" href="#pills-vars" role="tab" aria-controls="pills-vars" aria-selected="true">Variables</a>
|
|
</li>
|
|
<li class="nav-item col text-center">
|
|
<a class="nav-link" id="pills-theme-tab" data-toggle="pill" href="#pills-theme" role="tab" aria-controls="pills-theme" aria-selected="false">Base Theme</a>
|
|
</li>
|
|
</ul>
|
|
<div class="tab-content" id="pills-tabContent">
|
|
<div class="tab-pane show active" id="pills-vars" role="tabpanel" aria-labelledby="pills-vars-tab">
|
|
<textarea name="variables" id="sass_vars">{{ .SassVars }}</textarea>
|
|
</div>
|
|
<div class="tab-pane" id="pills-theme" role="tabpanel" aria-labelledby="pills-theme-tab">
|
|
<textarea name="theme" id="theme_css">{{ .BaseSASS }}</textarea>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-block mt-2">Save Style</button>
|
|
</form>
|
|
{{end}}
|
|
</div>
|
|
|
|
{{ range .Communications }}
|
|
<div class="tab-pane fade" id="v-pills-{{ .Method }}" role="tabpanel" aria-labelledby="v-pills-{{ .Method }}-tab">
|
|
|
|
<form method="POST" action="/settings/{{ .Method }}">
|
|
|
|
<div class="form-group">
|
|
<label for="host">SMTP Host</label>
|
|
<input type="text" name="host" class="form-control" value="{{ .Host }}" id="host" placeholder="Great Uptime">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="username">SMTP Username</label>
|
|
<input type="text" name="username" class="form-control" value="{{ .Username }}" id="username" placeholder="Great Uptime">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">SMTP Password</label>
|
|
<input type="password" name="password" class="form-control" value="{{ .Password }}" id="password">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="port">SMTP Port</label>
|
|
<input type="number" name="port" class="form-control" value="{{ .Port }}" id="port" placeholder="587">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="address">Outgoing Email Address</label>
|
|
<input type="text" name="address" class="form-control" value="{{ .Var1 }}" id="address" placeholder="noreply@domain.com">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="limit">Limit Emails per Hour</label>
|
|
<input type="number" name="limit" class="form-control" value="30" id="limit" placeholder="noreply@domain.com">
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary btn-block">Save Email Settings</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
{{ end }}
|
|
|
|
<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>
|
|
|
|
{{ range .Plugins }}
|
|
|
|
<div class="tab-pane fade" id="v-pills-{{underscore .Name}}" role="tabpanel" aria-labelledby="v-pills-{{underscore .Name}}-tab">
|
|
|
|
<h4 class="text-capitalize">{{ .Name }}</h4>
|
|
<span class="text-muted">{{ .Description }}</span>
|
|
|
|
<div class="mt-1">
|
|
{{ safe .Form }}
|
|
</div>
|
|
|
|
</div>
|
|
{{end}}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "footer"}}
|
|
|
|
<script src="https://assets.statup.io/jquery-3.3.1.slim.min.js"></script>
|
|
<script src="https://assets.statup.io/bootstrap.min.js"></script>
|
|
<script src="https://assets.statup.io/codemirror.js"></script>
|
|
<script src="https://assets.statup.io/css.js"></script>
|
|
<script src="https://assets.statup.io/codemirror-colorpicker.min.js"></script>
|
|
<script src="/js/main.js"></script>
|
|
|
|
</body>
|
|
</html> |