Skip to content

Commit

Permalink
[ADD] tooltip to help out user
Browse files Browse the repository at this point in the history
  • Loading branch information
whikernel committed Dec 9, 2024
1 parent 01611e2 commit cf56f5e
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 13 deletions.
52 changes: 40 additions & 12 deletions source/app/blueprints/alerts/templates/alerts.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,50 @@
</select>
</div>
</div>
<div class="form-row mt-3">
<div class="col-md-12">
<button class="btn btn-sm btn-outline-dark" type="button" data-toggle="collapse" data-target="#customConditionsCollapse" aria-expanded="false" aria-controls="customConditionsCollapse">
Custom Conditions
</button>
</div>
<div class="form-row mt-3">
<div class="col-md-12">
<button class="btn btn-sm btn-outline-dark" type="button" data-toggle="collapse" data-target="#customConditionsCollapse" aria-expanded="false" aria-controls="customConditionsCollapse">
Custom Conditions
</button>
<a href="#" class="ml-2" data-toggle="collapse" data-target="#customConditionsExamples" aria-expanded="false" aria-controls="customConditionsExamples">
Show Examples
</a>
</div>
</div>

<div class="collapse mt-3" id="customConditionsCollapse">
<div class="form-row">
<div class="col-md-12 form-group">
<label for="custom_conditions">Custom Conditions</label>
<div class="form-control" id="custom_conditions"></div>
</div>
<div class="collapse mt-3" id="customConditionsCollapse">
<div class="form-row">
<div class="col-md-12 form-group">
<label for="custom_conditions">Custom Conditions</label>
<div class="form-control" id="custom_conditions"></div>
</div>
</div>
</div>

<div class="collapse" id="customConditionsExamples">
<div class="card card-body mt-2">
<p>Here are two sample custom conditions:</p>
<pre><code>
[{
"field": "alert_severity_id",
"operator": "in",
"value": [1, 2]
},
{
"field": "alert_title",
"operator": "like",
"value": "phishing"
}]</code></pre>
<pre><code>
[{
"field": "severity.severity_name",
"operator": "like",
"value": "Critical"
}]
</code></pre>
<p>Copy one of these conditions and paste it into the "Custom Conditions" field above, then adjust the values as needed.</p>
</div>
</div>
<div class="form-row mt-3">
<div class="col centered">
<button type="submit" class="btn btn-sm btn-primary">Apply Filters</button>
Expand Down
2 changes: 1 addition & 1 deletion source/app/static/assets/js/iris/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ async function updateAlerts(page, per_page, filters = {}, paging=false){
console.error(error);
});

if (!notify_auto_api(data)) {
if (!notify_auto_api(data, true)) {
return;
}
const alerts = data.data.alerts;
Expand Down

0 comments on commit cf56f5e

Please sign in to comment.