automated terminal push

This commit is contained in:
Software Shinobi
2025-04-30 07:38:19 -04:00
parent 58015ad4e9
commit 37a57278dd
25 changed files with 822 additions and 7 deletions

13
web/.dockerignore Executable file
View File

@@ -0,0 +1,13 @@
.git
.pristine
.trash
.recycle
.backup
.template
.calendar

5
web/Dockerfile Executable file
View File

@@ -0,0 +1,5 @@
FROM nginx
WORKDIR /usr/share/nginx/html/
COPY . .

13
web/compose.bash Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
reset
clear
set -e
set -x
docker-compose down
docker-compose up --build

17
web/compose.yaml Normal file
View File

@@ -0,0 +1,17 @@
services:
valorant-digital-workspace-web:
container_name: valorant-digital-workspace-web
image: linuxlinape/lenape-jobs-dashboard
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:80

BIN
web/favicon.ico Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

81
web/index.html Normal file
View File

@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Recent Jobs from Internet</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://bootswatch.com/4/journal/bootstrap.min.css">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-dark" data-bs-theme="dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Lenape Jobs</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarColor02" aria-controls="navbarColor02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarColor02">
<ul class="navbar-nav me-auto">
<li class="nav-item">
<a class="nav-link active" href="#">Home
<span class="visually-hidden">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Load New Jobs</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Help</a>
</li>
</ul>
</div>
</div>
</nav>
<div cldass="container mt-12">
<h1>Recent Jobs from Internet</h1>
<button class="btn btn-lg btn-primary" type="button" onclick="load()">Refresh Jobs (Pull From Internet)</button>
<table id="leaderboard" class="table table-striped table-hover">
<thead>
<tr>
<th></th>
<th>source site</th>
<th>Company</th>
<th>Position</th>
<th>Location</th>
<th>job type</th>
<th>is remote</th>
<th>description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.js"></script>
<script src="js/jobs.js"></script>
</body>
</html>

120
web/js/jobs.js Normal file
View File

@@ -0,0 +1,120 @@
$(document).ready(function () {
fetch();
setInterval(fetch, 1000*120);
});
function fetch() {
console.debug(" -> :: fetchLeaderboardDetails()");
$.ajax({
type: "GET",
url: "http://localhost:8888"+ "/jobs/",
dataType: 'json', // <-- Set dataType to 'json'
//contentType: "text/plain",
crossDomain: false,
success: function (data, status, jqXHR) {
console.log("good");
profitleaderboard(data);
},
error: function (error, status) {
console.log("error fetching leaderboard", error);
}
});
}
function load() {
console.debug(" -> :: fetchLeaderboardDetails()");
$.ajax({
type: "GET",
url: "http://localhost:8888"+ "/jobs/load",
dataType: 'json', // <-- Set dataType to 'json'
//contentType: "text/plain",
crossDomain: false,
success: function (data, status, jqXHR) {
console.log("good");
profitleaderboard(data);
},
error: function (error, status) {
console.log("error fetching leaderboard", error);
}
});
}
function profitleaderboard(jobList) {
console.log("jobList / " ,jobList);
var html = '';
size = jobList.length;
console.log("size / " + size);
for (var i =0;i< jobList.length; i++) {
html += '<tr>';
html += '<td class="METADATA DEBUG">' + (i+1) + '</td>'; // Integer (ranking)
html += '<td class="METADATA DEBUG">' + jobList[i].site + '</td>'; // Integer (ranking)
html += '<td class="METADATA DEBUG">' + jobList[i].company + '</td>'; // String (username)
html += '<td class="METADATA DEBUG"><a target="_job" href="' + jobList[i].job_url + '">'+jobList[i].title+ '</a></td>';
// html += '<td class="METADATA DEBUG">' + + '</td>'; // String (username)
html += '<td class="METADATA DEBUG">' + jobList[i].location + '</td>'; // String (username)
html += '<td class="METADATA DEBUG">' + jobList[i].job_type + '</td>'; // String (username)
html += '<td class="METADATA DEBUG">' + jobList[i].is_remote + '</td>'; // String (username)
html += '<td class="METADATA DEBUG">' + jobList[i].description + '</td>'; // String (username)
html += '</tr>';
}
$('#leaderboard > tbody').html(html);
}