Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection dialog should support some kind of search #17

Open
2 tasks
jamsden opened this issue Sep 11, 2020 · 2 comments
Open
2 tasks

Selection dialog should support some kind of search #17

jamsden opened this issue Sep 11, 2020 · 2 comments
Assignees
Milestone

Comments

@jamsden
Copy link
Member

jamsden commented Sep 11, 2020

Allow users to search by resource SysML type and title (or identifier if there is no title).
See: Updating generated dialogs

Or maybe allow OSLC query Where clause fragment int he Selection dialog search field.

Notes:

Selection Dialog sequence:

  1. User does GET on selector path which calls ServiceProviderService1.ElementSelector (IoTPlatformService.RequirementAndChangeRequestAndResourceSelector)
no changes to this file


  2. ElementSelector dispatches to /org/oasis/oslcop/sysml/elementselector.jsp (iotpselectiondialogselector.jsp) because the first time, terms will be null.
This JSP adds the selectType selection field and dispatches to the delegated-ui-typed.js file.
Also add an additional script to handle the selectType and adds the selected type to the selectionUri?type query parameter which is now used directly in the search


  3. elementselector.jsp (iotpselectiondialogselector.jsp) displays type dropdown list, and allows the user to enter a Java regular expression to match on the dcterms:title of the resources with that type


  4. elementselector.jsp (iotpselectiondialogselector.jsp) uses webapp/static/js/delegeted-ui-typed.js (delegatedUItyped.js) to get the terms search string and makes the second call too get the selection dialog


  5. ServiceProviderService1.ElementSelector is called a second time, this time with terms set to the search string.


  6. ElementSelector calls SysmlServerManager.ElementSelector (CE4IoTConnectorManager.RequirementAndChangeRequestAndResourceSelector) too get the resources that match the terms
ElementSelector needs to be updated to call queryElements
queryElements needs to match on the terms Java regular expression for the dcterms:title


  7. ElementSelector then dispatches to /org/oasis/oslcop/sysml/elementselectorresults.jsp (iotpselectiondialogselectorresults.jsp) to display the results and allow the user to select the target resources for the link. 


  8. User then presses OK which dispatches back to the OSLC client application to actually create the links.

    • ElementSelector calls queryElements, but isn't providing the resourceType. Don't really need the type dropdown for now because there's no REST API query facility that can use it. Do this later, just match on the name for now. Deprecated by the new approach below.

    • Better idea: don't change the elementselector.jsp. Instead, allow the user to enter [type::]regex into the search field. Then fix queryElements to use the type and regex to match the elements. This will be better because there are a lot of different types in SysML and a dropdown for them all would be impractical. type:: matches UML type syntax.

Note the regex should match element.toString() to match on the dcterm:title if available, otherwise on the dcterns:identifier.

@jamsden jamsden changed the title Selection dialog should support regular expression search by resource title Selection dialog should support some kind of search Sep 11, 2020
@jadelkhoury jadelkhoury self-assigned this Sep 14, 2020
@jadelkhoury
Copy link
Member

Sure. I am considering to change the generator to offer this search filtering as standard.

@jadelkhoury jadelkhoury added this to the DemoReady milestone Sep 29, 2020
jadelkhoury added a commit that referenced this issue Oct 4, 2020
DUI for elements includes a dropdown meny of all supported resource
types.
@jadelkhoury
Copy link
Member

This is now solved. I wanted to make a pull request, but ended up pushing to master anyway :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants