Skip to content

Commit

Permalink
fix: [website] attributes and modules selection
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCruciani committed Feb 22, 2024
1 parent 769f745 commit e1ebd89
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/app/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def get_list_misp_attributes():
def run_modules():
"""Run modules"""
if "query" in request.json:
if "input" in request.json:
if "input" in request.json and request.json["input"]:
if "modules" in request.json:
if "query_as_same" in request.json:
session = SessionModel.Session_class(request.json, query_as_same=True, parent_id=request.json["parent_id"])
Expand Down
16 changes: 13 additions & 3 deletions website/app/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h1>MISP Modules</h1>
<input type="hidden" id="parent_id" value="{{sid}}">
<input type="text" value="{{query}}" id="process-query" placeholder="Enter here..." autofocus class="form-control" style="border-radius: 5px;" />
</div>
<span v-if="status_site" id="status">[[status_site]]</span>
<span v-if="status_site" style="color: brown;" id="status">[[status_site]]</span>
</div>

<br>
Expand Down Expand Up @@ -105,8 +105,18 @@ <h4>[[module.name]]</h4>
progress.value = 0
let error_flag = false

let result_dict = {"modules": $("#modules_select").val(),
"input": $("#input_select").val(),
let loc = undefined
if($("#input_select").val() != "None"){
loc = $("#input_select").val()
}

let loc_modules = undefined
if(!$("#modules_select").val()){
loc_modules = $("#modules_select").val()
}

let result_dict = {"modules": loc_modules,
"input": loc,
"query": current_query.value,
"parent_id": $("#parent_id").val()
}
Expand Down

0 comments on commit e1ebd89

Please sign in to comment.