From: <tob...@us...> - 2014-05-16 14:06:49
|
Revision: 8346 http://sourceforge.net/p/bigdata/code/8346 Author: tobycraig Date: 2014-05-16 14:06:45 +0000 (Fri, 16 May 2014) Log Message: ----------- FIxed namespace shortcuts not working with CodeMirror editors Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-15 23:41:06 UTC (rev 8345) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-16 14:06:45 UTC (rev 8346) @@ -235,12 +235,12 @@ } $('.namespace-shortcuts li').click(function() { - var textarea = $(this).parents('.tab').find('textarea'); - var current = textarea.val(); + var tab = $(this).parents('.tab').attr('id').split('-')[0]; + var current = EDITORS[tab].getValue(); var ns = $(this).data('ns'); if(current.indexOf(ns) == -1) { - textarea.val(ns + '\n' + current); + EDITORS[tab].setValue(ns + '\n' + current); } }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-05-16 14:59:26
|
Revision: 8347 http://sourceforge.net/p/bigdata/code/8347 Author: tobycraig Date: 2014-05-16 14:59:23 +0000 (Fri, 16 May 2014) Log Message: ----------- Add angle brackets to URI in explore tab form if they're not present Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-16 14:06:45 UTC (rev 8346) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-16 14:59:23 UTC (rev 8347) @@ -932,8 +932,16 @@ $('#explore-form').submit(function(e) { e.preventDefault(); - var uri = $(this).find('input').val(); + var uri = $(this).find('input').val().trim(); if(uri) { + // add < > if they're not present + if(uri[0] != '<') { + uri = '<' + uri; + } + if(uri.slice(-1) != '>') { + uri += '>'; + } + $(this).find('input').val(uri); loadURI(uri); // if this is a SID, make the components clickable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-05-21 16:26:33
|
Revision: 8400 http://sourceforge.net/p/bigdata/code/8400 Author: tobycraig Date: 2014-05-21 16:26:25 +0000 (Wed, 21 May 2014) Log Message: ----------- Fixed submit button on explore tab being overwritten with URI Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-21 14:52:13 UTC (rev 8399) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-21 16:26:25 UTC (rev 8400) @@ -932,7 +932,7 @@ $('#explore-form').submit(function(e) { e.preventDefault(); - var uri = $(this).find('input').val().trim(); + var uri = $(this).find('input[type="text"]').val().trim(); if(uri) { // add < > if they're not present if(uri[0] != '<') { @@ -941,7 +941,7 @@ if(uri.slice(-1) != '>') { uri += '>'; } - $(this).find('input').val(uri); + $(this).find('input[type="text"]').val(uri); loadURI(uri); // if this is a SID, make the components clickable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-05-23 16:08:43
|
Revision: 8417 http://sourceforge.net/p/bigdata/code/8417 Author: tobycraig Date: 2014-05-23 16:08:41 +0000 (Fri, 23 May 2014) Log Message: ----------- Only add <> to URIs in explore form if they're not namespaced Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-23 16:04:05 UTC (rev 8416) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-23 16:08:41 UTC (rev 8417) @@ -934,14 +934,14 @@ e.preventDefault(); var uri = $(this).find('input[type="text"]').val().trim(); if(uri) { - // add < > if they're not present - if(uri[0] != '<') { + // add < > if they're not present and this is not a namespaced URI + if(uri[0] != '<' && uri.match(/^\w+:\//)) { uri = '<' + uri; + if(uri.slice(-1) != '>') { + uri += '>'; + } + $(this).find('input[type="text"]').val(uri); } - if(uri.slice(-1) != '>') { - uri += '>'; - } - $(this).find('input[type="text"]').val(uri); loadURI(uri); // if this is a SID, make the components clickable This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-05-26 14:40:50
|
Revision: 8419 http://sourceforge.net/p/bigdata/code/8419 Author: tobycraig Date: 2014-05-26 14:40:47 +0000 (Mon, 26 May 2014) Log Message: ----------- Fixed search not working with CodeMirror editor Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-23 19:11:29 UTC (rev 8418) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-26 14:40:47 UTC (rev 8419) @@ -35,7 +35,7 @@ return; } var query = 'select ?s ?p ?o { ?o bds:search "' + term + '" . ?s ?p ?o . }' - $('#query-box').val(query); + EDITORS.query.setValue(query); $('#query-errors').hide(); $('#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-05-30 21:13:12
|
Revision: 8427 http://sourceforge.net/p/bigdata/code/8427 Author: tobycraig Date: 2014-05-30 21:13:07 +0000 (Fri, 30 May 2014) Log Message: ----------- Added download namespace properties functionality Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-30 21:01:10 UTC (rev 8426) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-05-30 21:13:07 UTC (rev 8427) @@ -107,7 +107,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> - <a href="/bigdata/namespace/' + title + '/sparql" class="namespace-service-description">Service Description</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> (Download <a href="/bigdata/namespace/' + title + '/properties" download="' + title + '.xml">XML</a>/<a href="#" class="namespace-properties-java">Java</a>) - <a href="#" class="clone-namespace">Clone</a> - <a href="/bigdata/namespace/' + title + '/sparql" class="namespace-service-description">Service Description</a></li>'); } $('.use-namespace').click(function(e) { e.preventDefault(); @@ -121,6 +121,14 @@ e.preventDefault(); getNamespaceProperties($(this).parent().data('name')); }); + $('.namespace-properties-java').click(function(e) { + e.preventDefault(); + getNamespaceProperties($(this).parent().data('name'), 'java'); + }); + $('.clone-namespace').click(function(e) { + e.preventDefault(); + cloneNamespace($(this).parent().data('name')); + }); $('.namespace-service-description').click(function(e) { return confirm('This can be an expensive operation. Proceed anyway?'); }); @@ -165,15 +173,25 @@ } } -function getNamespaceProperties(namespace) { - $('#namespace-properties h1').html(namespace); - $('#namespace-properties table').empty(); - $('#namespace-properties').show(); +function getNamespaceProperties(namespace, download) { var url = '/bigdata/namespace/' + namespace + '/properties'; + if(!download) { + $('#namespace-properties h1').html(namespace); + $('#namespace-properties table').empty(); + $('#namespace-properties').show(); + } $.get(url, function(data) { + var java = ''; $.each(data.getElementsByTagName('entry'), function(i, entry) { - $('#namespace-properties table').append('<tr><td>' + entry.getAttribute('key') + '</td><td>' + entry.textContent + '</td></tr>'); + if(download) { + java += entry.getAttribute('key') + '=' + entry.textContent + '\n'; + } else { + $('#namespace-properties table').append('<tr><td>' + entry.getAttribute('key') + '</td><td>' + entry.textContent + '</td></tr>'); + } }); + if(download) { + downloadFile(java, 'text/x-java-properties', this.url.split('/')[3] + '.properties'); + } }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-06-02 17:18:24
|
Revision: 8438 http://sourceforge.net/p/bigdata/code/8438 Author: tobycraig Date: 2014-06-02 17:18:22 +0000 (Mon, 02 Jun 2014) Log Message: ----------- #960 & #961 - Fixed wrong variable names Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-06-02 17:09:07 UTC (rev 8437) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-06-02 17:18:22 UTC (rev 8438) @@ -7,7 +7,7 @@ var NAMESPACE_PARAMS = { 'name': 'com.bigdata.rdf.sail.namespace', 'index': 'com.bigdata.search.FullTextIndex.fieldsEnabled', - 'truth-maintenance': 'com.bigdata.rdf.sail.truthMaintenance', + 'truthMaintenance': 'com.bigdata.rdf.sail.truthMaintenance', 'quads': 'com.bigdata.rdf.store.AbstractTripleStore.quads' }; @@ -237,7 +237,7 @@ // TODO: allow for other options to be specified var data = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">\n<properties>\n'; for(key in NAMESPACE_PARAMS) { - data += '<entry key="' + keys[key] + '">' + params[key] + '</entry>\n'; + data += '<entry key="' + NAMESPACE_PARAMS[key] + '">' + params[key] + '</entry>\n'; } data += '</properties>'; var settings = { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-06-03 23:26:49
|
Revision: 8443 http://sourceforge.net/p/bigdata/code/8443 Author: tobycraig Date: 2014-06-03 23:26:41 +0000 (Tue, 03 Jun 2014) Log Message: ----------- #938 - Added LBS support to workbench Modified Paths: -------------- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js Modified: branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-06-03 14:58:09 UTC (rev 8442) +++ branches/NEW_WORKBENCH_1_3_2_BRANCH/bigdata-war/src/html/js/workbench.js 2014-06-03 23:26:41 UTC (rev 8443) @@ -1,7 +1,8 @@ $(function() { // global variables -var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, NAMESPACES_READY, NAMESPACE_SHORTCUTS, FILE_CONTENTS, QUERY_RESULTS; +var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACES_READY, NAMESPACE_SHORTCUTS, FILE_CONTENTS, QUERY_RESULTS; +var RW_URL_PREFIX = '/bigdata/LBS/leader/', RO_URL_PREFIX = '/bigdata/LBS/read/'; var CODEMIRROR_DEFAULTS, EDITORS = {}, ERROR_LINE_MARKERS = {}, ERROR_CHARACTER_MARKERS = {}; var PAGE_SIZE = 50, TOTAL_PAGES, CURRENT_PAGE; var NAMESPACE_PARAMS = { @@ -100,7 +101,7 @@ /* Namespaces */ function getNamespaces() { - $.get('/bigdata/namespace?describe-each-named-graph=false', function(data) { + $.get(RO_URL_PREFIX + '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') @@ -114,11 +115,11 @@ } 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> (Download <a href="/bigdata/namespace/' + title + '/properties" download="' + title + '.xml">XML</a>/<a href="#" class="namespace-properties-java">Java</a>) - <a href="#" class="clone-namespace">Clone</a> - <a href="/bigdata/namespace/' + title + '/sparql" class="namespace-service-description">Service Description</a></li>'); + $('#namespaces-list').append('<li data-name="' + title + '">' + titleText + ' - ' + use + ' - <a href="#" class="delete-namespace">Delete</a> - <a href="#" class="namespace-properties">Properties</a> - <a href="' + RO_URL_PREFIX + 'namespace/' + title + '/sparql" class="namespace-service-description">Service Description</a></li>'); } $('.use-namespace').click(function(e) { e.preventDefault(); - useNamespace($(this).parent().data('name'), $(this).parent().data('url')); + useNamespace($(this).parent().data('name')); }); $('.delete-namespace').click(function(e) { e.preventDefault(); @@ -152,10 +153,9 @@ } } -function useNamespace(name, url) { +function useNamespace(name) { $('#current-namespace').html(name); NAMESPACE = name; - NAMESPACE_URL = url; getNamespaces(); } @@ -170,7 +170,7 @@ if(namespace == NAMESPACE) { // FIXME: what is the desired behaviour when deleting the current namespace? } - var url = '/bigdata/namespace/' + namespace; + var url = RW_URL_PREFIX + 'namespace/' + namespace; var settings = { type: 'DELETE', success: getNamespaces, @@ -181,7 +181,7 @@ } function getNamespaceProperties(namespace, download) { - var url = '/bigdata/namespace/' + namespace + '/properties'; + var url = RO_URL_PREFIX + 'namespace/' + namespace + '/properties'; if(!download) { $('#namespace-properties h1').html(namespace); $('#namespace-properties table').empty(); @@ -203,7 +203,7 @@ } function cloneNamespace(namespace) { - var url = '/bigdata/namespace/' + namespace + '/properties'; + var url = RO_URL_PREFIX + 'namespace/' + namespace + '/properties'; $.get(url, function(data) { var reversed_params = {}; for(var key in NAMESPACE_PARAMS) { @@ -247,17 +247,17 @@ success: function() { $('#new-namespace-name').val(''); getNamespaces(); }, error: function(jqXHR, textStatus, errorThrown) { debugger;alert(jqXHR.responseText); } }; - $.ajax('/bigdata/namespace', settings); + $.ajax(RW_URL_PREFIX + 'namespace', settings); } $('#namespace-create').submit(createNamespace); function getDefaultNamespace() { - $.get('/bigdata/namespace?describe-each-named-graph=false&describe-default-namespace=true', function(data) { + $.get(RO_URL_PREFIX + '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, Description'); DEFAULT_NAMESPACE = defaultDataset.find('title')[0].textContent; var url = defaultDataset.find('sparqlEndpoint')[0].attributes['rdf:resource'].textContent; - useNamespace(DEFAULT_NAMESPACE, url); + useNamespace(DEFAULT_NAMESPACE); }); } @@ -514,6 +514,7 @@ $('#update-response').show(); + var url = RW_URL_PREFIX + 'namespace/' + NAMESPACE + '/sparql'; var settings = { type: 'POST', data: FILE_CONTENTS == null ? EDITORS.update.getValue() : FILE_CONTENTS, @@ -528,7 +529,7 @@ if($('#update-monitor').is(':checked')) { // create form and submit it, sending output to the iframe var form = $('<form method="POST" target="update-response-container">') - .attr('action', NAMESPACE_URL) + .attr('action', url) .append($('<input name="update">').val(settings.data)) .append('<input name="monitor" value="true">'); if($('#update-analytic').is(':checked')) { @@ -564,7 +565,7 @@ $('#update-response pre').show().html('Data loading...'); - $.ajax(NAMESPACE_URL, settings); + $.ajax(url, settings); } $('#update-clear').click(function() { @@ -639,6 +640,7 @@ return; } + var url = RO_URL_PREFIX + 'namespace/' + NAMESPACE + '/sparql'; var settings = { type: 'POST', data: $('#query-form').serialize(), @@ -650,7 +652,7 @@ $('#query-response').show().html('Query running...'); $('#query-pagination').hide(); - $.ajax(NAMESPACE_URL, settings); + $.ajax(url, settings); $('#query-explanation').empty(); if($('#query-explain').is(':checked')) { @@ -661,7 +663,7 @@ success: showQueryExplanation, error: queryResultsError }; - $.ajax(NAMESPACE_URL, settings); + $.ajax(url, settings); } else { $('#query-explanation').hide(); } @@ -719,7 +721,7 @@ success: function() { downloadFile(data, dataType, filename); }, error: downloadRDFError }; - $.ajax('/bigdata/sparql?workbench&convert', settings); + $.ajax(RO_URL_PREFIX + 'sparql?workbench&convert', settings); } else { // not RDF export_extensions[dataType][3](filename); @@ -1100,7 +1102,7 @@ success: updateExploreStart, error: updateExploreError }; - $.ajax(NAMESPACE_URL, settings); + $.ajax(RO_URL_PREFIX + 'namespace/' + NAMESPACE + '/sparql', settings); } function updateExploreStart(data) { @@ -1227,7 +1229,7 @@ if(e) { e.preventDefault(); } - $.get('/bigdata/status', function(data) { + $.get(RO_URL_PREFIX + 'status', function(data) { // get data inside a jQuery object data = $('<div>').append(data); getStatusNumbers(data); @@ -1251,7 +1253,7 @@ }); function showQueries(details) { - var url = '/bigdata/status?showQueries'; + var url = RO_URL_PREFIX + 'status?showQueries'; if(details) { url += '=details'; } @@ -1303,7 +1305,7 @@ e.preventDefault(); if(confirm('Cancel query?')) { var id = $(this).data('queryId'); - $.post('/bigdata/status?cancelQuery&queryId=' + id, function() { getStatus(); }); + $.post(RW_URL_PREFIX + 'status?cancelQuery&queryId=' + id, function() { getStatus(); }); $(this).parents('li').remove(); } } @@ -1311,7 +1313,7 @@ function getQueryDetails(e) { e.preventDefault(); var id = $(this).data('queryId'); - $.ajax({url: '/bigdata/status?showQueries=details&queryId=' + id, + $.ajax({url: RO_URL_PREFIX + 'status?showQueries=details&queryId=' + id, success: function(data) { // get data inside a jQuery object data = $('<div>').append(data); @@ -1332,7 +1334,7 @@ /* Performance */ $('#tab-selector a[data-target=performance]').click(function(e) { - $.get('/bigdata/counters', function(data) { + $.get(RO_URL_PREFIX + 'counters', function(data) { $('#performance-tab .box').html(data); }); }); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |