mirror of https://github.com/CIRCL/AIL-framework
Added support of local paste view in dashboard for Mails event only
parent
7c8d414948
commit
1826b170ec
|
@ -55,9 +55,9 @@ if __name__ == "__main__":
|
||||||
list(MX_values[1])))
|
list(MX_values[1])))
|
||||||
|
|
||||||
pprint.pprint(MX_values)
|
pprint.pprint(MX_values)
|
||||||
to_print = 'Mails;{};{};{};Checked {} e-mail(s)'.\
|
to_print = 'Mails;{};{};{};Checked {} e-mail(s);{}'.\
|
||||||
format(PST.p_source, PST.p_date, PST.p_name,
|
format(PST.p_source, PST.p_date, PST.p_name,
|
||||||
MX_values[0])
|
MX_values[0], PST.p_path)
|
||||||
if MX_values[0] > is_critical:
|
if MX_values[0] > is_critical:
|
||||||
publisher.warning(to_print)
|
publisher.warning(to_print)
|
||||||
#Send to duplicate
|
#Send to duplicate
|
||||||
|
|
|
@ -109,11 +109,11 @@ function create_log_table(obj_json) {
|
||||||
var pdate = document.createElement('TD')
|
var pdate = document.createElement('TD')
|
||||||
var nam = document.createElement('TD')
|
var nam = document.createElement('TD')
|
||||||
var msage = document.createElement('TD')
|
var msage = document.createElement('TD')
|
||||||
|
var inspect = document.createElement('TD')
|
||||||
|
|
||||||
var chansplit = obj_json.channel.split('.');
|
var chansplit = obj_json.channel.split('.');
|
||||||
var parsedmess = obj_json.data.split(';');
|
var parsedmess = obj_json.data.split(';');
|
||||||
|
|
||||||
|
|
||||||
if (parsedmess[0] == "Global"){
|
if (parsedmess[0] == "Global"){
|
||||||
var paste_processed = parsedmess[4].split(" ")[2];
|
var paste_processed = parsedmess[4].split(" ")[2];
|
||||||
window.paste_num_tabvar = paste_processed;
|
window.paste_num_tabvar = paste_processed;
|
||||||
|
@ -139,7 +139,7 @@ function create_log_table(obj_json) {
|
||||||
source_url = "http://"+parsedmess[1]+"/"+parsedmess[3].split(".")[0];
|
source_url = "http://"+parsedmess[1]+"/"+parsedmess[3].split(".")[0];
|
||||||
}
|
}
|
||||||
source_link.setAttribute("HREF",source_url);
|
source_link.setAttribute("HREF",source_url);
|
||||||
source_link.setAttribute("TARGET", "_blank")
|
source_link.setAttribute("TARGET", "_blank");
|
||||||
source_link.appendChild(document.createTextNode(parsedmess[1]));
|
source_link.appendChild(document.createTextNode(parsedmess[1]));
|
||||||
|
|
||||||
src.appendChild(source_link);
|
src.appendChild(source_link);
|
||||||
|
@ -169,6 +169,18 @@ function create_log_table(obj_json) {
|
||||||
|
|
||||||
msage.appendChild(document.createTextNode(message.join(" ")));
|
msage.appendChild(document.createTextNode(message.join(" ")));
|
||||||
|
|
||||||
|
var paste_path = parsedmess[5];
|
||||||
|
var url_to_saved_paste = url_showSavedPath+"?paste="+paste_path+"&num=0";
|
||||||
|
|
||||||
|
var action_icon_a = document.createElement("A");
|
||||||
|
action_icon_a.setAttribute("TARGET", "_blank");
|
||||||
|
action_icon_a.setAttribute("HREF", url_to_saved_paste);
|
||||||
|
var action_icon_span = document.createElement('SPAN');
|
||||||
|
action_icon_span.className = "fa fa-search-plus";
|
||||||
|
action_icon_a.appendChild(action_icon_span);
|
||||||
|
|
||||||
|
inspect.appendChild(action_icon_a);
|
||||||
|
|
||||||
tr.appendChild(time)
|
tr.appendChild(time)
|
||||||
tr.appendChild(chan);
|
tr.appendChild(chan);
|
||||||
tr.appendChild(level);
|
tr.appendChild(level);
|
||||||
|
@ -177,6 +189,7 @@ function create_log_table(obj_json) {
|
||||||
tr.appendChild(pdate);
|
tr.appendChild(pdate);
|
||||||
tr.appendChild(nam);
|
tr.appendChild(nam);
|
||||||
tr.appendChild(msage);
|
tr.appendChild(msage);
|
||||||
|
tr.appendChild(inspect);
|
||||||
|
|
||||||
if (tr.className == document.getElementById("checkbox_log_info").value && document.getElementById("checkbox_log_info").checked == true) {
|
if (tr.className == document.getElementById("checkbox_log_info").value && document.getElementById("checkbox_log_info").checked == true) {
|
||||||
tableBody.appendChild(tr);
|
tableBody.appendChild(tr);
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Paste name</th>
|
<th>Paste name</th>
|
||||||
<th>Message</th>
|
<th>Message</th>
|
||||||
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="tab_body">
|
<tbody id="tab_body">
|
||||||
|
@ -153,6 +154,7 @@
|
||||||
<!-- /#page-wrapper -->
|
<!-- /#page-wrapper -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<script> var url_showSavedPath = "{{ url_for('showsavedpaste') }}"; </script>
|
||||||
<script type="text/javascript" src="{{ url_for('static', filename='js/indexjavascript.js')}}"></script>
|
<script type="text/javascript" src="{{ url_for('static', filename='js/indexjavascript.js')}}"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue