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 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[23,30,58],{113:function(t,e,n){"use strict";n.r(e);n(4),n(11),n(59),n(68),n(10),n(258),n(259),n(269);angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers","graphdb.framework.clustermanagement.directives"])},255:function(t,e,n){var o,r,a;r=[],void 0===(a="function"==typeof(o=function(){return function(){var t=function(){return"n"},e=function(){return[0,0]},n=function(){return" "},o=u(),r=null,a=null,s=null,l=null;function c(t){var e;r="svg"===(e=(e=t).node()).tagName.toLowerCase()?e:e.ownerSVGElement,a=r.createSVGPoint(),document.body.appendChild(o)}c.show=function(){var o=Array.prototype.slice.call(arguments);o[o.length-1]instanceof SVGElement&&(s=o.pop());var r,a=n.apply(this,o),u=e.apply(this,o),p=t.apply(this,o),h=f(),g=i.length,y=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft,_=l.apply(this,o);for(h.html(a).style({opacity:1,"pointer-events":"all"});g--;)h.classed(i[g],!1);return r=d.get(p).apply(this),_?h.style(_):h.classed(p,!0).style({top:r.top+u[0]+y+"px",left:r.left+u[1]+m+"px"}),c},c.hide=function(){return f().style({opacity:0,"pointer-events":"none"}),c},c.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().attr(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(f(),n),c},c.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().style(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(f(),n),c},c.direction=function(e){return arguments.length?(t=null==e?e:d3.functor(e),c):t},c.offset=function(t){return arguments.length?(e=null==t?t:d3.functor(t),c):e},c.html=function(t){return arguments.length?(n=null==t?t:d3.functor(t),c):n},c.customPosition=function(t){return arguments.length?(l=null==t?t:d3.functor(t),c):l},c.destroy=function(){return o&&(f().remove(),o=null),c};var d=d3.map({n:function(){var t=p();return{top:t.n.y-o.offsetHeight,left:t.n.x-o.offsetWidth/2}},s:function(){var t=p();return{top:t.s.y,left:t.s.x-o.offsetWidth/2}},e:function(){var t=p();return{top:t.e.y-o.offsetHeight/2,left:t.e.x}},w:function(){var t=p();return{top:t.w.y-o.offsetHeight/2,left:t.w.x-o.offsetWidth}},nw:function(){var t=p();return{top:t.nw.y-o.offsetHeight,left:t.nw.x-o.offsetWidth}},ne:function(){var t=p();return{top:t.ne.y-o.offsetHeight,left:t.ne.x}},sw:function(){var t=p();return{top:t.sw.y,left:t.sw.x-o.offsetWidth}},se:function(){var t=p();return{top:t.se.y,left:t.e.x}}}),i=d.keys();function u(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),t.node()}function f(){return null===o&&(o=u(),document.body.appendChild(o)),d3.select(o)}function p(){for(var t=s||d3.event.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var e={},n=t.getScreenCTM(),o=t.getBBox(),r=o.width,l=o.height,c=o.x,d=o.y;return a.x=c,a.y=d,e.nw=a.matrixTransform(n),a.x+=r,e.ne=a.matrixTransform(n),a.y+=l,e.se=a.matrixTransform(n),a.x-=r,e.sw=a.matrixTransform(n),a.y-=l/2,e.w=a.matrixTransform(n),a.x+=r,e.e=a.matrixTransform(n),a.x-=r/2,a.y-=l/2,e.n=a.matrixTransform(n),a.y+=l,e.s=a.matrixTransform(n),e}return c}})?o.apply(e,r):o)||(t.exports=a)},64:function(t,e,n){"use strict";n.r(e),n.d(e,"clusterColors",(function(){return r})),n.d(e,"createClusterSvgElement",(function(){return a})),n.d(e,"createClusterZone",(function(){return s})),n.d(e,"setCreateClusterZone",(function(){return l})),n.d(e,"updateClusterZoneLabels",(function(){return c})),n.d(e,"moveElement",(function(){return d})),n.d(e,"createNodes",(function(){return i})),n.d(e,"updateNodes",(function(){return u})),n.d(e,"createLinks",(function(){return p})),n.d(e,"updateLinks",(function(){return h})),n.d(e,"setLinkColor",(function(){return g})),n.d(e,"setLinkStyle",(function(){return y})),n.d(e,"positionNodesOnClusterZone",(function(){return m}));var o=n(59);const r={ontoOrange:"var(--onto-orange)",ontoBlue:"var(--onto-blue)",ontoGreen:"var(--onto-green)",ontoGrey:"var(--onto-grey)"};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 l(t,e,n){if(e.select(".cluster-zone").classed("no-cluster",!t),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||"No cluster group configured").attr("y",-50).classed("h2",!0).style("text-anchor","middle"),t.append("text").attr("id","create-cluster-label").classed("h3",!0).text(n.create_cluster_btn||"Click here to create a cluster").style("text-anchor","middle"),t.append("text").attr("y",130).attr("class","icon-any repo").attr("fill",r.ontoOrange).style("text-anchor","middle").classed("settings-icon",!0).text("")}}function c(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 d(t,e,n){t.attr("transform",()=>`translate(${e}, ${n})`)}function i(t,e,n){const o=t.enter().append("g").attr("id","node-group").classed("legend",n);!function(t,e){const n=Math.sqrt(3)/2,o=[[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([o]).enter().append("path").attr("class","node member").attr("d",d3.svg.line())}(o,e),t.exit().remove(),o.append("text").attr("class","icon-any node-icon"),function(t,e,n){const o=t.append("g");n?o.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"):(o.append("rect").attr("class","id-host-background").attr("rx",6),o.append("text").attr("y",e+10).attr("class","id id-host").style("text-anchor","middle"))}(o,e,n)}function u(t){!function(t){t.select(".icon-any.node-icon").text(f)}(t),function(t){t.select(".node.member").classed("leader",t=>t.nodeState===o.NodeState.LEADER).classed("follower",t=>t.nodeState===o.NodeState.FOLLOWER).classed("candidate",t=>t.nodeState===o.NodeState.CANDIDATE).classed("other",t=>t.nodeState!==o.NodeState.LEADER&&t.nodeState!==o.NodeState.FOLLOWER&&t.nodeState!==o.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+2})).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-1})).attr("fill","#EEEEEE")}(t)}function f(t){return t.nodeState===o.NodeState.LEADER?"":t.nodeState===o.NodeState.FOLLOWER?"":t.nodeState===o.NodeState.CANDIDATE?"":t.nodeState===o.NodeState.NO_CONNECTION?"":t.nodeState===o.NodeState.OUT_OF_SYNC?"":t.nodeState===o.NodeState.READ_ONLY?"":t.nodeState===o.NodeState.RESTRICTED?"":""}function p(t){t.enter().append("path").classed("link",!0),t.exit().remove()}function h(t,e){t.attr("stroke",g).style("stroke-dasharray",y).attr("d",t=>function(t,e){const n=e.find(e=>e.address===t.source),o=e.find(e=>e.address===t.target),r=o.x-n.x,a=o.y-n.y,s=Math.sqrt(r*r+a*a),l=r/s,c=a/s,d=n.x+55*l,i=n.y+55*c,u=o.x-55*l,f=o.y-55*c;return"M"+d+","+i+"L"+u+","+f}(t,e))}function g(t){return t.status===o.LinkState.IN_SYNC||t.status===o.LinkState.SYNCING?r.ontoGreen:t.status===o.LinkState.OUT_OF_SYNC?r.ontoGrey:"none"}function y(t){return t.status===o.LinkState.OUT_OF_SYNC||t.status===o.LinkState.SYNCING?"10 10":"none"}function m(t,e,n,o){t.attr("transform",(r,a)=>{const s=2*Math.PI*a/t[0].length;var l=e+Math.cos(s)*o,c=n+Math.sin(s)*o;return r.x=l,r.y=c,`translate(${l}, ${c})`})}},68:function(t,e,n){"use strict";n.r(e);n(5);var o=n(64),r=n(59),a=n(255),s=n.n(a);let l=240;const c=angular.module("graphdb.framework.clustermanagement.directives",["graphdb.framework.utils.localstorageadapter"]),d={no_cluster_configured:"",create_cluster_btn:"",legend_node_state:"",legend_link_state:"",node_state_leader:"Leader",node_state_follower:"Follower",node_state_candidate:"Candidate",node_state_no_cluster:"No cluster",node_state_out_of_sync:"Out of sync",node_state_no_connection:"No connection",node_state_read_only:"Read only",node_state_restricted:"Restricted",link_state_in_sync:"In sync",link_state_syncing:"Syncing",link_state_out_of_sync:"Out of sync"},i={node_state:"legend_node_state",link_state:"legend_link_state"};c.directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope",function(t,e,n,r,a,c){return{restrict:"A",link:function(p,h){function g(){Object.keys(d).forEach(t=>{d[t]=a.instant("cluster_management.cluster_graphical_view."+t)})}function y(){const o="collapsedMenu"===e.get(n.MENU_STATE);return l=o?70:240,Math.max(Math.floor(.95*(t.innerWidth-l)),600)}function m(){return Math.max(.95*(t.innerHeight-250),600)}let x,S,N;p.showLegend=!1,c.$on("$translateChangeSuccess",(function(){g(),function(){o.updateClusterZoneLabels(k,w,d),Object.keys(i).forEach(t=>{d3.select("#"+t).text(D(t))}),x&&x.remove();B(),G()}()})),p.$on("$destroy",(function(){R.destroy()}));let k,v,w,E,C,T,L=y(),b=m(),O=Math.min(L,b)/2-100,A=L/2,M=b/2;function D(t){return d[i[t]]}function B(){x=v.append("g").attr("id","legend-group").classed("hidden",!p.showLegend).classed("legend-group",!0)}p.width=function(){return L},p.height=function(){return b};const R=s()().attr("class","d3-tip").customPosition((function(){const t=T.getBoundingClientRect(),e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollLeft||document.body.scrollLeft;return{left:t.left+n+"px",top:t.top-30+e+"px"}})).html((function(t){return t.toolTip})),I=function(t,e){T=e,R.show(t,T)},Y=function(){T=null,R.hide()};function G(){const t=u(),e=f();!function(t,e){t.forEach(t=>{t.toolTip=t.hostname=d[t.customText]}),e.forEach(t=>{t.toolTip=t.linkTypeText=d[t.linkTypeKey]})}(t,e),x.append("rect").attr("id","legend-background").attr("class","legend-background").attr("fill","#EEEEEE");const n=x.append("text").attr("id","node_state").attr("class","id id-host").attr("x",200).attr("y",24).text(D("node_state")),r=x.append("text").attr("id","link_state").attr("class","id id-host").attr("x",200).attr("y",179).text(D("link_state")),a=x.selectAll("#node-group").data(t);o.createNodes(a,25,!0),o.updateNodes(a),a.select(".node.member").on("mouseover",(function(t){d3.event.stopPropagation(),I(t,this)})).on("mouseout",Y),a.attr("transform",(function(t){const e=Math.floor(t.id/4);return`translate(${35+65*(t.id%4)}, ${59+65*e})`})),x.call((function(){S=this.node().getBBox().width})),n.attr("x",10+S/2),r.attr("x",10+S/2);const s=S/3,l=x.append("g").attr("id","links-group");l.attr("transform","translate(10, 189)"),e.forEach((t,e)=>{const n=s-5,r=l.append("g").classed("link",!0).classed("legend",!0).attr("transform",()=>`translate(${e*s}, 0)`);r.append("path").classed("link",!0).attr("stroke-dasharray",()=>o.setLinkStyle(t)).attr("stroke",()=>o.setLinkColor(t)).attr("d",()=>`M5,0,${n},0`),r.append("foreignObject").attr("y",10).attr("x",5).attr("width",s-10).attr("height",10).attr("class","label-wrapper").append("xhtml:div").attr("class","id id-host").style("font-size","9px").html(t.linkTypeText),r.on("mouseover",(function(){d3.event.stopPropagation(),I(t,this)})).on("mouseout",Y)}),x.call((function(t){N=this.node().getBBox().height,S=this.node().getBBox().width})),x.select(".legend-background").attr("height",N+40).attr("width",S+20).attr("rx","6"),z()}function z(){const t=b-(N+30+50);o.moveElement(x,0,t)}function F(){O=Math.min(L,b)/2-100,A=L/2,M=b/2,o.moveElement(w,A,M),w.select(".cluster-zone").attr("r",O)}function W(){F(),k!==p.clusterModel.hasCluster&&(k=!!p.clusterModel.hasCluster,function(t){let e;o.setCreateClusterZone(t,w,d),t||(e=()=>{p.$apply((function(){p.showCreateClusterDialog()}))}),w.on("mouseup",e)}(k));const t=_.cloneDeep(p.clusterModel.nodes)||[],e=_.cloneDeep(p.clusterModel.links)||[];!function(t){t.forEach(t=>t.hostname=r.shortenIri(t.endpoint));const e=E.selectAll("#node-group").data(t,t=>t.address);e.on("click",t=>{p.childContext.selectNode(t);const e=d3.select(".nodetooltip"),n=$(window).width();d3.event.pageX<n/2?(e.style("left",d3.event.pageX+"px"),e.style("right","")):(e.style("left",""),e.style("right",n-d3.event.pageX+"px")),e.style("top",d3.event.pageY-28+"px")}),o.createNodes(e,50),o.updateNodes(e),o.positionNodesOnClusterZone(e,A,M,O)}(t),function(t,e){const n=C.selectAll(".link").data(t,t=>t.id);o.createLinks(n),o.updateLinks(n,e)}(e,t)}p.childContext.redraw=W,p.childContext.resize=function(){L=y(),b=m(),v.attr("width",L),v.attr("height",b),W(),z()},p.childContext.toggleLegend=()=>{p.showLegend=!p.showLegend,x.classed("hidden",!p.showLegend)},g(),function(t){v=o.createClusterSvgElement(h[0]).attr("width",L).attr("height",b),v.call(R),w=o.createClusterZone(v,t),C=v.append("g").attr("id","links-group"),E=v.append("g").attr("id","nodes-group"),B()}(!(!p.clusterModel.nodes||!p.clusterModel.nodes.length)),G(),W()}}}]);const u=function(){const t=[];return t.push({nodeState:r.NodeState.LEADER,customText:"node_state_leader"}),t.push({nodeState:r.NodeState.FOLLOWER,customText:"node_state_follower"}),t.push({nodeState:r.NodeState.CANDIDATE,customText:"node_state_candidate"}),t.push({nodeState:r.NodeState.NO_CLUSTER,customText:"node_state_no_cluster"}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"node_state_out_of_sync"}),t.push({nodeState:r.NodeState.NO_CONNECTION,customText:"node_state_no_connection"}),t.push({nodeState:r.NodeState.READ_ONLY,customText:"node_state_read_only"}),t.push({nodeState:r.NodeState.RESTRICTED,customText:"node_state_restricted"}),t.forEach((t,e)=>t.id=e),t},f=function(){const t=[];return t.push({status:r.LinkState.IN_SYNC,linkTypeKey:"link_state_in_sync"}),t.push({status:r.LinkState.SYNCING,linkTypeKey:"link_state_syncing"}),t.push({status:r.LinkState.OUT_OF_SYNC,linkTypeKey:"link_state_out_of_sync"}),t.forEach((t,e)=>t.id=e),t}}}]);
2
- //# sourceMappingURL=23.16fc17b0a8983ce3d809.bundle.js.map
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[23,30,58],{113:function(t,e,n){"use strict";n.r(e);n(4),n(11),n(59),n(69),n(10),n(258),n(259),n(269);angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers","graphdb.framework.clustermanagement.directives"])},255:function(t,e,n){var o,r,a;r=[],void 0===(a="function"==typeof(o=function(){return function(){var t=function(){return"n"},e=function(){return[0,0]},n=function(){return" "},o=u(),r=null,a=null,s=null,l=null;function c(t){var e;r="svg"===(e=(e=t).node()).tagName.toLowerCase()?e:e.ownerSVGElement,a=r.createSVGPoint(),document.body.appendChild(o)}c.show=function(){var o=Array.prototype.slice.call(arguments);o[o.length-1]instanceof SVGElement&&(s=o.pop());var r,a=n.apply(this,o),u=e.apply(this,o),p=t.apply(this,o),h=f(),g=i.length,y=document.documentElement.scrollTop||document.body.scrollTop,m=document.documentElement.scrollLeft||document.body.scrollLeft,_=l.apply(this,o);for(h.html(a).style({opacity:1,"pointer-events":"all"});g--;)h.classed(i[g],!1);return r=d.get(p).apply(this),_?h.style(_):h.classed(p,!0).style({top:r.top+u[0]+y+"px",left:r.left+u[1]+m+"px"}),c},c.hide=function(){return f().style({opacity:0,"pointer-events":"none"}),c},c.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().attr(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(f(),n),c},c.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().style(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(f(),n),c},c.direction=function(e){return arguments.length?(t=null==e?e:d3.functor(e),c):t},c.offset=function(t){return arguments.length?(e=null==t?t:d3.functor(t),c):e},c.html=function(t){return arguments.length?(n=null==t?t:d3.functor(t),c):n},c.customPosition=function(t){return arguments.length?(l=null==t?t:d3.functor(t),c):l},c.destroy=function(){return o&&(f().remove(),o=null),c};var d=d3.map({n:function(){var t=p();return{top:t.n.y-o.offsetHeight,left:t.n.x-o.offsetWidth/2}},s:function(){var t=p();return{top:t.s.y,left:t.s.x-o.offsetWidth/2}},e:function(){var t=p();return{top:t.e.y-o.offsetHeight/2,left:t.e.x}},w:function(){var t=p();return{top:t.w.y-o.offsetHeight/2,left:t.w.x-o.offsetWidth}},nw:function(){var t=p();return{top:t.nw.y-o.offsetHeight,left:t.nw.x-o.offsetWidth}},ne:function(){var t=p();return{top:t.ne.y-o.offsetHeight,left:t.ne.x}},sw:function(){var t=p();return{top:t.sw.y,left:t.sw.x-o.offsetWidth}},se:function(){var t=p();return{top:t.se.y,left:t.e.x}}}),i=d.keys();function u(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",top:0,opacity:0,"pointer-events":"none","box-sizing":"border-box"}),t.node()}function f(){return null===o&&(o=u(),document.body.appendChild(o)),d3.select(o)}function p(){for(var t=s||d3.event.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var e={},n=t.getScreenCTM(),o=t.getBBox(),r=o.width,l=o.height,c=o.x,d=o.y;return a.x=c,a.y=d,e.nw=a.matrixTransform(n),a.x+=r,e.ne=a.matrixTransform(n),a.y+=l,e.se=a.matrixTransform(n),a.x-=r,e.sw=a.matrixTransform(n),a.y-=l/2,e.w=a.matrixTransform(n),a.x+=r,e.e=a.matrixTransform(n),a.x-=r/2,a.y-=l/2,e.n=a.matrixTransform(n),a.y+=l,e.s=a.matrixTransform(n),e}return c}})?o.apply(e,r):o)||(t.exports=a)},64:function(t,e,n){"use strict";n.r(e),n.d(e,"clusterColors",(function(){return r})),n.d(e,"createClusterSvgElement",(function(){return a})),n.d(e,"createClusterZone",(function(){return s})),n.d(e,"setCreateClusterZone",(function(){return l})),n.d(e,"updateClusterZoneLabels",(function(){return c})),n.d(e,"moveElement",(function(){return d})),n.d(e,"createNodes",(function(){return i})),n.d(e,"updateNodes",(function(){return u})),n.d(e,"createLinks",(function(){return p})),n.d(e,"updateLinks",(function(){return h})),n.d(e,"setLinkColor",(function(){return g})),n.d(e,"setLinkStyle",(function(){return y})),n.d(e,"positionNodesOnClusterZone",(function(){return m}));var o=n(59);const r={ontoOrange:"var(--onto-orange)",ontoBlue:"var(--onto-blue)",ontoGreen:"var(--onto-green)",ontoGrey:"var(--onto-grey)"};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 l(t,e,n){if(e.select(".cluster-zone").classed("no-cluster",!t),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||"No cluster group configured").attr("y",-50).classed("h2",!0).style("text-anchor","middle"),t.append("text").attr("id","create-cluster-label").classed("h3",!0).text(n.create_cluster_btn||"Click here to create a cluster").style("text-anchor","middle"),t.append("text").attr("y",130).attr("class","icon-any repo").attr("fill",r.ontoOrange).style("text-anchor","middle").classed("settings-icon",!0).text("")}}function c(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 d(t,e,n){t.attr("transform",()=>`translate(${e}, ${n})`)}function i(t,e,n){const o=t.enter().append("g").attr("id","node-group").classed("legend",n);!function(t,e){const n=Math.sqrt(3)/2,o=[[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([o]).enter().append("path").attr("class","node member").attr("d",d3.svg.line())}(o,e),t.exit().remove(),o.append("text").attr("class","icon-any node-icon"),function(t,e,n){const o=t.append("g");n?o.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"):(o.append("rect").attr("class","id-host-background").attr("rx",6),o.append("text").attr("y",e+10).attr("class","id id-host").style("text-anchor","middle"))}(o,e,n)}function u(t){!function(t){t.select(".icon-any.node-icon").text(f)}(t),function(t){t.select(".node.member").classed("leader",t=>t.nodeState===o.NodeState.LEADER).classed("follower",t=>t.nodeState===o.NodeState.FOLLOWER).classed("candidate",t=>t.nodeState===o.NodeState.CANDIDATE).classed("other",t=>t.nodeState!==o.NodeState.LEADER&&t.nodeState!==o.NodeState.FOLLOWER&&t.nodeState!==o.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+2})).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-1})).attr("fill","#EEEEEE")}(t)}function f(t){return t.nodeState===o.NodeState.LEADER?"":t.nodeState===o.NodeState.FOLLOWER?"":t.nodeState===o.NodeState.CANDIDATE?"":t.nodeState===o.NodeState.NO_CONNECTION?"":t.nodeState===o.NodeState.OUT_OF_SYNC?"":t.nodeState===o.NodeState.READ_ONLY?"":t.nodeState===o.NodeState.RESTRICTED?"":""}function p(t){t.enter().append("path").classed("link",!0),t.exit().remove()}function h(t,e){t.attr("stroke",g).style("stroke-dasharray",y).attr("d",t=>function(t,e){const n=e.find(e=>e.address===t.source),o=e.find(e=>e.address===t.target),r=o.x-n.x,a=o.y-n.y,s=Math.sqrt(r*r+a*a),l=r/s,c=a/s,d=n.x+55*l,i=n.y+55*c,u=o.x-55*l,f=o.y-55*c;return"M"+d+","+i+"L"+u+","+f}(t,e))}function g(t){return t.status===o.LinkState.IN_SYNC||t.status===o.LinkState.SYNCING?r.ontoGreen:t.status===o.LinkState.OUT_OF_SYNC?r.ontoGrey:"none"}function y(t){return t.status===o.LinkState.OUT_OF_SYNC||t.status===o.LinkState.SYNCING?"10 10":"none"}function m(t,e,n,o){t.attr("transform",(r,a)=>{const s=2*Math.PI*a/t[0].length;var l=e+Math.cos(s)*o,c=n+Math.sin(s)*o;return r.x=l,r.y=c,`translate(${l}, ${c})`})}},69:function(t,e,n){"use strict";n.r(e);n(5);var o=n(64),r=n(59),a=n(255),s=n.n(a);let l=240;const c=angular.module("graphdb.framework.clustermanagement.directives",["graphdb.framework.utils.localstorageadapter"]),d={no_cluster_configured:"",create_cluster_btn:"",legend_node_state:"",legend_link_state:"",node_state_leader:"Leader",node_state_follower:"Follower",node_state_candidate:"Candidate",node_state_no_cluster:"No cluster",node_state_out_of_sync:"Out of sync",node_state_no_connection:"No connection",node_state_read_only:"Read only",node_state_restricted:"Restricted",link_state_in_sync:"In sync",link_state_syncing:"Syncing",link_state_out_of_sync:"Out of sync"},i={node_state:"legend_node_state",link_state:"legend_link_state"};c.directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope",function(t,e,n,r,a,c){return{restrict:"A",link:function(p,h){function g(){Object.keys(d).forEach(t=>{d[t]=a.instant("cluster_management.cluster_graphical_view."+t)})}function y(){const o="collapsedMenu"===e.get(n.MENU_STATE);return l=o?70:240,Math.max(Math.floor(.95*(t.innerWidth-l)),600)}function m(){return Math.max(.95*(t.innerHeight-250),600)}let x,S,N;p.showLegend=!1,c.$on("$translateChangeSuccess",(function(){g(),function(){o.updateClusterZoneLabels(k,w,d),Object.keys(i).forEach(t=>{d3.select("#"+t).text(D(t))}),x&&x.remove();B(),G()}()})),p.$on("$destroy",(function(){R.destroy()}));let k,v,w,E,C,T,L=y(),b=m(),O=Math.min(L,b)/2-100,A=L/2,M=b/2;function D(t){return d[i[t]]}function B(){x=v.append("g").attr("id","legend-group").classed("hidden",!p.showLegend).classed("legend-group",!0)}p.width=function(){return L},p.height=function(){return b};const R=s()().attr("class","d3-tip").customPosition((function(){const t=T.getBoundingClientRect(),e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollLeft||document.body.scrollLeft;return{left:t.left+n+"px",top:t.top-30+e+"px"}})).html((function(t){return t.toolTip})),I=function(t,e){T=e,R.show(t,T)},Y=function(){T=null,R.hide()};function G(){const t=u(),e=f();!function(t,e){t.forEach(t=>{t.toolTip=t.hostname=d[t.customText]}),e.forEach(t=>{t.toolTip=t.linkTypeText=d[t.linkTypeKey]})}(t,e),x.append("rect").attr("id","legend-background").attr("class","legend-background").attr("fill","#EEEEEE");const n=x.append("text").attr("id","node_state").attr("class","id id-host").attr("x",200).attr("y",24).text(D("node_state")),r=x.append("text").attr("id","link_state").attr("class","id id-host").attr("x",200).attr("y",179).text(D("link_state")),a=x.selectAll("#node-group").data(t);o.createNodes(a,25,!0),o.updateNodes(a),a.select(".node.member").on("mouseover",(function(t){d3.event.stopPropagation(),I(t,this)})).on("mouseout",Y),a.attr("transform",(function(t){const e=Math.floor(t.id/4);return`translate(${35+65*(t.id%4)}, ${59+65*e})`})),x.call((function(){S=this.node().getBBox().width})),n.attr("x",10+S/2),r.attr("x",10+S/2);const s=S/3,l=x.append("g").attr("id","links-group");l.attr("transform","translate(10, 189)"),e.forEach((t,e)=>{const n=s-5,r=l.append("g").classed("link",!0).classed("legend",!0).attr("transform",()=>`translate(${e*s}, 0)`);r.append("path").classed("link",!0).attr("stroke-dasharray",()=>o.setLinkStyle(t)).attr("stroke",()=>o.setLinkColor(t)).attr("d",()=>`M5,0,${n},0`),r.append("foreignObject").attr("y",10).attr("x",5).attr("width",s-10).attr("height",10).attr("class","label-wrapper").append("xhtml:div").attr("class","id id-host").style("font-size","9px").html(t.linkTypeText),r.on("mouseover",(function(){d3.event.stopPropagation(),I(t,this)})).on("mouseout",Y)}),x.call((function(t){N=this.node().getBBox().height,S=this.node().getBBox().width})),x.select(".legend-background").attr("height",N+40).attr("width",S+20).attr("rx","6"),z()}function z(){const t=b-(N+30+50);o.moveElement(x,0,t)}function F(){O=Math.min(L,b)/2-100,A=L/2,M=b/2,o.moveElement(w,A,M),w.select(".cluster-zone").attr("r",O)}function W(){F(),k!==p.clusterModel.hasCluster&&(k=!!p.clusterModel.hasCluster,function(t){let e;o.setCreateClusterZone(t,w,d),t||(e=()=>{p.$apply((function(){p.showCreateClusterDialog()}))}),w.on("mouseup",e)}(k));const t=_.cloneDeep(p.clusterModel.nodes)||[],e=_.cloneDeep(p.clusterModel.links)||[];!function(t){t.forEach(t=>t.hostname=r.shortenIri(t.endpoint));const e=E.selectAll("#node-group").data(t,t=>t.address);e.on("click",t=>{p.childContext.selectNode(t);const e=d3.select(".nodetooltip"),n=$(window).width();d3.event.pageX<n/2?(e.style("left",d3.event.pageX+"px"),e.style("right","")):(e.style("left",""),e.style("right",n-d3.event.pageX+"px")),e.style("top",d3.event.pageY-28+"px")}),o.createNodes(e,50),o.updateNodes(e),o.positionNodesOnClusterZone(e,A,M,O)}(t),function(t,e){const n=C.selectAll(".link").data(t,t=>t.id);o.createLinks(n),o.updateLinks(n,e)}(e,t)}p.childContext.redraw=W,p.childContext.resize=function(){L=y(),b=m(),v.attr("width",L),v.attr("height",b),W(),z()},p.childContext.toggleLegend=()=>{p.showLegend=!p.showLegend,x.classed("hidden",!p.showLegend)},g(),function(t){v=o.createClusterSvgElement(h[0]).attr("width",L).attr("height",b),v.call(R),w=o.createClusterZone(v,t),C=v.append("g").attr("id","links-group"),E=v.append("g").attr("id","nodes-group"),B()}(!(!p.clusterModel.nodes||!p.clusterModel.nodes.length)),G(),W()}}}]);const u=function(){const t=[];return t.push({nodeState:r.NodeState.LEADER,customText:"node_state_leader"}),t.push({nodeState:r.NodeState.FOLLOWER,customText:"node_state_follower"}),t.push({nodeState:r.NodeState.CANDIDATE,customText:"node_state_candidate"}),t.push({nodeState:r.NodeState.NO_CLUSTER,customText:"node_state_no_cluster"}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"node_state_out_of_sync"}),t.push({nodeState:r.NodeState.NO_CONNECTION,customText:"node_state_no_connection"}),t.push({nodeState:r.NodeState.READ_ONLY,customText:"node_state_read_only"}),t.push({nodeState:r.NodeState.RESTRICTED,customText:"node_state_restricted"}),t.forEach((t,e)=>t.id=e),t},f=function(){const t=[];return t.push({status:r.LinkState.IN_SYNC,linkTypeKey:"link_state_in_sync"}),t.push({status:r.LinkState.SYNCING,linkTypeKey:"link_state_syncing"}),t.push({status:r.LinkState.OUT_OF_SYNC,linkTypeKey:"link_state_out_of_sync"}),t.forEach((t,e)=>t.id=e),t}}}]);
2
+ //# sourceMappingURL=23.22e3720d741ee87c8108.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/clustermanagement/app.js","webpack:///./src/js/lib/d3-tip/d3-tip-patch.js","webpack:///./src/js/angular/clustermanagement/cluster-drawing.service.js","webpack:///./src/js/angular/clustermanagement/directives.js"],"names":["angular","module","direction","offset","html","node","initNode","svg","point","target","customPosition","tip","vis","el","tagName","toLowerCase","ownerSVGElement","createSVGPoint","document","body","appendChild","show","args","Array","prototype","slice","call","arguments","length","SVGElement","pop","coords","content","apply","this","poffset","dir","nodel","getNodeEl","i","directions","scrollTop","documentElement","scrollLeft","customPos","style","opacity","classed","direction_callbacks","get","top","left","hide","attr","n","v","d3","selection","functor","destroy","remove","map","bbox","getScreenBBox","y","offsetHeight","x","offsetWidth","s","e","w","nw","ne","sw","se","keys","select","createElement","position","targetel","event","getScreenCTM","parentNode","matrix","tbbox","getBBox","width","height","matrixTransform","clusterColors","ontoOrange","ontoBlue","ontoGreen","ontoGrey","createClusterSvgElement","element","append","createClusterZone","parent","clusterZone","setCreateClusterZone","hasCluster","translationsMap","selectAll","textGroup","text","no_cluster_configured","create_cluster_btn","updateClusterZoneLabels","moveElement","createNodes","nodesDataBinding","nodeRadius","isLegend","nodeGroup","enter","radius","_s32","Math","sqrt","points","data","line","createHexagon","exit","nodeElements","nodeTextHost","addHostnameToNodes","updateNodes","nodes","getNodeIconType","updateNodesIcon","nodeState","LEADER","FOLLOWER","CANDIDATE","updateNodesClasses","each","d","labelNode","hostname","updateNodesHostnameText","NO_CONNECTION","OUT_OF_SYNC","READ_ONLY","RESTRICTED","createLinks","linksDataBinding","updateLinks","setLinkColor","setLinkStyle","link","source","find","address","deltaX","deltaY","dist","normX","normY","sourceX","sourceY","targetX","targetY","getLinkCoordinates","status","IN_SYNC","SYNCING","positionNodesOnClusterZone","clusterZoneX","clusterZoneY","clusterZoneRadius","index","theta","PI","cos","sin","navigationBarWidth","clusterManagementDirectives","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","idTranslationKeyMap","node_state","link_state","directive","$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope","restrict","scope","updateTranslations","Object","forEach","key","instant","getWindowWidth","collapsed","MENU_STATE","max","floor","innerWidth","getWindowHeight","innerHeight","legendNodesGroup","legendWidth","legendHeight","showLegend","$on","elementId","getLabelFor","createLegendGroup","createClusterLegend","updateLabels","legendTooltip","nodesGroup","linksGroup","tooltipElement","min","getBoundingClientRect","toolTip","showLegendTooltip","hideLegendTooltip","legendNodes","getLegendNodes","legendLinks","getLegendLinks","customText","linkTypeText","linkTypeKey","translateLegendLinksAndNodes","nodeStateLabel","legendPadding","linkStateLabel","nodeStateLabelY","legendNodeData","on","stopPropagation","row","id","linkWidth","endX","linkG","positionLegend","resizeClusterComponent","plot","clusterModel","mouseupCallback","$apply","showCreateClusterDialog","setClusterZoneType","_","cloneDeep","links","shortenIri","endpoint","nodeData","childContext","selectNode","tooltip","windowWidth","$","window","pageX","pageY","linksData","drawLinks","redraw","resize","toggleLegend","push","NO_CLUSTER"],"mappings":"iGAAA,yDAgB6BA,QAAQC,OAAO,sCAP5B,CACZ,YACA,SACA,kDACA,oD,oBCbJ,UAQQ,EAAO,QAAW,0BAAP,EAWX,WAIJ,OAAO,WACH,IAAIC,EAoJJ,WAA8B,MAAO,KAnJjCC,EAoJJ,WAA2B,MAAO,CAAC,EAAG,IAnJlCC,EAoJJ,WAAyB,MAAO,KAnJ5BC,EAAYC,IACZC,EAAY,KACZC,EAAY,KACZC,EAAY,KACZC,EAAiB,KAErB,SAASC,EAAIC,GAyOb,IAAoBC,EAxOhBN,EA0OgC,SADhCM,GADgBA,EAxOCD,GAyOTP,QACFS,QAAQC,cACHF,EAEJA,EAAGG,gBA5OVR,EAAQD,EAAIU,iBACZC,SAASC,KAAKC,YAAYf,GAM9BM,EAAIU,KAAO,WACP,IAAIC,EAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACnCL,EAAKA,EAAKM,OAAS,aAAcC,aAAYpB,EAASa,EAAKQ,OAE9D,IAKIC,EALAC,EAAU5B,EAAK6B,MAAMC,KAAMZ,GAC3Ba,EAAUhC,EAAO8B,MAAMC,KAAMZ,GAC7Bc,EAAUlC,EAAU+B,MAAMC,KAAMZ,GAChCe,EAAUC,IACVC,EAAUC,EAAWZ,OAErBa,EAAavB,SAASwB,gBAAgBD,WAAavB,SAASC,KAAKsB,UACjEE,EAAazB,SAASwB,gBAAgBC,YAAczB,SAASC,KAAKwB,WAClEC,EAAYlC,EAAeuB,MAAMC,KAAMZ,GAK3C,IAHAe,EAAMjC,KAAK4B,GACNa,MAAM,CAAEC,QAAS,EAAG,iBAAkB,QAErCP,KAAKF,EAAMU,QAAQP,EAAWD,IAAI,GAYxC,OAXAR,EAASiB,EAAoBC,IAAIb,GAAKH,MAAMC,MAExCU,EACAP,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C2K,IAfA/H,IADsB0G,EAAMwD,aAAalI,QAAS0E,EAAMwD,aAAalI,MAAMrG,SAE3EqM,IACAiC,SAwRpB,MAAMrB,EAAiB,WACnB,MAAMD,EAAc,GAUpB,OATAA,EAAY+C,KAAK,CAACvJ,UAAW,YAAUC,OAAQ2G,WAAY,sBAC3DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUE,SAAU0G,WAAY,wBAC7DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUG,UAAWyG,WAAY,yBAC9DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUwJ,WAAY5C,WAAY,0BAC/DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUW,YAAaiG,WAAY,2BAChEJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUU,cAAekG,WAAY,6BAClEJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUY,UAAWgG,WAAY,yBAC9DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUa,WAAY+F,WAAY,0BAC/DJ,EAAY9B,QAAQ,CAACzM,EAAMuK,IAAUvK,EAAKuP,GAAKhF,GACxCgE,GAGLG,EAAiB,WACnB,MAAM2B,EAAQ,GAKd,OAJAA,EAAMiB,KAAK,CAACtH,OAAQ,YAAUC,QAAS4E,YAAa,uBACpDwB,EAAMiB,KAAK,CAACtH,OAAQ,YAAUE,QAAS2E,YAAa,uBACpDwB,EAAMiB,KAAK,CAACtH,OAAQ,YAAUtB,YAAamG,YAAa,2BACxDwB,EAAM5D,QAAQ,CAACvD,EAAMqB,IAAUrB,EAAKqG,GAAKhF,GAClC8F","file":"23.16fc17b0a8983ce3d809.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers';\nimport 'angular/clustermanagement/directives';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/d3-ONTO-chord-patch';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers',\n 'graphdb.framework.clustermanagement.directives'\n];\n\nconst clusterManagementApp = angular.module('graphdb.framework.clustermanagement', modules);\n","// d3.tip\n// Copyright (c) 2013 Justin Palmer\n//\n// Tooltips for d3.js SVG visualizations\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module with d3 as a dependency.\n define([], factory)\n } else if (typeof module === 'object' && module.exports) {\n // CommonJS\n module.exports = function(d3) {\n d3.tip = factory(d3)\n return d3.tip\n }\n } else {\n // Browser global.\n root.d3.tip = factory(root.d3)\n }\n}(this, function () {\n // Public - contructs a new tooltip\n //\n // Returns a tip\n return function() {\n var direction = d3_tip_direction,\n offset = d3_tip_offset,\n html = d3_tip_html,\n node = initNode(),\n svg = null,\n point = null,\n target = null,\n customPosition = null\n\n function tip(vis) {\n svg = getSVGNode(vis)\n point = svg.createSVGPoint()\n document.body.appendChild(node)\n }\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function() {\n var args = Array.prototype.slice.call(arguments)\n if(args[args.length - 1] instanceof SVGElement) target = args.pop()\n\n var content = html.apply(this, args),\n poffset = offset.apply(this, args),\n dir = direction.apply(this, args),\n nodel = getNodeEl(),\n i = directions.length,\n coords,\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft,\n customPos = customPosition.apply(this, args)\n\n nodel.html(content)\n .style({ opacity: 1, 'pointer-events': 'all' })\n\n while(i--) nodel.classed(directions[i], false)\n coords = direction_callbacks.get(dir).apply(this)\n\n if (customPos) {\n nodel.style(customPos)\n } else {\n nodel.classed(dir, true).style({\n top: (coords.top + poffset[0]) + scrollTop + 'px',\n left: (coords.left + poffset[1]) + scrollLeft + 'px'\n })\n }\n\n return tip\n }\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function() {\n var nodel = getNodeEl()\n nodel.style({ opacity: 0, 'pointer-events': 'none' })\n return tip\n }\n\n // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().attr(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.attr.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Proxy style calls to the d3 tip container. Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value\n tip.style = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().style(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.style.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function(v) {\n if (!arguments.length) return direction\n direction = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function(v) {\n if (!arguments.length) return offset\n offset = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function(v) {\n if (!arguments.length) return html\n html = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n tip.customPosition = function(v) {\n if (!arguments.length) return customPosition\n customPosition = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function() {\n if(node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n }\n\n function d3_tip_direction() { return 'n' }\n function d3_tip_offset() { return [0, 0] }\n function d3_tip_html() { return ' ' }\n\n var direction_callbacks = d3.map({\n n: direction_n,\n s: direction_s,\n e: direction_e,\n w: direction_w,\n nw: direction_nw,\n ne: direction_ne,\n sw: direction_sw,\n se: direction_se\n }),\n\n directions = direction_callbacks.keys()\n\n function direction_n() {\n var bbox = getScreenBBox()\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n }\n }\n\n function direction_s() {\n var bbox = getScreenBBox()\n return {\n top: bbox.s.y,\n left: bbox.s.x - node.offsetWidth / 2\n }\n }\n\n function direction_e() {\n var bbox = getScreenBBox()\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x\n }\n }\n\n function direction_w() {\n var bbox = getScreenBBox()\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth\n }\n }\n\n function direction_nw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n }\n }\n\n function direction_ne() {\n var bbox = getScreenBBox()\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n }\n }\n\n function direction_sw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n }\n }\n\n function direction_se() {\n var bbox = getScreenBBox()\n return {\n top: bbox.se.y,\n left: bbox.e.x\n }\n }\n\n function initNode() {\n var node = d3.select(document.createElement('div'))\n node.style({\n position: 'absolute',\n top: 0,\n opacity: 0,\n 'pointer-events': 'none',\n 'box-sizing': 'border-box'\n })\n\n return node.node()\n }\n\n function getSVGNode(el) {\n el = el.node()\n if(el.tagName.toLowerCase() === 'svg')\n return el\n\n return el.ownerSVGElement\n }\n\n function getNodeEl() {\n if(node === null) {\n node = initNode();\n // re-add node to DOM\n document.body.appendChild(node);\n };\n return d3.select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),\n // sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox() {\n var targetel = target || d3.event.target;\n\n while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {\n targetel = targetel.parentNode;\n }\n\n var bbox = {},\n matrix = targetel.getScreenCTM(),\n tbbox = targetel.getBBox(),\n width = tbbox.width,\n height = tbbox.height,\n x = tbbox.x,\n y = tbbox.y\n\n point.x = x\n point.y = y\n bbox.nw = point.matrixTransform(matrix)\n point.x += width\n bbox.ne = point.matrixTransform(matrix)\n point.y += height\n bbox.se = point.matrixTransform(matrix)\n point.x -= width\n bbox.sw = point.matrixTransform(matrix)\n point.y -= height / 2\n bbox.w = point.matrixTransform(matrix)\n point.x += width\n bbox.e = point.matrixTransform(matrix)\n point.x -= width / 2\n point.y -= height / 2\n bbox.n = point.matrixTransform(matrix)\n point.y += height\n bbox.s = point.matrixTransform(matrix)\n\n return bbox\n }\n\n return tip\n };\n\n}));","import {LinkState, NodeState} from \"./controllers\";\n\nexport const clusterColors = {\n ontoOrange: 'var(--onto-orange)',\n ontoBlue: 'var(--onto-blue)',\n ontoGreen: 'var(--onto-green)',\n ontoGrey: 'var(--onto-grey)'\n};\n\nexport function createClusterSvgElement(element) {\n return d3.select(element)\n .append('svg');\n}\n\nexport function createClusterZone(parent) {\n const clusterZone = parent.append('g');\n clusterZone\n .append(\"circle\")\n .classed('cluster-zone', true)\n .style('fill', 'transparent')\n .style('stroke-width', '2');\n return clusterZone;\n}\n\nexport function setCreateClusterZone(hasCluster, clusterZone, translationsMap) {\n clusterZone\n .select('.cluster-zone')\n .classed('no-cluster', !hasCluster);\n\n if (hasCluster) {\n clusterZone.selectAll('#no-cluster-zone').remove();\n } else {\n const textGroup = clusterZone\n .append('g')\n .attr(\"id\", \"no-cluster-zone\");\n textGroup\n .append('text')\n .attr('id', 'no-cluster-label')\n .text(translationsMap.no_cluster_configured || 'No cluster group configured')\n .attr('y', -50)\n .classed('h2', true)\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('id', 'create-cluster-label')\n .classed('h3', true)\n .text(translationsMap.create_cluster_btn || 'Click here to create a cluster')\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('y', 130)\n .attr('class', 'icon-any repo')\n .attr('fill', clusterColors.ontoOrange)\n .style('text-anchor', \"middle\")\n .classed('settings-icon', true)\n .text(\"\\ue92b\");\n }\n}\n\nexport function updateClusterZoneLabels(hasCluster, clusterZone, translationsMap) {\n if (hasCluster) {\n return;\n }\n clusterZone.select('#no-cluster-zone #no-cluster-label')\n .text(translationsMap.no_cluster_configured);\n clusterZone.select('#no-cluster-zone #create-cluster-label')\n .text(translationsMap.create_cluster_btn);\n}\n\nexport function moveElement(element, x, y) {\n element.attr('transform', () => {\n return `translate(${x}, ${y})`;\n });\n}\n\nexport function createNodes(nodesDataBinding, nodeRadius, isLegend) {\n const nodeGroup = nodesDataBinding.enter()\n .append('g')\n .attr('id', 'node-group')\n .classed('legend', isLegend);\n\n createHexagon(nodeGroup, nodeRadius);\n nodesDataBinding.exit().remove();\n\n nodeGroup\n .append('text')\n .attr('class', 'icon-any node-icon');\n\n addHostnameToNodes(nodeGroup, nodeRadius, isLegend);\n}\n\nfunction addHostnameToNodes(nodeElements, nodeRadius, isLegend) {\n const nodeTextHost = nodeElements.append('g');\n\n if (isLegend) {\n nodeTextHost.append('foreignObject')\n .attr('y', nodeRadius)\n .attr('x', -nodeRadius)\n .attr('width', nodeRadius * 2)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host');\n } else {\n nodeTextHost\n .append('rect')\n .attr('class', 'id-host-background')\n .attr('rx', 6);\n\n nodeTextHost\n .append('text')\n .attr('y', nodeRadius + 10)\n .attr('class', 'id id-host')\n .style('text-anchor', 'middle');\n }\n}\n\nexport function updateNodes(nodes) {\n updateNodesIcon(nodes);\n updateNodesClasses(nodes);\n updateNodesHostnameText(nodes);\n}\n\nfunction updateNodesClasses(nodes) {\n nodes\n .select('.node.member')\n .classed('leader', (node) => node.nodeState === NodeState.LEADER)\n .classed('follower', (node) => node.nodeState === NodeState.FOLLOWER)\n .classed('candidate', (node) => node.nodeState === NodeState.CANDIDATE)\n .classed('other', (node) => {\n return node.nodeState !== NodeState.LEADER &&\n node.nodeState !== NodeState.FOLLOWER &&\n node.nodeState !== NodeState.CANDIDATE;\n });\n}\n\nfunction updateNodesIcon(nodes) {\n nodes\n .select('.icon-any.node-icon')\n .text(getNodeIconType);\n}\n\nfunction getNodeIconType(node) {\n if (node.nodeState === NodeState.LEADER) {\n return '\\ue935';\n } else if (node.nodeState === NodeState.FOLLOWER) {\n return '\\ue963';\n } else if (node.nodeState === NodeState.CANDIDATE) {\n return '\\ue914';\n } else if (node.nodeState === NodeState.NO_CONNECTION) {\n return '\\ue931';\n } else if (node.nodeState === NodeState.OUT_OF_SYNC) {\n return '\\ue920';\n } else if (node.nodeState === NodeState.READ_ONLY) {\n return '\\ue95c';\n } else if (node.nodeState === NodeState.RESTRICTED) {\n return '\\ue933';\n }\n return '';\n}\n\nfunction updateNodesHostnameText(nodes) {\n nodes\n .select('.id.id-host')\n .each(function (d) {\n d.labelNode = this;\n })\n .text(function (d) {\n return d.hostname;\n });\n\n // Add padding styling to text background. left/right +5. top/bottom +1\n nodes\n .select('.id-host-background')\n .attr('width', function (d) {\n return d3.select(d.labelNode).node().getBBox().width + 10;\n })\n .attr('height', function (d) {\n return d3.select(d.labelNode).node().getBBox().height + 2;\n })\n .attr('x', function (d) {\n return d3.select(d.labelNode).node().getBBox().x - 5;\n })\n .attr('y', function (d) {\n return d3.select(d.labelNode).node().getBBox().y - 1;\n })\n .attr('fill', '#EEEEEE');\n}\n\nexport function createLinks(linksDataBinding) {\n linksDataBinding.enter()\n .append('path')\n .classed('link', true);\n\n linksDataBinding.exit().remove();\n}\n\nexport function updateLinks(linksDataBinding, nodes) {\n linksDataBinding\n .attr('stroke', setLinkColor)\n .style('stroke-dasharray', setLinkStyle)\n .attr('d', (link) => getLinkCoordinates(link, nodes));\n}\n\nexport function setLinkColor(link) {\n if (link.status === LinkState.IN_SYNC || link.status === LinkState.SYNCING) {\n return clusterColors.ontoGreen;\n } else if (link.status === LinkState.OUT_OF_SYNC) {\n return clusterColors.ontoGrey;\n }\n return 'none';\n}\n\nexport function setLinkStyle(link) {\n if (link.status === LinkState.OUT_OF_SYNC || link.status === LinkState.SYNCING) {\n return '10 10';\n }\n return 'none';\n}\n\nfunction getLinkCoordinates(link, nodes) {\n const source = nodes.find((node) => node.address === link.source);\n const target = nodes.find((node) => node.address === link.target);\n\n const deltaX = target.x - source.x;\n const deltaY = target.y - source.y;\n const dist = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const normX = deltaX / dist;\n const normY = deltaY / dist;\n\n // Padding from node center point\n const sourcePadding = 55;\n const targetPadding = 55;\n const sourceX = source.x + (sourcePadding * normX);\n const sourceY = source.y + (sourcePadding * normY);\n const targetX = target.x - (targetPadding * normX);\n const targetY = target.y - (targetPadding * normY);\n return 'M' + sourceX + ',' + sourceY + 'L' + targetX + ',' + targetY;\n}\n\nexport function positionNodesOnClusterZone(nodes, clusterZoneX, clusterZoneY, clusterZoneRadius) {\n nodes\n .attr('transform', (node, index) => {\n // Calculate initial positions for the new nodes based on\n // spreading them evenly on a circle around the center of the page.\n const theta = 2 * Math.PI * index / nodes[0].length;\n var x = clusterZoneX + Math.cos(theta) * clusterZoneRadius;\n var y = clusterZoneY + Math.sin(theta) * clusterZoneRadius;\n node.x = x;\n node.y = y;\n return `translate(${x}, ${y})`;\n });\n}\n\nfunction createHexagon(nodeGroup, radius) {\n const _s32 = (Math.sqrt(3) / 2);\n const xDiff = 0;\n const yDiff = 0;\n const points = [[radius + xDiff, yDiff], [radius / 2 + xDiff, radius * _s32 + yDiff], [-radius / 2 + xDiff, radius * _s32 + yDiff],\n [-radius + xDiff, yDiff],\n [-radius / 2 + xDiff, -radius * _s32 + yDiff], [radius / 2 + xDiff, -radius * _s32 + yDiff], [radius + xDiff, yDiff],\n [radius / 2 + xDiff, radius * _s32 + yDiff]];\n return nodeGroup\n .selectAll(\"path.area\")\n .data([points])\n .enter()\n .append(\"path\")\n .attr('class', 'node member')\n .attr(\"d\", d3.svg.line());\n}\n","import 'angular/utils/local-storage-adapter';\nimport * as CDS from \"./cluster-drawing.service\";\nimport {LinkState, NodeState} from \"./controllers\";\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\n\n\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\n\nconst nodeRadius = 50;\nconst legendNodeRadius = 25;\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives', [\n 'graphdb.framework.utils.localstorageadapter'\n]);\n\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\"\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state'\n};\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$rootScope',\n function ($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $rootScope) {\n return {\n restrict: 'A',\n link: function (scope, element) {\n scope.showLegend = false;\n $rootScope.$on('$translateChangeSuccess', function () {\n updateTranslations();\n updateLabels();\n });\n scope.$on(\"$destroy\", function () {\n legendTooltip.destroy();\n });\n function updateTranslations() {\n Object.keys(translationsMap).forEach((key) => {\n translationsMap[key] = $translate.instant('cluster_management.cluster_graphical_view.' + key);\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 600);\n }\n\n let legendNodesGroup;\n let legendWidth;\n let legendHeight;\n const legendPadding = 10;\n\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n scope.width = function () {\n return width;\n };\n\n scope.height = function () {\n return height;\n };\n\n // SVG components\n let svg;\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n if (legendNodesGroup) {\n legendNodesGroup.remove();\n }\n createLegendGroup();\n createClusterLegend();\n }\n\n function translateLegendLinksAndNodes(legendNodes, legendLinks) {\n legendNodes.forEach((node) => {\n node.toolTip = node.hostname = translationsMap[node.customText];\n });\n legendLinks.forEach((link) => {\n link.toolTip = link.linkTypeText = translationsMap[link.linkTypeKey];\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function initialize() {\n updateTranslations();\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n createClusterLegend();\n plot();\n }\n\n function createClusterZone(hasCluster) {\n svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n svg.call(legendTooltip);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n createLegendGroup();\n }\n\n function createLegendGroup() {\n legendNodesGroup = svg.append('g').attr('id', 'legend-group')\n .classed('hidden', !scope.showLegend)\n .classed('legend-group', true);\n }\n\n let tooltipElement;\n const legendTooltip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function () {\n const bbox = tooltipElement.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;\n\n return {\n left: bbox.left + scrollLeft + 'px',\n top: (bbox.top - 30) + scrollTop + 'px'\n };\n })\n .html(function (d) {\n return d.toolTip;\n });\n\n // Shows tooltip with legend node or link state\n const showLegendTooltip = function (d, element) {\n tooltipElement = element;\n legendTooltip.show(d, tooltipElement);\n };\n\n // Hides the tooltip with legend node or link state\n const hideLegendTooltip = function () {\n tooltipElement = null;\n legendTooltip.hide();\n };\n\n function createClusterLegend() {\n const nodeLinkStateTextHeight = 14;\n\n const nodeStateLabelY = legendPadding + nodeLinkStateTextHeight;\n const linkStateLabelY = nodeStateLabelY + legendPadding * 3 + legendNodeRadius * 5;\n\n const legendColumns = 4;\n const nodesXPadding = 15;\n const nodesYPadding = 15;\n\n const legendNodes = getLegendNodes();\n const legendLinks = getLegendLinks();\n translateLegendLinksAndNodes(legendNodes, legendLinks);\n\n legendNodesGroup.append('rect')\n .attr('id', 'legend-background')\n .attr('class', 'legend-background')\n .attr('fill', '#EEEEEE');\n\n const nodeStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'node_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', nodeStateLabelY)\n .text(getLabelFor('node_state'));\n\n const linkStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'link_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', linkStateLabelY)\n .text(getLabelFor('link_state'));\n\n const legendNodeData = legendNodesGroup.selectAll('#node-group').data(legendNodes);\n CDS.createNodes(legendNodeData, legendNodeRadius, true);\n CDS.updateNodes(legendNodeData);\n\n legendNodeData.select('.node.member')\n .on(\"mouseover\", function (d) {\n d3.event.stopPropagation();\n showLegendTooltip(d, this);\n })\n .on('mouseout', hideLegendTooltip);\n\n legendNodeData\n .attr('transform', function (d) {\n const row = Math.floor(d.id / legendColumns);\n const column = d.id % legendColumns;\n const x = legendPadding + legendNodeRadius + (nodesXPadding + legendNodeRadius * 2) * column;\n const y = legendPadding * 2 + nodeLinkStateTextHeight + legendNodeRadius + (nodesYPadding + legendNodeRadius\n * 2) * row;\n return `translate(${x}, ${y})`;\n });\n\n legendNodesGroup\n .call(function () {\n legendWidth = this.node().getBBox().width;\n });\n\n // Position node/link state labels\n nodeStateLabel.attr('x', legendPadding + legendWidth / 2);\n linkStateLabel.attr('x', legendPadding + legendWidth / 2);\n\n\n const linkWidth = legendWidth / 3;\n\n const linksGroup = legendNodesGroup.append('g').attr('id', 'links-group');\n const linksGroupY = linkStateLabelY + legendPadding;\n linksGroup.attr('transform', `translate(${legendPadding}, ${linksGroupY})`);\n\n legendLinks.forEach((link, index) => {\n const linkPadding = 5;\n const startX = linkPadding;\n const endX = linkWidth - linkPadding;\n\n const linkG = linksGroup\n .append('g')\n .classed('link', true)\n .classed('legend', true)\n .attr('transform', () => {\n const x = index * linkWidth;\n return `translate(${x}, 0)`;\n });\n\n linkG\n .append('path')\n .classed('link', true)\n .attr('stroke-dasharray', () => CDS.setLinkStyle(link))\n .attr('stroke', () => CDS.setLinkColor(link))\n .attr('d', () => {\n return `M${startX},0,${endX},0`;\n });\n\n linkG.append('foreignObject')\n .attr('y', 10)\n .attr('x', 5)\n .attr('width', linkWidth - 10)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host')\n .style(\"font-size\", \"9px\")\n .html(link.linkTypeText);\n\n linkG\n .on('mouseover', function () {\n d3.event.stopPropagation();\n showLegendTooltip(link, this);\n })\n .on('mouseout', hideLegendTooltip);\n });\n\n\n legendNodesGroup\n .call(function (d) {\n legendHeight = this.node().getBBox().height;\n legendWidth = this.node().getBBox().width;\n });\n\n legendNodesGroup.select('.legend-background')\n .attr('height', legendHeight + legendPadding * 4)\n .attr('width', legendWidth + legendPadding * 2)\n .attr('rx', '6');\n\n positionLegend();\n }\n\n function positionLegend() {\n const y = height - (legendHeight + legendPadding * 3 + 50);\n CDS.moveElement(legendNodesGroup, 0, y);\n }\n\n function createNodes(nodes) {\n nodes.forEach((node) => node.hostname = UriUtils.shortenIri(node.endpoint));\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n nodeData\n .on('click', (d) => {\n scope.childContext.selectNode(d);\n\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (d3.event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", d3.event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - d3.event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (d3.event.pageY - 28) + \"px\");\n });\n CDS.createNodes(nodeData, nodeRadius);\n CDS.updateNodes(nodeData);\n CDS.positionNodesOnClusterZone(nodeData, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n }\n\n // Properties and functions that can be used by parent\n scope.childContext.redraw = plot;\n scope.childContext.resize = function () {\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n positionLegend();\n };\n scope.childContext.toggleLegend = () => {\n scope.showLegend = !scope.showLegend;\n legendNodesGroup.classed('hidden', !scope.showLegend);\n };\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap);\n let mouseupCallback;\n if (!hasCluster) {\n mouseupCallback = () => {\n scope.$apply(function () {\n scope.showCreateClusterDialog();\n });\n };\n }\n clusterZone\n .on('mouseup', mouseupCallback);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = _.cloneDeep(scope.clusterModel.nodes) || [];\n const links = _.cloneDeep(scope.clusterModel.links) || [];\n createNodes(nodes);\n drawLinks(links, nodes);\n }\n\n initialize();\n }\n };\n }\n]);\n\n\nconst getLegendNodes = function () {\n const legendNodes = [];\n legendNodes.push({nodeState: NodeState.LEADER, customText: 'node_state_leader'});\n legendNodes.push({nodeState: NodeState.FOLLOWER, customText: 'node_state_follower'});\n legendNodes.push({nodeState: NodeState.CANDIDATE, customText: 'node_state_candidate'});\n legendNodes.push({nodeState: NodeState.NO_CLUSTER, customText: 'node_state_no_cluster'});\n legendNodes.push({nodeState: NodeState.OUT_OF_SYNC, customText: 'node_state_out_of_sync'});\n legendNodes.push({nodeState: NodeState.NO_CONNECTION, customText: 'node_state_no_connection'});\n legendNodes.push({nodeState: NodeState.READ_ONLY, customText: 'node_state_read_only'});\n legendNodes.push({nodeState: NodeState.RESTRICTED, customText: 'node_state_restricted'});\n legendNodes.forEach((node, index) => node.id = index);\n return legendNodes;\n};\n\nconst getLegendLinks = function () {\n const links = [];\n links.push({status: LinkState.IN_SYNC, linkTypeKey: 'link_state_in_sync'});\n links.push({status: LinkState.SYNCING, linkTypeKey: 'link_state_syncing'});\n links.push({status: LinkState.OUT_OF_SYNC, linkTypeKey: 'link_state_out_of_sync'});\n links.forEach((link, index) => link.id = index);\n return links;\n};\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./src/js/angular/clustermanagement/app.js","webpack:///./src/js/lib/d3-tip/d3-tip-patch.js","webpack:///./src/js/angular/clustermanagement/cluster-drawing.service.js","webpack:///./src/js/angular/clustermanagement/directives.js"],"names":["angular","module","direction","offset","html","node","initNode","svg","point","target","customPosition","tip","vis","el","tagName","toLowerCase","ownerSVGElement","createSVGPoint","document","body","appendChild","show","args","Array","prototype","slice","call","arguments","length","SVGElement","pop","coords","content","apply","this","poffset","dir","nodel","getNodeEl","i","directions","scrollTop","documentElement","scrollLeft","customPos","style","opacity","classed","direction_callbacks","get","top","left","hide","attr","n","v","d3","selection","functor","destroy","remove","map","bbox","getScreenBBox","y","offsetHeight","x","offsetWidth","s","e","w","nw","ne","sw","se","keys","select","createElement","position","targetel","event","getScreenCTM","parentNode","matrix","tbbox","getBBox","width","height","matrixTransform","clusterColors","ontoOrange","ontoBlue","ontoGreen","ontoGrey","createClusterSvgElement","element","append","createClusterZone","parent","clusterZone","setCreateClusterZone","hasCluster","translationsMap","selectAll","textGroup","text","no_cluster_configured","create_cluster_btn","updateClusterZoneLabels","moveElement","createNodes","nodesDataBinding","nodeRadius","isLegend","nodeGroup","enter","radius","_s32","Math","sqrt","points","data","line","createHexagon","exit","nodeElements","nodeTextHost","addHostnameToNodes","updateNodes","nodes","getNodeIconType","updateNodesIcon","nodeState","LEADER","FOLLOWER","CANDIDATE","updateNodesClasses","each","d","labelNode","hostname","updateNodesHostnameText","NO_CONNECTION","OUT_OF_SYNC","READ_ONLY","RESTRICTED","createLinks","linksDataBinding","updateLinks","setLinkColor","setLinkStyle","link","source","find","address","deltaX","deltaY","dist","normX","normY","sourceX","sourceY","targetX","targetY","getLinkCoordinates","status","IN_SYNC","SYNCING","positionNodesOnClusterZone","clusterZoneX","clusterZoneY","clusterZoneRadius","index","theta","PI","cos","sin","navigationBarWidth","clusterManagementDirectives","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","idTranslationKeyMap","node_state","link_state","directive","$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope","restrict","scope","updateTranslations","Object","forEach","key","instant","getWindowWidth","collapsed","MENU_STATE","max","floor","innerWidth","getWindowHeight","innerHeight","legendNodesGroup","legendWidth","legendHeight","showLegend","$on","elementId","getLabelFor","createLegendGroup","createClusterLegend","updateLabels","legendTooltip","nodesGroup","linksGroup","tooltipElement","min","getBoundingClientRect","toolTip","showLegendTooltip","hideLegendTooltip","legendNodes","getLegendNodes","legendLinks","getLegendLinks","customText","linkTypeText","linkTypeKey","translateLegendLinksAndNodes","nodeStateLabel","legendPadding","linkStateLabel","nodeStateLabelY","legendNodeData","on","stopPropagation","row","id","linkWidth","endX","linkG","positionLegend","resizeClusterComponent","plot","clusterModel","mouseupCallback","$apply","showCreateClusterDialog","setClusterZoneType","_","cloneDeep","links","shortenIri","endpoint","nodeData","childContext","selectNode","tooltip","windowWidth","$","window","pageX","pageY","linksData","drawLinks","redraw","resize","toggleLegend","push","NO_CLUSTER"],"mappings":"iGAAA,yDAgB6BA,QAAQC,OAAO,sCAP5B,CACZ,YACA,SACA,kDACA,oD,oBCbJ,UAQQ,EAAO,QAAW,0BAAP,EAWX,WAIJ,OAAO,WACH,IAAIC,EAoJJ,WAA8B,MAAO,KAnJjCC,EAoJJ,WAA2B,MAAO,CAAC,EAAG,IAnJlCC,EAoJJ,WAAyB,MAAO,KAnJ5BC,EAAYC,IACZC,EAAY,KACZC,EAAY,KACZC,EAAY,KACZC,EAAiB,KAErB,SAASC,EAAIC,GAyOb,IAAoBC,EAxOhBN,EA0OgC,SADhCM,GADgBA,EAxOCD,GAyOTP,QACFS,QAAQC,cACHF,EAEJA,EAAGG,g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AAY,yBAC9DJ,EAAY+C,KAAK,CAACvJ,UAAW,YAAUa,WAAY+F,WAAY,0BAC/DJ,EAAY9B,QAAQ,CAACzM,EAAMuK,IAAUvK,EAAKuP,GAAKhF,GACxCgE,GAGLG,EAAiB,WACnB,MAAM2B,EAAQ,GAKd,OAJAA,EAAMiB,KAAK,CAACtH,OAAQ,YAAUC,QAAS4E,YAAa,uBACpDwB,EAAMiB,KAAK,CAACtH,OAAQ,YAAUE,QAAS2E,YAAa,uBACpDwB,EAAMiB,KAAK,CAACtH,OAAQ,YAAUtB,YAAamG,YAAa,2BACxDwB,EAAM5D,QAAQ,CAACvD,EAAMqB,IAAUrB,EAAKqG,GAAKhF,GAClC8F","file":"23.22e3720d741ee87c8108.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers';\nimport 'angular/clustermanagement/directives';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/d3-ONTO-chord-patch';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers',\n 'graphdb.framework.clustermanagement.directives'\n];\n\nconst clusterManagementApp = angular.module('graphdb.framework.clustermanagement', modules);\n","// d3.tip\n// Copyright (c) 2013 Justin Palmer\n//\n// Tooltips for d3.js SVG visualizations\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module with d3 as a dependency.\n define([], factory)\n } else if (typeof module === 'object' && module.exports) {\n // CommonJS\n module.exports = function(d3) {\n d3.tip = factory(d3)\n return d3.tip\n }\n } else {\n // Browser global.\n root.d3.tip = factory(root.d3)\n }\n}(this, function () {\n // Public - contructs a new tooltip\n //\n // Returns a tip\n return function() {\n var direction = d3_tip_direction,\n offset = d3_tip_offset,\n html = d3_tip_html,\n node = initNode(),\n svg = null,\n point = null,\n target = null,\n customPosition = null\n\n function tip(vis) {\n svg = getSVGNode(vis)\n point = svg.createSVGPoint()\n document.body.appendChild(node)\n }\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function() {\n var args = Array.prototype.slice.call(arguments)\n if(args[args.length - 1] instanceof SVGElement) target = args.pop()\n\n var content = html.apply(this, args),\n poffset = offset.apply(this, args),\n dir = direction.apply(this, args),\n nodel = getNodeEl(),\n i = directions.length,\n coords,\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft,\n customPos = customPosition.apply(this, args)\n\n nodel.html(content)\n .style({ opacity: 1, 'pointer-events': 'all' })\n\n while(i--) nodel.classed(directions[i], false)\n coords = direction_callbacks.get(dir).apply(this)\n\n if (customPos) {\n nodel.style(customPos)\n } else {\n nodel.classed(dir, true).style({\n top: (coords.top + poffset[0]) + scrollTop + 'px',\n left: (coords.left + poffset[1]) + scrollLeft + 'px'\n })\n }\n\n return tip\n }\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function() {\n var nodel = getNodeEl()\n nodel.style({ opacity: 0, 'pointer-events': 'none' })\n return tip\n }\n\n // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().attr(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.attr.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Proxy style calls to the d3 tip container. Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value\n tip.style = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().style(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.style.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function(v) {\n if (!arguments.length) return direction\n direction = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function(v) {\n if (!arguments.length) return offset\n offset = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function(v) {\n if (!arguments.length) return html\n html = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n tip.customPosition = function(v) {\n if (!arguments.length) return customPosition\n customPosition = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function() {\n if(node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n }\n\n function d3_tip_direction() { return 'n' }\n function d3_tip_offset() { return [0, 0] }\n function d3_tip_html() { return ' ' }\n\n var direction_callbacks = d3.map({\n n: direction_n,\n s: direction_s,\n e: direction_e,\n w: direction_w,\n nw: direction_nw,\n ne: direction_ne,\n sw: direction_sw,\n se: direction_se\n }),\n\n directions = direction_callbacks.keys()\n\n function direction_n() {\n var bbox = getScreenBBox()\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n }\n }\n\n function direction_s() {\n var bbox = getScreenBBox()\n return {\n top: bbox.s.y,\n left: bbox.s.x - node.offsetWidth / 2\n }\n }\n\n function direction_e() {\n var bbox = getScreenBBox()\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x\n }\n }\n\n function direction_w() {\n var bbox = getScreenBBox()\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth\n }\n }\n\n function direction_nw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n }\n }\n\n function direction_ne() {\n var bbox = getScreenBBox()\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n }\n }\n\n function direction_sw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n }\n }\n\n function direction_se() {\n var bbox = getScreenBBox()\n return {\n top: bbox.se.y,\n left: bbox.e.x\n }\n }\n\n function initNode() {\n var node = d3.select(document.createElement('div'))\n node.style({\n position: 'absolute',\n top: 0,\n opacity: 0,\n 'pointer-events': 'none',\n 'box-sizing': 'border-box'\n })\n\n return node.node()\n }\n\n function getSVGNode(el) {\n el = el.node()\n if(el.tagName.toLowerCase() === 'svg')\n return el\n\n return el.ownerSVGElement\n }\n\n function getNodeEl() {\n if(node === null) {\n node = initNode();\n // re-add node to DOM\n document.body.appendChild(node);\n };\n return d3.select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),\n // sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox() {\n var targetel = target || d3.event.target;\n\n while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {\n targetel = targetel.parentNode;\n }\n\n var bbox = {},\n matrix = targetel.getScreenCTM(),\n tbbox = targetel.getBBox(),\n width = tbbox.width,\n height = tbbox.height,\n x = tbbox.x,\n y = tbbox.y\n\n point.x = x\n point.y = y\n bbox.nw = point.matrixTransform(matrix)\n point.x += width\n bbox.ne = point.matrixTransform(matrix)\n point.y += height\n bbox.se = point.matrixTransform(matrix)\n point.x -= width\n bbox.sw = point.matrixTransform(matrix)\n point.y -= height / 2\n bbox.w = point.matrixTransform(matrix)\n point.x += width\n bbox.e = point.matrixTransform(matrix)\n point.x -= width / 2\n point.y -= height / 2\n bbox.n = point.matrixTransform(matrix)\n point.y += height\n bbox.s = point.matrixTransform(matrix)\n\n return bbox\n }\n\n return tip\n };\n\n}));","import {LinkState, NodeState} from \"./controllers\";\n\nexport const clusterColors = {\n ontoOrange: 'var(--onto-orange)',\n ontoBlue: 'var(--onto-blue)',\n ontoGreen: 'var(--onto-green)',\n ontoGrey: 'var(--onto-grey)'\n};\n\nexport function createClusterSvgElement(element) {\n return d3.select(element)\n .append('svg');\n}\n\nexport function createClusterZone(parent) {\n const clusterZone = parent.append('g');\n clusterZone\n .append(\"circle\")\n .classed('cluster-zone', true)\n .style('fill', 'transparent')\n .style('stroke-width', '2');\n return clusterZone;\n}\n\nexport function setCreateClusterZone(hasCluster, clusterZone, translationsMap) {\n clusterZone\n .select('.cluster-zone')\n .classed('no-cluster', !hasCluster);\n\n if (hasCluster) {\n clusterZone.selectAll('#no-cluster-zone').remove();\n } else {\n const textGroup = clusterZone\n .append('g')\n .attr(\"id\", \"no-cluster-zone\");\n textGroup\n .append('text')\n .attr('id', 'no-cluster-label')\n .text(translationsMap.no_cluster_configured || 'No cluster group configured')\n .attr('y', -50)\n .classed('h2', true)\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('id', 'create-cluster-label')\n .classed('h3', true)\n .text(translationsMap.create_cluster_btn || 'Click here to create a cluster')\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('y', 130)\n .attr('class', 'icon-any repo')\n .attr('fill', clusterColors.ontoOrange)\n .style('text-anchor', \"middle\")\n .classed('settings-icon', true)\n .text(\"\\ue92b\");\n }\n}\n\nexport function updateClusterZoneLabels(hasCluster, clusterZone, translationsMap) {\n if (hasCluster) {\n return;\n }\n clusterZone.select('#no-cluster-zone #no-cluster-label')\n .text(translationsMap.no_cluster_configured);\n clusterZone.select('#no-cluster-zone #create-cluster-label')\n .text(translationsMap.create_cluster_btn);\n}\n\nexport function moveElement(element, x, y) {\n element.attr('transform', () => {\n return `translate(${x}, ${y})`;\n });\n}\n\nexport function createNodes(nodesDataBinding, nodeRadius, isLegend) {\n const nodeGroup = nodesDataBinding.enter()\n .append('g')\n .attr('id', 'node-group')\n .classed('legend', isLegend);\n\n createHexagon(nodeGroup, nodeRadius);\n nodesDataBinding.exit().remove();\n\n nodeGroup\n .append('text')\n .attr('class', 'icon-any node-icon');\n\n addHostnameToNodes(nodeGroup, nodeRadius, isLegend);\n}\n\nfunction addHostnameToNodes(nodeElements, nodeRadius, isLegend) {\n const nodeTextHost = nodeElements.append('g');\n\n if (isLegend) {\n nodeTextHost.append('foreignObject')\n .attr('y', nodeRadius)\n .attr('x', -nodeRadius)\n .attr('width', nodeRadius * 2)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host');\n } else {\n nodeTextHost\n .append('rect')\n .attr('class', 'id-host-background')\n .attr('rx', 6);\n\n nodeTextHost\n .append('text')\n .attr('y', nodeRadius + 10)\n .attr('class', 'id id-host')\n .style('text-anchor', 'middle');\n }\n}\n\nexport function updateNodes(nodes) {\n updateNodesIcon(nodes);\n updateNodesClasses(nodes);\n updateNodesHostnameText(nodes);\n}\n\nfunction updateNodesClasses(nodes) {\n nodes\n .select('.node.member')\n .classed('leader', (node) => node.nodeState === NodeState.LEADER)\n .classed('follower', (node) => node.nodeState === NodeState.FOLLOWER)\n .classed('candidate', (node) => node.nodeState === NodeState.CANDIDATE)\n .classed('other', (node) => {\n return node.nodeState !== NodeState.LEADER &&\n node.nodeState !== NodeState.FOLLOWER &&\n node.nodeState !== NodeState.CANDIDATE;\n });\n}\n\nfunction updateNodesIcon(nodes) {\n nodes\n .select('.icon-any.node-icon')\n .text(getNodeIconType);\n}\n\nfunction getNodeIconType(node) {\n if (node.nodeState === NodeState.LEADER) {\n return '\\ue935';\n } else if (node.nodeState === NodeState.FOLLOWER) {\n return '\\ue963';\n } else if (node.nodeState === NodeState.CANDIDATE) {\n return '\\ue914';\n } else if (node.nodeState === NodeState.NO_CONNECTION) {\n return '\\ue931';\n } else if (node.nodeState === NodeState.OUT_OF_SYNC) {\n return '\\ue920';\n } else if (node.nodeState === NodeState.READ_ONLY) {\n return '\\ue95c';\n } else if (node.nodeState === NodeState.RESTRICTED) {\n return '\\ue933';\n }\n return '';\n}\n\nfunction updateNodesHostnameText(nodes) {\n nodes\n .select('.id.id-host')\n .each(function (d) {\n d.labelNode = this;\n })\n .text(function (d) {\n return d.hostname;\n });\n\n // Add padding styling to text background. left/right +5. top/bottom +1\n nodes\n .select('.id-host-background')\n .attr('width', function (d) {\n return d3.select(d.labelNode).node().getBBox().width + 10;\n })\n .attr('height', function (d) {\n return d3.select(d.labelNode).node().getBBox().height + 2;\n })\n .attr('x', function (d) {\n return d3.select(d.labelNode).node().getBBox().x - 5;\n })\n .attr('y', function (d) {\n return d3.select(d.labelNode).node().getBBox().y - 1;\n })\n .attr('fill', '#EEEEEE');\n}\n\nexport function createLinks(linksDataBinding) {\n linksDataBinding.enter()\n .append('path')\n .classed('link', true);\n\n linksDataBinding.exit().remove();\n}\n\nexport function updateLinks(linksDataBinding, nodes) {\n linksDataBinding\n .attr('stroke', setLinkColor)\n .style('stroke-dasharray', setLinkStyle)\n .attr('d', (link) => getLinkCoordinates(link, nodes));\n}\n\nexport function setLinkColor(link) {\n if (link.status === LinkState.IN_SYNC || link.status === LinkState.SYNCING) {\n return clusterColors.ontoGreen;\n } else if (link.status === LinkState.OUT_OF_SYNC) {\n return clusterColors.ontoGrey;\n }\n return 'none';\n}\n\nexport function setLinkStyle(link) {\n if (link.status === LinkState.OUT_OF_SYNC || link.status === LinkState.SYNCING) {\n return '10 10';\n }\n return 'none';\n}\n\nfunction getLinkCoordinates(link, nodes) {\n const source = nodes.find((node) => node.address === link.source);\n const target = nodes.find((node) => node.address === link.target);\n\n const deltaX = target.x - source.x;\n const deltaY = target.y - source.y;\n const dist = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const normX = deltaX / dist;\n const normY = deltaY / dist;\n\n // Padding from node center point\n const sourcePadding = 55;\n const targetPadding = 55;\n const sourceX = source.x + (sourcePadding * normX);\n const sourceY = source.y + (sourcePadding * normY);\n const targetX = target.x - (targetPadding * normX);\n const targetY = target.y - (targetPadding * normY);\n return 'M' + sourceX + ',' + sourceY + 'L' + targetX + ',' + targetY;\n}\n\nexport function positionNodesOnClusterZone(nodes, clusterZoneX, clusterZoneY, clusterZoneRadius) {\n nodes\n .attr('transform', (node, index) => {\n // Calculate initial positions for the new nodes based on\n // spreading them evenly on a circle around the center of the page.\n const theta = 2 * Math.PI * index / nodes[0].length;\n var x = clusterZoneX + Math.cos(theta) * clusterZoneRadius;\n var y = clusterZoneY + Math.sin(theta) * clusterZoneRadius;\n node.x = x;\n node.y = y;\n return `translate(${x}, ${y})`;\n });\n}\n\nfunction createHexagon(nodeGroup, radius) {\n const _s32 = (Math.sqrt(3) / 2);\n const xDiff = 0;\n const yDiff = 0;\n const points = [[radius + xDiff, yDiff], [radius / 2 + xDiff, radius * _s32 + yDiff], [-radius / 2 + xDiff, radius * _s32 + yDiff],\n [-radius + xDiff, yDiff],\n [-radius / 2 + xDiff, -radius * _s32 + yDiff], [radius / 2 + xDiff, -radius * _s32 + yDiff], [radius + xDiff, yDiff],\n [radius / 2 + xDiff, radius * _s32 + yDiff]];\n return nodeGroup\n .selectAll(\"path.area\")\n .data([points])\n .enter()\n .append(\"path\")\n .attr('class', 'node member')\n .attr(\"d\", d3.svg.line());\n}\n","import 'angular/utils/local-storage-adapter';\nimport * as CDS from \"./cluster-drawing.service\";\nimport {LinkState, NodeState} from \"./controllers\";\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\n\n\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\n\nconst nodeRadius = 50;\nconst legendNodeRadius = 25;\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives', [\n 'graphdb.framework.utils.localstorageadapter'\n]);\n\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\"\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state'\n};\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$rootScope',\n function ($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $rootScope) {\n return {\n restrict: 'A',\n link: function (scope, element) {\n scope.showLegend = false;\n $rootScope.$on('$translateChangeSuccess', function () {\n updateTranslations();\n updateLabels();\n });\n scope.$on(\"$destroy\", function () {\n legendTooltip.destroy();\n });\n function updateTranslations() {\n Object.keys(translationsMap).forEach((key) => {\n translationsMap[key] = $translate.instant('cluster_management.cluster_graphical_view.' + key);\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 600);\n }\n\n let legendNodesGroup;\n let legendWidth;\n let legendHeight;\n const legendPadding = 10;\n\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n scope.width = function () {\n return width;\n };\n\n scope.height = function () {\n return height;\n };\n\n // SVG components\n let svg;\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n if (legendNodesGroup) {\n legendNodesGroup.remove();\n }\n createLegendGroup();\n createClusterLegend();\n }\n\n function translateLegendLinksAndNodes(legendNodes, legendLinks) {\n legendNodes.forEach((node) => {\n node.toolTip = node.hostname = translationsMap[node.customText];\n });\n legendLinks.forEach((link) => {\n link.toolTip = link.linkTypeText = translationsMap[link.linkTypeKey];\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function initialize() {\n updateTranslations();\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n createClusterLegend();\n plot();\n }\n\n function createClusterZone(hasCluster) {\n svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n svg.call(legendTooltip);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n createLegendGroup();\n }\n\n function createLegendGroup() {\n legendNodesGroup = svg.append('g').attr('id', 'legend-group')\n .classed('hidden', !scope.showLegend)\n .classed('legend-group', true);\n }\n\n let tooltipElement;\n const legendTooltip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function () {\n const bbox = tooltipElement.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;\n\n return {\n left: bbox.left + scrollLeft + 'px',\n top: (bbox.top - 30) + scrollTop + 'px'\n };\n })\n .html(function (d) {\n return d.toolTip;\n });\n\n // Shows tooltip with legend node or link state\n const showLegendTooltip = function (d, element) {\n tooltipElement = element;\n legendTooltip.show(d, tooltipElement);\n };\n\n // Hides the tooltip with legend node or link state\n const hideLegendTooltip = function () {\n tooltipElement = null;\n legendTooltip.hide();\n };\n\n function createClusterLegend() {\n const nodeLinkStateTextHeight = 14;\n\n const nodeStateLabelY = legendPadding + nodeLinkStateTextHeight;\n const linkStateLabelY = nodeStateLabelY + legendPadding * 3 + legendNodeRadius * 5;\n\n const legendColumns = 4;\n const nodesXPadding = 15;\n const nodesYPadding = 15;\n\n const legendNodes = getLegendNodes();\n const legendLinks = getLegendLinks();\n translateLegendLinksAndNodes(legendNodes, legendLinks);\n\n legendNodesGroup.append('rect')\n .attr('id', 'legend-background')\n .attr('class', 'legend-background')\n .attr('fill', '#EEEEEE');\n\n const nodeStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'node_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', nodeStateLabelY)\n .text(getLabelFor('node_state'));\n\n const linkStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'link_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', linkStateLabelY)\n .text(getLabelFor('link_state'));\n\n const legendNodeData = legendNodesGroup.selectAll('#node-group').data(legendNodes);\n CDS.createNodes(legendNodeData, legendNodeRadius, true);\n CDS.updateNodes(legendNodeData);\n\n legendNodeData.select('.node.member')\n .on(\"mouseover\", function (d) {\n d3.event.stopPropagation();\n showLegendTooltip(d, this);\n })\n .on('mouseout', hideLegendTooltip);\n\n legendNodeData\n .attr('transform', function (d) {\n const row = Math.floor(d.id / legendColumns);\n const column = d.id % legendColumns;\n const x = legendPadding + legendNodeRadius + (nodesXPadding + legendNodeRadius * 2) * column;\n const y = legendPadding * 2 + nodeLinkStateTextHeight + legendNodeRadius + (nodesYPadding + legendNodeRadius\n * 2) * row;\n return `translate(${x}, ${y})`;\n });\n\n legendNodesGroup\n .call(function () {\n legendWidth = this.node().getBBox().width;\n });\n\n // Position node/link state labels\n nodeStateLabel.attr('x', legendPadding + legendWidth / 2);\n linkStateLabel.attr('x', legendPadding + legendWidth / 2);\n\n\n const linkWidth = legendWidth / 3;\n\n const linksGroup = legendNodesGroup.append('g').attr('id', 'links-group');\n const linksGroupY = linkStateLabelY + legendPadding;\n linksGroup.attr('transform', `translate(${legendPadding}, ${linksGroupY})`);\n\n legendLinks.forEach((link, index) => {\n const linkPadding = 5;\n const startX = linkPadding;\n const endX = linkWidth - linkPadding;\n\n const linkG = linksGroup\n .append('g')\n .classed('link', true)\n .classed('legend', true)\n .attr('transform', () => {\n const x = index * linkWidth;\n return `translate(${x}, 0)`;\n });\n\n linkG\n .append('path')\n .classed('link', true)\n .attr('stroke-dasharray', () => CDS.setLinkStyle(link))\n .attr('stroke', () => CDS.setLinkColor(link))\n .attr('d', () => {\n return `M${startX},0,${endX},0`;\n });\n\n linkG.append('foreignObject')\n .attr('y', 10)\n .attr('x', 5)\n .attr('width', linkWidth - 10)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host')\n .style(\"font-size\", \"9px\")\n .html(link.linkTypeText);\n\n linkG\n .on('mouseover', function () {\n d3.event.stopPropagation();\n showLegendTooltip(link, this);\n })\n .on('mouseout', hideLegendTooltip);\n });\n\n\n legendNodesGroup\n .call(function (d) {\n legendHeight = this.node().getBBox().height;\n legendWidth = this.node().getBBox().width;\n });\n\n legendNodesGroup.select('.legend-background')\n .attr('height', legendHeight + legendPadding * 4)\n .attr('width', legendWidth + legendPadding * 2)\n .attr('rx', '6');\n\n positionLegend();\n }\n\n function positionLegend() {\n const y = height - (legendHeight + legendPadding * 3 + 50);\n CDS.moveElement(legendNodesGroup, 0, y);\n }\n\n function createNodes(nodes) {\n nodes.forEach((node) => node.hostname = UriUtils.shortenIri(node.endpoint));\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n nodeData\n .on('click', (d) => {\n scope.childContext.selectNode(d);\n\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (d3.event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", d3.event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - d3.event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (d3.event.pageY - 28) + \"px\");\n });\n CDS.createNodes(nodeData, nodeRadius);\n CDS.updateNodes(nodeData);\n CDS.positionNodesOnClusterZone(nodeData, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n }\n\n // Properties and functions that can be used by parent\n scope.childContext.redraw = plot;\n scope.childContext.resize = function () {\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n positionLegend();\n };\n scope.childContext.toggleLegend = () => {\n scope.showLegend = !scope.showLegend;\n legendNodesGroup.classed('hidden', !scope.showLegend);\n };\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap);\n let mouseupCallback;\n if (!hasCluster) {\n mouseupCallback = () => {\n scope.$apply(function () {\n scope.showCreateClusterDialog();\n });\n };\n }\n clusterZone\n .on('mouseup', mouseupCallback);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = _.cloneDeep(scope.clusterModel.nodes) || [];\n const links = _.cloneDeep(scope.clusterModel.links) || [];\n createNodes(nodes);\n drawLinks(links, nodes);\n }\n\n initialize();\n }\n };\n }\n]);\n\n\nconst getLegendNodes = function () {\n const legendNodes = [];\n legendNodes.push({nodeState: NodeState.LEADER, customText: 'node_state_leader'});\n legendNodes.push({nodeState: NodeState.FOLLOWER, customText: 'node_state_follower'});\n legendNodes.push({nodeState: NodeState.CANDIDATE, customText: 'node_state_candidate'});\n legendNodes.push({nodeState: NodeState.NO_CLUSTER, customText: 'node_state_no_cluster'});\n legendNodes.push({nodeState: NodeState.OUT_OF_SYNC, customText: 'node_state_out_of_sync'});\n legendNodes.push({nodeState: NodeState.NO_CONNECTION, customText: 'node_state_no_connection'});\n legendNodes.push({nodeState: NodeState.READ_ONLY, customText: 'node_state_read_only'});\n legendNodes.push({nodeState: NodeState.RESTRICTED, customText: 'node_state_restricted'});\n legendNodes.forEach((node, index) => node.id = index);\n return legendNodes;\n};\n\nconst getLegendLinks = function () {\n const links = [];\n links.push({status: LinkState.IN_SYNC, linkTypeKey: 'link_state_in_sync'});\n links.push({status: LinkState.SYNCING, linkTypeKey: 'link_state_syncing'});\n links.push({status: LinkState.OUT_OF_SYNC, linkTypeKey: 'link_state_out_of_sync'});\n links.forEach((link, index) => link.id = index);\n return links;\n};\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[24,61,97,98],{141:function(e,a,n){"use strict";n.r(a);n(4),n(11),n(10),n(94),n(95),n(44),n(267);angular.module("graphdb.framework.namespaces",["LocalStorageModule","xeditable","ngAnimate","ngRoute","toastr","graphdb.framework.namespaces.controllers","graphdb.framework.namespaces.directives","graphdb.framework.core.services.repositories","graphdb.framework.core.directives","graphdb.framework.core.directives.paginations"]).run(["editableOptions",function(e){e.theme="bs3"}])},44:function(e,a){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",(function(){return{template:'<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true"></uib-pagination>'}}))},94:function(e,a,n){"use strict";n.r(a);n(4),n(12),n(10),n(15);const s=angular.module("graphdb.framework.namespaces.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.framework.rest.repositories.service","graphdb.framework.rest.rdf4j.repositories.service","toastr"]),t=function(){const e="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]",a="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|_|-|[0-9]|·|[̀-ͯ]|[‿-⁀]";return new RegExp("^(?:"+e+")(?:(?:"+a+"|\\.)*(?:"+a+"))?$")}();s.controller("NamespacesCtrl",["$scope","$http","$repositories","toastr","$uibModal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate",function(e,a,n,s,c,r,i,o,p){function l(a,t){let c;c="object"==typeof a?a.prefix:a,o.deleteNamespacePrefix(n.getActiveRepository(),c).success((function(){t&&t.length>0?l(a=t.shift(),t):(e.selectedAll=!1,e.namespace={},e.getNamespaces(),e.searchNamespaces="",e.haveSelected=!1,e.loader=!1,e.displayedNamespaces=[],void 0===t?s.success(p.instant("namespace.prefix.deleted.successfully",{prefix:c}),""):s.success(p.instant("namespace.selected.namespaces.deleted.successfully"),""))})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e,a){return function(e){return""===e||e.match(t)}(e)?!angular.isUndefined(a)&&""!==a||(s.error(p.instant("namespace.warning.provide.namespace"),p.instant("common.error")),!1):(s.error(p.instant("namespace.invalid.prefix",{prefix:e},p.instant("common.error"))),!1)}e.namespaces={},e.namespace={},e.loader=!1,e.haveSelected=!1,e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.displayedNamespaces=[],e.getNamespaces=function(){n.getActiveRepository()&&(e.loader=!0,e.namespaces={},o.getNamespaces(n.getActiveRepository()).success((function(a){e.namespaces=a.results.bindings.map((function(e){return{prefix:e.prefix.value,namespace:e.namespace.value}})),e.namespaces.length>0&&(e.namespaces.sort((function(e,a){const n=e.prefix.toUpperCase(),s=a.prefix.toUpperCase();return n<s?-1:n>s?1:0})),e.matchedElements=e.namespaces,e.changePagination()),0===e.namespaces.length&&(e.loader=!1)})).error((function(a){const n=getError(a);s.error(n),e.loader=!1})))},e.changePagination=function(){angular.isDefined(e.namespaces)&&(e.displayedNamespaces=e.namespaces.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){$(".ot-graph-page-size").removeClass("active"),e.page=1,e.searchNamespaces="",a&&(e.getNamespaces(),e.pageSize=a)},e.$watch("matchedElements",(function(){angular.isDefined(e.matchedElements)&&(e.displayedNamespaces=e.matchedElements.slice(e.pageSize*(e.page-1),e.pageSize*e.page))})),e.$watch((function(){return n.getActiveRepository()}),(function(){e.searchNamespaces="",e.getNamespaces(),e.selectedAll=!1})),e.onNamespaceSearch=function(){e.haveSelected=!1,e.selectedAll=!1,e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.namespaces,(function(a){-1===a.namespace.indexOf(e.searchNamespaces)&&-1===a.prefix.indexOf(e.searchNamespaces)||e.matchedElements.push(a)}))},e.saveNamespace=function(a,t){return e.loader=!0,o.updateNamespacePrefix(n.getActiveRepository(),t,a).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.editPrefix=function(a,t){e.loader=!0,i.getPrefix(n.getActiveRepository(),{from:a,to:t,location:n.getActiveRepositoryObject().location}).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.confirmReplace=function(e,a){r.openSimpleModal({title:p.instant("namespace.confirm.replace"),message:p.instant("namespace.already.exists.msg"),warning:!0}).result.then(e,a)},e.editPrefixAndNamespace=function(a,n,s){if(angular.isUndefined(a)&&(a=""),!m(a,n))return"";let t=!1;const c=s.prefix;angular.forEach(e.namespaces,(function(e){e.prefix===a&&c!==a&&(t=!0)})),t?e.confirmReplace((function(){e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))}),(function(){e.getNamespaces()})):angular.isDefined(t)&&e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))},e.addNamespace=function(){if(angular.isUndefined(e.namespace.prefix)&&(e.namespace.prefix=""),!m(e.namespace.prefix,e.namespace.namespace))return;e.selectedAll=!1;let a=!1;for(let n=0;n<e.namespaces.length;n++)e.namespaces[n].prefix===e.namespace.prefix&&(a=!0);a?e.confirmReplace((function(){e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={}})):(e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={})},e.removeNamespace=function(e){r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.msg",{prefix:e.prefix}),warning:!0}).result.then((function(){l(e)}))},e.checkAll=function(){angular.forEach(e.displayedNamespaces,(function(a){a.selected=e.selectedAll}))},e.deleteSelected=function(){let a=!1;angular.forEach(e.displayedNamespaces,(function(n){a||n.selected&&(a=!0,r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.selected"),warning:!0}).result.then((function(){e.loader=!0;const a=[];angular.forEach(e.displayedNamespaces,(function(e){e.selected&&a.push(e)})),l(a.shift(),a),e.selectedAll=!1}),(function(){e.getNamespaces(),e.selectedAll=!1,e.searchNamespaces=""})))}))},e.checkIfSelectedNamespace=function(){e.haveSelected=!1,angular.forEach(e.namespaces,(function(a){a.selected&&(e.haveSelected=!0)}))},e.deselectAll=function(){angular.forEach(e.namespaces,(function(e){e.selected=!1}))}}]),s.controller("StandartModalCtrl",["$scope","$uibModalInstance",function(e,a){e.ok=function(){a.close(!0)},e.cancel=function(){a.dismiss("cancel")}}])},95:function(e,a){angular.module("graphdb.framework.namespaces.directives",["ngRoute"]).directive("loaderPostRepeatDirective",["$timeout",function(e){return function(a){a.$last&&e((function(){a.$parent.loader=!1}),0)}}])}}]);
2
- //# sourceMappingURL=24.04d84edbd8f93d036633.bundle.js.map
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[24,61,97,98],{141:function(e,a,n){"use strict";n.r(a);n(4),n(11),n(10),n(95),n(96),n(44),n(267);angular.module("graphdb.framework.namespaces",["LocalStorageModule","xeditable","ngAnimate","ngRoute","toastr","graphdb.framework.namespaces.controllers","graphdb.framework.namespaces.directives","graphdb.framework.core.services.repositories","graphdb.framework.core.directives","graphdb.framework.core.directives.paginations"]).run(["editableOptions",function(e){e.theme="bs3"}])},44:function(e,a){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",(function(){return{template:'<uib-pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true"></uib-pagination>'}}))},95:function(e,a,n){"use strict";n.r(a);n(4),n(12),n(10),n(15);const s=angular.module("graphdb.framework.namespaces.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.framework.rest.repositories.service","graphdb.framework.rest.rdf4j.repositories.service","toastr"]),t=function(){const e="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]",a="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|_|-|[0-9]|·|[̀-ͯ]|[‿-⁀]";return new RegExp("^(?:"+e+")(?:(?:"+a+"|\\.)*(?:"+a+"))?$")}();s.controller("NamespacesCtrl",["$scope","$http","$repositories","toastr","$uibModal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate",function(e,a,n,s,c,r,i,o,p){function l(a,t){let c;c="object"==typeof a?a.prefix:a,o.deleteNamespacePrefix(n.getActiveRepository(),c).success((function(){t&&t.length>0?l(a=t.shift(),t):(e.selectedAll=!1,e.namespace={},e.getNamespaces(),e.searchNamespaces="",e.haveSelected=!1,e.loader=!1,e.displayedNamespaces=[],void 0===t?s.success(p.instant("namespace.prefix.deleted.successfully",{prefix:c}),""):s.success(p.instant("namespace.selected.namespaces.deleted.successfully"),""))})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e,a){return function(e){return""===e||e.match(t)}(e)?!angular.isUndefined(a)&&""!==a||(s.error(p.instant("namespace.warning.provide.namespace"),p.instant("common.error")),!1):(s.error(p.instant("namespace.invalid.prefix",{prefix:e},p.instant("common.error"))),!1)}e.namespaces={},e.namespace={},e.loader=!1,e.haveSelected=!1,e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.displayedNamespaces=[],e.getNamespaces=function(){n.getActiveRepository()&&(e.loader=!0,e.namespaces={},o.getNamespaces(n.getActiveRepository()).success((function(a){e.namespaces=a.results.bindings.map((function(e){return{prefix:e.prefix.value,namespace:e.namespace.value}})),e.namespaces.length>0&&(e.namespaces.sort((function(e,a){const n=e.prefix.toUpperCase(),s=a.prefix.toUpperCase();return n<s?-1:n>s?1:0})),e.matchedElements=e.namespaces,e.changePagination()),0===e.namespaces.length&&(e.loader=!1)})).error((function(a){const n=getError(a);s.error(n),e.loader=!1})))},e.changePagination=function(){angular.isDefined(e.namespaces)&&(e.displayedNamespaces=e.namespaces.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){$(".ot-graph-page-size").removeClass("active"),e.page=1,e.searchNamespaces="",a&&(e.getNamespaces(),e.pageSize=a)},e.$watch("matchedElements",(function(){angular.isDefined(e.matchedElements)&&(e.displayedNamespaces=e.matchedElements.slice(e.pageSize*(e.page-1),e.pageSize*e.page))})),e.$watch((function(){return n.getActiveRepository()}),(function(){e.searchNamespaces="",e.getNamespaces(),e.selectedAll=!1})),e.onNamespaceSearch=function(){e.haveSelected=!1,e.selectedAll=!1,e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.namespaces,(function(a){-1===a.namespace.indexOf(e.searchNamespaces)&&-1===a.prefix.indexOf(e.searchNamespaces)||e.matchedElements.push(a)}))},e.saveNamespace=function(a,t){return e.loader=!0,o.updateNamespacePrefix(n.getActiveRepository(),t,a).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.editPrefix=function(a,t){e.loader=!0,i.getPrefix(n.getActiveRepository(),{from:a,to:t,location:n.getActiveRepositoryObject().location}).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.confirmReplace=function(e,a){r.openSimpleModal({title:p.instant("namespace.confirm.replace"),message:p.instant("namespace.already.exists.msg"),warning:!0}).result.then(e,a)},e.editPrefixAndNamespace=function(a,n,s){if(angular.isUndefined(a)&&(a=""),!m(a,n))return"";let t=!1;const c=s.prefix;angular.forEach(e.namespaces,(function(e){e.prefix===a&&c!==a&&(t=!0)})),t?e.confirmReplace((function(){e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))}),(function(){e.getNamespaces()})):angular.isDefined(t)&&e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))},e.addNamespace=function(){if(angular.isUndefined(e.namespace.prefix)&&(e.namespace.prefix=""),!m(e.namespace.prefix,e.namespace.namespace))return;e.selectedAll=!1;let a=!1;for(let n=0;n<e.namespaces.length;n++)e.namespaces[n].prefix===e.namespace.prefix&&(a=!0);a?e.confirmReplace((function(){e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={}})):(e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={})},e.removeNamespace=function(e){r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.msg",{prefix:e.prefix}),warning:!0}).result.then((function(){l(e)}))},e.checkAll=function(){angular.forEach(e.displayedNamespaces,(function(a){a.selected=e.selectedAll}))},e.deleteSelected=function(){let a=!1;angular.forEach(e.displayedNamespaces,(function(n){a||n.selected&&(a=!0,r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.selected"),warning:!0}).result.then((function(){e.loader=!0;const a=[];angular.forEach(e.displayedNamespaces,(function(e){e.selected&&a.push(e)})),l(a.shift(),a),e.selectedAll=!1}),(function(){e.getNamespaces(),e.selectedAll=!1,e.searchNamespaces=""})))}))},e.checkIfSelectedNamespace=function(){e.haveSelected=!1,angular.forEach(e.namespaces,(function(a){a.selected&&(e.haveSelected=!0)}))},e.deselectAll=function(){angular.forEach(e.namespaces,(function(e){e.selected=!1}))}}]),s.controller("StandartModalCtrl",["$scope","$uibModalInstance",function(e,a){e.ok=function(){a.close(!0)},e.cancel=function(){a.dismiss("cancel")}}])},96:function(e,a){angular.module("graphdb.framework.namespaces.directives",["ngRoute"]).directive("loaderPostRepeatDirective",["$timeout",function(e){return function(a){a.$last&&e((function(){a.$parent.loader=!1}),0)}}])}}]);
2
+ //# sourceMappingURL=24.63acd0fc451fc797ff79.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/namespaces/app.js","webpack:///./src/js/angular/core/directives/paginations.js","webpack:///./src/js/angular/namespaces/controllers.js","webpack:///./src/js/angular/namespaces/directives.js"],"names":["angular","module","run","editableOptions","theme","directive","template","namespaces","pnPrefixRe","pnCharsBase","pnChars","pnCharsU","RegExp","controller","$scope","$http","$repositories","toastr","$uibModal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate","deleteNamespace","namespace","prefix","deleteNamespacePrefix","getActiveRepository","success","length","shift","selectedAll","getNamespaces","searchNamespaces","haveSelected","loader","displayedNamespaces","undefined","instant","error","data","msg","getError","validatePrefixAndNamespace","match","validatePrefix","isUndefined","pageSizeOptions","page","pageSize","results","bindings","map","e","value","sort","a","b","prefixA","toUpperCase","prefixB","matchedElements","changePagination","isDefined","slice","changePageSize","size","$","removeClass","$watch","onNamespaceSearch","deselectAll","filterResults","forEach","item","indexOf","push","saveNamespace","updateNamespacePrefix","editPrefix","oldPrefix","newPrefix","getPrefix","from","to","location","getActiveRepositoryObject","confirmReplace","okCallback","cancelCallback","openSimpleModal","title","message","warning","result","then","editPrefixAndNamespace","namespaceObject","prefixExist","elem","addNamespace","i","removeNamespace","checkAll","selected","deleteSelected","modalInstanceOpened","checkIfSelectedNamespace","$uibModalInstance","ok","close","cancel","dismiss","$timeout","scope","$last","$parent"],"mappings":"oGAAA,iDAqBsBA,QAAQC,OAAO,+BAbrB,CACZ,qBACA,YACA,YACA,UACA,SACA,2CACA,0CACA,+CACA,oCACA,kDAKUC,IAAI,CAAC,kBAAmB,SAAUC,GAC5CA,EAAgBC,MAAQ,U,iBCxB5BJ,QAAQC,OAAO,gDAAiD,IAC3DI,UAAU,eAAe,WACtB,MAAO,CACHC,SAAU,yP,gCCHtB,8BAKA,MASMC,EAAaP,QAAQC,OAAO,2CATlB,CACZ,eACA,+CACA,0CACA,8CACA,oDACA,WAOEO,EAAa,WACf,MAAMC,EAAc,gFAIdC,EAAUC,wGAEhB,OAAO,IAAIC,OAAO,OAASH,EAAc,UAAYC,EAAU,YAAcA,EAAU,QAPxE,GAcnBH,EAAWM,WAAW,iBAAkB,CAAC,SAAU,QAAS,gBAAiB,SAAU,YAAa,eAAgB,0BAA2B,+BAAgC,aAC3K,SAAUC,EAAQC,EAAOC,EAAeC,EAAQC,EAAWC,EAAcC,EAAyBC,EAA8BC,GAoP5H,SAASC,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BAAqB,SAAUsC,GAClDA,EAAK8B,SAAW1F,EAAOiB,gBAI/BjB,EAAO2F,eAAiB,WAuBpB,IAAIC,GAAsB,EAC1B1G,QAAQyE,QAAQ3D,EAAOsB,qBAAqB,SAAUZ,GAC7CkF,GACGlF,EAAUgF,WACVE,GAAsB,EAzB9BvF,EAAauE,gBAAgB,CACzBC,MAAOrE,EAAWgB,QAAQ,yBAC1BsD,QAAStE,EAAWgB,QAAQ,qCAC5BuD,SAAS,IACVC,OAAOC,MAAK,WACXjF,EAAOqB,QAAS,EAChB,MAAM5B,EAAa,GACnBP,QAAQyE,QAAQ3D,EAAOsB,qBAAqB,SAAUZ,GAC9CA,EAAUgF,UACVjG,EAAWqE,KAAKpD,MAGxBD,EAAgBhB,EAAWuB,QAASvB,GACpCO,EAAOiB,aAAc,KACtB,WACCjB,EAAOkB,gBACPlB,EAAOiB,aAAc,EACrBjB,EAAOmB,iBAAmB,WAgDtCnB,EAAO6F,yBAA2B,WAC9B7F,EAAOoB,cAAe,EACtBlC,QAAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACrCA,EAAK8B,WACL1F,EAAOoB,cAAe,OAKlCpB,EAAOyD,YAAc,WACjBvE,QAAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACzCA,EAAK8B,UAAW,SAmBhCjG,EAAWM,WAAW,oBAAqB,CAAC,SAAU,oBAAqB,SAAUC,EAAQ8F,GAEzF9F,EAAO+F,GAAK,WAERD,EAAkBE,OADH,IAInBhG,EAAOiG,OAAS,WACZH,EAAkBI,QAAQ,e,iBC5VLhH,QAAQC,OAAO,0CAA2C,CAAC,YAGnEI,UAAU,4BAA6B,CAAC,WAAY,SAAU4G,GAC/E,OAAO,SAAUC,GACTA,EAAMC,OAKNF,GAAS,WACLC,EAAME,QAAQjF,QAAS,IACxB","file":"24.04d84edbd8f93d036633.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/services/repositories.service';\nimport 'angular/namespaces/controllers';\nimport 'angular/namespaces/directives';\nimport 'angular/core/directives/paginations';\nimport 'angular-xeditable/dist/js/xeditable.min';\n\nconst modules = [\n 'LocalStorageModule',\n 'xeditable',\n 'ngAnimate',\n 'ngRoute',\n 'toastr',\n 'graphdb.framework.namespaces.controllers',\n 'graphdb.framework.namespaces.directives',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.core.directives.paginations'\n];\n\nconst namespacesApp = angular.module('graphdb.framework.namespaces', modules);\n\nnamespacesApp.run(['editableOptions', function (editableOptions) {\n editableOptions.theme = 'bs3';\n}]);\n","angular.module('graphdb.framework.core.directives.paginations', [])\n .directive('paginations', function () {\n return {\n template: '<uib-pagination class=\"nav navbar-right\" total-items=\"matchedElements.length\" items-per-page=\"pageSize\" ng-model=\"page\" ng-change=\"changePagination()\" direction-links=\"false\" boundary-links=\"true\" max-size=\"5\" rotate=\"true\"></uib-pagination>',\n };\n });\n","import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/rdf4j.repositories.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.services.jwtauth',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'toastr'\n];\n\nconst namespaces = angular.module('graphdb.framework.namespaces.controllers', modules);\n\n// A regular expression that validates a prefix according to the SPARQL 1.1 specification.\n// XXX: Technically this should include Unicode chars > 0xFFFF but those aren't fully supported in JavaScript\nconst pnPrefixRe = function () {\n const pnCharsBase = '[A-Z]|[a-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]'\n + '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]'\n + '|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\n const pnCharsU = pnCharsBase + '|_';\n const pnChars = pnCharsU + '|-|[0-9]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\n\n return new RegExp('^(?:' + pnCharsBase + ')(?:(?:' + pnChars + '|\\\\.)*(?:' + pnChars + '))?$');\n}();\n\nfunction validatePrefix(prefix) {\n return prefix === '' || prefix.match(pnPrefixRe);\n}\n\nnamespaces.controller('NamespacesCtrl', ['$scope', '$http', '$repositories', 'toastr', '$uibModal', 'ModalService', 'RepositoriesRestService', 'RDF4JRepositoriesRestService', '$translate',\n function ($scope, $http, $repositories, toastr, $uibModal, ModalService, RepositoriesRestService, RDF4JRepositoriesRestService, $translate) {\n $scope.namespaces = {};\n $scope.namespace = {};\n $scope.loader = false;\n $scope.haveSelected = false;\n $scope.pageSizeOptions = [10, 20, 50, 100];\n $scope.page = 1;\n $scope.pageSize = $scope.pageSizeOptions[0];\n $scope.displayedNamespaces = [];\n\n $scope.getNamespaces = function () {\n if (!$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.loader = true;\n $scope.namespaces = {};\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n namespace: e.namespace.value\n };\n });\n if ($scope.namespaces.length > 0) {\n $scope.namespaces.sort(function (a, b) {\n const prefixA = a.prefix.toUpperCase(); // ignore upper and lowercase\n const prefixB = b.prefix.toUpperCase(); // ignore upper and lowercase\n if (prefixA < prefixB) {\n return -1;\n }\n if (prefixA > prefixB) {\n return 1;\n }\n return 0;\n });\n $scope.matchedElements = $scope.namespaces;\n $scope.changePagination();\n }\n if ($scope.namespaces.length === 0) {\n // Remove the loader ourselves\n $scope.loader = false;\n } // else let the loaderPostRepeatDirective do it\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg);\n $scope.loader = false;\n });\n };\n\n $scope.changePagination = function () {\n if (angular.isDefined($scope.namespaces)) {\n $scope.displayedNamespaces = $scope.namespaces.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n };\n\n $scope.changePageSize = function (size) {\n $('.ot-graph-page-size').removeClass('active');\n $scope.page = 1;\n $scope.searchNamespaces = '';\n if (size) {\n $scope.getNamespaces();\n $scope.pageSize = size;\n }\n };\n\n $scope.$watch('matchedElements', function () {\n if (angular.isDefined($scope.matchedElements)) {\n $scope.displayedNamespaces = $scope.matchedElements.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n });\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.searchNamespaces = '';\n $scope.getNamespaces();\n $scope.selectedAll = false;\n });\n\n $scope.onNamespaceSearch = function() {\n $scope.haveSelected = false;\n $scope.selectedAll = false;\n $scope.matchedElements = [];\n $scope.deselectAll();\n $scope.filterResults();\n };\n\n $scope.filterResults = function() {\n angular.forEach($scope.namespaces, function (item) {\n if (item.namespace.indexOf($scope.searchNamespaces) !== -1 || item.prefix.indexOf($scope.searchNamespaces) !== -1) {\n $scope.matchedElements.push(item);\n }\n });\n };\n\n $scope.saveNamespace = function (prefix, namespace) {\n $scope.loader = true;\n return RDF4JRepositoriesRestService.updateNamespacePrefix($repositories.getActiveRepository(), namespace, prefix)\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editPrefix = function (oldPrefix, newPrefix) {\n $scope.loader = true;\n RepositoriesRestService.getPrefix($repositories.getActiveRepository(), {\n from: oldPrefix, to: newPrefix, location: $repositories.getActiveRepositoryObject().location})\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.confirmReplace = function (okCallback, cancelCallback) {\n ModalService.openSimpleModal({\n title: $translate.instant('namespace.confirm.replace'),\n message: $translate.instant('namespace.already.exists.msg'),\n warning: true\n }).result.then(okCallback, cancelCallback);\n };\n\n $scope.editPrefixAndNamespace = function (prefix, namespace, namespaceObject) {\n if (angular.isUndefined(prefix)) {\n prefix = '';\n }\n\n if (!validatePrefixAndNamespace(prefix, namespace)) {\n return '';\n }\n\n let prefixExist = false;\n const oldPrefix = namespaceObject.prefix;\n angular.forEach($scope.namespaces, function (elem) {\n if (elem.prefix === prefix && oldPrefix !== prefix) {\n prefixExist = true;\n }\n });\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }, function () {\n $scope.getNamespaces();\n });\n } else if (angular.isDefined(prefixExist)) {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }\n };\n\n $scope.addNamespace = function () {\n if (angular.isUndefined($scope.namespace.prefix)) {\n $scope.namespace.prefix = '';\n }\n\n if (!validatePrefixAndNamespace($scope.namespace.prefix, $scope.namespace.namespace)) {\n return;\n }\n\n $scope.selectedAll = false;\n let prefixExist = false;\n for (let i = 0; i < $scope.namespaces.length; i++) {\n if ($scope.namespaces[i].prefix === $scope.namespace.prefix) {\n prefixExist = true;\n }\n }\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n });\n } else {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n }\n };\n\n $scope.removeNamespace = function (namespace) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.msg', {prefix: namespace.prefix}),\n warning: true\n }).result.then(function () {\n deleteNamespace(namespace);\n });\n };\n\n $scope.checkAll = function () {\n angular.forEach($scope.displayedNamespaces, function (item) {\n item.selected = $scope.selectedAll;\n });\n };\n\n $scope.deleteSelected = function () {\n const openModalInstance = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.selected'),\n warning: true\n }).result.then(function () {\n $scope.loader = true;\n const namespaces = [];\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (namespace.selected) {\n namespaces.push(namespace);\n }\n });\n deleteNamespace(namespaces.shift(), namespaces);\n $scope.selectedAll = false;\n }, function () {\n $scope.getNamespaces();\n $scope.selectedAll = false;\n $scope.searchNamespaces = '';\n });\n };\n\n let modalInstanceOpened = false;\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (!modalInstanceOpened) {\n if (namespace.selected) {\n modalInstanceOpened = true;\n openModalInstance();\n }\n }\n });\n };\n\n function deleteNamespace(namespace, namespaces) {\n let prefix;\n if (typeof namespace === 'object') {\n prefix = namespace.prefix;\n } else {\n prefix = namespace;\n }\n RDF4JRepositoriesRestService.deleteNamespacePrefix($repositories.getActiveRepository(), prefix)\n .success(function () {\n if (namespaces && namespaces.length > 0) {\n namespace = namespaces.shift();\n deleteNamespace(namespace, namespaces);\n } else {\n $scope.selectedAll = false;\n $scope.namespace = {};\n $scope.getNamespaces();\n $scope.searchNamespaces = '';\n $scope.haveSelected = false;\n $scope.loader = false;\n $scope.displayedNamespaces = [];\n if (namespaces === undefined) {\n toastr.success($translate.instant('namespace.prefix.deleted.successfully', {prefix: prefix}), '');\n } else {\n toastr.success($translate.instant('namespace.selected.namespaces.deleted.successfully'), '');\n }\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n $scope.checkIfSelectedNamespace = function () {\n $scope.haveSelected = false;\n angular.forEach($scope.namespaces, function (item) {\n if (item.selected) {\n $scope.haveSelected = true;\n }\n });\n };\n\n $scope.deselectAll = function () {\n angular.forEach($scope.namespaces, function (item) {\n item.selected = false;\n });\n };\n\n function validatePrefixAndNamespace(prefix, namespace) {\n if (!validatePrefix(prefix)) {\n toastr.error($translate.instant('namespace.invalid.prefix', {prefix: prefix}, $translate.instant('common.error')));\n return false;\n }\n\n if (angular.isUndefined(namespace) || namespace === '') {\n toastr.error($translate.instant('namespace.warning.provide.namespace'), $translate.instant('common.error'));\n return false;\n }\n\n return true;\n }\n }]);\n\nnamespaces.controller('StandartModalCtrl', ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {\n\n $scope.ok = function () {\n const result = true;\n $uibModalInstance.close(result);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}]);\n","const namespacesDirectives = angular.module('graphdb.framework.namespaces.directives', ['ngRoute']);\n\n// This directive will set the loader to false once the respective ngRepeat is done loading\nnamespacesDirectives.directive('loaderPostRepeatDirective', ['$timeout', function ($timeout) {\n return function (scope) {\n if (scope.$last) {\n // It's important to do this with timeout:\n // \"...since the setTimeout function gets pushed to the end of the queue of the browser,\n // its always right after everything is done in angular, usually ngRepeat which continues\n // after its parents postLinking function\"\n $timeout(function () {\n scope.$parent.loader = false;\n }, 0);\n }\n };\n}]);\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./src/js/angular/namespaces/app.js","webpack:///./src/js/angular/core/directives/paginations.js","webpack:///./src/js/angular/namespaces/controllers.js","webpack:///./src/js/angular/namespaces/directives.js"],"names":["angular","module","run","editableOptions","theme","directive","template","namespaces","pnPrefixRe","pnCharsBase","pnChars","pnCharsU","RegExp","controller","$scope","$http","$repositories","toastr","$uibModal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate","deleteNamespace","namespace","prefix","deleteNamespacePrefix","getActiveRepository","success","length","shift","selectedAll","getNamespaces","searchNamespaces","haveSelected","loader","displayedNamespaces","undefined","instant","error","data","msg","getError","validatePrefixAndNamespace","match","validatePrefix","isUndefined","pageSizeOptions","page","pageSize","results","bindings","map","e","value","sort","a","b","prefixA","toUpperCase","prefixB","matchedElements","changePagination","isDefined","slice","changePageSize","size","$","removeClass","$watch","onNamespaceSearch","deselectAll","filterResults","forEach","item","indexOf","push","saveNamespace","updateNamespacePrefix","editPrefix","oldPrefix","newPrefix","getPrefix","from","to","location","getActiveRepositoryObject","confirmReplace","okCallback","cancelCallback","openSimpleModal","title","message","warning","result","then","editPrefixAndNamespace","namespaceObject","prefixExist","elem","addNamespace","i","removeNamespace","checkAll","selected","deleteSelected","modalInstanceOpened","checkIfSelectedNamespace","$uibModalInstance","ok","close","cancel","dismiss","$timeout","scope","$last","$parent"],"mappings":"oGAAA,iDAqBsBA,QAAQC,OAAO,+BAbrB,CACZ,qBACA,YACA,YACA,UACA,SACA,2CACA,0CACA,+CACA,oCACA,kDAKUC,IAAI,CAAC,kBAAmB,SAAUC,GAC5CA,EAAgBC,MAAQ,U,iBCxB5BJ,QAAQC,OAAO,gDAAiD,IAC3DI,UAAU,eAAe,WACtB,MAAO,CACHC,SAAU,yP,gCCHtB,8BAKA,MASMC,EAAaP,QAAQC,OAAO,2CATlB,CACZ,eACA,+CACA,0CACA,8CACA,oDACA,WAOEO,EAAa,WACf,MAAMC,EAAc,gFAIdC,EAAUC,wGAEhB,OAAO,IAAIC,OAAO,OAASH,EAAc,UAAYC,EAAU,YAAcA,EAAU,QAPxE,GAcnBH,EAAWM,WAAW,iBAAkB,CAAC,SAAU,QAAS,gBAAiB,SAAU,YAAa,eAAgB,0BAA2B,+BAAgC,aAC3K,SAAUC,EAAQC,EAAOC,EAAeC,EAAQC,EAAWC,EAAcC,EAAyBC,EAA8BC,GAoP5H,SAASC,EAAgBC,EAAWjB,GAChC,IAAIkB,EAEAA,EADqB,iBAAdD,EACEA,EAAUC,OAEVD,EAEbH,EAA6BK,sBAAsBV,EAAcW,sBAAuBF,GACnFG,SAAQ,WACDrB,GAAcA,EAAWsB,OAAS,EAElCN,EADAC,EAAYjB,EAAWuB,QACIvB,IAE3BO,EAAOiB,aAAc,EACrBjB,EAAOU,UAAY,GACnBV,EAAOkB,gBACPlB,EAAO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gB,QAAQ,qCAC5BuD,SAAS,IACVC,OAAOC,MAAK,WACXjF,EAAOqB,QAAS,EAChB,MAAM5B,EAAa,GACnBP,QAAQyE,QAAQ3D,EAAOsB,qBAAqB,SAAUZ,GAC9CA,EAAUgF,UACVjG,EAAWqE,KAAKpD,MAGxBD,EAAgBhB,EAAWuB,QAASvB,GACpCO,EAAOiB,aAAc,KACtB,WACCjB,EAAOkB,gBACPlB,EAAOiB,aAAc,EACrBjB,EAAOmB,iBAAmB,WAgDtCnB,EAAO6F,yBAA2B,WAC9B7F,EAAOoB,cAAe,EACtBlC,QAAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACrCA,EAAK8B,WACL1F,EAAOoB,cAAe,OAKlCpB,EAAOyD,YAAc,WACjBvE,QAAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACzCA,EAAK8B,UAAW,SAmBhCjG,EAAWM,WAAW,oBAAqB,CAAC,SAAU,oBAAqB,SAAUC,EAAQ8F,GAEzF9F,EAAO+F,GAAK,WAERD,EAAkBE,OADH,IAInBhG,EAAOiG,OAAS,WACZH,EAAkBI,QAAQ,e,iBC5VLhH,QAAQC,OAAO,0CAA2C,CAAC,YAGnEI,UAAU,4BAA6B,CAAC,WAAY,SAAU4G,GAC/E,OAAO,SAAUC,GACTA,EAAMC,OAKNF,GAAS,WACLC,EAAME,QAAQjF,QAAS,IACxB","file":"24.63acd0fc451fc797ff79.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/services/repositories.service';\nimport 'angular/namespaces/controllers';\nimport 'angular/namespaces/directives';\nimport 'angular/core/directives/paginations';\nimport 'angular-xeditable/dist/js/xeditable.min';\n\nconst modules = [\n 'LocalStorageModule',\n 'xeditable',\n 'ngAnimate',\n 'ngRoute',\n 'toastr',\n 'graphdb.framework.namespaces.controllers',\n 'graphdb.framework.namespaces.directives',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.core.directives.paginations'\n];\n\nconst namespacesApp = angular.module('graphdb.framework.namespaces', modules);\n\nnamespacesApp.run(['editableOptions', function (editableOptions) {\n editableOptions.theme = 'bs3';\n}]);\n","angular.module('graphdb.framework.core.directives.paginations', [])\n .directive('paginations', function () {\n return {\n template: '<uib-pagination class=\"nav navbar-right\" total-items=\"matchedElements.length\" items-per-page=\"pageSize\" ng-model=\"page\" ng-change=\"changePagination()\" direction-links=\"false\" boundary-links=\"true\" max-size=\"5\" rotate=\"true\"></uib-pagination>',\n };\n });\n","import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/rdf4j.repositories.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.services.jwtauth',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'toastr'\n];\n\nconst namespaces = angular.module('graphdb.framework.namespaces.controllers', modules);\n\n// A regular expression that validates a prefix according to the SPARQL 1.1 specification.\n// XXX: Technically this should include Unicode chars > 0xFFFF but those aren't fully supported in JavaScript\nconst pnPrefixRe = function () {\n const pnCharsBase = '[A-Z]|[a-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]'\n + '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]'\n + '|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\n const pnCharsU = pnCharsBase + '|_';\n const pnChars = pnCharsU + '|-|[0-9]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\n\n return new RegExp('^(?:' + pnCharsBase + ')(?:(?:' + pnChars + '|\\\\.)*(?:' + pnChars + '))?$');\n}();\n\nfunction validatePrefix(prefix) {\n return prefix === '' || prefix.match(pnPrefixRe);\n}\n\nnamespaces.controller('NamespacesCtrl', ['$scope', '$http', '$repositories', 'toastr', '$uibModal', 'ModalService', 'RepositoriesRestService', 'RDF4JRepositoriesRestService', '$translate',\n function ($scope, $http, $repositories, toastr, $uibModal, ModalService, RepositoriesRestService, RDF4JRepositoriesRestService, $translate) {\n $scope.namespaces = {};\n $scope.namespace = {};\n $scope.loader = false;\n $scope.haveSelected = false;\n $scope.pageSizeOptions = [10, 20, 50, 100];\n $scope.page = 1;\n $scope.pageSize = $scope.pageSizeOptions[0];\n $scope.displayedNamespaces = [];\n\n $scope.getNamespaces = function () {\n if (!$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.loader = true;\n $scope.namespaces = {};\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n namespace: e.namespace.value\n };\n });\n if ($scope.namespaces.length > 0) {\n $scope.namespaces.sort(function (a, b) {\n const prefixA = a.prefix.toUpperCase(); // ignore upper and lowercase\n const prefixB = b.prefix.toUpperCase(); // ignore upper and lowercase\n if (prefixA < prefixB) {\n return -1;\n }\n if (prefixA > prefixB) {\n return 1;\n }\n return 0;\n });\n $scope.matchedElements = $scope.namespaces;\n $scope.changePagination();\n }\n if ($scope.namespaces.length === 0) {\n // Remove the loader ourselves\n $scope.loader = false;\n } // else let the loaderPostRepeatDirective do it\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg);\n $scope.loader = false;\n });\n };\n\n $scope.changePagination = function () {\n if (angular.isDefined($scope.namespaces)) {\n $scope.displayedNamespaces = $scope.namespaces.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n };\n\n $scope.changePageSize = function (size) {\n $('.ot-graph-page-size').removeClass('active');\n $scope.page = 1;\n $scope.searchNamespaces = '';\n if (size) {\n $scope.getNamespaces();\n $scope.pageSize = size;\n }\n };\n\n $scope.$watch('matchedElements', function () {\n if (angular.isDefined($scope.matchedElements)) {\n $scope.displayedNamespaces = $scope.matchedElements.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n });\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.searchNamespaces = '';\n $scope.getNamespaces();\n $scope.selectedAll = false;\n });\n\n $scope.onNamespaceSearch = function() {\n $scope.haveSelected = false;\n $scope.selectedAll = false;\n $scope.matchedElements = [];\n $scope.deselectAll();\n $scope.filterResults();\n };\n\n $scope.filterResults = function() {\n angular.forEach($scope.namespaces, function (item) {\n if (item.namespace.indexOf($scope.searchNamespaces) !== -1 || item.prefix.indexOf($scope.searchNamespaces) !== -1) {\n $scope.matchedElements.push(item);\n }\n });\n };\n\n $scope.saveNamespace = function (prefix, namespace) {\n $scope.loader = true;\n return RDF4JRepositoriesRestService.updateNamespacePrefix($repositories.getActiveRepository(), namespace, prefix)\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editPrefix = function (oldPrefix, newPrefix) {\n $scope.loader = true;\n RepositoriesRestService.getPrefix($repositories.getActiveRepository(), {\n from: oldPrefix, to: newPrefix, location: $repositories.getActiveRepositoryObject().location})\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.confirmReplace = function (okCallback, cancelCallback) {\n ModalService.openSimpleModal({\n title: $translate.instant('namespace.confirm.replace'),\n message: $translate.instant('namespace.already.exists.msg'),\n warning: true\n }).result.then(okCallback, cancelCallback);\n };\n\n $scope.editPrefixAndNamespace = function (prefix, namespace, namespaceObject) {\n if (angular.isUndefined(prefix)) {\n prefix = '';\n }\n\n if (!validatePrefixAndNamespace(prefix, namespace)) {\n return '';\n }\n\n let prefixExist = false;\n const oldPrefix = namespaceObject.prefix;\n angular.forEach($scope.namespaces, function (elem) {\n if (elem.prefix === prefix && oldPrefix !== prefix) {\n prefixExist = true;\n }\n });\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }, function () {\n $scope.getNamespaces();\n });\n } else if (angular.isDefined(prefixExist)) {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }\n };\n\n $scope.addNamespace = function () {\n if (angular.isUndefined($scope.namespace.prefix)) {\n $scope.namespace.prefix = '';\n }\n\n if (!validatePrefixAndNamespace($scope.namespace.prefix, $scope.namespace.namespace)) {\n return;\n }\n\n $scope.selectedAll = false;\n let prefixExist = false;\n for (let i = 0; i < $scope.namespaces.length; i++) {\n if ($scope.namespaces[i].prefix === $scope.namespace.prefix) {\n prefixExist = true;\n }\n }\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n });\n } else {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n }\n };\n\n $scope.removeNamespace = function (namespace) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.msg', {prefix: namespace.prefix}),\n warning: true\n }).result.then(function () {\n deleteNamespace(namespace);\n });\n };\n\n $scope.checkAll = function () {\n angular.forEach($scope.displayedNamespaces, function (item) {\n item.selected = $scope.selectedAll;\n });\n };\n\n $scope.deleteSelected = function () {\n const openModalInstance = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.selected'),\n warning: true\n }).result.then(function () {\n $scope.loader = true;\n const namespaces = [];\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (namespace.selected) {\n namespaces.push(namespace);\n }\n });\n deleteNamespace(namespaces.shift(), namespaces);\n $scope.selectedAll = false;\n }, function () {\n $scope.getNamespaces();\n $scope.selectedAll = false;\n $scope.searchNamespaces = '';\n });\n };\n\n let modalInstanceOpened = false;\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (!modalInstanceOpened) {\n if (namespace.selected) {\n modalInstanceOpened = true;\n openModalInstance();\n }\n }\n });\n };\n\n function deleteNamespace(namespace, namespaces) {\n let prefix;\n if (typeof namespace === 'object') {\n prefix = namespace.prefix;\n } else {\n prefix = namespace;\n }\n RDF4JRepositoriesRestService.deleteNamespacePrefix($repositories.getActiveRepository(), prefix)\n .success(function () {\n if (namespaces && namespaces.length > 0) {\n namespace = namespaces.shift();\n deleteNamespace(namespace, namespaces);\n } else {\n $scope.selectedAll = false;\n $scope.namespace = {};\n $scope.getNamespaces();\n $scope.searchNamespaces = '';\n $scope.haveSelected = false;\n $scope.loader = false;\n $scope.displayedNamespaces = [];\n if (namespaces === undefined) {\n toastr.success($translate.instant('namespace.prefix.deleted.successfully', {prefix: prefix}), '');\n } else {\n toastr.success($translate.instant('namespace.selected.namespaces.deleted.successfully'), '');\n }\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n $scope.checkIfSelectedNamespace = function () {\n $scope.haveSelected = false;\n angular.forEach($scope.namespaces, function (item) {\n if (item.selected) {\n $scope.haveSelected = true;\n }\n });\n };\n\n $scope.deselectAll = function () {\n angular.forEach($scope.namespaces, function (item) {\n item.selected = false;\n });\n };\n\n function validatePrefixAndNamespace(prefix, namespace) {\n if (!validatePrefix(prefix)) {\n toastr.error($translate.instant('namespace.invalid.prefix', {prefix: prefix}, $translate.instant('common.error')));\n return false;\n }\n\n if (angular.isUndefined(namespace) || namespace === '') {\n toastr.error($translate.instant('namespace.warning.provide.namespace'), $translate.instant('common.error'));\n return false;\n }\n\n return true;\n }\n }]);\n\nnamespaces.controller('StandartModalCtrl', ['$scope', '$uibModalInstance', function ($scope, $uibModalInstance) {\n\n $scope.ok = function () {\n const result = true;\n $uibModalInstance.close(result);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}]);\n","const namespacesDirectives = angular.module('graphdb.framework.namespaces.directives', ['ngRoute']);\n\n// This directive will set the loader to false once the respective ngRepeat is done loading\nnamespacesDirectives.directive('loaderPostRepeatDirective', ['$timeout', function ($timeout) {\n return function (scope) {\n if (scope.$last) {\n // It's important to do this with timeout:\n // \"...since the setTimeout function gets pushed to the end of the queue of the browser,\n // its always right after everything is done in angular, usually ngRepeat which continues\n // after its parents postLinking function\"\n $timeout(function () {\n scope.$parent.loader = false;\n }, 0);\n }\n };\n}]);\n"],"sourceRoot":""}