Bug 536006 - (RHQ-401) DynaGroups Expression Builder
DynaGroups Expression Builder
Product: RHQ Project
Classification: Other
Component: Inventory (Show other bugs)
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: Greg Hinkle
Jeff Weiss
: SubFeature
Depends On:
Blocks: RHQ-399
  Show dependency treegraph
Reported: 2008-05-01 11:12 EDT by Joseph Marques
Modified: 2014-11-09 17:49 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
ss_dynagroups_builder.png (40.24 KB, image/png)
2008-08-04 10:08 EDT, Greg Hinkle
no flags Details

  None (edit)
Description Joseph Marques 2008-05-01 11:12:00 EDT
two initial ideas:

1) support a builder that helps you auto-complete your expressions naturally based off of the supported syntax.  so, the AST would have to be shipped to the client efficiently and a javascript-based auto-completion mechanism driven from it.  there may actually be a tool / framework that does this already, so that avenue should be investigated as it would likey save a few days of work.

2) use a series of successive drop-down menus that auto-populate depending on your previous choice (for instance, you choose "resource" and it populates the next drop-down with "parent / grandParent / name / version / type / ...", then you can choose "type" and it populates a third drop-down with "plugin / name / category".  

Both strategies follow the same basic premise - keep track of currently built sub-expression, and offer options that would continue building it up.  Are there other options?
Comment 1 Greg Hinkle 2008-08-04 10:08:57 EDT
A proposed expression builder interface.
Comment 2 Greg Hinkle 2008-08-04 10:22:25 EDT
This was requested by numerous customers. Upping the priority since it is low hanging fruit with what Joseph started.
Comment 3 Greg Hinkle 2008-08-04 10:50:05 EDT
Implementation of DynaGroups Expression Builder. This is based on Joseph's expression library, but allows you to actually build up the expression in the popup and then write it back to the edit screen.
Comment 4 Joseph Marques 2008-08-04 12:44:15 EDT
1) ordering - make the top-to-bottom ordering the drop-down more consistent with the top-to-bottom ordering of the expressions, as well as the left-to-right ordering of the expression tokens
1a) when "expression type" is "resource type", output "resource.type.plugin" in the builder box first (putting "resource.type.name" second); also, leave the "resource.type.name" empty/blank until the user selects one from the list
1b) put "resource" drop-down above "expression-type"

2) "comparison type" drop-down options "startsWith" and "endsWith" should be prepended with a period, so that the generated expression is properly dot-delimited to help the parser *not* make mistakes chopping it up for analysis

3) "resource" drop-down options "parent" and "grantParent" do not work, instead they both produce expressions like "resource.null = <value>"
3a) these options do not work at all and do not seem to change the generated expression at all when "trait", "plugin configuration", "resource configuration" potions are selected

4) "expression type" drop-down always makes the first expression "resource.type.name = Apache HTTP Server", it should either be null until one is selected or it should default to the first item in the "resource type" drop-down that gets generated after selecting the appropriate plugin

5) enablement / disablement options
5a) when "resource type" drop-down is an empty list, replace it with the printed message "there are no types defined by the selected plugin"
5b) when "property names" drop-down is an empty list, replace it with the printed message "there are no properties defined by the selected type"
5c) if "expression type" selected option is "resource type", suppress / disable "comparison type" and "value" elements

6) user intuitiveness - similar to, but more direct than enablement / disablement options
6a) maybe only populate the "defining plugin" / "resource type" drop-downs with elements that are known to have resource types that have properties - this would be a complete replacement for options 5a & 5b
Comment 5 Greg Hinkle 2008-08-04 19:49:27 EDT
 1a, 1b, 2, 3, 3a, 5c,

Not fixed
  4, 5a, 5b, 6a
Comment 6 Greg Hinkle 2008-09-04 14:50:30 EDT
Completed the first version of the DynaGroups wizard. (this has actually been completed and checked in for weeks, but we've decided to release it as that version without that those last few enhancements which have been moved into RHQ-787)
Comment 7 Greg Hinkle 2008-09-04 14:51:29 EDT
This just needs some basic UI testing. Test the various drop-down combinations for generating standard dyna-group queries. Some example queries to shoot for can be seen as the examples in the dyna-group documentation page.
Comment 8 Jeff Weiss 2008-09-09 15:24:48 EDT
I went through the subfeatures list and tried them all on the expression builder.  Everything is working as-described.  rev1385, linux, postgres.
Comment 9 Red Hat Bugzilla 2009-11-10 16:08:33 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-401
Imported an attachment (id=368823)
This bug is related to RHQ-686
This bug is related to RHQ-810
This bug relates to RHQ-702

Note You need to log in before you can comment on or make changes to this bug.