Community
Participate
Working Groups
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.
Can you explain why this is useful? Do you have a user scenario in mind that would explain the usefulness of this function?
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.
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.
Added an initial design page
Reassigning to JT as discussed in DV call
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
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
This does not work with the latest stuff in CVS....investigating. - JT
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
Ok, it now takes a mdrName and a query - JT
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
These changes are checked in. - JT
This doesn't for IE
IE problem happens whether I use the graphresponseviewer or the tree viewer. - JT
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.
Recent changes have broken this for both browsers. Sheldon has indicated he will try and fix it today. - JT
This seems to working for both firefox and IE now. - JT
(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
The mdrNames have changed so now instead of mdrName=ExampleMdr it needs to be mdrName=Sample Repository with Query - JT
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>
QA Review for Manual Tests/JUnits: - Found Manual tests, tested and verified on latest i12 candidate driver.
Verified with build (COSMOS-1.0.0-200808271150)