Revision 6f1bcc36
Added by Colin Fleming about 12 years ago
etc/inc/shaper.inc | ||
---|---|---|
602 | 602 |
$form .= $this->GetQname() . "&action=delete\">"; |
603 | 603 |
$form .= "<img src=\""; |
604 | 604 |
$form .= "./themes/".$g['theme']."/images/icons/icon_x.gif\""; |
605 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Disable shaper on interface\">"; |
|
605 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Disable shaper on interface\" alt=\"disable\" />";
|
|
606 | 606 |
$form .= "<span>Disable shaper on interface</span></a></td></tr>"; |
607 | 607 |
|
608 | 608 |
return $form; |
... | ... | |
619 | 619 |
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\""; |
620 | 620 |
if ($this->GetEnabled() == "on") |
621 | 621 |
$form .= " CHECKED"; |
622 |
$form .= " ><span class=\"vexpl\"> " . gettext("Enable/disable discipline and its children") . "</span>"; |
|
622 |
$form .= " /><span class=\"vexpl\"> " . gettext("Enable/disable discipline and its children") . "</span>";
|
|
623 | 623 |
$form .= "</td></tr>"; |
624 | 624 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\"><br/><span class=\"vexpl\">" . gettext("Name") . "</span></td>"; |
625 | 625 |
$form .= "<td class=\"vncellreq\">"; |
... | ... | |
654 | 654 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">" . gettext("Bandwidth"); |
655 | 655 |
$form .= "</td><td class=\"vncellreq\">"; |
656 | 656 |
$form .= "<input type=\"text\" id=\"bandwidth\" name=\"bandwidth\" value=\""; |
657 |
$form .= $this->GetBandwidth() . "\">"; |
|
657 |
$form .= $this->GetBandwidth() . "\" />";
|
|
658 | 658 |
$form .= "<select id=\"bandwidthtype\" name=\"bandwidthtype\" class=\"formselect\">"; |
659 | 659 |
$form .= "<option value=\"Kb\""; |
660 | 660 |
if ($this->GetBwscale() == "Kb") |
... | ... | |
678 | 678 |
$form .= "<td class=\"vncellreq\">"; |
679 | 679 |
$form .= "<input type=\"text\" id=\"qlimit\" name=\"qlimit\" value=\""; |
680 | 680 |
$form .= $this->GetQlimit(); |
681 |
$form .= "\">"; |
|
681 |
$form .= "\" />";
|
|
682 | 682 |
$form .= "</td></tr>"; |
683 | 683 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">TBR Size</td>"; |
684 | 684 |
$form .= "<td class=\"vncellreq\">"; |
685 | 685 |
$form .= "<br /><input type=\"text\" id=\"tbrconfig\" name=\"tbrconfig\" value=\""; |
686 | 686 |
$form .= $this->GetTbrConfig(); |
687 |
$form .= "\">"; |
|
687 |
$form .= "\" />";
|
|
688 | 688 |
$form .= "<br/> <span class=\"vexpl\">"; |
689 | 689 |
$form .= gettext("Adjusts the size, in bytes, of the token bucket regulator. " |
690 | 690 |
. "If not specified, heuristics based on the interface " |
691 | 691 |
. "bandwidth are used to determine the size."); |
692 | 692 |
$form .= "</span></td></tr>"; |
693 | 693 |
$form .= "<input type=\"hidden\" id=\"interface\" name=\"interface\""; |
694 |
$form .= " value=\"" . $this->GetInterface() . "\">"; |
|
695 |
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\"".$this->GetQname()."\" >"; |
|
694 |
$form .= " value=\"" . $this->GetInterface() . "\" />";
|
|
695 |
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\"".$this->GetQname()."\" />";
|
|
696 | 696 |
|
697 | 697 |
|
698 | 698 |
return $form; |
... | ... | |
1128 | 1128 |
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\""; |
1129 | 1129 |
if ($this->GetEnabled() == "on") |
1130 | 1130 |
$form .= " CHECKED"; |
1131 |
$form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue and its children") . "</span>"; |
|
1131 |
$form .= " /><span class=\"vexpl\"> " . gettext("Enable/Disable queue and its children") . "</span>";
|
|
1132 | 1132 |
$form .= "</td></tr>"; |
1133 | 1133 |
$form .= "<tr>"; |
1134 | 1134 |
$form .= "<td width=\"22%\" valign=\"middle\" class=\"vncellreq\">"; |
1135 | 1135 |
$form .= gettext("Queue Name") . "</td><td width=\"78%\" class=\"vtable\">"; |
1136 | 1136 |
$form .= "<input name=\"newname\" type=\"text\" id=\"newname\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\""; |
1137 | 1137 |
$form .= htmlspecialchars($this->GetQname()); |
1138 |
$form .= "\">"; |
|
1138 |
$form .= "\" />";
|
|
1139 | 1139 |
$form .= "<input name=\"name\" type=\"hidden\" id=\"name\" class=\"formfld unknown\" size=\"15\" maxlength=\"15\" value=\""; |
1140 | 1140 |
$form .= htmlspecialchars($this->GetQname()); |
1141 |
$form .= "\">"; |
|
1141 |
$form .= "\" />";
|
|
1142 | 1142 |
$form .= "<br /> <span class=\"vexpl\">" . gettext("Enter the name of the queue here. Do not use spaces and limit the size to 15 characters."); |
1143 | 1143 |
$form .= "</span><br /></td>"; |
1144 | 1144 |
$form .= "</tr><tr>"; |
1145 | 1145 |
$form .= "<td width=\"22%\" valign=\"middle\" class=\"vncellreq\">" . gettext("Priority") . "</td>"; |
1146 | 1146 |
$form .= "<td width=\"78%\" class=\"vtable\"> <input name=\"priority\" type=\"text\" id=\"priority\" size=\"5\" value=\""; |
1147 | 1147 |
$form .= htmlspecialchars($this->GetQpriority()); |
1148 |
$form .= "\">"; |
|
1148 |
$form .= "\" />";
|
|
1149 | 1149 |
$form .= "<br/> <span class=\"vexpl\">" . gettext("For hfsc, the range is 0 to 7. The default is 1. Hfsc queues with a higher priority are preferred in the case of overload.") . "</span></td>"; |
1150 | 1150 |
$form .= "</tr>"; |
1151 | 1151 |
$form .= "<tr>"; |
1152 | 1152 |
$form .= "<td width=\"22%\" valign=\"middle\" class=\"vncellreq\">" . gettext("Queue limit") . "</td>"; |
1153 | 1153 |
$form .= "<td width=\"78%\" class=\"vtable\"> <input name=\"qlimit\" type=\"text\" id=\"qlimit\" size=\"8\" value=\""; |
1154 | 1154 |
$form .= htmlspecialchars($this->GetQlimit()); |
1155 |
$form .= "\">"; |
|
1155 |
$form .= "\" />";
|
|
1156 | 1156 |
$form .= "<br/> <span class=\"vexpl\">" . gettext("Queue limit in packets per second."); |
1157 | 1157 |
$form .= "</span></td>"; |
1158 | 1158 |
$form .= "<tr>"; |
... | ... | |
1161 | 1161 |
if (empty($this->subqueues)) { |
1162 | 1162 |
if ($this->GetDefault()) { |
1163 | 1163 |
$form .= "<input type=\"checkbox\" id=\"default\" CHECKED name=\"default\" value=\"default\""; |
1164 |
$form .= "> " . gettext("Default queue") . "<br/>"; |
|
1164 |
$form .= " /> " . gettext("Default queue") . "<br/>";
|
|
1165 | 1165 |
} else { |
1166 | 1166 |
$form .= "<input type=\"checkbox\" id=\"default\" name=\"default\" value=\"default\""; |
1167 |
$form .= "> " . gettext("Default queue") . "<br/>"; |
|
1167 |
$form .= " /> " . gettext("Default queue") . "<br/>";
|
|
1168 | 1168 |
} |
1169 | 1169 |
} |
1170 | 1170 |
$form .= "<input type=\"checkbox\" id=\"red\" name=\"red\" value=\"red\" "; |
1171 | 1171 |
$tmpvalue = $this->GetRed(); |
1172 | 1172 |
if(!empty($tmpvalue)) |
1173 | 1173 |
$form .= " CHECKED"; |
1174 |
$form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#red\">" . gettext("Random Early Detection") . "</a><br/>"; |
|
1174 |
$form .= " /> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#red\">" . gettext("Random Early Detection") . "</a><br/>";
|
|
1175 | 1175 |
$form .= "<input type=\"checkbox\" id=\"rio\" name=\"rio\" value=\"rio\""; |
1176 | 1176 |
$tmpvalue = $this->GetRio(); |
1177 | 1177 |
if(!empty($tmpvalue)) |
1178 | 1178 |
$form .= " CHECKED"; |
1179 |
$form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#rio\">" . gettext("Random Early Detection In and Out") . "</a><br/>"; |
|
1179 |
$form .= " /> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#rio\">" . gettext("Random Early Detection In and Out") . "</a><br/>";
|
|
1180 | 1180 |
$form .= "<input type=\"checkbox\" id=\"ecn\" name=\"ecn\" value=\"ecn\""; |
1181 | 1181 |
$tmpvalue = $this->GetEcn(); |
1182 | 1182 |
if(!empty($tmpvalue)) |
1183 | 1183 |
$form .= " CHECKED"; |
1184 |
$form .= "> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#ecn\">" . gettext("Explicit Congestion Notification") . "</a><br/>"; |
|
1184 |
$form .= " /> <a target=\"_new\" href=\"http://www.openbsd.org/faq/pf/queueing.html#ecn\">" . gettext("Explicit Congestion Notification") . "</a><br/>";
|
|
1185 | 1185 |
$form .= "<span class=\"vexpl\"><br/>" . gettext("Select options for this queue"); |
1186 | 1186 |
$form .= "</tr><tr>"; |
1187 | 1187 |
$form .= "<td width=\"22%\" class=\"vncellreq\">" . gettext("Description") . "</td>"; |
1188 | 1188 |
$form .= "<td width=\"78%\" class=\"vtable\">"; |
1189 |
$form .= "<input type=\"text\" name=\"description\" size=\"50%\" class=\"formfld unknown\" value=\"" . $this->GetDescription() . "\" >";
|
|
1189 |
$form .= "<input type=\"text\" name=\"description\" size=\"50%\" class=\"formfld unknown\" value=\"" . $this->GetDescription() . "\" />";
|
|
1190 | 1190 |
$form .= "</td></tr>"; |
1191 | 1191 |
$form .= "<input type=\"hidden\" name=\"interface\" id=\"interface\""; |
1192 |
$form .= " value=\"".$this->GetInterface()."\">"; |
|
1192 |
$form .= " value=\"".$this->GetInterface()."\" />";
|
|
1193 | 1193 |
|
1194 | 1194 |
return $form; |
1195 | 1195 |
} |
... | ... | |
1226 | 1226 |
$form .= $this->GetQname() . "&action=delete\">"; |
1227 | 1227 |
$form .= "<img src=\""; |
1228 | 1228 |
$form .= "./themes/".$g['theme']."/images/icons/icon_x.gif\""; |
1229 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("Delete queue from interface") . "\">"; |
|
1229 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"" . gettext("Delete queue from interface") . "\" alt=\"delete\" />";
|
|
1230 | 1230 |
$form .= "<span>" . gettext("Delete queue from interface") . "</span></a></td></tr>"; |
1231 | 1231 |
|
1232 | 1232 |
return $form; |
... | ... | |
1859 | 1859 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Bandwidth") . "</td>"; |
1860 | 1860 |
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\""; |
1861 | 1861 |
$form .= htmlspecialchars($this->GetBandwidth()); |
1862 |
$form .= "\">"; |
|
1862 |
$form .= "\" />";
|
|
1863 | 1863 |
$form .= "<select name=\"bandwidthtype\" id=\"bandwidthtype\" class=\"formselect\">"; |
1864 | 1864 |
$form .= "<option value=\"Gb\""; |
1865 | 1865 |
if ($this->GetBwscale() == "Gb") |
... | ... | |
1892 | 1892 |
$form .= "<tr><td><input type=\"checkbox\" id=\"upperlimit\" name=\"upperlimit\""; |
1893 | 1893 |
if($this->GetUpperlimit()<> "") |
1894 | 1894 |
$form .= " CHECKED "; |
1895 |
$form .= "onChange=\"enable_upperlimit()\"> " . gettext("Upperlimit:") . "</td><td><input size=\"6\" value=\"";
|
|
1895 |
$form .= "onchange=\"enable_upperlimit()\" /> " . gettext("Upperlimit:") . "</td><td><input size=\"6\" value=\"";
|
|
1896 | 1896 |
$form .= htmlspecialchars($this->GetU_m1()); |
1897 | 1897 |
$form .= "\" id=\"upperlimit1\" name=\"upperlimit1\" "; |
1898 | 1898 |
if ($this->GetUpperlimit() == "") |
1899 | 1899 |
$form .= " disabled"; |
1900 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1900 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1901 | 1901 |
$form .= htmlspecialchars($this->GetU_d()); |
1902 | 1902 |
$form .= "\" id=\"upperlimi2\" name=\"upperlimit2\" "; |
1903 | 1903 |
if ($this->GetUpperlimit() == "") |
1904 | 1904 |
$form .= " disabled"; |
1905 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1905 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1906 | 1906 |
$form .= htmlspecialchars($this->GetU_m2()); |
1907 | 1907 |
$form .= "\" id=\"upperlimit3\" name=\"upperlimit3\" "; |
1908 | 1908 |
if ($this->GetUpperlimit() == "") |
1909 | 1909 |
$form .= " disabled"; |
1910 |
$form .= "></td><td>" . gettext("The maximum allowed bandwidth for the queue.") . "</td></tr>"; |
|
1910 |
$form .= " /></td><td>" . gettext("The maximum allowed bandwidth for the queue.") . "</td></tr>";
|
|
1911 | 1911 |
$form .= "<tr><td><input type=\"checkbox\" id=\"realtime\" name=\"realtime\""; |
1912 | 1912 |
if($this->GetRealtime() <> "") |
1913 | 1913 |
$form .= " CHECKED "; |
1914 |
$form .= "onChange=\"enable_realtime()\"> " . gettext("Real time:") . "</td><td><input size=\"6\" value=\"";
|
|
1914 |
$form .= "onchange=\"enable_realtime()\" /> " . gettext("Real time:") . "</td><td><input size=\"6\" value=\"";
|
|
1915 | 1915 |
$form .= htmlspecialchars($this->GetR_m1()); |
1916 | 1916 |
$form .= "\" id=\"realtime1\" name=\"realtime1\" "; |
1917 | 1917 |
if ($this->GetRealtime() == "") |
1918 | 1918 |
$form .= " disabled"; |
1919 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1919 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1920 | 1920 |
$form .= htmlspecialchars($this->GetR_d()); |
1921 | 1921 |
$form .= "\" id=\"realtime2\" name=\"realtime2\" "; |
1922 | 1922 |
if ($this->GetRealtime() == "") |
1923 | 1923 |
$form .= " disabled"; |
1924 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1924 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1925 | 1925 |
$form .= htmlspecialchars($this->GetR_m2()); |
1926 | 1926 |
$form .= "\" id=\"realtime3\" name=\"realtime3\" "; |
1927 | 1927 |
if ($this->GetRealtime() == "") |
1928 | 1928 |
$form .= " disabled"; |
1929 |
$form .= "></td><td>" . gettext("The minimum required bandwidth for the queue.") . "</td></tr>"; |
|
1929 |
$form .= " /></td><td>" . gettext("The minimum required bandwidth for the queue.") . "</td></tr>";
|
|
1930 | 1930 |
$form .= "<tr><td><input type=\"checkbox\" id=\"linkshare\" id=\"linkshare\" name=\"linkshare\""; |
1931 | 1931 |
if($this->GetLinkshare() <> "") |
1932 | 1932 |
$form .= " CHECKED "; |
1933 |
$form .= "onChange=\"enable_linkshare()\"> " . gettext("Link share:") . "</td><td><input size=\"6\" value=\"";
|
|
1933 |
$form .= "onchange=\"enable_linkshare()\" /> " . gettext("Link share:") . "</td><td><input size=\"6\" value=\"";
|
|
1934 | 1934 |
$form .= htmlspecialchars($this->GetL_m1()); |
1935 | 1935 |
$form .= "\" id=\"linkshare1\" name=\"linkshare1\" "; |
1936 | 1936 |
if ($this->GetLinkshare() == "") |
1937 | 1937 |
$form .= " disabled"; |
1938 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1938 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1939 | 1939 |
$form .= htmlspecialchars($this->GetL_d()); |
1940 | 1940 |
$form .= "\" id=\"linkshare2\" name=\"linkshare2\" "; |
1941 | 1941 |
if ($this->GetLinkshare() == "") |
1942 | 1942 |
$form .= " disabled"; |
1943 |
$form .= "></td><td><input size=\"6\" value=\""; |
|
1943 |
$form .= " /></td><td><input size=\"6\" value=\"";
|
|
1944 | 1944 |
$form .= htmlspecialchars($this->GetL_m2()); |
1945 | 1945 |
$form .= "\" id=\"linkshare3\" name=\"linkshare3\" "; |
1946 | 1946 |
if ($this->GetLinkshare() == "") |
1947 | 1947 |
$form .= " disabled"; |
1948 |
$form .= "></td><td>" . gettext("The bandwidth share of a backlogged queue - this overrides priority.") . "</td></tr>"; |
|
1948 |
$form .= " /></td><td>" . gettext("The bandwidth share of a backlogged queue - this overrides priority.") . "</td></tr>";
|
|
1949 | 1949 |
$form .= "</table><br/>"; |
1950 | 1950 |
$form .= gettext("The format for service curve specifications is (m1, d, m2). m2 controls " |
1951 | 1951 |
. "the bandwidth assigned to the queue. m1 and d are optional and can be " |
... | ... | |
2337 | 2337 |
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\""; |
2338 | 2338 |
if ($this->GetBandwidth() > 0) |
2339 | 2339 |
$form .= htmlspecialchars($this->GetBandwidth()); |
2340 |
$form .= "\">"; |
|
2340 |
$form .= "\" />";
|
|
2341 | 2341 |
$form .= "<select name=\"bandwidthtype\" id=\"bandwidthtype\" class=\"formselect\">"; |
2342 | 2342 |
$form .= "<option value=\"Gb\""; |
2343 | 2343 |
if ($this->GetBwscale() == "Gb") |
... | ... | |
2366 | 2366 |
$form .= "<td class=\"vtable\"><input type=\"checkbox\" id=\"borrow\" name=\"borrow\""; |
2367 | 2367 |
if($this->GetBorrow() == "on") |
2368 | 2368 |
$form .= " CHECKED "; |
2369 |
$form .= "> " . gettext("Borrow from other queues when available") . "<br/></td></tr>"; |
|
2369 |
$form .= " /> " . gettext("Borrow from other queues when available") . "<br/></td></tr>";
|
|
2370 | 2370 |
|
2371 | 2371 |
return $form; |
2372 | 2372 |
} |
... | ... | |
2603 | 2603 |
$form .= "<td class=\"vtable\"> <input name=\"bandwidth\" id=\"bandwidth\" class=\"formfld unknown\" value=\""; |
2604 | 2604 |
if ($this->GetBandwidth() > 0) |
2605 | 2605 |
$form .= htmlspecialchars($this->GetBandwidth()); |
2606 |
$form .= "\">"; |
|
2606 |
$form .= "\" />";
|
|
2607 | 2607 |
$form .= "<select name=\"bandwidthtype\" id=\"bandwidthtype\" class=\"formselect\">"; |
2608 | 2608 |
$form .= "<option value=\"Gb\""; |
2609 | 2609 |
if ($this->GetBwscale() == "Gb") |
... | ... | |
2634 | 2634 |
$tmpvalue = trim($this->GetBuckets()); |
2635 | 2635 |
if(!empty($tmpvalue)) |
2636 | 2636 |
$form .= $this->GetBuckets(); |
2637 |
$form .= "\"> " . gettext("Number of buckets available.") . "<br/></td></tr>"; |
|
2637 |
$form .= "\" /> " . gettext("Number of buckets available.") . "<br/></td></tr>";
|
|
2638 | 2638 |
$form .= "<tr><td class=\"vtable\"><input id=\"hogs\" name=\"hogs\" value=\""; |
2639 | 2639 |
$tmpvalue = trim($this->GetHogs()); |
2640 | 2640 |
if(!empty($tmpvalue)) |
2641 | 2641 |
$form .= $this->GetHogs(); |
2642 |
$form .= "\"> " . gettext("Bandwidth limit for hosts to not saturate link.") . "<br/></td></tr>"; |
|
2642 |
$form .= "\" /> " . gettext("Bandwidth limit for hosts to not saturate link.") . "<br/></td></tr>";
|
|
2643 | 2643 |
$form .= "</table></td></tr>"; |
2644 | 2644 |
return $form; |
2645 | 2645 |
} |
... | ... | |
3101 | 3101 |
tbody = d.getElementById(tableId).getElementsByTagName("tbody").item(0); |
3102 | 3102 |
tr = d.createElement("tr"); |
3103 | 3103 |
td = d.createElement("td"); |
3104 |
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='bandwidth_row-" + totalrows + "'></input><input size='10' type='text' class='formfld unknown' name='bandwidth" + totalrows + "' id='bandwidth" + totalrows + "'></input> ";
|
|
3104 |
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='bandwidth_row-" + totalrows + "' /><input size='10' type='text' class='formfld unknown' name='bandwidth" + totalrows + "' id='bandwidth" + totalrows + "' />";
|
|
3105 | 3105 |
tr.appendChild(td); |
3106 | 3106 |
td = d.createElement("td"); |
3107 |
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='bwtype_row-" + totalrows + "'></input><select class='formselect' name='bwtype" + totalrows + "'>{$bwopt}</select>";
|
|
3107 |
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='bwtype_row-" + totalrows + "' /><select class='formselect' name='bwtype" + totalrows + "'>{$bwopt}</select>";
|
|
3108 | 3108 |
tr.appendChild(td); |
3109 | 3109 |
td = d.createElement("td"); |
3110 |
td.innerHTML="<INPUT type='hidden' value='" + totalrows +"' name='bwsched_row-" + totalrows + "'></input><select class='formselect' name='bwsched" + totalrows + "'>{$schedules}</select>";
|
|
3110 |
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='bwsched_row-" + totalrows + "' /><select class='formselect' name='bwsched" + totalrows + "'>{$schedules}</select>";
|
|
3111 | 3111 |
tr.appendChild(td); |
3112 | 3112 |
td = d.createElement("td"); |
3113 | 3113 |
td.rowSpan = "1"; |
3114 |
td.innerHTML = '<a onclick="removeBwRow(this); return false;" href="#"><img border="0" src="/themes/{$g['theme']}/images/icons/icon_x.gif" /></a>'; |
|
3114 |
td.innerHTML = '<a onclick="removeBwRow(this); return false;" href="#"><img border="0" src="/themes/{$g['theme']}/images/icons/icon_x.gif" alt="remove" /></a>';
|
|
3115 | 3115 |
tr.appendChild(td); |
3116 | 3116 |
tbody.appendChild(tr); |
3117 | 3117 |
totalrows++; |
... | ... | |
3154 | 3154 |
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\""; |
3155 | 3155 |
if ($this->GetEnabled() == "on") |
3156 | 3156 |
$form .= " CHECKED"; |
3157 |
$form .= " ><span class=\"vexpl\"> " . gettext("Enable limiter and its children") . "</span>"; |
|
3157 |
$form .= " /><span class=\"vexpl\"> " . gettext("Enable limiter and its children") . "</span>";
|
|
3158 | 3158 |
$form .= "</td></tr>"; |
3159 | 3159 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\"><br/><span class=\"vexpl\">" . gettext("Name") . "</span></td>"; |
3160 | 3160 |
$form .= "<td class=\"vncellreq\">"; |
3161 | 3161 |
$form .= "<input type=\"text\" id=\"newname\" name=\"newname\" value=\""; |
3162 |
$form .= $this->GetQname()."\">"; |
|
3162 |
$form .= $this->GetQname()."\" />";
|
|
3163 | 3163 |
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\""; |
3164 |
$form .= $this->GetQname()."\">"; |
|
3164 |
$form .= $this->GetQname()."\" />";
|
|
3165 | 3165 |
if ($this->GetNumber() > 0) { |
3166 | 3166 |
$form .= "<input type=\"hidden\" id=\"number\" name=\"number\" value=\""; |
3167 |
$form .= $this->GetNumber()."\">"; |
|
3167 |
$form .= $this->GetNumber()."\" />";
|
|
3168 | 3168 |
} |
3169 | 3169 |
$form .= "</td></tr>"; |
3170 | 3170 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">" . gettext("Bandwidth"); |
... | ... | |
3180 | 3180 |
if (is_array($bandwidth)) { |
3181 | 3181 |
foreach ($bandwidth as $bwidx => $bw) { |
3182 | 3182 |
$form .= "\n<tr><td width='40%'>"; |
3183 |
$form .= "<input class='formfld unknown' size='10' type=\"text\" id=\"bandwidth{$bwidx}\" name=\"bandwidth{$bwidx}\" value=\"{$bw['bw']}\">"; |
|
3183 |
$form .= "<input class='formfld unknown' size='10' type=\"text\" id=\"bandwidth{$bwidx}\" name=\"bandwidth{$bwidx}\" value=\"{$bw['bw']}\" />";
|
|
3184 | 3184 |
$form .= "</td><td width='20%'>"; |
3185 | 3185 |
$form .= "<select id=\"bwtype{$bwidx}\" name=\"bwtype{$bwidx}\" class=\"formselect\">"; |
3186 | 3186 |
foreach (array("Kb" => "Kbit/s", "Mb" => "Mbit/s", "Gb" => "Gbit/s", "b" => "Bit/s") as $bwsidx => $bwscale) { |
... | ... | |
3200 | 3200 |
} |
3201 | 3201 |
$form .= "</select>"; |
3202 | 3202 |
$form .= "</td><td width='5%' >"; |
3203 |
$form .= "<a onclick=\"removeBwRow(this); return false;\" href='#'><img border='0' src='/themes/{$g['theme']}/images/icons/icon_x.gif' /></a>"; |
|
3203 |
$form .= "<a onclick=\"removeBwRow(this); return false;\" href='#'><img border='0' src='/themes/{$g['theme']}/images/icons/icon_x.gif' alt='remove' /></a>";
|
|
3204 | 3204 |
$form .= "</td></tr>"; |
3205 | 3205 |
} |
3206 | 3206 |
} |
3207 | 3207 |
$form .= "</tbody></table>"; |
3208 | 3208 |
$form .= "<a onclick=\"javascript:addBwRowTo('maintable'); return false;\" href='#'>"; |
3209 |
$form .= "<img border='0' src='/themes/{$g['theme']}/images/icons/icon_plus.gif' alt='' title='" . gettext("add another schedule") . "' /></a>"; |
|
3209 |
$form .= "<img border='0' src='/themes/{$g['theme']}/images/icons/icon_plus.gif' alt='add' title='" . gettext("add another schedule") . "' /></a>";
|
|
3210 | 3210 |
$form .= "</td></tr>"; |
3211 | 3211 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">" . gettext("Mask") . "</td>"; |
3212 | 3212 |
$form .= "<td class=\"vncellreq\">"; |
... | ... | |
3235 | 3235 |
$form .= "<td class=\"vncellreq\">"; |
3236 | 3236 |
$form .= "<input type=\"text\" class=\"formfld unknown\" size=\"50%\" id=\"description\" name=\"description\" value=\""; |
3237 | 3237 |
$form .= $this->GetDescription(); |
3238 |
$form .= "\">"; |
|
3238 |
$form .= "\" />";
|
|
3239 | 3239 |
$form .= "<br/> <span class=\"vexpl\">"; |
3240 | 3240 |
$form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>"; |
3241 | 3241 |
$form .= "</td></tr>"; |
3242 | 3242 |
$form .= "<tr id=\"sprtable4\" name=\"sprtable4\">"; |
3243 | 3243 |
$form .= "<td></td>"; |
3244 | 3244 |
$form .= "<td><div id=\"showadvancedboxspr\">"; |
3245 |
$form .= "<p><input type=\"button\" onClick=\"show_source_port_range()\"";
|
|
3246 |
$form .= " value=\"" . gettext("Show advanced options") . "\"></input></a>";
|
|
3245 |
$form .= "<p><input type=\"button\" onclick=\"show_source_port_range()\"";
|
|
3246 |
$form .= " value=\"" . gettext("Show advanced options") . "\" />";
|
|
3247 | 3247 |
$form .= "</div></td></tr>"; |
3248 | 3248 |
$form .= "<tr style=\"display:none\" id=\"sprtable\" name=\"sprtable\">"; |
3249 | 3249 |
|
3250 | 3250 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Delay") . "</td>"; |
3251 | 3251 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">"; |
3252 | 3252 |
$form .= "<input name=\"delay\" type=\"text\" id=\"delay\" size=\"5\" value=\""; |
3253 |
$form .= $this->GetDelay() . "\">"; |
|
3253 |
$form .= $this->GetDelay() . "\" />";
|
|
3254 | 3254 |
$form .= " ms<br/> <span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3255 | 3255 |
. "should specify 0 here (or leave the field empty)") . "</span>"; |
3256 | 3256 |
$form .= "</td></tr><br/>"; |
... | ... | |
3258 | 3258 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Packet loss rate") . "</td>"; |
3259 | 3259 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">"; |
3260 | 3260 |
$form .= "<input name=\"plr\" type=\"text\" id=\"plr\" size=\"5\" value=\""; |
3261 |
$form .= $this->GetPlr() . "\">"; |
|
3261 |
$form .= $this->GetPlr() . "\" />";
|
|
3262 | 3262 |
$form .= " <br/> <span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3263 | 3263 |
. "should specify 0 here (or leave the field empty). " |
3264 | 3264 |
. "A value of 0.001 means one packet in 1000 gets dropped") . "</span>"; |
... | ... | |
3267 | 3267 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Queue Size") . "</td>"; |
3268 | 3268 |
$form .= "<td class=\"vncellreq\">"; |
3269 | 3269 |
$form .= "<input type=\"text\" id=\"qlimit\" name=\"qlimit\" value=\""; |
3270 |
$form .= $this->GetQlimit() . "\">"; |
|
3270 |
$form .= $this->GetQlimit() . "\" />";
|
|
3271 | 3271 |
$form .= " slots<br/>"; |
3272 | 3272 |
$form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3273 | 3273 |
. "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first, " |
... | ... | |
3278 | 3278 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Bucket Size") . "</td>"; |
3279 | 3279 |
$form .= "<td class=\"vncellreq\">"; |
3280 | 3280 |
$form .= "<input type=\"text\" id=\"buckets\" name=\"buckets\" value=\""; |
3281 |
$form .= $this->GetBuckets() . "\">"; |
|
3281 |
$form .= $this->GetBuckets() . "\" />";
|
|
3282 | 3282 |
$form .= " slots<br/>"; |
3283 | 3283 |
$form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3284 | 3284 |
. "should leave the field empty. It increases the hash size set."); |
... | ... | |
3443 | 3443 |
$form .= " <input type=\"checkbox\" id=\"enabled\" name=\"enabled\" value=\"on\""; |
3444 | 3444 |
if ($this->GetEnabled() == "on") |
3445 | 3445 |
$form .= " CHECKED"; |
3446 |
$form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable queue") . "</span>"; |
|
3446 |
$form .= " /><span class=\"vexpl\"> " . gettext("Enable/Disable queue") . "</span>";
|
|
3447 | 3447 |
$form .= "</td></tr>"; |
3448 | 3448 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\"><br/><span class=\"vexpl\">" . gettext("Name") . "</span></td>"; |
3449 | 3449 |
$form .= "<td class=\"vncellreq\">"; |
3450 | 3450 |
$form .= "<input type=\"text\" id=\"newname\" name=\"newname\" value=\""; |
3451 |
$form .= $this->GetQname()."\">"; |
|
3451 |
$form .= $this->GetQname()."\" />";
|
|
3452 | 3452 |
$form .= "<input type=\"hidden\" id=\"name\" name=\"name\" value=\""; |
3453 |
$form .= $this->GetQname()."\">"; |
|
3453 |
$form .= $this->GetQname()."\" />";
|
|
3454 | 3454 |
if ($this->GetNumber() > 0) { |
3455 | 3455 |
$form .= "<input type=\"hidden\" id=\"number\" name=\"number\" value=\""; |
3456 |
$form .= $this->GetNumber()."\">"; |
|
3456 |
$form .= $this->GetNumber()."\" />";
|
|
3457 | 3457 |
} |
3458 | 3458 |
$form .= "</td></tr>"; |
3459 | 3459 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">" . gettext("Mask") . "</td>"; |
... | ... | |
3483 | 3483 |
$form .= "<td class=\"vncellreq\">"; |
3484 | 3484 |
$form .= "<input type=\"text\" id=\"description\" class=\"formfld unknown\" size=\"50%\" name=\"description\" value=\""; |
3485 | 3485 |
$form .= $this->GetDescription(); |
3486 |
$form .= "\">"; |
|
3486 |
$form .= "\" />";
|
|
3487 | 3487 |
$form .= "<br/> <span class=\"vexpl\">"; |
3488 | 3488 |
$form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>"; |
3489 | 3489 |
$form .= "</td></tr>"; |
3490 | 3490 |
$form .= "<tr id=\"sprtable4\" name=\"sprtable4\">"; |
3491 | 3491 |
$form .= "<td></td>"; |
3492 | 3492 |
$form .= "<td><div id=\"showadvancedboxspr\">"; |
3493 |
$form .= "<p><input type=\"button\" onClick=\"show_source_port_range()\"";
|
|
3494 |
$form .= " value=\"" . gettext("Show advanced options") . "\"></input></a>";
|
|
3493 |
$form .= "<p><input type=\"button\" onclick=\"show_source_port_range()\"";
|
|
3494 |
$form .= " value=\"" . gettext("Show advanced options") . "\" />";
|
|
3495 | 3495 |
$form .= "</div></td></tr>"; |
3496 | 3496 |
$form .= "<tr style=\"display:none\" id=\"sprtable\" name=\"sprtable\">"; |
3497 | 3497 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Weight") . "</td>"; |
3498 | 3498 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">"; |
3499 | 3499 |
$form .= "<input name=\"weight\" type=\"text\" id=\"weight\" size=\"5\" value=\""; |
3500 |
$form .= $this->GetWeight() . "\">"; |
|
3500 |
$form .= $this->GetWeight() . "\" />";
|
|
3501 | 3501 |
$form .= " <br/> <span class=\"vexpl\">" . gettext("Hint: For queues under the same parent " |
3502 | 3502 |
. "this specifies the share that a queue gets(values range from 1 to 100, you can leave it blank otherwise)") . "</span>"; |
3503 | 3503 |
$form .= "</td></tr>"; |
... | ... | |
3505 | 3505 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Packet loss rate") . "</td>"; |
3506 | 3506 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">"; |
3507 | 3507 |
$form .= "<input name=\"plr\" type=\"text\" id=\"plr\" size=\"5\" value=\""; |
3508 |
$form .= $this->GetPlr() . "\">"; |
|
3508 |
$form .= $this->GetPlr() . "\" />";
|
|
3509 | 3509 |
$form .= " <br/> <span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3510 | 3510 |
. "should specify 0 here (or leave the field empty). " |
3511 | 3511 |
. "A value of 0.001 means one packet in 1000 gets dropped") . "</span>"; |
... | ... | |
3514 | 3514 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Queue Size") . "</td>"; |
3515 | 3515 |
$form .= "<td class=\"vncellreq\">"; |
3516 | 3516 |
$form .= "<input type=\"text\" id=\"qlimit\" name=\"qlimit\" value=\""; |
3517 |
$form .= $this->GetQlimit() . "\">"; |
|
3517 |
$form .= $this->GetQlimit() . "\" />";
|
|
3518 | 3518 |
$form .= " slots<br/>"; |
3519 | 3519 |
$form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3520 | 3520 |
. "should leave the field empty. All packets in this pipe are placed into a fixed-size queue first, " |
... | ... | |
3525 | 3525 |
$form .= "<td valign=\"middle\" class=\"vncellreq\">" . gettext("Bucket Size") . "</td>"; |
3526 | 3526 |
$form .= "<td class=\"vncellreq\">"; |
3527 | 3527 |
$form .= "<input type=\"text\" id=\"buckets\" name=\"buckets\" value=\""; |
3528 |
$form .= $this->GetBuckets() . "\">"; |
|
3528 |
$form .= $this->GetBuckets() . "\" />";
|
|
3529 | 3529 |
$form .= " " . gettext("slots") . "<br/>"; |
3530 | 3530 |
$form .= "<span class=\"vexpl\">" . gettext("Hint: in most cases, you " |
3531 | 3531 |
. "should leave the field empty. It increases the hash size set."); |
3532 | 3532 |
$form .= "</td></tr>"; |
3533 | 3533 |
|
3534 | 3534 |
$form .= "<input type=\"hidden\" id=\"pipe\" name=\"pipe\""; |
3535 |
$form .= " value=\"" . $this->GetPipe() . "\">"; |
|
3535 |
$form .= " value=\"" . $this->GetPipe() . "\" />";
|
|
3536 | 3536 |
|
3537 | 3537 |
return $form; |
3538 | 3538 |
|
... | ... | |
3667 | 3667 |
if ($this->GetREnabled() == "on") { |
3668 | 3668 |
$form .= "checked = \"CHECKED\""; |
3669 | 3669 |
} |
3670 |
$form .= " ><span class=\"vexpl\"> " . gettext("Enable/Disable layer7 Container") . "</span>"; |
|
3670 |
$form .= " /><span class=\"vexpl\"> " . gettext("Enable/Disable layer7 Container") . "</span>";
|
|
3671 | 3671 |
$form .= "</td></tr>"; |
3672 | 3672 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\"><br/><span class=\"vexpl\">" . gettext("Name") . "</span></td>"; |
3673 | 3673 |
$form .= "<td class=\"vncellreq\">"; |
3674 | 3674 |
$form .= "<input type=\"text\" id=\"container\" name=\"container\" value=\""; |
3675 |
$form .= $this->GetRName()."\">"; |
|
3675 |
$form .= $this->GetRName()."\" />";
|
|
3676 | 3676 |
$form .= "</td></tr>"; |
3677 | 3677 |
$form .= "<tr><td valign=\"middle\" class=\"vncellreq\">" . gettext("Description") . "</td>"; |
3678 | 3678 |
$form .= "<td class=\"vncellreq\">"; |
3679 | 3679 |
$form .= "<input type=\"text\" class=\"formfld unknown\" size=\"50%\" id=\"description\" name=\"description\" value=\""; |
3680 | 3680 |
$form .= $this->GetRDescription(); |
3681 |
$form .= "\">"; |
|
3681 |
$form .= "\" />";
|
|
3682 | 3682 |
$form .= "<br/> <span class=\"vexpl\">"; |
3683 | 3683 |
$form .= gettext("You may enter a description here for your reference (not parsed).") . "</span>"; |
3684 | 3684 |
$form .= "</td></tr>"; |
... | ... | |
4274 | 4274 |
$form .= $iface . "&queue=". $qname . "&action=add\">"; |
4275 | 4275 |
$form .= "<img src=\""; |
4276 | 4276 |
$form .= "./themes/".$g['theme']."/images/icons/icon_plus.gif\""; |
4277 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Clone shaper/queue on this interface\">"; |
|
4277 |
$form .= " width=\"17\" height=\"17\" border=\"0\" title=\"Clone shaper/queue on this interface\" alt=\"clone\" />";
|
|
4278 | 4278 |
$form .= gettext(" Clone shaper/queue on this interface") . "</a></td></tr>"; |
4279 | 4279 |
|
4280 | 4280 |
return $form; |
Also available in: Unified diff
Tidy up "shaper.inc" XHTML
Close INPUT tags
Close IMG tags and add "alt" parameter
Change ONCLICK and ONCHANGE to lowercase