Bug 536006 (RHQ-401) - DynaGroups Expression Builder
Summary: DynaGroups Expression Builder
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-401
Product: RHQ Project
Classification: Other
Component: Inventory
Version: 0.1
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: Greg Hinkle
QA Contact: Jeff Weiss
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks: RHQ-399
TreeView+ depends on / blocked
 
Reported: 2008-05-01 15:12 UTC by Joseph Marques
Modified: 2014-11-09 22:49 UTC (History)
1 user (show)

Fixed In Version: 1.1
Clone Of:
Environment:
Last Closed:
Embargoed:


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

Description Joseph Marques 2008-05-01 15:12:00 UTC
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 14:08:57 UTC
A proposed expression builder interface.

Comment 2 Greg Hinkle 2008-08-04 14:22:25 UTC
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 14:50:05 UTC
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 16:44:15 UTC
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 23:49:27 UTC
Fixed
 1a, 1b, 2, 3, 3a, 5c,

Not fixed
  4, 5a, 5b, 6a

Comment 6 Greg Hinkle 2008-09-04 18:50:30 UTC
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 18:51:29 UTC
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 19:24:48 UTC
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 21:08:33 UTC
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.