adding file desc

This commit is contained in:
Janis Steiner
2024-12-08 12:46:13 +00:00
parent 00169ac80b
commit 6dd73bb8ab
2 changed files with 5 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ mysqli_stmt_store_result($stmt);
mysqli_stmt_bind_result($stmt, $rotation, $is_free, $printer_id, $url, $apikey, $cancel, $userid, $system_status, $filament_color,$real_color,$used_by_user);
while (mysqli_stmt_fetch($stmt)) {
$used_by_user=explode("@",$used_by_user)[0];
$printer = [
"rotation" => $rotation,
"is_free" => $is_free,
@@ -54,6 +55,7 @@ while (mysqli_stmt_fetch($stmt)) {
$json = json_decode($fg, true);
$printer["progress"] = (int) $json['progress']['completion'];
$printer["file"] = short_path($json["job"]["file"]["name"], 10, 10);
$printer["full_file"]=$json["job"]["file"]["name"];
$printer["print_time_total"] = seconds_to_time(intval($json["job"]["estimatedPrintTime"]));
$printer["print_time_left"] = seconds_to_time(intval($json["progress"]["printTimeLeft"]));
$printer["print_time"] = seconds_to_time(intval($json["progress"]["printTime"]));
@@ -74,6 +76,7 @@ while (mysqli_stmt_fetch($stmt)) {
$printer["print_time_left"] = seconds_to_time(intval($json["progress"]["printTimeLeft"]));
$printer["print_time"] = seconds_to_time(intval($json["progress"]["printTime"]));
$printer["print_status"]="Abgebrochen";
$printer["full_file"]=$json["job"]["file"]["name"];
$printer["view"]=2;
}else if($system_status==0){
$printer["print_status"]="Bereit";

View File

@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>System0 Übersicht</title>
<?php
// Initialize the session
session_start();
@@ -261,7 +262,7 @@ function updatePrinterData(data) {
<tr><td>Erwartete Druckzeit</td><td>${printer.print_time_total}</td></tr>
<tr><td>Verbleibende Druckzeit</td><td>${printer.print_time_left}</td></tr>
<tr><td>Vergangene Druckzeit</td><td>${printer.print_time}</td></tr>
<tr><td>Datei</td><td>${printer.file}</td></tr>
<tr><td>Datei</td><td><div class="hover-element">${printer.file}<div class="description">${printer.full_file}</div></div></td></tr>
</thead>
<tr><td><a class='btn btn-success' href='overview.php?free=${printer.printer_id}&rid=<?php echo($_SESSION["rid"]); ?>'>Freigeben</a></td></tr>
</table>