2023-08-28 17:25:55 +02:00
|
|
|
{% if misp_instances_settings|length > 1 %}
|
|
|
|
<center>
|
|
|
|
<label for="mispSelector">Select the MISP instance to push to</label>
|
|
|
|
</br>
|
|
|
|
<div class="btn-group" role="group" aria-label="MISP Selector" id="mispSelector">
|
|
|
|
{%for name in misp_instances_settings %}
|
2023-08-29 18:24:51 +02:00
|
|
|
<button type="button" value="{{name.replace(' ', '_')}}"
|
|
|
|
class="btn btn-outline-primary {%if name == current_misp%}active{%endif%}" href="#">{{name}}</a></li>
|
2023-08-28 17:25:55 +02:00
|
|
|
{%endfor%}
|
|
|
|
</div>
|
|
|
|
</center>
|
|
|
|
{%endif%}
|
|
|
|
|
|
|
|
<div id="allInstances">
|
|
|
|
{%for name, misp_settings in misp_instances_settings.items() %}
|
2023-08-29 18:24:51 +02:00
|
|
|
<div id="{{name.replace(' ', '_')}}" {%if name != current_misp%}style="display:none"{%endif%}>
|
2023-08-28 17:25:55 +02:00
|
|
|
<form role="form" action="{{ url_for('web_misp_push_view', tree_uuid=tree_uuid) }}"
|
|
|
|
method=post enctype=multipart/form-data>
|
|
|
|
<label for="misp_instance_name" class="col-sm-2 col-form-label">Submit event to:</label>
|
|
|
|
<input type="text" class="form-control" name="misp_instance_name" value="{{name}}" readonly>
|
|
|
|
<label for="defaultTags" class="col-sm-6 col-form-label">Tags attached to the event by default</label>
|
|
|
|
<input type="text" class="form-control" name="defaultTags" value="{{', '.join(misp_settings['default_tags'])}}" disabled readonly>
|
2022-01-14 15:58:06 +01:00
|
|
|
<div class="row mb-3">
|
2021-05-31 22:27:25 +02:00
|
|
|
<div class="col-sm-10">
|
2022-01-14 15:58:06 +01:00
|
|
|
<label for="url" class="col-sm-2 col-form-label">Event info:</label>
|
2021-05-31 22:27:25 +02:00
|
|
|
<input type="text" class="form-control" name="event_info" value="{{event.info}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-01-14 15:58:06 +01:00
|
|
|
<div class="row mb-3">
|
2021-02-04 19:51:43 +01:00
|
|
|
<div class="col-sm-10">
|
2022-01-14 15:58:06 +01:00
|
|
|
<label for="tags" class="col-sm-2 col-form-label">Available tags:</label>
|
2021-02-04 19:51:43 +01:00
|
|
|
<select class="form-control" name="tags" id="tags" multiple>
|
2023-08-28 17:25:55 +02:00
|
|
|
{% for tag_name in misp_settings['fav_tags'] %}
|
|
|
|
<option value="{{ tag_name }}">{{ tag_name }}</option>
|
2021-02-04 19:51:43 +01:00
|
|
|
{% endfor %}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-31 22:27:25 +02:00
|
|
|
<div class="form-check">
|
2023-08-28 17:25:55 +02:00
|
|
|
<input class="form-check-input" type="checkbox" name="auto_publish"
|
|
|
|
{%if misp_settings.auto_publish %} checked {% endif %}></input>
|
2021-05-31 22:27:25 +02:00
|
|
|
<label for="auto_publish" class="form-check-label">Publish the event automatically</label>
|
|
|
|
</div>
|
2023-08-28 17:25:55 +02:00
|
|
|
{% if misp_settings.existing_event %}
|
|
|
|
<p>There is already an <a href="{{misp_settings.existing_event}}">event on your MISP instance</a> with this lookyloo capture.</p>
|
2021-03-31 09:25:01 +02:00
|
|
|
<div class="form-check">
|
2023-08-28 17:25:55 +02:00
|
|
|
<input class="form-check-input" type="checkbox" name="force_push" onchange="document.getElementById('btn-misp-push-{{name}}').disabled = !this.checked;"></input>
|
2021-03-31 09:25:01 +02:00
|
|
|
<label for="force_push" class="form-check-label">Tick this box if you want to push anyway</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2021-05-12 22:30:04 +02:00
|
|
|
{% if has_parent %}
|
|
|
|
<div class="form-check">
|
|
|
|
<input class="form-check-input" type="checkbox" name="with_parents"></input>
|
|
|
|
<label for="with_parents" class="form-check-label">Also push the parents</label>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2023-08-28 17:25:55 +02:00
|
|
|
<button type="submit" class="btn btn-primary" id="btn-misp-push-{{name}}"
|
|
|
|
{% if misp_settings.existing_event %}disabled=true{% endif %}>Push to {{name}}</button>
|
2021-02-04 19:51:43 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
2023-08-28 17:25:55 +02:00
|
|
|
{%endfor%}
|
|
|
|
</div>
|