Files
api7-demo/web/templates/base.html
d.viti ed660dce5a
Some checks failed
Helm Chart Build / lint-only (push) Has been skipped
Helm Chart Build / build-helm (push) Successful in 9s
Build and Deploy / build-api (push) Successful in 33s
Build and Deploy / build-web (push) Failing after 41s
Add LLM endpoints, web frontend, and rate limiting config
- Added OpenAI-compatible LLM endpoints to API backend - Introduced web
frontend with Jinja2 templates and static assets - Implemented API proxy
routes in web service - Added sample db.json data for items, users,
orders, reviews, categories, llm_requests - Updated ADC and Helm configs
for separate AI and standard rate limiting - Upgraded FastAPI, Uvicorn,
and added httpx, Jinja2, python-multipart dependencies - Added API
configuration modal and client-side JS for web app
2025-10-07 17:29:12 +02:00

96 lines
3.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{% block title %}API Demo{% endblock %}</title>
<link rel="stylesheet" href="/static/css/style.css" />
</head>
<body>
<nav class="navbar">
<div class="container">
<div class="nav-brand">
<h2>🚀 API7EE Demo</h2>
</div>
<ul class="nav-menu">
<li><a href="/">Home</a></li>
<li><a href="/items">Items</a></li>
<li><a href="/users">Users</a></li>
<li><a href="/llm">LLM Chat</a></li>
<li><a href="/api/docs" target="_blank">API Docs</a></li>
<li>
<a href="#" onclick="openApiConfig(event)"
>⚙️ API Config</a
>
</li>
</ul>
</div>
</nav>
<!-- API Configuration Modal -->
<div id="api-config-modal" class="modal">
<div class="modal-content">
<div class="modal-header">
<h2>⚙️ API Configuration</h2>
<span class="close" onclick="closeApiConfig()"
>&times;</span
>
</div>
<div class="modal-body">
<p>Configure the base URL for API requests:</p>
<div class="form-group">
<label for="api-base-url">API Base URL:</label>
<input
type="text"
id="api-base-url"
placeholder="https://commandware.it/api"
class="form-control"
/>
<small class="form-hint">
Examples:
<code>/api</code> (relative),
<code>https://commandware.it/api</code> (absolute),
<code>http://localhost:8001</code> (local)
</small>
</div>
<div class="form-group">
<label>Current Configuration:</label>
<div class="config-info">
<strong>Base URL:</strong>
<span id="current-api-url">-</span>
</div>
</div>
<div class="modal-actions">
<button
class="btn btn-primary"
onclick="saveApiConfig()"
>
Save Configuration
</button>
<button
class="btn btn-secondary"
onclick="resetApiConfig()"
>
Reset to Default
</button>
<button class="btn" onclick="closeApiConfig()">
Cancel
</button>
</div>
</div>
</div>
</div>
<main class="container">{% block content %}{% endblock %}</main>
<footer class="footer">
<div class="container">
<p>&copy; 2025 API7EE Demo | Powered by FastAPI & API7</p>
</div>
</footer>
<script src="/static/js/app.js"></script>
{% block scripts %}{% endblock %}
</body>
</html>