Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d339e3f
add sequelize orm package
runleveldev Oct 20, 2025
f872120
initialize sequelize-cli
runleveldev Oct 21, 2025
1864049
add services models
runleveldev Oct 21, 2025
1116eaa
fix config path
runleveldev Oct 21, 2025
8062fef
flatten services model
runleveldev Oct 21, 2025
2d583a9
fix service model definition
runleveldev Oct 22, 2025
50ace75
add json-to-sql script
runleveldev Oct 22, 2025
bd4421b
remove pointless envvar check
runleveldev Oct 22, 2025
08e81d0
add ejs dependency
runleveldev Oct 22, 2025
9306124
add containers index page
runleveldev Oct 22, 2025
19aac49
fix logo path
runleveldev Oct 22, 2025
72e29a5
simplify logout form handling
runleveldev Oct 22, 2025
2db0c5e
unify page styles
runleveldev Oct 22, 2025
e2f7200
add missing fields to the container model
runleveldev Oct 22, 2025
8df1112
new container form improvements
runleveldev Oct 22, 2025
024b4df
fix aiContainer fields in container model
runleveldev Oct 22, 2025
4fa2e4f
remove ssh public key support from the html frontend
runleveldev Oct 22, 2025
02b492a
database update handling
runleveldev Oct 23, 2025
9ad86c2
fix form redirect handling
runleveldev Oct 23, 2025
186d6f9
remove unused body-parser import
runleveldev Oct 23, 2025
c57cb32
document extra .env settings
runleveldev Oct 23, 2025
bb1187c
remove duplicate services.json file
runleveldev Oct 23, 2025
55aa6c0
fix ratelmiting
runleveldev Oct 23, 2025
ff38269
remove unused import
runleveldev Oct 24, 2025
acf8af6
group statements
runleveldev Oct 24, 2025
7f64710
replace portmap.js with static templates
runleveldev Oct 24, 2025
955703f
Merge branch 'main' into 59-nginx-reverse-proxycreate-a-container-sha…
runleveldev Oct 24, 2025
29e75b3
add nginx-reverse-proxy README
runleveldev Oct 24, 2025
d7fbdc2
add create-a-container README
runleveldev Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
unify page styles
  • Loading branch information
runleveldev committed Oct 22, 2025
commit 2db0c5e64f8ed7d0cc8486366be91c4ba6fd4416
17 changes: 10 additions & 7 deletions create-a-container/public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ body {
display: flex;
align-items: flex-start; /* Changed from center to flex-start for top alignment */
justify-content: center;
height: 100vh;
min-height: 100vh;
margin: 0;
padding-top: 2rem; /* Added padding to give space from the top */
padding-top: 5rem; /* Added padding to account for fixed navbar */
overflow-y: auto; /* Allow scrolling if content is too long */
}

.main-content-wrapper {
display: flex;
flex-direction: row;
align-items: flex-start;
flex-direction: column;
align-items: center;
gap: 2rem;
width: 100%;
max-width: 900px; /* Increased max-width for two columns */
max-width: 600px;
padding: 0 1rem;
}

Expand Down Expand Up @@ -165,16 +165,18 @@ select:focus {

/* Navbar container for logout button */
.navbar {
position: absolute;
position: fixed;
top: 0;
left: 0;
right: 0;
width: 100%;
background-color: #2c3e50;
color: white;
padding: 0.5rem 1rem;
border-bottom-left-radius: 8px;
display: flex;
align-items: center;
justify-content: flex-end;
z-index: 1000;
}

/* Logout button style */
Expand All @@ -183,6 +185,7 @@ select:focus {
color: white;
border: none;
padding: 0.5rem 1rem;
margin-right: 2rem;
border-radius: 4px;
cursor: pointer;
font-size: 1rem;
Expand Down
105 changes: 68 additions & 37 deletions create-a-container/views/containers.ejs
Original file line number Diff line number Diff line change
@@ -1,44 +1,75 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<head>
<meta charset="UTF-8">
<title>Your Containers - MIE</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Your Containers</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
</head>
<body>
<div class="container">
<h1>Your Containers</h1>
<a class="btn btn-primary" href="/containers/new" role="button">New Container</a>
<link href="/style.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item active" aria-current="page"><a href="/containers">Containers</a></li>
</ol>
<form method="POST" action="/logout">
<button type="submit" class="btn btn-danger logout-button">Logout</button>
</form>
</div>
</nav>

<table class="table align-middle">
<thead>
<tr>
<th>Hostname</th>
<th>IPv4</th>
<th>OS Release</th>
<th>SSH Port</th>
<th>HTTP Port</th>
</tr>
</thead>
<tbody>
<% if (rows && rows.length) { %>
<% rows.forEach(r => { %>
<tr>
<td><%= r.hostname %></td>
<td><%= r.ipv4Address %></td>
<td><%= r.osRelease %></td>
<td><%= r.sshPort || '' %></td>
<td><%= r.httpPort || '' %></td>
</tr>
<% }) %>
<% } else { %>
<tr><td colspan="5" class="text-muted">No containers found.</td></tr>
<% } %>
</tbody>
</table>
</div>
<main class="container mt-4">
<div class="row justify-content-center">
<div class="col-12 col-lg-10">
<div class="card shadow-sm">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="card-title mb-0">Your Containers</h4>
<a class="btn btn-primary" href="/containers/new" role="button">New Container</a>
</div>

<div class="table-responsive">
<table class="table table-hover table-bordered align-middle mb-0">
<thead class="table-light">
<tr>
<th>Hostname</th>
<th>IPv4</th>
<th>OS Release</th>
<th>SSH Port</th>
<th>HTTP Port</th>
</tr>
</thead>
<tbody>
<% if (rows && rows.length) { %>
<% rows.forEach(r => { %>
<tr>
<td><%= r.hostname %></td>
<td><%= r.ipv4Address || '-' %></td>
<td><%= r.osRelease || '-' %></td>
<td><%= r.sshPort || '-' %></td>
<td><%= r.httpPort || '-' %></td>
</tr>
<% }) %>
<% } else { %>
<tr>
<td colspan="5" class="text-muted text-center py-4">
No containers found. Click "New Container" to create your first one.
</td>
</tr>
<% } %>
</tbody>
</table>
</div>
</div>
<div class="card-footer text-muted text-center small">
&copy; 2025 Medical Informatics Engineering
</div>
</div>
</div>
</div>
</main>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI" crossorigin="anonymous"></script>
</body>
</body>
</html>
17 changes: 12 additions & 5 deletions create-a-container/views/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
<meta charset="UTF-8">
<title>MIE Container Creation</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
<link href="/style.css" rel="stylesheet">
</head>
<body>
<div class="navbar">
<form id="logoutForm" method="POST" action="/logout" style="display:inline;">
<button class="logout-button">Logout</button>
</form>
</div>
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="/containers">Containers</a></li>
<li class="breadcrumb-item active" aria-current="page">New</li>
</ol>
<form method="POST" action="/logout">
<button type="submit" class="btn btn-danger logout-button">Logout</button>
</form>
</div>
</nav>
<div class="main-content-wrapper">
<div class="login-container">
<img src="/logo.png" alt="Company Logo" class="logo">
Expand Down