jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/347348 )

Change subject: Preview Item labels in GraphResultBrowserNodeBrowser
......................................................................


Preview Item labels in GraphResultBrowserNodeBrowser

Change-Id: I228082e4e039061625ef27377c3f0d850087ece8
---
M wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
1 file changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Smalyshev: Looks good to me, approved
  jenkins-bot: Verified



diff --git 
a/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js 
b/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
index fc5e4ad..a363330 100644
--- a/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
@@ -6,7 +6,7 @@
 wikibase.queryService.ui.resultBrowser.GraphResultBrowserNodeBrowser = ( 
function( $, vis, window, _ ) {
        'use strict';
 
-       var SPARQL_PROPERTIES = 'SELECT ?p (SAMPLE(?pl) AS ?pl) (COUNT(?o) AS 
?count ) WHERE {'
+       var SPARQL_PROPERTIES = 'SELECT ?p (SAMPLE(?pl) AS ?pl) (COUNT(?o) AS 
?count ) (group_concat(?ol;separator=", ") AS ?ol)  WHERE {'
                        + '<{entityUri}> ?p ?o .'
                        + '   ?o <http://www.w3.org/2000/01/rdf-schema#label> 
?ol .'
                        + '    FILTER ( LANG(?ol) = "en" )'
@@ -109,7 +109,8 @@
                                                result.push( {
                                                        id: row.p.value,
                                                        label: row.pl.value,
-                                                       count: row.count.value
+                                                       count: row.count.value,
+                                                       items: row.ol.value
                                                } );
                                        } );
 
@@ -181,9 +182,11 @@
 
                                var node = {
                                        id: p.id,
-                                       label: p.count,
+                                       label: p.count === '1' ? p.items : 
p.count,
+                                       title: p.items,
                                        entityId: nodeId,
-                                       propertyLabel: p.label
+                                       propertyLabel: p.label,
+                                       color: '#abc9f2'
                                };
                                var edge = {
                                        id: p.id,

-- 
To view, visit https://gerrit.wikimedia.org/r/347348
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I228082e4e039061625ef27377c3f0d850087ece8
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to