r2174 - new RS list format: plain IP address
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 27 Aug 2008 11:10:27 +0000 (11:10 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 27 Aug 2008 11:10:27 +0000 (11:10 +0000)
ChangeLog
inc/interface.php
inc/ophandlers.php

index 95de3d2..0e203dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
        new feature: tell line number for lexical and syntax errors
        new feature: CodePress editor enables line numbers and syntax
                highlightling for RackCode editing
+       new feature: one more input format for RS manager
        bugfix: tags are now properly displayed for users
        bugfix: the JavaScript error isn't generated any more (fix by Aaron)
        bugfix: tag tree is now always correctly sorted
index 5879865..cb1ff9a 100644 (file)
@@ -4040,11 +4040,12 @@ function renderRSPoolServerForm ($pool_id = 0)
        echo "</td><td>Format: ";
        $formats = array
        (
+               'ssv_1' => 'SSV: &lt;IP address&gt;',
+               'ssv_2' => 'SSV: &lt;IP address&gt; &lt;port&gt;',
                'ipvs_2' => 'ipvsadm -l -n (address and port)',
                'ipvs_3' => 'ipvsadm -l -n (address, port and weight)',
-               'ssv_2' => 'SSV: &lt;IP address&gt; &lt;port&gt;'
        );
-       printSelect ($formats, 'format');
+       printSelect ($formats, 'format', 'ssv_1');
        echo "</td><td><input type=submit value=Parse></td></tr>\n";
        echo "<tr><td colspan=3><textarea name=rawtext cols=100 rows=50></textarea></td></tr>\n";
        echo "</table>\n";
index 4c40d45..58584ec 100644 (file)
@@ -877,6 +877,14 @@ function addRealServers ()
                                else
                                        $nbad++;
                                break;
+                       case 'ssv_1': // IP address
+                               if (!preg_match ('/^([0-9\.]+)$/', $line, $match))
+                                       continue;
+                               if (addRStoRSPool ($_REQUEST['pool_id'], $match[1], 0, getConfigVar ('DEFAULT_IPV4_RS_INSERVICE'), ''))
+                                       $ngood++;
+                               else
+                                       $nbad++;
+                               break;
                        default:
                                return buildRedirectURL ('ERR1');
                                break;