routeros_backup/templates/view_export.html
2025-02-23 00:24:42 +01:00

31 lines
1.2 KiB
HTML

{% extends "base.html" %}
{% block content %}
<div class="container my-4">
<h2>Podgląd eksportu: {{ backup.file_path|basename }}</h2>
<hr>
<textarea id="exportEditor" readonly>{{ content|e }}</textarea>
<a href="{{ next_url }}" class="btn btn-secondary">Powrót</a>
</div>
<!-- CodeMirror CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/theme/neo.min.css">
<!-- CodeMirror JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/codemirror.min.js"></script>
<!-- Dodajemy tryb dla plików shell, który dobrze radzi sobie z konfiguracjami RouterOS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.5/mode/shell/shell.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
var editor = CodeMirror.fromTextArea(document.getElementById("exportEditor"), {
mode: "text/x-sh",
theme: "neo",
lineNumbers: true,
readOnly: true
});
// Dopasowanie rozmiaru edytora do zawartości
editor.setSize("100%", "800px");
});
</script>
{% endblock %}