webadmin: User Event Notification dialog element IDs

1. UI infrastructure changes

   - created ElementIdCellTree that supports assigning DOM
     element IDs to tree nodes through HasElementId interface

   - EntityModelCellTree derives from ElementIdCellTree,
     so all model-bound trees now support node element IDs

   - ModelListTreeViewModel does the actual element ID
     assignment for the CheckboxCell

   - example tree node ID, e.g. 2nd child of 3rd root node:
     <prefix>_root2_node1

2. WebAdmin dialog changes

   - User Event Notification dialog (ManageEventsPopupView)
     now supports element IDs for Tree and Expand/Collapse
     buttons

Change-Id: Icf18b0080fffe6ba3886736a605f53570889bf3a
Bug-Url: https://bugzilla.redhat.com/870993
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
core: WARNING: nonstandard use of escape in...

WARNING: nonstandard use of escape in a string literal

Adding use of the escape string syntax for escapes,

Change-Id: I168e1fe503c235d36b07aed18d88dc017726155e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958018
Signed-off-by: Eli Mesika <emesika@redhat.com>
frontend: Spice is always available

This patch removes the method ConsoleUtils.isSpiceAvailable because it is no
longer needed as spice can be always invoked using the nonplugin way.

This patch also moves configuration of spice implementations (by Configurator
classes) and connect listener to the method responsible for switching
implementations on the fly so that effect of these actions is not forgotten
after switching spice implementation.

Change-Id: Ice5c3f80988962c5fa5e39f51e91543938258912
Signed-off-by: Frantisek Kobzik <fkobzik@redhat.com>
frontend: Disabling WAN options for SPICE doesn't work

SPICE -> Enable WAN options causes 16bit color depth get kept for every console
opening for whole browser session even after disabling this option in the
console dialog.

The problem was caused by not resetting the ColorDepth and DisabledEffects
values after disabling WAN options to default values.

Change-Id: Ie64779658796243f0182ac1209d9f5640b4370fc
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=913183
Signed-off-by: Frantisek Kobzik <fkobzik@redhat.com>
webadmin,userportal: Support column resizing for all tables

This patch moves column resize implementation out of AbstractActionTable
and into dedicated table widget, ColumnResizeCellTable.

1. All custom CellTable widgets now inherit from ColumnResizeCellTable:
   - ElementIdCellTable [ActionCellTable + EntityModelCellTable]
   - IVdcQueryableCellTable

2. ColumnResizeCellTable now contains enableColumnResizing() method,
   plus some other related/useful methods

3. Columns added to ColumnResizeCellTable automatically benefit from
   tooltip displayed when the given header has its content (text)
   truncated, i.e. after shrinking the column or with long header text

4. AbstractActionTable now just delegates to table/tableHeader widgets,
   plus code to synchronize both tables (during column resize, etc.)

5. AbstractCellWithTooltip now contains common tooltip-related logic
   used by different subclasses:
   - SafeHtmlCellWithTooltip [resizable + non-resizable header cells]
   - TextCellWithTooltip [textual body cells]

6. Minor ElementIdCellTable improvement: call configureElementId()
   for every insertColumn() call for better consistency

AbstractCellWithTooltip does two kinds of content overflow detection:
   (a) scrollWidth with temporary CSS 'overflow:auto'
   (b) clientHeight with temporary CSS 'whiteSpace:normal'

In practice, (a) is used for both header and body cells. In Firefox,
header cells (SafeHtmlCellWithTooltip) use <div> with 'display:block'
to work around Firefox-specific issue with scrollWidth.

Change-Id: Ic69b597d7c5f2330cef5a93bc8812494af731734
Bug-Url: https://bugzilla.redhat.com/956378
Signed-off-by: Vojtech Szocs <vszocs@redhat.com>
core: update splash page locales

After merging patch http://gerrit.ovirt.org/#/c/14356/, adjusting the
splash page to conform to the updated list of available locales.

Change-Id: I2f853c6e2d6526d1ca1665f934941f18f05946a0
Signed-off-by: Einav Cohen <ecohen@redhat.com>
core: Fix redundant space in DB upgrade output

The run_file function only receives one argument, so $2 is always
evaluated as an empty string.

