'wdcli backup': Rework backup process
This commit reworks the backup process to dynamically find the list of components.
This commit is contained in:
parent
55bee7422d
commit
5cd5ae9be2
32 changed files with 361 additions and 279 deletions
55
internal/component/control/html/index.html
Normal file
55
internal/component/control/html/index.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="/dis/static/dis.css">
|
||||
<link rel="stylesheet" href="/dis/static/autolink.css">
|
||||
|
||||
<title>Distillery Status Page</title>
|
||||
<h1 id="top">Distillery Status Page</h1>
|
||||
|
||||
<h2 id="overview">Overview</h2>
|
||||
|
||||
<p>
|
||||
<b>Domain:</b> <code>{{.Config.DefaultDomain}}</code> <br />
|
||||
<b>Legacy Domain(s):</b> <code>{{.Config.SelfExtraDomains}}</code><br />
|
||||
<b>HTTPS Email:</b> <code>{{.Config.CertbotEmail}}</code><br />
|
||||
<hr />
|
||||
<b>Homepage Redirect:</b><a href="{{.Config.SelfRedirect}}" target="_blank" rel="noopener noreferrer">{{.Config.SelfRedirect}}</a><br />
|
||||
<hr />
|
||||
<b>Backup Age:</b> <code>{{.Config.MaxBackupAge}}</code> Day(s)<br />
|
||||
<hr />
|
||||
<b>Base Directory:</b> <code>{{.Config.DeployRoot}}</code><br />
|
||||
<b>Configuration File:</b> <code>{{.Config.ConfigPath}}</code><br />
|
||||
<b>Authorized_Keys File:</b> <code>{{.Config.GlobalAuthorizedKeysFile}}</code><br />
|
||||
<hr />
|
||||
<b>MySQL User Prefix:</b> <code>{{.Config.MysqlUserPrefix}}</code><br />
|
||||
<b>MySQL Database Prefix:</b> <code>{{.Config.MysqlDatabasePrefix}}</code><br />
|
||||
<b>GraphDB User Prefix:</b> <code>{{.Config.GraphDBUserPrefix}}</code><br />
|
||||
<b>GraphDB Database Prefix:</b> <code>{{.Config.GraphDBRepoPrefix}}</code><br />
|
||||
<hr />
|
||||
<b>Bookkeeping Database:</b> <code>{{.Config.DistilleryBookkeepingDatabase}}</code><br />
|
||||
<b>Bookkeeping Table:</b> <code>{{.Config.DistilleryBookkeepingTable}}</code><br />
|
||||
</p>
|
||||
|
||||
<h2 id="instances">Instances</h2>
|
||||
|
||||
<p>
|
||||
<code>{{ .TotalCount }}</code> instance(s) = <code>{{ .RunningCount }}</code> running + <code>{{ .StoppedCount }}</code> stopped<br />
|
||||
</p>
|
||||
|
||||
{{range .Instances}}
|
||||
<div class="wisski {{ if .Running }}running{{ else }}stopped{{ end }}">
|
||||
<h3 id="instance-{{.Slug}}">{{.Slug}}{{ if not .Running }} <small>not running</small>{{ end }}</h3>
|
||||
<p>
|
||||
<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{.URL}}</a><br />
|
||||
|
||||
<small>
|
||||
<a href="/dis/instance/{{.Slug}}">More Details</a>
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<footer>
|
||||
Generated at <code>{{ .Time }}</code>
|
||||
</footer>
|
||||
|
||||
<script src="/dis/static/autolink.js"></script>
|
||||
36
internal/component/control/html/instance.html
Normal file
36
internal/component/control/html/instance.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="stylesheet" href="/dis/static/dis.css">
|
||||
<link rel="stylesheet" href="/dis/static/autolink.css">
|
||||
|
||||
<title>Distillery Status Page - {{ .Info.Slug }}</title>
|
||||
<h1 id="top">Distillery Status Page - {{ .Info.Slug }}</h1>
|
||||
<p>
|
||||
<a href="/dis/index">Back to index</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Slug:</b> <code>{{ .Info.Slug }}</code> <br />
|
||||
<b>URL:</b> <a href="{{ .Info.URL }}" target="_blank" rel="noopener noreferrer">{{ .Info.URL }}</a> <br />
|
||||
<hr />
|
||||
<b>Running:</b> <code>{{ .Info.Running }}</code> <br />
|
||||
<hr />
|
||||
<b>Created:</b> <code>{{ .Instance.Created }}</code> <br />
|
||||
<b>OwnerEmail:</b> <code>{{ .Instance.OwnerEmail }}</code> <br />
|
||||
<hr />
|
||||
<b>FilesystemBase:</b> <code>{{ .Instance.FilesystemBase }}</code> <br />
|
||||
<b>AutoBlindUpdateEnabled:</b> <code>{{ .Instance.AutoBlindUpdateEnabled }}</code> <br />
|
||||
<hr />
|
||||
<b>Pathbuilders:</b> <code>{{ .Info.Pathbuilders }}</code> <br />
|
||||
<hr />
|
||||
<b>SqlDatabase:</b> <code>{{ .Instance.SqlDatabase }}</code> <br />
|
||||
<b>SqlUsername:</b> <code>{{ .Instance.SqlUsername }}</code> <br />
|
||||
<hr />
|
||||
<b>GraphDBRepository:</b> <code>{{ .Instance.GraphDBRepository }}</code> <br />
|
||||
<b>GraphDBUsername:</b> <code>{{ .Instance.GraphDBUsername }}</code> <br />
|
||||
</p>
|
||||
|
||||
<footer>
|
||||
Generated at <code>{{ .Time }}</code>
|
||||
</footer>
|
||||
|
||||
<script src="/dis/static/autolink.js"></script>
|
||||
20
internal/component/control/html/static/autolink.css
Normal file
20
internal/component/control/html/static/autolink.css
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
.header-link {
|
||||
position: relative;
|
||||
left: 0.5em;
|
||||
opacity: 0;
|
||||
font-size: 0.8em;
|
||||
|
||||
-webkit-transition: opacity 0.2s ease-in-out 0.1s;
|
||||
-moz-transition: opacity 0.2s ease-in-out 0.1s;
|
||||
-ms-transition: opacity 0.2s ease-in-out 0.1s;
|
||||
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h2:hover .header-link,
|
||||
h3:hover .header-link,
|
||||
h4:hover .header-link,
|
||||
h5:hover .header-link,
|
||||
h6:hover .header-link {
|
||||
opacity: 1;
|
||||
}
|
||||
24
internal/component/control/html/static/autolink.js
Normal file
24
internal/component/control/html/static/autolink.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/** adding links to each item, see http://blog.parkermoore.de/2014/08/01/header-anchor-links-in-vanilla-javascript-for-github-pages-and-jekyll/ */
|
||||
var anchorForId = function (id) {
|
||||
var anchor = document.createElement("a");
|
||||
anchor.className = "header-link";
|
||||
anchor.href = "#" + id;
|
||||
anchor.innerHTML = "#";
|
||||
return anchor;
|
||||
};
|
||||
|
||||
var linkifyAnchors = function (level) {
|
||||
var headers = document.getElementsByTagName("h" + level);
|
||||
for (var h = 0; h < headers.length; h++) {
|
||||
var header = headers[h];
|
||||
|
||||
if (typeof header.id !== "undefined" && header.id !== "") {
|
||||
header.appendChild(anchorForId(header.id));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
for (var level = 1; level <= 6; level++) {
|
||||
linkifyAnchors(level);
|
||||
}
|
||||
67
internal/component/control/html/static/dis.css
Normal file
67
internal/component/control/html/static/dis.css
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
html {
|
||||
line-height: 1.5;
|
||||
font-family: Roboto;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
background-color: #fdfdfd;
|
||||
}
|
||||
body {
|
||||
margin: 0 auto;
|
||||
max-width: 36em;
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
padding-top: 50px;
|
||||
padding-bottom: 50px;
|
||||
hyphens: auto;
|
||||
overflow-wrap: break-word;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-kerning: normal;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
body {
|
||||
font-size: 0.9em;
|
||||
padding: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 1.4em;
|
||||
}
|
||||
|
||||
h2,h3 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Roboto Mono;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 1em 0;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
footer {
|
||||
border-top: 1px solid #1a1a1a;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wisski {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.wisski.running {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.wisski.stopped {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue