graphdb-workbench 3.5.1-TR3 → 3.5.1

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 (119) hide show
  1. package/dist/{31415.aba4cdda066690a2769d.bundle.js → 31415.8d180c0aaafea01d84c5.bundle.js} +2 -2
  2. package/dist/31415.8d180c0aaafea01d84c5.bundle.js.map +1 -0
  3. package/dist/3395.0a62c93740e681cddba2.bundle.js +2 -0
  4. package/dist/3395.0a62c93740e681cddba2.bundle.js.map +1 -0
  5. package/dist/{64709.d6d3d413c90077b5d0cc.bundle.js → 64709.fba061d1e333d77d2644.bundle.js} +2 -2
  6. package/dist/{64709.d6d3d413c90077b5d0cc.bundle.js.map → 64709.fba061d1e333d77d2644.bundle.js.map} +1 -1
  7. package/dist/65677.646a9ee2a63ba19c0fd3.bundle.js +2 -0
  8. package/dist/65677.646a9ee2a63ba19c0fd3.bundle.js.map +1 -0
  9. package/dist/73334.1487d58b7e885510d107.bundle.js +2 -0
  10. package/dist/73334.1487d58b7e885510d107.bundle.js.map +1 -0
  11. package/dist/80933.542ad26ccd92fdc2c05d.bundle.js +2 -0
  12. package/dist/80933.542ad26ccd92fdc2c05d.bundle.js.map +1 -0
  13. package/dist/82917.020f840fc63c2066169e.bundle.js +2 -0
  14. package/dist/{82917.c97f7cec0372ff2f6fdd.bundle.js.map → 82917.020f840fc63c2066169e.bundle.js.map} +1 -1
  15. package/dist/85698.b186c57a2d0edee24110.bundle.js +2 -0
  16. package/dist/85698.b186c57a2d0edee24110.bundle.js.map +1 -0
  17. package/dist/86099.959943bc458a7ef148e9.bundle.js +2 -0
  18. package/dist/86099.959943bc458a7ef148e9.bundle.js.map +1 -0
  19. package/dist/8981.cb785cbc13b19f924ebc.bundle.js +2 -0
  20. package/dist/8981.cb785cbc13b19f924ebc.bundle.js.map +1 -0
  21. package/dist/assets/i18n/language-config.json +1 -1
  22. package/dist/css/cluster-configuration/multi-region.css +1 -1
  23. package/dist/css/clustermanagement.css +1 -1
  24. package/dist/css/lib/ontotext-yasgui-web-component.css +1 -1
  25. package/dist/index.html +9 -9
  26. package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
  27. package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +6 -6
  28. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  29. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  30. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  31. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  32. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  33. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  34. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
  35. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  36. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  37. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  38. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  39. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  40. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  41. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  42. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  43. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  44. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  45. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  46. package/dist/js/angular/security/templates/user.html +2 -2
  47. package/dist/js/angular/security/templates/users.html +1 -1
  48. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  49. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  50. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  51. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  52. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  53. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  54. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  55. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  56. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  57. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  58. package/dist/legacyWorkbench.22aacd4da951e43b2876.js +3 -0
  59. package/dist/{legacyWorkbench.cdb2fb6bc573f9a9b49d.js.map → legacyWorkbench.22aacd4da951e43b2876.js.map} +1 -1
  60. package/dist/license-checker.json +19 -32
  61. package/dist/{main.8dd8af071ff43504a729.js → main.3665e695a5c0d2e9b4c0.js} +3 -3
  62. package/dist/{main.8dd8af071ff43504a729.js.map → main.3665e695a5c0d2e9b4c0.js.map} +1 -1
  63. package/dist/pages/aclmanagement.html +1 -1
  64. package/dist/pages/autocomplete.html +1 -1
  65. package/dist/pages/choose-repository-type.html +1 -1
  66. package/dist/pages/cluster-management/clusterInfo.html +2 -2
  67. package/dist/pages/create-index.html +1 -1
  68. package/dist/pages/dependencies.html +1 -1
  69. package/dist/pages/domainRangeInfo.html +2 -2
  70. package/dist/pages/edit.html +1 -1
  71. package/dist/pages/explore.html +1 -1
  72. package/dist/pages/export.html +1 -1
  73. package/dist/pages/find.html +1 -1
  74. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  75. package/dist/pages/graphs-visualizations.html +7 -7
  76. package/dist/pages/guides.html +1 -1
  77. package/dist/pages/home.html +1 -1
  78. package/dist/pages/import.html +2 -2
  79. package/dist/pages/jdbc-create.html +1 -1
  80. package/dist/pages/jdbc.html +1 -1
  81. package/dist/pages/monitor/backup-and-restore.html +1 -1
  82. package/dist/pages/monitor/queries.html +1 -1
  83. package/dist/pages/monitor/resources.html +1 -1
  84. package/dist/pages/namespaces.html +2 -2
  85. package/dist/pages/plugins.html +1 -1
  86. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  87. package/dist/pages/rdfrank.html +2 -2
  88. package/dist/pages/repositories.html +1 -1
  89. package/dist/pages/repository.html +1 -1
  90. package/dist/pages/similarity-indexes.html +1 -1
  91. package/dist/pages/sparql-editor.html +1 -1
  92. package/dist/pages/sparql-template-create.html +1 -1
  93. package/dist/pages/sparql-templates.html +1 -1
  94. package/dist/pages/ux-test1.html +2 -2
  95. package/dist/pages/webapi.html +2 -2
  96. package/dist/res/swagger5/index.html +11 -11
  97. package/dist/workbench/license-checker.json +17 -17
  98. package/dist/workbench/workbench/{166.2aacf63cc15a20ef.js → 166.2447618295f9f57e.js} +1 -1
  99. package/dist/workbench/workbench/workbenchApp.js +1 -1
  100. package/package.json +1 -1
  101. package/dist/31415.aba4cdda066690a2769d.bundle.js.map +0 -1
  102. package/dist/3395.ded80bae10361d1d4573.bundle.js +0 -2
  103. package/dist/3395.ded80bae10361d1d4573.bundle.js.map +0 -1
  104. package/dist/65677.0e8ab27737300e991c60.bundle.js +0 -2
  105. package/dist/65677.0e8ab27737300e991c60.bundle.js.map +0 -1
  106. package/dist/73334.1b0e8bb637fbd1ce73ef.bundle.js +0 -2
  107. package/dist/73334.1b0e8bb637fbd1ce73ef.bundle.js.map +0 -1
  108. package/dist/80933.bd439bb6f5fad66637ac.bundle.js +0 -2
  109. package/dist/80933.bd439bb6f5fad66637ac.bundle.js.map +0 -1
  110. package/dist/82917.c97f7cec0372ff2f6fdd.bundle.js +0 -2
  111. package/dist/85698.ee9962969a310107ccf8.bundle.js +0 -2
  112. package/dist/85698.ee9962969a310107ccf8.bundle.js.map +0 -1
  113. package/dist/86099.ab3779d6538a6648b2b7.bundle.js +0 -2
  114. package/dist/86099.ab3779d6538a6648b2b7.bundle.js.map +0 -1
  115. package/dist/8981.ebd2159613630a2daf7e.bundle.js +0 -2
  116. package/dist/8981.ebd2159613630a2daf7e.bundle.js.map +0 -1
  117. package/dist/legacyWorkbench.cdb2fb6bc573f9a9b49d.js +0 -3
  118. /package/dist/{legacyWorkbench.cdb2fb6bc573f9a9b49d.js.LICENSE.txt → legacyWorkbench.22aacd4da951e43b2876.js.LICENSE.txt} +0 -0
  119. /package/dist/{main.8dd8af071ff43504a729.js.LICENSE.txt → main.3665e695a5c0d2e9b4c0.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench",
3
- "version": "3.5.1-TR3",
3
+ "version": "3.5.1",
4
4
  "description": "The web application for GraphDB APIs",
5
5
  "engines": {
6
6
  "node": ">=22.17"
@@ -1 +0,0 @@
1
- {"version":3,"file":"31415.aba4cdda066690a2769d.bundle.js","mappings":"wMAUAA,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAAqB,CACvBC,WAAY,aACZC,MAAO,QACPC,aAAc,gBAGlB,SAASL,EAAqBM,EAAUC,EAAWC,EAAYC,EAAQC,GACnE,MAAO,CACHC,SAAU,IACVC,YAAa,0FACbC,MAAO,CACHC,YAAa,IACbC,aAAc,IACdC,qBAAsB,KAE1BC,KAAOC,IAIH,MAAMC,EAAgB,GAKtBD,EAAOhB,mBAAqBA,EAC5BgB,EAAOE,UAAYlB,EAAmBC,WAKtCe,EAAOG,+BAAiC,KACpCX,EAA0BY,iCAG9BJ,EAAOK,UAAY,CAACC,EAAQC,KACxBP,EAAOE,UAAYK,GAkBvBP,EAAOQ,IAAI,WAAY,WAHnBP,EAAcQ,QAASC,GAAiBA,KAKxCV,EAAOG,gCACX,GAdIF,EAAcU,KAAKnB,EAA0BoB,gCAAiCC,IACrEA,IACDb,EAAOE,UAAYlB,EAAmBC,gBAuB9D,C,SC3EA,SAAS6B,IACL,MAAO,CACHrB,S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kB,mBAClBC,mCAAoC,sCAG3BC,EAAY,CACrBC,QAAS,UACTd,YAAa,cACbe,QAAS,UACTd,cAAe,gBAEfO,mBAAoB,sBAGX5F,EAAgB,CACzBoG,aAAc,eACdC,eAAgB,iB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/events.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/clustermanagement/states.js"],"sourcesContent":["import 'angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/multi-region.directive';\n\nconst modules = [\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration', modules)\n .directive('clusterConfiguration', ClusterConfiguration);\n\nClusterConfiguration.$inject = ['$jwtAuth', '$uibModal', '$translate', 'toastr', 'ClusterViewContextService'];\n\nconst CONFIGURATION_TABS = {\n PROPERTIES: 'properties',\n NODES: 'nodes',\n MULTI_REGION: 'multi_region'\n};\n\nfunction ClusterConfiguration($jwtAuth, $uibModal, $translate, toastr, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.CONFIGURATION_TABS = CONFIGURATION_TABS;\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n\n // =========================\n // Public functions\n // =========================\n $scope.closeClusterConfigurationPanel = () => {\n ClusterViewContextService.hideClusterConfigurationPanel();\n };\n\n $scope.switchTab = ($event, tab) => {\n $scope.activeTab = tab;\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel((show) => {\n if (!show) {\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n }\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n $scope.closeClusterConfigurationPanel();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n subscribeHandlers();\n };\n init();\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes', modules)\n .directive('clusterNodes', ClusterNodes);\n\nClusterNodes.$inject = [];\n\nfunction ClusterNodes() {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html',\n scope: {\n currentNode: '=',\n clusterModel: '='\n }\n };\n}\n","import {DELETE_CLUSTER, UPDATE_CLUSTER} from \"../../events\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties', modules)\n .directive('clusterProperties', ClusterProperties);\n\nClusterProperties.$inject = ['$jwtAuth', '$uibModal'];\n\nfunction ClusterProperties($jwtAuth, $uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n\n // =========================\n // Public variables\n // =========================\n $scope.isAdmin = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: () => {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n $scope.$emit(UPDATE_CLUSTER, {force: true});\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then((forceDelete) => {\n $scope.$emit(DELETE_CLUSTER, {force: forceDelete});\n });\n };\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n };\n init();\n }\n };\n}\n","import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from '../../../models/clustermanagement/cluster';\nimport {NodeState, TopologyState} from '../../../models/clustermanagement/states';\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator',\n];\n\nconst TagLengthConstraints = {\n minLen: '3',\n maxLen: '255',\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '=',\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n $scope.loader = false;\n $scope.statusLoader = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag,\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true,\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader?.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static',\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag,\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setStatusLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setStatusLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\n } else {\n $scope.loader = false;\n }\n };\n\n const setStatusLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.statusLoader = loader;\n }, 150);\n } else {\n $scope.statusLoader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function() {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n },\n };\n}\n","export const UPDATE_CLUSTER = 'updateCluster';\nexport const DELETE_CLUSTER = 'deleteCluster';\n\n/**\n * Event fired from the cluster-graphical-view component up to its parent when user clicks somewhere in the view.\n * The payload is the event target HTMLElement.\n * @type {string}\n */\nexport const CLICK_IN_VIEW = 'clickInView';\n\n/**\n * Event fired from the cluster-graphical-view component up to its parent when user selects a node from the visualization.\n * The payload is the selected node.\n * @type {string}\n */\nexport const NODE_SELECTED = 'nodeSelected';\n\n/**\n * Event fired when the cluster zone visualization is clicked while there is no cluster yet.\n * @type {string}\n */\nexport const CREATE_CLUSTER = 'createCluster';\n\n/**\n * Event fired from the cluster management view component down to the child visualization informing it that the model\n * was updated.\n * @type {string}\n */\nexport const MODEL_UPDATED = 'modelUpdated';\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","export const NodeState = {\n LEADER: 'LEADER',\n FOLLOWER: 'FOLLOWER',\n CANDIDATE: 'CANDIDATE',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n NO_CONNECTION: 'NO_CONNECTION',\n READ_ONLY: 'READ_ONLY',\n RESTRICTED: 'RESTRICTED',\n NO_CLUSTER: 'NO_CLUSTER'\n};\n\nexport const RecoveryState = {\n SEARCHING_FOR_NODE: 'SEARCHING_FOR_NODE',\n WAITING_FOR_SNAPSHOT: 'WAITING_FOR_SNAPSHOT',\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT',\n APPLYING_SNAPSHOT: 'APPLYING_SNAPSHOT',\n BUILDING_SNAPSHOT: 'BUILDING_SNAPSHOT',\n SENDING_SNAPSHOT: 'SENDING_SNAPSHOT',\n RECOVERY_OPERATION_FAILURE_WARNING: 'RECOVERY_OPERATION_FAILURE_WARNING'\n};\n\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION',\n // complimentary state, built based on the recovery state of two nodes when one is receiving snapshot to the other\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT'\n};\n\nexport const TopologyState = {\n PRIMARY_NODE: 'PRIMARY_NODE',\n SECONDARY_NODE: 'SECONDARY_NODE'\n};\n"],"names":["angular","module","directive","ClusterConfiguration","$inject","CONFIGURATION_TABS","PROPERTIES","NODES","MULTI_REGION","$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService","restrict","templateUrl","scope","currentNode","clusterModel","clusterConfiguration","link","$scope","subscriptions","activeTab","closeClusterConfigurationPanel","hideClusterConfigurationPanel","switchTab","$event","tab","$on","forEach","subscription","push","onShowClusterConfigurationPanel","show","ClusterNodes","ClusterProperties","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","isAdmin","showEditConfigurationDialog","open","controller","size","resolve","data","result","finally","$emit","UPDATE_CLUSTER","force","showDeleteDialog","then","forceDelete","DELETE_CLUSTER","isAuthenticated","TagLengthConstraints","minLen","maxLen","MultiRegion","$timeout","ModalService","ClusterRestService","topology","undefined","TopologyState","addingTag","loaderTimeout","secondaryTag","loader","statusLoader","add","cancel","createTag","tag","payload","setLoader","addCusterTag","success","instant","catch","response","msg","getError","error","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","$uibModalInstance","config","rpcAddress","onClick","ok","close","primaryNode","dismiss","openCustomModal","updateClusterData","setStatusLoader","getClusterConfig","fromJSON","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","loaderMessage","$watch","newValue","oldValue","CLICK_IN_VIEW","NODE_SELECTED","CREATE_CLUSTER","MODEL_UPDATED","require","element","attrs","ngModel","validateAscii","value","isValid","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","length","FOLLOWER","CANDIDATE","OUT_OF_SYNC","NO_CONNECTION","READ_ONLY","RESTRICTED","NO_CLUSTER","RecoveryState","SEARCHING_FOR_NODE","WAITING_FOR_SNAPSHOT","RECEIVING_SNAPSHOT","APPLYING_SNAPSHOT","BUILDING_SNAPSHOT","SENDING_SNAPSHOT","RECOVERY_OPERATION_FAILURE_WARNING","LinkState","IN_SYNC","SYNCING","PRIMARY_NODE","SECONDARY_NODE"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=3395;export const __webpack_esm_ids__=[3395,4552,19146,33931,34e3,64073,67262,81417];export const __webpack_esm_modules__={3395(e,t,n){n(22742),n(33136),n(88986),n(96972),n(31415),n(64073),n(75752),n(11014),n(75890),n(67262),n(19146),angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers.cluster-management","graphdb.framework.clustermanagement.directives.cluster-graphical-view","graphdb.framework.clustermanagement.directives.cluster-configuration","graphdb.framework.clustermanagement.directives.cluster-nodes-configuration","graphdb.framework.core.directives.validate-url","graphdb.framework.core.directives.validate-duplicate-url"])},31415(e,t,n){n(3686),n(34e3),n(85698),angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",o),o.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const r={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function o(e,t,n,o,a){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const t=[];e.CONFIGURATION_TABS=r,e.activeTab=r.PROPERTIES,e.closeClusterConfigurationPanel=()=>{a.hideClusterConfigurationPanel()},e.switchTab=(t,n)=>{e.activeTab=n},e.$on("$destroy",function(){t.forEach(e=>e()),e.closeClusterConfigurationPanel()}),t.push(a.onShowClusterConfigurationPanel(t=>{t||(e.activeTab=r.PROPERTIES)}))}}}},34e3(){function e(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",e),e.$inject=[]},3686(e,t,n){var r=n(14267),o=n(57154);function a(e,t){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const n=(0,o.service)(o.AuthorizationService),a=(0,o.service)(o.AuthenticationService);e.isAdmin=!1,e.showEditConfigurationDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:e.clusterConfiguration})}}).result.finally(function(){e.$emit(r.pw,{force:!0})})},e.showDeleteDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(t=>{e.$emit(r.fe,{force:t})})},e.isAdmin=a.isAuthenticated()&&n.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",a),a.$inject=["$jwtAuth","$uibModal"]},85698(e,t,n){n(4552),n(33931);var r=n(8981),o=n(58325),a=n(57154);const i={minLen:"3",maxLen:"255"};function s(e,t,n,s,c,l,u){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:e=>{const d=(0,a.service)(a.AuthorizationService),g=(0,a.service)(a.AuthenticationService),m=[];e.topology=void 0,e.TopologyState=o.zB,e.isAdmin=!1,e.addingTag=!1,e.loaderTimeout=void 0,e.secondaryTag=void 0,e.TagLengthConstraints=i,e.loader=!1,e.statusLoader=!1,e.add=()=>{e.addingTag=!0},e.cancel=()=>{e.addingTag=!1},e.createTag=n=>{const r={tag:n};return h(!0),l.addCusterTag(r).then(()=>{s.success(t.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:n}))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{e.addingTag=!1,h(!1)})},e.deleteTag=e=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:e}),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.deleteClusterTag(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:e}))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>h(!1))},e.enableSecondaryMode=()=>{e.addingTag=!1;const n={title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};c.openSimpleModal(n).result.then(()=>p()).then(e=>(h(!0),l.enableSecondaryMode(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>h(!1))},e.disableSecondaryMode=()=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.disableSecondaryMode())).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>h(!1))};const p=()=>{const e={title:t.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:["$scope","$uibModalInstance","config",function(e,t,n){e.rpcAddress="",e.tag="",e.title=n.title,e.onClick=e=>e.stopPropagation(),e.ok=()=>{t.close({primaryNode:e.rpcAddress,tag:e.tag})},e.cancel=()=>{t.dismiss("cancel")}}],size:"lg",warning:!0,backdrop:"static"};return c.openCustomModal(e).result},f=n=>{_(!0),l.getClusterConfig().then(t=>{e.secondaryTag=r.v9.fromJSON(t.data).secondaryTag,(t=>{const n=t.nodes.find(e=>e.nodeState===o.UY.LEADER);e.topology=n?.topologyStatus})(r.kY.fromJSON(n))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>_(!1))},h=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.loader=t},150)):e.loader=!1},_=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.statusLoader=t},150)):e.statusLoader=!1};e.$on("$destroy",function(){m.forEach(e=>e())}),e.isAdmin=g.isAuthenticated()&&d.isAdmin(),m.push(e.$watch("clusterModel",function(e,t){e!==t&&f(e)},!0)),m.push(u.onShowClusterConfigurationPanel(t=>{t||(e.addingTag=!1)})),f(e.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",s),s.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},96972(e,t,n){n(38473),n(23236);var r=n(24125),o=n(22723),a=n(14267),i=n(44482),s=n(57154);const c={select:i.select};let l=240;const u={no_cluster_configured:"",create_cluster_btn:"",legend_node_state:"",legend_link_state:"",node_state_leader:"Leader",node_state_follower:"Follower",node_state_candidate:"Candidate",node_state_no_cluster:"No cluster",node_state_out_of_sync:"Out of sync",node_state_no_connection:"No connection",node_state_read_only:"Read only",node_state_restricted:"Restricted",link_state_in_sync:"In sync",link_state_syncing:"Syncing",link_state_out_of_sync:"Out of sync",recovery_state:{searching_for_node:"Searching for node",waiting_for_snapshot:"Waiting for snapshot from node",receiving_snapshot:"Receiving a snapshot from node",applying_snapshot:"Applying a snapshot",building_snapshot:"Building a snapshot for node",sending_snapshot:"Sending a snapshot to node",recovery_operation_failure_warning:"Node unable to recover. Action required"}},d={node_state:"legend_node_state",link_state:"legend_link_state"};angular.module("graphdb.framework.clustermanagement.directives.cluster-graphical-view",["graphdb.framework.utils.localstorageadapter","graphdb.framework.clustermanagement.directives.cluster-legend"]).directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$jwtAuth","$rootScope","ClusterViewContextService",function(e,t,n,i,g,m,p,f){return{restrict:"E",scope:{clusterModel:"="},link:function(m,h){const _=(0,s.service)(s.AuthorizationService),v=angular.element(e),w=[];let y,C,b,k,S,N=U(),M=P(),E=Math.min(N,M)/2-100,T=N/2,A=M/2;function x(){const e=f.getClusterViewD3Container();N=U(),M=P(),e.attr("width",N),e.attr("height",M),I()}function L(e,t=""){Object.keys(e).forEach(n=>{let r="";t&&(r+=t),r+=`.${n}`;const o=e[n];"string"==typeof o?e[n]=g.instant(`cluster_management.cluster_graphical_view${r}`):"object"==typeof o&&L(o,r)})}function U(){const r="collapsedMenu"===t.get(n.MENU_STATE);return l=r?70:240,Math.max(Math.floor(.95*(e.innerWidth-l)),600)}function P(){return Math.max(.95*(e.innerHeight-250),675)}function V(e){m.$emit(a.DP,e.target)}function I(){E=Math.min(N,M)/2-100,T=N/2,A=M/2,r.cZ(b,T,A),b.select(".cluster-zone").attr("r",E),C!==m.clusterModel.hasCluster&&(C=!!m.clusterModel.hasCluster,function(e){r.Xl(e,b,u,y),!e&&y&&b.on("mouseup",()=>{m.$emit(a.Yn)})}(C));const e=function(){const e=(0,o.cloneDeep)(m.clusterModel.nodes)||[];return e.forEach(e=>{if(e.hostname=i.shortenIri(e.endpoint),!(0,o.isEmpty)(e.recoveryStatus)){let t=`cluster_management.cluster_graphical_view.recovery_state.${e.recoveryStatus.state.toLowerCase()}`;e.recoveryStatus.affectedNodes&&e.recoveryStatus.affectedNodes.length>0&&(t+="_with_affected_node"),e.recoveryStatus.message=g.instant(t,{node:e.recoveryStatus.affectedNodes.join(", ")})}}),e}();!function(e){const t=k.selectAll("#node-group").data(e,e=>e.address),n=r.kI(t,45);n.on("click",(e,t)=>{m.$emit(a.vu,t);const n=c.select(".nodetooltip"),r=$(window).width();e.pageX<r/2?(n.style("left",e.pageX+"px"),n.style("right","")):(n.style("left",""),n.style("right",r-e.pageX+"px")),n.style("top",e.pageY-28+"px")}),r.HF(n),r.ss(n,T,A,E)}(e),function(e,t){const n=S.selectAll(".link").data(e,e=>e.id);r.cy(n),r.$$(n,t),r.Tk(S,e,t)}((0,o.cloneDeep)(m.clusterModel.links)||[],e)}m.width=function(){return N},m.height=function(){return M},m.$on("$destroy",function(){v.unbind("resize",x),v.unbind("mousedown",V),r.Wg(),w.forEach(e=>e())}),y=_.isAdmin(),v.bind("resize",x),v.bind("mousedown",V),w.push(p.$on("$translateChangeSuccess",function(){L(u),r.r_(C,b,u),Object.keys(d).forEach(e=>{c.select(`#${e}`).text(function(e){return u[d[e]]}(e))})})),w.push(m.$on(a.aV,function(){I()})),L(u),function(e){const t=r.J5(h[0]).attr("width",N).attr("height",M);b=r.dB(t,e),S=t.append("g").attr("id","links-group"),k=t.append("g").attr("id","nodes-group"),r.D6(t,r.ZC.BIG),r.D6(t,r.ZC.SMALL),f.updateClusterViewD3Container(t)}(!(!m.clusterModel.nodes||!m.clusterModel.nodes.length)),I()}}}])},64073(e,t,n){var r=n(8981);function o(e,t,n,o,a,i,s){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-nodes-configuration.html",link:n=>{const o=[];n.rowHeights={},n.editedNodeIndex=void 0,n.allSuggestions=[],n.loader=!1,n.errors=[],n.addNewLocation=!1,n.hasCluster=!1,n.addNode=()=>{n.addNewLocation=!0,n.newLocation=new r.aZ,t(function(){const e=document.querySelector("input[name='location']");e&&e.focus()},0)},n.filterSuggestions=e=>{const t=e.endpoint&&e.endpoint.toLowerCase();t?(n.suggestions=n.allSuggestions.filter(e=>e.toLowerCase().includes(t)),n.showDropdown=!0):(n.suggestions=[],n.showDropdown=!1)},n.selectSuggestion=(e,t)=>{e.endpoint=t,n.suggestions=[],n.showDropdown=!1},n.hideSuggestions=()=>{t(()=>{n.showDropdown=!1},200)},n.handleKeydown=function(e,t,r){"Enter"===e.key&&t?(e.preventDefault(),n.saveNode(r)):"Escape"===e.key&&n.cancel()},n.saveNode=e=>{const t=i.getAvailable(!0);var n,o;n=i.findByEndpoint(t,e)||new r.aZ(e),(o=i.getPendingReplace())?i.replace(o,n):i.addLocation(n),a()},n.deleteNode=(t,n)=>{s.openSimpleModal({title:e.instant("location.confirm.detach"),message:e.instant("location.confirm.detach.warning",{uri:n.endpoint}),warning:!0}).result.then(()=>{i.deleteFromCluster(n.item)})},n.replaceNode=(t,r)=>{s.openSimpleModal({title:e.instant("location.change.confirm"),message:e.instant("location.change.confirm.warning"),warning:!0}).result.then(()=>{i.setPendingReplace(r.item),n.editedNodeIndex=t})},n.isClusterConfigurationValid=()=>{const e=void 0===n.editedNodeIndex,t=!1===n.addNewLocation,r=i.hasValidNodesCount(),o=n.form.$valid;return e&&t&&r&&o},n.setLoader=(e,r)=>{t.cancel(n.loaderTimeout),e?n.loaderTimeout=t(()=>{n.loader=e,n.loaderMessage=r},300):n.loader=!1},n.getAdvancedOptionsClass=()=>{const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"ri-arrow-down-s-line"}return"ri-arrow-right-s-line"},n.cancel=()=>{n.editedNodeIndex=void 0,n.addNewLocation=!1,a(),i.emitUpdateClusterView()},n.restoreNode=e=>{i.restoreNode(e.item)};const a=()=>{i.setPendingReplace(void 0),n.editedNodeIndex=void 0,n.addNewLocation=!1},c=n.$watchGroup(["editedNodeIndex","addNewLocation","clusterConfiguration.electionMinTimeout","clusterConfiguration.electionRangeTimeout","clusterConfiguration.heartbeatInterval","clusterConfiguration.messageSizeKB","clusterConfiguration.verificationTimeout","clusterConfiguration.transactionLogMaximumSizeGB"],(e,t)=>{const r=n.isClusterConfigurationValid();i.updateClusterValidity(r)});o.push(c),o.push(i.onClusterViewChanged(e=>{n.hasCluster=i.hasCluster(),n.viewModel=i.getViewModel(),n.clusterNodesEndpoints=n.viewModel.map(e=>e.endpoint),n.clusterConfiguration=i.getClusterConfiguration(),n.allSuggestions=i.getAvailableNodeEndpoints(),n.canDeleteNode=i.canDeleteNode()})),n.$on("$destroy",()=>{o.forEach(e=>e())})}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-nodes-configuration",[]).directive("clusterNodesConfiguration",o),o.$inject=["$translate","$timeout","productInfo","toastr","RemoteLocationsService","ClusterContextService","ModalService"]},4552(){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=/^[\x21-\x7E]*$/.test(e);return r.$setValidity("asciiValidator",t),e}r.$parsers.push(o),r.$formatters.push(o)}}})},33931(){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=n.minLength?parseInt(n.minLength,10):0,o=n.maxLength?parseInt(n.maxLength,10):1/0,a=e&&e.length>=t&&e.length<=o;return r.$setValidity("lengthValidator",a),e}r.$parsers.push(o),r.$formatters.push(o)}}})},19146(){angular.module("graphdb.framework.core.directives.validate-duplicate-url",[]).directive("validateDuplicateUrl",function(){return{restrict:"A",require:"ngModel",scope:{excludedUrls:"="},link:function(e,t,n,r){r.$validators.duplicateUrl=function(t,n){return e.excludedUrls&&e.excludedUrls.includes(n)?(r.$setValidity("duplicateUrl",!1),!1):(r.$setValidity("duplicateUrl",!0),!0)}}}})},67262(e,t,n){var r=n(81417);angular.module("graphdb.framework.core.directives.validate-url",[]).directive("validateUrl",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,o){o.$validators.validUrl=function(e,t){if(o.$isEmpty(t))return"false"!==n.allowEmpty;if(!r.r.isValidUrl(t))return!1;if(n.exclude&&!r.r.doesNotContain(t,n.exclude))return!1;if(n.excludeProtocol){const e=n.excludeProtocol.split(",");if(!r.r.doesNotUseProtocol(t,e))return!1}return!0}}}})},81417(e,t,n){n.d(t,{r:()=>a});const r=/^(h|ht|htt|http|https|http:|https:|http:\/|https:\/|http:\/\/|https:\/\/|https?:\/\/[\S]*)$/i,o=/^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\/|ftps:\/|ftp:\/\/|ftps:\/\/[\S]*)$/i;class a{static isValidUrl(e){return r.test(e)||o.test(e)}static doesNotContain(e,t){return!new RegExp(t).test(e)}static doesNotUseProtocol(e,t){return!new RegExp("^("+t.join("|")+")://","i").test(e)}}},11014(e,t,n){var r,o;r=[n(44482)],o=function(e){function t(e,t){return e.each(function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])})}function r(e,t){for(var n in t)e.attr(n,t[n]);return e}return void 0===e&&(e=n(44482)),e.selection.prototype.attrs=function(e){return("function"==typeof e?t:r)(this,e)},e.selection.prototype.moveToFront=function(){return this.each(function(){e.select(this.parentNode.appendChild(this))})},e.selection.prototype.moveToBack=function(){return this.each(function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)})},e}.apply(t,r),void 0===o||(e.exports=o)}};
2
- //# sourceMappingURL=3395.ded80bae10361d1d4573.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"3395.ded80bae10361d1d4573.bundle.js","mappings":"0QAuBAA,QAAQC,OAAO,sCAXC,CACZ,YACA,SACA,qEACA,wEACA,uEACA,6EACA,iDACA,4D,wCCVJD,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAAqB,CACvBC,WAAY,aACZC,MAAO,QACPC,aAAc,gBAGlB,SAASL,EAAqBM,EAAUC,EAAWC,EAAYC,EAAQC,GACnE,MAAO,CACHC,SAAU,IACVC,YAAa,0FACbC,MAAO,CACHC,YAAa,IACbC,aAAc,IACdC,qBAAsB,KAE1BC,KAAOC,IAIH,MAAMC,EAAgB,GAKtBD,EAAOhB,mBAAqBA,EAC5BgB,EAAOE,UAAYlB,EAAmBC,WAKtCe,EAAOG,+BAAiC,KACpCX,EAA0BY,iCAG9BJ,EAAOK,UAAY,CAACC,EAAQC,KACxBP,EAAOE,UAAYK,GAkBvBP,EAAOQ,IAAI,WAAY,WAHnBP,EAAcQ,QAASC,GAAiBA,KAKxCV,EAAOG,gCACX,GAdIF,EAAcU,KAAKnB,EAA0BoB,gCAAiCC,IACrEA,IACDb,EAAOE,UAAYlB,EAAmBC,gBAuB9D,C,SC3EA,SAAS6B,IACL,MAAO,CACHrB,SAAU,IACVC,YAAa,kFACbC,MAAO,CACHC,YAAa,IACbC,aAAc,KAG1B,CAfAlB,QACKC,OAAO,qFAHI,IAIXC,UAAU,eAAgBiC,GA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,CAAeO,EAAKR,GACvB,OAAQ,IAAIS,OAAOT,GAASpB,KAAK4B,EACrC,CASA,yBAAOH,CAAmBG,EAAKL,GAE3B,OADwB,IAAIM,OAAO,KAAON,EAAkBvI,KAAK,KAAO,OAAQ,KACxDgH,KAAK4B,EACjC,E,eCvCJE,IAAAA,EAAAA,EAAAA,EAAO,CAAC,UAAK,WACAxO,GASL,SAASyO,EAAcC,EAAWzC,GAC9B,OAAOyC,EAAUC,KAAK,WAClB,IAAIC,EAAI3C,EAAI4C,MAAMC,KAAMC,WAAYC,EAAI/O,OAAO6O,MAC/C,IAAK,IAAIG,KAAQL,EAAGI,EAAE1L,KAAK2L,EAAML,EAAEK,GACvC,EACJ,CAEA,SAASC,EAAYR,EAAWzC,GAC5B,IAAK,IAAIgD,KAAQhD,EAAKyC,EAAUpL,KAAK2L,EAAMhD,EAAIgD,IAC/C,OAAOP,CACX,CAuBA,YAtC8F,IAAP1O,IAC/EA,EAAKsM,EAAQ,QAoBrBtM,EAAG0O,UAAUS,UAAU5C,MAJvB,SAAyBN,GACrB,OAAuB,mBAARA,EAAqBwC,EAAgBS,GAAaJ,KAAM7C,EAC3E,EAIAjM,EAAG0O,UAAUS,UAAUC,YAAc,WACjC,OAAON,KAAKH,KAAK,WACb3O,EAAGC,OAAO6O,KAAKO,WAAWC,YAAYR,MAC1C,EACJ,EAEA9O,EAAG0O,UAAUS,UAAUI,WAAa,WAChC,OAAOT,KAAKH,KAAK,WACb,MAAMa,EAAaV,KAAKO,WAAWG,WAC/BA,GACAV,KAAKO,WAAWI,aAAaX,KAAMU,EAE3C,EACJ,EAEOxP,CACV,sC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-graphical-view.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-nodes-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-duplicate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/url-utils.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/d3.patch.js"],"sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers/cluster-management.controller';\nimport 'angular/clustermanagement/directives/cluster-graphical-view.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive';\nimport 'angular/clustermanagement/directives/cluster-nodes-configuration.directive';\nimport 'angular/core/services/repositories.service';\nimport 'lib/d3.patch.js';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\nimport 'angular/core/directives/validate-url.directive';\nimport 'angular/core/directives/validate-duplicate-url.directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers.cluster-management',\n 'graphdb.framework.clustermanagement.directives.cluster-graphical-view',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration',\n 'graphdb.framework.clustermanagement.directives.cluster-nodes-configuration',\n 'graphdb.framework.core.directives.validate-url',\n 'graphdb.framework.core.directives.validate-duplicate-url'\n];\n\nangular.module('graphdb.framework.clustermanagement', modules);\n","import 'angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/multi-region.directive';\n\nconst modules = [\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration', modules)\n .directive('clusterConfiguration', ClusterConfiguration);\n\nClusterConfiguration.$inject = ['$jwtAuth', '$uibModal', '$translate', 'toastr', 'ClusterViewContextService'];\n\nconst CONFIGURATION_TABS = {\n PROPERTIES: 'properties',\n NODES: 'nodes',\n MULTI_REGION: 'multi_region'\n};\n\nfunction ClusterConfiguration($jwtAuth, $uibModal, $translate, toastr, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.CONFIGURATION_TABS = CONFIGURATION_TABS;\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n\n // =========================\n // Public functions\n // =========================\n $scope.closeClusterConfigurationPanel = () => {\n ClusterViewContextService.hideClusterConfigurationPanel();\n };\n\n $scope.switchTab = ($event, tab) => {\n $scope.activeTab = tab;\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel((show) => {\n if (!show) {\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n }\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n $scope.closeClusterConfigurationPanel();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n subscribeHandlers();\n };\n init();\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes', modules)\n .directive('clusterNodes', ClusterNodes);\n\nClusterNodes.$inject = [];\n\nfunction ClusterNodes() {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html',\n scope: {\n currentNode: '=',\n clusterModel: '='\n }\n };\n}\n","import {DELETE_CLUSTER, UPDATE_CLUSTER} from \"../../events\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties', modules)\n .directive('clusterProperties', ClusterProperties);\n\nClusterProperties.$inject = ['$jwtAuth', '$uibModal'];\n\nfunction ClusterProperties($jwtAuth, $uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n\n // =========================\n // Public variables\n // =========================\n $scope.isAdmin = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: () => {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n $scope.$emit(UPDATE_CLUSTER, {force: true});\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then((forceDelete) => {\n $scope.$emit(DELETE_CLUSTER, {force: forceDelete});\n });\n };\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n };\n init();\n }\n };\n}\n","import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from '../../../models/clustermanagement/cluster';\nimport {NodeState, TopologyState} from '../../../models/clustermanagement/states';\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator',\n];\n\nconst TagLengthConstraints = {\n minLen: '3',\n maxLen: '255',\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '=',\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n $scope.loader = false;\n $scope.statusLoader = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag,\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true,\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader?.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static',\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag,\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setStatusLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setStatusLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\n } else {\n $scope.loader = false;\n }\n };\n\n const setStatusLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.statusLoader = loader;\n }, 150);\n } else {\n $scope.statusLoader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function() {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n },\n };\n}\n","import 'angular/utils/local-storage-adapter';\nimport 'angular/clustermanagement/directives/cluster-legend.directive';\nimport * as CDS from \"../services/cluster-drawing.service\";\nimport {ARROW_CONFIG} from \"../services/cluster-drawing.service\";\nimport {cloneDeep, isEmpty} from \"lodash\";\nimport {CLICK_IN_VIEW, CREATE_CLUSTER, MODEL_UPDATED, NODE_SELECTED} from \"../events\";\nimport {select} from 'd3';\nimport {\n AuthorizationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst d3 = {select};\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\nconst nodeRadius = 45;\n\n// Labels in translation map is dynamically translated and reassigned. It contains defaults\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\",\n recovery_state: {\n searching_for_node: \"Searching for node\",\n waiting_for_snapshot: \"Waiting for snapshot from node\",\n receiving_snapshot: \"Receiving a snapshot from node\",\n applying_snapshot: \"Applying a snapshot\",\n building_snapshot: \"Building a snapshot for node\",\n sending_snapshot: \"Sending a snapshot to node\",\n recovery_operation_failure_warning: \"Node unable to recover. Action required\",\n },\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state',\n};\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives.cluster-graphical-view', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.clustermanagement.directives.cluster-legend',\n]);\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$jwtAuth', '$rootScope', 'ClusterViewContextService',\n function($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $jwtAuth, $rootScope, ClusterViewContextService) {\n return {\n restrict: 'E',\n scope: {\n clusterModel: '=',\n },\n link: function(scope, element) {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n\n const w = angular.element($window);\n const subscriptions = [];\n let hasAccess;\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n // SVG components\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n // =========================\n // Public variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n scope.width = function() {\n return width;\n };\n\n scope.height = function() {\n return height;\n };\n\n // =========================\n // Private functions\n // =========================\n\n function resize() {\n const svg = ClusterViewContextService.getClusterViewD3Container();\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n }\n\n function updateTranslations(translationMapObject, translationAppend = '') {\n Object.keys(translationMapObject).forEach((key) => {\n let compoundKey = '';\n if (translationAppend) {\n compoundKey += translationAppend;\n }\n compoundKey += `.${key}`;\n const value = translationMapObject[key];\n if (typeof value === 'string') {\n translationMapObject[key] = $translate.instant(`cluster_management.cluster_graphical_view${compoundKey}`);\n } else if (typeof value === 'object') {\n updateTranslations(value, compoundKey);\n }\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 675);\n }\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function createClusterZone(hasCluster) {\n const svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n\n CDS.addArrowHead(svg, ARROW_CONFIG.BIG);\n CDS.addArrowHead(svg, ARROW_CONFIG.SMALL);\n\n ClusterViewContextService.updateClusterViewD3Container(svg);\n }\n\n function createNodes(nodes) {\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n const nodesElements = CDS.createNodes(nodeData, nodeRadius);\n nodesElements\n .on('click', (event, d) => {\n scope.$emit(NODE_SELECTED, d);\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (event.pageY - 28) + \"px\");\n });\n CDS.updateNodes(nodesElements);\n CDS.positionNodesOnClusterZone(nodesElements, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n CDS.updateLinkIcons(linksGroup, links, nodes);\n }\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap, hasAccess);\n if (!hasCluster && hasAccess) {\n clusterZone.on('mouseup', () => {\n scope.$emit(CREATE_CLUSTER);\n });\n }\n }\n\n function getNodesModel() {\n const nodes = cloneDeep(scope.clusterModel.nodes) || [];\n nodes.forEach((node) => {\n node.hostname = UriUtils.shortenIri(node.endpoint);\n if (!isEmpty(node.recoveryStatus)) {\n let messageLabelKey = `cluster_management.cluster_graphical_view.recovery_state.${node.recoveryStatus.state.toLowerCase()}`;\n const hasAffectedNodes = node.recoveryStatus.affectedNodes && node.recoveryStatus.affectedNodes.length > 0;\n if (hasAffectedNodes) {\n messageLabelKey += '_with_affected_node';\n }\n node.recoveryStatus.message = $translate.instant(messageLabelKey, {node: node.recoveryStatus.affectedNodes.join(', ')});\n }\n });\n return nodes;\n }\n\n function mousedownHandler(event) {\n scope.$emit(CLICK_IN_VIEW, event.target);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = getNodesModel();\n createNodes(nodes);\n const links = cloneDeep(scope.clusterModel.links) || [];\n drawLinks(links, nodes);\n }\n\n // =========================\n // Events and watchers\n // =========================\n\n const subscribeHandlers = () => {\n w.bind('resize', resize);\n w.bind('mousedown', mousedownHandler);\n\n subscriptions.push($rootScope.$on('$translateChangeSuccess', function() {\n updateTranslations(translationsMap);\n updateLabels();\n }));\n\n subscriptions.push(scope.$on(MODEL_UPDATED, function() {\n plot();\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n scope.$on(\"$destroy\", function() {\n w.unbind('resize', resize);\n w.unbind('mousedown', mousedownHandler);\n CDS.removeEventListeners();\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n hasAccess = authorizationService.isAdmin();\n subscribeHandlers();\n updateTranslations(translationsMap);\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n plot();\n }\n initialize();\n },\n };\n },\n]);\n","import {Location} from \"../../models/clustermanagement/cluster\";\n\nconst modules = [];\nangular.module('graphdb.framework.clustermanagement.directives.cluster-nodes-configuration', modules)\n .directive('clusterNodesConfiguration', ClusterNodesConfigurationComponent);\n\nClusterNodesConfigurationComponent.$inject = ['$translate', '$timeout', 'productInfo', 'toastr', 'RemoteLocationsService', 'ClusterContextService', 'ModalService'];\n\nfunction ClusterNodesConfigurationComponent($translate, $timeout, productInfo, toastr, RemoteLocationsService, ClusterContextService, ModalService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-nodes-configuration.html',\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.rowHeights = {};\n $scope.editedNodeIndex = undefined;\n $scope.allSuggestions = [];\n $scope.loader = false;\n $scope.errors = [];\n $scope.addNewLocation = false;\n $scope.hasCluster = false;\n\n /**\n * Adds a new (empty) node to the list of cluster nodes for editing.\n */\n $scope.addNode = () => {\n $scope.addNewLocation = true;\n $scope.newLocation = new Location();\n // Timeout used because field is added dynamically on \"Add Node\" and needs to render before it can be focused\n $timeout(function() {\n const input = document.querySelector(\"input[name='location']\");\n if (input) {\n input.focus();\n }\n }, 0);\n };\n\n /**\n * Filters suggestions based on user input for node's endpoint.\n * @param {Object} node - The node object with an endpoint property.\n */\n $scope.filterSuggestions = (node) => {\n const query = node.endpoint && node.endpoint.toLowerCase();\n if (query) {\n $scope.suggestions = $scope.allSuggestions.filter((item) => item.toLowerCase().includes(query));\n $scope.showDropdown = true;\n } else {\n $scope.suggestions = [];\n $scope.showDropdown = false;\n }\n };\n\n /**\n * Selects a suggestion from the dropdown and updates the node's endpoint.\n * @param {Object} node - The node object to update.\n * @param {string} suggestion - The selected suggestion for the node's endpoint.\n */\n $scope.selectSuggestion = (node, suggestion) => {\n node.endpoint = suggestion;\n $scope.suggestions = [];\n $scope.showDropdown = false;\n };\n\n /**\n * Hides the suggestions dropdown after a timeout, used after user selection or clicking away.\n */\n $scope.hideSuggestions = () => {\n $timeout(() => {\n $scope.showDropdown = false;\n }, 200);\n };\n\n /**\n * Handles keyboard events for form input fields.\n * Processes Enter key to save the node when form is valid and Escape key to cancel.\n *\n * @param {KeyboardEvent} event - The keyboard event object\n * @param {boolean} formValid - Whether the current form is valid\n * @param {string} endpoint - The endpoint URL to save\n */\n $scope.handleKeydown = function(event, formValid, endpoint) {\n if (event.key === 'Enter' && formValid) {\n event.preventDefault();\n $scope.saveNode(endpoint);\n } else if (event.key === 'Escape') {\n $scope.cancel();\n }\n };\n\n /**\n * Saves a node to the cluster based on the provided endpoint.\n * If the node is found in the cluster deletion list, it is restored.\n * If the node is available in the cluster, it is added.\n * Otherwise, a new location is created and added.\n *\n * @param {string} endpoint - The endpoint of the node to save.\n */\n $scope.saveNode = (endpoint) => {\n const availableList = ClusterContextService.getAvailable(true);\n const node = ClusterContextService.findByEndpoint(availableList, endpoint) || new Location(endpoint);\n const oldNode = ClusterContextService.getPendingReplace();\n\n handleNodeSave(node, oldNode);\n };\n\n /**\n * Deletes a node from the cluster.\n * @param {number} index - The index of the node to delete.\n * @param {ClusterItemViewModel} itemView - The item to delete.\n * @return {void}\n */\n $scope.deleteNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.confirm.detach'),\n message: $translate.instant('location.confirm.detach.warning', {uri: itemView.endpoint}),\n warning: true,\n }).result.then(() => {\n ClusterContextService.deleteFromCluster(itemView.item);\n });\n };\n\n /**\n * Initiates the replacement of a node in the cluster view.\n * @param {number} index - The zero-based index of the node in the cluster view array that is to be replaced.\n * @param {ClusterItemViewModel} itemView - The node object representing the current state of the node to be replaced.\n * @return {void}\n */\n $scope.replaceNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.change.confirm'),\n message: $translate.instant('location.change.confirm.warning'),\n warning: true,\n }).result.then(() => {\n ClusterContextService.setPendingReplace(itemView.item);\n $scope.editedNodeIndex = index;\n });\n };\n\n /**\n * Checks if the current cluster configuration is valid.\n * The configuration is considered valid if there are at least two nodes and no nodes are being edited.\n * @return {boolean} True if the configuration is valid, false otherwise.\n */\n $scope.isClusterConfigurationValid = () => {\n const isNotInEditMode = $scope.editedNodeIndex === undefined;\n const isNotInAddMode = $scope.addNewLocation === false;\n const hasValidNodes = ClusterContextService.hasValidNodesCount();\n const hasValidConfiguration = $scope.form.$valid;\n return isNotInEditMode && isNotInAddMode && hasValidNodes && hasValidConfiguration;\n };\n\n /**\n * Sets the loader state with a message.\n * The loader state is shown with a delay to avoid flickering for short operations.\n * @param {boolean} loader - Whether to show the loader.\n * @param {string} [message] - The message to show with the loader.\n */\n $scope.setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n /**\n * Determines the CSS class for the advanced options button based on its expanded state.\n *\n * @return {string} - Returns 'ri-arrow-down-s-line' if the 'advancedOptions' element is expanded, otherwise 'ri-arrow-right-s-line'.\n */\n $scope.getAdvancedOptionsClass = () => {\n const optionsModule = document.getElementById('advancedOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'ri-arrow-down-s-line';\n }\n }\n return 'ri-arrow-right-s-line';\n };\n\n /**\n * Cancels the current action and resets the form state.\n *\n * @return {void}\n */\n $scope.cancel = () => {\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n resetNodeEditState();\n ClusterContextService.emitUpdateClusterView();\n };\n\n $scope.restoreNode = (node) => {\n ClusterContextService.restoreNode(node.item);\n };\n\n // =========================\n // Private functions\n // =========================\n /**\n * Handles the saving of an existing node in the cluster.\n * @param {Object} node - The node object found in the cluster.\n * @param {Object|null} oldNode - The old node that is being replaced (if any).\n */\n function handleNodeSave(node, oldNode) {\n if (oldNode) {\n ClusterContextService.replace(oldNode, node);\n } else {\n ClusterContextService.addLocation(node);\n }\n resetNodeEditState();\n }\n\n /**\n * Resets the state of the node edit operation.\n */\n const resetNodeEditState = () => {\n ClusterContextService.setPendingReplace(undefined);\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n };\n\n const onClusterViewChanged = (cluster) => {\n $scope.hasCluster = ClusterContextService.hasCluster();\n $scope.viewModel = ClusterContextService.getViewModel();\n $scope.clusterNodesEndpoints = $scope.viewModel.map((node) => node.endpoint);\n $scope.clusterConfiguration = ClusterContextService.getClusterConfiguration();\n $scope.allSuggestions = ClusterContextService.getAvailableNodeEndpoints();\n $scope.canDeleteNode = ClusterContextService.canDeleteNode();\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n /**\n * Removes all listeners and unsubscribes from events when the directive is destroyed.\n */\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n const unwatch = $scope.$watchGroup([\n 'editedNodeIndex',\n 'addNewLocation',\n 'clusterConfiguration.electionMinTimeout',\n 'clusterConfiguration.electionRangeTimeout',\n 'clusterConfiguration.heartbeatInterval',\n 'clusterConfiguration.messageSizeKB',\n 'clusterConfiguration.verificationTimeout',\n 'clusterConfiguration.transactionLogMaximumSizeGB',\n ], (newValues, oldValues) => {\n const isValid = $scope.isClusterConfigurationValid();\n ClusterContextService.updateClusterValidity(isValid);\n });\n\n subscriptions.push(unwatch);\n subscriptions.push(ClusterContextService.onClusterViewChanged(onClusterViewChanged));\n $scope.$on('$destroy', removeAllListeners);\n },\n };\n}\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name validateDuplicateUrl\n * @module graphdb.framework.core.directives.validate-duplicate-url\n * @restrict A\n *\n * @description\n * This directive validates an input field for duplicate URLs. It checks whether the input URL\n * exists within a provided list of excluded or duplicate URLs and marks the input as invalid if a match is found.\n *\n * The directive requires an array of URLs to be passed using the `excluded-urls` attribute.\n * If the input URL is found within this array, a `duplicateUrl` error is added to the form control.\n *\n * This directive works in conjunction with other validators such as `validate-url` for format validation.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL duplicate validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-duplicate-url excluded-urls=\"existingUrls\"/>\n * <div ng-show=\"myForm.urlField.$error.duplicateUrl\">\n * URL already exists.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where duplicate URL validation is required.\n * It will automatically validate the input value against the provided list of excluded URLs.\n *\n * @param {Array} excludedUrls - An array of URLs to check against for duplicates.\n * @returns {boolean} Whether the URL is valid. It returns `true` if the URL is not in the `excludedUrls` array and `false` if it is.\n */\nangular\n .module('graphdb.framework.core.directives.validate-duplicate-url', [])\n .directive('validateDuplicateUrl', validateDuplicateUrl);\n\nfunction validateDuplicateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n excludedUrls: '='\n },\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.duplicateUrl = function (modelValue, viewValue) {\n if (scope.excludedUrls && scope.excludedUrls.includes(viewValue)) {\n ctrl.$setValidity('duplicateUrl', false);\n return false;\n } else {\n ctrl.$setValidity('duplicateUrl', true);\n }\n return true;\n };\n }\n };\n}\n","/**\n * @ngdoc directive\n * @name validateUrl\n * @module graphdb.framework.core.directives.validate-url\n * @restrict A\n *\n * @description\n * This directive validates the URL input field based on a specified pattern.\n * It ensures that the input URL adheres to standard URL formats and provides\n * visual feedback to the user if the URL is invalid.\n *\n * The directive can also be configured to exclude certain substrings or protocols from valid URLs,\n * and to control whether empty input values are considered valid.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-url/>\n * <div ng-show=\"myForm.urlField.$error.validUrl\">\n * Invalid URL format.\n * </div>\n *\n * <!-- URL validation excluding a specific substring -->\n * <input type=\"text\" name=\"urlFieldWithExclusion\" ng-model=\"url\" validate-url exclude=\"/repositories\"/>\n * <div ng-show=\"myForm.urlFieldWithExclusion.$error.validUrl\">\n * Invalid URL format or contains excluded substring.\n * </div>\n *\n * <!-- URL validation excluding a specific protocol -->\n * <input type=\"text\" name=\"urlFieldWithProtocolExclusion\" ng-model=\"url\" validate-url exclude-protocol=\"ftp\"/>\n * <div ng-show=\"myForm.urlFieldWithProtocolExclusion.$error.validUrl\">\n * Invalid URL format or uses an excluded protocol.\n * </div>\n *\n * <!-- URL validation that does not allow empty values -->\n * <input type=\"text\" name=\"urlFieldNoEmpty\" ng-model=\"url\" validate-url allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldNoEmpty.$error.validUrl\">\n * Invalid URL format or empty value not allowed.\n * </div>\n *\n * <!-- URL validation with both substring and protocol exclusions, and empty values not allowed -->\n * <input type=\"text\" name=\"urlFieldFullValidation\" ng-model=\"url\" validate-url exclude=\"/repositories\" exclude-protocol=\"ftp\" allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldFullValidation.$error.validUrl\">\n * Invalid URL format, contains excluded substring, uses an excluded protocol, or empty value not allowed.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where URL validation is required.\n * It will automatically validate the input value.\n *\n * Optional attributes:\n * - `exclude`: A string specifying a substring that must not be present in the URL.\n * - `exclude-protocol`: A comma-separated list of protocols (e.g., `ftp,http`) that must not be used in the URL.\n * - `allow-empty`: A boolean attribute (`true` by default). If set to `false`, empty values are considered invalid.\n */\n\nimport {UrlUtils} from \"../../utils/url-utils\";\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.core.directives.validate-url', modules)\n .directive('validateUrl', validateUrl);\n\nfunction validateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.validUrl = function (modelValue, viewValue) {\n // Check if empty values should be allowed\n if (ctrl.$isEmpty(viewValue)) {\n return attr.allowEmpty !== 'false';\n }\n\n if (!UrlUtils.isValidUrl(viewValue)) {\n return false;\n }\n\n if (attr.exclude && !UrlUtils.doesNotContain(viewValue, attr.exclude)) {\n return false;\n }\n\n if (attr.excludeProtocol) {\n const excludedProtocols = attr.excludeProtocol.split(',');\n if (!UrlUtils.doesNotUseProtocol(viewValue, excludedProtocols)) {\n return false;\n }\n }\n return true;\n };\n }\n };\n}\n","const httpRegex = /^(h|ht|htt|http|https|http:|https:|http:\\/|https:\\/|http:\\/\\/|https:\\/\\/|https?:\\/\\/[\\S]*)$/i;\nconst ftpRegex = /^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\\/|ftps:\\/|ftp:\\/\\/|ftps:\\/\\/[\\S]*)$/i;\n\n\n/**\n * Utilities for URL manipulation, validation, etc.\n */\nexport class UrlUtils {\n /**\n * Validates whether the given string is a valid URL or a partial URL that follows the rules.\n *\n * @param {string} url - The URL string to validate.\n * @return {boolean} True if the URL is valid or a valid partial URL, false otherwise.\n */\n static isValidUrl(url) {\n return httpRegex.test(url) || ftpRegex.test(url);\n }\n\n /**\n * Checks if the URL contains an excluded substring.\n *\n * @param {string} url - The URL string to check.\n * @param {string} exclude - The substring to exclude.\n * @return {boolean} True if the URL does not contain the substring, false if it does.\n */\n static doesNotContain(url, exclude) {\n return !new RegExp(exclude).test(url);\n }\n\n /**\n * Checks if the URL uses an excluded protocol.\n *\n * @param {string} url - The URL string to check.\n * @param {Array<string>} excludedProtocols - The protocols to exclude.\n * @return {boolean} True if the URL does not use the excluded protocols, false if it does.\n */\n static doesNotUseProtocol(url, excludedProtocols) {\n const protocolPattern = new RegExp('^(' + excludedProtocols.join('|') + ')://', 'i');\n return !protocolPattern.test(url);\n }\n}\n","define(['d3'],\n function(d3) {\n (function() {\n\n // Node/CommonJS - require D3\n if (typeof (module) !== 'undefined' && typeof (exports) !== 'undefined' && typeof (d3) == 'undefined') {\n d3 = require('d3');\n }\n })();\n\n function attrsFunction(selection, map) {\n return selection.each(function () {\n var x = map.apply(this, arguments), s = select(this);\n for (var name in x) s.attr(name, x[name]);\n });\n }\n\n function attrsObject(selection, map) {\n for (var name in map) selection.attr(name, map[name]);\n return selection;\n }\n\n function selection_attrs(map) {\n return (typeof map === \"function\" ? attrsFunction : attrsObject)(this, map);\n }\n\n d3.selection.prototype.attrs = selection_attrs\n\n d3.selection.prototype.moveToFront = function () {\n return this.each(function () {\n d3.select(this.parentNode.appendChild(this));\n });\n };\n\n d3.selection.prototype.moveToBack = function () {\n return this.each(function () {\n const firstChild = this.parentNode.firstChild;\n if (firstChild) {\n this.parentNode.insertBefore(this, firstChild);\n }\n });\n };\n\n return d3;\n });\n"],"names":["angular","module","directive","ClusterConfiguration","$inject","CONFIGURATION_TABS","PROPERTIES","NODES","MULTI_REGION","$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService","restrict","templateUrl","scope","currentNode","clusterModel","clusterConfiguration","link","$scope","subscriptions","activeTab","closeClusterConfigurationPanel","hideClusterConfigurationPanel","switchTab","$event","tab","$on","forEach","subscription","push","onShowClusterConfigurationPanel","show","ClusterNodes","ClusterProperties","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","isAdmin","showEditConfigurationDialog","open","controller","size","resolve","data","result","finally","$emit","UPDATE_CLUSTER","force","showDeleteDialog","then","forceDelete","DELETE_CLUSTER","isAuthenticated","TagLengthConstraints","minLen","maxLen","MultiRegion","$timeout","ModalService","ClusterRestService","topology","undefined","TopologyState","addingTag","loaderTimeout","secondaryTag","loader","statusLoader","add","cancel","createTag","tag","payload","setLoader","addCusterTag","success","instant","catch","response","msg","getError","error","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","$uibModalInstance","config","rpcAddress","onClick","ok","close","primaryNode","dismiss","openCustomModal","updateClusterData","setStatusLoader","getClusterConfig","fromJSON","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","loaderMessage","$watch","newValue","oldValue","d3","select","navigationBarWidth","translationsMap","no_cluster_configured","create_cluster_btn","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","recovery_state","searching_for_node","waiting_for_snapshot","receiving_snapshot","applying_snapshot","building_snapshot","sending_snapshot","recovery_operation_failure_warning","idTranslationKeyMap","node_state","link_state","$window","LocalStorageAdapter","LSKeys","UriUtils","$rootScope","element","w","hasAccess","hasCluster","clusterZone","nodesGroup","linksGroup","width","getWindowWidth","height","getWindowHeight","clusterZoneRadius","Math","min","clusterZoneX","clusterZoneY","resize","svg","getClusterViewD3Container","attr","plot","updateTranslations","translationMapObject","translationAppend","Object","keys","key","compoundKey","value","collapsed","get","MENU_STATE","max","floor","innerWidth","innerHeight","mousedownHandler","event","CLICK_IN_VIEW","target","CDS","on","CREATE_CLUSTER","setClusterZoneType","cloneDeep","hostname","shortenIri","endpoint","isEmpty","recoveryStatus","messageLabelKey","state","toLowerCase","affectedNodes","length","join","getNodesModel","nodeData","selectAll","address","nodesElements","d","NODE_SELECTED","tooltip","windowWidth","$","window","pageX","style","pageY","createNodes","links","linksData","id","drawLinks","unbind","bind","elementId","text","getLabelFor","MODEL_UPDATED","append","ARROW_CONFIG","BIG","SMALL","updateClusterViewD3Container","createClusterZone","ClusterNodesConfigurationComponent","productInfo","RemoteLocationsService","ClusterContextService","rowHeights","editedNodeIndex","allSuggestions","errors","addNewLocation","addNode","newLocation","Location","input","document","querySelector","focus","filterSuggestions","query","suggestions","filter","item","includes","showDropdown","selectSuggestion","suggestion","hideSuggestions","handleKeydown","formValid","preventDefault","saveNode","availableList","getAvailable","oldNode","findByEndpoint","getPendingReplace","replace","addLocation","resetNodeEditState","deleteNode","index","itemView","uri","deleteFromCluster","replaceNode","setPendingReplace","isClusterConfigurationValid","isNotInEditMode","isNotInAddMode","hasValidNodes","hasValidNodesCount","hasValidConfiguration","form","$valid","getAdvancedOptionsClass","optionsModule","getElementById","isAriaExpanded","getAttribute","emitUpdateClusterView","restoreNode","unwatch","$watchGroup","newValues","oldValues","isValid","updateClusterValidity","onClusterViewChanged","cluster","viewModel","getViewModel","clusterNodesEndpoints","map","getClusterConfiguration","getAvailableNodeEndpoints","canDeleteNode","removeAllListeners","require","attrs","ngModel","validateAscii","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","excludedUrls","ctrl","$validators","duplicateUrl","modelValue","viewValue","validUrl","$isEmpty","allowEmpty","UrlUtils","isValidUrl","exclude","doesNotContain","excludeProtocol","excludedProtocols","split","doesNotUseProtocol","httpRegex","ftpRegex","url","RegExp","define","attrsFunction","selection","each","x","apply","this","arguments","s","name","attrsObject","prototype","moveToFront","parentNode","appendChild","moveToBack","firstChild","insertBefore"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=65677;export const __webpack_esm_ids__=[65677];export const __webpack_esm_modules__={65677(t,e,r){var a=r(66886),n=r(9508),o=(r(38473),r(44482));function s(t,e,r,s,c,i,l,d,p,u,f,g,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const f=d(function(){!function(u){var f=1200,y=f/18,x=f/110,m=x/2,v=f/90,b=1.2,k=o.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),w=o.forceSimulation(),E=o.drag().subject(function(t){return t}).on("start",function(t,e){w.stop(),e.fx=t.x,e.fy=t.y,o.select(this).classed("selected",!0)}).on("end",function(t,e){e.fx=null,e.fy=null,o.select(this).classed("selected",!1),C?(w.alpha(.2).restart(),C=!1):w.restart()}).on("drag",function(t,e){C=!0,w.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y}),N=k.append("defs");N.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),o.select("#download-svg").on("mouseover",function(){var t=a.A.Export.getCSSRules("css/domain-range-graph.css?v=3.5.1-TR3");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.A.Export.generateBase64ImageSource("#domain-range svg");o.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})}),function(){var t=f/7,e=205.7142857142857,r=o.select(".legend-container").append("svg").attr("viewBox","0 0 "+t+" "+e).attr("preserveAspectRatio","xMidYMid meet");r.append("rect").attrs({width:t,height:e}).style("fill","rgba(235, 235, 235, 0.9)");var a=16,n=42.66666666666667,s=n+f/90,i=v/1.1,l=(r.append("circle").attrs({class:"legend-class-node",cx:29.333333333333336,cy:30,r:y/4.5}),30+f/370);r.append("text").attrs({x:s,y:l}).style("font-size",i+"px").text("main class node"),r.append("circle").attrs({class:"legend-object-node",cx:29.333333333333336,cy:70,r:8.727272727272727});var d=l+40;r.append("text").attrs({x:s,y:d}).style("font-size",i+"px").text("class node");var p=70+f/45;r.append("circle").attrs({class:"legend-datatype-node",cx:29.333333333333336,cy:p,r:m});var u=d+f/45;r.append("text").attrs({x:s,y:u}).style("font-size",i+"px").text("datatype node");var g=123.33333333333334;r.append("line").attrs({class:"property-arrow",x1:a,y1:g,x2:n,y2:g}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:126.57657657657658}).style("font-size",i+"px").text("explicit property");var h=150;r.append("line").attrs({class:"implicit-property-arrow",x1:a,y1:h,x2:n,y2:h}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:153.24324324324326}).style("font-size",i+"px").text("implicit property");var x=176.66666666666666;r.append("line").attrs({class:"collapsed-property-arrow",x1:a,y1:x,x2:n,y2:x}).style("stroke-width",2).attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)"),r.append("text").attrs({x:s,y:179.9099099099099}).style("font-size",i+"px").text("collapsed property")}();var R=c.search().uri,A=c.search().name;const L=c.search().collapsed;(function(t,e){s.getDomainRangeData(t,e).success(function(t,e,r){u.domainRangeGraphData=t}).error(function(t){p.error("Request for "+A+" failed!")})})(R,L),$(window).on("popstate",function(){i.set(l.DOMAIN_RANGE_WENT_BACK,!0)}),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",function(){angular.isUndefined(u.collapseEdges)||(i.set(l.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(l.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:R,name:A,collapsed:e})}(u.collapseEdges),i.remove(l.DOMAIN_RANGE_WENT_BACK))}),u.$watch("domainRangeGraphData",function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const S=r.nodes,I=r.links;w.nodes(S).force("x",o.forceX(600)).force("y",o.forceY(300)).force("charge",o.forceManyBody().strength(-800)).force("link",o.forceLink(I).distance(f/3.5));var a=k.selectAll(".link").data(I).enter().append("g");function B(t){t.style("stroke",g),t.style("stroke-width",2),t.attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)")}var s,i,l=0;a.each(function(t){if(t.objectPropNodeClassUri!==R)s=a.append("line").attrs({class:"link","marker-end":"url("+c.absUrl()+"#arrow)"}).style("stroke-width",b).each(function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=y;break;case"objectRight":t.targetRadius=x;break;case"datatype":t.targetRadius=m;break;default:t.targetRadius=0}var e=o.select(this);t.targetNodeEdgeCount>1?B(e):t.implicit&&e.style("stroke-dasharray","3, 3")});else{if(angular.isUndefined(i)){var e=y/2;i=o.select(this).append("path").attrs({d:"M 0 0 A "+e+" "+e+" 0 1 1 0 "+e,class:"loop-link",fill:"none","marker-end":"url("+c.absUrl()+"#arrow-loop)"}).style("stroke-width",b)}(l+=t.targetNodeEdgeCount)>1&&B(o.select(".loop-link"))}});var p={};function G(){$.isEmptyObject(p)||(p.text.style("fill","black"),p.background.style("fill","#f0f0f0"))}function W(t,e){G(),p.text=o.select(this),p.background=o.select(this.previousSibling),p.text.style("fill","white"),p.background.style("fill",g),d(function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e}),t.stopPropagation()}$("document").ready(function(){$("#domain-range").bind("click",G)});var N=a.append("text").attr("class",function(t){return t.objectPropNodeClassUri===R?"loop-link-property-name":"property-name"}).attr("dx",function(t){return y/2*("objectLeft"===t.propertyType?1:-1)}).style("text-anchor",function(t){return"objectLeft"===t.propertyType?"end":"start"}).style("font-size",v).text(function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name});N.each(function(t){var r=o.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",W):r.on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")})});var L=a.append("rect").attr("class",function(t){return t.objectPropNodeClassUri!==R?"link-background":"loop-link-background"}).attr("width",function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4}).attr("height",function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2}).attr("transform",function(t){var e=2-y/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"}).on("click",function(t){t.stopPropagation()}),C=k.selectAll(".node").data(S).enter().append("g"),P=C.filter(function(t){return t.objectPropClassUri!==R}).append("circle").each(function(t){var e=o.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:y}).attr("marker-end","url("+c.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:m}):e.attrs({class:"object-prop-node",r:x})}).call(E);function z(e,r,a){u.$apply(function(){t.$broadcast("reloadDomainRangeGraphView",r,a)})}o.selectAll(".object-prop-node").on("dblclick",z),C.filter(function(t){return t.objectPropClassName&&t.objectPropClassUri!==R}).append("text").attr("class",function(t){return t.classPosition+"-class-label"}).style("font-size",v).text(function(t){return t.objectPropClassName}).on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")});var U=C.select("text");k.select(".class-node").each(function(){o.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",function(t){return n.A.Text.calcFontSize(A,y)}).text(A).on("click",function(){e.open("resource?uri="+encodeURIComponent(R),"_blank")})});var j=k.select(".class-node + text"),T=o.select(".class-node"),M=o.selectAll(".loop-link-background"),O=o.selectAll(".loop-link-property-name");if(N=o.selectAll(".property-name"),!angular.isUndefined(i)){var D=[];M.each(function(t,e){o.select(this),D.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})})}function F(t){var e=8*w.alpha();function r(t){var e=t.x+2*y,r=t.y-35.08771929824562;var a=[];M.each(function(n,s){a.push(n),s<h?function(a,n){var o=$.grep(D,function(t){return t.idx==n});n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(o.select(this),s):o.select(this).remove()}),function(t){var e;o.select(".view-more-preds-label").style("font-weight","bold").each(function(r){r.target.allEdges=t,e=this.getComputedTextLength()}).on("click",W),o.select(".view-more-preds-rect").attr("height",e+4)}(a)}s.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.targetX}).attr("y2",function(t){return t.targetY}).each(function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius}),P.each(function(t){"main"!==t.classPosition||angular.isUndefined(i)||(function(t){var e=t.x+64,r=t.y-y/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(D,function(t){return t.idx==r}),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-2.1*y-n;e.attrs({x:o,y:s}).moveToFront()}O.each(function(t,r){var a=o.select(this),n=O.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,o.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())})}(t),r(t)),t.objectPropClassUri!==R&&o.select(this).attr("cx",function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=T.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x}).attr("cy",function(t){return t.y})}),j.attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).moveToFront(),L.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),N.attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),U.attr("x",function(t){return"right"===t.classPosition?t.x+13.09090909090909:t.x-13.09090909090909}).attr("y",function(t){return t.y}).moveToFront()}w.on("tick",F)}});let C=!1}(u)},50);u.$on("$destroy",function(){d.cancel(f)})}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--gw-primary-base)").constant("ONTO_GREEN","var(--gw-tertiary-base)").constant("ONTO_BLUE","var(--gw-secondary-base)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",s),s.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]}};
2
- //# sourceMappingURL=65677.0e8ab27737300e991c60.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"65677.0e8ab27737300e991c60.bundle.js","mappings":"iLAkBA,SAASA,EAA0BC,EAAYC,EAASC,EAAeC,EAAsBC,EAAWC,EAAqBC,EAAQC,EAAUC,EAAQC,EAAUC,EAAYC,EAAWC,GACpL,MAAO,CACHC,SAAU,KACVC,SAAU,gCACVC,MAAO,CACHC,wBAAyB,IACzBC,kBAAmB,IACnBC,cAAe,KAEnBC,KAGJ,SAAkBJ,GACd,MAAMK,EAAQb,EAAS,YAS3B,SAAgCQ,GAC5B,IAAIM,EAAQ,KAGRC,EAAgBD,EAAQ,GACxBE,EAAiBF,EAAQ,IACzBG,EAAeD,EAAiB,EAChCE,EAAgBJ,EAAQ,GACxBK,EAAwBL,IAGxBM,EAAMC,EAAAA,OAAU,iBACfC,OAAO,OACPC,KAAK,UAAW,gBAChBA,KAAK,sBAAuB,iBAC5BC,GAAG,gBAAiB,MAErBC,EAAQJ,EAAAA,kBAERK,EAAOL,EAAAA,OACNM,QAAQ,SAAUC,GACf,OAA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UK,GACjB,OAAIA,EAAEsK,OAAOlK,EAAIJ,EAAE0K,OAAOtK,EACdJ,EAAE0K,OAAOtK,GAAKJ,EAAEsK,OAAOlK,EAAIJ,EAAE0K,OAAOtK,GAAK,EAEzCJ,EAAEsK,OAAOlK,GAAKJ,EAAE0K,OAAOtK,EAAIJ,EAAEsK,OAAOlK,GAAK,CAEzD,GACCT,KAAK,IAAK,SAAUK,GACjB,OAAIA,EAAEsK,OAAOhK,EAAIN,EAAE0K,OAAOpK,EACdN,EAAE0K,OAAOpK,GAAKN,EAAEsK,OAAOhK,EAAIN,EAAE0K,OAAOpK,GAAK,EAEzCN,EAAEsK,OAAOhK,GAAKN,EAAE0K,OAAOpK,EAAIN,EAAEsK,OAAOhK,GAAK,CAEzD,GACCkL,cAGLlD,EACK3I,KAAK,IAAK,SAAUK,GACjB,MAAwB,UAApBA,EAAEqI,cACKrI,EAAEI,EAAIhB,kBAENY,EAAEI,EAAIhB,iBAErB,GACCO,KAAK,IAAK,SAAUK,GACjB,OAAOA,EAAEM,CACb,GACCkL,aACT,CAEA3L,EAAMD,GAAG,OAAQ2J,EAErB,CACJ,GAEA,IAAI9I,GAAY,CAiCpB,CAz5BQ+L,CAAuB5N,EAC3B,EAAG,IAEHA,EAAM6N,IAAI,WAAY,WAClBrO,EAASsO,OAAOzN,EACpB,EACJ,EAo5BJ,CAr7BAiG,QACKyH,OAAO,wDAAyD,CAC7D,yDACA,gDAEHC,SAAS,WAAY,0BACrBA,SAAS,aAAc,2BACvBA,SAAS,YAAa,4BACtBA,SAAS,qCAAsC,GAC/CC,UAAU,mBAAoBjP,GAEnCA,EAA0BkP,QAAU,CAAC,aAAc,UAAW,gBAAiB,uBAAwB,YAAa,sBAAuB,SAAU,WAAY,SAAU,WAAY,aAAc,YAAa,qC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/domain-range-graph.directive.js"],"sourcesContent":["import SVG from 'lib/common/svg-export';\nimport D3 from 'lib/common/d3-utils';\nimport 'angular/utils/local-storage-adapter';\nimport * as d3 from 'd3';\n\nangular\n .module('graphdb.framework.graphexplore.directives.domainrange', [\n 'graphdb.framework.graphexplore.controllers.domainrange',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .constant('ONTO_RED', 'var(--gw-primary-base)')\n .constant('ONTO_GREEN', 'var(--gw-tertiary-base)')\n .constant('ONTO_BLUE', 'var(--gw-secondary-base)')\n .constant('NON_COLLAPSED_REFLEXIVE_LINK_LIMIT', 6)\n .directive('domainRangeGraph', domainRangeGraphDirective);\n\ndomainRangeGraphDirective.$inject = ['$rootScope', '$window', '$repositories', 'GraphDataRestService', '$location', 'LocalStorageAdapter', 'LSKeys', '$timeout', 'toastr', 'ONTO_RED', 'ONTO_GREEN', 'ONTO_BLUE', 'NON_COLLAPSED_REFLEXIVE_LINK_LIMIT'];\n\nfunction domainRangeGraphDirective($rootScope, $window, $repositories, GraphDataRestService, $location, LocalStorageAdapter, LSKeys, $timeout, toastr, ONTO_RED, ONTO_GREEN, ONTO_BLUE, NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n return {\n restrict: 'AE',\n template: '<div id=\"domain-range\"></div>',\n scope: {\n showPredicatesInfoPanel: '=',\n selectedPredicate: '=',\n collapseEdges: '='\n },\n link: linkFunc\n };\n\n function linkFunc(scope) {\n const timer = $timeout(function () {\n renderDomainRangeGraph(scope);\n }, 50);\n\n scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n\n function renderDomainRangeGraph(scope) {\n var width = 1200,\n height = 600;\n\n var mainClassSize = width / 18,\n otherClassSize = width / 110,\n datatypeSize = otherClassSize / 2,\n labelFontSize = width / 90,\n basicArrowStrokeWidth = width / 1000,\n collapsedArrowStrokeWidth = width / 600;\n\n var svg = d3.select(\"#domain-range\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n var force = d3.forceSimulation();\n\n var drag = d3.drag()\n .subject(function (d) {\n return d;\n })\n .on(\"start\", dragStart)\n .on(\"end\", dragEnd)\n .on(\"drag\", dragged);\n\n var defs = svg.append(\"defs\");\n generateMarkers(defs);\n\n function generateMarkers(defElement) {\n defs.append(\"marker\")\n .attrs({\n id: \"arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 10,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"collapsed-arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 9,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 4,\n markerHeight: 4,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"arrow-loop\",\n viewBox: \"0 -5 10 10\",\n refX: 7,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n }\n\n /*\n * Prepares SVG document image export by adding xml namespaces and\n * additional style information\n */\n function prepareForSVGImageExport() {\n // get css rules for the diagram\n var cssRules = SVG.Export.getCSSRules(\"css/domain-range-graph.css?v=3.5.1-TR3\");\n\n // inline css rules in a defs tag\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // convert selected html to base64\n var imgSrc = SVG.Export.generateBase64ImageSource(\"#domain-range svg\");\n\n // set the binary image and a name for the downloadable file on the export button\n d3.select(this).attrs({\n href: imgSrc,\n download: \"domain-range-graph-\" + $repositories.getActiveRepository() + \".svg\"\n });\n }\n\n d3.select(\"#download-svg\")\n .on(\"mouseover\", prepareForSVGImageExport);\n\n generateLegend();\n\n function generateLegend() {\n // start of code for legend\n\n var legendBackgroundWidth = width / 7;\n var legendBackgroundHeight = legendBackgroundWidth * 1.2;\n\n var svgLegend = d3.select(\".legend-container\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + legendBackgroundWidth + \" \" + legendBackgroundHeight)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n var legendCellGroup = svgLegend;\n\n legendCellGroup.append(\"rect\")\n .attrs({\n width: legendBackgroundWidth,\n height: legendBackgroundHeight\n })\n .style(\"fill\", \"rgba(235, 235, 235, 0.9)\");\n\n var sourceX = width / 75;\n var sourceY = width / 40;\n var targetX = sourceX + mainClassSize / 2.5;\n var targetY = sourceY;\n\n var legendTextX = targetX + width / 90;\n var legendLabelFontSize = labelFontSize / 1.1;\n\n var classNodeY = sourceY;\n var legendClassNode = legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-class-node\",\n cx: (sourceX + targetX) / 2,\n cy: classNodeY,\n r: mainClassSize / 4.5\n });\n\n var classNodeTextY = targetY + width / 370;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: classNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"main class node\");\n\n var objectNodeY = classNodeY + width / 30;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-object-node\",\n cx: (sourceX + targetX) / 2,\n cy: objectNodeY,\n r: otherClassSize / 1.25\n });\n\n var objectNodeTextY = classNodeTextY + width / 30;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: objectNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"class node\");\n\n var datatypeNodeY = objectNodeY + width / 45;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-datatype-node\",\n cx: (sourceX + targetX) / 2,\n cy: datatypeNodeY,\n r: datatypeSize\n });\n\n var datatypeNodeTextY = objectNodeTextY + width / 45;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: datatypeNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"datatype node\");\n\n var basicPropertyArrowY = datatypeNodeY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"property-arrow\",\n x1: sourceX,\n y1: basicPropertyArrowY,\n x2: targetX,\n y2: basicPropertyArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: basicPropertyArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"explicit property\");\n\n var implicitPropArrowY = basicPropertyArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"implicit-property-arrow\",\n x1: sourceX,\n y1: implicitPropArrowY,\n x2: targetX,\n y2: implicitPropArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: implicitPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"implicit property\");\n\n var collapsedPropArrowY = implicitPropArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"collapsed-property-arrow\",\n x1: sourceX,\n y1: collapsedPropArrowY,\n x2: targetX,\n y2: collapsedPropArrowY\n })\n .style(\"stroke-width\", collapsedArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: collapsedPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"collapsed property\");\n // end of code for legend\n }\n\n var selectedRdfUri = $location.search().uri;\n var classNodeLabel = $location.search().name;\n const collapsed = $location.search().collapsed;\n\n getDomainRangeData(selectedRdfUri, collapsed);\n\n function getDomainRangeData(selectedRdfUri, collapsed) {\n GraphDataRestService.getDomainRangeData(selectedRdfUri, collapsed)\n .success(function (response, status, headers) {\n scope.domainRangeGraphData = response;\n }).error(function (response) {\n toastr.error(\"Request for \" + classNodeLabel + \" failed!\");\n });\n }\n\n function switchEdgeMode(collapsed) {\n $rootScope.$broadcast('switchEdgeMode', {\n uri: selectedRdfUri,\n name: classNodeLabel,\n collapsed: collapsed\n });\n }\n\n // intercept back button press and set action to local storage\n $(window).on('popstate', function () {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_WENT_BACK, true);\n });\n\n $window.onpopstate = function (event) {\n if (event.state) {\n $rootScope.$broadcast(\"changeCollapsedEdgesState\", event.state.collapsed);\n }\n };\n\n scope.$watch('collapseEdges', function () {\n if (!angular.isUndefined(scope.collapseEdges)) {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_COLLAPSE_EDGES, scope.collapseEdges);\n\n // if the back button has not been pressed, then switch to collapsed or non collapsed mode\n // otherwise skip, because back button will not function properly and will not pop the entire\n // history stack\n if (LocalStorageAdapter.get(LSKeys.DOMAIN_RANGE_WENT_BACK) !== \"true\") {\n switchEdgeMode(scope.collapseEdges);\n }\n\n // after back button status has been checked, remove the action from local storage in order\n // to be clean for next check\n LocalStorageAdapter.remove(LSKeys.DOMAIN_RANGE_WENT_BACK);\n }\n });\n\n scope.$watch('domainRangeGraphData', function () {\n if (scope.domainRangeGraphData) {\n var graph = _.cloneDeep(scope.domainRangeGraphData);\n\n const nodes = graph.nodes;\n const links = graph.links;\n\n force.nodes(nodes)\n .force('x', d3.forceX(width / 2))\n .force('y', d3.forceY(height / 2))\n .force(\"charge\", d3.forceManyBody().strength(-800))\n .force(\"link\", d3.forceLink(links).distance(width / 3.5))\n\n var linkGroup = svg.selectAll(\".link\")\n .data(links)\n .enter()\n .append(\"g\");\n\n function styleArrowsInCollapsedMode(sel) {\n sel.style(\"stroke\", ONTO_BLUE);\n sel.style(\"stroke-width\", collapsedArrowStrokeWidth);\n sel.attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n }\n\n var link,\n loopLink,\n loopLinkEdgeCount = 0;\n\n\n linkGroup\n .each(function (d) {\n if (d.objectPropNodeClassUri !== selectedRdfUri) {\n link = linkGroup\n .append(\"line\")\n .attrs({\n class: \"link\",\n // absolute url needed because angular inserts a <base> tag\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .each(function (d) {\n switch (d.propertyType) {\n case \"objectLeft\":\n d.targetRadius = mainClassSize;\n break;\n case \"objectRight\":\n d.targetRadius = otherClassSize;\n break;\n case \"datatype\":\n d.targetRadius = datatypeSize;\n break;\n default:\n d.targetRadius = 0;\n }\n var sel = d3.select(this);\n if (d.targetNodeEdgeCount > 1) {\n styleArrowsInCollapsedMode(sel);\n } else if (d.implicit) {\n sel.style(\"stroke-dasharray\", \"3, 3\");\n }\n });\n } else {\n if (angular.isUndefined(loopLink)) {\n var loopLinkSize = mainClassSize / 2;\n loopLink = d3.select(this)\n .append(\"path\")\n .attrs({\n d: \"M 0 0 A \" + loopLinkSize + \" \" + loopLinkSize + \" 0 1 1 0 \" + loopLinkSize,\n class: \"loop-link\",\n fill: \"none\",\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow-loop)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth);\n }\n\n loopLinkEdgeCount += d.targetNodeEdgeCount;\n if (loopLinkEdgeCount > 1) {\n styleArrowsInCollapsedMode(d3.select(\".loop-link\"));\n }\n }\n });\n\n var previousPropertyNameSelection = {};\n\n function disableCollapsedPredicateLabelHightlighting() {\n if (!$.isEmptyObject(previousPropertyNameSelection)) {\n previousPropertyNameSelection.text.style(\"fill\", \"black\");\n previousPropertyNameSelection.background.style(\"fill\", \"#f0f0f0\");\n }\n }\n\n // when clicking anywhere else but the collapsed labels disable highlighting\n // of the currently selected one\n $(\"document\").ready(function () {\n $(\"#domain-range\").bind(\"click\", disableCollapsedPredicateLabelHightlighting);\n });\n\n function onCollapsedPropertyNameClick(event, d) {\n disableCollapsedPredicateLabelHightlighting();\n previousPropertyNameSelection.text = d3.select(this);\n\n previousPropertyNameSelection.background = d3.select(this.previousSibling);\n previousPropertyNameSelection.text.style(\"fill\", \"white\");\n\n previousPropertyNameSelection.background.style(\"fill\", ONTO_BLUE);\n $timeout(function () {\n scope.showPredicatesInfoPanel = true;\n scope.selectedPredicate = d;\n });\n event.stopPropagation();\n }\n\n\n var propertyNames = linkGroup\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri === selectedRdfUri ? \"loop-link-property-name\" : \"property-name\";\n })\n .attr(\"dx\", function (d) {\n // offset text more towards the main class\n return mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n })\n .style(\"text-anchor\", function (d) {\n return d.propertyType === \"objectLeft\" ? \"end\" : \"start\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.targetNodeEdgeCount > 1 ? d.targetNodeEdgeCount + \" predicates\" : d.name;\n });\n\n\n propertyNames\n .each(function (d) {\n var sel = d3.select(this);\n var isCompoundEdge = /\\d\\spredicates/.test(sel.text());\n\n // handle collapsed predicates by making their font bold, make them highlight when clicked\n // and make them trigger the side panel to display the collapsed edges\n if (isCompoundEdge) {\n sel\n .style(\"font-weight\", \"bold\")\n .on(\"click\", onCollapsedPropertyNameClick);\n } else {\n // for regular predicate labels just attach a link to the \"Resources\" view\n // for more helpful information regarding them\n sel.on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.uri), \"_blank\");\n });\n }\n });\n var textPadding = width / 600;\n\n\n var linkRect = linkGroup\n .append(\"rect\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri ? \"link-background\" : \"loop-link-background\"\n })\n .attr(\"width\", function (d) {\n d.calculatedWidth = this.previousSibling.getBBox().width;\n return d.calculatedWidth + textPadding * 2;\n })\n .attr(\"height\", function (d) {\n d.calculatedHeight = this.previousSibling.getBBox().height;\n return d.calculatedHeight + textPadding;\n })\n .attr(\"transform\", function (d) {\n // offset rect by the same amount as text (besides the padding)\n var translateX = textPadding - mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n if (d.propertyType === \"objectLeft\") {\n translateX += d.calculatedWidth;\n }\n return \"translate(-\" + translateX + \",-\" + (textPadding + d.calculatedHeight / 2) + \")\";\n })\n .on(\"click\", function (event) {\n event.stopPropagation();\n });\n\n\n var nodeGroup = svg.selectAll(\".node\")\n .data(nodes)\n .enter()\n .append(\"g\");\n\n var node = nodeGroup\n .filter(function (d) {\n return d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"circle\")\n .each(function (d) {\n var sel = d3.select(this);\n if (d.classPosition === \"main\") {\n sel.attrs({\n class: \"class-node\",\n r: mainClassSize\n })\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#loop-link)\");\n } else if (d.objectPropClassName === null) {\n sel.attrs({\n class: \"datatype-node\",\n r: datatypeSize\n });\n } else {\n sel.attrs({\n class: \"object-prop-node\",\n r: otherClassSize\n });\n }\n })\n .call(drag);\n\n\n function reloadDomainRangeGraphView(event, d, collapsed) {\n scope.$apply(function () {\n $rootScope.$broadcast('reloadDomainRangeGraphView', d, collapsed);\n });\n }\n\n d3.selectAll(\".object-prop-node\")\n .on(\"dblclick\", reloadDomainRangeGraphView);\n\n\n nodeGroup\n .filter(function (d) {\n return d.objectPropClassName && d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.classPosition + \"-class-label\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.objectPropClassName;\n })\n .on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.objectPropClassUri), \"_blank\");\n });\n\n var objectPropClassName = nodeGroup.select(\"text\");\n\n svg.select(\".class-node\")\n .each(function () {\n d3.select(this.parentNode)\n .append(\"text\")\n .attr(\"class\", \"rdf-class-label\")\n .style(\"font-size\", function (d) {\n return D3.Text.calcFontSize(classNodeLabel, mainClassSize)\n })\n .text(classNodeLabel)\n .on(\"click\", function () {\n $window.open(\"resource?uri=\" + encodeURIComponent(selectedRdfUri), \"_blank\");\n });\n });\n\n\n var rdfClassName = svg.select(\".class-node + text\"),\n classNode = d3.select(\".class-node\"),\n loopLinkBackgroundSel = d3.selectAll(\".loop-link-background\"),\n loopLinkPropertyName = d3.selectAll(\".loop-link-property-name\");\n\n propertyNames = d3.selectAll(\".property-name\");\n\n if (!angular.isUndefined(loopLink)) {\n var loopLinkBackgroundProps = [];\n\n loopLinkBackgroundSel.each(function (d, i) {\n var sel = d3.select(this);\n loopLinkBackgroundProps.push({\n idx: i,\n width: d.calculatedWidth,\n height: d.calculatedHeight\n });\n });\n }\n\n function tick(e) {\n var k = 8 * force.alpha();\n\n function pushEdgesToLeftAndRight(d) {\n if (d.propertyType === \"objectLeft\") {\n d.source.x -= 8 * k;\n d.source.y -= k / 9;\n } else {\n d.target.x += 8 * k;\n d.target.y -= k / 9;\n }\n }\n\n link\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x1\", function (d) {\n return d.source.x;\n })\n .attr(\"y1\", function (d) {\n return d.source.y;\n })\n .attr(\"x2\", function (d) {\n return d.targetX;\n })\n .attr(\"y2\", function (d) {\n return d.targetY;\n })\n .each(function (d) {\n pushEdgesToLeftAndRight(d);\n\n // shortens the line to compensate for the circle at the target\n var angle = Math.atan2(d.target.y - d.source.y, d.target.x - d.source.x);\n d.targetX = d.target.x - Math.cos(angle) * d.targetRadius;\n d.targetY = d.target.y - Math.sin(angle) * d.targetRadius;\n });\n\n function positionLoopLink(d) {\n var loopTranslateX = d.x + mainClassSize * 0.96,\n loopTranslateY = d.y - mainClassSize / 5.7 - 5;\n loopLink.attr(\"transform\", \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopTranslateX + \",\" + loopTranslateY + \")\");\n }\n\n function positionLoopLinkLabels(d) {\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n var currentBackgroundHeight = 0;\n if (i > 0) {\n currentBackgroundHeight = parseFloat(2 * i * (foundLoopLinkBackgroundProps[0].height / 1.4));\n }\n\n var loopLinkLabelX = d.x,\n loopLinkLabelY = d.y - mainClassSize * 2.1 - currentBackgroundHeight;\n\n sel\n .attrs({\n x: loopLinkLabelX,\n y: loopLinkLabelY\n })\n .moveToFront();\n }\n\n /**\n * Create a \"View more\" label to depict that the are more reflexive link labels\n * left that could be seen in the side panel when clicking this label.\n *\n * @param labelSel\n * d3 selection of the text label\n * @param backgroundSel\n * d3 selection of the rectangle element background\n * @param predicatesLeft\n * number of predicates left that are collapsed\n */\n function createViewMorePredicatesLabel(labelSel, backgroundSel, predicatesLeft) {\n labelSel\n .classed(\"view-more-preds-label\", true)\n .text(predicatesLeft + \" predicates more ...\");\n if (this.nextSibling !== null) {\n backgroundSel\n .classed(\"view-more-preds-rect\", true);\n }\n }\n\n loopLinkPropertyName.each(function (dd, i) {\n var sel = d3.select(this);\n\n var predicatesLeft = loopLinkPropertyName.size() - NON_COLLAPSED_REFLEXIVE_LINK_LIMIT;\n if (predicatesLeft < 0) {\n reposition(sel, i);\n } else {\n if (i == 0 && !scope.collapseEdges && predicatesLeft > 1) {\n createViewMorePredicatesLabel(sel, d3.select(this.nextSibling), predicatesLeft);\n reposition(sel, i);\n }\n\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(sel, i);\n } else {\n sel.remove();\n }\n }\n });\n // loopLinkPropertyName.each(function (dd, i) {\n // var sel = d3.select(this);\n // if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // reposition(sel, i);\n // } else if (i == NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // createViewMorePredicatesLabel(sel, d3.select(this.nextSibling));\n // reposition(sel, i);\n // } else {\n // sel.remove();\n // }\n // });\n }\n\n function positionLoopLinkBackgrounds(d) {\n var loopLinkBackgroundY = d.x + mainClassSize * 2,\n loopLinkBackgroundX = d.y - mainClassSize / 1.9;\n\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n if (i > 0) {\n loopLinkBackgroundY += parseFloat(i * (foundLoopLinkBackgroundProps[0].height / (i / 1.4)));\n }\n\n sel\n .attrs({\n transform: \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopLinkBackgroundY + \",\" + loopLinkBackgroundX + \")\",\n width: foundLoopLinkBackgroundProps[0].height,\n height: foundLoopLinkBackgroundProps[0].width\n });\n }\n\n /**\n * Adjust new width of \"View more\" label background and add all reflexive link metadata the this\n * label in order to render them in the side panel.\n *\n * @param allLoopLinkEdges\n * all reflexive links to the current class\n */\n function adjustViewMorePredicatesLabel(allLoopLinkEdges) {\n var viewMoreTextWidth;\n d3.select(\".view-more-preds-label\")\n // make label bold to resemble a collapsed label\n .style(\"font-weight\", \"bold\")\n .each(function (d) {\n // attach all reflexive links to the \"view more\" collapsed predicate\n // because in non collapsed mode the backend does not provide them\n d.target.allEdges = allLoopLinkEdges;\n\n // calculate text width in pixels in order to adjust background width accordingly\n viewMoreTextWidth = this.getComputedTextLength();\n })\n .on(\"click\", onCollapsedPropertyNameClick);\n\n d3.select(\".view-more-preds-rect\")\n // we modify height property instead of width because they are reversed\n // when we repositioned loop link labels\n .attr(\"height\", viewMoreTextWidth + 2 * textPadding);\n }\n\n var allLoopLinkEdges = [];\n loopLinkBackgroundSel.each(function (dd, i) {\n allLoopLinkEdges.push(dd);\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(d3.select(this), i);\n } else {\n d3.select(this).remove();\n }\n });\n\n adjustViewMorePredicatesLabel(allLoopLinkEdges);\n }\n\n\n function centerClassNode(d) {\n if (!(window.ActiveXObject) && \"ActiveXObject\" in window) {\n Math.log10 = function (x) {\n return Math.log(x) / Math.LN10;\n };\n }\n var absDiff = classNode.attr(\"cx\") - width / 2,\n logOffset = Math.log10(Math.abs(absDiff)) * 0.5;\n d.x += absDiff > 0 ? -logOffset : logOffset;\n return d.x;\n }\n\n node\n .each(function (d) {\n if (d.classPosition === \"main\" && !angular.isUndefined(loopLink)) {\n positionLoopLink(d);\n positionLoopLinkLabels(d);\n positionLoopLinkBackgrounds(d);\n }\n\n if (d.objectPropClassUri !== selectedRdfUri) {\n d3.select(this)\n .attr(\"cx\", function (d) {\n // pushes the main class circle to the centre\n if (d.classPosition === \"main\") {\n return centerClassNode(d);\n }\n return d.x;\n })\n .attr(\"cy\", function (d) {\n return d.y;\n });\n }\n });\n\n\n rdfClassName\n .attr(\"x\", function (d) {\n return d.x;\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n\n\n linkRect\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n propertyNames\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n objectPropClassName\n .attr(\"x\", function (d) {\n if (d.classPosition === \"right\") {\n return d.x + otherClassSize * 1.2;\n } else {\n return d.x - otherClassSize * 1.2;\n }\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n }\n\n force.on(\"tick\", tick)\n\n }\n });\n\n let isDragged = false;\n\n function dragStart(event, d) {\n force.stop();\n d.fx = event.x;\n d.fy = event.y;\n d3.select(this).classed(\"selected\", true);\n\n }\n\n // Update the subject (dragged node) position during drag.\n function dragged(event, d) {\n isDragged = true;\n\n force.alphaTarget(0).restart();\n d.fx = event.x;\n d.fy = event.y;\n }\n\n // Restore the target alpha so the simulation cools after dragging ends.\n // Unfix the subject position now that it’s no longer being dragged.\n function dragEnd(event, d) {\n d.fx = null;\n d.fy = null;\n d3.select(this).classed(\"selected\", false);\n if (isDragged) {\n force.alpha(0.2).restart();\n isDragged = false;\n } else {\n force.restart();\n }\n }\n\n }\n}\n"],"names":["domainRangeGraphDirective","$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT","restrict","template","scope","showPredicatesInfoPanel","selectedPredicate","collapseEdges","link","timer","width","mainClassSize","otherClassSize","datatypeSize","labelFontSize","basicArrowStrokeWidth","svg","d3","append","attr","on","force","drag","subject","d","event","stop","fx","x","fy","y","this","classed","isDragged","alpha","restart","alphaTarget","defs","attrs","id","viewBox","refX","refY","markerUnits","markerWidth","markerHeight","orient","fill","class","cssRules","SVG","Export","getCSSRules","$","imgSrc","generateBase64ImageSource","href","download","getActiveRepository","legendBackgroundWidth","legendBackgroundHeight","legendCellGroup","height","style","sourceX","targetX","legendTextX","legendLabelFontSize","classNodeTextY","cx","cy","r","text","classNodeY","objectNodeTextY","datatypeNodeY","datatypeNodeTextY","basicPropertyArrowY","x1","y1","x2","y2","absUrl","implicitPropArrowY","collapsedPropArrowY","generateLegend","selectedRdfUri","search","uri","classNodeLabel","name","collapsed","getDomainRangeData","success","response","status","headers","domainRangeGraphData","error","window","set","DOMAIN_RANGE_WENT_BACK","onpopstate","state","$broadcast","$watch","angular","isUndefined","DOMAIN_RANGE_COLLAPSE_EDGES","get","switchEdgeMode","remove","graph","_","cloneDeep","nodes","links","strength","distance","linkGroup","selectAll","data","enter","styleArrowsInCollapsedMode","sel","loopLink","loopLinkEdgeCount","each","objectPropNodeClassUri","propertyType","targetRadius","targetNodeEdgeCount","implicit","loopLinkSize","previousPropertyNameSelection","disableCollapsedPredicateLabelHightlighting","isEmptyObject","background","onCollapsedPropertyNameClick","previousSibling","stopPropagation","ready","bind","propertyNames","test","open","encodeURIComponent","linkRect","calculatedWidth","getBBox","textPadding","calculatedHeight","translateX","nodeGroup","node","filter","objectPropClassUri","classPosition","objectPropClassName","call","reloadDomainRangeGraphView","$apply","select","parentNode","D3","Text","calcFontSize","rdfClassName","classNode","loopLinkBackgroundSel","loopLinkPropertyName","loopLinkBackgroundProps","i","push","idx","tick","e","k","positionLoopLinkBackgrounds","loopLinkBackgroundY","loopLinkBackgroundX","allLoopLinkEdges","dd","foundLoopLinkBackgroundProps","grep","obj","parseFloat","transform","reposition","viewMoreTextWidth","target","allEdges","getComputedTextLength","adjustViewMorePredicatesLabel","source","targetY","pushEdgesToLeftAndRight","angle","Math","atan2","cos","sin","loopTranslateX","loopTranslateY","positionLoopLink","currentBackgroundHeight","loopLinkLabelX","loopLinkLabelY","moveToFront","predicatesLeft","size","labelSel","backgroundSel","nextSibling","createViewMorePredicatesLabel","positionLoopLinkLabels","ActiveXObject","log10","log","LN10","absDiff","logOffset","abs","centerClassNode","renderDomainRangeGraph","$on","cancel","module","constant","directive","$inject"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=73334;export const __webpack_esm_ids__=[73334,85256];export const __webpack_esm_modules__={73334(n,e,t){t(10500),t(85256);const o=t(71315).I.logger;function r(n){const e=[];return Object.keys(n).forEach(function(t){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]))}),e.join("&")}function i(n){return _.map(n,function(n,e){return{key:e,value:n}})}function a(n,e){return _.reduce(n,function(n,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(e.instant("externalsync.empty.value.key.error",{value:t.value}));if(n.hasOwnProperty(t.key))throw new Error(e.instant("externalsync.duplicate.key.error",{key:t.key}));n[t.key]=t.value}return n},{})}function c(n,e){for(let t=0;t<e.length;t++){const o=e[t];if("StringArray"===o.__type)n[o.__name]||(n[o.__name]=[""]);else if("OptionArray"===o.__type)if(n[o.__name])for(let e=0;e<o.__childOptions.length;e++){const t=o.__childOptions[e];if("Boolean"===t.__type)for(let e=0;e<n[o.__name].length;e++){const r=n[o.__name][e];!r.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(r[t.__name]=t.__defaultValue)}}else{n[o.__name]=[];const e={};for(let n=0;n<o.__childOptions.length;n++){const t=o.__childOptions[n];"StringArray"===t.__type?e[t.__name]=[""]:e[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}n[o.__name].push(e)}else"Map"===o.__type?n[o.__name]?n[o.__name]=i(n[o.__name]):n[o.__name]=[]:"JsonString"===o.__type?!n[o.__name]||n[o.__name]instanceof String||"string"==typeof n[o.__name]||(n[o.__name]=angular.toJson(n[o.__name],2)):angular.isUndefined(n[o.__name])&&(n[o.__name]=angular.isUndefined(o.__defaultValue)?"":o.__defaultValue)}return n}function s(n,e,t){return n.post("repositories/"+e,r({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function l(n){return n.substring(0,n.length-1)+"/instance#"}function u(n,e,t,o,r){const i=function n(e,t){const o={};return _.each(t,function(t){angular.isDefined(e[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(e[t.__name],function(e){o[t.__name].push(n(e,t.__childOptions))})):o[t.__name]=_.cloneDeep(e[t.__name]))}),o}(t,o);for(let n=0;n<o.length;n++)try{"Map"===o[n].__type?i[o[n].__name]=a(i[o[n].__name],$translate):"JsonString"===o[n].__type&&(i[o[n].__name]=angular.fromJson(i[o[n].__name]))}catch(e){return r(o[n].__label,e.message),null}p(i);let c="";return c+="PREFIX :<"+e+">\n",c+="PREFIX inst:<"+l(e)+">\n",c+="INSERT DATA {\n",c+="\tinst:"+n+" :createConnector '''\n",c+=angular.toJson(i,2),c+="\n''' .\n}\n",c=c.replace(/\\/g,"\\\\\\"),c}function p(n){return Array.isArray(n)&&(n=_.filter(n,function(n){return null!==n&&(!n.trim||""!==n.trim())})),Object.keys(n).forEach(function(e){""!==n[e]&&null!==n[e]&&void 0!==n[e]||!1===n[e]?"object"==typeof n[e]&&(n[e]=p(n[e])):delete n[e]}),n}function f(n,e,t,i,a,p,f,d,g,m){function y(e){n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e?m.instant("externalsync.repairing"):m.instant("externalsync.creating"),waitOnRepairStartOnce:!!e,eta:"-",inline:!1,iri:null}}function C(e,t,o){return y(o),$.extend(n.beingBuiltConnector,{iri:l(e)+t,name:t,inline:!1,doneCallback:function(){n.beingBuiltConnector.modalInstance.dismiss("cancel")}}),n.beingBuiltConnector.modalInstance=i.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n}),n.beingBuiltConnector.modalInstance}function h(e,o,i){const c=C(e.value,o.name,!1);d.addStatements(t.getActiveRepository(),r({update:o.query})).then(function(){g.getConnectors().then(function(){g.hasConnector(encodeURIComponent(e.value)).then(function(t){n.existing[e.key]=t.data})}),a.success(m.instant("created.connector",{name:o.name}))},function(n){a.error(getError(n)),i()}).finally(function(){c.dismiss("cancel")})}n.loader=!1,n.controllers=[],n.existing={},n.definitions={},n.getLoaderMessage=function(){const e=(Date.now()-n.loaderStartTime)/1e3,t=n.getHumanReadableSeconds(e);let o="";return o=n.progressMessage?n.progressMessage+"... "+t:m.instant("common.running.operation",{timeHuman:t}),n.extraMessage&&e>10&&(o+="\n"+n.extraMessage),o},n.setLoader=function(e,t,o){e?(n.loader=!0,n.loaderStartTime=Date.now(),n.progressMessage=t,n.extraMessage=o):(n.loader=!1,n.progressMessage="",n.extraMessage="")},n.initConnector=function(e){return g.initConnector(encodeURIComponent(e.value)).then(function(t){return n.definitions[e.key]=t.data,g.hasConnector(encodeURIComponent(e.value)).then(function(t){n.existing[e.key]=t.data})})},n.getConnectors=function(){n.isLicenseValid()&&n.canWriteActiveRepo()&&(n.setLoader(!0,m.instant("externalsync.fetching.connectors"),m.instant("common.extra.message")),g.getConnectors().then(function(r){n.connectors=Object.keys(r.data).map(function(n){return{key:n,value:r.data[n]}}),f.all(_.map(n.connectors,function(e){return n.initConnector(e)})).finally(function(){y();const r=function(n){const e=_.map(n,function(n){return"<"+n.value+"connectorStatus>"}).join("|");return e?"SELECT ?connector ?status { ?connector "+e+" ?status }":null}(n.connectors);r?function(n){return s(e,t.getActiveRepository(),n)}(r).then(function(e){const t=function(n){if(n.bindings)for(let e=0;e<n.bindings.length;e++)try{const t=JSON.parse(n.bindings[e].status.value);if("BUILDING"===t.status)return{connector:n.bindings[e].connector.value,status:t}}catch(n){o.error(n)}return{}}(e.data.results);if(t.connector){const e=t.connector.split(/#/);e[0]=e[0].replace(/\/instance$/,"#"),r=e[0],i=e[1],y(),$.extend(n.beingBuiltConnector,{iri:l(r)+i,name:i,inline:!0,doneCallback:function(){n.beingBuiltConnector.inline=!1}})}var r,i}).finally(function(){n.setLoader(!1)}):n.setLoader(!1)})}).catch(function(e){n.setLoader(!1),a.error(getError(e),m.instant("externalsync.could.not.get.connectors.error"))}),n.existing={})},n.getOptions=function(e){return n.definitions[e.key]},n.isEmpty=function(n){return angular.isObject(n)&&0===Object.keys(n).length},n.toPrettyJson=function(n){return angular.toJson(n,2)},n.$watch(function(){return t.getActiveRepository()},n.getConnectors),n.$watch(function(){return t.getActiveLocation()},n.getConnectors),n.copyConnector=function(e,t){let o;angular.isUndefined(t)||(o=_.cloneDeep(t),o.name=o.name+"-copy"),i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return n.getOptions(e)}}}).result.then(function(t){h(e,t,function(){t.skipConversion=!0,n.newConnector(e,t)})})},n.newConnector=function(e,t){i.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return n.getOptions(e)}}}).result.then(function(t){h(e,t,function(){t.skipConversion=!0,n.newConnector(e,t)})})},n.repair=function(e,o){p.openSimpleModal({title:m.instant("externalsync.confirm.repair"),message:m.instant("externalsync.repair.warning.msg"),warning:!0}).result.then(function(){const i=C(o.value,e.name,!0),c=(s=e.name,"PREFIX prefix:<"+(u=o.value)+">\nINSERT DATA {\n\t<"+l(u)+s+'> prefix:repairConnector ""\n}');var s,u;d.addStatements(t.getActiveRepository(),r({update:c})).then(function(){g.getConnectors().then(function(){g.hasConnector(encodeURIComponent(o.value)).then(function(e){n.existing[o.key]=e.data})}),a.success(m.instant("externalsync.repair.success.msg",{name:e.name}))},function(n){a.error(getError(n))}).finally(function(){i.dismiss("cancel")})})},n.delete=function(e,o){const c=o.key.indexOf("Elastic")>=0||o.key.indexOf("Solr")>=0;i.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return c?m.instant("delete.connector.conditional",{type:o.key}):""}}}).result.then(function(i){n.setLoader(!0,m.instant("externalsync.delete.progress.msg",{name:e.name}),m.instant("externalsync.extra.message.warning"));const s=function(n,e,t){const o=e.substring(0,e.length-1)+"/instance#";return"PREFIX prefix:<"+e+">\nINSERT DATA {\n\t<"+o+n+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(e.name,o.value,i);d.addStatements(t.getActiveRepository(),r({update:s})).then(function(){g.getConnectors().then(function(){g.hasConnector(encodeURIComponent(o.value)).then(function(e){n.existing[o.key]=e.data})}),i?(a.success(m.instant("externalsync.delete.force.success.msg",{name:e.name})),c&&a.warning(m.instant("externalsync.delete.remote.warning",{key:o.key}))):a.success(m.instant("externalsync.delete.success.msg",{name:e.name}))},function(n){a.error(getError(n))}).finally(function(){n.setLoader(!1)})})},n.viewQuery=function(e,t){i.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=n.getOptions(e);return u(t.name,e.value,c(t.values,o),o)}}})}}function d(n,e,t){n.force=!1,n.popoverMsg=t,n.ok=function(){e.close(n.force)},n.cancel=function(){e.dismiss()}}function g(n,e,t,o,r){function i(){return u(n.name,t.value,n.values,n.options,function(n,e){r.error(e,n)})}n.connector=t,n.addField=function(e,t){const o=_.cloneDeep(n.defaultValues[t][0]);n.values[t].splice(e+1,0,o)},n.addOption=function(n,e){e.splice(n+1,0,"")},n.deleteOption=function(n,e){e.splice(n,1)},n.addMapOption=function(n,e){e.splice(n+1,0,{key:"",value:""})},n.deleteMapOption=function(n,e){e.splice(n,1)},n.ok=function(){if(n.form.$valid){const t=i();t&&e.close({name:n.name,values:n.values,options:n.options,query:t})}},n.viewQuery=function(){const n=i();n&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return n}}})},n.cancel=function(){e.dismiss("cancel")}}function m(n,e,t,o,r,i,a,s){angular.extend(this,e("ExtendNewConnectorCtrl",{$scope:n,$uibModalInstance:o,connector:r,$uibModal:i})),n.values=a.values,n.options=s,n.name=a.name,a.skipConversion||(n.values=c(n.values,n.options)),n.defaultValues=_.cloneDeep(n.values)}function y(n,e,t,r,i){function a(){const a=function(n){const e=n.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+n+"> <"+e+"> ?status",t+="\n}",t}(n.beingBuiltConnector.iri);n.beingBuiltConnector.iri=null,n.progressInterval=e(function(){(function(n){return s(t,r.getActiveRepository(),n)})(a).then(function(t){const r=function(n){if(n.bindings&&n.bindings.length>0)try{return JSON.parse(n.bindings[0].status.value)}catch(n){o.error(n)}return{}}(t.data.results);"BUILDING"===r.status?(n.beingBuiltConnector.status=r,n.beingBuiltConnector.percentDone=(100*r.processedEntities/r.estimatedEntities).toFixed(0),n.beingBuiltConnector.eta=n.getHumanReadableSeconds(r.etaSeconds),n.beingBuiltConnector.actionName=r.repair?i.instant("externalsync.repairing"):i.instant("externalsync.creating"),n.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==r.status||n.beingBuiltConnector.waitOnRepairStartOnce||(e.cancel(n.progressInterval),n.beingBuiltConnector.doneCallback&&n.beingBuiltConnector.doneCallback())})},1e3),n.$on("$destroy",function(){e.cancel(n.progressInterval)})}n.beingBuiltConnector=n.beingBuiltConnector||{},!n.beingBuiltConnector.inline&&n.beingBuiltConnector.iri&&a(),n.$watch("beingBuiltConnector.iri",function(e){n.beingBuiltConnector.inline&&e&&a()})}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",f).controller("ExtendNewConnectorCtrl",g).controller("CreateConnectorCtrl",m).controller("CreateProgressCtrl",y).controller("DeleteConnectorCtrl",d).filter("ceil",function(){return function(n){return Math.ceil(n)}}),f.$inject=["$scope","$http","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],d.$inject=["$scope","$uibModalInstance","popoverMsg"],g.$inject=["$scope","$uibModalInstance","connector","$uibModal","toastr"],m.$inject=["$scope","$controller","$http","$uibModalInstance","connector","$uibModal","values","options"],y.$inject=["$scope","$interval","$http","$repositories","$translate"]},85256(){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",e),e.$inject=["$http"];const n="rest/connectors";function e(e){return{getConnectors:function(t,o){return t?e.get(n,{headers:{"X-GraphDB-Repository":t,"X-GraphDB-Repository-Location":o}}):e.get(n)},initConnector:function(t){return e.get(`${n}/options?prefix=${t}`)},hasConnector:function(t,o,r){return o?e.get(`${n}/existing?prefix=${t}`,{headers:{"X-GraphDB-Repository":o,"X-GraphDB-Repository-Location":r}}):e.get(`${n}/existing?prefix=${t}`)},checkConnector:function(t){return e.post(`${n}/check`,t,{headers:{"Content-Type":"text/plain"}})}}}}};
2
- //# sourceMappingURL=73334.1b0e8bb637fbd1ce73ef.bundle.js.map