This cause the database upgrade/creation scripts to print
"Running  upgrade sql script" and "Running  upgrade shell script", with
two whitespaces after "Running" instead of just one.

Removing the call to $2 resolves this issue.

Change-Id: I3cb5f8778e570df1f2f76f3a16d32530b9a24b52
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove FieldsInVDCConfigXmlToSQL

The FieldsInVDCConfigXmlToSQL is no longer in use, and should be
removed.

Change-Id: I950bbe7e04fd2f90df23e70d0749c8fa8210235f
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: LexoNumericComparator to comparators pkg

Moved LexoNumericComparator to the comparators package, like all the
other comparators.

Change-Id: Ic23f6efefb8f83a791cab38f3da43a78c5f885bb
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Removed comparators' Compare methods

This is probably a leftover from the C# days.
In java, comparators have a compare(T, T) method.

Change-Id: I0fa2e830a9560dc4db9929053bd7ceced48a135d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Replace FQCNs with imports for comparators

Replaced FQCN references with imports throughout the comparators
package.

Change-Id: I80a1f040a395a5681dedd891ba5e6ddeb601ec15
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove comparators' empty default ctors

Removed empty implementation of the default constructor throughout the
comparators package.

These constructors have no added value, and just clatter up the code.

Change-Id: Id8477d87cd992ceba047a4f07a75337b8ed7d30d
Signed-off-by: Allon Mureinik <amureini@redhat.com>
core: Remove SearchQueryFormatter.main(String[])

SearchQueryFormatter seems to have an old main(String[]) function used
for a visual sanity check.

This method has not real use, and no place in production code.

Change-Id: I4e36f0fe4dd51d96725090a5ece6f736f298a4e7
Signed-off-by: Allon Mureinik <amureini@redhat.com>
userportal: prevent an error dialog in login page

Frontend -> handleActionResult:
* Removed the redundant call to
  getEventsHandler().runActionFailed(failed) which invokes an error
  dialog without verifying 'isRaiseErrorModalPanel' flag first.
* Removed the method as well since it's not used anymore.
* Now, the error dialog will be invoked only after flag verification
  by raising frontendFailureEvent.
* This issue of duplicate dialog invocation was hidden by now
  in UserPortal's login page by simply ignoring any error
  dialog (removed in Ibd2718649ab4031e6ff2b0d0e6c449f53164ff9f).

Change-Id: Ib240214df319a0122ebcac82bf2b96d608997432
Bug-Url: https://bugzilla.redhat.com/957793
Signed-off-by: Daniel Erez <derez@redhat.com>
packaging: cleanup spec file

1. use %{_initddir}
2. be more consistent with service name, use explict name always

Change-Id: Ib30fc665069d90b7cdb6855c92ee27d8ef143615
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: enigne-service: cleanup to ease reuse

Change-Id: I755f550f6992851fd70e03afa1db008d6b42d9d4
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine-cleanup: drop user as well

currently we drop database, but we create user as well,
no reason why not to attempt remove it.

Change-Id: I5cc437890d7cce686329435c12d82a50ab0df4b0
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: engine.conf: add quotes to selected keys

this to support potential space within value, while
sourcing in shell.

Change-Id: If7b0086fc2927449b54877e3cf1a18bd6e9480e0
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: move all packaging related to packaging

currently we manage packaging scripts all over the tree, sometimes in
different names than the file installed.

this patch collects all files to be under the packaging directory using
hierarchy similar to the installation and using same file naming.

Change-Id: I6d0bd7b8cd5381ddb80b4b2e5ee7df65bab487bc
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>
packaging: Added generic DB validations before the upgrade

* This patch adds a simple validatedb.sh script that will run
required validation scripts.

* When a new validation script is added, it should be
added to the validatedb runner script as well.

* During the upgrade, this script is executed and handles
the validations control to corresponding scripts.

* If user decides not to clear DB issues or there's any
other error, the exception is raised.

* Patch also introduces some code cleanups

Change-Id: Ief0e65231bb42b569734cdd2fa6491b645491f98
Bug-Url: https://bugzilla.redhat.com/893459
Signed-off-by: Alex Lourie <alourie@redhat.com>