graphdb-workbench 2.2.3 → 2.2.4-TR2

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 (160) hide show
  1. package/dist/{102.7141102a059ef5eba1ea.bundle.js → 102.d52dc777ce7b5de1a30a.bundle.js} +2 -2
  2. package/dist/{102.7141102a059ef5eba1ea.bundle.js.map → 102.d52dc777ce7b5de1a30a.bundle.js.map} +1 -1
  3. package/dist/{104.ecd04b9cba294e159ca5.bundle.js → 104.09c8b5802e53cd9dced9.bundle.js} +2 -2
  4. package/dist/{104.ecd04b9cba294e159ca5.bundle.js.map → 104.09c8b5802e53cd9dced9.bundle.js.map} +1 -1
  5. package/dist/{107.5972b71755d2f24f6f44.bundle.js → 107.481f84627ac231f49e56.bundle.js} +2 -2
  6. package/dist/{107.5972b71755d2f24f6f44.bundle.js.map → 107.481f84627ac231f49e56.bundle.js.map} +1 -1
  7. package/dist/108.d61b0e4a54e1d0e6550d.bundle.js +2 -0
  8. package/dist/{108.162ea156d1fc4ad2525f.bundle.js.map → 108.d61b0e4a54e1d0e6550d.bundle.js.map} +1 -1
  9. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js → 11.89d3de4f2e80e373ecf2.bundle.js} +3 -3
  10. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js.map → 11.89d3de4f2e80e373ecf2.bundle.js.map} +1 -1
  11. package/dist/{115.abb22e52d5886ed645c1.bundle.js → 115.36a12f5a0804f33cb569.bundle.js} +2 -2
  12. package/dist/{115.abb22e52d5886ed645c1.bundle.js.map → 115.36a12f5a0804f33cb569.bundle.js.map} +1 -1
  13. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js → 117.9c58e6155d7467c45284.bundle.js} +2 -2
  14. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js.map → 117.9c58e6155d7467c45284.bundle.js.map} +1 -1
  15. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js → 118.7cdbf2a7be83e4cdc7e2.bundle.js} +2 -2
  16. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js.map → 118.7cdbf2a7be83e4cdc7e2.bundle.js.map} +1 -1
  17. package/dist/{119.7b75484ef37c16039937.bundle.js → 119.f7c106efa2582220baa7.bundle.js} +2 -2
  18. package/dist/{119.7b75484ef37c16039937.bundle.js.map → 119.f7c106efa2582220baa7.bundle.js.map} +1 -1
  19. package/dist/{12.eb41e4af80fee51d893c.bundle.js → 12.b4ac6d1ff3d669d3e63f.bundle.js} +2 -2
  20. package/dist/{12.eb41e4af80fee51d893c.bundle.js.map → 12.b4ac6d1ff3d669d3e63f.bundle.js.map} +1 -1
  21. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js → 120.d20d9e20e2d3c5476f8d.bundle.js} +2 -2
  22. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js.map → 120.d20d9e20e2d3c5476f8d.bundle.js.map} +1 -1
  23. package/dist/{121.f85253eb7e057efdb05d.bundle.js → 121.dc96efcaf4dc5e63f58d.bundle.js} +2 -2
  24. package/dist/{121.f85253eb7e057efdb05d.bundle.js.map → 121.dc96efcaf4dc5e63f58d.bundle.js.map} +1 -1
  25. package/dist/{126.349ebcea493c77fecf7e.bundle.js → 126.4c2fb40676d2508bbc65.bundle.js} +2 -2
  26. package/dist/{126.349ebcea493c77fecf7e.bundle.js.map → 126.4c2fb40676d2508bbc65.bundle.js.map} +1 -1
  27. package/dist/{13.bc3607638ad1e2068125.bundle.js → 13.f6b8f9a2288e2485ee20.bundle.js} +2 -2
  28. package/dist/{13.bc3607638ad1e2068125.bundle.js.map → 13.f6b8f9a2288e2485ee20.bundle.js.map} +1 -1
  29. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  30. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  31. package/dist/16.2ca98f5bec0fae221cef.bundle.js +3 -0
  32. package/dist/{16.cd06772f9e031d37db03.bundle.js.map → 16.2ca98f5bec0fae221cef.bundle.js.map} +1 -1
  33. package/dist/{17.45b5c34f6c73bde1113d.bundle.js → 17.b19a2d3870590d21e8e9.bundle.js} +2 -2
  34. package/dist/{17.45b5c34f6c73bde1113d.bundle.js.map → 17.b19a2d3870590d21e8e9.bundle.js.map} +1 -1
  35. package/dist/{19.92f27dd146df127e8d6e.bundle.js → 19.34c180252e48207f01b4.bundle.js} +3 -3
  36. package/dist/{19.92f27dd146df127e8d6e.bundle.js.map → 19.34c180252e48207f01b4.bundle.js.map} +1 -1
  37. package/dist/20.9e9e388a98851c65f8f7.bundle.js +2 -0
  38. package/dist/{20.4eb25ede434dc329ecf1.bundle.js.map → 20.9e9e388a98851c65f8f7.bundle.js.map} +1 -1
  39. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js +2 -0
  40. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js.map +1 -0
  41. package/dist/{23.16fc17b0a8983ce3d809.bundle.js → 23.22e3720d741ee87c8108.bundle.js} +2 -2
  42. package/dist/{23.16fc17b0a8983ce3d809.bundle.js.map → 23.22e3720d741ee87c8108.bundle.js.map} +1 -1
  43. package/dist/{24.04d84edbd8f93d036633.bundle.js → 24.63acd0fc451fc797ff79.bundle.js} +2 -2
  44. package/dist/{24.04d84edbd8f93d036633.bundle.js.map → 24.63acd0fc451fc797ff79.bundle.js.map} +1 -1
  45. package/dist/{26.3a642e64c7803f3b32f1.bundle.js → 26.194b2d09daa679b7e09c.bundle.js} +2 -2
  46. package/dist/{26.3a642e64c7803f3b32f1.bundle.js.map → 26.194b2d09daa679b7e09c.bundle.js.map} +1 -1
  47. package/dist/27.35fe33bb9622c2e29c43.bundle.js +2 -0
  48. package/dist/{27.fef157d9275358c9f1a0.bundle.js.map → 27.35fe33bb9622c2e29c43.bundle.js.map} +1 -1
  49. package/dist/{29.a1b30610d7960a86b1cb.bundle.js → 29.e4eadb676659c5d6e44b.bundle.js} +3 -3
  50. package/dist/{29.a1b30610d7960a86b1cb.bundle.js.map → 29.e4eadb676659c5d6e44b.bundle.js.map} +1 -1
  51. package/dist/{30.3a05504ff287ca6df711.bundle.js → 30.0fb90b3cdf78fcde6251.bundle.js} +2 -2
  52. package/dist/{30.3a05504ff287ca6df711.bundle.js.map → 30.0fb90b3cdf78fcde6251.bundle.js.map} +1 -1
  53. package/dist/{31.13d5a8e9834cd5db589c.bundle.js → 31.8dd9fe71d36bd04a0433.bundle.js} +2 -2
  54. package/dist/{31.13d5a8e9834cd5db589c.bundle.js.map → 31.8dd9fe71d36bd04a0433.bundle.js.map} +1 -1
  55. package/dist/{32.59a7369287d15e8b9ab6.bundle.js → 32.8e1c25a47debdf5145d8.bundle.js} +2 -2
  56. package/dist/{32.59a7369287d15e8b9ab6.bundle.js.map → 32.8e1c25a47debdf5145d8.bundle.js.map} +1 -1
  57. package/dist/33.89b51420b48880728b96.bundle.js +2 -0
  58. package/dist/33.89b51420b48880728b96.bundle.js.map +1 -0
  59. package/dist/{35.fe688fc32270724c391d.bundle.js → 35.a9846fba95e98a294957.bundle.js} +2 -2
  60. package/dist/{35.fe688fc32270724c391d.bundle.js.map → 35.a9846fba95e98a294957.bundle.js.map} +1 -1
  61. package/dist/{36.7da22f08c8e850885cc5.bundle.js → 36.4dbd0f9007404b0adbe2.bundle.js} +2 -2
  62. package/dist/{36.7da22f08c8e850885cc5.bundle.js.map → 36.4dbd0f9007404b0adbe2.bundle.js.map} +1 -1
  63. package/dist/37.ac99eb00fe71266c5bff.bundle.js +2 -0
  64. package/dist/{37.8a9855206d5ae5eba9be.bundle.js.map → 37.ac99eb00fe71266c5bff.bundle.js.map} +1 -1
  65. package/dist/{39.0eebc4b972cff879c1c9.bundle.js → 39.8f8ae5c232bd2f023e7c.bundle.js} +2 -2
  66. package/dist/{39.0eebc4b972cff879c1c9.bundle.js.map → 39.8f8ae5c232bd2f023e7c.bundle.js.map} +1 -1
  67. package/dist/4.5391679fa01c55e842cc.bundle.js +2 -0
  68. package/dist/4.5391679fa01c55e842cc.bundle.js.map +1 -0
  69. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js → 40.50f010a0a0ce99da5092.bundle.js} +2 -2
  70. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js.map → 40.50f010a0a0ce99da5092.bundle.js.map} +1 -1
  71. package/dist/{41.368780c518c3f6cab4b7.bundle.js → 41.d09e0f01eac3492e3376.bundle.js} +2 -2
  72. package/dist/{41.368780c518c3f6cab4b7.bundle.js.map → 41.d09e0f01eac3492e3376.bundle.js.map} +1 -1
  73. package/dist/{42.1a48ae582180fa6374f9.bundle.js → 42.9561ff9cd77df0f86a91.bundle.js} +2 -2
  74. package/dist/{42.1a48ae582180fa6374f9.bundle.js.map → 42.9561ff9cd77df0f86a91.bundle.js.map} +1 -1
  75. package/dist/{43.64268be8880acd392fee.bundle.js → 43.0400aae23dac518b78ec.bundle.js} +2 -2
  76. package/dist/{43.64268be8880acd392fee.bundle.js.map → 43.0400aae23dac518b78ec.bundle.js.map} +1 -1
  77. package/dist/{53.58a23efc22865c67d57d.bundle.js → 53.54b20545d5504efa8958.bundle.js} +2 -2
  78. package/dist/{53.58a23efc22865c67d57d.bundle.js.map → 53.54b20545d5504efa8958.bundle.js.map} +1 -1
  79. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js → 54.81f97307e31f5eabb5f0.bundle.js} +2 -2
  80. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js.map → 54.81f97307e31f5eabb5f0.bundle.js.map} +1 -1
  81. package/dist/{55.693c1a0dd775181e1e29.bundle.js → 55.e8df33b84ca578a9a633.bundle.js} +2 -2
  82. package/dist/{55.693c1a0dd775181e1e29.bundle.js.map → 55.e8df33b84ca578a9a633.bundle.js.map} +1 -1
  83. package/dist/{56.62459de7af529d956b75.bundle.js → 56.d765faad673f618d41b0.bundle.js} +2 -2
  84. package/dist/{56.62459de7af529d956b75.bundle.js.map → 56.d765faad673f618d41b0.bundle.js.map} +1 -1
  85. package/dist/{60.2cb24e628b92cb3e0210.bundle.js → 60.f13766507ec5f29fde78.bundle.js} +2 -2
  86. package/dist/{60.2cb24e628b92cb3e0210.bundle.js.map → 60.f13766507ec5f29fde78.bundle.js.map} +1 -1
  87. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js → 65.aa9736b7aad2582ca7ea.bundle.js} +2 -2
  88. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js.map → 65.aa9736b7aad2582ca7ea.bundle.js.map} +1 -1
  89. package/dist/{67.5ae0610f77a1455ce92b.bundle.js → 67.e7bd652fadf93be1fbae.bundle.js} +2 -2
  90. package/dist/{67.5ae0610f77a1455ce92b.bundle.js.map → 67.e7bd652fadf93be1fbae.bundle.js.map} +1 -1
  91. package/dist/{69.90776e70cb361d1ac6d5.bundle.js → 69.6b915e6a7a9c36a78e2b.bundle.js} +2 -2
  92. package/dist/{69.90776e70cb361d1ac6d5.bundle.js.map → 69.6b915e6a7a9c36a78e2b.bundle.js.map} +1 -1
  93. package/dist/{71.3e927496e6e4175a3127.bundle.js → 71.624ca936339bf337e46a.bundle.js} +2 -2
  94. package/dist/{71.3e927496e6e4175a3127.bundle.js.map → 71.624ca936339bf337e46a.bundle.js.map} +1 -1
  95. package/dist/{72.bc99fbec188b4e49aa53.bundle.js → 72.3a5620a182219e9ea05d.bundle.js} +2 -2
  96. package/dist/{72.bc99fbec188b4e49aa53.bundle.js.map → 72.3a5620a182219e9ea05d.bundle.js.map} +1 -1
  97. package/dist/{73.40b5cbae08c7f3a58438.bundle.js → 73.f162e544378754078826.bundle.js} +2 -2
  98. package/dist/{73.40b5cbae08c7f3a58438.bundle.js.map → 73.f162e544378754078826.bundle.js.map} +1 -1
  99. package/dist/{74.cc42a1dcef7e9b830354.bundle.js → 74.7595755907badb1a99b8.bundle.js} +2 -2
  100. package/dist/{74.cc42a1dcef7e9b830354.bundle.js.map → 74.7595755907badb1a99b8.bundle.js.map} +1 -1
  101. package/dist/{75.31d1a4766c80c90b2afc.bundle.js → 75.4cc7ff534d56a05c578a.bundle.js} +2 -2
  102. package/dist/{75.31d1a4766c80c90b2afc.bundle.js.map → 75.4cc7ff534d56a05c578a.bundle.js.map} +1 -1
  103. package/dist/{76.89d209ce08efa7429e87.bundle.js → 76.cd0cfea4c96e88230dbe.bundle.js} +2 -2
  104. package/dist/{76.89d209ce08efa7429e87.bundle.js.map → 76.cd0cfea4c96e88230dbe.bundle.js.map} +1 -1
  105. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js → 77.df7767b1a0a3a0efa202.bundle.js} +2 -2
  106. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js.map → 77.df7767b1a0a3a0efa202.bundle.js.map} +1 -1
  107. package/dist/{79.0fbaedffc1f583a6064f.bundle.js → 79.4d64b377b0308809136f.bundle.js} +2 -2
  108. package/dist/{79.0fbaedffc1f583a6064f.bundle.js.map → 79.4d64b377b0308809136f.bundle.js.map} +1 -1
  109. package/dist/{80.6d489af9482e358c8dd8.bundle.js → 80.36e424031127d1743f20.bundle.js} +2 -2
  110. package/dist/{80.6d489af9482e358c8dd8.bundle.js.map → 80.36e424031127d1743f20.bundle.js.map} +1 -1
  111. package/dist/{94.94158487a9024ff3a623.bundle.js → 94.b1ccdd207229ae57569f.bundle.js} +2 -2
  112. package/dist/{94.94158487a9024ff3a623.bundle.js.map → 94.b1ccdd207229ae57569f.bundle.js.map} +1 -1
  113. package/dist/{97.48e14b67906b4d61a1b1.bundle.js → 97.951e03ffd2d5a10f868d.bundle.js} +2 -2
  114. package/dist/{97.48e14b67906b4d61a1b1.bundle.js.map → 97.951e03ffd2d5a10f868d.bundle.js.map} +1 -1
  115. package/dist/{98.cc7086155b76601af017.bundle.js → 98.745b4c457214d4189d7a.bundle.js} +2 -2
  116. package/dist/{98.cc7086155b76601af017.bundle.js.map → 98.745b4c457214d4189d7a.bundle.js.map} +1 -1
  117. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js → bundle.651116fe2383a66f32c9.bundle.js} +21 -21
  118. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js.map → bundle.651116fe2383a66f32c9.bundle.js.map} +1 -1
  119. package/dist/index.html +3 -3
  120. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  121. package/dist/pages/autocomplete.html +1 -1
  122. package/dist/pages/choose-repository-type.html +1 -1
  123. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  124. package/dist/pages/create-index.html +4 -4
  125. package/dist/pages/dependencies.html +1 -1
  126. package/dist/pages/domainRangeInfo.html +2 -2
  127. package/dist/pages/edit.html +1 -1
  128. package/dist/pages/explore.html +1 -1
  129. package/dist/pages/export.html +1 -1
  130. package/dist/pages/find.html +1 -1
  131. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  132. package/dist/pages/graphs-visualizations.html +7 -7
  133. package/dist/pages/guides.html +1 -1
  134. package/dist/pages/import.html +1 -1
  135. package/dist/pages/jdbc-create.html +5 -5
  136. package/dist/pages/monitor/queries.html +1 -1
  137. package/dist/pages/monitor/resources.html +2 -2
  138. package/dist/pages/namespaces.html +2 -2
  139. package/dist/pages/plugins.html +1 -1
  140. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  141. package/dist/pages/rdfrank.html +2 -2
  142. package/dist/pages/repositories.html +2 -2
  143. package/dist/pages/repository.html +2 -2
  144. package/dist/pages/similarity-indexes.html +1 -1
  145. package/dist/pages/sparql-template-create.html +5 -5
  146. package/dist/pages/sparql.html +3 -3
  147. package/dist/pages/webapi.html +2 -2
  148. package/dist/res/swagger/index.html +27 -27
  149. package/package.json +1 -1
  150. package/dist/108.162ea156d1fc4ad2525f.bundle.js +0 -2
  151. package/dist/16.cd06772f9e031d37db03.bundle.js +0 -3
  152. package/dist/20.4eb25ede434dc329ecf1.bundle.js +0 -2
  153. package/dist/21.5586732af2e5cec0d05a.bundle.js +0 -2
  154. package/dist/21.5586732af2e5cec0d05a.bundle.js.map +0 -1
  155. package/dist/27.fef157d9275358c9f1a0.bundle.js +0 -2
  156. package/dist/33.fde8076c81c87c25c367.bundle.js +0 -2
  157. package/dist/33.fde8076c81c87c25c367.bundle.js.map +0 -1
  158. package/dist/37.8a9855206d5ae5eba9be.bundle.js +0 -2
  159. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js +0 -2
  160. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js.map +0 -1
