diff options
author | robiscool <robrob2626@yahoo.com> | 2009-11-24 12:22:29 -0800 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2009-11-24 12:22:29 -0800 |
commit | dc5d3683c84a74869fb36f20037204048b000040 (patch) | |
tree | 6ec2073899a40451b41e5804f0312ce22e63f4fd /config/snort-dev/snort_interfaces.php | |
parent | a897942428ad9834f2c0732d4ed8ccd1d28a68d7 (diff) | |
download | pfsense-packages-dc5d3683c84a74869fb36f20037204048b000040.tar.gz pfsense-packages-dc5d3683c84a74869fb36f20037204048b000040.tar.bz2 pfsense-packages-dc5d3683c84a74869fb36f20037204048b000040.zip |
snort-dev, add if snort is running add color disply, error checking for snort_interface_edit.php
Diffstat (limited to 'config/snort-dev/snort_interfaces.php')
-rw-r--r-- | config/snort-dev/snort_interfaces.php | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/config/snort-dev/snort_interfaces.php b/config/snort-dev/snort_interfaces.php index fc640df0..6a275ca7 100644 --- a/config/snort-dev/snort_interfaces.php +++ b/config/snort-dev/snort_interfaces.php @@ -161,6 +161,17 @@ border-top:2px solid #DBAC48; border-bottom:2px solid #DBAC48; padding: 15px 10px 50% 50px; } +.listbg2 { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #090; + color: #000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} </style> <noscript><div class="alert" ALIGN=CENTER><img src="/themes/nervecenter/images/icons/icon_alert.gif"/><strong>Please enable JavaScript to view this content</CENTER></div></noscript> @@ -215,7 +226,17 @@ padding: 15px 10px 50% 50px; <tr valign="top" id="fr<?=$nnats;?>"> <td class="listt"><input type="checkbox" id="frc<?=$nnats;?>" name="rule[]" value="<?=$i;?>" onClick="fr_bgcolor('<?=$nnats;?>')" style="margin: 0; padding: 0; width: 15px; height: 15px;"></td> <td class="listt" align="center"></td> - <td class="listlr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='snort_interfaces_edit.php?id=<?=$nnats;?>';"> + <?php + /* convert fake interfaces to real and check if iface is up */ + $if_real = convert_friendly_interface_to_real_interface_name($natent['interface']); + $color_up = exec("/bin/ps -auwx | grep -v grep | grep \"{$nnats}{$if_real} -c\" | awk '{print $2;}'"); + If ($color_up != "") { + $class_color_up = "listbg2"; + }else{ + $class_color_up = "listbg"; + } + ?> + <td class="<?=$class_color_up;?>" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='snort_interfaces_edit.php?id=<?=$nnats;?>';"> <?php if (!$natent['interface'] || ($natent['interface'] == "wan")) echo "WAN"; @@ -226,7 +247,7 @@ padding: 15px 10px 50% 50px; else if(strtolower($natent['interface']) == "pptp") echo "PPTP"; else - echo strtoupper($config['interfaces'][$natent['interface']]['descr']); + echo strtoupper($config['interfaces']); ?> </td> <td class="listr" onClick="fr_toggle(<?=$nnats;?>)" id="frd<?=$nnats;?>" ondblclick="document.location='snort_interfaces_edit.php?id=<?=$nnats;?>';"> |