make search better

This commit is contained in:
2025-11-10 15:13:56 -08:00
parent 3c45099519
commit 84ca0907ef
3 changed files with 12 additions and 5 deletions
+2 -2
View File
@@ -15,13 +15,13 @@
<label for="group">Group Name:</label>
<input type="text" id="group" name="group" value="<?php echo htmlspecialchars($_GET['group']); ?>" required>
<button type="submit">Query</button>
</form>
</form><p>
<?php else : ?>
<form action="index.php" method="GET">
<label for="group">Group Name:</label>
<input type="text" id="group" name="group" required>
<button type="submit">Query</button>
</form>
</form><p>
<?php endif; ?>
<?php
+8 -2
View File
@@ -2,7 +2,7 @@
body {
font-family: Arial, sans-serif;
margin: 0;
margin: 10px;
padding: 0;
background-color: #2c3e50; /* Dark background color */
color: #bdc3c7; /* Dimmer text color */
@@ -11,7 +11,13 @@ body {
.hidden-info {
display: none;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 10px;
}
.title-button {
background-color: #34495e;
border: none;
+2 -1
View File
@@ -1,4 +1,5 @@
import yaml
import re
from flask import Flask, request, jsonify
app = Flask(__name__)
@@ -23,7 +24,7 @@ def get_groups():
for detail in details:
# Check if 'ad_group' exists and is not None before accessing it
ad_group = detail.get('ad_group')
if isinstance(ad_group, str) and ad_group.lower() == group_name.lower():
if isinstance(ad_group, str) and re.search(re.escape(group_name.lower()), ad_group.lower()):
gpos.append({
"gpo": gpo,
"local_group": detail['local_group'],