-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9407161
commit e89af93
Showing
2 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Login</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f7f8fa; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
padding: 20px; /* Added padding for smaller screens */ | ||
box-sizing: border-box; | ||
} | ||
|
||
.login-container { | ||
background: white; | ||
width: 100%; | ||
max-width: 400px; | ||
padding: 30px; | ||
border-radius: 8px; | ||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.login-container h1 { | ||
text-align: center; | ||
margin-bottom: 20px; | ||
font-size: 24px; | ||
color: #333; | ||
} | ||
|
||
.login-container label { | ||
font-weight: bold; | ||
margin-bottom: 5px; | ||
display: block; | ||
} | ||
|
||
.login-container input { | ||
width: 100%; | ||
padding: 10px 0px; | ||
margin-bottom: 20px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
} | ||
|
||
.login-container button { | ||
width: 100%; | ||
background-color: #4caf50; | ||
color: white; | ||
padding: 10px; | ||
border: none; | ||
border-radius: 4px; | ||
font-size: 16px; | ||
cursor: pointer; | ||
} | ||
|
||
.login-container button:hover { | ||
background-color: #45a049; | ||
} | ||
|
||
@media (max-width: 480px) { | ||
.login-container { | ||
padding: 20px; /* Reduce padding for smaller screens */ | ||
} | ||
.login-container h1 { | ||
font-size: 20px; /* Adjust font size */ | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="login-container"> | ||
<h1>Login</h1> | ||
<form action="/logs" method="GET"> | ||
<label for="username">Username</label> | ||
<input type="text" id="username" name="username" required> | ||
<label for="password">Password</label> | ||
<input type="password" id="password" name="password" required> | ||
<button type="submit">Login</button> | ||
</form> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Logs</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f7f8fa; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.container { | ||
max-width: 1200px; | ||
margin: 20px auto; | ||
padding: 20px; | ||
background: white; | ||
border-radius: 8px; | ||
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
h1 { | ||
text-align: center; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.filters { | ||
display: flex; | ||
gap: 20px; | ||
flex-wrap: wrap; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.filters input, .filters select { | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
flex: 1; | ||
min-width: 150px; | ||
} | ||
|
||
.filters button { | ||
background-color: #007bff; | ||
color: white; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
} | ||
|
||
.filters button:hover { | ||
background-color: #0056b3; | ||
} | ||
|
||
.table-wrapper { | ||
overflow-x: auto; /* Enable horizontal scrolling for the table */ | ||
} | ||
|
||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
|
||
table th, table td { | ||
padding: 12px 15px; | ||
text-align: left; | ||
border: 1px solid #ddd; | ||
} | ||
|
||
table th { | ||
background-color: #f4f4f4; | ||
} | ||
|
||
table tr:nth-child(even) { | ||
background-color: #f9f9f9; | ||
} | ||
|
||
.no-data { | ||
text-align: center; | ||
padding: 20px; | ||
color: #777; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.filters { | ||
gap: 10px; | ||
} | ||
.filters input, .filters select, .filters button { | ||
padding: 8px; | ||
} | ||
} | ||
|
||
@media (max-width: 480px) { | ||
h1 { | ||
font-size: 18px; /* Reduce title size for smaller screens */ | ||
} | ||
|
||
.filters { | ||
flex-direction: column; /* Stack filters vertically */ | ||
gap: 15px; | ||
} | ||
|
||
.filters button { | ||
width: 100%; /* Make button full width */ | ||
} | ||
|
||
table th, table td { | ||
font-size: 12px; /* Adjust font size for table */ | ||
padding: 8px; /* Reduce padding */ | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Request Logs</h1> | ||
|
||
<!-- Filters --> | ||
<form class="filters" method="GET" action="/logs"> | ||
<input type="datetime-local" name="start_time" placeholder="Start Time"> | ||
<input type="datetime-local" name="end_time" placeholder="End Time"> | ||
<select name="method"> | ||
<option value="">All Methods</option> | ||
<option value="GET">GET</option> | ||
<option value="POST">POST</option> | ||
<option value="PUT">PUT</option> | ||
<option value="DELETE">DELETE</option> | ||
</select> | ||
<input type="text" name="path" placeholder="Endpoint Path"> | ||
<button type="submit">Filter</button> | ||
</form> | ||
|
||
<!-- Logs Table --> | ||
<div class="table-wrapper"> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Method</th> | ||
<th>Path</th> | ||
<th>Status</th> | ||
<th>IP</th> | ||
<th>Params</th> | ||
<th>Body</th> | ||
<th>Time</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<!-- Example Log --> | ||
<tr> | ||
<td>GET</td> | ||
<td>/api/books</td> | ||
<td>200</td> | ||
<td>192.168.1.1</td> | ||
<td>{"query":"author=John"}</td> | ||
<td></td> | ||
<td>2025-01-24 10:00:00</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<!-- No Data Message --> | ||
<div class="no-data" style="display: none;">No logs found for the selected filters.</div> | ||
</div> | ||
</body> | ||
</html> |