기능 추가
This commit is contained in:
28
templates/apply_result.html
Normal file
28
templates/apply_result.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
<div class="card">
|
||||
<p><strong>Status:</strong> {{ status }}</p>
|
||||
<p><strong>Command:</strong></p>
|
||||
<pre>{{ command }}</pre>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>kubectl output</h3>
|
||||
<pre>{{ output }}</pre>
|
||||
</div>
|
||||
|
||||
<div class="card actions-row">
|
||||
<button onclick="history.back()">Back</button>
|
||||
<a class="btn" href="/">Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -9,15 +9,21 @@
|
||||
<h1>Ingress Migrator</h1>
|
||||
|
||||
<div class="card">
|
||||
<form method="post">
|
||||
<label>From ingressClass</label>
|
||||
<input name="from_class" value="nginx">
|
||||
<form method="post" class="form-grid">
|
||||
<div class="field">
|
||||
<label>From ingressClass</label>
|
||||
<input name="from_class" value="nginx">
|
||||
</div>
|
||||
|
||||
<label>To ingressClass</label>
|
||||
<input name="to_class" value="haproxy">
|
||||
<div class="field">
|
||||
<label>To ingressClass</label>
|
||||
<input name="to_class" value="haproxy">
|
||||
</div>
|
||||
|
||||
<label>Namespace (optional)</label>
|
||||
<input name="namespace">
|
||||
<div class="field">
|
||||
<label>Namespace (optional)</label>
|
||||
<input name="namespace">
|
||||
</div>
|
||||
|
||||
<button type="submit">Run Migration</button>
|
||||
</form>
|
||||
|
||||
@@ -1,44 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Result</title>
|
||||
<title>Ingress Migrator - Preview</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
||||
<h1>Migration Result</h1>
|
||||
<h1>Migration Preview</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 %}
|
||||
<h3>Converted YAML</h3>
|
||||
<ul>
|
||||
{% for ns, files in yaml_tree.items() %}
|
||||
<li><strong>{{ ns }}</strong>
|
||||
<ul>
|
||||
{% for f in files %}
|
||||
<li>
|
||||
<a href="/view/{{ job_id }}/yaml/{{ ns }}/{{ f }}">{{ f }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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 %}
|
||||
<h3>Original Backup</h3>
|
||||
<ul>
|
||||
{% for ns, files in backup_tree.items() %}
|
||||
<li><strong>{{ ns }}</strong>
|
||||
<ul>
|
||||
{% for f in files %}
|
||||
<li>
|
||||
<a href="/view/{{ job_id }}/backup/{{ ns }}/{{ f }}">{{ f }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</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 class="card actions-row">
|
||||
<a class="btn" href="/report/{{ job_id }}">View Migration Report</a>
|
||||
<a class="btn" href="/download/{{ result_zip }}">Download Result ZIP</a>
|
||||
<a class="btn" href="/download/{{ backup_zip }}">Download Backup ZIP</a>
|
||||
</div>
|
||||
<div class="card actions-row">
|
||||
<form method="post" action="/apply/{{ job_id }}/yaml">
|
||||
<button class="btn btn-danger" type="submit">Replace Converted YAML</button>
|
||||
</form>
|
||||
<form method="post" action="/apply/{{ job_id }}/backup">
|
||||
<button class="btn" type="submit">Rollback from Backup</button>
|
||||
</form>
|
||||
<button onclick="history.back()">Back</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,2 +1,20 @@
|
||||
<h2>Migration Report</h2>
|
||||
<pre>{{ content }}</pre>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Migration Report</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Migration Report</h1>
|
||||
|
||||
<div class="card">
|
||||
<pre>{{ content }}</pre>
|
||||
</div>
|
||||
|
||||
<div class="card actions-row">
|
||||
<button class="btn" onclick="history.back()">Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
33
templates/view.html
Normal file
33
templates/view.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>{{ title }}</h2>
|
||||
|
||||
<div class="card">
|
||||
{% if editable %}
|
||||
<form method="post">
|
||||
<textarea name="content" class="editor">{{ content }}</textarea>
|
||||
|
||||
<div class="actions-row" style="margin-top:16px;">
|
||||
<button type="submit">Save</button>
|
||||
<button type="button" onclick="history.back()">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<pre>{{ content }}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not editable %}
|
||||
<div class="card actions-row">
|
||||
<button onclick="history.back()">Back</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user