Adds more documentation for Help wiki on Server Channel, add error message if no machines configured in crawl options, a=chris

Chris Pollett [2019-06-29 15:Jun:th]
Adds more documentation for Help wiki on Server Channel, add error message if no machines configured in crawl options, a=chris
Filename
src/configs/PublicHelpPages.php
src/data/public_default.db
src/locale/ar/configure.ini
src/locale/bn/configure.ini
src/locale/de/configure.ini
src/locale/en_US/configure.ini
src/locale/es/configure.ini
src/locale/fa/configure.ini
src/locale/fr_FR/configure.ini
src/locale/he/configure.ini
src/locale/hi/configure.ini
src/locale/in_ID/configure.ini
src/locale/it/configure.ini
src/locale/ja/configure.ini
src/locale/kn/configure.ini
src/locale/ko/configure.ini
src/locale/nl/configure.ini
src/locale/pl/configure.ini
src/locale/pt/configure.ini
src/locale/ru/configure.ini
src/locale/te/configure.ini
src/locale/th/configure.ini
src/locale/tr/configure.ini
src/locale/vi_VN/configure.ini
src/locale/zh_CN/configure.ini
src/views/elements/CrawloptionsElement.php
diff --git a/src/configs/PublicHelpPages.php b/src/configs/PublicHelpPages.php
index 503acf070..a0162606e 100644
--- a/src/configs/PublicHelpPages.php
+++ b/src/configs/PublicHelpPages.php
@@ -2187,7 +2187,8 @@ changing the 04 above to 03, 02, 01 varies the group of cities. Most of the data
  Language: English
  Category: weather
  Channel: /<pre(?:.+?)>([^<]+)/m
- Item: /\n/
+ Item: /
+/
  Title: /^(.+?)\s\s\s+/
  Description: /\s\s\s+(.+?)$/
  Link: http://www.weather.gov/
@@ -2244,7 +2245,9 @@ If a regex is used rather than an XPath, then the first capture group of the reg

 The initial page to be download will be: https://www.somenetwork.com/daily-news. On this page, we will use the first Aux Path to find a string in the page that matches /(https\:\/\/www.somenetwork.com\/daily-news\/video\/daily-[^\"]+)\"/. The contents matching between the parentheses is the first capture group and will be the next url to download. SO for example, one might get a url:
  https://cdn.somenetwork.com/daily-news/video/daily-safghdsjfg
-This url is then downloaded and a string matching  the pattern /window\.\_\_data\s*\=\s*([^\n]+\}\;)/ is found. The capture group portion of this string consists of what matches ([^\n]+\}\;) is then converted to a JSON object, because of the json| in the Aux Url XPath. From this JSON object, we look at the video field, then the current subfields, its 0 subfield, and finally, the publicUrl field. This is the url we download next. Lastly, the download XPath is then used to actually get the final video link from this downloaded page.
+This url is then downloaded and a string matching  the pattern /window\.\_\_data\s*\=\s*([^
+]+\}\;)/ is found. The capture group portion of this string consists of what matches ([^
+]+\}\;) is then converted to a JSON object, because of the json| in the Aux Url XPath. From this JSON object, we look at the video field, then the current subfields, its 0 subfield, and finally, the publicUrl field. This is the url we download next. Lastly, the download XPath is then used to actually get the final video link from this downloaded page.
 Once this video is downloaded, it is stored in the Podcasts page's resource folder of the the My Private Group wiki group in a file with a name in the format: %Y-%m-%d.mp4.
 EOD;
 $help_pages["en-US"]["Monetization"] = <<< EOD
@@ -2766,6 +2769,33 @@ A%20famous%20social%20media%20site

 This should all be on one line. Here ###! is used a separator and the format is url##!title###!description.
 EOD;
+$help_pages["en-US"]["Server_Channel"] = <<< EOD
+page_type=standard
+
+page_alias=
+
+page_border=solid-border
+
+toc=true
+
+title=
+
+author=
+
+robots=
+
+description=
+
+alternative_path=
+
+page_header=
+
+page_footer=
+
+sort=aname
+
+END_HEAD_VARSEach machine in a cluster of Yioop instances with the same Name Server has a channel, defaulting to 0. The &#039;&#039;&#039;Server Channel&#039;&#039;&#039; drop down is populated with a list of channels of currently configured machines in the cluster. If there are no configured machines and empty message is displayed. The Server Channel of a crawl is used to specify which machines in the cluster will participate in the crawl -- only machine with the same channel as that of the crawl will participate. Using this mechanism it is possible to set up several ongoing simultaneous crawls provided they are on different channels.
+EOD;
 $help_pages["en-US"]["Start_Crawl"] = <<< EOD
 page_type=standard

