From: <tob...@us...> - 2014-03-11 05:23:20
|
Revision: 7923 http://sourceforge.net/p/bigdata/code/7923 Author: tobycraig Date: 2014-03-11 05:23:16 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #829 - Added JSON export Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 05:20:26 UTC (rev 7922) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 05:23:16 UTC (rev 7923) @@ -45,7 +45,7 @@ /* Namespaces */ function getNamespaces() { - $.get('/namespace', function(data) { + $.get('/bigdata/namespace', function(data) { $('#namespaces-list').empty(); var rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; var namespaces = namespaces = data.getElementsByTagNameNS(rdf, 'Description') @@ -109,7 +109,7 @@ $('#namespace-create').submit(createNamespace); function getDefaultNamespace() { - $.get('/sparql', function(data) { + $.get('/bigdata/sparql', function(data) { // Chrome does not work with rdf\:Description, so look for Description too var defaultDataset = $(data).find('rdf\\:Description[rdf\\:nodeID=defaultDataset], Description[rdf\\:nodeID=defaultDataset]'); DEFAULT_NAMESPACE = defaultDataset.find('title')[0].textContent; @@ -393,6 +393,7 @@ }); $('#query-export-csv').click(exportCSV); +$('#query-export-json').click(exportJSON); $('#query-export-xml').click(exportXML); function exportXML() { @@ -430,6 +431,44 @@ downloadFile(xml, 'application/sparql-results+xml', 'export.xml'); } +function exportJSON() { + var json = {} + if($('#query-response table').hasClass('boolean')) { + json.head = {}; + json['boolean'] = $('#query-response td').text(); + } else { + json.head = {vars: []}; + $('#query-response thead tr td').each(function(i, td) { + json.head.vars.push(td.textContent); + }); + json.bindings = []; + $('#query-response tbody tr').each(function(i, tr) { + var binding = {}; + $(tr).find('td').each(function(j, td) { + var bindingFields = {} + var bindingType = td.className; + if(bindingType == 'unbound') { + return; + } + bindingFields.type = bindingType; + var dataType = $(td).data('datatype'); + if(dataType) { + bindingFields.type = dataType; + } + var lang = $(td).data('lang'); + if(lang) { + bindingFields.lang = lang; + } + bindingFields.value = td.textContent; + binding[json.head.vars[j]] = bindingFields; + }); + json.bindings.push(binding); + }); + } + json = JSON.stringify(json); + downloadFile(json, 'application/sparql-results+json', 'export.json'); +} + function exportCSV() { // FIXME: escape commas var csv = ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-11 06:59:51
|
Revision: 7924 http://sourceforge.net/p/bigdata/code/7924 Author: tobycraig Date: 2014-03-11 06:59:48 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #827 - Query results are now linked to the Explore pane. Currently only working for vertices. Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 05:23:16 UTC (rev 7923) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 06:59:48 UTC (rev 7924) @@ -78,7 +78,7 @@ if(namespace == NAMESPACE) { // FIXME: what is the desired behaviour when deleting the current namespace? } - var url = '/namespace/' + namespace; + var url = '/bigdata/namespace/' + namespace; var settings = { type: 'DELETE', success: getNamespaces, @@ -104,7 +104,7 @@ success: getNamespaces, error: function(jqXHR, textStatus, errorThrown) { alert(errorThrown); } }; - $.ajax('/namespace', settings); + $.ajax('/bigdata/namespace', settings); } $('#namespace-create').submit(createNamespace); @@ -538,15 +538,19 @@ for(var j=0; j<vars.length; j++) { if(vars[j] in data.results.bindings[i]) { var binding = data.results.bindings[i][vars[j]]; + var text = binding.value; if(binding.type == 'typed-literal') { var tdData = ' class="literal" data-datatype="' + binding.datatype + '"'; } else { + if(binding.type == 'uri') { + text = '<a href="#">' + text + '</a>'; + } var tdData = ' class="' + binding.type + '"'; if(binding['xml:lang']) { tdData += ' data-lang="' + binding['xml:lang'] + '"'; } } - tr.append('<td' + tdData + '>' + binding.value + '</td>'); + tr.append('<td' + tdData + '>' + text + '</td>'); } else { // no binding tr.append('<td class="unbound">'); @@ -554,6 +558,13 @@ } table.append(tr); } + + $('#query-response a').click(function(e) { + e.preventDefault(); + var uri = $(this).text(); + loadURI(uri); + showTab('explore'); + }); } } @@ -613,7 +624,7 @@ success: updateExploreStart, error: updateExploreError }; - $.ajax('/sparql', settings); + $.ajax(NAMESPACE_URL, settings); } function updateExploreStart(data) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-11 18:57:23
|
Revision: 7927 http://sourceforge.net/p/bigdata/code/7927 Author: tobycraig Date: 2014-03-11 18:57:20 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #842 - Prevent user from deleting default namespace Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 15:53:10 UTC (rev 7926) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 18:57:20 UTC (rev 7927) @@ -73,8 +73,13 @@ } function deleteNamespace(namespace) { + // prevent default namespace from being deleted + if(namespace == DEFAULT_NAMESPACE) { + alert('You may not delete the default namespace.'); + return; + } + if(confirm('Are you sure you want to delete the namespace ' + namespace + '?')) { - // FIXME: should we check if the default namespace is the one being deleted? if(namespace == NAMESPACE) { // FIXME: what is the desired behaviour when deleting the current namespace? } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-11 20:53:24
|
Revision: 7932 http://sourceforge.net/p/bigdata/code/7932 Author: tobycraig Date: 2014-03-11 20:53:18 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #844 - Use new URL for retrieving default namespace Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 20:42:49 UTC (rev 7931) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 20:53:18 UTC (rev 7932) @@ -114,7 +114,7 @@ $('#namespace-create').submit(createNamespace); function getDefaultNamespace() { - $.get('/bigdata/sparql', function(data) { + $.get('/bigdata/namespace?describe-each-named-graph=false&describe-default-namespace=true', function(data) { // Chrome does not work with rdf\:Description, so look for Description too var defaultDataset = $(data).find('rdf\\:Description[rdf\\:nodeID=defaultDataset], Description[rdf\\:nodeID=defaultDataset]'); DEFAULT_NAMESPACE = defaultDataset.find('title')[0].textContent; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-11 21:47:46
|
Revision: 7933 http://sourceforge.net/p/bigdata/code/7933 Author: tobycraig Date: 2014-03-11 21:47:42 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #844 - Fixed erroneous selector for retrieving default namespace Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 20:53:18 UTC (rev 7932) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 21:47:42 UTC (rev 7933) @@ -116,7 +116,7 @@ function getDefaultNamespace() { $.get('/bigdata/namespace?describe-each-named-graph=false&describe-default-namespace=true', function(data) { // Chrome does not work with rdf\:Description, so look for Description too - var defaultDataset = $(data).find('rdf\\:Description[rdf\\:nodeID=defaultDataset], Description[rdf\\:nodeID=defaultDataset]'); + var defaultDataset = $(data).find('rdf\\:Description, Description'); DEFAULT_NAMESPACE = defaultDataset.find('title')[0].textContent; var url = defaultDataset.find('sparqlEndpoint')[0].attributes['rdf:resource'].textContent; useNamespace(DEFAULT_NAMESPACE, url); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-11 21:49:25
|
Revision: 7934 http://sourceforge.net/p/bigdata/code/7934 Author: tobycraig Date: 2014-03-11 21:49:22 +0000 (Tue, 11 Mar 2014) Log Message: ----------- #819 - Use new, less resource-intensive URL for retrieving namespaces Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 21:47:42 UTC (rev 7933) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-11 21:49:22 UTC (rev 7934) @@ -45,7 +45,7 @@ /* Namespaces */ function getNamespaces() { - $.get('/bigdata/namespace', function(data) { + $.get('/bigdata/namespace?describe-each-named-graph=false', function(data) { $('#namespaces-list').empty(); var rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; var namespaces = namespaces = data.getElementsByTagNameNS(rdf, 'Description') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-12 01:40:36
|
Revision: 7938 http://sourceforge.net/p/bigdata/code/7938 Author: tobycraig Date: 2014-03-12 01:40:31 +0000 (Wed, 12 Mar 2014) Log Message: ----------- #843 - Download service description for namespace, after confirmation from user Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 01:28:26 UTC (rev 7937) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 01:40:31 UTC (rev 7938) @@ -59,7 +59,7 @@ } else { use = '<a href="#" class="use-namespace">Use</a>'; } - $('#namespaces-list').append('<li data-name="' + title + '" data-url="' + url + '">' + titleText + ' - ' + use + ' - <a href="#" class="delete-namespace">Delete</a> - <a href="#" class="namespace-properties">Properties</a></li>'); + $('#namespaces-list').append('<li data-name="' + title + '" data-url="' + url + '">' + titleText + ' - ' + use + ' - <a href="#" class="delete-namespace">Delete</a> - <a href="#" class="namespace-properties">Properties</a> - <a href="/bigdata/namespace/' + title + '/sparql" class="namespace-service-description">Service Description</a></li>'); } $('.use-namespace').click(function(e) { e.preventDefault(); @@ -73,6 +73,9 @@ e.preventDefault(); getNamespaceProperties($(this).parent().data('name')); }); + $('.namespace-service-description').click(function(e) { + return confirm('This can be an expensive operation. Proceed anyway?'); + }); }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-03-12 22:28:08
|
Revision: 7947 http://sourceforge.net/p/bigdata/code/7947 Author: mrpersonick Date: 2014-03-12 22:28:03 +0000 (Wed, 12 Mar 2014) Log Message: ----------- minor change to the full text query Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 21:18:57 UTC (rev 7946) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-12 22:28:03 UTC (rev 7947) @@ -8,7 +8,7 @@ if(!term) { return; } - var query = 'select * { ?o bds:search "' + term + '" . ?s ?p ?o . }' + var query = 'select ?s ?p ?o { ?o bds:search "' + term + '" . ?s ?p ?o . }' $('#query-box').val(query); $('#query-form').submit(); showTab('query'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-13 20:15:03
|
Revision: 7959 http://sourceforge.net/p/bigdata/code/7959 Author: tobycraig Date: 2014-03-13 20:15:00 +0000 (Thu, 13 Mar 2014) Log Message: ----------- #856 - Update current namespace in list when one is selected Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-13 20:11:25 UTC (rev 7958) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-13 20:15:00 UTC (rev 7959) @@ -97,6 +97,7 @@ $('#current-namespace').html(name); NAMESPACE = name; NAMESPACE_URL = url; + getNamespaces(); } function deleteNamespace(namespace) { @@ -160,7 +161,6 @@ DEFAULT_NAMESPACE = defaultDataset.find('title')[0].textContent; var url = defaultDataset.find('sparqlEndpoint')[0].attributes['rdf:resource'].textContent; useNamespace(DEFAULT_NAMESPACE, url); - getNamespaces(); }); } var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, fileContents; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-13 20:28:42
|
Revision: 7960 http://sourceforge.net/p/bigdata/code/7960 Author: tobycraig Date: 2014-03-13 20:28:36 +0000 (Thu, 13 Mar 2014) Log Message: ----------- #857 - Display exploration target in header box Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-13 20:15:00 UTC (rev 7959) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-13 20:28:36 UTC (rev 7960) @@ -606,9 +606,8 @@ $('#query-response a').click(function(e) { e.preventDefault(); - var uri = $(this).text(); - loadURI(uri); - showTab('explore'); + // var uri = $(this).text(); + explore(this.textContent); }); } } @@ -738,9 +737,18 @@ attributesContainer.append('<h2>No attributes</h2>'); } - $('#explore-results a').click(function(e) { e.preventDefault(); loadURI(this.text); }); + $('#explore-results a').click(function(e) { + e.preventDefault(); + explore(this.text); + }); } +function explore(uri) { + $('#explore-form input[type=text]').val(uri); + $('#explore-form').submit(); + showTab('explore'); +} + function updateExploreError(jqXHR, textStatus, errorThrown) { $('#explore-results').html('Error! ' + textStatus + ' ' + errorThrown); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-14 00:44:12
|
Revision: 7963 http://sourceforge.net/p/bigdata/code/7963 Author: tobycraig Date: 2014-03-14 00:44:09 +0000 (Fri, 14 Mar 2014) Log Message: ----------- #827 - Fixed explore error not appearing Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-13 23:15:40 UTC (rev 7962) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 00:44:09 UTC (rev 7963) @@ -750,7 +750,9 @@ } function updateExploreError(jqXHR, textStatus, errorThrown) { - $('#explore-results').html('Error! ' + textStatus + ' ' + errorThrown); + $('#explore-results').hide(); + $('#explore-no-results').show(); + $('#explore-no-results').html('Error! ' + textStatus + ' ' + errorThrown); } /* Status */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-14 16:41:04
|
Revision: 7965 http://sourceforge.net/p/bigdata/code/7965 Author: tobycraig Date: 2014-03-14 16:41:01 +0000 (Fri, 14 Mar 2014) Log Message: ----------- #848 - Print SIDs correctly in query panel Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 15:05:24 UTC (rev 7964) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 16:41:01 UTC (rev 7965) @@ -583,11 +583,17 @@ for(var j=0; j<vars.length; j++) { if(vars[j] in data.results.bindings[i]) { var binding = data.results.bindings[i][vars[j]]; - var text = binding.value; + if(binding.type == 'sid') { + var text = getSID(binding); + } else { + var text = binding.value; + } + // hack to escape HTML characters + text = $('<div/>').text(text).html(); if(binding.type == 'typed-literal') { var tdData = ' class="literal" data-datatype="' + binding.datatype + '"'; } else { - if(binding.type == 'uri') { + if(binding.type == 'uri' || binding.type == 'sid') { text = '<a href="#">' + text + '</a>'; } var tdData = ' class="' + binding.type + '"'; @@ -620,7 +626,16 @@ $('#query-response').text('Error! ' + textStatus + ' ' + errorThrown); } +function getSID(binding) { + return '<< <' + binding.value['sid-s'].value + '> <' + binding.value['sid-p'].value + '> <' + binding.value['sid-o'].value + '> >>'; +} +function parseSID(sid) { + var re = /<< <([^<>]*)> <([^<>]*)> <([^<>]*)> >>/; + var matches = sid.match(re); + return {'s': matches[1], 'p': matches[2], 'o': matches[3]}; +} + /* Explore */ $('#explore-form').submit(function(e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-14 16:43:27
|
Revision: 7966 http://sourceforge.net/p/bigdata/code/7966 Author: tobycraig Date: 2014-03-14 16:43:25 +0000 (Fri, 14 Mar 2014) Log Message: ----------- #827 - Output explore query & results in JS console Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 16:41:01 UTC (rev 7965) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 16:43:25 UTC (rev 7966) @@ -675,6 +675,8 @@ }'; query = query.replace('URI', uri); + console.log('Explore query'); + console.log(query); var settings = { type: 'POST', data: 'query=' + encodeURI(query), @@ -687,6 +689,8 @@ } function updateExploreStart(data) { + console.log('Explore results'); + console.log(data); var results = data.results.bindings.length > 0; $('#explore-results').toggle(results); $('#explore-no-results').toggle(!results); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-14 23:49:46
|
Revision: 7973 http://sourceforge.net/p/bigdata/code/7973 Author: tobycraig Date: 2014-03-14 23:49:43 +0000 (Fri, 14 Mar 2014) Log Message: ----------- #827 - Made SID components in header clickable, and removed old code Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 23:44:38 UTC (rev 7972) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-14 23:49:43 UTC (rev 7973) @@ -631,7 +631,19 @@ var uri = $(this).find('input').val(); if(uri) { loadURI(uri); - $('#explore-header h1').text(uri); + + // if this is a SID, make the components clickable + var re = /< <([^<>]*)> <([^<>]*)> <([^<>]*)> >/; + var match = uri.match(re); + if(match) { + $('#explore-header h1').html('< <<a href="#">' + match[1] + '</a> > <<a href="#">' + match[2] + '</a> > <<a href="#">' + match[3] + '</a> > >'); + $('#explore-header h1 a').click(function(e) { + e.preventDefault(); + explore(this.text); + }); + } else { + $('#explore-header h1').text(uri); + } } }); @@ -762,68 +774,6 @@ e.preventDefault(); explore($(this).data('sid') ? $(this).data('sid') : this.text); }); - - return; - - var outbound={}, inbound={}, attributes={}; - for(var i=0; i<data.results.bindings.length; i++) { - var binding = data.results.bindings[i]; - var star = typeof(binding.sidP) != 'undefined'; - if('o' in binding) { - var key = [binding.p.value, binding.o.value]; - if(binding.o.type == 'uri') { - // leave star true if it was before, or set it to current value - outbound[key] = !!outbound[key] || star; - } else { - // do not show star for attributes - attributes[key] = false; - } - } else { - var key = [binding.s.value, binding.p.value] - inbound[key] == !!inbound[key] || star; - } - } - - var outgoingContainer = $('#explore-outgoing'); - outgoingContainer.html(''); - if(outbound.length) { - outgoingContainer.append('<h2>Outgoing links</h2>'); - var table = $('<table>').appendTo(outgoingContainer); - for(key in outbound) { - table.append('<tr><td>' + key[0] + '</td><td><a href="#">' + key[1] + '</a></td><td>' + (outbound[key] ? '*' : '') + '</td></tr>'); - } - } else { - outgoingContainer.append('<h2>No outgoing links</h2>'); - } - - var incomingContainer = $('#explore-incoming'); - incomingContainer.html(''); - if(inbound.length) { - incomingContainer.append('<h2>Inbound links</h2>'); - var table = $('<table>').appendTo(incomingContainer); - for(key in inbound) { - table.append('<tr><td>' + key[0] + '</td><td><a href="#">' + key[1] + '</a></td><td>' + (inbound[key] ? '*' : '') + '</td></tr>'); - } - } else { - incomingContainer.append('<h2>No incoming links</h2>'); - } - - var attributesContainer = $('#explore-attributes'); - attributesContainer.html(''); - if(attributes.length) { - attributesContainer.append('<h4>Attributes</h4>'); - var table = $('<table>').appendTo(attributesContainer); - for(var i=0; i<attributes.length; i++) { - table.append('<tr><td>' + attributes[i].p.value + '</td><td>' + attributes[i].o.value + '</td></tr>'); - } - } else { - attributesContainer.append('<h2>No attributes</h2>'); - } - - $('#explore-results a').click(function(e) { - e.preventDefault(); - explore(this.text); - }); } function explore(uri) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-15 00:52:38
|
Revision: 7975 http://sourceforge.net/p/bigdata/code/7975 Author: tobycraig Date: 2014-03-15 00:52:32 +0000 (Sat, 15 Mar 2014) Log Message: ----------- #827 - Added angle brackets around SIDs Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-15 00:29:12 UTC (rev 7974) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-15 00:52:32 UTC (rev 7975) @@ -633,10 +633,10 @@ loadURI(uri); // if this is a SID, make the components clickable - var re = /< <([^<>]*)> <([^<>]*)> <([^<>]*)> >/; + var re = /<< <([^<>]*)> <([^<>]*)> <([^<>]*)> >>/; var match = uri.match(re); if(match) { - $('#explore-header h1').html('< <<a href="#">' + match[1] + '</a> > <<a href="#">' + match[2] + '</a> > <<a href="#">' + match[3] + '</a> > >'); + $('#explore-header h1').html('<< <<a href="#">' + match[1] + '</a> > <<a href="#">' + match[2] + '</a> > <<a href="#">' + match[3] + '</a> > >>'); $('#explore-header h1 a').click(function(e) { e.preventDefault(); explore(this.text); @@ -649,7 +649,7 @@ function loadURI(target) { // identify if this is a vertex or a SID - var re = /< (?:<[^<>]*> ){3}>/; + var re = /<< (?:<[^<>]*> ){3}>>/; var vertex = !target.match(re); var vertexQuery = '\ @@ -675,7 +675,7 @@ select ?col1 ?col2 ?incoming (count(?star) as ?star)\n\ with {\n\ select ?explore where {\n\ - bind (<SID> as ?explore) .\n\ + bind (SID as ?explore) .\n\ }\n\ } as %_explore\n\ where {\n\ @@ -747,9 +747,9 @@ var star = parseInt(binding.star.value); if(star > 0) { if(binding.incoming.value == 'true') { - var sid = '< <' + binding.col1.value + '> <' + binding.col2.value + '> <' + $('#explore-form input[type=text]').val() + '> >'; + var sid = '<< <' + binding.col1.value + '> <' + binding.col2.value + '> <' + $('#explore-form input[type=text]').val() + '> >>'; } else { - var sid = '< <' + $('#explore-form input[type=text]').val() + '> <' + binding.col1.value + '> <' + binding.col2.value + '> >'; + var sid = '<< <' + $('#explore-form input[type=text]').val() + '> <' + binding.col1.value + '> <' + binding.col2.value + '> >>'; } star = '<a href="#" data-sid="' + sid + '">*</a> (' + star + ')'; } else { @@ -807,7 +807,7 @@ /* Utility functions */ function getSID(binding) { - return '< <' + binding.value['sid-s'].value + '> <' + binding.value['sid-p'].value + '> <' + binding.value['sid-o'].value + '> >'; + return '<< <' + binding.value['sid-s'].value + '> <' + binding.value['sid-p'].value + '> <' + binding.value['sid-o'].value + '> >>'; } function parseSID(sid) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-15 00:54:46
|
Revision: 7976 http://sourceforge.net/p/bigdata/code/7976 Author: tobycraig Date: 2014-03-15 00:54:42 +0000 (Sat, 15 Mar 2014) Log Message: ----------- #827 - Put * (n) inside << >> Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-15 00:52:32 UTC (rev 7975) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-15 00:54:42 UTC (rev 7976) @@ -751,7 +751,7 @@ } else { var sid = '<< <' + $('#explore-form input[type=text]').val() + '> <' + binding.col1.value + '> <' + binding.col2.value + '> >>'; } - star = '<a href="#" data-sid="' + sid + '">*</a> (' + star + ')'; + star = '<a href="#" data-sid="' + sid + '"><< * (' + star + ') >></a>'; } else { star = ''; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-17 18:33:15
|
Revision: 7992 http://sourceforge.net/p/bigdata/code/7992 Author: tobycraig Date: 2014-03-17 18:33:10 +0000 (Mon, 17 Mar 2014) Log Message: ----------- #827 - Split SIDs across lines; restored headings to incoming links etc Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-17 15:09:50 UTC (rev 7991) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-17 18:33:10 UTC (rev 7992) @@ -589,6 +589,7 @@ var text = binding.value; } text = escapeHTML(text); + text = text.replace(/\n/g, '<br>'); if(binding.type == 'typed-literal') { var tdData = ' class="literal" data-datatype="' + binding.datatype + '"'; } else { @@ -633,10 +634,10 @@ loadURI(uri); // if this is a SID, make the components clickable - var re = /<< <([^<>]*)> <([^<>]*)> <([^<>]*)> >>/; + var re = /<< *<([^<>]*)> *<([^<>]*)> *<([^<>]*)> *>>/; var match = uri.match(re); if(match) { - $('#explore-header').html('<h1><< <<a href="#">' + match[1] + '</a> > <<a href="#">' + match[2] + '</a> > <<a href="#">' + match[3] + '</a> > >></h1>'); + $('#explore-header').html('<h1><< <<a href="#">' + match[1] + '</a>><br><<a href="#">' + match[2] + '</a> ><br><<a href="#">' + match[3] + '</a> > >></h1>'); $('#explore-header h1 a').click(function(e) { e.preventDefault(); explore(this.text); @@ -649,7 +650,8 @@ function loadURI(target) { // identify if this is a vertex or a SID - var re = /<< (?:<[^<>]*> ){3}>>/; + target = target.trim().replace(/\n/g, ' '); + var re = /<< *(?:<[^<>]*> *){3} *>>/; var vertex = !target.match(re); var vertexQuery = '\ @@ -730,7 +732,7 @@ } else { var output = col.value; } - output = escapeHTML(output); + output = escapeHTML(output).replace(/\n/g, '<br>'); if(col.type == 'uri' || col.type == 'sid') { output = '<a href="#">' + output + '</a>'; } @@ -764,8 +766,11 @@ var sections = {incoming: 'Incoming Links', outgoing: 'Outgoing Links', attributes: 'Attributes'}; for(var k in sections) { - if($('#explore-' + k + ' table tr').length == 0) { - $('#explore-' + k).html('No ' + sections[k]); + var id = '#explore-' + k; + if($(id + ' table tr').length == 0) { + $(id).html('No ' + sections[k]); + } else { + $(id).prepend('<h1>' + sections[k] + '</h1>'); } } @@ -805,7 +810,7 @@ /* Utility functions */ function getSID(binding) { - return '<< <' + binding.value['sid-s'].value + '> <' + binding.value['sid-p'].value + '> <' + binding.value['sid-o'].value + '> >>'; + return '<< <' + binding.value['sid-s'].value + '>\n<' + binding.value['sid-p'].value + '>\n<' + binding.value['sid-o'].value + '> >>'; } function parseSID(sid) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-03-18 18:16:32
|
Revision: 7995 http://sourceforge.net/p/bigdata/code/7995 Author: tobycraig Date: 2014-03-18 18:16:29 +0000 (Tue, 18 Mar 2014) Log Message: ----------- #843 - Fixed query cancellation in status tab Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-18 09:41:01 UTC (rev 7994) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-18 18:16:29 UTC (rev 7995) @@ -787,25 +787,40 @@ /* Status */ -$('#tab-selector a[data-target=status]').click(function(e) { +$('#tab-selector a[data-target=status]').click(getStatus); + +function getStatus(e) { + if(e) { + e.preventDefault(); + } $.get('/bigdata/status', function(data) { - var accepted = data.match(/Accepted query count=(\d+)/)[1]; - var running = data.match(/Running query count=(\d+)/)[1]; - var numbers = $(data).get(-1).textContent; + // get data inside a jQuery object + data = $('<div>').append(data); + getStatusNumbers(data); + }); +} + +function getStatusNumbers(data) { + var accepted = data.text().match(/Accepted query count=(\d+)/)[1]; + var running = data.text().match(/Running query count=(\d+)/)[1]; + var numbers = $(data).find('pre')[0].textContent; $('#accepted-query-count').html(accepted); $('#running-query-count').html(running); $('#status-numbers').html(numbers); - }); -}); +} $('#show-queries').click(function(e) { e.preventDefault(); $.get('/bigdata/status?showQueries', function(data) { + // get data inside a jQuery object + data = $('<div>').append(data); + + // update status numbers + getStatusNumbers(data); + // clear current list $('#running-queries').empty(); - // get data inside a jQuery object - data = $('<div>').append(data); data.find('h1').each(function(i, e) { // per running query, data is structured h1 form (with numbers/cancel data) h2 pre (with SPARQL) e = $(e); @@ -834,7 +849,7 @@ e.preventDefault(); if(confirm('Cancel query?')) { var id = $(this).data('queryId'); - $.post('/bigdata/?cancel&queryId=' + id); + $.post('/bigdata/status?cancelQuery&queryId=' + id, function() { getStatus(); }); $(this).parents('li').remove(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-03-19 14:32:45
|
Revision: 7997 http://sourceforge.net/p/bigdata/code/7997 Author: mrpersonick Date: 2014-03-19 14:32:40 +0000 (Wed, 19 Mar 2014) Log Message: ----------- removed the commas from the SID representation Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-18 18:59:02 UTC (rev 7996) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-03-19 14:32:40 UTC (rev 7997) @@ -867,7 +867,7 @@ /* Utility functions */ function getSID(binding) { - return '<<\n <' + binding.value['s'].value + '>,\n<' + binding.value['p'].value + '>,\n <' + binding.value['o'].value + '>\n>>'; + return '<<\n <' + binding.value['s'].value + '>\n<' + binding.value['p'].value + '>\n <' + binding.value['o'].value + '>\n>>'; } function parseSID(sid) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-03 00:41:29
|
Revision: 8031 http://sourceforge.net/p/bigdata/code/8031 Author: tobycraig Date: 2014-04-03 00:41:27 +0000 (Thu, 03 Apr 2014) Log Message: ----------- #858 - Workbench URL can now include namespace and URI to begin exploration at Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-02 22:43:05 UTC (rev 8030) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-03 00:41:27 UTC (rev 8031) @@ -25,7 +25,9 @@ $('#' + tab + '-tab').show(); $('#tab-selector a').removeClass(); $('a[data-target=' + tab + ']').addClass('active'); - window.location.hash = tab; + if(window.location.hash.substring(1).indexOf(tab) != 0) { + window.location.hash = tab; + } } function moveTab(next) { @@ -84,9 +86,16 @@ $('.namespace-service-description').click(function(e) { return confirm('This can be an expensive operation. Proceed anyway?'); }); + + READY = true; }); } +function selectNamespace(name) { + // for programmatically selecting a namespace with just its name + $('#namespaces-list li[data-name=' + name + '] a.use-namespace').click(); +} + function useNamespace(name, url) { $('#current-namespace').html(name); NAMESPACE = name; @@ -157,7 +166,7 @@ useNamespace(DEFAULT_NAMESPACE, url); }); } -var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, fileContents; +var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, READY, fileContents; getDefaultNamespace(); @@ -918,8 +927,38 @@ return $('<div/>').text(text).html(); } +function initialExplore(namespace, uri) { + if(!READY) { + setTimeout(function() { initialExplore(namespace, uri); }, 10); + } else { + if(namespace != '') { + selectNamespace(namespace); + } + explore(uri); + } +} + if(window.location.hash) { - $('a[data-target=' + window.location.hash.substring(1) + ']').click(); + // remove # and see if there is some data to retrieve for this hash + var hash = window.location.hash.substring(1); + var i = hash.indexOf(':'); + if(i != -1) { + var data = hash.substring(i + 1); + hash = hash.substring(0, i); + // currently only the explore tab uses this + // data is in the form namespace:uri + // if no namespace is specified, use the default one + // TODO: this may need to be rethought if we start remembering the namespace the user selects + if(hash == 'explore') { + i = data.indexOf(':'); + var namespace = data.substring(0, i); + var uri = data.substring(i + 1); + + // wait for namespaces to be retrieved + initialExplore(namespace, uri); + } + } + $('a[data-target=' + hash + ']').click(); } else { $('#tab-selector a:first').click(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-03 23:05:23
|
Revision: 8041 http://sourceforge.net/p/bigdata/code/8041 Author: tobycraig Date: 2014-04-03 23:05:18 +0000 (Thu, 03 Apr 2014) Log Message: ----------- #873 - Added history capability so user can browse around their exploration history. Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-03 22:01:57 UTC (rev 8040) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-03 23:05:18 UTC (rev 8041) @@ -86,8 +86,6 @@ $('.namespace-service-description').click(function(e) { return confirm('This can be an expensive operation. Proceed anyway?'); }); - - READY = true; }); } @@ -166,7 +164,7 @@ useNamespace(DEFAULT_NAMESPACE, url); }); } -var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, READY, fileContents; +var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, fileContents; getDefaultNamespace(); @@ -591,13 +589,12 @@ } else { var text = binding.value; } - text = escapeHTML(text); - text = text.replace(/\n/g, '<br>'); + linkText = escapeHTML(text).replace(/\n/g, '<br>'); if(binding.type == 'typed-literal') { var tdData = ' class="literal" data-datatype="' + binding.datatype + '"'; } else { if(binding.type == 'uri' || binding.type == 'sid') { - text = '<a href="#">' + text + '</a>'; + text = '<a href="' + buildExploreHash(text) + '">' + linkText + '</a>'; } var tdData = ' class="' + binding.type + '"'; if(binding['xml:lang']) { @@ -640,7 +637,7 @@ var re = /<< *<([^<>]*)> *<([^<>]*)> *<([^<>]*)> *>>/; var match = uri.match(re); if(match) { - $('#explore-header').html('<h1><< <<a href="#">' + match[1] + '</a>><br><<a href="#">' + match[2] + '</a> ><br><<a href="#">' + match[3] + '</a> > >></h1>'); + $('#explore-header').html('<h1><< <<a href="' + buildExploreHash(match[1]) + '">' + match[1] + '</a>><br><<a href="' + buildExploreHash(match[2]) + '">' + match[2] + '</a> ><br><<a href="' + buildExploreHash(match[3]) + '">' + match[3] + '</a> > >></h1>'); $('#explore-header h1 a').click(function(e) { e.preventDefault(); explore(this.text); @@ -651,6 +648,10 @@ } }); +function buildExploreHash(uri) { + return '#explore:' + NAMESPACE + ':' + uri; +} + function loadURI(target) { // identify if this is a vertex or a SID target = target.trim().replace(/\n/g, ' '); @@ -706,8 +707,6 @@ } else { var query = edgeQuery.replace('SID', target); } - console.log('Explore query for ' + (vertex ? 'vertex ' : 'edge ') + target); - console.log(query); var settings = { type: 'POST', data: 'query=' + encodeURI(query), @@ -720,8 +719,6 @@ } function updateExploreStart(data) { - console.log('Explore results'); - console.log(data); var results = data.results.bindings.length > 0; // clear tables @@ -731,13 +728,13 @@ $.each(data.results.bindings, function(i, binding) { var cols = [binding.col1, binding.col2].map(function(col) { if(col.type == 'sid') { - var output = getSID(col); + var uri = getSID(col); } else { - var output = col.value; + var uri = col.value; } - output = escapeHTML(output).replace(/\n/g, '<br>'); + output = escapeHTML(uri).replace(/\n/g, '<br>'); if(col.type == 'uri' || col.type == 'sid') { - output = '<a href="#">' + output + '</a>'; + output = '<a href="' + buildExploreHash(uri) + '">' + output + '</a>'; } return output; }); @@ -748,7 +745,7 @@ } else { var sid = '<< <' + $('#explore-form input[type=text]').val() + '> <' + binding.col1.value + '> <' + binding.col2.value + '> >>'; } - star = '<a href="#" data-sid="' + sid + '"><< * (' + star + ') >></a>'; + star = '<a href="' + buildExploreHash(sid) + '"><< * (' + star + ') >></a>'; } else { star = ''; } @@ -779,16 +776,44 @@ $('#explore-results a').click(function(e) { e.preventDefault(); - explore($(this).data('sid') ? $(this).data('sid') : this.text); + var components = parseHash(this.hash); + selectNamespace(components[2]); + explore(components[3]); }); } -function explore(uri) { +function explore(uri, nopush) { $('#explore-form input[type=text]').val(uri); $('#explore-form').submit(); showTab('explore'); + if(!nopush) { + history.pushState(null, null, '#explore:' + NAMESPACE + ':' + uri); + } } +function parseHash(hash) { + // match #tab:namespace:uri + // :namespace:uri group optional + // namespace optional + var re = /#([^:]+)(?::([^:]*):(.+))?/; + return hash.match(re); +} + +// handle history buttons and initial display of first tab +window.addEventListener("popstate", function(e) { + var hash = parseHash(this.location.hash); + if(!hash) { + $('#tab-selector a:first').click(); + } else { + if(hash[1] == 'explore') { + selectNamespace(hash[2]); + explore(hash[3], true); + } else { + $('a[data-target=' + hash[1] + ']').click(); + } + } +}); + function updateExploreError(jqXHR, textStatus, errorThrown) { $('#explore-results .box').html(''); $('#explore-header').html('Error! ' + textStatus + ' ' + errorThrown); @@ -927,40 +952,4 @@ return $('<div/>').text(text).html(); } -function initialExplore(namespace, uri) { - if(!READY) { - setTimeout(function() { initialExplore(namespace, uri); }, 10); - } else { - if(namespace != '') { - selectNamespace(namespace); - } - explore(uri); - } -} - -if(window.location.hash) { - // remove # and see if there is some data to retrieve for this hash - var hash = window.location.hash.substring(1); - var i = hash.indexOf(':'); - if(i != -1) { - var data = hash.substring(i + 1); - hash = hash.substring(0, i); - // currently only the explore tab uses this - // data is in the form namespace:uri - // if no namespace is specified, use the default one - // TODO: this may need to be rethought if we start remembering the namespace the user selects - if(hash == 'explore') { - i = data.indexOf(':'); - var namespace = data.substring(0, i); - var uri = data.substring(i + 1); - - // wait for namespaces to be retrieved - initialExplore(namespace, uri); - } - } - $('a[data-target=' + hash + ']').click(); -} else { - $('#tab-selector a:first').click(); -} - }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-03 23:39:47
|
Revision: 8042 http://sourceforge.net/p/bigdata/code/8042 Author: tobycraig Date: 2014-04-03 23:39:45 +0000 (Thu, 03 Apr 2014) Log Message: ----------- #873 - Fixed double history entry for SID component clicks Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-03 23:05:18 UTC (rev 8041) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-03 23:39:45 UTC (rev 8042) @@ -638,10 +638,6 @@ var match = uri.match(re); if(match) { $('#explore-header').html('<h1><< <<a href="' + buildExploreHash(match[1]) + '">' + match[1] + '</a>><br><<a href="' + buildExploreHash(match[2]) + '">' + match[2] + '</a> ><br><<a href="' + buildExploreHash(match[3]) + '">' + match[3] + '</a> > >></h1>'); - $('#explore-header h1 a').click(function(e) { - e.preventDefault(); - explore(this.text); - }); } else { $('#explore-header').html('<h1>' + uri + '</h1>'); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-04 17:07:00
|
Revision: 8053 http://sourceforge.net/p/bigdata/code/8053 Author: tobycraig Date: 2014-04-04 17:06:57 +0000 (Fri, 04 Apr 2014) Log Message: ----------- #873 - Fixed error on reloading of explore Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-04 16:55:54 UTC (rev 8052) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-04 17:06:57 UTC (rev 8053) @@ -86,12 +86,17 @@ $('.namespace-service-description').click(function(e) { return confirm('This can be an expensive operation. Proceed anyway?'); }); + NAMESPACES_READY = true; }); } function selectNamespace(name) { // for programmatically selecting a namespace with just its name - $('#namespaces-list li[data-name=' + name + '] a.use-namespace').click(); + if(!NAMESPACES_READY) { + setTimeout(function() { selectNamespace(name); }, 10); + } else { + $('#namespaces-list li[data-name=' + name + '] a.use-namespace').click(); + } } function useNamespace(name, url) { @@ -164,7 +169,7 @@ useNamespace(DEFAULT_NAMESPACE, url); }); } -var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, fileContents; +var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, NAMESPACES_READY, fileContents; getDefaultNamespace(); @@ -773,11 +778,19 @@ $('#explore-results a').click(function(e) { e.preventDefault(); var components = parseHash(this.hash); - selectNamespace(components[2]); - explore(components[3]); + exploreNamespacedURI(components[2], components[3]); }); } +function exploreNamespacedURI(namespace, uri, nopush) { + if(!NAMESPACES_READY) { + setTimeout(function() { exploreNamespacedURI(namespace, uri, nopush); }, 10); + } else { + selectNamespace(namespace); + explore(uri, nopush); + } +} + function explore(uri, nopush) { $('#explore-form input[type=text]').val(uri); $('#explore-form').submit(); @@ -802,8 +815,7 @@ $('#tab-selector a:first').click(); } else { if(hash[1] == 'explore') { - selectNamespace(hash[2]); - explore(hash[3], true); + exploreNamespacedURI(hash[2], hash[3], true); } else { $('a[data-target=' + hash[1] + ']').click(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-05 01:16:54
|
Revision: 8057 http://sourceforge.net/p/bigdata/code/8057 Author: tobycraig Date: 2014-04-05 01:16:51 +0000 (Sat, 05 Apr 2014) Log Message: ----------- #879 - Fixed problem with URIs containing URI-encoded elements in explore tab Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 00:35:08 UTC (rev 8056) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 01:16:51 UTC (rev 8057) @@ -710,7 +710,7 @@ } var settings = { type: 'POST', - data: 'query=' + encodeURI(query), + data: 'query=' + encodeURIComponent(query), dataType: 'json', accepts: {'json': 'application/sparql-results+json'}, success: updateExploreStart, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-05 01:27:12
|
Revision: 8058 http://sourceforge.net/p/bigdata/code/8058 Author: tobycraig Date: 2014-04-05 01:27:09 +0000 (Sat, 05 Apr 2014) Log Message: ----------- #877 - Fixed error with RDF format selector not appearing Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 01:16:51 UTC (rev 8057) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 01:27:09 UTC (rev 8058) @@ -339,8 +339,8 @@ $('#load-box').on('dragover', handleDragOver) .on('drop', handleFile) .on('paste', handlePaste) - .bind('keydown', 'ctrl+return', submitLoad) - .change(handleTypeChange); + .bind('keydown', 'ctrl+return', submitLoad); +$('#load-type').change(handleTypeChange); $('#clear-file').click(clearFile); $('#load-load').click(submitLoad); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |