Skip to content

Commit

Permalink
Add allowNoSources to settings to disable sources check
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Feb 15, 2023
1 parent ca4396f commit 60a3e09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"sparql": true,
"graphql": true
},
"allowNoSources": false,
"branding": {
"title": "Query the Web of Linked Data",
"title_href": "https://comunica.dev/",
Expand Down
7 changes: 5 additions & 2 deletions src/ldf-client-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ if (typeof global.process === 'undefined')
if (value.page_title)
$('head title').text(value.page_title);
break;
case 'allowNoSources':
this.$allowNoSources = value;
break;
// Load settings from a JSON resource
case 'settings':
$.getJSON(value, function (settings) {
Expand Down Expand Up @@ -677,8 +680,8 @@ if (typeof global.process === 'undefined')

// Starts query execution
_startExecution: function () {
var datasources = this.$datasources.val();
if (!datasources || !datasources.length)
var datasources = this.$datasources.val() || [];
if (!datasources.length && !this.$allowNoSources)
return alert('Please choose a datasource to execute the query.');

// Hide and clear map
Expand Down

0 comments on commit 60a3e09

Please sign in to comment.