graphdb-workbench 2.3.0-TR3 → 2.3.0-TR5

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.
Files changed (67) hide show
  1. package/dist/{0.77515462efcd257d336e.bundle.js → 0.bdee901b659f418cf4c3.bundle.js} +2 -2
  2. package/dist/0.bdee901b659f418cf4c3.bundle.js.map +1 -0
  3. package/dist/108.d415d719be3fc3a428f4.bundle.js +2 -0
  4. package/dist/108.d415d719be3fc3a428f4.bundle.js.map +1 -0
  5. package/dist/11.e3c940aa59365084050b.bundle.js +1 -1
  6. package/dist/11.e3c940aa59365084050b.bundle.js.map +1 -1
  7. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  8. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  9. package/dist/172.d60c0e511738e8c50a5f.bundle.js +2 -0
  10. package/dist/172.d60c0e511738e8c50a5f.bundle.js.map +1 -0
  11. package/dist/20.4eb25ede434dc329ecf1.bundle.js +1 -1
  12. package/dist/20.4eb25ede434dc329ecf1.bundle.js.map +1 -1
  13. package/dist/{21.5586732af2e5cec0d05a.bundle.js → 21.dd1a8782fa1bea210dc2.bundle.js} +2 -2
  14. package/dist/21.dd1a8782fa1bea210dc2.bundle.js.map +1 -0
  15. package/dist/27.fef157d9275358c9f1a0.bundle.js +1 -1
  16. package/dist/27.fef157d9275358c9f1a0.bundle.js.map +1 -1
  17. package/dist/33.fde8076c81c87c25c367.bundle.js +1 -1
  18. package/dist/33.fde8076c81c87c25c367.bundle.js.map +1 -1
  19. package/dist/40.10f42e3f6d8d87bd3221.bundle.js +1 -1
  20. package/dist/40.10f42e3f6d8d87bd3221.bundle.js.map +1 -1
  21. package/dist/{5.315f5a38554855592c02.bundle.js → 5.b0829613ef25834bf1ab.bundle.js} +2 -2
  22. package/dist/5.b0829613ef25834bf1ab.bundle.js.map +1 -0
  23. package/dist/94.94158487a9024ff3a623.bundle.js +1 -1
  24. package/dist/94.94158487a9024ff3a623.bundle.js.map +1 -1
  25. package/dist/{bundle.5121ea89a64d6feda4e1.bundle.js → bundle.906b129d438637005f08.bundle.js} +3 -3
  26. package/dist/{bundle.5121ea89a64d6feda4e1.bundle.js.map → bundle.906b129d438637005f08.bundle.js.map} +1 -1
  27. package/dist/i18n/locale-en.json +4 -0
  28. package/dist/i18n/locale-fr.json +4 -0
  29. package/dist/index.html +3 -3
  30. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  31. package/dist/js/angular/repositories/templates/ontop-repo.html +23 -0
  32. package/dist/pages/autocomplete.html +1 -1
  33. package/dist/pages/choose-repository-type.html +1 -1
  34. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  35. package/dist/pages/create-index.html +4 -4
  36. package/dist/pages/dependencies.html +1 -1
  37. package/dist/pages/domainRangeInfo.html +2 -2
  38. package/dist/pages/edit.html +1 -1
  39. package/dist/pages/explore.html +1 -1
  40. package/dist/pages/export.html +1 -1
  41. package/dist/pages/find.html +1 -1
  42. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  43. package/dist/pages/graphs-visualizations.html +7 -7
  44. package/dist/pages/guides.html +1 -1
  45. package/dist/pages/import.html +1 -1
  46. package/dist/pages/jdbc-create.html +5 -5
  47. package/dist/pages/monitor/queries.html +1 -1
  48. package/dist/pages/monitor/resources.html +2 -2
  49. package/dist/pages/namespaces.html +2 -2
  50. package/dist/pages/plugins.html +1 -1
  51. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  52. package/dist/pages/rdfrank.html +2 -2
  53. package/dist/pages/repositories.html +2 -2
  54. package/dist/pages/repository.html +2 -2
  55. package/dist/pages/similarity-indexes.html +1 -1
  56. package/dist/pages/sparql-template-create.html +5 -5
  57. package/dist/pages/sparql.html +3 -3
  58. package/dist/pages/webapi.html +2 -2
  59. package/dist/res/swagger/index.html +27 -27
  60. package/package.json +1 -1
  61. package/dist/0.77515462efcd257d336e.bundle.js.map +0 -1
  62. package/dist/108.162ea156d1fc4ad2525f.bundle.js +0 -2
  63. package/dist/108.162ea156d1fc4ad2525f.bundle.js.map +0 -1
  64. package/dist/172.f2687e06a12ae563bbd0.bundle.js +0 -2
  65. package/dist/172.f2687e06a12ae563bbd0.bundle.js.map +0 -1
  66. package/dist/21.5586732af2e5cec0d05a.bundle.js.map +0 -1
  67. package/dist/5.315f5a38554855592c02.bundle.js.map +0 -1