diff --git a/src/data/public_default.db b/src/data/public_default.db
index 1b1f36b6a..82a82cf05 100644
Binary files a/src/data/public_default.db and b/src/data/public_default.db differ
diff --git a/src/locale/ar/configure.ini b/src/locale/ar/configure.ini
index db2575aa7..527671cf8 100755
--- a/src/locale/ar/configure.ini
+++ b/src/locale/ar/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "تتبع ارتباطات ويب"
 crawloptions_element_archive_crawl = "أرشيف الزحف"
 crawloptions_element_load_options = "الحصول على خيارات الزحف من:"
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "الزحف الترتيب:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/bn/configure.ini b/src/locale/bn/configure.ini
index 89da9248f..121364481 100755
--- a/src/locale/bn/configure.ini
+++ b/src/locale/bn/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/de/configure.ini b/src/locale/de/configure.ini
index 52385328e..faf4c39e0 100755
--- a/src/locale/de/configure.ini
+++ b/src/locale/de/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/en_US/configure.ini b/src/locale/en_US/configure.ini
index 755f7e9ed..8939419f3 100644
--- a/src/locale/en_US/configure.ini
+++ b/src/locale/en_US/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "Web Crawl"
 crawloptions_element_archive_crawl = "Archive Crawl"
 crawloptions_element_load_options = "Get Crawl Options From:"
 crawloptions_element_server_channel = "Server Channel:"
+crawloptions_element_no_machines = "No Configured Machines."
 crawloptions_element_crawl_order = "Crawl Order:"
 crawloptions_element_max_depth = "Max Depth:"
 crawloptions_element_repeat_type = "Repeat Type:"
