graphdb-workbench 2.2.3 → 2.2.4-TR1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/11.f7cb87be309f6bd00aa5.bundle.js +1 -1
  2. package/dist/11.f7cb87be309f6bd00aa5.bundle.js.map +1 -1
  3. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  4. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  5. package/dist/20.4eb25ede434dc329ecf1.bundle.js +1 -1
  6. package/dist/20.4eb25ede434dc329ecf1.bundle.js.map +1 -1
  7. package/dist/27.fef157d9275358c9f1a0.bundle.js +1 -1
  8. package/dist/27.fef157d9275358c9f1a0.bundle.js.map +1 -1
  9. package/dist/33.fde8076c81c87c25c367.bundle.js +1 -1
  10. package/dist/33.fde8076c81c87c25c367.bundle.js.map +1 -1
  11. package/dist/4.112f94be76eae8c6eea6.bundle.js +2 -0
  12. package/dist/4.112f94be76eae8c6eea6.bundle.js.map +1 -0
  13. package/dist/40.10f42e3f6d8d87bd3221.bundle.js +1 -1
  14. package/dist/40.10f42e3f6d8d87bd3221.bundle.js.map +1 -1
  15. package/dist/94.94158487a9024ff3a623.bundle.js +1 -1
  16. package/dist/94.94158487a9024ff3a623.bundle.js.map +1 -1
  17. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js → bundle.afb7b0e2052d21766bfe.bundle.js} +3 -3
  18. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js.map → bundle.afb7b0e2052d21766bfe.bundle.js.map} +1 -1
  19. package/dist/index.html +3 -3
  20. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  21. package/dist/pages/autocomplete.html +1 -1
  22. package/dist/pages/choose-repository-type.html +1 -1
  23. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  24. package/dist/pages/create-index.html +4 -4
  25. package/dist/pages/dependencies.html +1 -1
  26. package/dist/pages/domainRangeInfo.html +2 -2
  27. package/dist/pages/edit.html +1 -1
  28. package/dist/pages/explore.html +1 -1
  29. package/dist/pages/export.html +1 -1
  30. package/dist/pages/find.html +1 -1
  31. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  32. package/dist/pages/graphs-visualizations.html +7 -7
  33. package/dist/pages/guides.html +1 -1
  34. package/dist/pages/import.html +1 -1
  35. package/dist/pages/jdbc-create.html +5 -5
  36. package/dist/pages/monitor/queries.html +1 -1
  37. package/dist/pages/monitor/resources.html +2 -2
  38. package/dist/pages/namespaces.html +2 -2
  39. package/dist/pages/plugins.html +1 -1
  40. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  41. package/dist/pages/rdfrank.html +2 -2
  42. package/dist/pages/repositories.html +2 -2
  43. package/dist/pages/repository.html +2 -2
  44. package/dist/pages/similarity-indexes.html +1 -1
  45. package/dist/pages/sparql-template-create.html +5 -5
  46. package/dist/pages/sparql.html +3 -3
  47. package/dist/pages/webapi.html +2 -2
  48. package/dist/res/swagger/index.html +27 -27
  49. package/package.json +1 -1
  50. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js +0 -2
  51. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/rest/cluster.rest.service.js","webpack:///./src/js/angular/clustermanagement/controllers.js"],"names":["angular","module","factory","ClusterRestService","$inject","$http","getClusterConfig","get","createCluster","groupConfiguration","post","updateCluster","nodes","patch","deleteCluster","forceDelete","data","$","param","force","delete","addNodesToCluster","nodesArray","removeNodesFromCluster","headers","getClusterStatus","getNodeStatus","controller","ClusterManagementCtrl","CreateClusterCtrl","DeleteClusterCtrl","EditClusterCtrl","AddLocationFromClusterCtrl","AddNodesDialogCtrl","RemoveNodesDialogCtrl","RemoteLocationsService","NodeState","LEADER","FOLLOWER","CANDIDATE","OUT_OF_SYNC","NO_CONNECTION","READ_ONLY","RESTRICTED","NO_CLUSTER","LinkState","IN_SYNC","SYNCING","$scope","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","$location","$translate","$rootScope","loader","isLeader","currentNode","clusterModel","leaderChanged","currentLeader","childContext","shouldShowClusterSettingsPanel","updateRequest","then","clusterConfiguration","getClusterConfiguration","getCurrentNodeStatus","finally","redraw","getLocationsWithRpcAddresses","locations","localNode","find","location","isLocal","endpoint","rpcAddress","address","onAddRemoveSuccess","message","success","handleAddRemoveErrors","status","title","failMessage","Array","isArray","reduce","acc","error","Object","keys","key","allowHtml","onopen","onclose","noop","toggleSidePanel","toggleLegend","setLoader","cancel","loaderTimeout","loaderMessage","selectNode","node","selectedNode","$apply","getLoaderMessage","instant","response","catch","slice","leader","nodeState","newLeader","links","syncStatus","forEach","push","id","source","target","hasCluster","showCreateClusterDialog","open","templateUrl","size","resolve","result","showDeleteDialog","values","every","resultMsg","successMessage","failedNodesList","warning","$broadcast","showEditConfigurationDialog","showAddNodeToClusterDialog","nodesRpcAddress","map","failMessageTitle","showRemoveNodesFromClusterDialog","timer","$on","w","element","resize","bind","mousedown","event","nodeTooltipElement","document","getElementById","contains","unbind","getAdvancedOptionsClass","optionsModule","isAriaExpanded","getAttribute","$uibModalInstance","pageTitle","autofocusId","errors","electionMinTimeout","electionRangeTimeout","heartbeatInterval","messageSizeKB","verificationTimeout","filter","selectedLocations","close","preconditionErrors","splice","handleErrors","isClusterConfigurationValid","isFormValid","clusterConfigurationForm","$invalid","nodesListValid","length","addNodeToList","loc","removeNodeFromList","index","addLocation","newLocation","ok","dismiss","LocationsRestService","windowClass","dataAddLocation","uri","locationData","msg","getError","locationAdded","addLocationHttp","getLocations","local","errorMsg","locationsArray","rpcAddressFetchers","getLocationRpcAddress","isAvailable","Promise","allSettled","getRemoteLocationsRpcAddresses","productInfo","docBase","getDocBase","isValidLocation","indexOf","copy","productShortVersion","clusterNodes","includes","isNew","shouldRemove","nodesToRemoveCount","leftNodesLessThanTwo","toggleNode","nodesToRemove"],"mappings":"8EAAAA,Q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AEXlL,EAAOmL,qBAAuBnL,EAAO8K,aAAanC,OAAS3I,EAAOkL,mBAAqB,GAG3FlL,EAAOkJ,GAAK,WACR,MAAMmC,EAAgBrL,EAAO8K,aAAa9C,OAAQjE,GAASA,EAAKkH,cAChE1D,EAAkBW,MAAMmD,IAG5BrL,EAAO2D,OAAS,WACZ4D,EAAkB4B,QAAQ,WApElClK,EAAmB7B,QAAU,CAAC,SAAU,oBAAqB,OAAQ,YAAa,0BA0ClF8B,EAAsB9B,QAAU,CAAC,SAAU,oBAAqB","file":"4.ca3eb6b5da0890c0abe0.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.cluster.service', [])\n .factory('ClusterRestService', ClusterRestService);\n\nClusterRestService.$inject = ['$http'];\n\nconst CLUSTER_GROUP_ENDPOINT = 'rest/cluster';\n\nfunction ClusterRestService($http) {\n return {\n getClusterConfig,\n createCluster,\n updateCluster,\n deleteCluster,\n addNodesToCluster,\n removeNodesFromCluster,\n getClusterStatus,\n getNodeStatus\n };\n\n function getClusterConfig() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/config`);\n }\n\n function createCluster(groupConfiguration) {\n return $http.post(`${CLUSTER_GROUP_ENDPOINT}/config`, groupConfiguration);\n }\n\n function updateCluster(groupConfiguration) {\n if (groupConfiguration.nodes) {\n delete groupConfiguration.nodes;\n }\n return $http.patch(`${CLUSTER_GROUP_ENDPOINT}/config`, groupConfiguration);\n }\n\n function deleteCluster(forceDelete) {\n const data = $.param({\n force: forceDelete\n });\n return $http.delete(`${CLUSTER_GROUP_ENDPOINT}/config?${data}`);\n }\n\n function addNodesToCluster(nodesArray) {\n return $http.post(`${CLUSTER_GROUP_ENDPOINT}/config/node`, {nodes: nodesArray});\n }\n\n function removeNodesFromCluster(nodesArray) {\n return $http.delete(`${CLUSTER_GROUP_ENDPOINT}/config/node`, {data: {nodes: nodesArray}, headers: {'Content-Type': 'application/json'}});\n }\n\n function getClusterStatus() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/group/status`);\n }\n\n function getNodeStatus() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/node/status`);\n }\n}\n","import 'angular/core/services';\nimport 'angular/rest/cluster.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.cluster.service',\n 'toastr',\n 'pageslide-directive'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.controllers', modules)\n .controller('ClusterManagementCtrl', ClusterManagementCtrl)\n .controller('CreateClusterCtrl', CreateClusterCtrl)\n .controller('DeleteClusterCtrl', DeleteClusterCtrl)\n .controller('EditClusterCtrl', EditClusterCtrl)\n .controller('AddLocationFromClusterCtrl', AddLocationFromClusterCtrl)\n .controller('AddNodesDialogCtrl', AddNodesDialogCtrl)\n .controller('RemoveNodesDialogCtrl', RemoveNodesDialogCtrl)\n .factory('RemoteLocationsService', RemoteLocationsService);\n\nexport 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};\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION'\n};\n\nClusterManagementCtrl.$inject = ['$scope', '$http', '$q', 'toastr', '$repositories', '$uibModal', '$sce',\n '$window', '$interval', 'ModalService', '$timeout', 'ClusterRestService', '$location', '$translate', 'RemoteLocationsService', '$rootScope'];\n\nfunction ClusterManagementCtrl($scope, $http, $q, toastr, $repositories, $uibModal, $sce,\n $window, $interval, ModalService, $timeout, ClusterRestService, $location, $translate, RemoteLocationsService, $rootScope) {\n $scope.loader = true;\n $scope.isLeader = false;\n $scope.currentNode = null;\n $scope.clusterModel = {};\n $scope.NodeState = NodeState;\n $scope.leaderChanged = false;\n $scope.currentLeader = null;\n\n // Holds child context\n $scope.childContext = {};\n\n $scope.shouldShowClusterSettingsPanel = false;\n const DELETED_ON_NODE_MESSAGE = 'Cluster was deleted on this node.';\n $scope.onopen = $scope.onclose = () => angular.noop();\n\n $scope.toggleSidePanel = () => {\n $scope.shouldShowClusterSettingsPanel = !$scope.shouldShowClusterSettingsPanel;\n };\n\n $scope.toggleLegend = () => {\n if ($scope.childContext.toggleLegend) {\n $scope.childContext.toggleLegend();\n }\n };\n\n // TODO: Similar function is declared multiple times in different components. Find out how to avoid it!\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n }, 50);\n } else {\n $scope.loader = false;\n }\n };\n\n function selectNode(node) {\n if ($scope.selectedNode !== node) {\n $scope.selectedNode = node;\n } else {\n $scope.selectedNode = null;\n }\n $scope.$apply();\n }\n\n $scope.childContext.selectNode = selectNode;\n\n function initialize() {\n $scope.loader = true;\n\n return $scope.getCurrentNodeStatus()\n .then(() => {\n return $scope.getClusterConfiguration();\n })\n .then(() => {\n return $scope.getClusterStatus();\n })\n .finally(() => {\n $scope.setLoader(false);\n });\n }\n\n let updateRequest;\n function updateCluster(force) {\n if (updateRequest) {\n return;\n }\n\n updateRequest = $scope.getClusterStatus()\n .then(() => {\n if (force || !$scope.clusterConfiguration) {\n return $scope.getClusterConfiguration();\n }\n })\n .then(() => {\n if (!$scope.currentNode || $scope.leaderChanged) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .finally(() => {\n updateRequest = null;\n $scope.childContext.redraw();\n });\n }\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.getClusterConfiguration = () => {\n return ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.clusterConfiguration = response.data;\n if (!$scope.currentNode) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .catch(() => {\n $scope.clusterConfiguration = null;\n });\n };\n\n function isLeaderChanged(currentLeader, newLeader) {\n if (!newLeader) {\n // If election is in place and there is no leader yet, consider it as leader change\n return true;\n }\n return !currentLeader || currentLeader.address !== newLeader.address;\n }\n\n $scope.getClusterStatus = function () {\n return ClusterRestService.getClusterStatus()\n .then(function (response) {\n const nodes = response.data.slice();\n const leader = nodes.find((node) => node.nodeState === NodeState.LEADER);\n\n if (isLeaderChanged($scope.currentLeader, leader)) {\n $scope.currentLeader = leader;\n $scope.leaderChanged = true;\n }\n $scope.currentNode = nodes.find((node) => node.address === $scope.currentNode.address);\n\n const links = [];\n if (leader) {\n Object.keys(leader.syncStatus).forEach((node) => {\n const status = leader.syncStatus[node];\n if (status !== LinkState.NO_CONNECTION) {\n links.push({\n id: `${leader.address}-${node}`,\n source: leader.address,\n target: node,\n status\n });\n }\n });\n }\n $scope.clusterModel.hasCluster = true;\n $scope.clusterModel.nodes = nodes;\n $scope.clusterModel.links = links;\n })\n .catch(function (error) {\n if (error.status === 404) {\n $scope.clusterModel.hasCluster = false;\n $scope.clusterModel.nodes = [];\n $scope.clusterModel.links = [];\n $scope.clusterConfiguration = null;\n }\n });\n };\n\n $scope.showCreateClusterDialog = function () {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-create-dialog.html',\n controller: 'CreateClusterCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n getLocationsWithRpcAddresses();\n updateCluster(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(function (forceDelete) {\n const loaderMessage = $translate.instant('cluster_management.delete_cluster_dialog.loader_message');\n $scope.setLoader(true, loaderMessage);\n ClusterRestService.deleteCluster(forceDelete)\n .then((response) => {\n const allNodesDeleted = Object.values(response.data).every((resultMsg) => resultMsg === DELETED_ON_NODE_MESSAGE);\n if (allNodesDeleted) {\n const successMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.success_delete');\n toastr.success(successMessage);\n } else {\n const successMessage = $translate.instant(\n 'cluster_management.delete_cluster_dialog.notifications.success_delete_partial');\n const failedNodesList = Object.keys(response.data)\n .reduce((message, key) => message += `<div>${key} - ${response.data[key]}</div>`, '');\n toastr.warning(failedNodesList, successMessage, {allowHtml: true});\n }\n $scope.getClusterConfiguration();\n })\n .catch((error) => {\n const failMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.fail_delete');\n const failedNodesList = Object.keys(error.data)\n .reduce((message, key) => message += `<div>${key} - ${error.data[key]}</div>`, '');\n toastr.error(failedNodesList, failMessage, {allowHtml: true});\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n $rootScope.$broadcast('reloadLocations');\n });\n });\n };\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: function () {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n updateCluster(true);\n });\n };\n\n $scope.getCurrentNodeStatus = () => {\n return ClusterRestService.getNodeStatus()\n .then((response) => {\n $scope.leaderChanged = false;\n $scope.currentNode = response.data;\n })\n .catch((error) => {\n $scope.currentNode = error.data;\n $scope.clusterModel.hasCluster = false;\n })\n .then(() => getLocationsWithRpcAddresses());\n };\n\n function getLocationsWithRpcAddresses() {\n return RemoteLocationsService.getLocationsWithRpcAddresses()\n .then((locations) => {\n const localNode = locations.find((location) => location.isLocal);\n if (localNode) {\n localNode.endpoint = $scope.currentNode.endpoint;\n localNode.rpcAddress = $scope.currentNode.address;\n }\n $scope.clusterModel.locations = locations;\n });\n }\n\n $scope.showAddNodeToClusterDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/add-nodes-dialog.html',\n controller: 'AddNodesDialogCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel,\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.then(function (nodes) {\n const loaderMessage = $translate.instant('cluster_management.cluster_page.add_nodes_loader');\n $scope.setLoader(true, loaderMessage);\n\n const nodesRpcAddress = nodes.map((node) => node.rpcAddress);\n ClusterRestService.addNodesToCluster(nodesRpcAddress)\n .then(() => {\n const successMessage = $translate.instant(\n 'cluster_management.cluster_page.notifications.add_nodes_success');\n onAddRemoveSuccess(successMessage);\n })\n .catch((error) => {\n const failMessageTitle = $translate.instant('cluster_management.cluster_page.notifications.add_nodes_fail');\n handleAddRemoveErrors(error.data, error.status, failMessageTitle);\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n });\n })\n .finally(() => getLocationsWithRpcAddresses());\n };\n\n $scope.showRemoveNodesFromClusterDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html',\n controller: 'RemoveNodesDialogCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel\n };\n }\n }\n });\n\n modalInstance.result.then(function (nodes) {\n const loaderMessage = $translate.instant('cluster_management.cluster_page.remove_nodes_loader');\n $scope.setLoader(true, loaderMessage);\n\n const nodesRpcAddress = nodes.map((node) => node.address);\n ClusterRestService.removeNodesFromCluster(nodesRpcAddress)\n .then(() => {\n const successMessage = $translate.instant('cluster_management.cluster_page.notifications.remove_nodes_success');\n onAddRemoveSuccess(successMessage);\n })\n .catch((error) => {\n const failMessageTitle = $translate.instant('cluster_management.cluster_page.notifications.remove_nodes_fail');\n handleAddRemoveErrors(error.data, error.status, failMessageTitle);\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n });\n });\n };\n\n function onAddRemoveSuccess(message) {\n toastr.success(message);\n $scope.getClusterConfiguration();\n }\n\n function handleAddRemoveErrors(data, status, title) {\n let failMessage = data.message || data;\n\n if (status === 400 && Array.isArray(data)) {\n failMessage = data.reduce((acc, error) => acc += `<div>${error}</div>`, '');\n } else if (status === 412) {\n failMessage = Object.keys(data)\n .reduce((message, key) => message += `<div>${key} - ${data[key]}</div>`, '');\n }\n toastr.error(failMessage, title, {allowHtml: true});\n }\n\n initialize()\n .finally(() => {\n const timer = $interval(function () {\n updateCluster();\n }, 1000);\n\n $scope.$on(\"$destroy\", function () {\n $interval.cancel(timer);\n });\n });\n\n // track window resizing and window mousedown\n const w = angular.element($window);\n const resize = function () {\n $scope.childContext.resize();\n };\n w.bind('resize', resize);\n\n const mousedown = function (event) {\n const target = event.target;\n const nodeTooltipElement = document.getElementById('nodeTooltip');\n if ($scope.selectedNode && nodeTooltipElement !== target && !nodeTooltipElement.contains(target)) {\n $scope.childContext.selectNode(null);\n }\n };\n w.bind('mousedown', mousedown);\n $scope.$on('$destroy', function () {\n w.unbind('resize', resize);\n w.unbind('mousedown', mousedown);\n });\n}\n\nconst getAdvancedOptionsClass = function () {\n const optionsModule = document.getElementById('advancedOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'fa fa-angle-down';\n }\n }\n return 'fa fa-angle-right';\n};\n\nCreateClusterCtrl.$inject = ['$scope', '$uibModalInstance', '$timeout', 'ClusterRestService', 'toastr', '$translate', 'data', '$uibModal',\n 'RemoteLocationsService', '$rootScope'];\n\nfunction CreateClusterCtrl($scope, $uibModalInstance, $timeout, ClusterRestService, toastr, $translate, data, $uibModal, RemoteLocationsService, $rootScope) {\n $scope.pageTitle = $translate.instant('cluster_management.cluster_page.create_page_title');\n $scope.autofocusId = 'autofocus';\n $scope.errors = [];\n $scope.clusterConfiguration = {\n electionMinTimeout: 8000,\n electionRangeTimeout: 6000,\n heartbeatInterval: 2000,\n messageSizeKB: 64,\n verificationTimeout: 1500,\n nodes: []\n };\n\n $scope.locations = data.clusterModel.locations.filter((location) => !location.isLocal);\n $scope.selectedLocations = data.clusterModel.locations.filter((location) => location.isLocal);\n\n $scope.loader = false;\n\n $scope.getAdvancedOptionsClass = getAdvancedOptionsClass;\n\n $scope.createCluster = function () {\n $scope.setLoader(true, $translate.instant('cluster_management.cluster_page.creating_cluster_loader'));\n $scope.clusterConfiguration.nodes = $scope.selectedLocations.map((node) => node.rpcAddress);\n return ClusterRestService.createCluster($scope.clusterConfiguration)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_page.notifications.create_success'));\n $uibModalInstance.close();\n })\n .catch(function (error) {\n handleErrors(error.data, error.status);\n })\n .finally(() => {\n $scope.setLoader(false);\n $rootScope.$broadcast('reloadLocations');\n });\n };\n\n function handleErrors(data, status) {\n delete $scope.preconditionErrors;\n toastr.error($translate.instant('cluster_management.cluster_page.notifications.create_failed'));\n $scope.errors.splice(0);\n if (status === 412) {\n $scope.preconditionErrors = Object.keys(data).map((key) => `${key} - ${data[key]}`);\n } else if (status === 400) {\n $scope.errors.push(...data);\n } else if (status === 409) {\n $scope.errors.push(data);\n }\n }\n\n $scope.isClusterConfigurationValid = () => {\n const isFormValid = !$scope.clusterConfigurationForm.$invalid;\n const nodesListValid = $scope.selectedLocations && $scope.selectedLocations.length >= 2;\n return isFormValid && nodesListValid;\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.addNodeToList = function (location) {\n if (!location.rpcAddress) {\n return;\n }\n $scope.selectedLocations.push(location);\n $scope.locations = $scope.locations.filter((loc) => loc.endpoint !== location.endpoint);\n };\n\n $scope.removeNodeFromList = function (index, node) {\n if (node.isLocal) {\n return;\n }\n $scope.selectedLocations.splice(index, 1);\n $scope.locations.push(node);\n };\n\n $scope.addLocation = function () {\n RemoteLocationsService.addLocation()\n .then((newLocation) => {\n if (newLocation) {\n $scope.locations.push(newLocation);\n }\n });\n };\n\n $scope.ok = function () {\n if (!$scope.isClusterConfigurationValid()) {\n toastr.warning($translate.instant('cluster_management.cluster_page.notifications.form_invalid'));\n return;\n }\n $scope.createCluster();\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nDeleteClusterCtrl.$inject = ['$scope', '$uibModalInstance'];\n\nfunction DeleteClusterCtrl($scope, $uibModalInstance) {\n $scope.forceDelete = false;\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.forceDelete);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nRemoteLocationsService.$inject = ['$http', 'toastr', '$uibModal', 'LocationsRestService', '$translate'];\n\nfunction RemoteLocationsService($http, toastr, $uibModal, LocationsRestService, $translate) {\n return {\n addLocation: addLocation,\n getLocationsWithRpcAddresses: getLocationsWithRpcAddresses\n };\n\n function getLocationsWithRpcAddresses() {\n return getLocations()\n .then((locations) => {\n if (locations) {\n return getRemoteLocationsRpcAddresses(locations);\n }\n });\n }\n\n /**\n * Sets multiple remote locations' rpc addresses. Skips local location and locations with errors\n * @param {any[]} locationsArray\n * @return {Promise<[]>} locationArray with filled rpc addresses\n */\n function getRemoteLocationsRpcAddresses(locationsArray) {\n const rpcAddressFetchers = locationsArray.filter((location) => !location.isLocal && !location.error).map((location) => {\n return getLocationRpcAddress(location)\n .then((response) => {\n location.rpcAddress = response.data;\n location.isAvailable = true;\n return location;\n })\n .catch((error) => {\n location.isAvailable = false;\n location.error = getError(error.data, error.status);\n });\n });\n return Promise.allSettled(rpcAddressFetchers).then(() => locationsArray);\n }\n\n /**\n * Fetch locations and map them to a location model\n *\n * @return {*} all remote locations mapped to a location model\n */\n function getLocations() {\n return LocationsRestService.getLocations()\n .then(function (response) {\n return response.data.map((loc) => {\n return {\n isLocal: loc.local,\n endpoint: loc.uri,\n rpcAddress: loc.rpcAddress || '',\n error: loc.errorMsg\n };\n });\n })\n .catch(function (error) {\n const msg = getError(error.data, error.status);\n toastr.error(msg, $translate.instant('common.error'));\n });\n }\n\n /**\n * Fetch rpc address of a remote location\n * @param {*} location the remote location\n * @return {Promise<String>} the rpc address of the location\n */\n function getLocationRpcAddress(location) {\n return LocationsRestService.getLocationRpcAddress(location.endpoint);\n\n }\n\n function addLocation() {\n let newLocation;\n return $uibModal.open({\n templateUrl: 'js/angular/templates/modal/add-location.html',\n windowClass: 'addLocationDialog',\n controller: 'AddLocationFromClusterCtrl'\n }).result\n .then((dataAddLocation) => {\n newLocation = dataAddLocation;\n newLocation.isLocal = false;\n newLocation.endpoint = newLocation.uri;\n return addLocationHttp(newLocation);\n });\n }\n\n function addLocationHttp(locationData) {\n let newLocation;\n return LocationsRestService.addLocation(locationData)\n .catch((error) => {\n const msg = getError(error.data, error.status);\n toastr.error(msg, $translate.instant('common.error'));\n return false;\n })\n .then((locationAdded) => {\n if (locationAdded) {\n return getLocationsWithRpcAddresses();\n }\n return false;\n })\n .then((locations) => {\n if (locations === false) {\n return;\n }\n newLocation = locations.find((location) => location.endpoint === locationData.uri);\n return newLocation;\n });\n }\n}\n\nAddLocationFromClusterCtrl.$inject = ['$scope', '$uibModalInstance', 'toastr', 'productInfo', '$translate'];\n\nfunction AddLocationFromClusterCtrl($scope, $uibModalInstance, toastr, productInfo, $translate) {\n //TODO: This, along with the view are duplicated from repositories page. Must be extracted for re-usability.\n $scope.newLocation = {\n 'uri': '',\n 'authType': 'signature',\n 'username': '',\n 'password': '',\n 'active': false\n };\n $scope.docBase = getDocBase(productInfo);\n\n $scope.isValidLocation = function () {\n return ($scope.newLocation.uri.length < 6 ||\n $scope.newLocation.uri.indexOf('http:') === 0 || $scope.newLocation.uri.indexOf('https:') === 0)\n && $scope.newLocation.uri.indexOf('/repositories') <= -1;\n };\n\n $scope.ok = function () {\n if (!$scope.newLocation) {\n toastr.error($translate.instant('location.cannot.be.empty.error'));\n return;\n }\n $uibModalInstance.close($scope.newLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditClusterCtrl.$inject = ['$scope', '$uibModalInstance', '$timeout', 'ClusterRestService', 'toastr', '$translate', 'data'];\n\nfunction EditClusterCtrl($scope, $uibModalInstance, $timeout, ClusterRestService, toastr, $translate, data) {\n $scope.pageTitle = $translate.instant('cluster_management.cluster_page.edit_page_title');\n $scope.errors = [];\n $scope.clusterConfiguration = angular.copy(data.clusterConfiguration);\n $scope.loader = false;\n\n $scope.updateCluster = function () {\n $scope.setLoader(true, $translate.instant('cluster_management.cluster_page.updating_cluster_loader'));\n return ClusterRestService.updateCluster($scope.clusterConfiguration)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_page.notifications.update_success'));\n $uibModalInstance.close();\n })\n .catch(function (response) {\n handleErrors(response.data, response.status);\n })\n .finally(() => $scope.setLoader(false));\n };\n\n function handleErrors(data, status) {\n delete $scope.preconditionErrors;\n toastr.error($translate.instant('cluster_management.cluster_page.notifications.update_failed'));\n $scope.errors.splice(0);\n\n if (status === 409 || typeof data === 'string') {\n $scope.errors.push(data);\n } else if (status === 412) {\n $scope.preconditionErrors = Object.keys(data).map((key) => `${key} - ${data[key]}`);\n } else if (status === 400) {\n $scope.errors.push(...data);\n }\n }\n\n $scope.isClusterConfigurationValid = () => {\n return !$scope.clusterConfigurationForm.$invalid;\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.ok = function () {\n if (!$scope.isClusterConfigurationValid()) {\n toastr.warning($translate.instant('cluster_management.cluster_page.notifications.form_invalid'));\n return;\n }\n $scope.updateCluster();\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nconst getDocBase = function (productInfo) {\n return `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}`;\n};\n\nAddNodesDialogCtrl.$inject = ['$scope', '$uibModalInstance', 'data', '$uibModal', 'RemoteLocationsService'];\n\nfunction AddNodesDialogCtrl($scope, $uibModalInstance, data, $uibModal, RemoteLocationsService) {\n const clusterConfiguration = angular.copy(data.clusterConfiguration);\n const clusterModel = angular.copy(data.clusterModel);\n $scope.nodes = [];\n\n $scope.clusterNodes = clusterModel.nodes.map((node) => ({rpcAddress: node.address, endpoint: node.endpoint}));\n $scope.locations = clusterModel.locations.filter((location) => !clusterConfiguration.nodes.includes(location.rpcAddress));\n $scope.locations.forEach((location) => location.isNew = true);\n\n $scope.addNodeToList = function (location) {\n if (!location.rpcAddress) {\n return;\n }\n $scope.nodes.push(location);\n $scope.locations = $scope.locations.filter((loc) => loc.endpoint !== location.endpoint);\n };\n\n $scope.removeNodeFromList = function (index, node) {\n $scope.nodes.splice(index, 1);\n $scope.locations.push(node);\n };\n\n $scope.addLocation = function () {\n RemoteLocationsService.addLocation()\n .then((newLocation) => {\n if (newLocation) {\n $scope.locations.push(newLocation);\n }\n });\n };\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.nodes);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nRemoveNodesDialogCtrl.$inject = ['$scope', '$uibModalInstance', 'data'];\n\nfunction RemoveNodesDialogCtrl($scope, $uibModalInstance, data) {\n const clusterModel = angular.copy(data.clusterModel);\n\n $scope.clusterNodes = clusterModel.nodes;\n $scope.clusterNodes.forEach((node) => node.shouldRemove = false);\n $scope.nodesToRemoveCount = 0;\n $scope.leftNodesLessThanTwo = false;\n\n $scope.toggleNode = function (index, node) {\n node.shouldRemove = !node.shouldRemove;\n if (node.shouldRemove) {\n $scope.nodesToRemoveCount++;\n } else {\n $scope.nodesToRemoveCount--;\n }\n $scope.leftNodesLessThanTwo = $scope.clusterNodes.length - $scope.nodesToRemoveCount < 2;\n };\n\n $scope.ok = function () {\n const nodesToRemove = $scope.clusterNodes.filter((node) => node.shouldRemove);\n $uibModalInstance.close(nodesToRemove);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}