웹 UI 추가 및 Dockerfile 추가

This commit is contained in:
2026-01-05 10:00:41 +09:00
parent a1ecf4c634
commit 40a75959db
8 changed files with 591 additions and 28 deletions

27
templates/index.html Normal file
View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<title>Ingress Migrator</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="container">
<h1>Ingress Migrator</h1>
<div class="card">
<form method="post">
<label>From ingressClass</label>
<input name="from_class" value="nginx">
<label>To ingressClass</label>
<input name="to_class" value="haproxy">
<label>Namespace (optional)</label>
<input name="namespace">
<button type="submit">Run Migration</button>
</form>
</div>
</div>
</body>
</html>

44
templates/preview.html Normal file
View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Result</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<div class="container">
<h1>Migration Result</h1>
<div class="card">
<h2>Converted YAML</h2>
{% for ns, files in yaml_tree.items() %}
<h4>{{ ns }}</h4>
<ul>
{% for f in files %}
<li><a href="/view/{{ job_id }}/yaml/{{ ns }}/{{ f }}">{{ f }}</a></li>
{% endfor %}
</ul>
{% endfor %}
</div>
<div class="card">
<h2>Original Backup</h2>
{% for ns, files in backup_tree.items() %}
<h4>{{ ns }}</h4>
<ul>
{% for f in files %}
<li><a href="/view/{{ job_id }}/backup/{{ ns }}/{{ f }}">{{ f }}</a></li>
{% endfor %}
</ul>
{% endfor %}
</div>
<div class="card">
<a href="/report/{{ job_id }}">📄 migration-report.md</a><br><br>
<a href="/download/{{ result_zip }}">⬇ result.zip</a><br>
<a href="/download/{{ backup_zip }}">⬇ backup.zip</a>
</div>
</div>
</body>
</html>

2
templates/report.html Normal file
View File

@@ -0,0 +1,2 @@
<h2>Migration Report</h2>
<pre>{{ content }}</pre>