Updates
This commit is contained in:
parent
e86ab53de5
commit
095bf52a2f
29 changed files with 2494 additions and 758 deletions
138
templates/debug/logs.html
Normal file
138
templates/debug/logs.html
Normal file
|
@ -0,0 +1,138 @@
|
|||
{ % extends
|
||||
"base.html" %}
|
||||
|
||||
{ % block
|
||||
title %}Debug
|
||||
Logs
|
||||
{ % endblock %}
|
||||
|
||||
{ % block
|
||||
content %}
|
||||
< div
|
||||
|
||||
|
||||
class ="page-header" >
|
||||
|
||||
< h1
|
||||
|
||||
|
||||
class ="page-title" > Debug Information < / h1 >
|
||||
|
||||
< / div >
|
||||
|
||||
< div
|
||||
|
||||
|
||||
class ="content-area" >
|
||||
|
||||
< div
|
||||
|
||||
|
||||
class ="debug-section" >
|
||||
|
||||
< h3 > Test
|
||||
RSS
|
||||
Feed < / h3 >
|
||||
< form
|
||||
id = "test-feed-form" >
|
||||
< input
|
||||
type = "url"
|
||||
id = "feed-url"
|
||||
placeholder = "Enter RSS feed URL"
|
||||
style = "width: 400px; padding: 8px;" >
|
||||
< button
|
||||
type = "submit"
|
||||
|
||||
|
||||
class ="btn btn-primary" > Test Feed < / button >
|
||||
|
||||
< / form >
|
||||
< div
|
||||
id = "feed-results"
|
||||
style = "margin-top: 20px;" > < / div >
|
||||
< / div >
|
||||
|
||||
< div
|
||||
|
||||
|
||||
class ="debug-section" style="margin-top: 30px;" >
|
||||
|
||||
< h3 > Recent
|
||||
Activity < / h3 >
|
||||
< div
|
||||
id = "recent-activity" >
|
||||
< p > Check
|
||||
browser
|
||||
console
|
||||
for detailed logs during podcast operations.< / p >
|
||||
< / div >
|
||||
< / div >
|
||||
< / div >
|
||||
|
||||
< script >
|
||||
document.getElementById('test-feed-form').addEventListener('submit', function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
const
|
||||
feedUrl = document.getElementById('feed-url').value;
|
||||
const
|
||||
resultsDiv = document.getElementById('feed-results');
|
||||
|
||||
if (!feedUrl)
|
||||
{
|
||||
resultsDiv.innerHTML = '<div style="color: #f56565;">Please enter a feed URL</div>';
|
||||
return;
|
||||
}
|
||||
|
||||
resultsDiv.innerHTML = '<div style="color: #63b3ed;">Testing feed...</div>';
|
||||
|
||||
fetch(` / debug / test - feed?url =${encodeURIComponent(feedUrl)}
|
||||
`)
|
||||
.then(response= > response.json())
|
||||
.then(data= > {
|
||||
if (data.success)
|
||||
{
|
||||
let
|
||||
html = `
|
||||
< div
|
||||
style = "color: #48bb78; margin-bottom: 10px;" >
|
||||
✓ Feed
|
||||
test
|
||||
successful! Found ${data.episodes_found}
|
||||
episodes
|
||||
< / div >
|
||||
< div
|
||||
style = "background: #2d3748; padding: 15px; border-radius: 5px; font-family: monospace; font-size: 12px;" >
|
||||
`;
|
||||
|
||||
data.episodes.forEach(episode= > {
|
||||
html += `
|
||||
< div
|
||||
style = "margin-bottom: 10px; border-bottom: 1px solid #4a5568; padding-bottom: 10px;" >
|
||||
< div
|
||||
style = "color: #63b3ed; font-weight: bold;" >${episode.title} < / div >
|
||||
< div
|
||||
style = "color: #a0aec0; margin: 5px 0;" >${episode.description} < / div >
|
||||
< div
|
||||
style = "color: #68d391; font-size: 11px;" > Published: ${episode.pub_date} < / div >
|
||||
< div
|
||||
style = "color: #fbb6ce; font-size: 11px;" > Audio: ${episode.audio_url} < / div >
|
||||
< / div >
|
||||
`;
|
||||
});
|
||||
|
||||
html += '</div>';
|
||||
resultsDiv.innerHTML = html;
|
||||
} else {
|
||||
resultsDiv.innerHTML = ` < div
|
||||
style = "color: #f56565;" >✗ Error: ${data.error} < / div > `;
|
||||
}
|
||||
})
|
||||
.catch(error= > {
|
||||
resultsDiv.innerHTML = ` < div
|
||||
style = "color: #f56565;" >✗ Network
|
||||
error: ${error.message} < / div > `;
|
||||
});
|
||||
});
|
||||
< / script >
|
||||
{ % endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue