Skip to content

Commit 17f52cc

Browse files
committed
Code clean up
1 parent 6642529 commit 17f52cc

File tree

3 files changed

+1
-36
lines changed

3 files changed

+1
-36
lines changed

cypress/e2e/custom-query-editor.cy.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ SELECT ?name ?sameAs_url WHERE {
211211
cy.get('.column-name').find('span').contains("Antonio Caldara").should('exist');
212212
})
213213

214-
// NOG EEN INDEX FILE TEST
215-
216214
it("Custom Query With Index File", () => {
217215

218216
cy.visit("/#/customQuery");
@@ -250,9 +248,7 @@ ORDER BY ?componentName`
250248
);
251249

252250
// No Comunica Sources Required
253-
254251
cy.get('input[name="sourceIndexCheck"]').click()
255-
256252
cy.get('input[name="indexSourceUrl"]').type("http://localhost:8080/example/index-example-texon-only")
257253

258254
cy.get('textarea[name="indexSourceQuery"]').clear();

src/components/Dashboard/CustomQueryEditor/customEditor.jsx

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import Checkbox from '@mui/material/Checkbox';
1010
import configManager from '../../../configManager/configManager';
1111
import IconProvider from '../../../IconProvider/IconProvider';
1212

13-
//import { QueryEngine } from "@comunica/query-sparql";
14-
//const myEngine = new QueryEngine();
1513

1614
export default function CustomEditor(props) {
1715

@@ -79,9 +77,6 @@ WHERE {
7977
if (props.newQuery) {
8078
navigate({ search: searchParams.toString() });
8179

82-
// TODO: NEED A CHECK HERE TO SEE IF WE MAY SUBMIT (correct query)
83-
// const data = await executeSPARQLQuery(jsonData.query, jsonData.source, setShowError);
84-
8580
configManager.addNewQueryGroup('cstm', 'Custom queries', 'EditNoteIcon');
8681
addQuery(jsonData);
8782
}
@@ -148,16 +143,10 @@ WHERE {
148143
parsedObject.askQuery = JSON.parse(dataWithStrings.askQuery);
149144
}
150145
if (ensureBoolean(dataWithStrings.templatedQueryCheck)) {
151-
//parsedObject.variables = JSON.parse(dataWithStrings.variables);
152146

153-
// hier de logica voor .variables en .querystring voor latere updates
154-
// form name variables gaan hernoemen naar templateOptions
155-
156147
const options = JSON.parse(dataWithStrings.templateOptions);
157148

158149
if (options.variables){
159-
console.log('het werkt')
160-
console.log(options)
161150
parsedObject.variables = options.variables;
162151
}
163152

@@ -454,26 +443,6 @@ WHERE {
454443
)
455444
}
456445

457-
// Temporary bindingstream this is if you want a check on the simple queries before submitting
458-
/*
459-
async function executeSPARQLQuery(query, dataSource, setShowError) {
460-
const resultingObjects = [];
461-
try {
462-
const bindingsStream = await myEngine.queryBindings(query, {
463-
sources: dataSource.split(';').map(source => source.trim())
464-
});
465-
466-
bindingsStream.on('data', (binding) => {
467-
resultingObjects.push(JSON.parse(binding.toString()));
468-
});
469-
} catch (error) {
470-
setShowError(true);
471-
throw new Error(`Error executing SPARQL query: ${error.message}`);
472-
}
473-
return resultingObjects;
474-
};
475-
476-
*/
477446

478447

479448

src/components/Dashboard/CustomQueryEditor/customQueryEditButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function CustomQueryEditButton({ queryID, submitted=false }) {
120120

121121
<DialogContent>
122122
<DialogContentText >
123-
Use this link ro recreate this custom query later.
123+
Use this link to recreate this custom query later.
124124
</DialogContentText>
125125

126126
<DialogContentText style={{ color: feedback.includes('successfully') ? 'green' : 'red' }} >

0 commit comments

Comments
 (0)