Menu

[r108]: / js / alerts.js  Maximize  Restore  History

Download this file

32 lines (29 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var selected_row_ref = "";
var selected_host_ref = "";
function selectRow(ref, host_ref) {
if (selected_row_ref) {
document.getElementById(selected_row_ref).style.backgroundColor = selected_row_color
}
selected_row_ref = ref;
selected_host_ref = host_ref;
selected_row_color = document.getElementById(selected_row_ref).style.backgroundColor;
document.getElementById(selected_row_ref).style.backgroundColor = "#3366CC";
}
function on_btalertdismiss_clicked() {
if (!selected_row_ref) {
alert("Please select an alert to dismiss");
} else {
var client = new XMLHttpRequest();
client.onreadystatechange = function () {
if(this.readyState == 4 && this.status == 200) {
if (this.responseText != "OK") {
alert(this.responseText);
}
} else if (this.readyState == 4 && this.status != 200) {
alert("Error on callFunction()");
}
}
client.open("GET", "do_action?action=dismiss_alert&ref=" + selected_row_ref + "&host=" + selected_host_ref);
client.send()
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.