This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 236907 - Launching the COSMOS UI with a MDR query
Summary: Launching the COSMOS UI with a MDR query
Status: VERIFIED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: John Todd CLA
QA Contact:
URL: http://wiki.eclipse.org/COSMOS_Design...
Whiteboard:
Keywords:
Depends on:
Blocks: 241813
  Show dependency tree
 
Reported: 2008-06-12 12:28 EDT by Bill Muldoon CLA
Modified: 2012-01-03 13:55 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Muldoon CLA 2008-06-12 12:28:59 EDT
We would like to be able to start the COSMOSUI and immediately execute a graphQuery on an MDR.

The COSMOS UI URL needs to support additional parameters to specify the name of the MDR and a graphQuery request. For example:

http://localhost:8080/COSMOSUI/?page=cosmos;mdr=ExampleMDR;graphquery=<...>

This URL would open the COSMOS UI, execute the graphQuery on the MDR and display the query result.
Comment 1 Sheldon Lee-Loy CLA 2008-06-12 12:43:11 EDT
Can you explain why this is useful?  

Do you have a user scenario in mind that would explain the usefulness of this function?
Comment 2 Bill Muldoon CLA 2008-06-12 13:58:39 EDT
Yes, the scenario involves an internal corporate product. The product UI constructs a query based on a user selection and opens a browser with the URL of the COSMOS UI to display the results.
Comment 3 Jimmy Mohsin CLA 2008-06-12 14:50:00 EDT
Sheldon,

This is in support of one of the use cases we intend to showcase at CA World 2008.  I believe that this ER is simple enough that it will not violate the charter of i12.
Comment 4 Bill Muldoon CLA 2008-06-20 10:32:25 EDT
Added an initial design page
Comment 5 Sheldon Lee-Loy CLA 2008-06-25 13:26:06 EDT
Reassigning to JT as discussed in DV call
Comment 6 John Todd CLA 2008-06-26 10:15:17 EDT
a better usage might be

http://host:port/COSMOSUI/?page=querypage;epr=MyEPR;query=<the query>

The 'querypage' would be just what would be the 'Details' page on the regular UI
and instead of the MdrName, the EPR is used, that way we don't have to talk
to the broker at this stage (that can be done by whoever is constructing this URL)

- JT
Comment 7 John Todd CLA 2008-06-27 15:32:09 EDT
I got a very basic prototype working, one thing that is going to need watching out  for is escaping quotes (fly be free :-) ) anyway, if you put " instead of \" in the query on the URL you'll get a premature end of file.

- JT
Comment 8 John Todd CLA 2008-06-30 10:10:44 EDT
This does not work with the latest stuff in CVS....investigating.

- JT
Comment 9 John Todd CLA 2008-07-01 16:37:10 EDT
My code needs reviewing by Sheldon, don't want to muck the whole thing up for this specialized use case.

Currently, the specialized URL works (providing an EPR, not an MDR name) as well as the example MDR canned queries.

- JT
Comment 10 John Todd CLA 2008-07-02 10:02:52 EDT
Ok, it now takes a mdrName and a query

- JT
Comment 11 John Todd CLA 2008-07-03 12:29:20 EDT
Thanks to help from sheldon, this is now under control.
Making some adjustments based on his comments, will update when I check it in.

- JT
Comment 12 John Todd CLA 2008-07-03 13:58:42 EDT
These changes are checked in.

- JT
Comment 13 John Todd CLA 2008-07-17 11:15:45 EDT
This doesn't for IE
Comment 14 John Todd CLA 2008-07-17 17:07:52 EDT
IE problem happens whether I use the graphresponseviewer or the tree viewer.

- JT
Comment 15 Sheldon Lee-Loy CLA 2008-07-22 17:44:24 EDT
I did a quick review of the code changes for this feature.  There's a couple of things.

1.  In IE 'this.srcNodeRef.baseURI' is null or empty.  This was found by setting the debug=true in the browser.
2.  WidgetContainer is a generic class.  It should not be tied to a particular use case such as the dataview.  I created a new class called DataView that extends WidgetContainer.  This will decouple the dataview code from the generic widgetcontainer framework code.
3.  The dataview class takes in a mdrname and a querytext.

This seems to solve the IE problem.

JT can you verify the fix.
Comment 16 John Todd CLA 2008-07-23 10:49:47 EDT
Recent changes have broken this for both browsers.
Sheldon has indicated he will try and fix it today.

- JT
Comment 17 John Todd CLA 2008-07-23 11:26:55 EDT
This seems to working for both firefox and IE now.

- JT
Comment 18 Srinivas Reddy CLA 2008-07-25 08:28:33 EDT
(In reply to comment #17)
> This seems to working for both firefox and IE now.
> - JT

Hi JT,

Could you pl. provide me some test steps in order to test this feature.

I tried doing simple test over ExampleMdr by running below query under IE and Firefox, but it's throwing an error message as "Content is not allowed in prolog".. I am not sure, what went wrong in below query and hence need your help in providing some working example.

http://localhost:8080/COSMOSUI/?page=DataPage&mdrName=ExampleMdr&query=%3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22?%3E%3Cs:query%20xmlns:s=%22http://cmdbf.org/schema/1-0-0/datamodel%22%3E%3Cs:itemTemplate%20id=%22All_Students%22%3E%3Cs:recordConstraint%3E%3Cs:recordType%20namespace=%22%22%20localName=%22student%22/%3E%3C/s:recordConstraint%3E%3C/s:itemTemplate%3E%3C/s:query%3E

Thanks,
Srinivas
Comment 19 John Todd CLA 2008-07-25 08:49:36 EDT
The mdrNames have changed
so now instead of mdrName=ExampleMdr it needs to be mdrName=Sample Repository with Query

- JT
Comment 20 Srinivas Reddy CLA 2008-07-28 00:52:27 EDT
Thanks JT,it now works fine.

I have verified sample queries with ExampleMdr,SMLMdr,AperiMdr and all are working fine.

Here are the sample queries, to test this feature:

ExampleMdr
http://localhost:8080/COSMOSUI/?page=DataPage&mdrName="Sample Repository with Query"&query=<?xml version="1.0" encoding="UTF-8"?><s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel"><s:itemTemplate id="All_Students"><s:recordConstraint><s:recordType namespace="" localName="student"/></s:recordConstraint></s:itemTemplate></s:query>

SMLMDR
http://localhost:8080/COSMOSUI/?page=DataPage&mdrName="Resource Repository"&query=<s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel"><s:itemTemplate id="All_Computer_Systems"><s:recordConstraint><s:recordType namespace="http://www.cosmos.rm/dataCenter" localName="computerSystem"/></s:recordConstraint></s:itemTemplate></s:query>

AperiMdr
http://localhost:8080/COSMOSUI/?page=DataPage&mdrName="Storage Repository"&query=<?xml version="1.0" encoding="UTF-8"?><s:query xmlns:s="http://cmdbf.org/schema/1-0-0/datamodel"><s:itemTemplate id="items" suppressFromResult="false" ><s:recordConstraint ><s:recordType namespace="http://schemas.aperimdr.org/schema/AperiMDR" localName="Disk" ></s:recordType></s:recordConstraint></s:itemTemplate></s:query>
Comment 21 Srinivas Reddy CLA 2008-07-31 04:48:46 EDT
QA Review for Manual Tests/JUnits:

- Found Manual tests, tested and verified on latest i12 candidate driver.
Comment 22 Sheldon Lee-Loy CLA 2008-08-28 12:54:31 EDT
Verified with build (COSMOS-1.0.0-200808271150)