Revision d3dbd302
Added by Stephen Beaver almost 10 years ago
src/usr/local/www/widgets/widgets/log.widget.php | ||
---|---|---|
136 | 136 |
$rule = find_rule_by_number($filterent['rulenum'], $filterent['tracker'], $filterent['act']); |
137 | 137 |
?> |
138 | 138 |
<tr> |
139 |
<td><a role="button" data-toggle="popover" data-trigger="hover" |
|
139 |
<td><a <a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);" |
|
140 |
role="button" data-toggle="popover" data-trigger="hover" |
|
140 | 141 |
data-title="Rule that triggered this action" |
141 | 142 |
data-content="<?=htmlspecialchars($rule)?>"> <i |
142 | 143 |
class="icon icon-<?=$iconfn?>"></i> |
... | ... | |
232 | 233 |
</div> |
233 | 234 |
</div> |
234 | 235 |
</form> |
236 |
|
|
237 |
<script> |
|
238 |
if (typeof getURL == 'undefined') { |
|
239 |
getURL = function(url, callback) { |
|
240 |
if (!url) |
|
241 |
throw 'No URL for getURL'; |
|
242 |
try { |
|
243 |
if (typeof callback.operationComplete == 'function') |
|
244 |
callback = callback.operationComplete; |
|
245 |
} catch (e) {} |
|
246 |
if (typeof callback != 'function') |
|
247 |
throw 'No callback function for getURL'; |
|
248 |
var http_request = null; |
|
249 |
if (typeof XMLHttpRequest != 'undefined') { |
|
250 |
http_request = new XMLHttpRequest(); |
|
251 |
} |
|
252 |
else if (typeof ActiveXObject != 'undefined') { |
|
253 |
try { |
|
254 |
http_request = new ActiveXObject('Msxml2.XMLHTTP'); |
|
255 |
} catch (e) { |
|
256 |
try { |
|
257 |
http_request = new ActiveXObject('Microsoft.XMLHTTP'); |
|
258 |
} catch (e) {} |
|
259 |
} |
|
260 |
} |
|
261 |
if (!http_request) |
|
262 |
throw 'Both getURL and XMLHttpRequest are undefined'; |
|
263 |
http_request.onreadystatechange = function() { |
|
264 |
if (http_request.readyState == 4) { |
|
265 |
callback( { success : true, |
|
266 |
content : http_request.responseText, |
|
267 |
contentType : http_request.getResponseHeader("Content-Type") } ); |
|
268 |
} |
|
269 |
}; |
|
270 |
http_request.open('GET', url, true); |
|
271 |
http_request.send(null); |
|
272 |
}; |
|
273 |
} |
|
274 |
|
|
275 |
function outputrule(req) { |
|
276 |
alert(req.content); |
|
277 |
} |
|
278 |
|
|
279 |
</script> |
Also available in: Unified diff
Fixed #5292