Showing
5 changed files
with
54 additions
and
45 deletions
This diff is collapsed. Click to expand it.
... | @@ -148,8 +148,8 @@ a:active.appFormHeaderLink { | ... | @@ -148,8 +148,8 @@ a:active.appFormHeaderLink { |
148 | background-color: darkGray; | 148 | background-color: darkGray; |
149 | color: white; | 149 | color: white; |
150 | padding-left: 4px; | 150 | padding-left: 4px; |
151 | - padding-top: 1px; | 151 | + padding-top: 2px; |
152 | - padding-bottom: 1px; | 152 | + padding-bottom: 2px; |
153 | padding-right: 4px; | 153 | padding-right: 4px; |
154 | } | 154 | } |
155 | 155 | ... | ... |
... | @@ -186,17 +186,21 @@ function appLoadEditForm(parentId, resourceType) { | ... | @@ -186,17 +186,21 @@ function appLoadEditForm(parentId, resourceType) { |
186 | * @param resultsId the id of the element to display the search results | 186 | * @param resultsId the id of the element to display the search results |
187 | * @param resourceTypeURI the type of resources to search for | 187 | * @param resourceTypeURI the type of resources to search for |
188 | * @param queryGraphURI the query graph URI | 188 | * @param queryGraphURI the query graph URI |
189 | + * @param schemaGraphURI (optional) the URI of the schema graph | ||
189 | * @param noBorder (optional) to suppress the border | 190 | * @param noBorder (optional) to suppress the border |
190 | */ | 191 | */ |
191 | -function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, noBorder) { | 192 | +function appLoadSearchForm(oldElementId, resultsId, resourceTypeURI, queryGraphURI, schemaGraphURI, noBorder) { |
192 | var data = { | 193 | var data = { |
193 | formId: oldElementId, | 194 | formId: oldElementId, |
194 | resourceType: '<' + resourceTypeURI + '>', | 195 | resourceType: '<' + resourceTypeURI + '>', |
195 | resultsId: resultsId, | 196 | resultsId: resultsId, |
196 | _base : '<' + queryGraphURI + '>', | 197 | _base : '<' + queryGraphURI + '>', |
197 | - _viewClass: 'app:SearchForm', | 198 | + _viewClass : 'app:SearchForm', |
198 | - _snippet: true | 199 | + _snippet : true |
199 | }; | 200 | }; |
201 | + if(schemaGraphURI) { | ||
202 | + data.schemaGraph = '<' + schemaGraphURI + '>'; | ||
203 | + } | ||
200 | if(noBorder) { | 204 | if(noBorder) { |
201 | data.noBorder = true; | 205 | data.noBorder = true; |
202 | } | 206 | } | ... | ... |
... | @@ -2,34 +2,32 @@ | ... | @@ -2,34 +2,32 @@ |
2 | let:keyProperties="{= app:getKeyProperties(?type) }" | 2 | let:keyProperties="{= app:getKeyProperties(?type) }" |
3 | let:pagerId="{= ui:uniqueId() }" | 3 | let:pagerId="{= ui:uniqueId() }" |
4 | let:tableId="{= ui:uniqueId() }"> | 4 | let:tableId="{= ui:uniqueId() }"> |
5 | - <table id="{= ?tableId }" style="width: 100%"/> | 5 | + <table id="{= ?tableId }"/> |
6 | <div id="{= ?pagerId }" /> | 6 | <div id="{= ?pagerId }" /> |
7 | <script> | 7 | <script> |
8 | $("#{= ?tableId }").jqGrid({ | 8 | $("#{= ?tableId }").jqGrid({ |
9 | <swon:NameValuePair arg:name="url" arg:value="{= fn:concat('getSearchResults?', ?params) }" />, | 9 | <swon:NameValuePair arg:name="url" arg:value="{= fn:concat('getSearchResults?', ?params) }" />, |
10 | <swon:NameValuePair arg:name="datatype" arg:value="json" />, | 10 | <swon:NameValuePair arg:name="datatype" arg:value="json" />, |
11 | colNames:[ | 11 | colNames:[ |
12 | - 'Resource' | 12 | + <ui:if ui:condition="{= bound(?keyProperties) }"> |
13 | - <ui:if ui:condition="{= bound(?keyProperties) }">, | ||
14 | <ui:forEach ui:resultSet="{# | 13 | <ui:forEach ui:resultSet="{# |
15 | SELECT ?colName | 14 | SELECT ?colName |
16 | WHERE { | 15 | WHERE { |
17 | GRAPH ui:graph { | 16 | GRAPH ui:graph { |
18 | - ?keyProperties (rdf:rest*)/rdf:first ?keyProperty . | 17 | + ?keyProperties list:member ?keyProperty . |
19 | - BIND (spif:titleCase(ui:label(?keyProperty) AS ?colName)) . | 18 | + BIND (spif:titleCase(ui:label(?keyProperty)) AS ?colName) . |
20 | } | 19 | } |
21 | } | 20 | } |
22 | }" ui:separator=","> | 21 | }" ui:separator=","> |
23 | '{= ?colName }' | 22 | '{= ?colName }' |
24 | </ui:forEach> | 23 | </ui:forEach> |
25 | </ui:if> | 24 | </ui:if> |
25 | + <ui:else> | ||
26 | + 'Resource' | ||
27 | + </ui:else> | ||
26 | ], | 28 | ], |
27 | colModel:[ | 29 | colModel:[ |
28 | - { | 30 | + <ui:if ui:condition="{= bound(?keyProperties) }"> |
29 | - name : 'result', | ||
30 | - width: 200 | ||
31 | - } | ||
32 | - <ui:if ui:condition="{= bound(?keyProperties) }">, | ||
33 | <ui:forEach ui:resultSet="{# | 31 | <ui:forEach ui:resultSet="{# |
34 | SELECT ?varName | 32 | SELECT ?varName |
35 | WHERE { | 33 | WHERE { |
... | @@ -44,6 +42,11 @@ | ... | @@ -44,6 +42,11 @@ |
44 | } | 42 | } |
45 | </ui:forEach> | 43 | </ui:forEach> |
46 | </ui:if> | 44 | </ui:if> |
45 | + <ui:else> | ||
46 | + { | ||
47 | + name : 'label' | ||
48 | + } | ||
49 | + </ui:else> | ||
47 | ], | 50 | ], |
48 | rowNum: 10, | 51 | rowNum: 10, |
49 | rowList:[5,10,20], | 52 | rowList:[5,10,20], |
... | @@ -51,7 +54,7 @@ | ... | @@ -51,7 +54,7 @@ |
51 | viewrecords: true, | 54 | viewrecords: true, |
52 | sortorder: "desc", | 55 | sortorder: "desc", |
53 | height: "100%", | 56 | height: "100%", |
54 | - width: "500" | 57 | + width: "100%" |
55 | }).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false}); | 58 | }).jqGrid('navGrid', '#{= ?pagerId }', { add:false, edit:false, del:false}); |
56 | </script> | 59 | </script> |
57 | </ui:group> | 60 | </ui:group> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -21,28 +21,28 @@ | ... | @@ -21,28 +21,28 @@ |
21 | 21 | ||
22 | log:LogBrowser | 22 | log:LogBrowser |
23 | rdf:type ui:NodeClass ; | 23 | rdf:type ui:NodeClass ; |
24 | - 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 ; | 24 | + 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 ; |
25 | rdfs:label "Log browser"^^xsd:string ; | 25 | rdfs:label "Log browser"^^xsd:string ; |
26 | rdfs:subClassOf ui:Element ; | 26 | rdfs:subClassOf ui:Element ; |
27 | ui:prototype | 27 | ui:prototype |
28 | [ rdf:type html:Div ; | 28 | [ rdf:type html:Div ; |
29 | - html:style "width:950px"^^xsd:string ; | 29 | + html:style "width:900px"^^xsd:string ; |
30 | ui:child | 30 | ui:child |
31 | [ rdf:type app:VSplitLayout ; | 31 | [ rdf:type app:VSplitLayout ; |
32 | - arg:height "600px"^^xsd:string ; | 32 | + arg:height "500px"^^xsd:string ; |
33 | arg:topHeight "30%"^^xsd:string ; | 33 | arg:topHeight "30%"^^xsd:string ; |
34 | ui:child | 34 | ui:child |
35 | - [ rdf:type app:HSplitLayout ; | 35 | + [ rdf:type ui:setContext ; |
36 | - arg:height "200px"^^xsd:string ; | ||
37 | ui:child | 36 | ui:child |
38 | - [ rdf:type html:Div ; | 37 | + [ rdf:type app:HSplitLayout ; |
38 | + arg:height "200px"^^xsd:string ; | ||
39 | ui:child | 39 | ui:child |
40 | - [ rdf:type app:Header ; | 40 | + [ rdf:type html:Div ; |
41 | - arg:label "Event Type"^^xsd:string ; | 41 | + ui:child |
42 | - ui:childIndex 0 | 42 | + [ rdf:type app:Header ; |
43 | - ] ; | 43 | + arg:label "Event Type"^^xsd:string ; |
44 | - ui:child | 44 | + ui:childIndex 0 |
45 | - [ rdf:type ui:setContext ; | 45 | + ] ; |
46 | ui:child | 46 | ui:child |
47 | [ rdf:type app:Tree ; | 47 | [ rdf:type app:Tree ; |
48 | arg:dataProvider log:LogEventClassTreeDataProvider ; | 48 | arg:dataProvider log:LogEventClassTreeDataProvider ; |
... | @@ -53,29 +53,31 @@ log:LogBrowser | ... | @@ -53,29 +53,31 @@ log:LogBrowser |
53 | arg:oldElementId "searchForm" ; | 53 | arg:oldElementId "searchForm" ; |
54 | arg:resourceTypeCode | 54 | arg:resourceTypeCode |
55 | "resource" ; | 55 | "resource" ; |
56 | - arg:resultsId "results" | 56 | + arg:resultsId "results" ; |
57 | + arg:schemaGraph <http://www.reportinghub.no/system/schema/logging> | ||
57 | ] ; | 58 | ] ; |
58 | - ui:childIndex 0 | 59 | + ui:childIndex 1 |
59 | ] ; | 60 | ] ; |
60 | - ui:childIndex 1 ; | 61 | + ui:childIndex 0 |
61 | - ui:queryGraph <http://www.reportinghub.no/system/schema/logging> | ||
62 | ] ; | 62 | ] ; |
63 | - ui:childIndex 0 | ||
64 | - ] ; | ||
65 | - ui:child | ||
66 | - [ rdf:type html:Div ; | ||
67 | - html:id "formHolder"^^xsd:string ; | ||
68 | ui:child | 63 | ui:child |
69 | - [ rdf:type app:SearchForm ; | 64 | + [ rdf:type html:Div ; |
70 | - arg:formId "searchForm"^^xsd:string ; | 65 | + html:id "formHolder"^^xsd:string ; |
71 | - arg:noBorder "true"^^xsd:boolean ; | 66 | + ui:child |
72 | - arg:resourceType log:LogEvent ; | 67 | + [ rdf:type app:SearchForm ; |
73 | - arg:resultsId "results"^^xsd:string ; | 68 | + arg:formId "searchForm"^^xsd:string ; |
74 | - ui:childIndex 0 | 69 | + arg:noBorder "true"^^xsd:boolean ; |
70 | + arg:resourceType log:LogEvent ; | ||
71 | + arg:resultsId "results"^^xsd:string ; | ||
72 | + arg:schemaGraph <http://www.reportinghub.no/system/schema/logging> ; | ||
73 | + ui:childIndex 0 | ||
74 | + ] ; | ||
75 | + ui:childIndex 1 | ||
75 | ] ; | 76 | ] ; |
76 | - ui:childIndex 1 | 77 | + ui:childIndex 0 |
77 | ] ; | 78 | ] ; |
78 | - ui:childIndex 0 | 79 | + ui:childIndex 0 ; |
80 | + ui:queryGraph <http://www.reportinghub.no/system/schema/logging> | ||
79 | ] ; | 81 | ] ; |
80 | ui:child | 82 | ui:child |
81 | [ rdf:type html:Div ; | 83 | [ rdf:type html:Div ; | ... | ... |
-
Please register or login to post a comment