graphdb-workbench 2.6.2-TR2 → 2.6.2

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 (64) hide show
  1. package/dist/12.72b1cf9c0b2a0cf0e39b.bundle.js +1 -0
  2. package/dist/131.f41a0b6b9036447b1077.bundle.js +1 -1
  3. package/dist/16.af6bc53be819045291bd.bundle.js +1 -1
  4. package/dist/242.7be67f4aaa4647098043.bundle.js +1 -0
  5. package/dist/257.943f597bddc0d65103c5.bundle.js +1 -1
  6. package/dist/259.2c88332b7f1b47935a47.bundle.js +1 -1
  7. package/dist/260.d745422c537bdd9647bb.bundle.js +1 -1
  8. package/dist/261.7efff7f93f61f061f5ca.bundle.js +1 -1
  9. package/dist/27.92bfb161b420732902a3.bundle.js +1 -1
  10. package/dist/28.2e0277168c8f14f9c085.bundle.js +1 -1
  11. package/dist/288.6cef162ec3cec3cde603.bundle.js +1 -1
  12. package/dist/40.53352fda81f370182e99.bundle.js +1 -1
  13. package/dist/5.f15016e5e47214a9bc88.bundle.js +1 -0
  14. package/dist/63.dbce2c16115eac52fed2.bundle.js +1 -1
  15. package/dist/96.53f0a874878aedfa987a.bundle.js +1 -0
  16. package/dist/{bundle.76129066c5029b3d5ff0.bundle.js → bundle.67ed0787383a638da8e9.bundle.js} +2 -2
  17. package/dist/css/bootstrap-graphdb-theme-dark-auto.css +4 -0
  18. package/dist/css/clustermanagement.css +5 -1
  19. package/dist/css/lib/ontotext-yasgui-web-component.css +4 -0
  20. package/dist/i18n/locale-en.json +2 -1
  21. package/dist/i18n/locale-fr.json +2 -1
  22. package/dist/index.html +4 -4
  23. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  24. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  25. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  26. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
  27. package/dist/js/angular/security/templates/user.html +1 -1
  28. package/dist/license-checker.json +4 -4
  29. package/dist/{main.cd9080d130335332d006.css → main.b830c2fc237abd684f41.css} +1 -1
  30. package/dist/pages/aclmanagement.html +2 -2
  31. package/dist/pages/autocomplete.html +1 -1
  32. package/dist/pages/choose-repository-type.html +1 -1
  33. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  34. package/dist/pages/create-index.html +1 -1
  35. package/dist/pages/dependencies.html +1 -1
  36. package/dist/pages/domainRangeInfo.html +2 -2
  37. package/dist/pages/edit.html +1 -1
  38. package/dist/pages/explore.html +1 -1
  39. package/dist/pages/export.html +1 -1
  40. package/dist/pages/find.html +1 -1
  41. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  42. package/dist/pages/graphs-visualizations.html +7 -7
  43. package/dist/pages/guides.html +1 -1
  44. package/dist/pages/import.html +1 -1
  45. package/dist/pages/jdbc-create.html +1 -1
  46. package/dist/pages/monitor/backup-and-restore.html +1 -1
  47. package/dist/pages/monitor/queries.html +1 -1
  48. package/dist/pages/monitor/resources.html +1 -1
  49. package/dist/pages/namespaces.html +2 -2
  50. package/dist/pages/plugins.html +1 -1
  51. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  52. package/dist/pages/rdfrank.html +2 -2
  53. package/dist/pages/repositories.html +1 -1
  54. package/dist/pages/repository.html +1 -1
  55. package/dist/pages/similarity-indexes.html +1 -1
  56. package/dist/pages/sparql-editor.html +1 -1
  57. package/dist/pages/sparql-template-create.html +1 -1
  58. package/dist/pages/webapi.html +2 -2
  59. package/dist/res/swagger/index.html +27 -27
  60. package/package.json +2 -2
  61. package/dist/12.75466fc44ea53c351a67.bundle.js +0 -1
  62. package/dist/242.1c84a9ac05f0cb9fdd73.bundle.js +0 -1
  63. package/dist/5.f58f4e96c07a6a7a0e06.bundle.js +0 -1
  64. package/dist/96.e01346a08ab153a02364.bundle.js +0 -1
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[5,43,56,57,58,92,93,94,97,212],{110:function(e,t,o){"use strict";o.r(t),o.d(t,"NodeState",(function(){return r})),o.d(t,"RecoveryState",(function(){return s})),o.d(t,"LinkState",(function(){return a}));o(65),o(76),o(134),o(135),o(136),o(137),o(138),o(139),o(140);var n=o(63);angular.module("graphdb.framework.clustermanagement.controllers.cluster-management",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","graphdb.framework.clustermanagement.services.remote-locations","graphdb.framework.clustermanagement.controllers.remove-nodes","graphdb.framework.clustermanagement.controllers.create-cluster","graphdb.framework.clustermanagement.controllers.edit-cluster","graphdb.framework.clustermanagement.controllers.delete-cluster","graphdb.framework.clustermanagement.controllers.add-location","graphdb.framework.clustermanagement.controllers.add-nodes","graphdb.framework.clustermanagement.controllers.replace-nodes","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",l);const r={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},s={SEARCHING_FOR_NODE:"SEARCHING_FOR_NODE",WAITING_FOR_SNAPSHOT:"WAITING_FOR_SNAPSHOT",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT",APPLYING_SNAPSHOT:"APPLYING_SNAPSHOT",BUILDING_SNAPSHOT:"BUILDING_SNAPSHOT",SENDING_SNAPSHOT:"SENDING_SNAPSHOT"},a={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION"};function l(e,t,o,s,l,c,i,d,u,g,m,f,p,h,C,N,_){e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=r,e.leaderChanged=!1,e.currentLeader=null,e.isAdmin=function(){return d.isAuthenticated()&&d.isAdmin()},e.childContext={},e.shouldShowClusterSettingsPanel=!1;let L;function S(t){L||(L=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{L=null,e.childContext.redraw()}))}function $(){return N.getLocationsWithRpcAddresses().then(t=>{const o=t.find(e=>e.isLocal);o&&(o.endpoint=e.currentNode.endpoint,o.rpcAddress=e.currentNode.address),e.clusterModel.locations=t})}e.onopen=e.onclose=()=>angular.noop(),e.toggleSidePanel=()=>{e.shouldShowClusterSettingsPanel=!e.shouldShowClusterSettingsPanel},e.toggleLegend=()=>{e.childContext.toggleLegend&&e.childContext.toggleLegend()},e.setLoader=function(t,o){f.cancel(e.loaderTimeout),t?(e.loaderMessage=o,e.loaderTimeout=f((function(){e.loader=t}),50)):e.loader=!1},e.childContext.selectNode=function(t){e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},e.getLoaderMessage=function(){return e.loaderMessage||C.instant("common.loading")},e.getClusterConfiguration=()=>p.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=function(){return p.getClusterStatus().then((function(t){const o=t.data.slice(),n=o.find(e=>e.nodeState===r.LEADER);var s,l;s=e.currentLeader,(l=n)&&s&&s.address===l.address||(e.currentLeader=n,e.leaderChanged=!0),e.currentNode=o.find(t=>t.address===e.currentNode.address);const c=[];n&&Object.keys(n.syncStatus).forEach(e=>{const t=n.syncStatus[e];t!==a.NO_CONNECTION&&c.push({id:`${n.address}-${e}`,source:n.address,target:e,status:t})}),e.clusterModel.hasCluster=!0,e.clusterModel.nodes=o,e.clusterModel.links=c})).catch((function(t){404===t.status&&(e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null)}))},e.showCreateClusterDialog=function(){c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:v,clusterModel:e.clusterModel}}}}).result.finally((function(){$(),S(!0)}))},e.showDeleteDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then((function(t){const o=C.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,o),p.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");s.success(e)}else{const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),o=Object.keys(t.data).reduce((e,o)=>e+`<div>${o} - ${t.data[o]}</div>`,"");s.warning(o,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=C.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");T(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),S(!0),_.$broadcast("reloadLocations")})}))},e.showEditConfigurationDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:function(){return{clusterConfiguration:e.clusterConfiguration}}}}).result.finally((function(){S(!0)}))},e.getCurrentNodeStatus=()=>p.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>$());const v=function(e){return m.openSimpleModal({title:C.instant("location.confirm.detach"),message:C.instant("location.confirm.detach.warning",{uri:e.endpoint}),warning:!0}).result.then(()=>l.deleteLocation(e.endpoint))};function w(t){s.success(t),e.getClusterConfiguration()}function T(e,t,o){let r=e.message||e;400===t&&Array.isArray(e)?r=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(n.isString)(e)||(r=Object.keys(e).reduce((t,o)=>t+`<div>${o} - ${e[o]}</div>`,"")),s.error(r,o,{allowHtml:!0})}e.showAddNodeToClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:v,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then((function(t){const o=C.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.rpcAddress);p.addNodesToCluster(n).then(()=>{w(C.instant("cluster_management.cluster_page.notifications.add_nodes_success"))}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.add_nodes_fail");T(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),S(!0)})})).finally(()=>$())},e.showReplaceNodesDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/replace-nodes-dialog.html",controller:"ReplaceNodesDialogCtrl",size:"lg",resolve:{data:function(){return{deleteLocation:v,clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then(t=>{const o=C.instant("cluster_management.cluster_page.replace_nodes_loader");e.setLoader(!0,o);const n={addNodes:t.newNodes.map(e=>e.rpcAddress),removeNodes:t.oldNodes.map(e=>e.rpcAddress)};p.replaceNodesInCluster(n).then(()=>{w(C.instant("cluster_management.cluster_page.notifications.replace_nodes_success"))}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.replace_nodes_fail");T(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),S(!0)})}).finally(()=>$())},e.showRemoveNodesFromClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const o=C.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,o);const n=t.map(e=>e.address);p.removeNodesFromCluster(n).then(()=>{w(C.instant("cluster_management.cluster_page.notifications.remove_nodes_success"))}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");T(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),S(!0)})}))},(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=g((function(){S()}),1e3);e.$on("$destroy",(function(){g.cancel(t)}))});const R=angular.element(u),A=function(){e.childContext.resize()};R.bind("resize",A);const O=function(t){const o=t.target,n=document.getElementById("nodeTooltip");e.selectedNode&&n!==o&&!n.contains(o)&&e.childContext.selectNode(null)};R.bind("mousedown",O),e.$on("$destroy",(function(){R.unbind("resize",A),R.unbind("mousedown",O)}))}l.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$jwtAuth","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope"]},134:function(e,t){function o(e,t,o){const n=_.cloneDeep(o.clusterModel);e.clusterNodes=n.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=function(t,o){o.shouldRemove=!o.shouldRemove,o.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=function(){const o=e.clusterNodes.filter(e=>e.shouldRemove);t.close(o)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.remove-nodes",[]).controller("RemoveNodesDialogCtrl",o),o.$inject=["$scope","$uibModalInstance","data"]},135:function(e,t,o){"use strict";o.r(t);o(65);angular.module("graphdb.framework.clustermanagement.controllers.create-cluster",[]).controller("CreateClusterCtrl",r);const n=function(){const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"};function r(e,t,o,r,s,a,l,c,i,d){e.pageTitle=a.instant("cluster_management.cluster_page.create_page_title"),e.autofocusId="autofocus",e.errors=[],e.clusterConfiguration={electionMinTimeout:8e3,electionRangeTimeout:6e3,heartbeatInterval:2e3,messageSizeKB:64,verificationTimeout:1500,transactionLogMaximumSizeGB:50,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.deleteLocation=function(t,o){t.preventDefault(),t.stopPropagation(),l.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.getAdvancedOptionsClass=n,e.createCluster=function(){return e.setLoader(!0,a.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),r.createCluster(e.clusterConfiguration).then(()=>{s.success(a.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(t){!function(t,o){let n;delete e.preconditionErrors,e.errors.splice(0),412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o?e.errors.push(...t):409===o?e.errors.push(t):(t.message||"string"==typeof t)&&(n=t.message||t);s.error(n,a.instant("cluster_management.cluster_page.notifications.create_failed"))}(t.data,t.status)})).finally(()=>{e.setLoader(!1),d.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,o=e.selectedLocations&&e.selectedLocations.length>=2;return t&&o},e.setLoader=function(t,n){o.cancel(e.loaderTimeout),t?e.loaderTimeout=o((function(){e.loader=t,e.loaderMessage=n}),300):e.loader=!1},e.addNodeToList=function(t){t.rpcAddress&&(e.selectedLocations.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,o){o.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(o))},e.addLocation=function(){i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){e.isClusterConfigurationValid()?e.createCluster():s.warning(a.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}r.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"]},136:function(e,t,o){"use strict";o.r(t);o(65);function n(e,t,o,n,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(a.clusterConfiguration),e.loader=!1,e.updateCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(t){!function(t,o){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===o||"string"==typeof t?e.errors.push(t):412===o?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===o&&e.errors.push(...t)}(t.data,t.status)})).finally(()=>e.setLoader(!1))},e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=function(t,n){o.cancel(e.loaderTimeout),t?e.loaderTimeout=o((function(){e.loader=t,e.loaderMessage=n}),300):e.loader=!1},e.ok=function(){e.isClusterConfigurationValid()?e.updateCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},137:function(e,t){function o(e,t){e.forceDelete=!1,e.ok=function(){t.close(e.forceDelete)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.delete-cluster",[]).controller("DeleteClusterCtrl",o),o.$inject=["$scope","$uibModalInstance"]},138:function(e,t){angular.module("graphdb.framework.clustermanagement.controllers.add-location",[]).controller("AddLocationFromClusterCtrl",o),o.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"];function o(e,t,o,n,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion}(n),e.isValidLocation=function(){return(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1},e.ok=function(){e.newLocation?t.close(e.newLocation):o.error(r.instant("location.cannot.be.empty.error"))},e.cancel=function(){t.dismiss("cancel")}}},139:function(e,t,o){"use strict";o.r(t);o(76);function n(e,t,o,n,r){const s=_.cloneDeep(o.clusterConfiguration),a=_.cloneDeep(o.clusterModel);e.nodes=[],e.clusterNodes=a.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint})),e.locations=a.locations.filter(e=>!s.nodes.includes(e.rpcAddress)),e.locations.forEach(e=>e.isNew=!0),e.deleteLocation=function(t,n){t.preventDefault(),t.stopPropagation(),o.deleteLocation(n).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==n.endpoint))},e.addNodeToList=function(t){t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,o){e.nodes.splice(t,1),e.locations.push(o)},e.addLocation=function(){r.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){t.close(e.nodes)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.clustermanagement.controllers.add-nodes",[]).controller("AddNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"]},140:function(e,t,o){"use strict";o.r(t);o(65),o(76);function n(e,t,o,n,r,s,a,l,c){const i=_.cloneDeep(s.clusterConfiguration),d=_.cloneDeep(s.clusterModel);e.replacementNodes=[],e.nodesToReplace=[],e.nodesToReplaceCount=0,e.leftNodesMajority=!1,e.clusterNodes=d.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint,shouldReplace:!1})),e.locations=d.locations.filter(e=>!i.nodes.includes(e.rpcAddress)),e.locations.forEach(e=>e.isNew=!0),e.addLocation=()=>{c.addLocation().then(t=>{t&&e.locations.push(t)})},e.toggleNode=(t,o)=>{if(o.shouldReplace=!o.shouldReplace,o.shouldReplace)e.nodesToReplaceCount++,e.nodesToReplace.push(o);else{e.nodesToReplaceCount--;const t=e.nodesToReplace.findIndex(e=>e.rpcAddress===o.rpcAddress);e.nodesToReplace.splice(t,1)}e.leftNodesMajority=u()+e.nodesToReplaceCount>e.clusterNodes.length},e.permitNodesReplace=()=>!e.leftNodesMajority&&(e.nodesToReplace.length>0||e.replacementNodes.length>0),e.addNodeToList=t=>{t.rpcAddress&&(e.replacementNodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.deleteLocation=(t,o)=>{t.preventDefault(),t.stopPropagation(),s.deleteLocation(o).then(()=>e.locations=e.locations.filter(e=>e.endpoint!==o.endpoint))},e.removeNodeFromList=(t,o)=>{e.replacementNodes.splice(t,1),e.locations.push(o)},e.ok=()=>{t.close({newNodes:e.replacementNodes,oldNodes:e.nodesToReplace})},e.cancel=()=>{t.dismiss("cancel")};const u=()=>Math.floor(e.clusterNodes.length/2)+1}angular.module("graphdb.framework.clustermanagement.controllers.replace-nodes",[]).controller("ReplaceNodesDialogCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","toastr","$translate","data","$uibModal","$rootScope","RemoteLocationsService"]},65:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",o),o.$inject=["$http"];function o(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const o=$.param({force:t});return e.delete("rest/cluster/config?"+o)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},replaceNodesInCluster:function(t){return e.patch("rest/cluster/config/node",t)},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},76:function(e,t,o){"use strict";o.r(t);o(33);function n(e,t,o,n,r){return{addLocation:function(){let e;return o.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(o=>(e=o,e.isLocal=!1,e.endpoint=e.uri,function(e){let o;return n.addLocation(e).catch(e=>{const o=getError(e.data,e.status);return t.error(o,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return o=t.find(t=>t.endpoint===e.uri),o})}(e)))},getLocationsWithRpcAddresses:s};function s(){return n.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const o=getError(e.data,e.status);t.error(o,r.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return n.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}angular.module("graphdb.framework.clustermanagement.services.remote-locations",[]).factory("RemoteLocationsService",n),n.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"]}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[96],{141:function(t,e,n){"use strict";n.r(e),n.d(e,"clusterColors",(function(){return o})),n.d(e,"createClusterSvgElement",(function(){return a})),n.d(e,"createClusterZone",(function(){return s})),n.d(e,"setCreateClusterZone",(function(){return c})),n.d(e,"updateClusterZoneLabels",(function(){return d})),n.d(e,"moveElement",(function(){return u})),n.d(e,"createNodes",(function(){return i})),n.d(e,"updateNodes",(function(){return l})),n.d(e,"createLinks",(function(){return S})),n.d(e,"updateLinks",(function(){return p})),n.d(e,"setLinkColor",(function(){return N})),n.d(e,"setLinkStyle",(function(){return h})),n.d(e,"positionNodesOnClusterZone",(function(){return y}));var r=n(110);const o={ontoOrange:"var(--primary-color)",ontoBlue:"var(--secondary-color)",ontoGreen:"var(--tertiary-color)",ontoGrey:"var(--gray-color)"};function a(t){return d3.select(t).append("svg")}function s(t){const e=t.append("g");return e.append("circle").classed("cluster-zone",!0).style("fill","transparent").style("stroke-width","2"),e}function c(t,e,n,r=!1){if(e.select(".cluster-zone").classed("no-cluster",!t).classed("has-access",r),t)e.selectAll("#no-cluster-zone").remove();else{const t=e.append("g").attr("id","no-cluster-zone");t.append("text").attr("id","no-cluster-label").text(n.no_cluster_configured).attr("y",-50).classed("h2",!0).style("text-anchor","middle"),r&&t.append("text").attr("id","create-cluster-label").classed("h3",!0).text(n.create_cluster_btn).style("text-anchor","middle"),t.append("text").attr("y",130).attr("class","icon-any repo").attr("fill",o.ontoOrange).style("text-anchor","middle").classed("settings-icon",!0).text("")}}function d(t,e,n){t||(e.select("#no-cluster-zone #no-cluster-label").text(n.no_cluster_configured),e.select("#no-cluster-zone #create-cluster-label").text(n.create_cluster_btn))}function u(t,e,n){t.attr("transform",()=>`translate(${e}, ${n})`)}function i(t,e,n){const r=t.enter().append("g").attr("id","node-group").classed("legend",n),o=r.merge(t).attr("id","node-group").classed("legend",n);return function(t,e){const n=Math.sqrt(3)/2,r=[[e+0,0],[e/2+0,e*n+0],[-e/2+0,e*n+0],[0-e,0],[-e/2+0,-e*n+0],[e/2+0,-e*n+0],[e+0,0],[e/2+0,e*n+0]];t.selectAll("path.area").data([r]).enter().append("path").attr("class","node member").attr("d",d3.line())}(r,e),t.exit().remove(),r.append("text").attr("class","icon-any node-icon"),function(t,e,n){const r=t.append("g");n?r.append("foreignObject").attr("y",e).attr("x",-e).attr("width",2*e).attr("height",10).attr("class","label-wrapper").append("xhtml:div").attr("class","id id-host"):(r.append("rect").attr("class","id-host-background").attr("rx",6),r.append("text").attr("y",e+15).attr("class","id id-host"),r.append("rect").attr("class","node-info-background").attr("rx",6),r.append("text").attr("y",e+45).attr("class","node-info-text"))}(r,e,n),o}function l(t){!function(t){t.select(".node-icon").classed("icon-any",(function(t){return!f(t)})).classed("fa-d3",f).text((function(t){return f(t)?function(t){if(_.isEmpty(t.recoveryStatus))return"";switch(t.recoveryStatus.state){case r.RecoveryState.SEARCHING_FOR_NODE:return"";case r.RecoveryState.WAITING_FOR_SNAPSHOT:return"";case r.RecoveryState.RECEIVING_SNAPSHOT:return"";case r.RecoveryState.APPLYING_SNAPSHOT:return"";case r.RecoveryState.BUILDING_SNAPSHOT:return"";case r.RecoveryState.SENDING_SNAPSHOT:return"";default:return""}}(t):function(t){if(t.nodeState===r.NodeState.LEADER)return"";if(t.nodeState===r.NodeState.FOLLOWER)return"";if(t.nodeState===r.NodeState.CANDIDATE)return"";if(t.nodeState===r.NodeState.NO_CONNECTION)return"";if(t.nodeState===r.NodeState.OUT_OF_SYNC)return"";if(t.nodeState===r.NodeState.READ_ONLY)return"";if(t.nodeState===r.NodeState.RESTRICTED)return"";return""}(t)}))}(t),function(t){t.select(".node.member").classed("leader",t=>t.nodeState===r.NodeState.LEADER).classed("follower",t=>t.nodeState===r.NodeState.FOLLOWER).classed("candidate",t=>t.nodeState===r.NodeState.CANDIDATE).classed("other",t=>t.nodeState!==r.NodeState.LEADER&&t.nodeState!==r.NodeState.FOLLOWER&&t.nodeState!==r.NodeState.CANDIDATE)}(t),function(t){t.select(".id.id-host").each((function(t){t.labelNode=this})).text((function(t){return t.hostname})),t.select(".id-host-background").attr("width",(function(t){return d3.select(t.labelNode).node().getBBox().width+10})).attr("height",(function(t){return d3.select(t.labelNode).node().getBBox().height+10})).attr("x",(function(t){return d3.select(t.labelNode).node().getBBox().x-5})).attr("y",(function(t){return d3.select(t.labelNode).node().getBBox().y-5}))}(t),function(t){t.select(".node-info-text").each((function(t){t.infoNode=this})).text((function(t){return t.recoveryStatus&&t.recoveryStatus.message})),t.select(".node-info-background").attr("width",(function(t){return d3.select(t.infoNode).node().getBBox().width+10})).attr("height",(function(t){return d3.select(t.infoNode).node().getBBox().height+10})).attr("x",(function(t){return d3.select(t.infoNode).node().getBBox().x-5})).attr("y",(function(t){return d3.select(t.infoNode).node().getBBox().y-5})).classed("hidden",(function(t){return _.isEmpty(t.recoveryStatus)}))}(t)}function f(t){return!_.isEmpty(t.recoveryStatus)}function S(t){t.enter().append("path").classed("link",!0),t.exit().remove()}function p(t,e){t.attr("stroke",N).style("stroke-dasharray",h).attr("d",t=>function(t,e){const n=e.find(e=>e.address===t.source),r=e.find(e=>e.address===t.target),o=r.x-n.x,a=r.y-n.y,s=Math.sqrt(o*o+a*a),c=o/s,d=a/s,u=n.x+55*c,i=n.y+55*d,l=r.x-55*c,f=r.y-55*d;return"M"+u+","+i+"L"+l+","+f}(t,e))}function N(t){return t.status===r.LinkState.IN_SYNC||t.status===r.LinkState.SYNCING?o.ontoGreen:t.status===r.LinkState.OUT_OF_SYNC?o.ontoGrey:"none"}function h(t){return t.status===r.LinkState.OUT_OF_SYNC||t.status===r.LinkState.SYNCING?"10 10":"none"}function y(t,e,n,r){t.attr("transform",(o,a)=>{const s=2*Math.PI*a/t.size(),c=e+Math.cos(s)*r,d=n+Math.sin(s)*r;return o.x=c,o.y=d,`translate(${c}, ${d})`})}}}]);