Compare commits

..

83 Commits

Author SHA1 Message Date
cf1298532b Merge remote-tracking branch 'origin/main' into develop 2025-12-17 15:21:40 +01:00
6af2aab851 Log-Viewer hinzugefügt 2025-12-17 12:08:54 +01:00
9d3983060d Log-Viewer hinzugefügt 2025-12-17 12:07:50 +01:00
d817f096bc updated the size of the "in vorschau laden" button 2025-12-17 10:49:58 +01:00
ff329d8012 layout update and cleaned up merge conflicts 2025-12-17 10:48:49 +01:00
d650b78d25 Merge branch 'develop' of https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt into develop 2025-12-17 10:46:00 +01:00
4dcebe7007 updated the layout for the button so that they line up 2025-12-17 10:45:37 +01:00
7765ef1b60 revert 679354006f
revert slight layout change to arrange the buttons better
2025-12-17 09:43:23 +00:00
679354006f slight layout change to arrange the buttons better 2025-12-17 10:42:52 +01:00
4b749744de another hint update 2025-12-17 10:41:36 +01:00
1d53016df7 corrected the hint text 2025-12-17 10:41:04 +01:00
ba47487abf moved the hint below the button 2025-12-17 10:39:52 +01:00
99c581cec2 added a hint to the "vorschau laden" button that the csv gets reset to its original state when rpessing 2025-12-17 10:38:55 +01:00
0c1399d583 csv should now be checked when pressing the "csv verarbeiten" button 2025-12-17 10:35:56 +01:00
531fc8e741 test if the csv also gets correctly tested now 2025-12-17 10:33:06 +01:00
d350130dba added password validation and a hint to also use the correct password and format 2025-12-17 10:27:31 +01:00
59e9975b22 test to see if the ou is also removed from the csv import 2025-12-17 10:18:41 +01:00
532f76a754 removed the ou from usercreation because they only should be created in the correct OU for our webservice 2025-12-17 10:13:04 +01:00
eff871ca37 PHP Dokumentation aktualisiert 2025-12-17 08:31:01 +01:00
8456e21b28 datenträger + system uptime farben angepasst 2025-12-16 08:27:09 +01:00
08fbfc8814 änderungen wurden nicht angenommen, nochmal angepasst 2025-12-14 16:54:38 +01:00
928280176c schriftfarbe angepasst 2025-12-14 16:48:04 +01:00
89371dc60f sah beschissen aus, nochmal geändert 2025-12-14 16:13:24 +01:00
d6f42af919 css design geändert 2025-12-14 16:08:53 +01:00
5ba162994e farben angepasst 2025-12-14 15:57:40 +01:00
02766e1bf9 scripts/powershell/create_users_csv.ps1 aktualisiert
Inserted default OU
2025-12-14 07:09:37 +00:00
15e1be8db1 public/api/create_users_csv.php aktualisiert
Inserted default OU
2025-12-14 07:06:28 +00:00
a3bee1815f public/api/create_user.php aktualisiert
Inserted default OU
2025-12-14 07:00:41 +00:00
69182e5378 config/config.php aktualisiert
Inserted default OU
2025-12-14 06:58:20 +00:00
9bc6b8d701 ttrying to fix csv import and user creation per csv 2025-12-13 15:34:55 +01:00
2fd2bb3630 logging for error messages when creating users 2025-12-13 15:25:57 +01:00
f793973571 possible fix for user creation 2025-12-13 15:23:00 +01:00
75828d8263 test to integrate users 2025-12-13 15:20:47 +01:00
48afb5d0c8 implemented into the sidebar 2025-12-13 15:14:23 +01:00
44b2c02d35 createuser with preview for csv import 2025-12-13 15:08:58 +01:00
78901adae1 revert f2a09c9c7d
revert Changed User-Import, added User Search and manuel user add
2025-12-13 13:51:17 +00:00
f2a09c9c7d Changed User-Import, added User Search and manuel user add 2025-12-13 14:46:25 +01:00
6060a5134b revert cdbdb2df3b
revert Test um User im AD anzulegen mit PS Skripts
2025-12-12 09:33:14 +00:00
d6baaad963 revert 376f6ad13f
revert deleted html file and moved one folder
2025-12-12 09:32:47 +00:00
376f6ad13f deleted html file and moved one folder 2025-12-12 10:19:48 +01:00
cdbdb2df3b Test um User im AD anzulegen mit PS Skripts 2025-12-12 10:13:10 +01:00
1a5875816c snmp_update3 (#27)
Hostname wurde gefixt

Co-authored-by: GraegelTh <165781231+GraegelTh@users.noreply.github.com>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/27
2025-12-11 14:25:57 +00:00
20b626651f Update der Api mit Snmpwalk (#26)
Umstellung des Snmpwalk damit die Werte auf dem Liveserver funktionieren

Co-authored-by: GraegelTh <165781231+GraegelTh@users.noreply.github.com>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/26
2025-12-11 14:04:30 +00:00
ee5ce6b5bd Dokumentation erstellt 2025-12-08 05:43:46 +01:00
bbdbb0e187 Merge main into develop and resolve conflicts for logging integration 2025-12-05 10:19:25 +01:00
50e5d82fa3 feature/logging_Service (#23)
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/23
2025-12-05 08:55:48 +00:00
656093ce01 feature/logging_Service (#22)
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/22
2025-12-05 08:28:46 +00:00
4127323530 LDAP Connection URI angepasst (#21)
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/21
2025-12-05 08:24:36 +00:00
3c2c6d6c6f Merge branch 'feature/logging_Service' into develop
# Conflicts:
#	app/Services/Ldap/LdapConnectionHelper.php
2025-12-05 09:16:05 +01:00
50d53b4183 LDAP Connection URI angepasst 2025-12-05 09:08:14 +01:00
c194f80f45 feature/logging_Service (#18)
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/18
2025-12-05 08:04:27 +00:00
434b090b08 Merge branch 'develop' into feature/logging_Service 2025-12-05 08:04:12 +00:00
300719244e LDAP Connection URI angepasst 2025-12-05 09:03:01 +01:00
9a8d90a6db feature/logging_Service (#17)
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/17
Co-authored-by: blaerf <blaerf@gmx.de>
Co-committed-by: blaerf <blaerf@gmx.de>
2025-12-05 07:42:10 +00:00
21c63b9d6c Kommentare angepasst 2025-12-05 08:41:31 +01:00
91d2821034 Logging-Service hinzugefügt 2025-12-05 08:34:37 +01:00
e0cd5591c5 Table-Tags aktualisiert 2025-12-04 20:28:17 +01:00
e82c2c041a snmp_update2 (#14)
Co-authored-by: Tom <165781231+GraegelTh@users.noreply.github.com>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/14
2025-12-04 03:30:46 +00:00
f9f9b1f99b feature/UI-Update (#12)
Co-authored-by: blaerf <blaerf@gmx.de>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/12
2025-11-29 06:32:50 +00:00
daba87e48f feature/UI-Update (#11)
Co-authored-by: blaerf <blaerf@gmx.de>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/11
2025-11-29 05:42:36 +00:00
bce1a0c719 sidebar, topbar ausblenden wenn nicht angemeldet (#10)
Co-authored-by: blaerf <blaerf@gmx.de>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/10
2025-11-29 05:24:37 +00:00
d013b6cb8a Merge remote-tracking branch 'origin/develop' into develop
# Conflicts:
#	public/views/layout.php
2025-11-28 23:30:56 +01:00
bde7b7c7ce Merge branch 'feature/UI-Update' into develop
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2025-11-28 23:27:54 +01:00
191666736b sidebar, topbar ausblenden wenn nicht angemeldet 2025-11-28 23:24:37 +01:00
2637715e48 sidebar, topbar ausblenden wenn nicht angemeldet 2025-11-28 23:07:07 +01:00
bef54a7553 feature/UI-Update (#8)
Co-authored-by: blaerf <blaerf@gmx.de>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/8
2025-11-28 21:58:13 +00:00
bdd79a66cb LAyout aufgeräumt 2025-11-28 22:57:33 +01:00
3eac9a659e Pfad form action geändert 2025-11-28 22:28:52 +01:00
d1bafa28d9 Text geändert 2025-11-28 22:27:16 +01:00
cfcc8f2d0c Dateien gelöscht (#7)
Co-authored-by: blaerf <blaerf@gmx.de>
Reviewed-on: https://git.eckertplayground.de/taarly/PHP_AdminTool_Projekt/pulls/7
2025-11-28 21:23:41 +00:00
28be78dceb Dateien gelöscht 2025-11-28 22:23:08 +01:00
ab296ad0dc Merge branch 'feature/UI-Update' into develop
# Conflicts:
#	public/views/login.php
2025-11-28 15:45:02 +01:00
f68db3ab1e Layout modularisiert 2025-11-28 15:34:38 +01:00
905ce67742 Layout modularisiert 2025-11-28 15:23:25 +01:00
8cd07a73a0 Pfade angepasst 2025-11-28 13:54:33 +01:00
77ac0577e2 Pfade angepasst 2025-11-28 13:52:07 +01:00
7f7cab75e5 Layout modularisiert 2025-11-28 10:41:40 +01:00
6ad293ee4f hinweis eingefügt 2025-11-27 23:07:03 +01:00
5acc6d93c9 hinweis eingefügt 2025-11-27 23:05:51 +01:00
dc75190642 hinweis eingefügt 2025-11-27 23:04:19 +01:00
b82d16a064 hinweis eingefügt 2025-11-27 23:03:05 +01:00
195f19a6f2 hinweis eingefügt 2025-11-27 22:59:21 +01:00
6c67d6437e hinweis eingefügt 2025-11-27 22:26:12 +01:00
5 changed files with 8 additions and 64 deletions

View File

@ -142,13 +142,7 @@ class LogViewerService
$haystack = $parsed['raw'] . ' ' . $parsed['message']; $haystack = $parsed['raw'] . ' ' . $parsed['message'];
if (is_array($parsed['context'])) { if (is_array($parsed['context'])) {
$json = json_encode( $haystack .= ' ' . (string)json_encode($parsed['context'], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$parsed['context'],
JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR
);
if ($json !== false) {
$haystack .= ' ' . $json;
}
} }
if (mb_stripos($haystack, $search) === false) { if (mb_stripos($haystack, $search) === false) {
@ -288,7 +282,7 @@ class LogViewerService
$context = null; $context = null;
// Basis: [timestamp] LEVEL ... // Basis: [timestamp] LEVEL ...
if (preg_match('/^\[(?<ts>[0-9\-:\s]{19})]\s+(?<lvl>[A-Za-z]+)\s+(?<rest>.*)$/', $line, $m) === 1) { if (preg_match('/^\[(?<ts>[0-9\-:\s]{19})\]\s+(?<lvl>[A-Z]+)\s+(?<rest>.*)$/', $line, $m) === 1) {
$ts = (string)$m['ts']; $ts = (string)$m['ts'];
$level = (string)$m['lvl']; $level = (string)$m['lvl'];
$rest = (string)$m['rest']; $rest = (string)$m['rest'];
@ -314,20 +308,6 @@ class LogViewerService
$message = $rest; $message = $rest;
} }
if ($level === null) {
$upper = strtoupper($raw);
if (str_starts_with($upper, 'PHP WARNING') || str_starts_with($upper, 'WARNING')) {
$level = 'WARNING';
} elseif (str_starts_with($upper, 'PHP NOTICE') || str_starts_with($upper, 'NOTICE')) {
$level = 'INFO';
} elseif (str_starts_with($upper, 'PHP FATAL') || str_contains($upper, 'FATAL ERROR') || str_starts_with($upper, 'UNCAUGHT')) {
$level = 'ERROR';
} else {
$level = 'UNKNOWN';
}
}
return [ return [
'ts' => $ts, 'ts' => $ts,
'level' => $level, 'level' => $level,

View File

@ -135,24 +135,7 @@ exec($cmd . ' 2>&1', $output, $returnVar);
$json = implode("\n", $output); $json = implode("\n", $output);
// Optional: write raw output into logs for debugging // Optional: write raw output into logs for debugging
$ts = date('Y-m-d H:i:s'); @file_put_contents(__DIR__ . '/../logs/create_user_output.log', date('Y-m-d H:i:s') . ' CMD: ' . $cmd . "\n" . $json . "\n\n", FILE_APPEND | LOCK_EX);
$ctx = [
'cmd' => $cmd,
'return_code' => $returnVar,
'output' => $json,
];
$line = sprintf(
"[%s] %-7s %s %s%s",
$ts,
'DEBUG',
'PowerShell CMD',
json_encode($ctx, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
PHP_EOL
);
@file_put_contents(__DIR__ . '/../logs/create_user_output.log', $line, FILE_APPEND | LOCK_EX);
@unlink($tmpFile); @unlink($tmpFile);

View File

@ -82,24 +82,7 @@ $json = implode("\n", $output);
@unlink($metaFile); @unlink($metaFile);
// Optional: log the CSV script command and raw output to help debugging // Optional: log the CSV script command and raw output to help debugging
$ts = date('Y-m-d H:i:s'); @file_put_contents(__DIR__ . '/../logs/create_users_csv_output.log', date('Y-m-d H:i:s') . ' CMD: ' . $cmd . "\n" . $json . "\n\n", FILE_APPEND | LOCK_EX);
$ctx = [
'cmd' => $cmd,
'return_code' => $returnVar,
'output' => $json,
];
$line = sprintf(
"[%s] %-7s %s %s%s",
$ts,
'DEBUG',
'PowerShell CMD',
json_encode($ctx, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES),
PHP_EOL
);
@file_put_contents(__DIR__ . '/../logs/create_users_csv_output.log', $line, FILE_APPEND | LOCK_EX);
$result = null; $result = null;
if ($json !== '') { if ($json !== '') {

View File

@ -53,7 +53,7 @@ declare(strict_types=1);
<h6 class="m-0 font-weight-bold text-primary">Einzelner Benutzer</h6> <h6 class="m-0 font-weight-bold text-primary">Einzelner Benutzer</h6>
</div> </div>
<div class="card-body"> <div class="card-body">
<form method="post" action="../api/create_user.php"> <form method="post" action="/api/create_user.php">
<div class="form-group"> <div class="form-group">
<label for="samaccountname">Anmeldename (sAMAccountName)</label> <label for="samaccountname">Anmeldename (sAMAccountName)</label>
<input type="text" class="form-control" id="samaccountname" name="samaccountname" required> <input type="text" class="form-control" id="samaccountname" name="samaccountname" required>
@ -139,7 +139,7 @@ declare(strict_types=1);
<div class="card-body"> <div class="card-body">
<p class="small text-muted">Die CSV-Datei sollte eine Kopfzeile mit folgenden Spalten enthalten: <code>samaccountname,displayname,mail,password,groups</code>. Gruppen können komma-getrennt sein. Nach dem Hochladen erscheint der Inhalt in der Vorschau, dort kann er vor dem Absenden editiert werden.</p> <p class="small text-muted">Die CSV-Datei sollte eine Kopfzeile mit folgenden Spalten enthalten: <code>samaccountname,displayname,mail,password,groups</code>. Gruppen können komma-getrennt sein. Nach dem Hochladen erscheint der Inhalt in der Vorschau, dort kann er vor dem Absenden editiert werden.</p>
<form id="csvUploadForm" method="post" action="../api/create_users_csv.php" enctype="multipart/form-data"> <form id="csvUploadForm" method="post" action="/api/create_users_csv.php" enctype="multipart/form-data">
<div class="form-group"> <div class="form-group">
<label for="csvfile">CSV-Datei</label> <label for="csvfile">CSV-Datei</label>
<input type="file" class="form-control-file" id="csvfile" name="csvfile" accept=".csv"> <input type="file" class="form-control-file" id="csvfile" name="csvfile" accept=".csv">

View File

@ -109,7 +109,7 @@ declare(strict_types=1);
<div class="text-gray-600">Keine Einträge gefunden.</div> <div class="text-gray-600">Keine Einträge gefunden.</div>
<?php else : ?> <?php else : ?>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-sm"> <table class="table table-bordered table-sm" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th style="width: 170px;">Zeit</th> <th style="width: 170px;">Zeit</th>
@ -144,9 +144,7 @@ declare(strict_types=1);
<td><?php echo htmlspecialchars((string)($e['message'] ?? ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); ?></td> <td><?php echo htmlspecialchars((string)($e['message'] ?? ''), ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); ?></td>
<td> <td>
<?php if ($ctxPretty !== '') : ?> <?php if ($ctxPretty !== '') : ?>
<pre class="mb-0 text-white" style="white-space: pre-wrap;"> <pre class="mb-0" style="white-space: pre-wrap;"><?php echo htmlspecialchars($ctxPretty, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); ?></pre>
<?php echo htmlspecialchars($ctxPretty, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8'); ?>
</pre>
<?php else : ?> <?php else : ?>
<span class="text-gray-600">-</span> <span class="text-gray-600">-</span>
<?php endif; ?> <?php endif; ?>