...
This commit is contained in:
1
pkg/servers/ui/views/pages/.gitkeep
Normal file
1
pkg/servers/ui/views/pages/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
# This file is intentionally left blank to ensure the directory is tracked by Git.
|
22
pkg/servers/ui/views/pages/dashboard.jet
Normal file
22
pkg/servers/ui/views/pages/dashboard.jet
Normal file
@@ -0,0 +1,22 @@
|
||||
{{ extends "pkg/servers/ui/views/layouts/base.jet" }}
|
||||
|
||||
{{ block title() }}Dashboard - HeroApp UI{{ end }}
|
||||
|
||||
{{ block body() }}
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">Dashboard</h1>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<p>Welcome to the HeroApp UI Dashboard!</p>
|
||||
<p>This is a placeholder page. More content will be added here.</p>
|
||||
<!-- Example of using a Bootstrap component -->
|
||||
<div class="alert alert-info" role="alert">
|
||||
System status: All systems nominal.
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ block scripts() }}
|
||||
<!-- Add any page-specific scripts here if needed -->
|
||||
{{ end }}
|
39
pkg/servers/ui/views/pages/login.jet
Normal file
39
pkg/servers/ui/views/pages/login.jet
Normal file
@@ -0,0 +1,39 @@
|
||||
{{ extends "pkg/servers/ui/views/layouts/base.jet" }}
|
||||
|
||||
{{ block title() }}Login - HeroApp UI{{ end }}
|
||||
|
||||
{{ block body() }}
|
||||
<div class="container mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3 class="text-center">Login</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="/login" method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
<div class="d-grid">
|
||||
<button type="submit" class="btn btn-primary">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card-footer text-center">
|
||||
<small>© 2025 HeroApp</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ block scripts() }}
|
||||
<!-- Add any page-specific scripts here if needed -->
|
||||
{{ end }}
|
54
pkg/servers/ui/views/pages/process_manager.jet
Normal file
54
pkg/servers/ui/views/pages/process_manager.jet
Normal file
@@ -0,0 +1,54 @@
|
||||
{{ extends "pkg/servers/ui/views/layouts/base.jet" }}
|
||||
|
||||
{{ block title() }}Process Manager - HeroApp UI{{ end }}
|
||||
|
||||
{{ block body() }}
|
||||
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">Process Manager</h1>
|
||||
<div class="btn-toolbar mb-2 mb-md-0">
|
||||
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="location.reload()">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-refresh-cw"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>
|
||||
Refresh
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-sm table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">PID</th>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">CPU (%)</th>
|
||||
<th scope="col">Memory (MB)</th>
|
||||
<th scope="col">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ if len(Processes) > 0 }}
|
||||
{{ range process := Processes }}
|
||||
<tr>
|
||||
<td>{{ process.PID }}</td>
|
||||
<td>{{ process.Name }}</td>
|
||||
<td>{{ printf "%.2f" process.CPU }}</td>
|
||||
<td>{{ printf "%.2f" process.Memory }}</td>
|
||||
<td>
|
||||
<form action="/processes/kill/{{ process.PID }}" method="POST" style="display:inline;">
|
||||
<button type="submit" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want to kill process {{ process.PID }}?');">Kill</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No processes found or unable to retrieve process list.</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ block scripts() }}
|
||||
<!-- Add any page-specific scripts here if needed -->
|
||||
{{ end }}
|
Reference in New Issue
Block a user