make search better
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user