You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2014/03/26 09:19:24 UTC
[16/50] [abbrv] git commit: MARMOTTA-403: added default value to the
dataview legend
MARMOTTA-403: added default value to the dataview legend
also fixed the jrebel configuration
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/a2246ca0
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/a2246ca0
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/a2246ca0
Branch: refs/heads/ldp
Commit: a2246ca09289faccd69461556500ae31f2110f15
Parents: 3753686
Author: Jakob Frank <ja...@apache.org>
Authored: Tue Mar 18 17:12:02 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Tue Mar 18 17:12:02 2014 +0100
----------------------------------------------------------------------
parent/pom.xml | 2 --
.../src/main/resources/web/admin/dataview.html | 14 ++++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/a2246ca0/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 09a35ce..8fbe641 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -53,8 +53,6 @@
<resteasy.version>3.0.6.Final</resteasy.version>
<jackson.version>2.2.3</jackson.version>
<titan.version>0.4.2</titan.version>
-
- <rebel.root>${project.basedir}</rebel.root>
</properties>
<prerequisites>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/a2246ca0/platform/marmotta-core/src/main/resources/web/admin/dataview.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/admin/dataview.html b/platform/marmotta-core/src/main/resources/web/admin/dataview.html
index b65917c..9476880 100644
--- a/platform/marmotta-core/src/main/resources/web/admin/dataview.html
+++ b/platform/marmotta-core/src/main/resources/web/admin/dataview.html
@@ -46,7 +46,7 @@
});
}
- function toGoogleDataTable(data) {
+ function toGoogleDataTable(data, missingValue) {
function getValue(d) {
return d?d.value:"";
}
@@ -55,9 +55,11 @@
c2 = data.head.vars[1];
tbl.addColumn('string', c1);
tbl.addColumn('number', c2);
+ tbl.addColumn('string', "");
var bind = data.results.bindings;
for( var i = 0; i < bind.length; i++) {
- tbl.addRow([ getValue(bind[i][c1]), parseInt( getValue(bind[i][c2]) )||0 ]);
+ var g = getValue(bind[i][c1]);
+ tbl.addRow([ g!=""?g:missingValue, parseInt( getValue(bind[i][c2]) )||0, g ]);
}
return tbl;
}
@@ -112,7 +114,7 @@
}
sparql("SELECT ?graph (COUNT(?s) AS ?triples) WHERE { GRAPH ?graph { ?s ?p ?o }} GROUP BY ?graph",
function(data){
- var tbl = toGoogleDataTable(data),
+ var tbl = toGoogleDataTable(data, "default graph"),
options = {
is3D:true,
height: 350,
@@ -124,7 +126,7 @@
google.visualization.events.addListener(chart, 'select', function() {
var selection = chart.getSelection()[0];
if (selection) {
- _graph = tbl.getValue(selection.row, 0);
+ _graph = tbl.getValue(selection.row, 2);
_type = undefined;
if (tbl.getNumberOfRows() > 1) {
if (options.slices[selection.row]) {
@@ -158,7 +160,7 @@
sparql(query,
function(data) {
- var tbl = toGoogleDataTable(data),
+ var tbl = toGoogleDataTable(data, "no type"),
options = {
is3D:true,
height: 350,
@@ -170,7 +172,7 @@
google.visualization.events.addListener(chart, 'select', function() {
var selection = chart.getSelection()[0];
if (selection) {
- _type = tbl.getValue(selection.row, 0);
+ _type = tbl.getValue(selection.row, 2);
var _c = colors[selection.row];
if (tbl.getNumberOfRows() > 1) {
if (options.slices[selection.row]) {