From 5de08053f056b6c2e48f93a8e09b80a3db3c0eaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Jun 2020 01:17:21 +0000 Subject: [PATCH 01/12] Bump websocket-extensions from 0.1.3 to 0.1.4 Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index d4c08b3bc..4d1f470ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7184,9 +7184,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } } @@ -7610,9 +7610,9 @@ }, "dependencies": { "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true } } @@ -11352,9 +11352,9 @@ } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==", + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", "dev": true }, "which": { From adfb404cc197cb5aa267587edc6e61c7125dbaa6 Mon Sep 17 00:00:00 2001 From: Sava Date: Wed, 10 Jun 2020 11:06:34 +0300 Subject: [PATCH 02/12] GDB-4626 Fixed typos in home and core-errors screens --- src/js/angular/core/templates/core-errors.html | 4 ++-- src/pages/home.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/angular/core/templates/core-errors.html b/src/js/angular/core/templates/core-errors.html index b2773adb0..c05b1380e 100644 --- a/src/js/angular/core/templates/core-errors.html +++ b/src/js/angular/core/templates/core-errors.html @@ -3,8 +3,8 @@
-
Some functionality is not available because you are not connected to any repository.
-
Some functionality is not available because you have no write permission to repository {{getActiveRepository()}}.
+
Some functionalities are not available because you are not connected to any repository.
+
Some functionalities are not available because you have no write permission to repository {{getActiveRepository()}}.
Click one of the repositories below to connect to it or create a new repository. diff --git a/src/pages/home.html b/src/pages/home.html index 5eb5c0ad1..e0fbae2df 100644 --- a/src/pages/home.html +++ b/src/pages/home.html @@ -152,7 +152,7 @@

GraphDB {{productTypeHuman}} Edition

diff --git a/src/js/angular/resources/plugin.js b/src/js/angular/resources/plugin.js index c47f66e99..9999d8441 100644 --- a/src/js/angular/resources/plugin.js +++ b/src/js/angular/resources/plugin.js @@ -16,13 +16,13 @@ PluginRegistry.add('main.menu', { label: 'Monitor', href: '#', order: 3, - role: 'ROLE_REPO_MANAGER', + role: 'ROLE_MONITORING', icon: 'icon-monitoring' }, { label: 'Resources', href: 'monitor/resources', // Added role requirement here to assert that users cannot see Resources menu item - role: 'ROLE_REPO_MANAGER', + role: 'ROLE_MONITORING', order: 2, parent: 'Monitor' } From af423f7d74fa63d279e2bbfb2de9586d5588188a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 07:12:16 +0000 Subject: [PATCH 07/12] Bump elliptic from 6.5.2 to 6.5.3 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70816deb1..baa35d5a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4090,9 +4090,9 @@ "dev": true }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", From 7e0878fa340460a6035aa2ba37fb6f988419e8b3 Mon Sep 17 00:00:00 2001 From: "teodossi.dossev@ontotext.com" Date: Wed, 5 Aug 2020 15:10:54 +0300 Subject: [PATCH 08/12] GDB-4848 OntoRefine: Provides mapper exit confirmation when there are unsaved changes Provides messaging between OntoRefine iframe and it's parent window Related to GDB-4848 OntoRefine: No save before exit confirmation when there are unsaved changes --- src/js/angular/ontorefine/app.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/js/angular/ontorefine/app.js b/src/js/angular/ontorefine/app.js index 5e8e8552f..c71c54e51 100644 --- a/src/js/angular/ontorefine/app.js +++ b/src/js/angular/ontorefine/app.js @@ -7,6 +7,8 @@ const ontorefine = angular.module('graphdb.framework.ontorefine', ['graphdb.fram ontorefine.controller('OntoRefineCtrl', ['$scope', '$routeParams', '$window', '$location', '$timeout', function ($scope, $routeParams, $window, $location, $timeout) { $scope.refineDisabled = false; + window.addEventListener("message", isProjectPristine); + var isPristine = true; if ($routeParams.project) { $scope.page = 'orefine/project?project=' + $routeParams.project; } else if ($routeParams.page) { @@ -48,4 +50,20 @@ ontorefine.controller('OntoRefineCtrl', ['$scope', '$routeParams', '$window', '$ iframeElement.style.height = 'calc(100vh - 75px)'; } }; + + function isProjectPristine(e) { + isPristine = e.data === 'pristine'; + } + + $scope.$on('$locationChangeStart', (event) => { + if (!isPristine) { + if (!confirm("There are unsaved changes! Are you sure, you want to exit?")) { + event.preventDefault(); + } + } + }); + + $scope.$on("$destroy", function () { + window.removeEventListener('message', isProjectPristine); + }); }]); From 017acd1de922e49f6a6a666e80926cfef591f4db Mon Sep 17 00:00:00 2001 From: "desislava.hristova" Date: Thu, 6 Aug 2020 12:03:12 +0300 Subject: [PATCH 09/12] Prepare release 1.4.0-RC1 and use latest GDB --- package-lock.json | 2 +- package.json | 4 ++-- test-cypress/package-lock.json | 2 +- test-cypress/package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f68ca821..f9ba919cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench", - "version": "1.3.0-RC9", + "version": "1.4.0-RC1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5a1e1e41b..592721c48 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench", - "version": "1.3.0-RC9", + "version": "1.4.0-RC1", "description": "The web application for GraphDB APIs", "scripts": { "build": "webpack --config=webpack.config.prod.js", @@ -34,7 +34,7 @@ "url": "https://github.com/Ontotext-AD/graphdb-workbench/issues" }, "versions": { - "graphdb": "9.2.0-RC5" + "graphdb": "9.4.0-TR17" }, "homepage": "https://github.com/Ontotext-AD/graphdb-workbench#readme", "devDependencies": { diff --git a/test-cypress/package-lock.json b/test-cypress/package-lock.json index 509c5bb17..ade620733 100644 --- a/test-cypress/package-lock.json +++ b/test-cypress/package-lock.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench-tests", - "version": "1.3.0-RC9", + "version": "1.4.0-RC1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/test-cypress/package.json b/test-cypress/package.json index 384547d48..6ecd47fa4 100644 --- a/test-cypress/package.json +++ b/test-cypress/package.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench-tests", - "version": "1.3.0-RC9", + "version": "1.4.0-RC1", "description": "Cypress tests for GraphDB workbench", "scripts": { "start": "cypress open", From 0a1c2c1d5ddd60e953f5f46e0fdf9d7d9fbea13e Mon Sep 17 00:00:00 2001 From: Pavel Mihaylov Date: Fri, 7 Aug 2020 16:20:06 +0300 Subject: [PATCH 10/12] GDB-4773: Add X-Requested-With: XMLHttpRequest to XHR requests so we can detect them on the backend (needed to not advertise Basic as supported auth) --- src/js/angular/core/services/jwt-auth.service.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/angular/core/services/jwt-auth.service.js b/src/js/angular/core/services/jwt-auth.service.js index bfeb70124..47ea44e41 100644 --- a/src/js/angular/core/services/jwt-auth.service.js +++ b/src/js/angular/core/services/jwt-auth.service.js @@ -187,8 +187,13 @@ angular.module('graphdb.framework.core.services.jwtauth', [ this.setAuthHeaders = function () { $http.defaults.headers.common['Authorization'] = this.auth; + // Angular doesn't send this header by default and we need it to detect XHR requests + // so that we don't advertise Basic auth with them. + $http.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; $.ajaxSetup()['headers'] = $.ajaxSetup()['headers'] || {}; $.ajaxSetup()['headers']['Authorization'] = this.auth; + // jQuery seems to send the header by default but it doesn't hurt to be explicit + $.ajaxSetup()['headers']['X-Requested-With'] = 'XMLHttpRequest'; }; this.setAuthHeaders(); From 4af1106cc8637a547efe59ec46a2703dea7fd729 Mon Sep 17 00:00:00 2001 From: Pavel Mihaylov Date: Fri, 7 Aug 2020 17:42:36 +0300 Subject: [PATCH 11/12] GDB-4875: Use the new "node" field in the tracking record to provide detailed information when a master is showing a track record correlated to a worker track record --- src/js/angular/queries/controllers.js | 23 ++++++++++------------ src/pages/monitor/queries.html | 10 ++++++++-- test/queries/controllers.spec.js | 28 ++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/src/js/angular/queries/controllers.js b/src/js/angular/queries/controllers.js index d1afa2249..7c50f1680 100644 --- a/src/js/angular/queries/controllers.js +++ b/src/js/angular/queries/controllers.js @@ -32,21 +32,23 @@ queriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval' const parser = document.createElement('a'); - $scope.parseTrackId = function (trackId) { - if (trackId.indexOf('#') < 0) { - return [trackId, '', $repositories.getActiveRepository()]; + // Parses a node of the kind http://host.example.com:7200/repositories/repo#NN, + // where NN is the track ID into an array [NN, host:7200, repo]. + $scope.parseNode = function (node) { + if (node == null) { + return null; } let shortUrl = 'local'; - if (trackId.indexOf('://localhost:') < 0 && trackId.indexOf('://localhost/') < 0) { - parser.href = trackId; + if (node.indexOf('://localhost:') < 0 && node.indexOf('://localhost/') < 0) { + parser.href = node; let hostname = parser.hostname; if (!containsIPV4(parser.hostname)) { hostname = parser.hostname.split('.')[0]; } shortUrl = hostname + ':' + parser.port; } - const match = trackId.match(/\/repositories\/([^\/]+)#(\d+)/); // eslint-disable-line no-useless-escape + const match = node.match(/\/repositories\/([^\/]+)#(\d+)/); // eslint-disable-line no-useless-escape return [match[2], shortUrl, match[1]]; }; @@ -67,7 +69,7 @@ queriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval' // it doesn't recreate DOM elements for queries that are already displayed. $scope.queries = {}; for (let i = 0; i < newQueries.length; i++) { - newQueries[i].compositeTrackId = $scope.parseTrackId(newQueries[i].trackId); + newQueries[i].parsedNode = $scope.parseNode(newQueries[i].node); $scope.queries[newQueries[i].trackId] = newQueries[i]; } @@ -114,12 +116,7 @@ queriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval' }; $scope.downloadQuery = function (queryId) { - const parsed = $scope.parseTrackId(queryId); - let filename = 'query_' + parsed[0] + '_' + parsed[2]; - if (parsed[1]) { - filename += '_' + parsed[1]; - } - filename += '.rq'; + const filename = 'query_' + queryId + '.rq'; let link = 'rest/monitor/query/download?queryId=' + encodeURIComponent(queryId) + '&repository=' + encodeURIComponent($repositories.getActiveRepository()) + '&filename=' + encodeURIComponent(filename); diff --git a/src/pages/monitor/queries.html b/src/pages/monitor/queries.html index 73ba9b09e..0a2dfc814 100644 --- a/src/pages/monitor/queries.html +++ b/src/pages/monitor/queries.html @@ -51,8 +51,14 @@

- {{query.compositeTrackId[0]}} -
{{query.compositeTrackId[2]}}
{{query.compositeTrackId[1]}}
+ {{query.trackId}} + +
{{ getActiveRepository() }}
+
+
→ {{ query.parsedNode[2] }} #{{ query.parsedNode[0] }}
+
{{ query.parsedNode[1] }}
+
+ {{query.type}} diff --git a/test/queries/controllers.spec.js b/test/queries/controllers.spec.js index e7f51451b..9d616885d 100644 --- a/test/queries/controllers.spec.js +++ b/test/queries/controllers.spec.js @@ -59,6 +59,18 @@ describe('=> QueriesCtrl tests', function () { "isRequestedToStop": false, "msSinceCreated": 6689, "running": true + }, { + "queryString": "SELECT ?s ?p ?o\nWHERE {\n\t?s ?p ?o .\n} LIMIT 123", + "trackId": "1234", + "node": "http://example.com:7300/repositories/repo#678", + "nsTotalSpentInNext": 1234567, + "nsAverageForOneNext": 1234, + "state": "IN_HAS_NEXT", + "nNext": 12345, + "msLifetime": 123, + "isRequestedToStop": false, + "msSinceCreated": 12345678, + "running": true }]); $httpBackend.when('GET', 'rest/security/all').respond(200, { @@ -99,7 +111,7 @@ describe('=> QueriesCtrl tests', function () { "21107": { "queryString": "SELECT ?s ?p ?o\nWHERE {\n\t?s ?p ?o .\n} LIMIT 100567123123123", "trackId": "21107", - "compositeTrackId": ["21107", "", "activeRepository"], + "parsedNode": null, "nsTotalSpentInNext": 6406320151, "nsAverageForOneNext": 5616, "state": "IN_NEXT", @@ -108,6 +120,20 @@ describe('=> QueriesCtrl tests', function () { "isRequestedToStop": false, "msSinceCreated": 6689, "running": true + }, + "1234": { + "queryString": "SELECT ?s ?p ?o\nWHERE {\n\t?s ?p ?o .\n} LIMIT 123", + "trackId": "1234", + "node": "http://example.com:7300/repositories/repo#678", + "parsedNode": ["678", "example:7300", "repo"], + "nsTotalSpentInNext": 1234567, + "nsAverageForOneNext": 1234, + "state": "IN_HAS_NEXT", + "nNext": 12345, + "msLifetime": 123, + "isRequestedToStop": false, + "msSinceCreated": 12345678, + "running": true } }) expect($scope.jolokiaError).toEqual('') From a3ded236fbc67b31fc9b854fa190e6cdb9f1e26c Mon Sep 17 00:00:00 2001 From: "desislava.hristova" Date: Tue, 11 Aug 2020 13:00:58 +0300 Subject: [PATCH 12/12] Prepare 1.4.0-TR2 --- package-lock.json | 2 +- package.json | 2 +- test-cypress/package-lock.json | 2 +- test-cypress/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index f9ba919cd..f2f9f67e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench", - "version": "1.4.0-RC1", + "version": "1.4.0-TR2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 592721c48..2bde54f5a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench", - "version": "1.4.0-RC1", + "version": "1.4.0-TR2", "description": "The web application for GraphDB APIs", "scripts": { "build": "webpack --config=webpack.config.prod.js", diff --git a/test-cypress/package-lock.json b/test-cypress/package-lock.json index ade620733..9efd1e14b 100644 --- a/test-cypress/package-lock.json +++ b/test-cypress/package-lock.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench-tests", - "version": "1.4.0-RC1", + "version": "1.4.0-TR2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/test-cypress/package.json b/test-cypress/package.json index 6ecd47fa4..b7b2bdb5a 100644 --- a/test-cypress/package.json +++ b/test-cypress/package.json @@ -1,6 +1,6 @@ { "name": "graphdb-workbench-tests", - "version": "1.4.0-RC1", + "version": "1.4.0-TR2", "description": "Cypress tests for GraphDB workbench", "scripts": { "start": "cypress open",