Various index count and aggregate fixes

Remove projects from count(keyed-limit(project(index)))
  A missing case from a switch statement meant projects weren't
  stripped when there was a keyed limit on the index read.

Reduce the generated code size for an index count/exists
  The numValid(size, ptr) member was never called for an index, so default
  it to throwing an exception in the base class, and clean up numValid(ptr)
  code.

CHOOSEN(LIMIT(index-read))
  The choosen was not being combined within the compound indexread if there
  was a limit.  It is however valid to do so since the choosen is done last.
  (A limit cannot be combined when there is an existing choosen.)
  This was unfortunate because it was frustrating  another optimization.
  count(index-read) > n being converted to count(choosen(index-read,n+1)) > n
  (This is temporarily retained, but will be removed in a subsequent commit).

IF(count(x) > 0, x, y) optimization
  Currently the intention is to perform a count-index on x before reading x.
  However if x contains a limit,skip it is going to need to read the entire
  result, so don't perform the count separately.

Don't generate count(index) if there is a skip limit

Optimize count(x) > 0 to exists(x)
  Instead of (count(x) > 0) becoming count(choosen(x, 1)) > 0 it is now
  transformed to exists(x) - which is either as efficient, or more
  efficient as the count representation.

Remove no_notexists since never created

Terminate hthor exists aggregate activity early

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
ISSUE:#1714 Restrict special chars from comp names

configgen will indicate and error when encountering
special characters in component names.

configmgr will pop-up an error when users attempt
to enter special characters for component names

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
gh-1997 Fix usability issues for User Permission view

Existing user permission page has two usability issues.
(1) multiple permission tables are displayed in one page
which makes the page difficult to read. (2) for each
permission table (permission group), there is an Add
button which allows to add more permission to that group.
The page shows the Add button and the reource list even
though no more permission can be added for some resources.
This fix only shows the first permission table and the
expend links for other tables. This fix also filters out
the resources from the resource list if no more permission
can be added. If the resource list is empty, the Add
button will not be displayed for that permission table.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Fix gh-#2071 DFS exception when View Data File

When ldap is turned on and a user trys to view a data file,
the DFS exception '3 Lookup access denied for scope' shows.
The exception is thrown by the ViewFileWeb object when it
does a file look-up. Since the data file has been resolved
by WsDFU service, WsDFU service should pass the solved file
point to ViewFileWeb object and the ViewFileWeb may use the
point without doing the file loop-up. This fix adds a
method to the ViewFileWeb class. The method allows the
solved file point being given to the ViewFileWeb.

I also revise the code in WsDFU service for better
functionalities.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Adds HDFS_Stream/HDFS_to_HPCC_Connecter doc to the document build set
Fixed gh-1743. ConfigMgr crashes opening file w/o permission

Add additional exception handling to catch
exceptions of type IErrnoException and pass
them up.

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
gh-2135 Enable the package file processing esp service

The esp configuration file was missing the appropriate settings
for the ws_packageprocess service.  The issue was introduced when
the code was moved into this branch.

Signed-off-by: Stuart Ort <stuart.ort@lexisnexis.com>
Revised based on review.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Revised based on review

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Merge pull request #2126 from wangkx/gh2071

Fix gh-#2071 DFS exception when View Data File

Reviewed-By: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Ensure GLOBAL(cluster) uses a constant expression

Fixes a core when a variable cluster name is used as the second
parameter of GLOBAL(action, <cluster>).

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge pull request #2030 from garonsky/issue1743-configmgr-crashes-opening-notowned-env-file

ISSUE:1743 ConfigMgr crashes opening file w/o permission

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #1990 from garonsky/issue1714-comp-names-have-no-special-characters

ISSUE:#1714 Restrict special chars from comp names

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Clean up unused variables and code

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Fix potential problems with dynamic cluster names

Dynamic cluster names (second parameter to GLOBAL) aren't currently
supported.  These fixes would allow them to work.  There are still
potential problems that dynamic cluster names wouldn't be added to the
workunit so they are still disallowed.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Feature:  ECL Playground

New web page which lets users "play" with ECL without installing any
client tools.  Includes ECL editor, Graph Viewer and Result/Syntax
Error viewer.

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Added 3rd party JS Libraries:
dojo
dijit
dojox/grid
codemirror2

Signed-off-by: Gordon Smith <gordon.smith@lexisnexis.com>
Add example file to regression suite

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Refactor how eclcc scans directories

A minor refactoring of how eclcc scans directories, to avoid an extra scan that
can be (a little) expensive when scanning remote or container directories such
as git repositories.

Hopefully the code is also a little cleaner and easier to follow now too, at
least in my opinion...

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #2138 from ghalliday/globalcrash

Fix potential problems with dynamic cluster names

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>