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