@@ -1,2 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[108],{99:function(e,r,o){"use strict";o.r(r);var t=o(66);function i(e,r,o,i,s){return{restrict:"E",scope:!1,templateUrl:"js/angular/repositories/templates/ontop-repo.html",link:function(n){n.selectedDriver={driverType:"generic",driverName:"Generic JDBC Driver",jdbc:{hostName:"",port:"",databaseName:"",userName:"",password:"",driverClass:"",url:""},urlTemplate:"",downloadDriverUrl:""},n.ontopRepoFileNames={},n.supportedDriversData=[],n.ontopRepoFileLabels={propertiesFile:"JDBC properties",obdaFile:"OBDA or R2RML",owlFile:"ontology file",constraintFile:"constraint file",dbMetadataFile:"DB metadata file"},n.ontopRepoFiles=Object.keys(n.ontopRepoFileLabels),n.ontopRepoFiles.forEach((function(e){n.repositoryInfo.params[e]&&(n.ontopRepoFileNames[e]=Object(t.getFileName)(n.repositoryInfo.params[e].value))})),n.supportedDriverLabels={hostName:"Hostname",port:"Port",databaseName:"Database name",userName:"Username",password:"Password",driverClass:"Driver class",url:"URL"},n.propertiesFileParams=Object.keys(n.supportedDriverLabels),n.classAvailable=!1,n.genericDriverType="generic",n.propertiesFile="propertiesFile";const a=[n.propertiesFile,"obdaFile"],l=["hostName","databaseName","userName"];function p(){return n.selectedDriver.driverType!==n.genericDriverType?l.filter((function(e){return!n.selectedDriver.jdbc[e]})).length>0&&(o.error(s.instant("missing.required.field.error")),1)?Promise.reject(s.instant("missing.required.field.error")):(n.uploadFileLoader=!0,r.updatePropertiesFile(n.repositoryInfo.params[n.propertiesFile].value,n.selectedDriver.jdbc,n.repositoryInfo.location).success((function(e){n.ontopRepoFileNames[n.propertiesFile]=Object(t.getFileName)(e.fileLocation),n.repositoryInfo.params[n.propertiesFile].value=e.fileLocation,n.uploadFileLoader=!1})).error((function(e){c(s.instant("common.error"),e),n.uploadFileLoader=!1}))):Promise.resolve()}function c(e,r){const t=getError(r);o.error(t,e)}n.loadDriverByClass=function(e){const r=n.supportedDriversData.find(r=>r.driverClass===e);return r&&n.copyDriverProperties(r),r},n.selectDriverByType=function(e){n.copyDriverProperties(n.supportedDriversData.find(r=>r.driverType===e)),n.concatURL("hostName",n)},n.copyDriverProperties=function(e){n.selectedDriver.driverType=e.driverType,n.selectedDriver.jdbc.driverClass=e.driverClass,n.selectedDriver.jdbc.url=e.urlTemplate,n.selectedDriver.urlTemplate=e.urlTemplate,n.selectedDriver.downloadDriverUrl=e.downloadDriverUrl,n.selectedDriver.portRequired=e.portRequired,n.classAvailable=e.classAvailable},n.isReadOnly=function(e){return"driverClass"===e||"url"===e},n.editFile=function(o){e.open({templateUrl:"js/angular/templates/modal/editRepoFile.html",controller:"EditRepositoryFileCtrl",resolve:{file:function(){return n.repositoryInfo.params[o]?n.repositoryInfo.params[o].value:""}}}).result.then((function(e){r.updateRepositoryFileContent(e.fileLocation,e.content,n.repositoryInfo.location).success((function(e){n.ontopRepoFileNames[o]=Object(t.getFileName)(e.fileLocation),n.repositoryInfo.params[o].value=e.fileLocation})).error((function(e){c(s.instant("common.error"),e)}))}))},n.uploadOntopRepoFile=function(e,r){e&&e.length&&(n.uploadFile=e[0],n.uploadFileLoader=!0,i.upload({url:"rest/repositories/file/upload",data:{file:n.uploadFile,location:n.repositoryInfo.location}}).success((function(e){e.success?(n.ontopRepoFileNames[r]=n.uploadFile.name,n.repositoryInfo.params[r].value=e.fileLocation):o.error(e.errorMessage),n.uploadFileLoader=!1})).error((function(e){c(s.instant("common.error"),e),n.uploadFile="",n.uploadFileLoader=!1})))},n.concatURL=function(e){if("hostName"===e||"port"===e||"databaseName"===e){let e=n.selectedDriver.urlTemplate;n.selectedDriver.jdbc.hostName&&(e=n.selectedDriver.jdbc.port?e.replace("{hostport}",`${n.selectedDriver.jdbc.hostName}:${n.selectedDriver.jdbc.port}`):e.replace("{hostport}",n.selectedDriver.jdbc.hostName)),n.selectedDriver.jdbc.databaseName&&(e=e.replace("{database}",n.selectedDriver.jdbc.databaseName)),n.selectedDriver.jdbc.url=e}},n.getInputType=function(e){switch(e){case"password":return"password";case"port":return"number";default:return"text"}},n.checkForRequiredOntopFiles=function(){return p().then((function(){return a.filter((function(e){return!n.repositoryInfo.params[e].value})).length>0?(o.error(s.instant("ontop.repo.missing.required.file.error")),Promise.reject(s.instant("ontop.repo.missing.required.file.error"))):Promise.resolve()}))},n.validateOntopPropertiesConnection=function(){p().then((function(){r.validateOntopPropertiesConnection(n.repositoryInfo).success((function(){o.success(s.instant("ontop.repo.successful.connection.msg"))})).error((function(e){c(s.instant("ontop.repo.failed.to.connect"),e)}))}))},n.isOntopRepoFileUploaded=function(){return n.repositoryInfo.params.propertiesFile&&n.repositoryInfo.params.propertiesFile.value.length>0},n.isRequiredOntopRepoFile=function(e){return a.indexOf(e)>-1},n.isRequiredField=function(e){return l.indexOf(e)>-1||"port"===e&&n.selectedDriver.portRequired},n.getFieldTooltip=function(e){return"port"===e&&n.selectedDriver.portRequired&&(e="portIfRequired"),s.instant("repoTooltips.ontop."+e)},n.editOntopRepo=function(){n.checkForRequiredOntopFiles().then((function(){n.editRepository()})).catch((function(e){}))},n.createOntopRepo=function(){n.repositoryInfo.id?n.checkForRequiredOntopFiles().then((function(){n.createRepo()})).catch((function(e){})):o.error(s.instant("empty.repoid.warning"))},n.goBackToPrevious=function(){n.goBackToPreviousLocation()},r.getSupportedDriversData(n.repositoryInfo).success((function(e){n.supportedDriversData=e})).error((function(e){c(s.instant("common.error"),e)})).then((function(){n.editRepoPage&&r.loadPropertiesFile(n.repositoryInfo.params[n.propertiesFile].value,n.repositoryInfo.location).success((function(e){n.loadDriverByClass(e.driverClass)&&(n.selectedDriver.jdbc.hostName=e.hostName,n.selectedDriver.jdbc.port=parseInt(e.port),n.selectedDriver.jdbc.databaseName=e.databaseName,n.selectedDriver.jdbc.userName=e.userName,n.selectedDriver.jdbc.password=e.password,n.selectedDriver.jdbc.url=e.url)})).error((function(e){c(s.instant("common.error"),e),n.uploadFileLoader=!1}))}))}}}angular.module("graphdb.framework.repositories.ontop-repo.directive",[]).directive("ontopRepo",i),i.$inject=["$uibModal","RepositoriesRestService","toastr","Upload","$translate"]}}]);
2
- //# sourceMappingURL=108.162ea156d1fc4ad2525f.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/repositories/ontop-repo.directive.js"],"names":["ontopRepoDirective","$uibModal","RepositoriesRestService","toastr","Upload","$translate","restrict","scope","templateUrl","link","$scope","selectedDriver","driverType","driverName","jdbc","hostName","port","databaseName","userName","password","driverClass","url","urlTemplate","downloadDriverUrl","ontopRepoFileNames","supportedDriversData","ontopRepoFileLabels","propertiesFile","obdaFile","owlFile","constraintFile","dbMetadataFile","ontopRepoFiles","Object","keys","forEach","key","repositoryInfo","params","value","supportedDriverLabels","propertiesFileParams","classAvailable","genericDriverType","REQUIRED_ONTOP_REPO_PARAMS","REQUIRED_PROPERTIES_FIELD_PARAMS","updateProperties","filter","requiredField","length","error","instant","Promise","reject","uploadFileLoader","updatePropertiesFile","location","success","data","fileLocation","showErrorMsg","resolve","title","msg","getError","loadDriverByClass","foundDriver","find","driver","copyDriverProperties","selectDriverByType","concatURL","portRequired","isReadOnly","labelName","editFile","file","open","controller","result","then","updateRepositoryFileContent","content","uploadOntopRepoFile","files","param","uploadFile","upload","name","errorMessage","replace","getInputType","checkForRequiredOntopFiles","requiredFile","validateOntopPropertiesConnection","isOntopRepoFileUploaded","isRequiredOntopRepoFile","indexOf","isRequiredField","field","getFieldTooltip","editOntopRepo","editRepository","catch","err","createOntopRepo","id","createRepo","goBackToPrevious","goBackToPreviousLocation","getSupportedDriversData","response","editRepoPage","loadProp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DzF,EAAO2F,cAAgB,WACnB3F,EAAOkF,6BACFZ,MAAK,WACFtE,EAAO4F,oBACRC,OAAM,SAAUC,QAK3B9F,EAAO+F,gBAAkB,WAChB/F,EAAO2B,eAAeqE,GAK3BhG,EAAOkF,6BACFZ,MAAK,WACFtE,EAAOiG,gBACRJ,OAAM,SAAUC,OAPnBrG,EAAO+C,MAAM7C,EAAW8C,QAAQ,0BAYxCzC,EAAOkG,iBAAmB,WACtBlG,EAAOmG,4BAnPA3G,EAAwB4G,wBAAwBpG,EAAO2B,gBACzDoB,SAAQ,SAAUsD,GACfrG,EAAOe,qBAAuBsF,KAC/B7D,OAAM,SAAU6D,GACfnD,EAAavD,EAAW8C,QAAQ,gBAAiB4D,MAwPxD/B,MAAK,WACEtE,EAAOsG,cAzHf9G,EAAwB+G,mBAAmBvG,EAAO2B,eAAeC,OAAO5B,EAAOiB,gBAAgBY,MAAO7B,EAAO2B,eAAemB,UACvHC,SAAQ,SAAUyD,GACAxG,EAAOuD,kBAAkBiD,EAAW9F,eAG/CV,EAAOC,eAAeG,KAAKC,SAAWmG,EAAWnG,SACjDL,EAAOC,eAAeG,KAAKE,KAAOmG,SAASD,EAAWlG,MACtDN,EAAOC,eAAeG,KAAKG,aAAeiG,EAAWjG,aACrDP,EAAOC,eAAeG,KAAKI,SAAWgG,EAAWhG,SACjDR,EAAOC,eAAeG,KAAKK,SAAW+F,EAAW/F,SACjDT,EAAOC,eAAeG,KAAKO,IAAM6F,EAAW7F,QAEjD6B,OAAM,SAAUQ,GACnBE,EAAavD,EAAW8C,QAAQ,gBAAiBO,GACjDhD,EAAO4C,kBAAmB,UAxM1C8D,QACKC,OAAO,sDAAuD,IAC9DC,UAAU,YAAatH,GAE5BA,EAAmBuH,QAAU,CAAC,YAAa,0BAA2B,SAAU,SAAU","file":"108.162ea156d1fc4ad2525f.bundle.js","sourcesContent":["import {getFileName} from \"./controllers\";\n\nangular\n .module('graphdb.framework.repositories.ontop-repo.directive', [])\n .directive('ontopRepo', ontopRepoDirective);\n\nontopRepoDirective.$inject = ['$uibModal', 'RepositoriesRestService', 'toastr', 'Upload', '$translate'];\n\nfunction ontopRepoDirective($uibModal, RepositoriesRestService, toastr, Upload, $translate) {\n return {\n restrict: 'E',\n scope: false,\n templateUrl: 'js/angular/repositories/templates/ontop-repo.html',\n\n link: linkFunc\n };\n\n function linkFunc($scope) {\n\n $scope.selectedDriver = {\n driverType: \"generic\",\n driverName: \"Generic JDBC Driver\",\n jdbc: {\n hostName: \"\",\n port: \"\",\n databaseName: \"\",\n userName: \"\",\n password: \"\",\n driverClass: \"\",\n url: \"\"\n },\n urlTemplate: \"\",\n downloadDriverUrl: \"\"\n };\n $scope.ontopRepoFileNames = {};\n $scope.supportedDriversData = [];\n $scope.ontopRepoFileLabels =\n {propertiesFile: 'JDBC properties', obdaFile: 'OBDA or R2RML', owlFile: 'ontology file',\n constraintFile: 'constraint file', dbMetadataFile: 'DB metadata file'};\n $scope.ontopRepoFiles = Object.keys($scope.ontopRepoFileLabels);\n $scope.ontopRepoFiles.forEach(function(key) {\n if ($scope.repositoryInfo.params[key]) {\n $scope.ontopRepoFileNames[key] = getFileName($scope.repositoryInfo.params[key].value);\n }\n });\n $scope.supportedDriverLabels = {hostName: 'Hostname', port: \"Port\", databaseName: 'Database name',\n userName: 'Username', password: 'Password', driverClass: 'Driver class', url: 'URL'};\n $scope.propertiesFileParams = Object.keys($scope.supportedDriverLabels);\n $scope.classAvailable = false;\n $scope.genericDriverType = 'generic';\n $scope.propertiesFile = 'propertiesFile';\n\n const REQUIRED_ONTOP_REPO_PARAMS = [$scope.propertiesFile, 'obdaFile'];\n const REQUIRED_PROPERTIES_FIELD_PARAMS = ['hostName', 'databaseName', 'userName'];\n\n function getSupportedDriversData() {\n return RepositoriesRestService.getSupportedDriversData($scope.repositoryInfo)\n .success(function (response) {\n $scope.supportedDriversData = response;\n }).error(function (response) {\n showErrorMsg($translate.instant('common.error'), response);\n });\n }\n\n $scope.loadDriverByClass = function (driverClass) {\n const foundDriver = $scope.supportedDriversData\n .find((driver) => driver.driverClass === driverClass);\n if (foundDriver) {\n $scope.copyDriverProperties(foundDriver);\n }\n return foundDriver;\n };\n\n $scope.selectDriverByType = function (driverType) {\n $scope.copyDriverProperties($scope.supportedDriversData\n .find((driver) => driver.driverType === driverType));\n // Call concatURL with proper labelName to apply changes to url field\n $scope.concatURL('hostName', $scope);\n };\n\n $scope.copyDriverProperties = function (driver) {\n $scope.selectedDriver.driverType = driver.driverType;\n $scope.selectedDriver.jdbc.driverClass = driver.driverClass;\n $scope.selectedDriver.jdbc.url = driver.urlTemplate;\n $scope.selectedDriver.urlTemplate = driver.urlTemplate;\n $scope.selectedDriver.downloadDriverUrl = driver.downloadDriverUrl;\n $scope.selectedDriver.portRequired = driver.portRequired;\n $scope.classAvailable = driver.classAvailable;\n };\n\n $scope.isReadOnly = function (labelName) {\n return labelName === 'driverClass' || labelName === 'url';\n }\n\n $scope.editFile = function(file) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/editRepoFile.html',\n controller: 'EditRepositoryFileCtrl',\n resolve: {\n file: function () {\n return $scope.repositoryInfo.params[file] ? $scope.repositoryInfo.params[file].value : '';\n }\n }\n });\n\n modalInstance.result.then(function (data) {\n // send data to backend\n RepositoriesRestService.updateRepositoryFileContent(data.fileLocation, data.content, $scope.repositoryInfo.location).success(function(result) {\n $scope.ontopRepoFileNames[file] = getFileName(result.fileLocation);\n $scope.repositoryInfo.params[file].value = result.fileLocation;\n }).error(function (error) {\n showErrorMsg($translate.instant('common.error'), error);\n })\n });\n }\n\n $scope.uploadOntopRepoFile = function(files, param) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories/file/upload',\n data: {file: $scope.uploadFile, location: $scope.repositoryInfo.location}\n })\n .success(function (data) {\n if (!data.success) {\n toastr.error(data.errorMessage);\n } else {\n $scope.ontopRepoFileNames[param] = $scope.uploadFile.name;\n $scope.repositoryInfo.params[param].value = data.fileLocation;\n }\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFile = '';\n $scope.uploadFileLoader = false;\n });\n }\n }\n\n $scope.concatURL = function(labelName) {\n if (labelName === 'hostName' || labelName === 'port' || labelName === 'databaseName') {\n let result = $scope.selectedDriver.urlTemplate;\n if ($scope.selectedDriver.jdbc.hostName) {\n if ($scope.selectedDriver.jdbc.port) {\n result = result.replace('{hostport}',\n `${$scope.selectedDriver.jdbc.hostName}:${$scope.selectedDriver.jdbc.port}`);\n } else {\n result = result.replace('{hostport}', $scope.selectedDriver.jdbc.hostName);\n }\n }\n\n if ($scope.selectedDriver.jdbc.databaseName) {\n result = result.replace('{database}', $scope.selectedDriver.jdbc.databaseName);\n }\n\n $scope.selectedDriver.jdbc.url = result;\n }\n }\n\n $scope.getInputType = function (labelName) {\n switch (labelName) {\n case 'password':\n return 'password';\n case 'port':\n return 'number';\n default:\n return 'text';\n }\n }\n\n $scope.checkForRequiredOntopFiles = function () {\n // Should guarantee that code will be executed in sequential manner,\n // because properties file is not created yet\n return updateProperties()\n .then(function () {\n const missingRequired = REQUIRED_ONTOP_REPO_PARAMS.filter(function (requiredFile) {\n return !$scope.repositoryInfo.params[requiredFile].value;\n });\n if (missingRequired.length > 0) {\n toastr.error($translate.instant('ontop.repo.missing.required.file.error'));\n return Promise.reject($translate.instant('ontop.repo.missing.required.file.error'));\n }\n return Promise.resolve();\n });\n }\n\n function loadPropertiesFile() {\n RepositoriesRestService.loadPropertiesFile($scope.repositoryInfo.params[$scope.propertiesFile].value, $scope.repositoryInfo.location)\n .success(function (driverData) {\n const driver = $scope.loadDriverByClass(driverData.driverClass);\n // If driver class is not found means that the selected driver is a GENERIC ONE\n if (driver) {\n $scope.selectedDriver.jdbc.hostName = driverData.hostName;\n $scope.selectedDriver.jdbc.port = parseInt(driverData.port);\n $scope.selectedDriver.jdbc.databaseName = driverData.databaseName;\n $scope.selectedDriver.jdbc.userName = driverData.userName;\n $scope.selectedDriver.jdbc.password = driverData.password;\n $scope.selectedDriver.jdbc.url = driverData.url;\n }\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFileLoader = false;\n });\n }\n\n $scope.validateOntopPropertiesConnection = function () {\n updateProperties()\n .then(function () {\n RepositoriesRestService.validateOntopPropertiesConnection($scope.repositoryInfo)\n .success(function () {\n toastr.success($translate.instant('ontop.repo.successful.connection.msg'));\n }).error(function (data) {\n showErrorMsg($translate.instant('ontop.repo.failed.to.connect'), data);\n });\n });\n }\n\n $scope.isOntopRepoFileUploaded = function() {\n return $scope.repositoryInfo.params.propertiesFile &&\n $scope.repositoryInfo.params.propertiesFile.value.length > 0\n };\n\n function missingRequiredField() {\n const missing = REQUIRED_PROPERTIES_FIELD_PARAMS\n .filter(function (requiredField) {\n return !$scope.selectedDriver.jdbc[requiredField]\n });\n if (missing.length > 0) {\n toastr.error($translate.instant('missing.required.field.error'));\n return true;\n }\n return false;\n }\n\n function updateProperties() {\n if ($scope.selectedDriver.driverType !== $scope.genericDriverType) {\n if (missingRequiredField()) {\n return Promise.reject($translate.instant('missing.required.field.error'));\n }\n return updatePropertiesFile();\n }\n return Promise.resolve();\n }\n\n function updatePropertiesFile() {\n $scope.uploadFileLoader = true;\n return RepositoriesRestService\n .updatePropertiesFile($scope.repositoryInfo.params[$scope.propertiesFile].value, $scope.selectedDriver.jdbc, $scope.repositoryInfo.location)\n .success(function (data) {\n $scope.ontopRepoFileNames[$scope.propertiesFile] = getFileName(data.fileLocation);\n $scope.repositoryInfo.params[$scope.propertiesFile].value = data.fileLocation;\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFileLoader = false;\n });\n }\n\n $scope.isRequiredOntopRepoFile = function(file) {\n return REQUIRED_ONTOP_REPO_PARAMS.indexOf(file) > -1;\n };\n\n $scope.isRequiredField = function (field) {\n return REQUIRED_PROPERTIES_FIELD_PARAMS.indexOf(field) > -1\n || field === 'port' && $scope.selectedDriver.portRequired;\n };\n\n $scope.getFieldTooltip = function (field) {\n if (field === 'port' && $scope.selectedDriver.portRequired) {\n field = 'portIfRequired';\n }\n return $translate.instant('repoTooltips.ontop.' + field);\n };\n\n $scope.editOntopRepo = function () {\n $scope.checkForRequiredOntopFiles()\n .then(function () {\n $scope.editRepository();\n }).catch(function (err) {\n // The catch block is empty, because error is handled in promise\n });\n }\n\n $scope.createOntopRepo = function () {\n if (!$scope.repositoryInfo.id) {\n toastr.error($translate.instant('empty.repoid.warning'));\n return;\n }\n\n $scope.checkForRequiredOntopFiles()\n .then(function () {\n $scope.createRepo();\n }).catch(function (err) {\n // The catch block is empty, because error is handled in promise\n });\n };\n\n $scope.goBackToPrevious = function () {\n $scope.goBackToPreviousLocation();\n }\n\n function showErrorMsg (title, data) {\n const msg = getError(data);\n toastr.error(msg, title);\n }\n\n getSupportedDriversData()\n .then(function () {\n if ($scope.editRepoPage) {\n loadPropertiesFile();\n }\n });\n }\n}\n"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[172],{239:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<div id="ontop-content" class="pt-1">\n <h4>{{\'ontop.repo.configuration\' | translate}}</h4>\n <div class="form-group row indented-div">\n <label class="col-xs-12 col-md-3 col-lg-2 col-form-label">{{\'ontop.repo.database.driver\' | translate}}</label>\n <div class="col-xs-8 col-md-5 col-lg-4" gdb-tooltip="{{\'repoTooltips.ontop.driverType\' | translate}}">\n <select class="form-control" id="driverType" ng-model="selectedDriver.driverType"\n ng-change="selectDriverByType(selectedDriver.driverType)"\n ng-options="driver.driverType as driver.driverName for driver in supportedDriversData">\n </select>\n </div>\n <div class="form-group col-xs-4 col-md-2 wrapper-div"\n ng-if="selectedDriver.driverType === genericDriverType"\n gdb-tooltip="{{\'repoTooltips.ontop.testConn\' | translate}}">\n <button id="testConnection" ng-click="validateOntopPropertiesConnection()"\n ng-disabled="!isOntopRepoFileUploaded() && !editRepoPage"\n type="submit"\n class="btn btn-primary">{{\'ontop.repo.test.connection\' | translate}}\n </button>\n </div>\n </div>\n <div ng-repeat="labelName in propertiesFileParams" class="form-group row indented-div"\n ng-if="selectedDriver.driverType !== genericDriverType">\n <label for="{{labelName}}" class="col-xs-12 col-md-3 col-lg-2 col-form-label">\n {{supportedDriverLabels[labelName] + (isRequiredField(labelName) ? \'*\' : \'\')}}</label>\n <div ng-class="{\'col-xs-8 col-md-5 col-lg-4\': labelName === \'url\', \'col-xs-12 col-md-5 col-lg-4\': labelName !== \'url\'}"\n gdb-tooltip="{{getFieldTooltip(labelName)}}">\n <input id="{{labelName}}" class="form-control" ng-readonly="isReadOnly(labelName)"\n type="{{getInputType(labelName)}}" min="1" max="65535"\n ng-required="isRequiredField(labelName)"\n placeholder="{{isRequiredField(labelName) ? \'required.field\' : \'\' | translate}}"\n ng-model="selectedDriver.jdbc[labelName]" ng-change="concatURL(labelName)">\n </div>\n <div class="col-xs-12 col-md-4" ng-if="labelName === \'driverClass\'">\n <em class="icon-warning icon-2x"\n ng-if="!classAvailable"\n gdb-tooltip="{{\'repoTooltips.ontop.driverClassWarning\' | translate}}"\n tooltip-placement="top"></em>\n <a class="uri" ng-if="selectedDriver.downloadDriverUrl && !classAvailable"\n href="{{selectedDriver.downloadDriverUrl}}"\n style="text-decoration: underline;">\n {{\'ontop.repo.download.jdbc.driver\' | translate}}\n </a>\n </div>\n <div class="col-xs-4 col-md-2" ng-if="labelName === \'url\'">\n <div class="wrapper-div" gdb-tooltip="{{\'repoTooltips.ontop.testConn\' | translate}}">\n <button id="testConnection1" ng-click="validateOntopPropertiesConnection()"\n ng-disabled="!selectedDriver.jdbc.hostName || !selectedDriver.jdbc.userName || !selectedDriver.jdbc.databaseName || isRequiredField(\'port\') && !selectedDriver.jdbc.port"\n type="submit"\n class="btn btn-primary">{{\'ontop.repo.test.connection\' | translate}}\n </button>\n </div>\n </div>\n </div>\n <div ng-repeat="file in ontopRepoFiles" class="form-group row indented-div"\n ng-if="selectedDriver.driverType === genericDriverType || propertiesFile !== file">\n <label for="{{file}}" class="col-xs-12 col-md-3 col-lg-2 col-form-label">\n {{repositoryInfo.params[file].label + (isRequiredOntopRepoFile(file) ? \'*\' : \'\')}}</label>\n <div class="col-xs-8 col-md-5 col-lg-4" gdb-tooltip="{{\'repoTooltips.ontop.\' + file | translate}}">\n <a class="btn btn-link ot-edit-input" ng-if="ontopRepoFileNames[file]" ng-click="editFile(file)"\n gdb-tooltip="{{\'edit.file.content\' | translate}}"\n tooltip-placement="right">\n <span class="icon-edit"></span>\n </a>\n <input class="form-control" id="{{file}}" ng-readonly="true"\n placeholder="{{isRequiredOntopRepoFile(file) ? \'required.field\' : \'\' | translate}}"\n ng-model="ontopRepoFileNames[file]">\n </div>\n <div class="col-xs-4 col-md-2">\n <div class="btn btn-outline-primary btn-sm">\n <div ngf-select ngf-change="uploadOntopRepoFile($files, file)" ngf-multiple="false "\n class="selectFiles pointer clearfix">\n <em ng-hide="uploadFileLoader" class="fa fa-upload fa-2x"></em>&nbsp;\n <div ng-show="uploadFileLoader" onto-loader size="24" class="spinner-container ot-loader"></div>\n <span for="{{file}}" class="pageInfo" style="vertical-align: super; color: #8a8a8a;">{{\'upload.file\' | translate}}</span>\n </div>\n </div>\n </div>\n </div>\n <div class="pt-1"></div>\n <div class="form-group row" ng-if="editRepoPage">\n <div class="checkbox col-xs-12">\n <label gdb-tooltip="{{\'restart.repo.check.tooltip\' | translate}}">\n <input id="restartRepo" name="restartRepo"\n type="checkbox"\n ng-model="repositoryInfo.restartRequested"\n ng-checked="repositoryInfo.restartRequested || repositoryInfo.saveId !== repositoryInfo.id"\n ng-disabled="repositoryInfo.saveId !== repositoryInfo.id"/>\n {{\'restart.repo.label\' | translate}}\n </label>\n </div>\n </div>\n <div class="form-group row pb-3">\n <div class="col-xs-12">\n <button id="addSaveOntopRepository" ng-click="createOntopRepo()" ng-if="!editRepoPage" type="submit" class="btn btn-primary">{{\'common.create.btn\' | translate}}</button>\n <button id="addEditOntopRepository" ng-click="editOntopRepo()" ng-if="editRepoPage" type="submit" class="btn btn-primary">{{\'common.save.btn\' | translate}}</button>\n <a ng-click="goBackToPrevious()" class="btn btn-secondary">{{\'common.cancel.btn\' | translate}}</a>\n </div>\n </div>\n</div>\n';return __p}}}]);
2
- //# sourceMappingURL=172.f2687e06a12ae563bbd0.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/repositories/templates/ontop-repo.html"],"names":["module","exports","obj","__t","__p"],"mappings":"wFAAAA,OAAOC,QAAU,SAASC,KAC1BA,MAAQA,IAAM,IACd,IAAIC,IAAKC,IAAM,GACf,KAAMF,IACNE,KAAO,i3MAGP,OAAOA","file":"172.f2687e06a12ae563bbd0.bundle.js","sourcesContent":["module.exports = function(obj) {\nobj || (obj = {});\nvar __t, __p = '';\nwith (obj) {\n__p += '<div id=\"ontop-content\" class=\"pt-1\">\\n <h4>{{\\'ontop.repo.configuration\\' | translate}}</h4>\\n <div class=\"form-group row indented-div\">\\n <label class=\"col-xs-12 col-md-3 col-lg-2 col-form-label\">{{\\'ontop.repo.database.driver\\' | translate}}</label>\\n <div class=\"col-xs-8 col-md-5 col-lg-4\" gdb-tooltip=\"{{\\'repoTooltips.ontop.driverType\\' | translate}}\">\\n <select class=\"form-control\" id=\"driverType\" ng-model=\"selectedDriver.driverType\"\\n ng-change=\"selectDriverByType(selectedDriver.driverType)\"\\n ng-options=\"driver.driverType as driver.driverName for driver in supportedDriversData\">\\n </select>\\n </div>\\n <div class=\"form-group col-xs-4 col-md-2 wrapper-div\"\\n ng-if=\"selectedDriver.driverType === genericDriverType\"\\n gdb-tooltip=\"{{\\'repoTooltips.ontop.testConn\\' | translate}}\">\\n <button id=\"testConnection\" ng-click=\"validateOntopPropertiesConnection()\"\\n ng-disabled=\"!isOntopRepoFileUploaded() && !editRepoPage\"\\n type=\"submit\"\\n class=\"btn btn-primary\">{{\\'ontop.repo.test.connection\\' | translate}}\\n </button>\\n </div>\\n </div>\\n <div ng-repeat=\"labelName in propertiesFileParams\" class=\"form-group row indented-div\"\\n ng-if=\"selectedDriver.driverType !== genericDriverType\">\\n <label for=\"{{labelName}}\" class=\"col-xs-12 col-md-3 col-lg-2 col-form-label\">\\n {{supportedDriverLabels[labelName] + (isRequiredField(labelName) ? \\'*\\' : \\'\\')}}</label>\\n <div ng-class=\"{\\'col-xs-8 col-md-5 col-lg-4\\': labelName === \\'url\\', \\'col-xs-12 col-md-5 col-lg-4\\': labelName !== \\'url\\'}\"\\n gdb-tooltip=\"{{getFieldTooltip(labelName)}}\">\\n <input id=\"{{labelName}}\" class=\"form-control\" ng-readonly=\"isReadOnly(labelName)\"\\n type=\"{{getInputType(labelName)}}\" min=\"1\" max=\"65535\"\\n ng-required=\"isRequiredField(labelName)\"\\n placeholder=\"{{isRequiredField(labelName) ? \\'required.field\\' : \\'\\' | translate}}\"\\n ng-model=\"selectedDriver.jdbc[labelName]\" ng-change=\"concatURL(labelName)\">\\n </div>\\n <div class=\"col-xs-12 col-md-4\" ng-if=\"labelName === \\'driverClass\\'\">\\n <em class=\"icon-warning icon-2x\"\\n ng-if=\"!classAvailable\"\\n gdb-tooltip=\"{{\\'repoTooltips.ontop.driverClassWarning\\' | translate}}\"\\n tooltip-placement=\"top\"></em>\\n <a class=\"uri\" ng-if=\"selectedDriver.downloadDriverUrl && !classAvailable\"\\n href=\"{{selectedDriver.downloadDriverUrl}}\"\\n style=\"text-decoration: underline;\">\\n {{\\'ontop.repo.download.jdbc.driver\\' | translate}}\\n </a>\\n </div>\\n <div class=\"col-xs-4 col-md-2\" ng-if=\"labelName === \\'url\\'\">\\n <div class=\"wrapper-div\" gdb-tooltip=\"{{\\'repoTooltips.ontop.testConn\\' | translate}}\">\\n <button id=\"testConnection1\" ng-click=\"validateOntopPropertiesConnection()\"\\n ng-disabled=\"!selectedDriver.jdbc.hostName || !selectedDriver.jdbc.userName || !selectedDriver.jdbc.databaseName || isRequiredField(\\'port\\') && !selectedDriver.jdbc.port\"\\n type=\"submit\"\\n class=\"btn btn-primary\">{{\\'ontop.repo.test.connection\\' | translate}}\\n </button>\\n </div>\\n </div>\\n </div>\\n <div ng-repeat=\"file in ontopRepoFiles\" class=\"form-group row indented-div\"\\n ng-if=\"selectedDriver.driverType === genericDriverType || propertiesFile !== file\">\\n <label for=\"{{file}}\" class=\"col-xs-12 col-md-3 col-lg-2 col-form-label\">\\n {{repositoryInfo.params[file].label + (isRequiredOntopRepoFile(file) ? \\'*\\' : \\'\\')}}</label>\\n <div class=\"col-xs-8 col-md-5 col-lg-4\" gdb-tooltip=\"{{\\'repoTooltips.ontop.\\' + file | translate}}\">\\n <a class=\"btn btn-link ot-edit-input\" ng-if=\"ontopRepoFileNames[file]\" ng-click=\"editFile(file)\"\\n gdb-tooltip=\"{{\\'edit.file.content\\' | translate}}\"\\n tooltip-placement=\"right\">\\n <span class=\"icon-edit\"></span>\\n </a>\\n <input class=\"form-control\" id=\"{{file}}\" ng-readonly=\"true\"\\n placeholder=\"{{isRequiredOntopRepoFile(file) ? \\'required.field\\' : \\'\\' | translate}}\"\\n ng-model=\"ontopRepoFileNames[file]\">\\n </div>\\n <div class=\"col-xs-4 col-md-2\">\\n <div class=\"btn btn-outline-primary btn-sm\">\\n <div ngf-select ngf-change=\"uploadOntopRepoFile($files, file)\" ngf-multiple=\"false \"\\n class=\"selectFiles pointer clearfix\">\\n <em ng-hide=\"uploadFileLoader\" class=\"fa fa-upload fa-2x\"></em>&nbsp;\\n <div ng-show=\"uploadFileLoader\" onto-loader size=\"24\" class=\"spinner-container ot-loader\"></div>\\n <span for=\"{{file}}\" class=\"pageInfo\" style=\"vertical-align: super; color: #8a8a8a;\">{{\\'upload.file\\' | translate}}</span>\\n </div>\\n </div>\\n </div>\\n </div>\\n <div class=\"pt-1\"></div>\\n <div class=\"form-group row\" ng-if=\"editRepoPage\">\\n <div class=\"checkbox col-xs-12\">\\n <label gdb-tooltip=\"{{\\'restart.repo.check.tooltip\\' | translate}}\">\\n <input id=\"restartRepo\" name=\"restartRepo\"\\n type=\"checkbox\"\\n ng-model=\"repositoryInfo.restartRequested\"\\n ng-checked=\"repositoryInfo.restartRequested || repositoryInfo.saveId !== repositoryInfo.id\"\\n ng-disabled=\"repositoryInfo.saveId !== repositoryInfo.id\"/>\\n {{\\'restart.repo.label\\' | translate}}\\n </label>\\n </div>\\n </div>\\n <div class=\"form-group row pb-3\">\\n <div class=\"col-xs-12\">\\n <button id=\"addSaveOntopRepository\" ng-click=\"createOntopRepo()\" ng-if=\"!editRepoPage\" type=\"submit\" class=\"btn btn-primary\">{{\\'common.create.btn\\' | translate}}</button>\\n <button id=\"addEditOntopRepository\" ng-click=\"editOntopRepo()\" ng-if=\"editRepoPage\" type=\"submit\" class=\"btn btn-primary\">{{\\'common.save.btn\\' | translate}}</button>\\n <a ng-click=\"goBackToPrevious()\" class=\"btn btn-secondary\">{{\\'common.cancel.btn\\' | translate}}</a>\\n </div>\\n </div>\\n</div>\\n';\n\n}\nreturn __p\n}"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/repositories/fedx-repo.directive.js","webpack:///./src/js/angular/settings/app.js","webpack:///./src/js/angular/repositories/app.js","webpack:///./src/js/angular/settings/controllers.js","webpack:///./src/js/angular/repositories/ontop-repo.directive.js"],"names":["fedxRepoDirective","$uibModal","RepositoriesRestService","toastr","$translate","restrict","scope","templateUrl","link","$scope","LOCAL_REPO_STORE","fedxMembers","knownRepos","allAttachedRepos","editRepoPage","repositoryInfo","params","member","value","slice","populateKnownRepos","filter","repo","repositoryServer","id","repositoryName","location","local","getKnownRepos","getRepositories","success","response","repos","_","values","forEach","push","apply","cloneDeep","error","msg","getError","instant","then","setWritableRepo","currentWritable","find","writable","store","JSON","stringify","getActiveClass","checkIfRepoExist","length","getRepositoryServer","localReposTimer","setInterval","updateMembers","removeEndingSlash","url","checkEditMode","model","editMode","$on","clearInterval","addMember","repository","repoType","type","respectRights","username","password","supportsASKQueries","removeMember","el","endpoint","repositoryLocation","addRemoteMember","mode","sparqlEndpoint","$uibModalInstance","open","getMemberIcon","editFedXRepository","resolveName","cancel","dismiss","ok","resolvedName","name","close","angular","module","directive","$inject","config","$httpProvider","interceptors","run","$rootScope","$location","$licenseService","isLicenseHardcoded","path","ActiveLocationSettingsCtrl","LicenseRestService","supportsStatistics","settings","statistics","getSettings","loader","getStatistics","data","status","setSettings","toggleStatistics","submitForm","LicenseCtrl","ModalService","loadingLicense","checkLicenseStatus","revertToFree","openSimpleModal","title","message","warning","result","unregisterLicense","RegisterLicenseCtrl","$window","$jwtAuth","isAdmin","sendLicenseToValidateAndActivate","textAreaSel","$","licenseCode","sendLicenseToValidate","validatedLicense","licensee","val","license","controller","size","resolve","decodedLicense","atob","replace","registerLicense","history","back","confirmWantedNewLicenseDetails","$watch","currentFile","file","extractFromLicenseFile","getBackToPreviousPage","ValidateLicenseModalCtrl","LoaderSamplesCtrl","setLoader","ontopRepoDirective","Upload","selectedDriver","driverType","driverName","jdbc","hostName","port","databaseName","userName","driverClass","urlTemplate","downloadDriverUrl","ontopRepoFileNames","supportedDriversData","ontopRepoFileLabels","propertiesFile","obdaFile","owlFile","constraintFile","dbMetadataFile","ontopRepoFiles","Object","keys","key","supportedDriverLabels","propertiesFileParams","classAvailable","genericDriverType","REQUIRED_ONTOP_REPO_PARAMS","REQUIRED_PROPERTIES_FIELD_PARAMS","updateProperties","requiredField","Promise","reject","uploadFileLoader","updatePropertiesFile","fileLocation","showErrorMsg","loadDriverByClass","foundDriver","driver","copyDriverProperties","selectDriverByType","concatURL","portRequired","isReadOnly","labelName","editFile","updateRepositoryFileContent","content","uploadOntopRepoFile","files","param","uploadFile","upload","errorMessage","getInputType","checkForRequiredOntopFiles","requiredFile","validateOntopPropertiesConnection","isOntopRepoFileUploaded","isRequiredOntopRepoFile","indexOf","isRequiredField","field","getFieldTooltip","editOntopRepo","editRepository","catch","err","createOntopRepo","createRepo","goBackToPrevious","goBackToPreviousLocation","getSupportedDriversData","loadPropertiesFile","driverData","parseInt"],"mappings":"2FAMA,SAASA,EAAkBC,EAAWC,EAAyBC,EAAQC,GACnE,MAAO,CACHC,SAAU,IACVC,OAAO,EACPC,YAAa,mDAEbC,KAGJ,SAAkBC,GAEd,MAAMC,EAAmB,uBAKzBD,EAAOE,YAAc,GACrBF,EAAOG,WAAa,GACpBH,EAAOI,iBAAmB,GAEtBJ,EAAOK,eACPL,EAAOE,YAAcF,EAAOM,eAAeC,OAAOC,OAAOC,MAAMC,SAiBnE,SAASC,IACL,IAAK,MAAMH,KAAUR,EAAOE,YACxBF,EAAOG,WAAaH,EAAOG,WAAWS,QAAO,SAAUC,GACnD,OAAIL,EAAOM,iBAEAD,EAAKE,KAAOP,EAAOQ,gBAAkBH,EAAKI,WAAaT,EAAOM,iBAG9DD,EAAKE,KAAOP,EAAOQ,iBAAmBH,EAAKK,SA0BlE,SAASC,IA/CE1B,EAAwB2B,gBAAgBpB,EAAOM,eAAeW,UAChEI,SAAQ,SAAUC,GACf,IAAIC,EAAQ,GACZC,EAAEC,OAAOH,GAAUI,QAASjB,IACxBc,EAAMI,KAAKC,MAAML,EAAOd,KAE5BT,EAAOI,iBAAmBoB,EAAEK,UAAUN,MACvCO,OAAM,SAAUR,GACf,MAAMS,EAAMC,SAASV,GACrB5B,EAAOoC,MAAMC,EAAKpC,EAAWsC,QAAQ,oBAwCxCC,MAAK,WACFlC,EAAOG,WAAaH,EAAOI,iBAAiBM,QAC5CC,OAxBZX,EAAOmC,gBAAkB,SAAU3B,GAC/B,IAAI4B,EAgBGpC,EAAOE,YAAYmC,KAAK7B,GAA8B,SAApBA,EAAO8B,UAf5CF,KACIA,EAAgBG,QAAUtC,GAAqBO,EAAO+B,QAAUtC,GAAoBmC,EAAgBpB,iBAAmBR,EAAOQ,kBA3ChH,qBA6CPoB,EAAgBG,OA7CT,qBA6CyC/B,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D,IAC9DC,UAAU,YAAakE,GAE5BA,EAAmBjE,QAAU,CAAC,YAAa,0BAA2B,SAAU,SAAU","file":"21.5586732af2e5cec0d05a.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.repositories.fedx-repo.directive', [])\n .directive('fedxRepo', fedxRepoDirective);\n\nfedxRepoDirective.$inject = ['$uibModal', 'RepositoriesRestService', 'toastr', '$translate'];\n\nfunction fedxRepoDirective($uibModal, RepositoriesRestService, toastr, $translate) {\n return {\n restrict: 'E',\n scope: true,\n templateUrl: 'js/angular/repositories/templates/fedx-repo.html',\n\n link: linkFunc\n };\n\n function linkFunc($scope) {\n\n const LOCAL_REPO_STORE = 'ResolvableRepository';\n const REMOTE_REPO_STORE = 'RemoteRepository';\n const SPARQL_ENDPOINT_STORE = 'SPARQLEndpoint';\n const NATIVE_STORE = 'NativeStore';\n\n $scope.fedxMembers = [];\n $scope.knownRepos = [];\n $scope.allAttachedRepos = [];\n\n if ($scope.editRepoPage) {\n $scope.fedxMembers = $scope.repositoryInfo.params.member.value.slice();\n }\n\n function getRepositories() {\n return RepositoriesRestService.getRepositories($scope.repositoryInfo.location)\n .success(function (response) {\n let repos = [];\n _.values(response).forEach((value) => {\n repos.push.apply(repos, value);\n });\n $scope.allAttachedRepos = _.cloneDeep(repos);\n }).error(function (response) {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('common.error'));\n });\n }\n\n function populateKnownRepos() {\n for (const member of $scope.fedxMembers) {\n $scope.knownRepos = $scope.knownRepos.filter(function (repo) {\n if (member.repositoryServer) {\n // if the member is a remote attached member\n return repo.id !== member.repositoryName || repo.location !== member.repositoryServer;\n } else {\n // if the member is a local one\n return repo.id !== member.repositoryName || !repo.local;\n }\n });\n }\n }\n\n $scope.setWritableRepo = function (member) {\n let currentWritable = getWritableRepo();\n if (currentWritable) {\n if (currentWritable.store === LOCAL_REPO_STORE && (member.store !== LOCAL_REPO_STORE || currentWritable.repositoryName !== member.repositoryName) ) {\n currentWritable.writable = 'false';\n } else if (currentWritable.store === REMOTE_REPO_STORE && (member.store !== REMOTE_REPO_STORE || currentWritable.repositoryName !== member.repositoryName || currentWritable.repositoryServer !== member.repositoryServer)) {\n currentWritable.writable = 'false';\n }\n }\n member.writable = JSON.stringify(member.writable === 'false');\n }\n\n $scope.getActiveClass = function (member) {\n return member.writable === 'true' ? ' active' : '';\n }\n\n function getWritableRepo() {\n return $scope.fedxMembers.find(member => member.writable === \"true\");\n }\n\n function getKnownRepos() {\n getRepositories()\n .then(function () {\n $scope.knownRepos = $scope.allAttachedRepos.slice();\n populateKnownRepos();\n });\n }\n\n $scope.checkIfRepoExist = function (member) {\n if (!$scope.allAttachedRepos.length) {\n return true;\n }\n if (member.store === LOCAL_REPO_STORE) {\n return $scope.allAttachedRepos.find(repo => repo.id === member.repositoryName && !repo.location);\n } else if (member.store === REMOTE_REPO_STORE) {\n return $scope.allAttachedRepos.find(repo => repo.id === member.repositoryName && repo.location === member.repositoryServer);\n } else {\n return true;\n }\n }\n\n $scope.getRepositoryServer = function (repo) {\n if (repo.local) {\n return \"Local\";\n } else {\n return repo.location;\n }\n }\n\n const localReposTimer = setInterval(function () {\n getKnownRepos();\n }, 5000);\n\n $scope.$on('$destroy', function () {\n clearInterval(localReposTimer);\n });\n\n $scope.addMember = function(repository) {\n let member;\n if ($scope.getRepositoryServer(repository) === \"Local\") {\n member = {\n store: LOCAL_REPO_STORE,\n repositoryName: repository.id,\n repoType: repository.type,\n respectRights: \"true\",\n writable: \"false\"\n };\n } else {\n member = {\n store: REMOTE_REPO_STORE,\n repositoryName: repository.id,\n repositoryServer: repository.location,\n username: '',\n password: '',\n supportsASKQueries: \"true\",\n writable: \"false\"\n };\n }\n $scope.knownRepos = $scope.knownRepos.filter(repo => repo.id !== repository.id || repo.location !== repository.location);\n updateMembers(member);\n }\n\n $scope.removeMember = function (member) {\n if (member.store && member.store === LOCAL_REPO_STORE) {\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.store !== member.store || el.repositoryName !== member.repositoryName && !el.repositoryServer);\n getKnownRepos();\n } else if (member.store && member.store === SPARQL_ENDPOINT_STORE) {\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.endpoint !== member.endpoint);\n } else if (member.store && member.store === NATIVE_STORE) {\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.repositoryLocation !== member.repositoryLocation);\n } else if (member.store && member.store === REMOTE_REPO_STORE) {\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.store !== member.store || el.repositoryName !== member.repositoryName\n || el.repositoryServer !== member.repositoryServer);\n getKnownRepos();\n }\n $scope.repositoryInfo.params['member'].value = $scope.fedxMembers;\n }\n\n $scope.addRemoteMember = function () {\n $scope.mode = 'remote';\n $scope.model = {\n editMode: false,\n store: REMOTE_REPO_STORE,\n repositoryName: '',\n repositoryServer: '',\n sparqlEndpoint: '',\n username: '',\n password: '',\n supportsASKQueries: \"true\",\n writable: \"false\"\n }\n\n $scope.$uibModalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/add-fedx-remote-repo.html',\n scope: $scope,\n });\n };\n\n $scope.getMemberIcon = function (member) {\n if (member.repoType) {\n return 'icon-repo-' + member.repoType;\n } else if (member.store === NATIVE_STORE) {\n return 'icon-warning';\n } else {\n return 'icon-link';\n }\n }\n\n $scope.editFedXRepository = function (member) {\n if (member.store === LOCAL_REPO_STORE) {\n $scope.mode = 'local';\n $scope.model = {\n editMode: true,\n store: member.store,\n respectRights: member.respectRights,\n repositoryName: member.repositoryName,\n repoType: member.repoType,\n writable: member.writable\n }\n } else {\n $scope.mode = 'remote';\n $scope.model = {\n editMode: true,\n store: member.store,\n repositoryName: member.repositoryName,\n repositoryServer: member.repositoryServer,\n sparqlEndpoint: member.store === SPARQL_ENDPOINT_STORE ? member.endpoint : member.repositoryLocation,\n username: member.username,\n password: member.password,\n supportsASKQueries: member.supportsASKQueries,\n writable: member.writable\n }\n }\n\n $scope.$uibModalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/add-fedx-remote-repo.html',\n scope: $scope\n });\n };\n\n $scope.resolveName = function (member) {\n switch (member.store) {\n case LOCAL_REPO_STORE : {\n return member.repositoryName;\n }\n case REMOTE_REPO_STORE : {\n return member.repositoryName + '@' + member.repositoryServer;\n }\n case SPARQL_ENDPOINT_STORE : {\n return member.endpoint;\n }\n case NATIVE_STORE : {\n return member.repositoryLocation;\n }\n default :\n return \"\";\n }\n }\n\n $scope.cancel = function () {\n $scope.$uibModalInstance.dismiss('cancel');\n };\n\n function updateMembers(member) {\n $scope.fedxMembers.push(member);\n $scope.repositoryInfo.params['member'].value = $scope.fedxMembers;\n }\n\n function removeEndingSlash(url) {\n return url.slice(-1) === '/' ? url.slice(0, -1) : url\n }\n\n function checkEditMode() {\n return $scope.editRepoPage && !$scope.editRepoPage || !$scope.model.editMode;\n }\n\n $scope.ok = function () {\n let member;\n if ($scope.model.repositoryName && $scope.model.store === LOCAL_REPO_STORE) {\n member = {\n store: LOCAL_REPO_STORE,\n repositoryName: $scope.model.repositoryName,\n repoType: $scope.model.repoType,\n respectRights: $scope.model.respectRights,\n writable: $scope.model.writable\n }\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.repositoryName !== member.repositoryName || el.store !== member.store );\n } else if ($scope.model.repositoryName && $scope.model.store === REMOTE_REPO_STORE) {\n member = {\n store: REMOTE_REPO_STORE,\n repositoryName: $scope.model.repositoryName,\n repositoryServer: removeEndingSlash($scope.model.repositoryServer),\n username: $scope.model.username,\n password: $scope.model.password,\n writable: $scope.model.writable\n };\n if (checkEditMode() && $scope.fedxMembers.find(el => el.repositoryName === member.repositoryName\n && el.repositoryServer === member.repositoryServer)) {\n let resolvedName = $scope.resolveName(member);\n toastr.error($translate.instant('fedx.repo.already.added.member.error', {name: resolvedName}));\n $scope.$uibModalInstance.close();\n return;\n }\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.repositoryName !== member.repositoryName\n || el.repositoryServer !== member.repositoryServer);\n } else {\n member = {\n store: SPARQL_ENDPOINT_STORE,\n endpoint: removeEndingSlash($scope.model.sparqlEndpoint),\n username: $scope.model.username,\n password: $scope.model.password,\n supportsASKQueries: $scope.model.supportsASKQueries,\n writable: $scope.model.writable\n };\n\n if (checkEditMode() && $scope.fedxMembers.find(el => el.endpoint === member.endpoint)) {\n let resolvedName = $scope.resolveName(member);\n toastr.error($translate.instant('fedx.repo.already.added.sparql.endpoint.error', {name: resolvedName}));\n $scope.$uibModalInstance.close();\n return;\n }\n\n $scope.fedxMembers = $scope.fedxMembers.filter(el => el.endpoint !== member.endpoint);\n }\n\n updateMembers(member);\n populateKnownRepos();\n $scope.$uibModalInstance.close();\n };\n\n $scope.$on('changedLocation', function () {\n $scope.fedxMembers = [];\n getKnownRepos();\n });\n\n getKnownRepos();\n }\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/rest/license.rest.service';\nimport 'angular/settings/controllers';\nimport 'angular/core/interceptors/unauthorized.interceptor';\nimport 'angular/core/services/jwt-auth.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nangular.module('graphdb.framework.settings', [\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.rest.license.service',\n 'graphdb.framework.settings.controllers',\n 'graphdb.framework.core.interceptors.unauthorized',\n 'graphdb.framework.core.services.jwtauth'\n])\n .config(config)\n .run(run);\n\nconfig.$inject = ['$httpProvider', '$routeProvider'];\n\nfunction config($httpProvider) {\n $httpProvider.interceptors.push('$unauthorizedInterceptor');\n}\n\nrun.$inject = ['$rootScope', '$location', '$licenseService'];\n\nfunction run($rootScope, $location, $licenseService) {\n $rootScope.$on('$locationChangeStart', function () {\n if ($licenseService.isLicenseHardcoded && $location.url() === '/license/register') {\n $location.path('license');\n }\n });\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/controllers';\nimport 'angular/repositories/controllers';\nimport 'angular/repositories/ontop-repo.directive';\nimport 'angular/repositories/fedx-repo.directive';\nimport 'angular/core/services/repositories.service';\nimport 'angular/settings/app';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'ui.bootstrap',\n 'toastr',\n 'ngCookies',\n 'ngRoute',\n 'graphdb.framework.repositories.controllers',\n 'graphdb.framework.repositories.ontop-repo.directive',\n 'graphdb.framework.repositories.fedx-repo.directive',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.core.controllers',\n 'graphdb.framework.settings'\n];\n\nangular.module('graphdb.framework.repositories', modules);\n","import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\n\nangular\n .module('graphdb.framework.settings.controllers', [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.jwtauth',\n 'toastr'\n ])\n .controller('ActiveLocationSettingsCtrl', ActiveLocationSettingsCtrl)\n .controller('ValidateLicenseModalCtrl', ValidateLicenseModalCtrl)\n .controller('LicenseCtrl', LicenseCtrl)\n .controller('RegisterLicenseCtrl', RegisterLicenseCtrl)\n .controller('LoaderSamplesCtrl', LoaderSamplesCtrl);\n\nActiveLocationSettingsCtrl.$inject = ['$scope', 'toastr', '$uibModalInstance', 'LicenseRestService', '$translate'];\n\nfunction ActiveLocationSettingsCtrl($scope, toastr, $uibModalInstance, LicenseRestService, $translate) {\n $scope.supportsStatistics = true;\n $scope.settings = {statistics: false};\n $scope.getSettings = getSettings;\n\n function getSettings() {\n $scope.loader = true;\n LicenseRestService.getStatistics().then(function (response) {\n $scope.settings.statistics = response.data === 'true';\n $scope.supportsStatistics = true;\n }, function (response) {\n if (response.status === 404) {\n $scope.supportsStatistics = false;\n } else {\n const msg = getError(response.data);\n toastr.error(msg, $translate.instant('error.getting.settings'));\n }\n });\n }\n\n $scope.getSettings();\n\n $scope.setSettings = function () {\n $scope.loader = true;\n LicenseRestService.toggleStatistics($scope.settings.statistics).then(function () {\n $uibModalInstance.close();\n toastr.success($translate.instant('saving.settings.success'));\n }, function (response) {\n const msg = getError(response.data);\n toastr.error(msg, $translate.instant('saving.settings.error'));\n });\n };\n\n $scope.submitForm = function () {\n $scope.setSettings();\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$licenseService', 'toastr', '$rootScope', 'ModalService', '$translate'];\n\nfunction LicenseCtrl($scope, LicenseRestService, $licenseService, toastr, $rootScope, ModalService, $translate) {\n\n $scope.loadingLicense = function() {\n return $licenseService.loadingLicense;\n };\n\n $licenseService.checkLicenseStatus();\n\n $scope.revertToFree = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.operation'),\n message: $translate.instant(\"revert.to.free.warning.msg\"),\n warning: true\n }).result\n .then(function () {\n LicenseRestService.unregisterLicense()\n .success(function () {\n $licenseService.checkLicenseStatus();\n });\n });\n };\n}\n\nRegisterLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$location', '$uibModal', 'toastr', '$window', '$jwtAuth', '$translate'];\n\nfunction RegisterLicenseCtrl($scope, LicenseRestService, $location, $uibModal, toastr, $window, $jwtAuth, $translate) {\n $scope.$on('securityInit', function () {\n if (!$jwtAuth.isAdmin()) {\n $location.path('/license');\n }\n });\n\n $scope.sendLicenseToValidateAndActivate = sendLicenseToValidateAndActivate;\n\n const textAreaSel = $('.license-textarea');\n\n // watch for uploaded license file\n $scope.$watch('currentFile', function () {\n if ($scope.currentFile) {\n const file = $scope.currentFile;\n LicenseRestService.extractFromLicenseFile(file)\n .success(function (licenseCode) {\n sendLicenseToValidateAndActivate(licenseCode);\n }).error(function () {\n toastr.error($translate.instant('could.not.upload.file.error'));\n });\n }\n });\n\n $scope.getBackToPreviousPage = function () {\n $window.history.back();\n };\n\n // send license code for validation and activation\n function sendLicenseToValidateAndActivate(licenseCode) {\n LicenseRestService.sendLicenseToValidate(licenseCode)\n .success(function (validatedLicense) {\n if (validatedLicense.licensee !== 'Invalid') {\n // write code to textarea\n textAreaSel.val(licenseCode);\n // pop dialog for license details confirmation\n confirmWantedNewLicenseDetails(validatedLicense, licenseCode);\n } else {\n // clear textarea on invalid license\n textAreaSel.val('');\n // show error\n toastr.error(validatedLicense.message);\n }\n })\n .error(function () {\n toastr.error($translate.instant('invalid.license'));\n });\n }\n\n\n // pops a modal dialog which asks you if your expected license details are correct\n // and sends license to GraphDB upon confirmation\n function confirmWantedNewLicenseDetails(license, licenseCode) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/settings/modal/validate-license.html',\n controller: 'ValidateLicenseModalCtrl',\n size: 'lg',\n resolve: {\n license: function () {\n return license;\n }\n }\n });\n\n modalInstance.result.then(function () {\n registerLicense(licenseCode);\n });\n }\n\n // send license code to GraphDB for activation\n function registerLicense(licenseCode) {\n if (!licenseCode) {\n licenseCode = textAreaSel.val();\n }\n\n if (licenseCode) {\n // replacing whitespace makes this work on Safari too,\n // whereas other browser happily ignore the whitespace\n const decodedLicense = atob(licenseCode.replace(/\\s/g, ''));\n LicenseRestService.registerLicense(decodedLicense)\n .success(function () {\n $window.history.back();\n }).error(function () {\n toastr.error($translate.instant('license.register.error'));\n });\n } else {\n toastr.error($translate.instant('no.license.code.error'));\n }\n }\n}\n\nValidateLicenseModalCtrl.$inject = ['$scope', '$uibModalInstance', 'license'];\n\nfunction ValidateLicenseModalCtrl($scope, $uibModalInstance, license) {\n $scope.ok = ok;\n $scope.cancel = cancel;\n $scope.license = license;\n\n function ok() {\n $uibModalInstance.close();\n }\n\n function cancel() {\n $uibModalInstance.dismiss('cancel');\n }\n}\n\nLoaderSamplesCtrl.$inject = ['$scope'];\n\nfunction LoaderSamplesCtrl($scope) {\n $scope.loader = true;\n $scope.setLoader = function (loader) {\n $scope.loader = loader;\n };\n}\n","import {getFileName} from \"./controllers\";\n\nangular\n .module('graphdb.framework.repositories.ontop-repo.directive', [])\n .directive('ontopRepo', ontopRepoDirective);\n\nontopRepoDirective.$inject = ['$uibModal', 'RepositoriesRestService', 'toastr', 'Upload', '$translate'];\n\nfunction ontopRepoDirective($uibModal, RepositoriesRestService, toastr, Upload, $translate) {\n return {\n restrict: 'E',\n scope: false,\n templateUrl: 'js/angular/repositories/templates/ontop-repo.html',\n\n link: linkFunc\n };\n\n function linkFunc($scope) {\n\n $scope.selectedDriver = {\n driverType: \"generic\",\n driverName: \"Generic JDBC Driver\",\n jdbc: {\n hostName: \"\",\n port: \"\",\n databaseName: \"\",\n userName: \"\",\n password: \"\",\n driverClass: \"\",\n url: \"\"\n },\n urlTemplate: \"\",\n downloadDriverUrl: \"\"\n };\n $scope.ontopRepoFileNames = {};\n $scope.supportedDriversData = [];\n $scope.ontopRepoFileLabels =\n {propertiesFile: 'JDBC properties', obdaFile: 'OBDA or R2RML', owlFile: 'ontology file',\n constraintFile: 'constraint file', dbMetadataFile: 'DB metadata file'};\n $scope.ontopRepoFiles = Object.keys($scope.ontopRepoFileLabels);\n $scope.ontopRepoFiles.forEach(function(key) {\n if ($scope.repositoryInfo.params[key]) {\n $scope.ontopRepoFileNames[key] = getFileName($scope.repositoryInfo.params[key].value);\n }\n });\n $scope.supportedDriverLabels = {hostName: 'Hostname', port: \"Port\", databaseName: 'Database name',\n userName: 'Username', password: 'Password', driverClass: 'Driver class', url: 'URL'};\n $scope.propertiesFileParams = Object.keys($scope.supportedDriverLabels);\n $scope.classAvailable = false;\n $scope.genericDriverType = 'generic';\n $scope.propertiesFile = 'propertiesFile';\n\n const REQUIRED_ONTOP_REPO_PARAMS = [$scope.propertiesFile, 'obdaFile'];\n const REQUIRED_PROPERTIES_FIELD_PARAMS = ['hostName', 'databaseName', 'userName'];\n\n function getSupportedDriversData() {\n return RepositoriesRestService.getSupportedDriversData($scope.repositoryInfo)\n .success(function (response) {\n $scope.supportedDriversData = response;\n }).error(function (response) {\n showErrorMsg($translate.instant('common.error'), response);\n });\n }\n\n $scope.loadDriverByClass = function (driverClass) {\n const foundDriver = $scope.supportedDriversData\n .find((driver) => driver.driverClass === driverClass);\n if (foundDriver) {\n $scope.copyDriverProperties(foundDriver);\n }\n return foundDriver;\n };\n\n $scope.selectDriverByType = function (driverType) {\n $scope.copyDriverProperties($scope.supportedDriversData\n .find((driver) => driver.driverType === driverType));\n // Call concatURL with proper labelName to apply changes to url field\n $scope.concatURL('hostName', $scope);\n };\n\n $scope.copyDriverProperties = function (driver) {\n $scope.selectedDriver.driverType = driver.driverType;\n $scope.selectedDriver.jdbc.driverClass = driver.driverClass;\n $scope.selectedDriver.jdbc.url = driver.urlTemplate;\n $scope.selectedDriver.urlTemplate = driver.urlTemplate;\n $scope.selectedDriver.downloadDriverUrl = driver.downloadDriverUrl;\n $scope.selectedDriver.portRequired = driver.portRequired;\n $scope.classAvailable = driver.classAvailable;\n };\n\n $scope.isReadOnly = function (labelName) {\n return labelName === 'driverClass' || labelName === 'url';\n }\n\n $scope.editFile = function(file) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/editRepoFile.html',\n controller: 'EditRepositoryFileCtrl',\n resolve: {\n file: function () {\n return $scope.repositoryInfo.params[file] ? $scope.repositoryInfo.params[file].value : '';\n }\n }\n });\n\n modalInstance.result.then(function (data) {\n // send data to backend\n RepositoriesRestService.updateRepositoryFileContent(data.fileLocation, data.content, $scope.repositoryInfo.location).success(function(result) {\n $scope.ontopRepoFileNames[file] = getFileName(result.fileLocation);\n $scope.repositoryInfo.params[file].value = result.fileLocation;\n }).error(function (error) {\n showErrorMsg($translate.instant('common.error'), error);\n })\n });\n }\n\n $scope.uploadOntopRepoFile = function(files, param) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories/file/upload',\n data: {file: $scope.uploadFile, location: $scope.repositoryInfo.location}\n })\n .success(function (data) {\n if (!data.success) {\n toastr.error(data.errorMessage);\n } else {\n $scope.ontopRepoFileNames[param] = $scope.uploadFile.name;\n $scope.repositoryInfo.params[param].value = data.fileLocation;\n }\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFile = '';\n $scope.uploadFileLoader = false;\n });\n }\n }\n\n $scope.concatURL = function(labelName) {\n if (labelName === 'hostName' || labelName === 'port' || labelName === 'databaseName') {\n let result = $scope.selectedDriver.urlTemplate;\n if ($scope.selectedDriver.jdbc.hostName) {\n if ($scope.selectedDriver.jdbc.port) {\n result = result.replace('{hostport}',\n `${$scope.selectedDriver.jdbc.hostName}:${$scope.selectedDriver.jdbc.port}`);\n } else {\n result = result.replace('{hostport}', $scope.selectedDriver.jdbc.hostName);\n }\n }\n\n if ($scope.selectedDriver.jdbc.databaseName) {\n result = result.replace('{database}', $scope.selectedDriver.jdbc.databaseName);\n }\n\n $scope.selectedDriver.jdbc.url = result;\n }\n }\n\n $scope.getInputType = function (labelName) {\n switch (labelName) {\n case 'password':\n return 'password';\n case 'port':\n return 'number';\n default:\n return 'text';\n }\n }\n\n $scope.checkForRequiredOntopFiles = function () {\n // Should guarantee that code will be executed in sequential manner,\n // because properties file is not created yet\n return updateProperties()\n .then(function () {\n const missingRequired = REQUIRED_ONTOP_REPO_PARAMS.filter(function (requiredFile) {\n return !$scope.repositoryInfo.params[requiredFile].value;\n });\n if (missingRequired.length > 0) {\n toastr.error($translate.instant('ontop.repo.missing.required.file.error'));\n return Promise.reject($translate.instant('ontop.repo.missing.required.file.error'));\n }\n return Promise.resolve();\n });\n }\n\n function loadPropertiesFile() {\n RepositoriesRestService.loadPropertiesFile($scope.repositoryInfo.params[$scope.propertiesFile].value, $scope.repositoryInfo.location)\n .success(function (driverData) {\n const driver = $scope.loadDriverByClass(driverData.driverClass);\n // If driver class is not found means that the selected driver is a GENERIC ONE\n if (driver) {\n $scope.selectedDriver.jdbc.hostName = driverData.hostName;\n $scope.selectedDriver.jdbc.port = parseInt(driverData.port);\n $scope.selectedDriver.jdbc.databaseName = driverData.databaseName;\n $scope.selectedDriver.jdbc.userName = driverData.userName;\n $scope.selectedDriver.jdbc.password = driverData.password;\n $scope.selectedDriver.jdbc.url = driverData.url;\n }\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFileLoader = false;\n });\n }\n\n $scope.validateOntopPropertiesConnection = function () {\n updateProperties()\n .then(function () {\n RepositoriesRestService.validateOntopPropertiesConnection($scope.repositoryInfo)\n .success(function () {\n toastr.success($translate.instant('ontop.repo.successful.connection.msg'));\n }).error(function (data) {\n showErrorMsg($translate.instant('ontop.repo.failed.to.connect'), data);\n });\n });\n }\n\n $scope.isOntopRepoFileUploaded = function() {\n return $scope.repositoryInfo.params.propertiesFile &&\n $scope.repositoryInfo.params.propertiesFile.value.length > 0\n };\n\n function missingRequiredField() {\n const missing = REQUIRED_PROPERTIES_FIELD_PARAMS\n .filter(function (requiredField) {\n return !$scope.selectedDriver.jdbc[requiredField]\n });\n if (missing.length > 0) {\n toastr.error($translate.instant('missing.required.field.error'));\n return true;\n }\n return false;\n }\n\n function updateProperties() {\n if ($scope.selectedDriver.driverType !== $scope.genericDriverType) {\n if (missingRequiredField()) {\n return Promise.reject($translate.instant('missing.required.field.error'));\n }\n return updatePropertiesFile();\n }\n return Promise.resolve();\n }\n\n function updatePropertiesFile() {\n $scope.uploadFileLoader = true;\n return RepositoriesRestService\n .updatePropertiesFile($scope.repositoryInfo.params[$scope.propertiesFile].value, $scope.selectedDriver.jdbc, $scope.repositoryInfo.location)\n .success(function (data) {\n $scope.ontopRepoFileNames[$scope.propertiesFile] = getFileName(data.fileLocation);\n $scope.repositoryInfo.params[$scope.propertiesFile].value = data.fileLocation;\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n showErrorMsg($translate.instant('common.error'), data);\n $scope.uploadFileLoader = false;\n });\n }\n\n $scope.isRequiredOntopRepoFile = function(file) {\n return REQUIRED_ONTOP_REPO_PARAMS.indexOf(file) > -1;\n };\n\n $scope.isRequiredField = function (field) {\n return REQUIRED_PROPERTIES_FIELD_PARAMS.indexOf(field) > -1\n || field === 'port' && $scope.selectedDriver.portRequired;\n };\n\n $scope.getFieldTooltip = function (field) {\n if (field === 'port' && $scope.selectedDriver.portRequired) {\n field = 'portIfRequired';\n }\n return $translate.instant('repoTooltips.ontop.' + field);\n };\n\n $scope.editOntopRepo = function () {\n $scope.checkForRequiredOntopFiles()\n .then(function () {\n $scope.editRepository();\n }).catch(function (err) {\n // The catch block is empty, because error is handled in promise\n });\n }\n\n $scope.createOntopRepo = function () {\n if (!$scope.repositoryInfo.id) {\n toastr.error($translate.instant('empty.repoid.warning'));\n return;\n }\n\n $scope.checkForRequiredOntopFiles()\n .then(function () {\n $scope.createRepo();\n }).catch(function (err) {\n // The catch block is empty, because error is handled in promise\n });\n };\n\n $scope.goBackToPrevious = function () {\n $scope.goBackToPreviousLocation();\n }\n\n function showErrorMsg (title, data) {\n const msg = getError(data);\n toastr.error(msg, title);\n }\n\n getSupportedDriversData()\n .then(function () {\n if ($scope.editRepoPage) {\n loadPropertiesFile();\n }\n });\n }\n}\n"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/repositories/repository.constants.js","webpack:///./src/js/angular/repositories/controllers.js"],"names":["STATIC_RULESETS","id","name","REPOSITORY_TYPES","graphdbRepo","free","eeWorker","eeMaster","ontop","se","fedx","FILENAME_PATTERN","RegExp","NUMBER_PATTERN","getFileName","path","lastIdx","lastIndexOf","substring","parseNumberParamsIfNeeded","params","queryTimeout","value","parseInt","queryLimitResults","validationResultsLimitTotal","validationResultsLimitPerConstraint","leftJoinWorkerThreads","boundJoinBlockSize","joinWorkerThreads","unionWorkerThreads","getShaclOptionsClass","optionsModule","document","getElementById","isAriaExpanded","getAttribute","validateNumberFields","invalidValues","isInvalidQueryTimeout","test","isInvalidValidationResultsLimitTotal","isInvalidValidationResultsLimitPerConstraint","isInvalidQueryLimit","isInvalidLeftJoinWorkerThreads","isInvalidBoundJoinBlockSize","isInvalidJoinWorkerThreads","isInvalidUnionWorkerThreads","getInvalidParameterErrorMessage","param","$translate","instant","checkInvalidValues","invalidValuesKeys","Object","keys","invalidValuesVal","values","i","length","getDocBase","productInfo","productShortVersion","getFilteredLocations","$repositories","getLocations","then","locations","filter","location","errorMsg","degradedReason","LocationsAndRepositoriesCtrl","$scope","$rootScope","$uibModal","toastr","ModalService","$jwtAuth","LocationsRestService","LocalStorageAdapter","$interval","$q","GuidesService","loader","isLocationInactive","active","hasActiveLocation","getLocationsAbortRequestPromise","defer","finally","getActiveLocation","getLocationError","getDegradedReason","getRepositories","isRepoActive","repo","deleteLocation","uri","openSimpleModal","title","message","warning","result","addLocationHttp","dataAddLocation","addLocation","success","init","error","data","msg","getError","open","templateUrl","windowClass","controller","editLocationHttp","dataEditLocation","editLocation","resolve","setRepository","deleteRepository","repository","repositoryId","cashedDependenciesGraphPrefix","cashedClassHierarchyGraphPrefix","angular","forEach","key","startsWith","remove","removeCachedGraphsOnDelete","restartRepository","toggleDefaultRepository","getDefaultRepository","setDefaultRepository","getRepositoryDownloadLink","url","type","token","getAuthToken","encodeURIComponent","copyToClipboard","openCopyToClipboardModal","fromFile","openActiveLocationSettings","timer","isActive","guidePaused","initQuick","$on","cancel","getRepositoriesFromLocation","locationId","UploadRepositoryConfigCtrl","$uibModalInstance","Upload","upload","files","uploadFile","ok","uploadFileLoader","method","config","close","dismiss","AddLocationCtrl","newLocation","docBase","isValidLocation","indexOf","EditLocationCtrl","editedLocation","copy","ChooseRepositoryCtrl","$location","repositoryTypes","chooseRepositoryType","repoType","AddRepositoryCtrl","$timeout","$routeParams","RepositoriesRestService","repositoryType","rulesets","slice","enable","pageTitle","repositoryInfo","changedLocation","$broadcast","getConfig","getRepositoryConfiguration","member","element","find","focus","isEnterprise","isValidEERepository","isFreeEdition","isValidSERepository","isValidFRRepository","isValidOntopRepository","isValidFedXRepository","setPageTitle","activeLocation","isInvalidPieFile","uploadRuleset","ruleset","progress","evt","fileName","newValue","fileLocation","rulesetPie","unshift","rulesetPieFile","errorMessage","noMembersError","goBackToPreviousLocation","isDefined","previous","$$search","createRepoHttp","createRepository","repoId","catch","createRepo","isInvalidRepoName","rulesetWarning","pp","undefined","disableSameAs","validateNumberInput","autofocusId","EditRepositoryFileCtrl","file","getRepositoryFileContent","fileContent","content","EditRepositoryCtrl","editRepoPage","canEditRepoId","restartRequested","saveRepoId","$watch","getRepository","response","ifRulesetExists","item","setRepositoryType","saveId","status","toastrMsg","allowHtml","setTimeout","editRepoHttp","editRepository","modalMsg","editRepositoryId","module","$inject"],"mappings":"6FAAA,wMAAO,MAAMA,EAAkB,CAC3B,CAACC,GAAI,QAASC,KAAM,gBACpB,CAACD,GAAI,iBAAkBC,KAAM,oBAC7B,CAACD,GAAI,OAAQC,KAAM,QACnB,CAACD,GAAI,qBAAsBC,KAAM,yBACjC,CAACD,GAAI,sBAAuBC,KAAM,yBAClC,CAACD,GAAI,YAAaC,KAAM,aACxB,CAACD,GAAI,oBAAqBC,KAAM,uBAChC,CAACD,GAAI,UAAWC,KAAM,WACtB,CAACD,GAAI,oBAAqBC,KAAM,uBAChC,CAACD,GAAI,UAAWC,KAAM,WACtB,CAACD,GAAI,oBAAqBC,KAAM,uBAChC,CAACD,GAAI,UAAWC,KAAM,YAIbC,EAAmB,CAACC,YAAa,UAAWC,KAAM,OAAQC,SAAU,SAAUC,SAAU,SAAUC,MAAO,QAASC,GAAI,KAAMC,KAAM,QAClIC,EAAmB,IAAIC,OAAO,oBAC9BC,EAAiB,IAAID,OAAO,a,gCClBzC,sEAQO,MAAME,EAAc,SAAUC,GACjC,IAAIC,EAAUD,EAAKE,YAAY,MACd,IAAbD,IACAA,EAAUD,EAAKE,YAAY,OAE/B,IAAIf,EAAOa,EAIX,OAHiB,IAAbC,IACAd,EAAOA,EAAKgB,UAAUF,EAAU,IAE7Bd,GAGLiB,EAA4B,SAAUC,GACpCA,IACIA,EAAOC,eACPD,EAAOC,aAAaC,MAAQC,SAASH,EAAOC,aAAaC,QAEzDF,EAAOI,mBAAqBJ,EAAOK,6BAA+BL,EAAOM,qCAEzEN,EAAOI,kBAAkBF,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AU,oBAAqB,SAAU,SAAU,cAgCzF/F,EAAgB+F,QAAU,CAAC,SAAU,oBAAqB,SAAU,cAAe,cAgCnF1F,EAAiB0F,QAAU,CAAC,SAAU,oBAAqB,WAAY,eAgBvEvF,EAAqBuF,QAAU,CAAC,SAAU,aAS1ClF,EAAkBkF,QAAU,CAAC,SAAU,SAAU,gBAAiB,YAAa,WAAY,SAAU,eACjG,0BAA2B,cA8O/B1B,EAAuB0B,QAAU,CAAC,SAAU,oBAAqB,0BAA2B,OAAQ,SAAU,cAyB9GrB,EAAmBqB,QAAU,CAAC,SAAU,eAAgB,SAAU,gBAAiB,YAAa,eAAgB,0BAC5G","file":"5.315f5a38554855592c02.bundle.js","sourcesContent":["export const STATIC_RULESETS = [\n {id: 'empty', name: 'No inference'},\n {id: 'rdfs-optimized', name: 'RDFS (Optimized)'},\n {id: 'rdfs', name: 'RDFS'},\n {id: 'rdfsplus-optimized', name: 'RDFS-Plus (Optimized)'},\n {id: 'owl-horst-optimized', name: 'OWL-Horst (Optimized)'},\n {id: 'owl-horst', name: 'OWL-Horst'},\n {id: 'owl2-ql-optimized', name: 'OWL2-QL (Optimized)'},\n {id: 'owl2-ql', name: 'OWL2-QL'},\n {id: 'owl-max-optimized', name: 'OWL-Max (Optimized)'},\n {id: 'owl-max', name: 'OWL-Max'},\n {id: 'owl2-rl-optimized', name: 'OWL2-RL (Optimized)'},\n {id: 'owl2-rl', name: 'OWL2-RL'},\n\n];\n\nexport const REPOSITORY_TYPES = {graphdbRepo: 'graphdb', free: 'free', eeWorker: 'worker', eeMaster: 'master', ontop: 'ontop', se: 'se', fedx: 'fedx'};\nexport const FILENAME_PATTERN = new RegExp('^[a-zA-Z0-9-_]+$');\nexport const NUMBER_PATTERN = new RegExp('^[0-9]+$');\n","import {\n FILENAME_PATTERN,\n NUMBER_PATTERN,\n REPOSITORY_TYPES,\n STATIC_RULESETS\n} from \"./repository.constants\";\nimport {decodeHTML} from \"../../../app\";\n\nexport const getFileName = function (path) {\n let lastIdx = path.lastIndexOf('/');\n if (lastIdx === -1) {\n lastIdx = path.lastIndexOf('\\\\');\n }\n let name = path;\n if (lastIdx !== -1) {\n name = name.substring(lastIdx + 1);\n }\n return name;\n};\n\nconst parseNumberParamsIfNeeded = function (params) {\n if (params) {\n if (params.queryTimeout) {\n params.queryTimeout.value = parseInt(params.queryTimeout.value);\n }\n if (params.queryLimitResults && params.validationResultsLimitTotal && params.validationResultsLimitPerConstraint) {\n // Parse parameters properly to number\n params.queryLimitResults.value = parseInt(params.queryLimitResults.value);\n params.validationResultsLimitTotal.value = parseInt(params.validationResultsLimitTotal.value);\n params.validationResultsLimitPerConstraint.value = parseInt(params.validationResultsLimitPerConstraint.value);\n } else if (params.leftJoinWorkerThreads && params.boundJoinBlockSize && params.joinWorkerThreads && params.unionWorkerThreads) {\n params.leftJoinWorkerThreads.value = parseInt(params.leftJoinWorkerThreads.value);\n params.boundJoinBlockSize.value = parseInt(params.boundJoinBlockSize.value);\n params.joinWorkerThreads.value = parseInt(params.joinWorkerThreads.value);\n params.unionWorkerThreads.value = parseInt(params.unionWorkerThreads.value);\n }\n }\n};\n\nconst parseMemberParamIfNeeded = function (param) {\n if (param && param.member) {\n param.member.value = [];\n }\n};\n\nconst getShaclOptionsClass = function () {\n const optionsModule = document.getElementById('shaclOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'fa fa-angle-down';\n }\n }\n return 'fa fa-angle-right';\n};\n\nconst validateNumberFields = function (params, invalidValues) {\n if (params.queryTimeout) {\n invalidValues.isInvalidQueryTimeout = !NUMBER_PATTERN.test(params.queryTimeout.value);\n }\n if (params.validationResultsLimitTotal && params.validationResultsLimitPerConstraint && params.queryLimitResults) {\n invalidValues.isInvalidValidationResultsLimitTotal = !NUMBER_PATTERN.test(params.validationResultsLimitTotal.value);\n invalidValues.isInvalidValidationResultsLimitPerConstraint = !NUMBER_PATTERN.test(params.validationResultsLimitPerConstraint.value);\n invalidValues.isInvalidQueryLimit = !NUMBER_PATTERN.test(params.queryLimitResults.value);\n } else if (params.leftJoinWorkerThreads && params.boundJoinBlockSize && params.joinWorkerThreads\n && params.unionWorkerThreads) {\n invalidValues.isInvalidLeftJoinWorkerThreads = !NUMBER_PATTERN.test(params.leftJoinWorkerThreads.value);\n invalidValues.isInvalidBoundJoinBlockSize = !NUMBER_PATTERN.test(params.boundJoinBlockSize.value);\n invalidValues.isInvalidJoinWorkerThreads = !NUMBER_PATTERN.test(params.joinWorkerThreads.value);\n invalidValues.isInvalidUnionWorkerThreads = !NUMBER_PATTERN.test(params.unionWorkerThreads.value);\n }\n};\n\nconst getInvalidParameterErrorMessage = function (param, $translate) {\n if (param === \"isInvalidQueryLimit\") {\n return $translate.instant('invalid.query.limit');\n } else if (param === \"isInvalidQueryTimeout\") {\n return $translate.instant('invalid.query.timeout');\n } else if (param === \"isInvalidValidationResultsLimitTotal\") {\n return $translate.instant('invalid.validation.results.limit.total');\n } else if (param === \"isInvalidValidationResultsLimitPerConstraint\") {\n return $translate.instant('invalid.validation.results.limit.per.constraint');\n } else if (param === \"isInvalidJoinWorkerThreads\") {\n return $translate.instant('invalid.join.worker.threads');\n } else if (param === \"isInvalidLeftJoinWorkerThreads\") {\n return $translate.instant('invalid.left.join.worker.threads');\n } else if (param === \"isInvalidUnionWorkerThreads\") {\n return $translate.instant('invalid.union.worker.threads');\n } else if (param === \"isInvalidBoundJoinBlockSize\") {\n return $translate.instant('invalid.bound.join.block.size');\n }\n};\n\nconst checkInvalidValues = function (invalidValues, $translate) {\n const invalidValuesKeys = Object.keys(invalidValues);\n const invalidValuesVal = Object.values(invalidValues);\n\n for (let i = 0; i < invalidValuesKeys.length; i++) {\n if (invalidValuesVal[i]) {\n return getInvalidParameterErrorMessage(invalidValuesKeys[i], $translate);\n }\n }\n return '';\n};\n\nconst getDocBase = function (productInfo) {\n return `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}`;\n};\nconst filterLocations = function (result) {\n return result.filter((location) => !location.errorMsg && !location.degradedReason);\n};\n\n/**\n * Gets the remote locations that are error free and without degraded reason\n * @param {*} $repositories the repositories service\n * @return {[] | Promise} returns the locations as array or a promise of the array\n */\nconst getFilteredLocations = function ($repositories) {\n // Don't allow the user to create repository on location with error or degradeded reason\n return $repositories.getLocations().then((locations) => filterLocations(locations));\n};\n\nconst modules = [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.utils.localstorageadapter',\n 'toastr',\n 'ngFileUpload'\n];\n\nangular.module('graphdb.framework.repositories.controllers', modules)\n .controller('LocationsAndRepositoriesCtrl', LocationsAndRepositoriesCtrl)\n .controller('AddLocationCtrl', AddLocationCtrl)\n .controller('EditLocationCtrl', EditLocationCtrl)\n .controller('ChooseRepositoryCtrl', ChooseRepositoryCtrl)\n .controller('AddRepositoryCtrl', AddRepositoryCtrl)\n .controller('EditRepositoryCtrl', EditRepositoryCtrl)\n .controller('EditRepositoryFileCtrl', EditRepositoryFileCtrl)\n .controller('UploadRepositoryConfigCtrl', UploadRepositoryConfigCtrl);\n\nLocationsAndRepositoriesCtrl.$inject = ['$scope', '$rootScope', '$uibModal', 'toastr', '$repositories', 'ModalService', '$jwtAuth', 'LocationsRestService',\n 'LocalStorageAdapter', '$interval', '$translate', '$q', 'GuidesService'];\n\nfunction LocationsAndRepositoriesCtrl($scope, $rootScope, $uibModal, toastr, $repositories, ModalService, $jwtAuth, LocationsRestService,\n LocalStorageAdapter, $interval, $translate, $q, GuidesService) {\n $scope.loader = true;\n\n $scope.isLocationInactive = function (location) {\n return !location.active || !$scope.hasActiveLocation();\n };\n\n const getLocationsAbortRequestPromise = $q.defer();\n //Get locations\n function getLocations() {\n return $repositories.getLocations(getLocationsAbortRequestPromise)\n .then((locations) => {\n $scope.locations = locations;\n })\n .finally(() => $scope.loader = false);\n }\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.getActiveLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n $scope.getLocationError = function () {\n return $repositories.getLocationError();\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.getRepositories = function () {\n return $repositories.getRepositories();\n };\n\n $scope.isRepoActive = function (repo) {\n return $repositories.isRepoActive(repo);\n };\n\n //Delete location\n $scope.deleteLocation = function (uri) {\n ModalService.openSimpleModal({\n title: $translate.instant('location.confirm.detach'),\n message: $translate.instant('location.confirm.detach.warning', {uri: uri}),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteLocation(uri).finally(() => getLocations());\n });\n };\n\n //Add new location\n\n $scope.addLocationHttp = function (dataAddLocation) {\n $scope.loader = true;\n LocationsRestService.addLocation(dataAddLocation)\n .success(function () {\n //Reload locations and repositories\n $repositories.init();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => getLocations());\n };\n\n $scope.addLocation = function () {\n $uibModal.open({\n templateUrl: 'js/angular/templates/modal/add-location.html',\n windowClass: 'addLocationDialog',\n controller: 'AddLocationCtrl'\n }).result\n .then(function (dataAddLocation) {\n $scope.addLocationHttp(dataAddLocation);\n });\n };\n\n //Edit location\n $scope.editLocationHttp = function (dataEditLocation) {\n $scope.loader = true;\n LocationsRestService.editLocation(dataEditLocation)\n .success(function () {\n //Reload locations and repositories\n $repositories.init();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => getLocations());\n };\n\n $scope.editLocation = function (location) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/edit-location.html',\n controller: 'EditLocationCtrl',\n resolve: {\n location: function () {\n return location;\n }\n }\n });\n\n modalInstance.result.then(function (dataEditLocation) {\n $scope.editLocationHttp(dataEditLocation);\n }, function () {\n });\n };\n\n //Change repository\n $scope.setRepository = function (repo) {\n $repositories.setRepository(repo);\n };\n\n //Delete repository\n $scope.deleteRepository = function (repository) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: decodeHTML($translate.instant('delete.repo.warning.msg', {repositoryId: repository.id})),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteRepository(repository)\n .finally(() => {\n getLocations();\n $scope.loader = false;\n });\n removeCachedGraphsOnDelete(repository);\n });\n };\n\n $scope.restartRepository = function (repository) {\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.restart.repo'),\n message: decodeHTML($translate.instant('confirm.restart.repo.warning.msg', {repositoryId: repository.id})),\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.restartRepository(repository).finally(() => getLocations());\n });\n };\n\n $scope.toggleDefaultRepository = function (repositoryId) {\n if ($scope.getDefaultRepository() === repositoryId) {\n // unset\n $repositories.setDefaultRepository(null);\n } else {\n // set\n $repositories.setDefaultRepository(repositoryId);\n }\n };\n\n $scope.getDefaultRepository = function () {\n return $repositories.getDefaultRepository();\n };\n\n /* Unused, data urls don't behave well in all browsers, avoid them when possible\n $scope.getRepoTurtleConfig = function (repository) {\n function downloadRepoConfig(repoTurtleConfig, repository) {\n $('.download-turtle-config')\n .mouseup(function () {\n $(this)\n .attr('href', repoTurtleConfig)\n .attr('download', repository.id + '-config.ttl')\n });\n }\n\n $repositories.getRepositoryTurtleConfig(repository)\n .success(function (response) {\n var repoTurtleConfigDownload = 'data:application/octet-stream;charset=utf-8;base64,'\n + btoa(unescape(encodeURIComponent(response)));\n downloadRepoConfig(repoTurtleConfigDownload, repository);\n })\n .error(function () {\n toastr.error('Error getting repository configuration for '' + repository.id + ''');\n });\n };\n */\n\n $scope.getRepositoryDownloadLink = function (repository) {\n let url = `rest/repositories/${repository.id}${(repository.type === REPOSITORY_TYPES.ontop ? '/download-zip'\n : '/download-ttl')}?location=${repository.location}`;\n const token = $jwtAuth.getAuthToken();\n if (token) {\n url = `${url}&authToken=${encodeURIComponent(token)}`;\n }\n return url;\n };\n\n ///Copy to clipboard popover options\n $scope.copyToClipboard = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.fromFile = function () {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/templates/modal/upload-repository-config.html',\n controller: 'UploadRepositoryConfigCtrl'\n });\n modalInstance.result.then(function () {\n $repositories.init();\n });\n };\n\n //Delete repository\n $scope.openActiveLocationSettings = function () {\n $uibModal.open({\n templateUrl: 'js/angular/settings/modal/location-settings.html',\n controller: 'ActiveLocationSettingsCtrl'\n });\n };\n\n getLocations();\n const timer = $interval(function () {\n if (GuidesService.isActive() && !$rootScope.guidePaused) {\n // Don't refresh list while a guide is active\n return;\n }\n\n // Update repositories state\n $repositories.initQuick();\n getLocations();\n }, 5000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n // If there is a getLocations request in progress, abort it so the service can properly clear flags\n if (getLocationsAbortRequestPromise) {\n getLocationsAbortRequestPromise.resolve();\n }\n });\n\n function removeCachedGraphsOnDelete(repo) {\n const cashedDependenciesGraphPrefix = `dependencies-selectedGraph-${repo.id}`;\n const cashedClassHierarchyGraphPrefix = `classHierarchy-selectedGraph-${repo.id}`;\n angular.forEach(LocalStorageAdapter.keys(), function (key) {\n // remove everything but the hide prefixes setting, it should always persist\n if (key.startsWith(cashedClassHierarchyGraphPrefix) || key.startsWith(cashedDependenciesGraphPrefix)) {\n LocalStorageAdapter.remove(key);\n }\n });\n }\n\n $scope.getRepositoriesFromLocation = function (locationId) {\n return $repositories.getRepositoriesFromLocation(locationId);\n };\n}\n\nUploadRepositoryConfigCtrl.$inject = ['$scope', '$uibModalInstance', 'Upload', 'toastr', '$translate'];\n\nfunction UploadRepositoryConfigCtrl($scope, $uibModalInstance, Upload, toastr, $translate) {\n $scope.upload = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n }\n };\n $scope.ok = function () {\n if ($scope.uploadFile) {\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories',\n method: 'POST',\n data: {config: $scope.uploadFile}\n })\n .success(function () {\n $scope.uploadFileLoader = false;\n $uibModalInstance.close();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.uploadFileLoader = false;\n });\n }\n };\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nAddLocationCtrl.$inject = ['$scope', '$uibModalInstance', 'toastr', 'productInfo', '$translate'];\n\nfunction AddLocationCtrl($scope, $uibModalInstance, toastr, productInfo, $translate) {\n\n $scope.newLocation = {\n 'uri': '',\n 'authType': 'none',\n 'username': '',\n 'password': '',\n 'active': false\n };\n $scope.docBase = getDocBase(productInfo);\n\n $scope.isValidLocation = function () {\n return ($scope.newLocation.uri.length < 6 ||\n $scope.newLocation.uri.indexOf('http:') === 0 || $scope.newLocation.uri.indexOf('https:') === 0)\n && $scope.newLocation.uri.indexOf('/repositories') <= -1;\n };\n\n $scope.ok = function () {\n if (!$scope.newLocation) {\n toastr.error($translate.instant('location.cannot.be.empty.error'));\n return;\n }\n $uibModalInstance.close($scope.newLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditLocationCtrl.$inject = ['$scope', '$uibModalInstance', 'location', 'productInfo'];\n\nfunction EditLocationCtrl($scope, $uibModalInstance, location, productInfo) {\n\n $scope.editedLocation = angular.copy(location);\n $scope.docBase = getDocBase(productInfo);\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.editedLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nChooseRepositoryCtrl.$inject = ['$scope', '$location'];\n\nfunction ChooseRepositoryCtrl($scope, $location) {\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.chooseRepositoryType = function (repoType) {\n $location.path(`${$location.path()}/${repoType}`);\n };\n}\n\nAddRepositoryCtrl.$inject = ['$scope', 'toastr', '$repositories', '$location', '$timeout', 'Upload', '$routeParams',\n 'RepositoriesRestService', '$translate'];\n\nfunction AddRepositoryCtrl($scope, toastr, $repositories, $location, $timeout, Upload, $routeParams, RepositoriesRestService, $translate) {\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.params = $routeParams;\n $scope.repositoryType = $routeParams.repositoryType;\n $scope.enable = true;\n\n $scope.loader = true;\n $scope.pageTitle = $translate.instant('view.create.repo.title');\n $scope.repositoryInfo = {\n id: '',\n params: {},\n title: '',\n type: '',\n location: ''\n };\n\n $scope.invalidValues = {\n isInvalidQueryTimeout: false,\n isInvalidQueryLimit: false,\n isInvalidLeftJoinWorkerThreads: false,\n isInvalidBoundJoinBlockSize: false,\n isInvalidJoinWorkerThreads: false,\n isInvalidUnionWorkerThreads: false,\n isInvalidValidationResultsLimitPerConstraint: false,\n isInvalidValidationResultsLimitTotal: false\n };\n\n getFilteredLocations($repositories)\n .then((locations) => {\n $scope.locations = locations;\n });\n\n $scope.changedLocation = function () {\n $scope.$broadcast('changedLocation');\n };\n\n function isValidEERepository(repositoryType) {\n return $scope.isEnterprise() && (repositoryType === REPOSITORY_TYPES.graphdbRepo);\n }\n\n function isValidSERepository(repositoryType) {\n return !$scope.isFreeEdition() && !$scope.isEnterprise() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n\n function isValidFRRepository(repositoryType) {\n return $scope.isFreeEdition() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n\n function isValidOntopRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.ontop;\n }\n\n function isValidFedXRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.fedx;\n }\n\n function isRepositoryTypeValid(repositoryType) {\n return isValidEERepository(repositoryType) || isValidSERepository(repositoryType)\n || isValidFRRepository(repositoryType) || isValidOntopRepository(repositoryType)\n || isValidFedXRepository(repositoryType);\n }\n\n function setPageTitle(repositoryType) {\n switch (repositoryType) {\n case REPOSITORY_TYPES.graphdbRepo:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'GraphDB'});\n break;\n case REPOSITORY_TYPES.ontop:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'Ontop Virtual SPARQL'});\n break;\n case REPOSITORY_TYPES.fedx:\n $scope.pageTitle = $translate.instant('view.create.repo.title', {repoType: 'FedX Virtual SPARQL'});\n break;\n }\n }\n\n $scope.getConfig = function (repoType) {\n RepositoriesRestService.getRepositoryConfiguration(repoType).success(function (data) {\n $scope.repositoryInfo.params = data.params;\n $scope.repositoryInfo.type = data.type;\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n parseMemberParamIfNeeded($scope.repositoryInfo.params);\n $scope.loader = false;\n // The clean way is the \"autofocus\" attribute and we use it but it doesn't seem to\n // work in all browsers because of the way dynamic content is handled so give it another\n // try here.\n $timeout(function () {\n // Focus the ID field\n angular.element(document).find('#id').focus();\n }, 50);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n if ($scope.repositoryType && isRepositoryTypeValid($scope.repositoryType)) {\n $scope.repositoryInfo.type = $scope.repositoryType;\n $scope.getConfig($scope.repositoryType);\n setPageTitle($scope.repositoryType);\n } else {\n $location.path('/repository/create');\n }\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.activeLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n let isInvalidPieFile = false;\n $scope.uploadRuleset = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories/ruleset/upload',\n data: {ruleset: $scope.uploadFile, location: $scope.repositoryInfo.location}\n }).progress(function (evt) {\n /*\t\t\t\t\t\tvar progressPercentage = parseInt(100.0 * evt.loaded / evt.total);\n console.log('progress: ' + progressPercentage + '% ' + evt.config.file.name);*/\n }).success(function (data) {\n if (!data.success) {\n toastr.error(data.errorMessage);\n isInvalidPieFile = true;\n } else {\n const fileName = $scope.uploadFile.name;\n const newValue = {id: data.fileLocation, name: 'Custom: ' + fileName};\n if ($scope.rulesetPie) {\n // file was previously uploaded\n $scope.rulesets[0] = newValue;\n } else {\n // file uploaded for the first time\n $scope.rulesets.unshift(newValue);\n }\n $scope.rulesetPie = data.fileLocation;\n $scope.rulesetPieFile = fileName;\n $scope.repositoryInfo.params.ruleset.value = $scope.rulesetPie;\n }\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.uploadFile = '';\n $scope.uploadFileLoader = false;\n });\n }\n };\n\n $scope.noMembersError = function () {\n toastr.error($translate.instant('fedx.create.repo.no.members.warning'));\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.createRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.createRepository($scope.repositoryInfo)\n .then(function () {\n toastr.success($translate.instant('created.repo.success.msg', {repoId: $scope.repositoryInfo.id}));\n $repositories.init();\n })\n .catch(function (error) {\n const msg = getError(error.data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => {\n $scope.loader = false;\n $scope.goBackToPreviousLocation();\n });\n };\n\n $scope.createRepo = function () {\n if (!$scope.repositoryInfo.id) {\n toastr.error($translate.instant('empty.repoid.warning'));\n return;\n }\n\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n const invalidValues = checkInvalidValues($scope.invalidValues, $translate);\n\n if (isInvalidPieFile) {\n toastr.error($translate.instant('invalid.ruleset.file.error'));\n } else if ($scope.isInvalidRepoName) {\n toastr.error($translate.instant('wrong.repo.name.error'));\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if (invalidValues) {\n toastr.error(invalidValues);\n } else {\n $scope.createRepoHttp();\n }\n };\n\n $scope.rulesetWarning = function () {\n const pp = $scope.repositoryInfo.params;\n if (pp === undefined || pp.ruleset === undefined || pp.disableSameAs === undefined) {\n return '';\n }\n\n if (pp.ruleset.value.indexOf('owl') === 0 && pp.disableSameAs.value === 'true') {\n return $translate.instant('repoTooltips.rulesetWarnings.needsSameAs');\n } else if (pp.ruleset.value.indexOf('rdfs') === 0 && pp.disableSameAs.value === 'false') {\n return $translate.instant('repoTooltips.rulesetWarnings.doesntNeedSameAs');\n } else if (pp.ruleset.value === $scope.rulesetPie) {\n return $translate.instant('repoTooltips.rulesetWarnings.customRuleset');\n } else {\n return '';\n }\n };\n\n $scope.validateNumberInput = function () {\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n };\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n };\n //TODO - check if repositoryID exist\n\n // Request auto-focus of the ID input when creating a repo (but not when editing)\n $scope.autofocusId = 'autofocus';\n}\n\nEditRepositoryFileCtrl.$inject = ['$scope', '$uibModalInstance', 'RepositoriesRestService', 'file', 'toastr', '$translate'];\n\nfunction EditRepositoryFileCtrl($scope, $uibModalInstance, RepositoriesRestService, file, toastr, $translate) {\n\n if (file) {\n RepositoriesRestService.getRepositoryFileContent(file).success(function (data) {\n $scope.fileContent = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n }\n\n $scope.ok = function () {\n $uibModalInstance.close({\n content: $scope.fileContent,\n fileLocation: file\n });\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditRepositoryCtrl.$inject = ['$scope', '$routeParams', 'toastr', '$repositories', '$location', 'ModalService', 'RepositoriesRestService',\n '$translate'];\n\nfunction EditRepositoryCtrl($scope, $routeParams, toastr, $repositories, $location, ModalService, RepositoriesRestService, $translate) {\n\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n\n $scope.editRepoPage = true;\n $scope.canEditRepoId = false;\n $scope.params = $routeParams;\n $scope.loader = true;\n $scope.repositoryInfo = {};\n $scope.repositoryInfo.id = $scope.params.repositoryId;\n $scope.repositoryInfo.location = $scope.params.location;\n $scope.repositoryInfo.restartRequested = false;\n $scope.repositoryType = '';\n $scope.saveRepoId = $scope.params.repositoryId;\n $scope.pageTitle = $translate.instant('view.edit.repo.title', {repositoryId: $scope.params.repositoryId});\n $scope.invalidValues = {\n isInvalidQueryTimeout: false,\n isInvalidQueryLimit: false,\n isInvalidLeftJoinWorkerThreads: false,\n isInvalidBoundJoinBlockSize: false,\n isInvalidJoinWorkerThreads: false,\n isInvalidUnionWorkerThreads: false,\n isInvalidValidationResultsLimitPerConstraint: false,\n isInvalidValidationResultsLimitTotal: false\n };\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.$watch($scope.hasActiveLocation, function () {\n if ($scope.hasActiveLocation) {\n // Should get locations before getting repository info\n getFilteredLocations($repositories).then((locations) => {\n $scope.locations = locations;\n return RepositoriesRestService.getRepository($scope.repositoryInfo);\n })\n .then(function (response) {\n const data = response.data;\n if (angular.isDefined(data.params.ruleset)) {\n let ifRulesetExists = false;\n angular.forEach($scope.rulesets, function (item) {\n if (item.id === data.params.ruleset.value) {\n ifRulesetExists = true;\n }\n });\n if (data.params.ruleset && !ifRulesetExists) {\n const name = getFileName(data.params.ruleset.value);\n $scope.rulesets.unshift({id: data.params.ruleset.value, name: 'Custom: ' + name});\n }\n }\n $scope.repositoryInfo = data;\n $scope.setRepositoryType(data.type);\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n $scope.repositoryInfo.saveId = $scope.saveRepoId;\n $scope.loader = false;\n })\n .catch(function (response) {\n const data = response.data;\n const status = response.status;\n const repositoryId = $routeParams.repositoryId;\n let toastrMsg;\n\n if (status === 404 && repositoryId !== 'system') {\n toastrMsg = decodeHTML($translate.instant('edit.repo.error.not.exists', {repositoryId}));\n } else if (status === 404 && repositoryId === 'system') {\n toastrMsg = decodeHTML($translate.instant('edit.system.repo.warning'));\n } else {\n toastrMsg = getError(data);\n }\n\n toastr.error(toastrMsg, $translate.instant('common.error'), {allowHtml: true});\n\n if (status === 404) {\n setTimeout(function () {\n $scope.loader = false;\n $location.path('repository');\n }, 1000);\n } else {\n $scope.loader = false;\n }\n });\n }\n });\n\n $scope.setRepositoryType = function (type) {\n $scope.repositoryType = type;\n };\n\n $scope.noMembersError = function () {\n toastr.error($translate.instant('fedx.create.repo.no.members.warning'));\n };\n\n $scope.editRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.editRepository($scope.repositoryInfo.saveId, $scope.repositoryInfo)\n .success(function () {\n toastr.success($translate.instant('edit.repo.success.msg', {saveId: $scope.repositoryInfo.saveId}));\n $repositories.init().finally(() => $scope.goBackToPreviousLocation());\n if ($scope.repositoryInfo.saveId === $scope.repositoryInfo.id && $scope.repositoryInfo.restartRequested) {\n $repositories.restartRepository($scope.repositoryInfo);\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editRepository = function () {\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n const invalidValues = checkInvalidValues($scope.invalidValues, $translate);\n let modalMsg = decodeHTML($translate.instant('edit.repo.save.changes.msg', {repoId: $scope.repositoryInfo.id}));\n if ($scope.repositoryInfo.saveId !== $scope.repositoryInfo.id) {\n modalMsg += decodeHTML($translate.instant('edit.repo.rename.changes.msg'));\n } else if ($scope.repositoryInfo.restartRequested) {\n modalMsg += decodeHTML($translate.instant('edit.repo.restart.requested.msg'));\n } else {\n modalMsg += decodeHTML($translate.instant('edit.repo.restart.needed.msg'));\n }\n if ($scope.isInvalidRepoName) {\n toastr.error($translate.instant('wrong.repo.name.error'));\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if (invalidValues) {\n toastr.error(invalidValues);\n } else {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.save'),\n message: modalMsg,\n warning: true\n }).result\n .then(function () {\n $scope.editRepoHttp();\n });\n }\n };\n\n $scope.editRepositoryId = function () {\n let msg = decodeHTML($translate.instant('edit.repo.id.warning.msg'));\n if ($scope.isEnterprise()) {\n msg += decodeHTML($translate.instant('edit.repo.id.cluster.warning.msg'));\n }\n ModalService.openSimpleModal({\n title: $translate.instant('confirm.enable.edit'),\n message: msg,\n warning: true\n }).result.then(function () {\n $scope.canEditRepoId = true;\n });\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.validateNumberInput = function () {\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n };\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n };\n}\n"],"sourceRoot":""}