graphdb-workbench 2.1.0 → 2.1.1-TR1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{10.018ca946a702a519142b.bundle.js → 10.5c9aa6773dd62b4ed854.bundle.js} +2 -2
- package/dist/10.5c9aa6773dd62b4ed854.bundle.js.map +1 -0
- package/dist/{11.52641542d9a31c527b7c.bundle.js → 11.8983e1d1c930328e9b0d.bundle.js} +2 -2
- package/dist/11.8983e1d1c930328e9b0d.bundle.js.map +1 -0
- package/dist/135.c1de0deb98c8a45a4b21.bundle.js +1 -1
- package/dist/135.c1de0deb98c8a45a4b21.bundle.js.map +1 -1
- package/dist/{15.510970e84b3d1a7768c2.bundle.js → 15.9ce4fa5c14638d63736a.bundle.js} +2 -2
- package/dist/{15.510970e84b3d1a7768c2.bundle.js.map → 15.9ce4fa5c14638d63736a.bundle.js.map} +1 -1
- package/dist/162.7c19d57c3792c9ca08d0.bundle.js +2 -0
- package/dist/162.7c19d57c3792c9ca08d0.bundle.js.map +1 -0
- package/dist/18.201bf87e7629b325646c.bundle.js +1 -1
- package/dist/18.201bf87e7629b325646c.bundle.js.map +1 -1
- package/dist/25.42f3d944b5ec15e01ceb.bundle.js +2 -0
- package/dist/25.42f3d944b5ec15e01ceb.bundle.js.map +1 -0
- package/dist/30.4b987e71408e0643680a.bundle.js +1 -1
- package/dist/30.4b987e71408e0643680a.bundle.js.map +1 -1
- package/dist/31.5af5b75cd1ac5d00370e.bundle.js +1 -1
- package/dist/31.5af5b75cd1ac5d00370e.bundle.js.map +1 -1
- package/dist/36.618ccd9d5a8d4d11cb47.bundle.js +2 -0
- package/dist/36.618ccd9d5a8d4d11cb47.bundle.js.map +1 -0
- package/dist/39.88a2db4f9ab5946bf2cd.bundle.js +2 -0
- package/dist/39.88a2db4f9ab5946bf2cd.bundle.js.map +1 -0
- package/dist/55.5b44653775bb1592cb26.bundle.js +2 -0
- package/dist/55.5b44653775bb1592cb26.bundle.js.map +1 -0
- package/dist/83.73515cde0a2215275d32.bundle.js +1 -1
- package/dist/83.73515cde0a2215275d32.bundle.js.map +1 -1
- package/dist/93.d4fb5fe720a8d95b2b37.bundle.js +2 -0
- package/dist/93.d4fb5fe720a8d95b2b37.bundle.js.map +1 -0
- package/dist/{bundle.2b813785fc0b4f08d48c.bundle.js → bundle.27c16e3bcd73054a2763.bundle.js} +3 -3
- package/dist/bundle.27c16e3bcd73054a2763.bundle.js.map +1 -0
- package/dist/index.html +3 -3
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/security/templates/user.html +4 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/queries.html +2 -3
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +2 -2
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +27 -27
- package/package.json +1 -1
- package/dist/10.018ca946a702a519142b.bundle.js.map +0 -1
- package/dist/11.52641542d9a31c527b7c.bundle.js.map +0 -1
- package/dist/162.611f7dba5a7f2ab9fa7b.bundle.js +0 -2
- package/dist/162.611f7dba5a7f2ab9fa7b.bundle.js.map +0 -1
- package/dist/25.9c19fb9c35fcd792dff5.bundle.js +0 -2
- package/dist/25.9c19fb9c35fcd792dff5.bundle.js.map +0 -1
- package/dist/36.991eae8184e7b5fa5cbf.bundle.js +0 -2
- package/dist/36.991eae8184e7b5fa5cbf.bundle.js.map +0 -1
- package/dist/39.3f07a4be36e81e42c86e.bundle.js +0 -2
- package/dist/39.3f07a4be36e81e42c86e.bundle.js.map +0 -1
- package/dist/55.975653547fd9764a2a71.bundle.js +0 -2
- package/dist/55.975653547fd9764a2a71.bundle.js.map +0 -1
- package/dist/93.5f0ae85fb24657fd13c5.bundle.js +0 -2
- package/dist/93.5f0ae85fb24657fd13c5.bundle.js.map +0 -1
- package/dist/bundle.2b813785fc0b4f08d48c.bundle.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/graphexplore/controllers/graphs-config.controller.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","GraphConfigCtrl","$scope","$timeout","$location","$repositories","$modal","ModalService","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","selectedFixedNodeChanged","page","totalPages","helpHidden","get","HIDE_GRAPH_CONFIG_HELP","toggleHelp","value","undefined","set","fixedVisualCallback","uri","label","newConfig","startIRI","startIRILabel","isDefaultGraph","sample","name","isUserGraph","getSampleName","property","extra","id","configName","showInvalidMsg","warning","getQueryForCurrentPage","config","query","startMode","startGraphQuery","expandQuery","resourceQuery","predicateLabelQuery","resourcePropertiesQuery","isDefined","initForConfig","checkAutocompleteStatus","getAutocompletePromise","getGraphConfigSamples","data","samples","_","filter","s","revertConfig","error","getError","createGraphConfig","async","url","updateGraphConfig","$on","getNamespacesPromise","getNamespaces","getActiveRepository","validateQueryWithCallback","successCallback","queryType","params","all","oneOf","validateQuery","broadcastAddStartFixedNodeEvent","checkPageAndMode","$broadcast","validateCurrentPage","updateModel","goToPage","nextPage","showEditor","notoolbar","goToPreviousPage","goToNextPage","saveGraphConfig","startQueryIncludeInferred","currentQuery","inference","startQuerySameAs","sameAs","isUpdate","window","editor","getValue","trim","setQuery","setValue","updateDirty","q1","q2","queryEditorIsDirty","updateEditor","isActiveRepoOntopType","nocount","loadTab","selectTab","xhr","abort","viewMode","showPreview","outputType","runQuery","revertEditor","$watch","shared","encodeQuery","encodeURIComponent","getConfig","defaultTabConfig","resetCurrentTabConfig","currentTabConfig","pageSize","allResultsCount","resultsCount","queryExists","tabsData","tabs","saveTab","idx","i","length","findTabIndexByID","tab","saveQueryToLocal","addNewTab","callback","tabName","savedQuery","changePagination","explainRequested","toggleSampleQueries","addKnownPrefixes","getExistingTabId","querySelected","tabId","body","setLoader","getLoaderMessage","timeSeconds","Date","now","queryStartTime","timeHuman","getHumanReadableSeconds","progressMessage","extraMessage","fixSizesOnHorizontalViewModeSwitch","changeViewMode","tabID","orientationViewMode","$","remove","showHideEditor","focusQueryEditor","element","document","find","is","focus","currentQueryTab","isRunning","yasrInnerContainer","getElementById","queryIsRunning","countTimeouted","addClass","removeClass","$$phase","$apply","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","verticalView","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","cancel","yasr","container","resize","changePage","explain","executedQueryTab","getQueryType","getQueryMode","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","JSON","stringify","msg","existingTabId","item","on","$watchCollection","offset","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","tabEvent","relatedTarget","target","copy","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","controller"],"mappings":"+EAMA,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SAAU,eAAgB,oBAAqB,UAAW,yBAA0B,0BAA2B,eAAgB,gBAAiB,+BAAgC,sBAAuB,SAAU","file":"36.991eae8184e7b5fa5cbf.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.graphexplore.controllers.graphviz.config', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('GraphConfigCtrl', GraphConfigCtrl);\n\nGraphConfigCtrl.$inject = ['$scope', '$timeout', '$location', 'toastr', '$repositories', '$modal', 'ModalService', 'SparqlRestService', '$filter', 'GraphConfigRestService', 'AutocompleteRestService', '$routeParams', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction GraphConfigCtrl($scope, $timeout, $location, toastr, $repositories, $modal, ModalService, SparqlRestService, $filter, GraphConfigRestService, AutocompleteRestService, $routeParams, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n $scope.page = 1;\n $scope.totalPages = 5;\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP) === 1;\n\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n var selectedFixedNodeChanged;\n $scope.fixedVisualCallback = function (uri, label) {\n $scope.newConfig.startIRI = uri;\n $scope.newConfig.startIRILabel = label;\n selectedFixedNodeChanged = true;\n };\n\n $scope.isDefaultGraph = function (sample) {\n return (sample.name === 'Minimal' || sample.name === 'Advanced');\n };\n\n $scope.isUserGraph = function (sample) {\n return !$scope.isDefaultGraph(sample);\n };\n\n $scope.getSampleName = function (sample, property) {\n const extra = sample[property + 'Description'];\n if (extra) {\n // Sample has description, use it\n return extra;\n } else {\n // Sample is a copy of existing config, prepend Copy of to name\n return sample.id ? 'Copy of ' + sample.name : sample.name;\n }\n };\n\n const getGraphConfigSamples = function () {\n GraphConfigRestService.getGraphConfigSamples()\n .success(function (data) {\n $scope.samples = _.filter(data, function (s) {\n // Skip the currently edited config from samples and store it into a revert variable\n if (!s.id || $scope.newConfig.id !== s.id) {\n return true;\n } else {\n $scope.revertConfig = s;\n return false;\n }\n });\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.graph.configs'));\n });\n };\n\n const configName = $routeParams.configName;\n $scope.newConfig = {startQueryIncludeInferred: true, startQuerySameAs: true};\n $scope.newConfig.startMode = 'search';\n $scope.isUpdate = false;\n $scope.shared = false;\n\n $scope.encodeQuery = function (query) {\n return encodeURIComponent(query);\n };\n\n function showInvalidMsg(message) {\n toastr.warning(message);\n }\n\n if (configName) {\n $scope.isUpdate = true;\n GraphConfigRestService.getConfig(configName)\n .success(function (data) {\n $scope.newConfig = data;\n initForConfig();\n })\n .error(function (data) {\n toastr.error(getError(data), $translate.instant('created.connector', {name: configName}));\n });\n } else {\n $scope.isUpdate = false;\n initForConfig();\n }\n\n function getQueryForCurrentPage(config) {\n let query;\n\n if (config.startMode === 'query' && $scope.page === 1) {\n query = config.startGraphQuery;\n } else if ($scope.page === 2) {\n query = config.expandQuery;\n } else if ($scope.page === 3) {\n query = config.resourceQuery;\n } else if ($scope.page === 4) {\n query = config.predicateLabelQuery;\n } else if ($scope.page === 5) {\n query = config.resourcePropertiesQuery;\n }\n\n return angular.isDefined(query) ? query : '';\n }\n\n function initForConfig() {\n getGraphConfigSamples();\n $scope.createGraphConfig = function () {\n GraphConfigRestService.createGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('graphexplore.saved.new.config');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.could.not.create'));\n });\n };\n\n $scope.updateGraphConfig = function () {\n GraphConfigRestService.updateGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('graphexplore.saved.config');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.could.not.save'));\n });\n };\n\n function checkAutocompleteStatus() {\n $scope.getAutocompletePromise = AutocompleteRestService.checkAutocompleteStatus();\n }\n\n $scope.$on('autocompleteStatus', function() {\n checkAutocompleteStatus();\n });\n\n checkAutocompleteStatus();\n $scope.getNamespacesPromise = RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository());\n\n const validateQueryWithCallback = function (successCallback, query, queryType, params, all, oneOf) {\n if (!query) {\n successCallback();\n } else {\n GraphConfigRestService.validateQuery(query, queryType, params, all, oneOf)\n .success(function () {\n successCallback();\n }).error(function (data) {\n showInvalidMsg(getError(data));\n });\n }\n };\n\n $scope.validateCurrentPage = function (successCallback) {\n $scope.updateModel();\n\n if ($scope.page === 1) {\n if ($scope.newConfig.startMode === 'node' && !$scope.newConfig.startIRI) {\n showInvalidMsg($translate.instant('graphexplore.select.start.node'));\n } else if ($scope.newConfig.startMode === 'query' && !$scope.newConfig.startGraphQuery) {\n showInvalidMsg($translate.instant('graphexplore.provide.query'));\n } else if ($scope.newConfig.startMode === 'query') {\n validateQueryWithCallback(successCallback, $scope.newConfig.startGraphQuery, 'graph')\n } else {\n successCallback();\n }\n } else if ($scope.page === 2) {\n validateQueryWithCallback(successCallback, $scope.newConfig.expandQuery, 'construct', ['node'])\n } else if ($scope.page === 3) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourceQuery, 'tuple', ['node'], [], ['type', 'label', 'comment', 'rank']);\n } else if ($scope.page === 4) {\n validateQueryWithCallback(successCallback, $scope.newConfig.predicateLabelQuery, 'tuple', ['edge'], ['label']);\n } else if ($scope.page === 5) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourcePropertiesQuery, 'tuple', ['node'], ['property', 'value']);\n }\n };\n\n $scope.goToPage = function (nextPage) {\n if ($scope.page === nextPage) {\n // already there\n return;\n }\n\n $scope.validateCurrentPage(function () {\n $scope.showEditor();\n $scope.page = nextPage;\n $scope.notoolbar = $scope.page !== 1;\n });\n };\n\n $scope.goToPreviousPage = function () {\n if ($scope.page > 1) {\n $scope.goToPage($scope.page - 1);\n }\n\n if (checkPageAndMode()) {\n selectedFixedNodeChanged = false;\n }\n };\n\n $scope.goToNextPage = function () {\n broadcastAddStartFixedNodeEvent();\n if (selectedFixedNodeChanged) {\n $scope.goToPage($scope.page + 1);\n }\n };\n\n function broadcastAddStartFixedNodeEvent() {\n if (checkPageAndMode()) {\n $scope.$broadcast('addStartFixedNodeAutomatically', {startIRI: $scope.newConfig.startIRI});\n }\n }\n\n function checkPageAndMode() {\n return $scope.page === 1 && $scope.newConfig.startMode === 'node';\n }\n\n $scope.saveGraphConfig = function () {\n broadcastAddStartFixedNodeEvent();\n\n if (checkPageAndMode() && !selectedFixedNodeChanged) {\n return;\n }\n\n $scope.newConfig.startQueryIncludeInferred = $scope.currentQuery.inference;\n $scope.newConfig.startQuerySameAs = $scope.currentQuery.sameAs;\n\n $scope.validateCurrentPage(function () {\n if (!$scope.newConfig.name) {\n showInvalidMsg($translate.instant('graphexplore.provide.config.name'));\n return;\n }\n $scope.isUpdate ? $scope.updateGraphConfig($scope.newConfig) : $scope.createGraphConfig($scope.newConfig);\n });\n };\n\n $scope.updateModel = function () {\n const query = window.editor.getValue().trim();\n if ($scope.newConfig.startMode === 'query' && $scope.page === 1) {\n $scope.newConfig.startGraphQuery = query;\n } else if ($scope.page === 2) {\n $scope.newConfig.expandQuery = query;\n } else if ($scope.page === 3) {\n $scope.newConfig.resourceQuery = query;\n } else if ($scope.page === 4) {\n $scope.newConfig.predicateLabelQuery = query;\n } else if ($scope.page === 5) {\n $scope.newConfig.resourcePropertiesQuery = query;\n }\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n $scope.updateDirty = function () {\n if ($scope.revertConfig) {\n const q1 = getQueryForCurrentPage($scope.revertConfig);\n const q2 = window.editor.getValue().trim();\n $scope.queryEditorIsDirty = q1 !== q2;\n }\n };\n\n // Updates the position of the query editor to match the current div placeholder\n // and sets the editor's query to the relevant query from the model.\n $scope.updateEditor = function () {\n $timeout(function () {\n $scope.currentQuery.query = getQueryForCurrentPage($scope.newConfig);\n // // Check for ontop repository and override nocount property (it's default value is false)\n if ($repositories.isActiveRepoOntopType()) {\n $scope.nocount = true;\n }\n $scope.currentQuery.inference = $scope.newConfig.startQueryIncludeInferred;\n $scope.currentQuery.sameAs = $scope.newConfig.startQuerySameAs;\n loadTab($scope.currentQuery.id);\n selectTab($scope.currentQuery.id);\n }, 100);\n\n };\n\n $scope.showEditor = function () {\n if (window.editor && window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.revertEditor = function () {\n $scope.setQuery(getQueryForCurrentPage($scope.revertConfig));\n };\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('newConfig.startMode', function (value) {\n if (value === 'query') {\n $timeout(function () {\n $scope.updateEditor();\n }, 0);\n }\n });\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('page', function (value) {\n if ($scope.newConfig.startMode === 'query' || value > 1) {\n $timeout(function () {\n $scope.showEditor();\n $scope.updateEditor();\n }, 0);\n }\n });\n }\n\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n // But Why? Can't we reuse it instead of borrow?\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: $scope.newConfig.startQueryIncludeInferred,\n sameAs: $scope.newConfig.startQuerySameAs\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n let backendRepositoryID = $scope.getActiveRepository();\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const codemirrorWrapperSelector = '.CodeMirror-wrap';\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector(codemirrorWrapperSelector)) {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView)\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector(codemirrorWrapperSelector).style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab(tabID);\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function deleteCachedSparqlResults() {\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (explain && !(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning($translate.instant('query.editor.warning.msg'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch()\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n let msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n let maxID = 1;\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab(id) {\n $scope.tabsData = [$scope.currentQuery];\n\n let tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query == null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query);\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove padding of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n }\n\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[39,93],{133:function(e,n,o){"use strict";o.r(n);o(4),o(11),o(85);angular.module("graphdb.framework.jmx.queries",["toastr","ui.bootstrap","graphdb.framework.jmx.queries.controllers","graphdb.framework.core.directives"])},85:function(e,n,o){"use strict";o.r(n);o(4),o(14);const t=angular.module("graphdb.framework.jmx.queries.controllers",["ui.bootstrap","toastr","graphdb.framework.rest.monitoring.service"]);t.controller("QueriesCtrl",["$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate",function(e,n,o,t,r,i,s,c,a){e.loader=!0,e.stringLimit=500,e.expanded={},e.error="";const u=document.createElement("a");e.parseNode=function(e){if(null==e)return null;let n="local";if(e.indexOf("://localhost:")<0&&e.indexOf("://localhost/")<0){u.href=e;let o=u.hostname;(function(e){const n=e.split(".");for(let e=0,o=0;e<n.length;e++)if(parseInt(n[e],10)>=0&&parseInt(n[e],10)<=255?o++:o=0,4===o)return!0;return!1})(u.hostname)||(o=u.hostname.split(".")[0]),n=o+":"+u.port}const o=e.match(/\/repositories\/([^\/]+)#(\d+)/);return[o[2],n,o[1]]},e.getQueries=function(){e.getQueriesRunning||e.paused||e.error||!r.getActiveRepository()||(e.getQueriesRunning=!0,c.monitorQuery().success((function(n){const o=n;e.noQueries=0===o.length,e.queries={};for(let n=0;n<o.length;n++)o[n].parsedNode=e.parseNode(o[n].node),e.queries[o[n].trackId]=o[n];e.noActiveRepository=!1,e.loader=!1,e.getQueriesRunning=!1})).error((function(n){e.error=getError(n),e.loader=!1,e.getQueriesRunning=!1})))};const l=t((function(){r.isActiveRepoOntopType()||e.getQueries()}),1e3);e.$on("$destroy",(function(){t.cancel(l)})),e.deleteQueryHttp=function(n){e.loader=!0,c.deleteQuery(n).success((function(){o.success(a.instant("abort.request.sent.msg")),e.loader=!1})).error((function(n){const t=getError(n);o.error(t,a.instant("common.error")),e.loader=!1}))},e.abortQuery=function(n){s.openSimpleModal({title:a.instant("confirm.abort"),message:a.instant("confirm.abort.warning.msg"),warning:!0}).result.then((function(){e.deleteQueryHttp(n)}))},e.downloadQuery=function(e){const n="query_"+e+".rq";let o="rest/monitor/query/download?queryId="+encodeURIComponent(e)+"&repository="+encodeURIComponent(r.getActiveRepository())+"&filename="+encodeURIComponent(n);i.isAuthenticated()&&(o=o+"&authToken="+encodeURIComponent(i.getAuthToken())),window.open(o,"_blank")},e.toggleQueryExpanded=function(n){e.expanded[n]=!e.expanded[n]}}]),t.controller("DeleteQueryCtrl",["$scope","$modalInstance",function(e,n){e.ok=function(){n.close()},e.cancel=function(){n.dismiss("cancel")}}])}}]);
|
|
2
|
-
//# sourceMappingURL=39.3f07a4be36e81e42c86e.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/queries/app.js","webpack:///./src/js/angular/queries/controllers.js"],"names":["angular","module","queriesCtrl","controller","$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate","loader","stringLimit","expanded","error","parser","document","createElement","parseNode","node","shortUrl","indexOf","href","hostname","ip","blocks","split","i","sequence","length","parseInt","containsIPV4","port","match","getQueries","getQueriesRunning","paused","getActiveRepository","monitorQuery","success","data","newQueries","noQueries","queries","parsedNode","trackId","noActiveRepository","getError","timer","isActiveRepoOntopType","$on","cancel","deleteQueryHttp","queryId","deleteQuery","instant","msg","abortQuery","openSimpleModal","title","message","warning","result","then","downloadQuery","filename","link","encodeURIComponent","isAuthenticated","getAuthToken","window","open","toggleQueryExpanded","$modalInstance","ok","close","dismiss"],"mappings":"8FAAA,wBAWAA,QAAQC,OAAO,gCAPC,CACZ,SACA,eACA,4CACA,uC,gCCRJ,kBAGA,MAAMC,EAAcF,QAAQC,OAAO,4CAA6C,CAC5E,eACA,SACA,8CAGJC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AUC,EAAQuE,GAErFvE,EAAOwE,GAAK,WACRD,EAAeE,SAGnBzE,EAAOiD,OAAS,WACZsB,EAAeG,QAAQ","file":"39.3f07a4be36e81e42c86e.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/queries/controllers';\n\nconst modules = [\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.jmx.queries.controllers',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.jmx.queries', modules);\n","import 'angular/core/services';\nimport 'angular/rest/monitoring.rest.service';\n\nconst queriesCtrl = angular.module('graphdb.framework.jmx.queries.controllers', [\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.rest.monitoring.service'\n]);\n\nqueriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval', '$repositories', '$jwtAuth', 'ModalService', 'MonitoringRestService', '$translate',\n function ($scope, $modal, toastr, $interval, $repositories, $jwtAuth, ModalService, MonitoringRestService, $translate) {\n\n $scope.loader = true;\n $scope.stringLimit = 500;\n $scope.expanded = {};\n $scope.error = '';\n\n function containsIPV4(ip) {\n const blocks = ip.split('.');\n for (let i = 0, sequence = 0; i < blocks.length; i++) {\n if (parseInt(blocks[i], 10) >= 0 && parseInt(blocks[i], 10) <= 255) {\n sequence++;\n } else {\n sequence = 0;\n }\n if (sequence === 4) {\n return true;\n }\n }\n return false;\n }\n\n const parser = document.createElement('a');\n\n // Parses a node of the kind http://host.example.com:7200/repositories/repo#NN,\n // where NN is the track ID into an array [NN, host:7200, repo].\n $scope.parseNode = function (node) {\n if (node == null) {\n return null;\n }\n\n let shortUrl = 'local';\n if (node.indexOf('://localhost:') < 0 && node.indexOf('://localhost/') < 0) {\n parser.href = node;\n let hostname = parser.hostname;\n if (!containsIPV4(parser.hostname)) {\n hostname = parser.hostname.split('.')[0];\n }\n shortUrl = hostname + ':' + parser.port;\n }\n const match = node.match(/\\/repositories\\/([^\\/]+)#(\\d+)/); // eslint-disable-line no-useless-escape\n\n return [match[2], shortUrl, match[1]];\n };\n\n $scope.getQueries = function () {\n // Skip execution if already getting from previous call, if paused, if jolokia returned an error,\n // or if no repository is available\n if ($scope.getQueriesRunning || $scope.paused || $scope.error || !$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.getQueriesRunning = true;\n MonitoringRestService.monitorQuery().success(function (data) {\n const newQueries = data;\n $scope.noQueries = newQueries.length === 0;\n\n // Converts array to object. Angular seems to handle updates on objects better, i.e.\n // it doesn't recreate DOM elements for queries that are already displayed.\n $scope.queries = {};\n for (let i = 0; i < newQueries.length; i++) {\n newQueries[i].parsedNode = $scope.parseNode(newQueries[i].node);\n $scope.queries[newQueries[i].trackId] = newQueries[i];\n }\n\n $scope.noActiveRepository = false;\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n }).error(function (data) {\n $scope.error = getError(data);\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n });\n };\n\n const timer = $interval(function () {\n // Don't call getQueries for Ontop type repository\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n $scope.getQueries();\n }, 1000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n\n $scope.deleteQueryHttp = function (queryId) {\n\n $scope.loader = true;\n MonitoringRestService.deleteQuery(queryId).success(function () {\n toastr.success($translate.instant('abort.request.sent.msg'));\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n\n $scope.loader = false;\n });\n };\n\n $scope.abortQuery = function (queryId) {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.abort'),\n message: $translate.instant('confirm.abort.warning.msg'),\n warning: true\n }).result.then(function () {\n $scope.deleteQueryHttp(queryId);\n });\n };\n\n $scope.downloadQuery = function (queryId) {\n const filename = 'query_' + queryId + '.rq';\n let link = 'rest/monitor/query/download?queryId=' + encodeURIComponent(queryId)\n + '&repository=' + encodeURIComponent($repositories.getActiveRepository())\n + '&filename=' + encodeURIComponent(filename);\n if ($jwtAuth.isAuthenticated()) {\n link = link + '&authToken=' + encodeURIComponent($jwtAuth.getAuthToken());\n }\n\n window.open(link, '_blank');\n };\n\n $scope.toggleQueryExpanded = function (queryId) {\n $scope.expanded[queryId] = !$scope.expanded[queryId];\n };\n }]);\n\n\nqueriesCtrl.controller('DeleteQueryCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n $modalInstance.close();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[55],{57:function(e,t){function a(){return{transformToTrig:function(e){let t="";const a={};for(let t=0;t<e.length;t++){const l=e[t];if(void 0===l.context?l.context="":l.context=_.trim(l.context),angular.isUndefined(a[l.context])){const e=[];e.push(l),a[l.context]=e}else a[l.context].push(l)}const l=Object.keys(a);for(let e=0;e<l.length;e++){const n=l[e];t+=""===n?"\n{":"\n<"+n+"> {";const w=a[n];for(let e=0;e<w.length;e++){const a=w[e];t+="\n\t<"+a.subject+"> <"+a.predicate+"> ","uri"===a.object.type?t+="<"+a.object.value+"> .":t+='"'+a.object.value+'"'+(a.object.datatype?"^^<"+a.object.datatype+">":a.object.lang?"@"+a.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const a=[];if(!_.isEmpty(e.data)){const l=e.data[t],n=Object.keys(l);for(let e=0;e<n.length;e++){const w=n[e],o=l[w];for(let e=0;e<o.length;e++){const l=o[e];for(let e=0;e<l.graphs.length;e++){let n=l.graphs[e];"http://www.ontotext.com/explicit"===n&&(n=""),l.lang&&(l.datatype=""),l.datatype||(l.datatype=""),a.push({subject:t,predicate:w,object:{value:l.value,type:l.type,datatype:l.datatype,lang:l.lang},context:n})}}}}return a},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",a),a.$inject=[]}}]);
|
|
2
|
-
//# sourceMappingURL=55.975653547fd9764a2a71.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/explore/statements.service.js"],"names":["StatementsService","transformToTrig","statements","data","contexts","i","length","statement","undefined","context","_","trim","angular","isUndefined","cstatement","push","ckeys","Object","keys","key","value","j","subject","predicate","object","type","datatype","lang","buildStatements","res","uri","isEmpty","graph","predicates","objects","k","graphs","getDatatypeOptions","label","module","factory","$inject"],"mappings":"2EAMA,SAASA,IAoLL,MAAO,CACHC,gBApLJ,SAAyBC,GACrB,IAAIC,EAAO,GACX,MAAMC,EAAW,GAEjB,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAWI,OAAQD,IAAK,CACxC,MAAME,EAAYL,EAAWG,GAM7B,QAL0BG,IAAtBD,EAAUE,QACVF,EAAUE,QAAU,GAEpBF,EAAUE,QAAUC,EAAEC,KAAKJ,EAAUE,SAErCG,QAAQC,YAAYT,EAASG,EAAUE,UAAW,CAClD,MAAMK,EAAa,GACnBA,EAAWC,KAAKR,GAChBH,EAASG,EAAUE,SAAWK,OAE9BV,EAASG,EAAUE,SAASM,KAAKR,GAIzC,MAAMS,EAAQC,OAAOC,KAAKd,GAC1B,IAAK,IAAIC,EAAI,EAAGA,EAAIW,EAAMV,OAAQD,IAAK,CACnC,MAAMc,EAAMH,EAAMX,GAEdF,GADQ,KAARgB,EACQ,MAEA,MAAQA,EAAM,MAG1B,MAAMC,EAAQhB,EAASe,GACvB,IAAK,IAAIE,EAAI,EAAGA,EAAID,EAAMd,OAAQe,IAAK,CACnC,MAAMd,EAAYa,EAAMC,GACxBlB,GAAQ,QAAUI,EAAUe,QAAU,MAAQf,EAAUgB,UAAY,KACtC,QAA1BhB,EAAUiB,OAAOC,KACjBtB,GAAQ,IAAMI,EAAUiB,OAAOJ,MAAQ,MAEvCjB,GAAQ,IAAMI,EAAUiB,OAAOJ,MAAQ,KAAOb,EAAUiB,OAAOE,SAAW,MAAQnB,EAAUiB,OAAOE,SAA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O,SACR,CACClB,MAAO,uCACPkB,MAAO,OACR,CACClB,MAAO,wCACPkB,MAAO,QACR,CACClB,MAAO,gDACPkB,MAAO,iBACR,CACClB,MAAO,iDACPkB,MAAO,kBACR,CACClB,MAAO,+CACPkB,MAAO,gBACR,CACClB,MAAO,gDACPkB,MAAO,iBACR,CACClB,MAAO,mDACPkB,MAAO,oBACR,CACClB,MAAO,sDACPkB,MAAO,wBACR,CACClB,MAAO,mDACPkB,MAAO,oBACR,CACClB,MAAO,sDACPkB,MAAO,wBACR,CACClB,MAAO,yCACPkB,MAAO,SACR,CACClB,MAAO,0CACPkB,MAAO,UACR,CACClB,MAAO,wCACPkB,MAAO,QACR,CACClB,MAAO,8CACPkB,MAAO,cACR,CACClB,MAAO,6CACPkB,MAAO,aACR,CACClB,MAAO,4CACPkB,MAAO,YACR,CACClB,MAAO,6CACPkB,MAAO,cACR,CACClB,MAAO,gDACPkB,MAAO,oBArLvB1B,QACK2B,OAAO,qCAAsC,IAC7CC,QAAQ,oBAAqBxC,GAElCA,EAAkByC,QAAU","file":"55.975653547fd9764a2a71.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.explore.services', [])\n .factory('StatementsService', StatementsService);\n\nStatementsService.$inject = [];\n\nfunction StatementsService() {\n function transformToTrig(statements) {\n let data = '';\n const contexts = {};\n\n for (let i = 0; i < statements.length; i++) {\n const statement = statements[i];\n if (statement.context === undefined) {\n statement.context = '';\n } else {\n statement.context = _.trim(statement.context);\n }\n if (angular.isUndefined(contexts[statement.context])) {\n const cstatement = [];\n cstatement.push(statement);\n contexts[statement.context] = cstatement;\n } else {\n contexts[statement.context].push(statement);\n }\n }\n\n const ckeys = Object.keys(contexts);\n for (let i = 0; i < ckeys.length; i++) {\n const key = ckeys[i];\n if (key === '') {\n data += '\\n{';\n } else {\n data += '\\n<' + key + '> {';\n }\n\n const value = contexts[key];\n for (let j = 0; j < value.length; j++) {\n const statement = value[j];\n data += '\\n\\t<' + statement.subject + '> <' + statement.predicate + '> ';\n if (statement.object.type === 'uri') {\n data += '<' + statement.object.value + '> .';\n } else {\n data += '\"' + statement.object.value + '\"' + (statement.object.datatype ? '^^<' + statement.object.datatype + '>' : (statement.object.lang ? '@' + statement.object.lang : '')) + ' .';\n }\n }\n\n data += '\\n}';\n }\n\n return data;\n }\n\n function buildStatements(res, uri) {\n const statements = [];\n if (!_.isEmpty(res.data)) {\n const graph = res.data[uri];\n const predicates = Object.keys(graph);\n for (let i = 0; i < predicates.length; i++) {\n const predicate = predicates[i];\n const objects = graph[predicate];\n for (let j = 0; j < objects.length; j++) {\n const object = objects[j];\n for (let k = 0; k < object.graphs.length; k++) {\n let context = object.graphs[k];\n if (context === 'http://www.ontotext.com/explicit') {\n // Statements in the default context are special\n context = '';\n }\n if (object.lang) {\n object.datatype = '';\n }\n if (!object.datatype) {\n object.datatype = '';\n }\n statements.push({\n subject: uri,\n predicate: predicate,\n object: {\n value: object.value,\n type: object.type,\n datatype: object.datatype,\n lang: object.lang\n },\n context: context\n });\n }\n }\n }\n }\n return statements;\n }\n\n function getDatatypeOptions() {\n return [\n {\n value: '',\n label: 'string'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#boolean',\n label: 'boolean'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#decimal',\n label: 'decimal'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#integer',\n label: 'integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#double',\n label: 'double'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#float',\n label: 'float'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#date',\n label: 'date'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#time',\n label: 'time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#dateTime',\n label: 'date time'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#byte',\n label: 'byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#short',\n label: 'short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#int',\n label: 'int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#long',\n label: 'long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedByte',\n label: 'unsigned byte'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedShort',\n label: 'unsigned short'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedInt',\n label: 'unsigned int'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#unsignedLong',\n label: 'unsigned long'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#positoveInteger',\n label: 'positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',\n label: 'non-negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#negativeInteger',\n label: 'negative integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',\n label: 'non-positive integer'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYear',\n label: 'gYear'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonth',\n label: 'gMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gDay',\n label: 'gDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gYearMonth',\n label: 'gYearMonth'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#gMonthDay',\n label: 'gMonthDay'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#duration',\n label: 'duration'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#hexBinary',\n label: 'hex binary'\n }, {\n value: 'http://www.w3.org/2001/XMLSchema#base64Binary',\n label: 'base64 binary'\n }\n ];\n }\n\n return {\n transformToTrig: transformToTrig,\n buildStatements: buildStatements,\n getDatatypeOptions: getDatatypeOptions\n };\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[93],{85:function(e,n,t){"use strict";t.r(n);t(4),t(14);const o=angular.module("graphdb.framework.jmx.queries.controllers",["ui.bootstrap","toastr","graphdb.framework.rest.monitoring.service"]);o.controller("QueriesCtrl",["$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate",function(e,n,t,o,r,i,s,c,u){e.loader=!0,e.stringLimit=500,e.expanded={},e.error="";const a=document.createElement("a");e.parseNode=function(e){if(null==e)return null;let n="local";if(e.indexOf("://localhost:")<0&&e.indexOf("://localhost/")<0){a.href=e;let t=a.hostname;(function(e){const n=e.split(".");for(let e=0,t=0;e<n.length;e++)if(parseInt(n[e],10)>=0&&parseInt(n[e],10)<=255?t++:t=0,4===t)return!0;return!1})(a.hostname)||(t=a.hostname.split(".")[0]),n=t+":"+a.port}const t=e.match(/\/repositories\/([^\/]+)#(\d+)/);return[t[2],n,t[1]]},e.getQueries=function(){e.getQueriesRunning||e.paused||e.error||!r.getActiveRepository()||(e.getQueriesRunning=!0,c.monitorQuery().success((function(n){const t=n;e.noQueries=0===t.length,e.queries={};for(let n=0;n<t.length;n++)t[n].parsedNode=e.parseNode(t[n].node),e.queries[t[n].trackId]=t[n];e.noActiveRepository=!1,e.loader=!1,e.getQueriesRunning=!1})).error((function(n){e.error=getError(n),e.loader=!1,e.getQueriesRunning=!1})))};const l=o((function(){r.isActiveRepoOntopType()||e.getQueries()}),1e3);e.$on("$destroy",(function(){o.cancel(l)})),e.deleteQueryHttp=function(n){e.loader=!0,c.deleteQuery(n).success((function(){t.success(u.instant("abort.request.sent.msg")),e.loader=!1})).error((function(n){const o=getError(n);t.error(o,u.instant("common.error")),e.loader=!1}))},e.abortQuery=function(n){s.openSimpleModal({title:u.instant("confirm.abort"),message:u.instant("confirm.abort.warning.msg"),warning:!0}).result.then((function(){e.deleteQueryHttp(n)}))},e.downloadQuery=function(e){const n="query_"+e+".rq";let t="rest/monitor/query/download?queryId="+encodeURIComponent(e)+"&repository="+encodeURIComponent(r.getActiveRepository())+"&filename="+encodeURIComponent(n);i.isAuthenticated()&&(t=t+"&authToken="+encodeURIComponent(i.getAuthToken())),window.open(t,"_blank")},e.toggleQueryExpanded=function(n){e.expanded[n]=!e.expanded[n]}}]),o.controller("DeleteQueryCtrl",["$scope","$modalInstance",function(e,n){e.ok=function(){n.close()},e.cancel=function(){n.dismiss("cancel")}}])}}]);
|
|
2
|
-
//# sourceMappingURL=93.5f0ae85fb24657fd13c5.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/queries/controllers.js"],"names":["queriesCtrl","angular","module","controller","$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate","loader","stringLimit","expanded","error","parser","document","createElement","parseNode","node","shortUrl","indexOf","href","hostname","ip","blocks","split","i","sequence","length","parseInt","containsIPV4","port","match","getQueries","getQueriesRunning","paused","getActiveRepository","monitorQuery","success","data","newQueries","noQueries","queries","parsedNode","trackId","noActiveRepository","getError","timer","isActiveRepoOntopType","$on","cancel","deleteQueryHttp","queryId","deleteQuery","instant","msg","abortQuery","openSimpleModal","title","message","warning","result","then","downloadQuery","filename","link","encodeURIComponent","isAuthenticated","getAuthToken","window","open","toggleQueryExpanded","$modalInstance","ok","close","dismiss"],"mappings":"0FAAA,kBAGA,MAAMA,EAAcC,QAAQC,OAAO,4CAA6C,CAC5E,eACA,SACA,8CAGJF,EAAYG,WAAW,cAAe,CAAC,SAAU,SAAU,SAAU,YAAa,gBAAiB,WAAY,eAAgB,wBAAyB,aACpJ,SAAUC,EAAQC,EAAQC,EAAQC,EAAWC,EAAeC,EAAUC,EAAcC,EAAuBC,GAEvGR,EAAOS,QAAS,EAChBT,EAAOU,YAAc,IACrBV,EAAOW,SAAW,GAClBX,EAAOY,MAAQ,GAiBf,MAAMC,EAASC,SAASC,cAAc,KAItCf,EAAOgB,UAAY,SAAUC,GACzB,GAAY,MAARA,EACA,OAAO,KAGX,IAAIC,EAAW,QACf,GAAID,EAAKE,QAAQ,iBAAmB,GAAKF,EAAKE,QAAQ,iBAAmB,EAAG,CACxEN,EAA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QAAS,EAChBF,EAAsB6C,YAAYD,GAASd,SAAQ,WAC/CnC,EAAOmC,QAAQ7B,EAAW6C,QAAQ,2BAClCrD,EAAOS,QAAS,KACjBG,OAAM,SAAU0B,GACf,MAAMgB,EAAMT,SAASP,GACrBpC,EAAOU,MAAM0C,EAAK9C,EAAW6C,QAAQ,iBAErCrD,EAAOS,QAAS,MAIxBT,EAAOuD,WAAa,SAAUJ,GAC1B7C,EAAakD,gBAAgB,CACzBC,MAAOjD,EAAW6C,QAAQ,iBAC1BK,QAASlD,EAAW6C,QAAQ,6BAC5BM,SAAS,IACVC,OAAOC,MAAK,WACX7D,EAAOkD,gBAAgBC,OAI/BnD,EAAO8D,cAAgB,SAAUX,GAC7B,MAAMY,EAAW,SAAWZ,EAAU,MACtC,IAAIa,EAAO,uCAAyCC,mBAAmBd,GACjE,eAAiBc,mBAAmB7D,EAAc+B,uBAClD,aAAe8B,mBAAmBF,GACpC1D,EAAS6D,oBACTF,EAAOA,EAAO,cAAgBC,mBAAmB5D,EAAS8D,iBAG9DC,OAAOC,KAAKL,EAAM,WAGtBhE,EAAOsE,oBAAsB,SAAUnB,GACnCnD,EAAOW,SAASwC,IAAYnD,EAAOW,SAASwC,OAKxDvD,EAAYG,WAAW,kBAAmB,CAAC,SAAU,iBAAkB,SAAUC,EAAQuE,GAErFvE,EAAOwE,GAAK,WACRD,EAAeE,SAGnBzE,EAAOiD,OAAS,WACZsB,EAAeG,QAAQ","file":"93.5f0ae85fb24657fd13c5.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/rest/monitoring.rest.service';\n\nconst queriesCtrl = angular.module('graphdb.framework.jmx.queries.controllers', [\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.rest.monitoring.service'\n]);\n\nqueriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval', '$repositories', '$jwtAuth', 'ModalService', 'MonitoringRestService', '$translate',\n function ($scope, $modal, toastr, $interval, $repositories, $jwtAuth, ModalService, MonitoringRestService, $translate) {\n\n $scope.loader = true;\n $scope.stringLimit = 500;\n $scope.expanded = {};\n $scope.error = '';\n\n function containsIPV4(ip) {\n const blocks = ip.split('.');\n for (let i = 0, sequence = 0; i < blocks.length; i++) {\n if (parseInt(blocks[i], 10) >= 0 && parseInt(blocks[i], 10) <= 255) {\n sequence++;\n } else {\n sequence = 0;\n }\n if (sequence === 4) {\n return true;\n }\n }\n return false;\n }\n\n const parser = document.createElement('a');\n\n // Parses a node of the kind http://host.example.com:7200/repositories/repo#NN,\n // where NN is the track ID into an array [NN, host:7200, repo].\n $scope.parseNode = function (node) {\n if (node == null) {\n return null;\n }\n\n let shortUrl = 'local';\n if (node.indexOf('://localhost:') < 0 && node.indexOf('://localhost/') < 0) {\n parser.href = node;\n let hostname = parser.hostname;\n if (!containsIPV4(parser.hostname)) {\n hostname = parser.hostname.split('.')[0];\n }\n shortUrl = hostname + ':' + parser.port;\n }\n const match = node.match(/\\/repositories\\/([^\\/]+)#(\\d+)/); // eslint-disable-line no-useless-escape\n\n return [match[2], shortUrl, match[1]];\n };\n\n $scope.getQueries = function () {\n // Skip execution if already getting from previous call, if paused, if jolokia returned an error,\n // or if no repository is available\n if ($scope.getQueriesRunning || $scope.paused || $scope.error || !$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.getQueriesRunning = true;\n MonitoringRestService.monitorQuery().success(function (data) {\n const newQueries = data;\n $scope.noQueries = newQueries.length === 0;\n\n // Converts array to object. Angular seems to handle updates on objects better, i.e.\n // it doesn't recreate DOM elements for queries that are already displayed.\n $scope.queries = {};\n for (let i = 0; i < newQueries.length; i++) {\n newQueries[i].parsedNode = $scope.parseNode(newQueries[i].node);\n $scope.queries[newQueries[i].trackId] = newQueries[i];\n }\n\n $scope.noActiveRepository = false;\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n }).error(function (data) {\n $scope.error = getError(data);\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n });\n };\n\n const timer = $interval(function () {\n // Don't call getQueries for Ontop type repository\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n $scope.getQueries();\n }, 1000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n\n $scope.deleteQueryHttp = function (queryId) {\n\n $scope.loader = true;\n MonitoringRestService.deleteQuery(queryId).success(function () {\n toastr.success($translate.instant('abort.request.sent.msg'));\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n\n $scope.loader = false;\n });\n };\n\n $scope.abortQuery = function (queryId) {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.abort'),\n message: $translate.instant('confirm.abort.warning.msg'),\n warning: true\n }).result.then(function () {\n $scope.deleteQueryHttp(queryId);\n });\n };\n\n $scope.downloadQuery = function (queryId) {\n const filename = 'query_' + queryId + '.rq';\n let link = 'rest/monitor/query/download?queryId=' + encodeURIComponent(queryId)\n + '&repository=' + encodeURIComponent($repositories.getActiveRepository())\n + '&filename=' + encodeURIComponent(filename);\n if ($jwtAuth.isAuthenticated()) {\n link = link + '&authToken=' + encodeURIComponent($jwtAuth.getAuthToken());\n }\n\n window.open(link, '_blank');\n };\n\n $scope.toggleQueryExpanded = function (queryId) {\n $scope.expanded[queryId] = !$scope.expanded[queryId];\n };\n }]);\n\n\nqueriesCtrl.controller('DeleteQueryCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n $modalInstance.close();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n"],"sourceRoot":""}
|