aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_os_policy_engine.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-02-19 22:34:27 -0500
committerbmeeks8 <bmeeks8@bellsouth.net>2014-02-19 22:34:27 -0500
commitb33b9a9d050bd5bc8247fc4c95ff7bde39d612f2 (patch)
tree04bcd4a8f0cb1520a71668dd011eba529a248186 /config/suricata/suricata_os_policy_engine.php
parent4b6a70ab6d1a3b50e29e4de5383bf69f867807b1 (diff)
downloadpfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.tar.gz
pfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.tar.bz2
pfsense-packages-b33b9a9d050bd5bc8247fc4c95ff7bde39d612f2.zip
Incorporate Ermal's comments into Suricata BETA pkg code.
Diffstat (limited to 'config/suricata/suricata_os_policy_engine.php')
-rw-r--r--config/suricata/suricata_os_policy_engine.php30
1 files changed, 8 insertions, 22 deletions
diff --git a/config/suricata/suricata_os_policy_engine.php b/config/suricata/suricata_os_policy_engine.php
index 5c0ebbc1..ed673006 100644
--- a/config/suricata/suricata_os_policy_engine.php
+++ b/config/suricata/suricata_os_policy_engine.php
@@ -242,33 +242,19 @@ if ($savemsg)
<script type="text/javascript" src="/javascript/autosuggest.js">
</script>
<script type="text/javascript" src="/javascript/suggestions.js">
-
-<?php
- $isfirst = 0;
- $aliases = "";
- $addrisfirst = 0;
- $aliasesaddr = "";
- if(isset($config['aliases']['alias']) && is_array($config['aliases']['alias']))
- foreach($config['aliases']['alias'] as $alias_name) {
- if ($alias_name['type'] != "host" && $alias_name['type'] != "network")
- continue;
- // Skip any Aliases that resolve to an empty string
- if (trim(filter_expand_alias($alias_name['name'])) == "")
- continue;
- if($addrisfirst == 1) $aliasesaddr .= ",";
- $aliasesaddr .= "'" . $alias_name['name'] . "'";
- $addrisfirst = 1;
- }
-?>
- var addressarray=new Array(<?php echo $aliasesaddr; ?>);
+</script>
+<script type="text/javascript">
+//<![CDATA[
+ var addressarray = <?= json_encode(get_alias_list(array("host", "network"))) ?>;
function createAutoSuggest() {
-<?php
- echo "objAlias = new AutoSuggestControl(document.getElementById('frag3_bind_to'), new StateSuggestions(addressarray));\n";
-?>
+ <?php
+ echo "\tvar objAlias = new AutoSuggestControl(document.getElementById('policy_bind_to'), new StateSuggestions(addressarray));\n";
+ ?>
}
setTimeout("createAutoSuggest();", 500);
+//]]>
</script>