Holger Knublauch

EPIM search progress

This diff is collapsed. Click to expand it.
......@@ -148,8 +148,8 @@ a:active.appFormHeaderLink {
background-color: darkGray;
color: white;
padding-left: 4px;
padding-top: 1px;
padding-bottom: 1px;
padding-top: 2px;
padding-bottom: 2px;
padding-right: 4px;
}
......
......@@ -186,17 +186,21 @@ function appLoadEditForm(parentId, resourceType) {
* @param resultsId the id of the element to display the search results
* @param resourceTypeURI the type of resources to search for
* @param queryGraphURI the query graph URI
* @param schemaGraphURI (optional) the URI of the schema graph
* @param noBorder (optional) to suppress the border
*/
function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, noBorder) {
function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, schemaGraphURI, noBorder) {
var data = {
formId: oldElementId,
resourceType: '<' + resourceTypeURI + '>',
resultsId: resultsId,
_base : '<' + queryGraphURI + '>',
_viewClass: 'app:SearchForm',
_snippet: true
_viewClass : 'app:SearchForm',
_snippet : true
};
if(schemaGraphURI) {
data.schemaGraph = '<' + schemaGraphURI + '>';
}
if(noBorder) {
data.noBorder = true;
}
......
......@@ -2,34 +2,32 @@
let:keyProperties="{= app:getKeyProperties(?type) }"
let:pagerId="{= ui:uniqueId() }"
let:tableId="{= ui:uniqueId() }">
<table id="{= ?tableId }" style="width: 100%"/>
<table id="{= ?tableId }"/>
<div id="{= ?pagerId }" />
<script>
$("#{= ?tableId }").jqGrid({
<swon:NameValuePair arg:name="url" arg:value="{= fn:concat('getSearchResults?', ?params) }" />,
<swon:NameValuePair arg:name="datatype" arg:value="json" />,
colNames:[
'Resource'
<ui:if ui:condition="{= bound(?keyProperties) }">,
<ui:if ui:condition="{= bound(?keyProperties) }">
<ui:forEach ui:resultSet="{#
SELECT ?colName
WHERE {
GRAPH ui:graph {
?keyProperties (rdf:rest*)/rdf:first ?keyProperty .
BIND (spif:titleCase(ui:label(?keyProperty) AS ?colName)) .
?keyProperties list:member ?keyProperty .
BIND (spif:titleCase(ui:label(?keyProperty)) AS ?colName) .
}
}
}" ui:separator=",">
'{= ?colName }'
</ui:forEach>
</ui:if>
<ui:else>
'Resource'
</ui:else>
],
colModel:[
{
name : 'result',
width: 200
}
<ui:if ui:condition="{= bound(?keyProperties) }">,
<ui:if ui:condition="{= bound(?keyProperties) }">
<ui:forEach ui:resultSet="{#
SELECT ?varName
WHERE {
......@@ -44,6 +42,11 @@
}
</ui:forEach>
</ui:if>
<ui:else>
{
name : 'label'
}
</ui:else>
],
rowNum: 10,
rowList:[5,10,20],
......@@ -51,7 +54,7 @@
viewrecords: true,
sortorder: "desc",
height: "100%",
width: "500"
width: "100%"
}).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false});
</script>
</ui:group>
\ No newline at end of file
......
......@@ -21,28 +21,28 @@
log:LogBrowser
rdf:type ui:NodeClass ;
rdfs:comment "A complex element with a tree of log event classes in the upper left corner, a search form in the upper center area, and a list of results in the main center area."^^xsd:string ;
rdfs:comment "A complex element with a tree of log event classes in the upper left corner, a search form in the upper center area, and a grid of results in the main center area."^^xsd:string ;
rdfs:label "Log browser"^^xsd:string ;
rdfs:subClassOf ui:Element ;
ui:prototype
[ rdf:type html:Div ;
html:style "width:950px"^^xsd:string ;
html:style "width:900px"^^xsd:string ;
ui:child
[ rdf:type app:VSplitLayout ;
arg:height "600px"^^xsd:string ;
arg:height "500px"^^xsd:string ;
arg:topHeight "30%"^^xsd:string ;
ui:child
[ rdf:type app:HSplitLayout ;
arg:height "200px"^^xsd:string ;
[ rdf:type ui:setContext ;
ui:child
[ rdf:type html:Div ;
[ rdf:type app:HSplitLayout ;
arg:height "200px"^^xsd:string ;
ui:child
[ rdf:type app:Header ;
arg:label "Event Type"^^xsd:string ;
ui:childIndex 0
] ;
ui:child
[ rdf:type ui:setContext ;
[ rdf:type html:Div ;
ui:child
[ rdf:type app:Header ;
arg:label "Event Type"^^xsd:string ;
ui:childIndex 0
] ;
ui:child
[ rdf:type app:Tree ;
arg:dataProvider log:LogEventClassTreeDataProvider ;
......@@ -53,29 +53,31 @@ log:LogBrowser
arg:oldElementId "searchForm" ;
arg:resourceTypeCode
"resource" ;
arg:resultsId "results"
arg:resultsId "results" ;
arg:schemaGraph <http://www.reportinghub.no/system/schema/logging>
] ;
ui:childIndex 0
ui:childIndex 1
] ;
ui:childIndex 1 ;
ui:queryGraph <http://www.reportinghub.no/system/schema/logging>
ui:childIndex 0
] ;
ui:childIndex 0
] ;
ui:child
[ rdf:type html:Div ;
html:id "formHolder"^^xsd:string ;
ui:child
[ rdf:type app:SearchForm ;
arg:formId "searchForm"^^xsd:string ;
arg:noBorder "true"^^xsd:boolean ;
arg:resourceType log:LogEvent ;
arg:resultsId "results"^^xsd:string ;
ui:childIndex 0
[ rdf:type html:Div ;
html:id "formHolder"^^xsd:string ;
ui:child
[ rdf:type app:SearchForm ;
arg:formId "searchForm"^^xsd:string ;
arg:noBorder "true"^^xsd:boolean ;
arg:resourceType log:LogEvent ;
arg:resultsId "results"^^xsd:string ;
arg:schemaGraph <http://www.reportinghub.no/system/schema/logging> ;
ui:childIndex 0
] ;
ui:childIndex 1
] ;
ui:childIndex 1
ui:childIndex 0
] ;
ui:childIndex 0
ui:childIndex 0 ;
ui:queryGraph <http://www.reportinghub.no/system/schema/logging>
] ;
ui:child
[ rdf:type html:Div ;
......