diff --git a/src/locale/es/configure.ini b/src/locale/es/configure.ini
index 84943d71b..33d0f1b1a 100755
--- a/src/locale/es/configure.ini
+++ b/src/locale/es/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "Rastreo Web"
 crawloptions_element_archive_crawl = "Archivo de rastreo"
 crawloptions_element_load_options = "Obtener Opciones de navegaci&oacute;n desde:"
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "Orden de Rastreo:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/fa/configure.ini b/src/locale/fa/configure.ini
index a4b671048..4b9af7bbe 100755
--- a/src/locale/fa/configure.ini
+++ b/src/locale/fa/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "خزش وب"
 crawloptions_element_archive_crawl = "خزش بایگانی "
 crawloptions_element_load_options = "تنظیمات خزش را از اینجا بگیر:"
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "مرتبهٔ خزش:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/fr_FR/configure.ini b/src/locale/fr_FR/configure.ini
index 1e7cca2b3..37b3f08d6 100755
--- a/src/locale/fr_FR/configure.ini
+++ b/src/locale/fr_FR/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/he/configure.ini b/src/locale/he/configure.ini
index c009ae727..9838ea01b 100755
--- a/src/locale/he/configure.ini
+++ b/src/locale/he/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/hi/configure.ini b/src/locale/hi/configure.ini
index b61379af6..1db12e296 100755
--- a/src/locale/hi/configure.ini
+++ b/src/locale/hi/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/in_ID/configure.ini b/src/locale/in_ID/configure.ini
index efe75cf71..4d0ab86c1 100755
--- a/src/locale/in_ID/configure.ini
+++ b/src/locale/in_ID/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/it/configure.ini b/src/locale/it/configure.ini
index f01332d8e..ca6a27ae9 100755
--- a/src/locale/it/configure.ini
+++ b/src/locale/it/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "Scansione Web"
 crawloptions_element_archive_crawl = "Scansione Archivio"
 crawloptions_element_load_options = "Carica opzioni Scansione da:"
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "Ordine Scansione:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/ja/configure.ini b/src/locale/ja/configure.ini
index b99e96be7..adfda3cf1 100755
--- a/src/locale/ja/configure.ini
+++ b/src/locale/ja/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "検索の順序"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/kn/configure.ini b/src/locale/kn/configure.ini
index 8334d532d..77029a553 100755
--- a/src/locale/kn/configure.ini
+++ b/src/locale/kn/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/ko/configure.ini b/src/locale/ko/configure.ini
index 84406f8e2..b53625ec0 100755
--- a/src/locale/ko/configure.ini
+++ b/src/locale/ko/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "크롤 순서:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/nl/configure.ini b/src/locale/nl/configure.ini
index 91b47451d..c032c5534 100644
--- a/src/locale/nl/configure.ini
+++ b/src/locale/nl/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "web Crawl"
 crawloptions_element_archive_crawl = "archief Crawl"
 crawloptions_element_load_options = "Krijg Crawl Opties Van:"
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = "Crawl Order:"
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/pl/configure.ini b/src/locale/pl/configure.ini
index c0368bcdf..cffde0879 100755
--- a/src/locale/pl/configure.ini
+++ b/src/locale/pl/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/pt/configure.ini b/src/locale/pt/configure.ini
index 1b1189cd2..f22544208 100755
--- a/src/locale/pt/configure.ini
+++ b/src/locale/pt/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/ru/configure.ini b/src/locale/ru/configure.ini
index a636ca23c..b7da1ec72 100755
--- a/src/locale/ru/configure.ini
+++ b/src/locale/ru/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/te/configure.ini b/src/locale/te/configure.ini
index 45ebe0ed2..04d243971 100644
--- a/src/locale/te/configure.ini
+++ b/src/locale/te/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = "వెబ్ క్రాల్"
 crawloptions_element_archive_crawl = "ఆర్కైవ్ క్రాల్"
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/th/configure.ini b/src/locale/th/configure.ini
index 71638f90e..9ce70af4b 100755
--- a/src/locale/th/configure.ini
+++ b/src/locale/th/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/tr/configure.ini b/src/locale/tr/configure.ini
index 344e33635..f596d1d6b 100755
--- a/src/locale/tr/configure.ini
+++ b/src/locale/tr/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/vi_VN/configure.ini b/src/locale/vi_VN/configure.ini
index 86ccb1167..2c9971173 100755
--- a/src/locale/vi_VN/configure.ini
+++ b/src/locale/vi_VN/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/locale/zh_CN/configure.ini b/src/locale/zh_CN/configure.ini
index 83205761e..c594bfb32 100755
--- a/src/locale/zh_CN/configure.ini
+++ b/src/locale/zh_CN/configure.ini
@@ -1420,6 +1420,7 @@ crawloptions_element_web_crawl = ""
 crawloptions_element_archive_crawl = ""
 crawloptions_element_load_options = ""
 crawloptions_element_server_channel = ""
+crawloptions_element_no_machines = ""
 crawloptions_element_crawl_order = ""
 crawloptions_element_max_depth = ""
 crawloptions_element_repeat_type = ""
diff --git a/src/views/elements/CrawloptionsElement.php b/src/views/elements/CrawloptionsElement.php
index ab233213e..045657b1f 100644
--- a/src/views/elements/CrawloptionsElement.php
+++ b/src/views/elements/CrawloptionsElement.php
@@ -108,11 +108,16 @@ class CrawloptionsElement extends Element
         ?></div>
         <div class="top-margin"><label for="server-channel"><b><?=
             tl('crawloptions_element_server_channel') ?></b></label><?php
-            $this->view->helper("options")->render("server-channel",
-                "server_channel", $data['available_server_channels'],
-                $data['server_channel']);
+            if (empty($data['available_server_channels'])) {
+                e(" <span class='red' >" .
+                    tl('crawloptions_element_no_machines') . "</span>");
+            } else {
+                $this->view->helper("options")->render("server-channel",
+                    "server_channel", $data['available_server_channels'],
+                    $data['server_channel']);
+            }
             e(" ".$this->view->helper("helpbutton")->render(
-                "Server Label", $data[C\CSRF_TOKEN]));
+                "Server Channel", $data[C\CSRF_TOKEN]));
         ?></div>
         <div class="top-margin"><label for="crawl-order"><b><?=
             tl('crawloptions_element_crawl_order') ?></b></label><?php
ViewGit