@@ -1,2 +0,0 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[4,113],{43:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",n),n.$inject=["$http"];function n(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 n=$.param({force:t});return e.delete("rest/cluster/config?"+n)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes: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")}}}},59:function(e,t,n){"use strict";n.r(t),n.d(t,"NodeState",(function(){return o})),n.d(t,"LinkState",(function(){return r}));n(4),n(43);angular.module("graphdb.framework.clustermanagement.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",s).controller("CreateClusterCtrl",l).controller("DeleteClusterCtrl",c).controller("EditClusterCtrl",d).controller("AddLocationFromClusterCtrl",u).controller("AddNodesDialogCtrl",f).controller("RemoveNodesDialogCtrl",m).factory("RemoteLocationsService",i);const o={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"},r={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION"};function s(e,t,n,s,a,l,c,i,u,d,g,f,m,p,C,h){e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=o,e.leaderChanged=!1,e.currentLeader=null,e.childContext={},e.shouldShowClusterSettingsPanel=!1;let _;function N(t){_||(_=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{_=null,e.childContext.redraw()}))}function L(){return C.getLocationsWithRpcAddresses().then(t=>{const n=t.find(e=>e.isLocal);n&&(n.endpoint=e.currentNode.endpoint,n.rpcAddress=e.currentNode.address),e.clusterModel.locations=t})}function $(t){s.success(t),e.getClusterConfiguration()}function v(e,t,n){let o=e.message||e;400===t&&Array.isArray(e)?o=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412===t&&(o=Object.keys(e).reduce((t,n)=>t+`<div>${n} - ${e[n]}</div>`,"")),s.error(o,n,{allowHtml:!0})}e.onopen=e.onclose=()=>angular.noop(),e.toggleSidePanel=()=>{e.shouldShowClusterSettingsPanel=!e.shouldShowClusterSettingsPanel},e.toggleLegend=()=>{e.childContext.toggleLegend&&e.childContext.toggleLegend()},e.setLoader=function(t,n){g.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=g((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||p.instant("common.loading")},e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=function(){return f.getClusterStatus().then((function(t){const n=t.data.slice(),s=n.find(e=>e.nodeState===o.LEADER);var a,l;a=e.currentLeader,(l=s)&&a&&a.address===l.address||(e.currentLeader=s,e.leaderChanged=!0),e.currentNode=n.find(t=>t.address===e.currentNode.address);const c=[];s&&Object.keys(s.syncStatus).forEach(e=>{const t=s.syncStatus[e];t!==r.NO_CONNECTION&&c.push({id:`${s.address}-${e}`,source:s.address,target:e,status:t})}),e.clusterModel.hasCluster=!0,e.clusterModel.nodes=n,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(){l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.finally((function(){L(),N(!0)}))},e.showDeleteDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then((function(t){const n=p.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,n),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");s.success(e)}else{const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),n=Object.keys(t.data).reduce((e,n)=>e+`<div>${n} - ${t.data[n]}</div>`,"");s.warning(n,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=p.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete"),n=Object.keys(e.data).reduce((t,n)=>t+`<div>${n} - ${e.data[n]}</div>`,"");s.error(n,t,{allowHtml:!0})}).finally(()=>{e.setLoader(!1),N(!0),h.$broadcast("reloadLocations")})}))},e.showEditConfigurationDialog=()=>{l.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(){N(!0)}))},e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>L()),e.showAddNodeToClusterDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then((function(t){const n=p.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.rpcAddress);f.addNodesToCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.add_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.add_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),N(!0)})})).finally(()=>L())},e.showRemoveNodesFromClusterDialog=()=>{l.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 n=p.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.address);f.removeNodesFromCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.remove_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),N(!0)})}))},(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=u((function(){N()}),1e3);e.$on("$destroy",(function(){u.cancel(t)}))});const S=angular.element(i),w=function(){e.childContext.resize()};S.bind("resize",w);const T=function(t){const n=t.target,o=document.getElementById("nodeTooltip");e.selectedNode&&o!==n&&!o.contains(n)&&e.childContext.selectNode(null)};S.bind("mousedown",T),e.$on("$destroy",(function(){S.unbind("resize",w),S.unbind("mousedown",T)}))}s.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope"];const a=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 l(e,t,n,o,r,s,l,c,i,u){e.pageTitle=s.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,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.getAdvancedOptionsClass=a,e.createCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),o.createCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.create_failed")),e.errors.splice(0),412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n?e.errors.push(...t):409===n&&e.errors.push(t)}(t.data,t.status)})).finally(()=>{e.setLoader(!1),u.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,n=e.selectedLocations&&e.selectedLocations.length>=2;return t&&n},e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),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,n){n.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(n))},e.addLocation=function(){i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){e.isClusterConfigurationValid()?e.createCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}function c(e,t){e.forceDelete=!1,e.ok=function(){t.close(e.forceDelete)},e.cancel=function(){t.dismiss("cancel")}}function i(e,t,n,o,r){return{addLocation:function(){let e;return n.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(n=>(e=n,e.isLocal=!1,e.endpoint=e.uri,function(e){let n;return o.addLocation(e).catch(e=>{const n=getError(e.data,e.status);return t.error(n,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return n=t.find(t=>t.endpoint===e.uri),n})}(e)))},getLocationsWithRpcAddresses:s};function s(){return o.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 n=getError(e.data,e.status);t.error(n,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 o.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)})}}function u(e,t,n,o,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=g(o),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):n.error(r.instant("location.cannot.be.empty.error"))},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,n,o,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=angular.copy(a.clusterConfiguration),e.loader=!1,e.updateCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),o.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===n||"string"==typeof t?e.errors.push(t):412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n&&e.errors.push(...t)}(t.data,t.status)})).finally(()=>e.setLoader(!1))},e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),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")}}l.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"],c.$inject=["$scope","$uibModalInstance"],i.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"],u.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"],d.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"];const g=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion};function f(e,t,n,o,r){const s=angular.copy(n.clusterConfiguration),a=angular.copy(n.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.addNodeToList=function(t){t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,n){e.nodes.splice(t,1),e.locations.push(n)},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")}}function m(e,t,n){const o=angular.copy(n.clusterModel);e.clusterNodes=o.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=function(t,n){n.shouldRemove=!n.shouldRemove,n.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=function(){const n=e.clusterNodes.filter(e=>e.shouldRemove);t.close(n)},e.cancel=function(){t.dismiss("cancel")}}f.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"],m.$inject=["$scope","$uibModalInstance","data"]}}]);
2
- //# sourceMappingURL=4.ca3eb6b5da0890c0abe0.bundle.js.map
@@ -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,QACKC,OAAO,yCAA0C,IACjDC,QAAQ,qBAAsBC,GAEnCA,EAAmBC,QAAU,CAAC,SAI9B,SAASD,EAAmBE,GACxB,MAAO,CACHC,iBAUJ,WACI,OAAOD,EAAME,IAAI,wBAVjBC,cAaJ,SAAuBC,GACnB,OAAOJ,EAAMK,KAAK,sBAAoCD,IAbtDE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AAkB4B,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":""}