graphdb-workbench 2.0.0-M3-RC3 → 2.0.0-RC2

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 (180) hide show
  1. package/dist/{10.91f8aa0494201bb12b25.bundle.js → 10.eab0a417fa2f2831905e.bundle.js} +2 -2
  2. package/dist/10.eab0a417fa2f2831905e.bundle.js.map +1 -0
  3. package/dist/{104.42f8ece72006965c902d.bundle.js → 104.7e16b2863108db706fe7.bundle.js} +2 -2
  4. package/dist/104.7e16b2863108db706fe7.bundle.js.map +1 -0
  5. package/dist/{11.32f5a72d66bb699e9e8b.bundle.js → 11.3957302d7a301df30dd1.bundle.js} +2 -2
  6. package/dist/11.3957302d7a301df30dd1.bundle.js.map +1 -0
  7. package/dist/111.ceb781497f3c5dfd1446.bundle.js +2 -0
  8. package/dist/111.ceb781497f3c5dfd1446.bundle.js.map +1 -0
  9. package/dist/112.e34c26d9d3b4b6deae17.bundle.js +2 -0
  10. package/dist/112.e34c26d9d3b4b6deae17.bundle.js.map +1 -0
  11. package/dist/113.733877f9f73d3283f528.bundle.js +2 -0
  12. package/dist/113.733877f9f73d3283f528.bundle.js.map +1 -0
  13. package/dist/114.0e270e77a2a557167988.bundle.js +2 -0
  14. package/dist/114.0e270e77a2a557167988.bundle.js.map +1 -0
  15. package/dist/115.732830fed3ff34691def.bundle.js +2 -0
  16. package/dist/115.732830fed3ff34691def.bundle.js.map +1 -0
  17. package/dist/116.7e8b202c5d712bddaaec.bundle.js +2 -0
  18. package/dist/116.7e8b202c5d712bddaaec.bundle.js.map +1 -0
  19. package/dist/119.2d6b15bc87de2533599c.bundle.js +2 -0
  20. package/dist/119.2d6b15bc87de2533599c.bundle.js.map +1 -0
  21. package/dist/120.80843604737b7c260788.bundle.js +1 -1
  22. package/dist/120.80843604737b7c260788.bundle.js.map +1 -1
  23. package/dist/123.51ad0d8338eda5a93b06.bundle.js +2 -0
  24. package/dist/123.51ad0d8338eda5a93b06.bundle.js.map +1 -0
  25. package/dist/{128.ce61f3a6925ddbc8f612.bundle.js → 128.7dae6369a26090e10276.bundle.js} +2 -2
  26. package/dist/{128.ce61f3a6925ddbc8f612.bundle.js.map → 128.7dae6369a26090e10276.bundle.js.map} +1 -1
  27. package/dist/130.ecb7509cb6324abf4071.bundle.js +2 -0
  28. package/dist/130.ecb7509cb6324abf4071.bundle.js.map +1 -0
  29. package/dist/138.5375ebd499e5c4977038.bundle.js +2 -0
  30. package/dist/138.5375ebd499e5c4977038.bundle.js.map +1 -0
  31. package/dist/149.7089a654a1902207a2c8.bundle.js +2 -0
  32. package/dist/149.7089a654a1902207a2c8.bundle.js.map +1 -0
  33. package/dist/{151.2dae840b241433fbe1d8.bundle.js → 151.2104ac0782ac43e2e7d2.bundle.js} +2 -2
  34. package/dist/{151.2dae840b241433fbe1d8.bundle.js.map → 151.2104ac0782ac43e2e7d2.bundle.js.map} +1 -1
  35. package/dist/152.78baa98e298c18358c55.bundle.js +2 -0
  36. package/dist/152.78baa98e298c18358c55.bundle.js.map +1 -0
  37. package/dist/153.fd957ea6d6ea34d3feb2.bundle.js +2 -0
  38. package/dist/153.fd957ea6d6ea34d3feb2.bundle.js.map +1 -0
  39. package/dist/18.44723ea06155c72f46ae.bundle.js +1 -1
  40. package/dist/18.44723ea06155c72f46ae.bundle.js.map +1 -1
  41. package/dist/{2.3a65d34c46b96a708181.bundle.js → 2.6e340067f6eae14345cd.bundle.js} +2 -2
  42. package/dist/2.6e340067f6eae14345cd.bundle.js.map +1 -0
  43. package/dist/21.64fbe234fee75c83dda3.bundle.js +2 -0
  44. package/dist/21.64fbe234fee75c83dda3.bundle.js.map +1 -0
  45. package/dist/{23.9d969421ffc11412b35a.bundle.js → 23.acf56e52417b0fbca9f4.bundle.js} +2 -2
  46. package/dist/23.acf56e52417b0fbca9f4.bundle.js.map +1 -0
  47. package/dist/25.9e0925889b3a3f79c7fe.bundle.js +2 -0
  48. package/dist/25.9e0925889b3a3f79c7fe.bundle.js.map +1 -0
  49. package/dist/27.a53481ccfa58fbd0c801.bundle.js +2 -0
  50. package/dist/27.a53481ccfa58fbd0c801.bundle.js.map +1 -0
  51. package/dist/29.9bdb27c21d6eacac1341.bundle.js +1 -1
  52. package/dist/29.9bdb27c21d6eacac1341.bundle.js.map +1 -1
  53. package/dist/3.a1815b0ddb1630938d40.bundle.js +2 -0
  54. package/dist/3.a1815b0ddb1630938d40.bundle.js.map +1 -0
  55. package/dist/30.34b74ada583b1b0af913.bundle.js +2 -0
  56. package/dist/30.34b74ada583b1b0af913.bundle.js.map +1 -0
  57. package/dist/{44.dbb910f04027f51eeedd.bundle.js → 44.082e83be1a2eda5f197b.bundle.js} +2 -2
  58. package/dist/44.082e83be1a2eda5f197b.bundle.js.map +1 -0
  59. package/dist/48.f047a5ea62690543f8ad.bundle.js +2 -0
  60. package/dist/48.f047a5ea62690543f8ad.bundle.js.map +1 -0
  61. package/dist/5.1e4e7e36d894360b8d8f.bundle.js +2 -0
  62. package/dist/5.1e4e7e36d894360b8d8f.bundle.js.map +1 -0
  63. package/dist/67.3f75109fb8b71d88f6c7.bundle.js +2 -0
  64. package/dist/67.3f75109fb8b71d88f6c7.bundle.js.map +1 -0
  65. package/dist/68.e25480b7770a679a9654.bundle.js +1 -1
  66. package/dist/68.e25480b7770a679a9654.bundle.js.map +1 -1
  67. package/dist/8.5abe78e9d72cdbc2607f.bundle.js +3 -0
  68. package/dist/8.5abe78e9d72cdbc2607f.bundle.js.map +1 -0
  69. package/dist/{bundle.e65c5ca8080546fe24d7.bundle.js → bundle.7e4f5efd9843ba4c4905.bundle.js} +3 -3
  70. package/dist/bundle.7e4f5efd9843ba4c4905.bundle.js.map +1 -0
  71. package/dist/css/bootstrap-graphdb-theme.css +21 -3
  72. package/dist/css/clustermanagement.css +14 -1
  73. package/dist/css/fonts/icons.eot +0 -0
  74. package/dist/css/fonts/icons.svg +1 -0
  75. package/dist/css/fonts/icons.ttf +0 -0
  76. package/dist/css/fonts/icons.woff +0 -0
  77. package/dist/font/{icons.b601f6618abd131665211ff4ec9ad6b2.eot → icons.23e96f215ba03e98233de883d2c30b60.eot} +0 -0
  78. package/dist/img/{icons.6466330b5ada72a12e1aa10044720eec.svg → icons.ab6168834b8775f511d09c8fad540b27.svg} +1 -0
  79. package/dist/index.html +5 -5
  80. package/dist/js/angular/autocomplete/templates/modal/add-label.html +9 -8
  81. package/dist/js/angular/clustermanagement/templates/modal/add-nodes-dialog.html +17 -19
  82. package/dist/js/angular/clustermanagement/templates/modal/cluster-create-dialog.html +20 -21
  83. package/dist/js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html +8 -9
  84. package/dist/js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html +9 -8
  85. package/dist/js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html +18 -19
  86. package/dist/js/angular/core/directives/queryeditor/templates/query-sample.html +10 -10
  87. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  88. package/dist/js/angular/core/templates/modal/copy-to-clipboard-modal.html +9 -10
  89. package/dist/js/angular/externalsync/templates/deleteConnector.html +4 -4
  90. package/dist/js/angular/graphexplore/templates/modal/save-graph.html +9 -10
  91. package/dist/js/angular/import/templates/settingsModal.html +231 -231
  92. package/dist/js/angular/settings/modal/location-settings.html +15 -16
  93. package/dist/js/angular/templates/modal/add-fedx-remote-repo.html +17 -15
  94. package/dist/js/angular/templates/modal/add-location.html +15 -15
  95. package/dist/js/angular/templates/modal/edit-location.html +8 -8
  96. package/dist/main.12e572893a7926387b80.css +1 -0
  97. package/dist/pages/autocomplete.html +1 -1
  98. package/dist/pages/choose-repository-type.html +1 -1
  99. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  100. package/dist/pages/create-index.html +5 -5
  101. package/dist/pages/createConnector.html +134 -137
  102. package/dist/pages/dependencies.html +1 -1
  103. package/dist/pages/domainRangeInfo.html +2 -2
  104. package/dist/pages/edit.html +1 -1
  105. package/dist/pages/explore.html +1 -1
  106. package/dist/pages/export.html +1 -1
  107. package/dist/pages/find.html +1 -1
  108. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  109. package/dist/pages/graphs-visualizations.html +7 -7
  110. package/dist/pages/home.html +1 -1
  111. package/dist/pages/import.html +1 -1
  112. package/dist/pages/jdbc-create.html +5 -5
  113. package/dist/pages/monitor/queries.html +1 -1
  114. package/dist/pages/monitor/resources.html +2 -2
  115. package/dist/pages/namespaces.html +2 -2
  116. package/dist/pages/plugins.html +1 -1
  117. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  118. package/dist/pages/rdfrank.html +2 -2
  119. package/dist/pages/repositories.html +2 -2
  120. package/dist/pages/repository.html +2 -2
  121. package/dist/pages/similarity-indexes.html +3 -3
  122. package/dist/pages/sparql-template-create.html +5 -5
  123. package/dist/pages/sparql.html +3 -3
  124. package/dist/pages/webapi.html +2 -2
  125. package/dist/plugins.js +3 -12
  126. package/dist/res/swagger/fonts/icons.woff +0 -0
  127. package/dist/res/swagger/index.html +27 -27
  128. package/package.json +1 -1
  129. package/dist/10.91f8aa0494201bb12b25.bundle.js.map +0 -1
  130. package/dist/104.42f8ece72006965c902d.bundle.js.map +0 -1
  131. package/dist/11.32f5a72d66bb699e9e8b.bundle.js.map +0 -1
  132. package/dist/111.a360abaec5e5926aae34.bundle.js +0 -2
  133. package/dist/111.a360abaec5e5926aae34.bundle.js.map +0 -1
  134. package/dist/112.83afabc13f11ea9e326e.bundle.js +0 -2
  135. package/dist/112.83afabc13f11ea9e326e.bundle.js.map +0 -1
  136. package/dist/113.9f4c896b53aa300a5f38.bundle.js +0 -2
  137. package/dist/113.9f4c896b53aa300a5f38.bundle.js.map +0 -1
  138. package/dist/114.afa49d7867c1ce3b08c2.bundle.js +0 -2
  139. package/dist/114.afa49d7867c1ce3b08c2.bundle.js.map +0 -1
  140. package/dist/115.bbf8829ee8f466f85862.bundle.js +0 -2
  141. package/dist/115.bbf8829ee8f466f85862.bundle.js.map +0 -1
  142. package/dist/116.a4460f77635888e013b1.bundle.js +0 -2
  143. package/dist/116.a4460f77635888e013b1.bundle.js.map +0 -1
  144. package/dist/119.e60f7d27cb5876b3a601.bundle.js +0 -2
  145. package/dist/119.e60f7d27cb5876b3a601.bundle.js.map +0 -1
  146. package/dist/123.207528c97d229de16991.bundle.js +0 -2
  147. package/dist/123.207528c97d229de16991.bundle.js.map +0 -1
  148. package/dist/130.c2f5c98e78bd22743ee4.bundle.js +0 -2
  149. package/dist/130.c2f5c98e78bd22743ee4.bundle.js.map +0 -1
  150. package/dist/138.84fb24a9535f4d6d8c59.bundle.js +0 -2
  151. package/dist/138.84fb24a9535f4d6d8c59.bundle.js.map +0 -1
  152. package/dist/149.8ca7b7242b61bd7a8363.bundle.js +0 -2
  153. package/dist/149.8ca7b7242b61bd7a8363.bundle.js.map +0 -1
  154. package/dist/152.bd0fd3cba70a2e267646.bundle.js +0 -2
  155. package/dist/152.bd0fd3cba70a2e267646.bundle.js.map +0 -1
  156. package/dist/153.9272a2423ac2aa6a148b.bundle.js +0 -2
  157. package/dist/153.9272a2423ac2aa6a148b.bundle.js.map +0 -1
  158. package/dist/2.3a65d34c46b96a708181.bundle.js.map +0 -1
  159. package/dist/21.111cc98aaf2436b81eea.bundle.js +0 -2
  160. package/dist/21.111cc98aaf2436b81eea.bundle.js.map +0 -1
  161. package/dist/23.9d969421ffc11412b35a.bundle.js.map +0 -1
  162. package/dist/25.fffc5233e718b047a34f.bundle.js +0 -2
  163. package/dist/25.fffc5233e718b047a34f.bundle.js.map +0 -1
  164. package/dist/27.357929bef6f5df788b8e.bundle.js +0 -2
  165. package/dist/27.357929bef6f5df788b8e.bundle.js.map +0 -1
  166. package/dist/3.36fe2e671f737648a477.bundle.js +0 -2
  167. package/dist/3.36fe2e671f737648a477.bundle.js.map +0 -1
  168. package/dist/30.e2cd19e99cf6ecdad6ac.bundle.js +0 -2
  169. package/dist/30.e2cd19e99cf6ecdad6ac.bundle.js.map +0 -1
  170. package/dist/44.dbb910f04027f51eeedd.bundle.js.map +0 -1
  171. package/dist/48.d1b4cfee2f0e084c1d73.bundle.js +0 -2
  172. package/dist/48.d1b4cfee2f0e084c1d73.bundle.js.map +0 -1
  173. package/dist/5.e112b0d6e101e0766cda.bundle.js +0 -2
  174. package/dist/5.e112b0d6e101e0766cda.bundle.js.map +0 -1
  175. package/dist/67.62375b1b4925fff2fe7c.bundle.js +0 -2
  176. package/dist/67.62375b1b4925fff2fe7c.bundle.js.map +0 -1
  177. package/dist/8.7f3059d43e0db8ff7dd5.bundle.js +0 -3
  178. package/dist/8.7f3059d43e0db8ff7dd5.bundle.js.map +0 -1
  179. package/dist/bundle.e65c5ca8080546fe24d7.bundle.js.map +0 -1
  180. package/dist/main.b9612509bb46028befd2.css +0 -1
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[21,27,44],{220: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),f=t.apply(this,o),h=p(),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(f).apply(this),_?h.style(_):h.classed(f,!0).style({top:r.top+u[0]+y+"px",left:r.left+u[1]+m+"px"}),c},c.hide=function(){return p().style({opacity:0,"pointer-events":"none"}),c},c.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return p().attr(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(p(),n),c},c.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return p().style(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(p(),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&&(p().remove(),o=null),c};var d=d3.map({n:function(){var t=f();return{top:t.n.y-o.offsetHeight,left:t.n.x-o.offsetWidth/2}},s:function(){var t=f();return{top:t.s.y,left:t.s.x-o.offsetWidth/2}},e:function(){var t=f();return{top:t.e.y-o.offsetHeight/2,left:t.e.x}},w:function(){var t=f();return{top:t.w.y-o.offsetHeight/2,left:t.w.x-o.offsetWidth}},nw:function(){var t=f();return{top:t.nw.y-o.offsetHeight,left:t.nw.x-o.offsetWidth}},ne:function(){var t=f();return{top:t.ne.y-o.offsetHeight,left:t.ne.x}},sw:function(){var t=f();return{top:t.sw.y,left:t.sw.x-o.offsetWidth}},se:function(){var t=f();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 p(){return null===o&&(o=u(),document.body.appendChild(o)),d3.select(o)}function f(){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)},44: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 f})),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(40);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(p)}(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 p(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 f(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,p=o.y-55*c;return"M"+d+","+i+"L"+u+","+p})(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})`})}},51:function(t,e,n){"use strict";n.r(e);n(4);var o=n(44),r=n(40),a=n(220),s=n.n(a);const l=240,c=70;let d=l;const i=50,u=25,p=angular.module("graphdb.framework.clustermanagement.directives",["graphdb.framework.utils.localstorageadapter"]),f={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"},h={node_state:"legend_node_state",link_state:"legend_link_state"};p.directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope",function(t,e,n,r,a,p){return{restrict:"A",link:function(m,x){function S(){Object.keys(f).forEach(t=>{f[t]=a.instant("cluster_management.cluster_graphical_view."+t)})}function N(){const o="collapsedMenu"===e.get(n.MENU_STATE);return d=o?c:l,Math.max(Math.floor(.95*(t.innerWidth-d)),600)}function k(){return Math.max(.95*(t.innerHeight-250),600)}let v,w,E;m.showLegend=!1,p.$on("$translateChangeSuccess",(function(){S(),function(){o.updateClusterZoneLabels(T,b,f),Object.keys(h).forEach(t=>{d3.select(`#${t}`).text(G(t))}),v&&v.remove();z(),Z()}()})),m.$on("$destroy",(function(){F.destroy()}));const C=10;let T,L,b,O,A,M,B=N(),D=k(),R=Math.min(B,D)/2-100,I=B/2,Y=D/2;function G(t){const e=h[t];return f[e]}function z(){v=L.append("g").attr("id","legend-group").classed("hidden",!m.showLegend).classed("legend-group",!0)}m.width=function(){return B},m.height=function(){return D};const F=s()().attr("class","d3-tip").customPosition((function(){const t=M.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})),W=function(t,e){M=e,F.show(t,M)},U=function(){M=null,F.hide()};function Z(){const t=C+14,e=t+3*C+5*u,n=g(),r=y();!function(t,e){t.forEach(t=>{t.toolTip=t.hostname=f[t.customText]}),e.forEach(t=>{t.toolTip=t.linkTypeText=f[t.linkTypeKey]})}(n,r),v.append("rect").attr("id","legend-background").attr("class","legend-background").attr("fill","#EEEEEE");const a=v.append("text").attr("id","node_state").attr("class","id id-host").attr("x",4*i).attr("y",t).text(G("node_state")),s=v.append("text").attr("id","link_state").attr("class","id id-host").attr("x",4*i).attr("y",e).text(G("link_state")),l=v.selectAll("#node-group").data(n);o.createNodes(l,u,!0),o.updateNodes(l),l.select(".node.member").on("mouseover",(function(t){d3.event.stopPropagation(),W(t,this)})).on("mouseout",U),l.attr("transform",(function(t){const e=Math.floor(t.id/4),n=t.id%4;return`translate(${C+u+(15+2*u)*n}, ${2*C+14+u+(15+2*u)*e})`})),v.call((function(){w=this.node().getBBox().width})),a.attr("x",C+w/2),s.attr("x",C+w/2);const c=w/3,d=v.append("g").attr("id","links-group"),p=e+C;d.attr("transform",`translate(${C}, ${p})`),r.forEach((t,e)=>{const n=c-5,r=d.append("g").classed("link",!0).classed("legend",!0).attr("transform",()=>{return`translate(${e*c}, 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",c-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(),W(t,this)})).on("mouseout",U)}),v.call((function(t){E=this.node().getBBox().height,w=this.node().getBBox().width})),v.select(".legend-background").attr("height",E+4*C).attr("width",w+2*C).attr("rx","6"),P()}function P(){const t=D-(E+3*C+50);o.moveElement(v,0,t)}function H(){R=Math.min(B,D)/2-100,I=B/2,Y=D/2,o.moveElement(b,I,Y),b.select(".cluster-zone").attr("r",R)}function K(){H(),T!==m.clusterModel.hasCluster&&(T=!!m.clusterModel.hasCluster,function(t){let e;o.setCreateClusterZone(t,b,f),t||(e=()=>{m.$apply((function(){m.showCreateClusterDialog()}))}),b.on("mouseup",e)}(T));const t=_.cloneDeep(m.clusterModel.nodes)||[],e=_.cloneDeep(m.clusterModel.links)||[];!function(t){t.forEach(t=>t.hostname=r.shortenIri(t.endpoint));const e=O.selectAll("#node-group").data(t,t=>t.address);e.on("click",t=>{m.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,i),o.updateNodes(e),o.positionNodesOnClusterZone(e,I,Y,R)}(t),function(t,e){const n=A.selectAll(".link").data(t,t=>t.id);o.createLinks(n),o.updateLinks(n,e)}(e,t)}m.childContext.redraw=K,m.childContext.resize=function(){B=N(),D=k(),L.attr("width",B),L.attr("height",D),K(),P()},m.childContext.toggleLegend=()=>{m.showLegend=!m.showLegend,v.classed("hidden",!m.showLegend)},S(),function(t){L=o.createClusterSvgElement(x[0]).attr("width",B).attr("height",D),L.call(F),b=o.createClusterZone(L,t),A=L.append("g").attr("id","links-group"),O=L.append("g").attr("id","nodes-group"),z()}(!(!m.clusterModel.nodes||!m.clusterModel.nodes.length)),Z(),K()}}}]).config(["$tooltipProvider",function(t){t.options({appendToBody:!0})}]);const g=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},y=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}},94:function(t,e,n){"use strict";n.r(e);n(3),n(9),n(40),n(51),n(8),n(230),n(228),n(233);angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers","graphdb.framework.clustermanagement.directives"])}}]);
2
+ //# sourceMappingURL=21.64fbe234fee75c83dda3.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["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","webpack:///./src/js/angular/clustermanagement/app.js"],"names":["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","navigationBarWidthFull","navigationBarWidthCollapsed","navigationBarWidth","legendNodeRadius","clusterManagementDirectives","angular","module","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","legendPadding","nodesGroup","linksGroup","tooltipElement","min","labelKey","getBoundingClientRect","toolTip","showLegendTooltip","hideLegendTooltip","nodeStateLabelY","linkStateLabelY","legendNodes","getLegendNodes","legendLinks","getLegendLinks","customText","linkTypeText","linkTypeKey","translateLegendLinksAndNodes","nodeStateLabel","linkStateLabel","legendNodeData","on","stopPropagation","row","id","column","linkWidth","linksGroupY","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","config","$tooltipProvider","options","appendToBody","push","NO_CLUSTER"],"mappings":"oFAAA,UAQQ,EAAO,QAAW,0BAAP,EAWX,WAIJ,OAAO,WACH,IAAIA,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,EAA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UAAWyG,WAAY,yBAC9DJ,EAAYmD,KAAK,CAACpK,UAAW,YAAUa,WAAYwG,WAAY,0BAC/DJ,EAAYlC,QAAQ,CAAC9M,EAAMuK,IAAUvK,EAAK8P,GAAKvF,GACxCyE,GAGLG,EAAiB,WACnB,MAAM2B,EAAQ,GAKd,OAJAA,EAAMqB,KAAK,CAACnI,OAAQ,YAAUC,QAASqF,YAAa,uBACpDwB,EAAMqB,KAAK,CAACnI,OAAQ,YAAUE,QAASoF,YAAa,uBACpDwB,EAAMqB,KAAK,CAACnI,OAAQ,YAAUtB,YAAa4G,YAAa,2BACxDwB,EAAMhE,QAAQ,CAAC5D,EAAMqB,IAAUrB,EAAK4G,GAAKvF,GAClCuG,I,gCC/aX,uDAgB6B7F,QAAQC,OAAO,sCAP5B,CACZ,YACA,SACA,kDACA","file":"21.64fbe234fee75c83dda3.bundle.js","sourcesContent":["// 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 .config(['$tooltipProvider', function ($tooltipProvider) {\n $tooltipProvider.options({appendToBody: true});\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","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"],"sourceRoot":""}