41 lines
1.6 KiB
HTML
41 lines
1.6 KiB
HTML
{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
|
|
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
|
|
|
|
{{define "title"}}Import {{.Zone}}{{end}}
|
|
{{define "content"}}<p class="crumbs"><a href="/">Zones</a> / <a id="zone-link" href="/">{{.Zone}}</a></p>
|
|
<div class="page-head">
|
|
<h1>Import into {{.Zone}}</h1>
|
|
</div>
|
|
<section class="card" aria-labelledby="import-source-title">
|
|
<h2 id="import-source-title">Zone file</h2>
|
|
<form class="form" id="import-form" novalidate>
|
|
<fieldset class="field">
|
|
<legend>Mode</legend>
|
|
<label class="choice"><input type="radio" name="mode" value="merge" checked> Merge: add missing records and update TTLs</label>
|
|
<label class="choice"><input type="radio" name="mode" value="replace"> Replace: also delete records that are not in the file</label>
|
|
</fieldset>
|
|
<div class="field">
|
|
<label for="import-file">Load a file</label>
|
|
<input id="import-file" type="file" accept=".zone,.txt,text/plain">
|
|
</div>
|
|
<div class="field">
|
|
<label for="import-content">Zone file contents</label>
|
|
<textarea id="import-content" name="content" rows="14" class="mono" spellcheck="false" autocomplete="off" autocapitalize="none"></textarea>
|
|
</div>
|
|
<div class="actions">
|
|
<button type="submit" class="btn btn-primary" id="import-preview">Preview</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="card" id="import-result" aria-labelledby="import-result-title" hidden>
|
|
<h2 id="import-result-title">Preview</h2>
|
|
<div id="import-errors" hidden></div>
|
|
<div id="import-summary"></div>
|
|
<div id="import-tables"></div>
|
|
<div class="actions">
|
|
<button type="button" class="btn btn-primary" id="import-apply" hidden>Apply import</button>
|
|
</div>
|
|
</section>
|
|
{{end}}
|