mirror of https://github.com/MISP/misp-modules
chg: [query] query as same
parent
2423bc7ade
commit
5190d30997
|
@ -8,7 +8,9 @@ function parseMispObject(misp_object, query_url, functionToCall){
|
|||
|
||||
if(v.type != 'counter' && v.type != 'datetime'){
|
||||
if(query_url){
|
||||
$query=$("<a>").attr("href", query_url+v.value).text("query").css("margin-left", "10px")
|
||||
$query=$("<a>").attr({"href": query_url+v.value, "title": "Query this value with new attributes or modules"})
|
||||
.text("query")
|
||||
.css("margin-left", "10px")
|
||||
}
|
||||
if(functionToCall){
|
||||
// `_${functionToCall.name}('${v.value}')` refer to 'window._query_as_same = query_as_same' in my vue file
|
||||
|
@ -16,7 +18,8 @@ function parseMispObject(misp_object, query_url, functionToCall){
|
|||
"title": "Query this value with the same attribute and modules as the main query",
|
||||
"class": "btn btn-link"
|
||||
})
|
||||
.text("query as same")
|
||||
// .text("query as same")
|
||||
.append($("<i>").attr("class", "fa-solid fa-recycle"))
|
||||
.css({"margin-left": "10px", "padding": "0", "--bs-btn-border-width": "0"})
|
||||
}
|
||||
}
|
||||
|
@ -45,8 +48,8 @@ function parseMispObject(misp_object, query_url, functionToCall){
|
|||
"margin-left": "0.5em",
|
||||
}),
|
||||
$("<div>").text("Value: "+ v.value),
|
||||
$query,
|
||||
$query_same
|
||||
$query_same,
|
||||
$query
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -12,16 +12,16 @@
|
|||
</div>
|
||||
|
||||
<div class="btn-group" style="float: right;" role="group" aria-label="Basic mixed styles example">
|
||||
<a style="float: right;" class="btn btn-primary" href="/" title="Do a new query with no relation with this one">New query</a>
|
||||
<a style="float: right;" class="btn btn-primary" href="/" title="Do a new query with no relation with this one"><i class="fa-solid fa-plus"></i> New query</a>
|
||||
<a style="float: right;" class="btn btn-secondary" href="/?query={{query}}" title="New query with same name">Query</a>
|
||||
<div class="dropdown" style="float: right;">
|
||||
<button class="btn btn-primary dropdown-toggle" title="New query with same parameters" style="border-radius: 0;" data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside">
|
||||
Query as same
|
||||
<i class="fa-solid fa-recycle"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu p-4" style="min-width: 200px;">
|
||||
<div class="mb-3">
|
||||
<label for="query_as_params" class="form-label">To query:</label>
|
||||
<input type="email" class="form-control" id="query_as_params" placeholder="{{', '.join(query)}}">
|
||||
<input type="email" class="form-control" id="query_as_params" value="{{', '.join(query)}}">
|
||||
<div id="query_as_params_error" style="color:brown"></div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm" @click="query_as_params()" style="border-radius: 50px;">Query</button>
|
||||
|
|
Loading…
Reference in New Issue