Test Code
2025-06-01
Test Code
@app.route('/', methods=['GET'])
def index():
return '''
<!DOCTYPE html>
<html>
<head>
<title>AppRunner UI Demo</title>
</head>
<body>
<h1>Welcome to AppRunner Flask UI</h1>
<textarea id="input" rows="6" cols="50" placeholder="Paste IPs or logs here..."></textarea><br><br>
<button onclick="analyze()">Analyze</button>
<pre id="output"></pre>
<script>
function analyze() {
const text = document.getElementById('input').value;
fetch('/analyze', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({text})
})
.then(res => res.json())
.then(data => {
document.getElementById('output').textContent = JSON.stringify(data, null, 2);
});
}
</script>
</body>
</html>
'''