graphdb-workbench 2.2.2-TR2 → 2.3.0-TR1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/dist/10.2c7c4caeb5771a2a98d1.bundle.js +2 -0
  2. package/dist/10.2c7c4caeb5771a2a98d1.bundle.js.map +1 -0
  3. package/dist/102.850f372bb910e3a64905.bundle.js +2 -0
  4. package/dist/102.850f372bb910e3a64905.bundle.js.map +1 -0
  5. package/dist/104.2e04965e98d05ada03fd.bundle.js +2 -0
  6. package/dist/104.2e04965e98d05ada03fd.bundle.js.map +1 -0
  7. package/dist/{107.37693ea0237c39fda863.bundle.js → 107.e401af35eca7e21cc9c2.bundle.js} +2 -2
  8. package/dist/107.e401af35eca7e21cc9c2.bundle.js.map +1 -0
  9. package/dist/{108.3c3f9c242e6a3e18fff5.bundle.js → 108.90cf8908233ccb473643.bundle.js} +2 -2
  10. package/dist/108.90cf8908233ccb473643.bundle.js.map +1 -0
  11. package/dist/{11.f4c5533cd200c8568ff6.bundle.js → 11.f912f1a9f37160d23a3b.bundle.js} +2 -2
  12. package/dist/11.f912f1a9f37160d23a3b.bundle.js.map +1 -0
  13. package/dist/{124.6a31dfbe4ac2f9064a29.bundle.js → 124.82728aea87e9d1190441.bundle.js} +2 -2
  14. package/dist/124.82728aea87e9d1190441.bundle.js.map +1 -0
  15. package/dist/{126.48e00b0525b3ef8efbe8.bundle.js → 126.d21b0bf850be03830298.bundle.js} +2 -2
  16. package/dist/126.d21b0bf850be03830298.bundle.js.map +1 -0
  17. package/dist/140.08e0e8799d3d5fefcda5.bundle.js +2 -0
  18. package/dist/140.08e0e8799d3d5fefcda5.bundle.js.map +1 -0
  19. package/dist/141.c16968e963be850e7a7b.bundle.js +2 -0
  20. package/dist/141.c16968e963be850e7a7b.bundle.js.map +1 -0
  21. package/dist/142.0204215ce1bf7b2cf84d.bundle.js +2 -0
  22. package/dist/142.0204215ce1bf7b2cf84d.bundle.js.map +1 -0
  23. package/dist/143.c194ab0648b274f3b554.bundle.js +2 -0
  24. package/dist/143.c194ab0648b274f3b554.bundle.js.map +1 -0
  25. package/dist/145.828376c0cb6b5ba6e015.bundle.js +2 -0
  26. package/dist/145.828376c0cb6b5ba6e015.bundle.js.map +1 -0
  27. package/dist/146.581f1af823b55dc358d6.bundle.js +2 -0
  28. package/dist/146.581f1af823b55dc358d6.bundle.js.map +1 -0
  29. package/dist/147.66395fd5d79176a79c38.bundle.js +2 -0
  30. package/dist/147.66395fd5d79176a79c38.bundle.js.map +1 -0
  31. package/dist/{148.dd250d3cc5aafade33c6.bundle.js → 148.78e7398de964231883f3.bundle.js} +2 -2
  32. package/dist/{148.dd250d3cc5aafade33c6.bundle.js.map → 148.78e7398de964231883f3.bundle.js.map} +1 -1
  33. package/dist/{149.a0873076f2dd40830be9.bundle.js → 149.6eb6ef704b8da7bfc6ce.bundle.js} +2 -2
  34. package/dist/{149.a0873076f2dd40830be9.bundle.js.map → 149.6eb6ef704b8da7bfc6ce.bundle.js.map} +1 -1
  35. package/dist/{150.3bd8af24551408342185.bundle.js → 150.283dd1f6da002f1ca17f.bundle.js} +2 -2
  36. package/dist/{150.3bd8af24551408342185.bundle.js.map → 150.283dd1f6da002f1ca17f.bundle.js.map} +1 -1
  37. package/dist/154.056ec5c8aafbc07484e0.bundle.js +2 -0
  38. package/dist/154.056ec5c8aafbc07484e0.bundle.js.map +1 -0
  39. package/dist/156.e15f9befbcfaf6677387.bundle.js +2 -0
  40. package/dist/156.e15f9befbcfaf6677387.bundle.js.map +1 -0
  41. package/dist/158.29813ed563736e5c85b2.bundle.js +2 -0
  42. package/dist/158.29813ed563736e5c85b2.bundle.js.map +1 -0
  43. package/dist/16.b8bb2389b9f026a298f7.bundle.js +3 -0
  44. package/dist/16.b8bb2389b9f026a298f7.bundle.js.map +1 -0
  45. package/dist/160.d5f5ab14c56efd04e404.bundle.js +2 -0
  46. package/dist/160.d5f5ab14c56efd04e404.bundle.js.map +1 -0
  47. package/dist/161.f142c1fe18346f00882a.bundle.js +2 -0
  48. package/dist/161.f142c1fe18346f00882a.bundle.js.map +1 -0
  49. package/dist/164.d4b744057d28ed5e7e47.bundle.js +2 -0
  50. package/dist/164.d4b744057d28ed5e7e47.bundle.js.map +1 -0
  51. package/dist/166.256169db442fec472d9d.bundle.js +2 -0
  52. package/dist/166.256169db442fec472d9d.bundle.js.map +1 -0
  53. package/dist/167.f79a82f7de6734cca660.bundle.js +2 -0
  54. package/dist/167.f79a82f7de6734cca660.bundle.js.map +1 -0
  55. package/dist/169.16292782069da22a11c0.bundle.js +2 -0
  56. package/dist/169.16292782069da22a11c0.bundle.js.map +1 -0
  57. package/dist/17.675eef636eb095240fab.bundle.js +2 -0
  58. package/dist/17.675eef636eb095240fab.bundle.js.map +1 -0
  59. package/dist/171.2aecfe97c1fa24db3bf3.bundle.js +2 -0
  60. package/dist/171.2aecfe97c1fa24db3bf3.bundle.js.map +1 -0
  61. package/dist/172.558d9080f05080a0dac2.bundle.js +2 -0
  62. package/dist/172.558d9080f05080a0dac2.bundle.js.map +1 -0
  63. package/dist/173.c1546a02befda215609d.bundle.js +2 -0
  64. package/dist/173.c1546a02befda215609d.bundle.js.map +1 -0
  65. package/dist/175.943ac5019fe29113e1f2.bundle.js +2 -0
  66. package/dist/175.943ac5019fe29113e1f2.bundle.js.map +1 -0
  67. package/dist/176.96a2ffd87018134c7b29.bundle.js +2 -0
  68. package/dist/176.96a2ffd87018134c7b29.bundle.js.map +1 -0
  69. package/dist/177.443034c31f85d8ac396c.bundle.js +2 -0
  70. package/dist/177.443034c31f85d8ac396c.bundle.js.map +1 -0
  71. package/dist/180.384be4faad5d0b1716b5.bundle.js +2 -0
  72. package/dist/180.384be4faad5d0b1716b5.bundle.js.map +1 -0
  73. package/dist/181.ce536d7a1f4cb278f82c.bundle.js +2 -0
  74. package/dist/181.ce536d7a1f4cb278f82c.bundle.js.map +1 -0
  75. package/dist/182.6154b3558b619301bfdf.bundle.js +2 -0
  76. package/dist/{182.1b40c7e8a8424e87da32.bundle.js.map → 182.6154b3558b619301bfdf.bundle.js.map} +1 -1
  77. package/dist/183.67e81437028990463d1a.bundle.js +2 -0
  78. package/dist/183.67e81437028990463d1a.bundle.js.map +1 -0
  79. package/dist/20.fbcb31706f03a07e8827.bundle.js +1 -1
  80. package/dist/20.fbcb31706f03a07e8827.bundle.js.map +1 -1
  81. package/dist/21.081b98fe7cc1b3dbbd72.bundle.js +2 -0
  82. package/dist/21.081b98fe7cc1b3dbbd72.bundle.js.map +1 -0
  83. package/dist/{23.b945d0565ded44df49c5.bundle.js → 23.24787bc4590d48521f4b.bundle.js} +2 -2
  84. package/dist/23.24787bc4590d48521f4b.bundle.js.map +1 -0
  85. package/dist/24.7468162b4988a0ad6eaa.bundle.js +2 -0
  86. package/dist/24.7468162b4988a0ad6eaa.bundle.js.map +1 -0
  87. package/dist/{25.9d7a3d8f98840b1fc5da.bundle.js → 25.64b95438d07ae2d82d8c.bundle.js} +2 -2
  88. package/dist/25.64b95438d07ae2d82d8c.bundle.js.map +1 -0
  89. package/dist/{26.a15a1adb6b30ab849e62.bundle.js → 26.7b0b040185949c4eb865.bundle.js} +2 -2
  90. package/dist/26.7b0b040185949c4eb865.bundle.js.map +1 -0
  91. package/dist/{27.83b24ef9ec0fd6964d92.bundle.js → 27.78b1f59da6f702484766.bundle.js} +2 -2
  92. package/dist/27.78b1f59da6f702484766.bundle.js.map +1 -0
  93. package/dist/{3.7f19eec4e1cff6bb8ff2.bundle.js → 3.9b969c666ea9ed46ea4f.bundle.js} +2 -2
  94. package/dist/3.9b969c666ea9ed46ea4f.bundle.js.map +1 -0
  95. package/dist/{30.a2596e679fb09411b854.bundle.js → 30.67e342e8f1485d26a99b.bundle.js} +2 -2
  96. package/dist/30.67e342e8f1485d26a99b.bundle.js.map +1 -0
  97. package/dist/31.133397ed26eda58c7e18.bundle.js +2 -0
  98. package/dist/31.133397ed26eda58c7e18.bundle.js.map +1 -0
  99. package/dist/33.4d23fa109c9184727386.bundle.js +1 -1
  100. package/dist/33.4d23fa109c9184727386.bundle.js.map +1 -1
  101. package/dist/{35.8be1042671722a19f3b4.bundle.js → 35.541a97f880621d5f7031.bundle.js} +2 -2
  102. package/dist/35.541a97f880621d5f7031.bundle.js.map +1 -0
  103. package/dist/36.239dd56c03aeda760f8b.bundle.js +2 -0
  104. package/dist/36.239dd56c03aeda760f8b.bundle.js.map +1 -0
  105. package/dist/{38.f4b561d7ee5b236ba481.bundle.js → 38.c8620e7cbab859b6f236.bundle.js} +2 -2
  106. package/dist/38.c8620e7cbab859b6f236.bundle.js.map +1 -0
  107. package/dist/39.c630c0e36b0dc913bbe3.bundle.js +2 -0
  108. package/dist/39.c630c0e36b0dc913bbe3.bundle.js.map +1 -0
  109. package/dist/{4.186c084105c931abbe1a.bundle.js → 4.d3fb6d0dcca79643bcb3.bundle.js} +2 -2
  110. package/dist/4.d3fb6d0dcca79643bcb3.bundle.js.map +1 -0
  111. package/dist/40.50b40301c8cc69a70457.bundle.js +1 -1
  112. package/dist/40.50b40301c8cc69a70457.bundle.js.map +1 -1
  113. package/dist/42.45ee7b629beac3e06cc2.bundle.js +2 -0
  114. package/dist/42.45ee7b629beac3e06cc2.bundle.js.map +1 -0
  115. package/dist/43.72fbe7e5d290c40db9ec.bundle.js +2 -0
  116. package/dist/43.72fbe7e5d290c40db9ec.bundle.js.map +1 -0
  117. package/dist/{5.5f48e5c6fc10b52dd415.bundle.js → 5.a44aa21343f8bf48f0e0.bundle.js} +2 -2
  118. package/dist/5.a44aa21343f8bf48f0e0.bundle.js.map +1 -0
  119. package/dist/{53.78084dd64a27f7a6d2e8.bundle.js → 53.c6d488d0fb81a54a3e55.bundle.js} +2 -2
  120. package/dist/53.c6d488d0fb81a54a3e55.bundle.js.map +1 -0
  121. package/dist/{54.fe5e554af6ba2c5778c1.bundle.js → 54.6209da75289a30ff366b.bundle.js} +2 -2
  122. package/dist/54.6209da75289a30ff366b.bundle.js.map +1 -0
  123. package/dist/{56.9c6f6ecafc1909c42dda.bundle.js → 56.0d89e5b9f6403aab1c8e.bundle.js} +2 -2
  124. package/dist/56.0d89e5b9f6403aab1c8e.bundle.js.map +1 -0
  125. package/dist/61.6332e06d94ef4426f068.bundle.js +2 -0
  126. package/dist/61.6332e06d94ef4426f068.bundle.js.map +1 -0
  127. package/dist/{62.86f5ed4f7b582a8aa17d.bundle.js → 62.14d5882e16c3da266b6f.bundle.js} +2 -2
  128. package/dist/62.14d5882e16c3da266b6f.bundle.js.map +1 -0
  129. package/dist/{7.c7d8fb1dfdb444052435.bundle.js → 7.8ca1f2ef4d0aa49b93ac.bundle.js} +2 -2
  130. package/dist/7.8ca1f2ef4d0aa49b93ac.bundle.js.map +1 -0
  131. package/dist/{71.4dbbc366049697f736c5.bundle.js → 71.48a75ab912070cdb19f5.bundle.js} +2 -2
  132. package/dist/71.48a75ab912070cdb19f5.bundle.js.map +1 -0
  133. package/dist/9.3b571539df8c3b22cf6e.bundle.js +2 -0
  134. package/dist/9.3b571539df8c3b22cf6e.bundle.js.map +1 -0
  135. package/dist/94.38349f52df66313fbcc0.bundle.js +1 -1
  136. package/dist/94.38349f52df66313fbcc0.bundle.js.map +1 -1
  137. package/dist/97.df243fffeb4322e50f63.bundle.js +2 -0
  138. package/dist/97.df243fffeb4322e50f63.bundle.js.map +1 -0
  139. package/dist/bundle.73c02a0d535f14462730.bundle.js +92 -0
  140. package/dist/bundle.73c02a0d535f14462730.bundle.js.map +1 -0
  141. package/dist/index.html +7 -7
  142. package/dist/js/angular/clustermanagement/templates/modal/add-nodes-dialog.html +2 -2
  143. package/dist/js/angular/clustermanagement/templates/modal/cluster-create-dialog.html +8 -8
  144. package/dist/js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html +1 -1
  145. package/dist/js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html +5 -5
  146. package/dist/js/angular/core/directives/languageselector/templates/languageSelector.html +2 -2
  147. package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +19 -19
  148. package/dist/js/angular/core/directives/queryeditor/templates/query-sample.html +1 -1
  149. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +3 -3
  150. package/dist/js/angular/core/templates/core-errors.html +1 -1
  151. package/dist/js/angular/core/templates/inactive-plugin-warning-page.html +1 -1
  152. package/dist/js/angular/core/templates/search-resource-input.html +3 -3
  153. package/dist/js/angular/externalsync/templates/deleteConnector.html +1 -1
  154. package/dist/js/angular/graphexplore/templates/modal/save-graph.html +1 -1
  155. package/dist/js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html +2 -2
  156. package/dist/js/angular/graphexplore/templates/searchIconInputTemplate.html +3 -3
  157. package/dist/js/angular/import/templates/filesTable.html +12 -12
  158. package/dist/js/angular/import/templates/settingsModal.html +19 -19
  159. package/dist/js/angular/import/templates/textSnippet.html +4 -4
  160. package/dist/js/angular/import/templates/urlImport.html +4 -4
  161. package/dist/js/angular/repositories/templates/fedx-repo.html +15 -15
  162. package/dist/js/angular/repositories/templates/ontop-repo.html +8 -8
  163. package/dist/js/angular/security/templates/modal/default-authorities.html +2 -2
  164. package/dist/js/angular/security/templates/user.html +13 -13
  165. package/dist/js/angular/security/templates/users.html +8 -8
  166. package/dist/js/angular/settings/modal/location-settings.html +1 -1
  167. package/dist/js/angular/templates/modal/add-location.html +3 -3
  168. package/dist/js/angular/templates/modal/edit-location.html +3 -3
  169. package/dist/js/angular/templates/modal/editRepoFile.html +1 -1
  170. package/dist/js/angular/templates/modal/upload-repository-config.html +2 -2
  171. package/dist/pages/autocomplete.html +8 -8
  172. package/dist/pages/choose-repository-type.html +1 -1
  173. package/dist/pages/cluster-management/clusterInfo.html +15 -15
  174. package/dist/pages/connectorsInfo.html +5 -5
  175. package/dist/pages/create-index.html +15 -15
  176. package/dist/pages/createConnector.html +23 -23
  177. package/dist/pages/dependencies.html +12 -12
  178. package/dist/pages/domainRangeInfo.html +6 -6
  179. package/dist/pages/edit.html +7 -7
  180. package/dist/pages/explore.html +10 -10
  181. package/dist/pages/export.html +14 -14
  182. package/dist/pages/find.html +2 -2
  183. package/dist/pages/graph-config/saveGraphConfig.html +22 -22
  184. package/dist/pages/graphs-visualizations.html +47 -47
  185. package/dist/pages/guides.html +6 -6
  186. package/dist/pages/home.html +10 -10
  187. package/dist/pages/import.html +7 -7
  188. package/dist/pages/info.html +16 -16
  189. package/dist/pages/jdbc-create.html +18 -18
  190. package/dist/pages/jdbc.html +3 -3
  191. package/dist/pages/licenseInfo.html +1 -1
  192. package/dist/pages/login.html +2 -2
  193. package/dist/pages/monitor/queries.html +5 -5
  194. package/dist/pages/monitor/resources.html +13 -13
  195. package/dist/pages/namespaces.html +14 -14
  196. package/dist/pages/plugins.html +4 -4
  197. package/dist/pages/rdfClassHierarchyInfo.html +16 -16
  198. package/dist/pages/rdfrank.html +17 -17
  199. package/dist/pages/registerLicenseInfo.html +3 -3
  200. package/dist/pages/repositories.html +20 -20
  201. package/dist/pages/repository.html +37 -37
  202. package/dist/pages/similarity-indexes.html +15 -15
  203. package/dist/pages/sparql-template-create.html +9 -9
  204. package/dist/pages/sparql-templates.html +3 -3
  205. package/dist/pages/sparql.html +8 -8
  206. package/dist/pages/webapi.html +3 -3
  207. package/dist/res/swagger/index.html +27 -27
  208. package/package.json +2 -2
  209. package/dist/10.973caeed3c05ef2cfd1c.bundle.js +0 -2
  210. package/dist/10.973caeed3c05ef2cfd1c.bundle.js.map +0 -1
  211. package/dist/102.93af0905ca1ff2be2dbf.bundle.js +0 -2
  212. package/dist/102.93af0905ca1ff2be2dbf.bundle.js.map +0 -1
  213. package/dist/104.b82229ea4c12400f6f5d.bundle.js +0 -2
  214. package/dist/104.b82229ea4c12400f6f5d.bundle.js.map +0 -1
  215. package/dist/107.37693ea0237c39fda863.bundle.js.map +0 -1
  216. package/dist/108.3c3f9c242e6a3e18fff5.bundle.js.map +0 -1
  217. package/dist/11.f4c5533cd200c8568ff6.bundle.js.map +0 -1
  218. package/dist/124.6a31dfbe4ac2f9064a29.bundle.js.map +0 -1
  219. package/dist/126.48e00b0525b3ef8efbe8.bundle.js.map +0 -1
  220. package/dist/140.8f22a20a0689c072368f.bundle.js +0 -2
  221. package/dist/140.8f22a20a0689c072368f.bundle.js.map +0 -1
  222. package/dist/141.6ffbf225a69b845e5e07.bundle.js +0 -2
  223. package/dist/141.6ffbf225a69b845e5e07.bundle.js.map +0 -1
  224. package/dist/142.355ab1a9716ce7315ad6.bundle.js +0 -2
  225. package/dist/142.355ab1a9716ce7315ad6.bundle.js.map +0 -1
  226. package/dist/143.64b1142c8e48b388717f.bundle.js +0 -2
  227. package/dist/143.64b1142c8e48b388717f.bundle.js.map +0 -1
  228. package/dist/145.9858a584e01b6c01a57c.bundle.js +0 -2
  229. package/dist/145.9858a584e01b6c01a57c.bundle.js.map +0 -1
  230. package/dist/146.15a2396be0b56a454857.bundle.js +0 -2
  231. package/dist/146.15a2396be0b56a454857.bundle.js.map +0 -1
  232. package/dist/147.638cfbfdf711a97e19f1.bundle.js +0 -2
  233. package/dist/147.638cfbfdf711a97e19f1.bundle.js.map +0 -1
  234. package/dist/154.6dadeaa5b9cdab265cb3.bundle.js +0 -2
  235. package/dist/154.6dadeaa5b9cdab265cb3.bundle.js.map +0 -1
  236. package/dist/156.4252f16fc656c91fba0c.bundle.js +0 -2
  237. package/dist/156.4252f16fc656c91fba0c.bundle.js.map +0 -1
  238. package/dist/158.13d4aafb2c7f02af028b.bundle.js +0 -2
  239. package/dist/158.13d4aafb2c7f02af028b.bundle.js.map +0 -1
  240. package/dist/16.61454b9a7360266e544a.bundle.js +0 -3
  241. package/dist/16.61454b9a7360266e544a.bundle.js.map +0 -1
  242. package/dist/160.3b604e0909b8a932d959.bundle.js +0 -2
  243. package/dist/160.3b604e0909b8a932d959.bundle.js.map +0 -1
  244. package/dist/161.c72cc3169ea1191e49e8.bundle.js +0 -2
  245. package/dist/161.c72cc3169ea1191e49e8.bundle.js.map +0 -1
  246. package/dist/164.a03f4da227b54ad97c18.bundle.js +0 -2
  247. package/dist/164.a03f4da227b54ad97c18.bundle.js.map +0 -1
  248. package/dist/166.b4fd0bd3df4985d3e74a.bundle.js +0 -2
  249. package/dist/166.b4fd0bd3df4985d3e74a.bundle.js.map +0 -1
  250. package/dist/167.0e3773d3b16936a2a72a.bundle.js +0 -2
  251. package/dist/167.0e3773d3b16936a2a72a.bundle.js.map +0 -1
  252. package/dist/169.a43d9e76a361ad2cabb5.bundle.js +0 -2
  253. package/dist/169.a43d9e76a361ad2cabb5.bundle.js.map +0 -1
  254. package/dist/17.545bc1027c226502e3b8.bundle.js +0 -2
  255. package/dist/17.545bc1027c226502e3b8.bundle.js.map +0 -1
  256. package/dist/171.584fa763e2fe9a4d34f4.bundle.js +0 -2
  257. package/dist/171.584fa763e2fe9a4d34f4.bundle.js.map +0 -1
  258. package/dist/172.67ba9379059ac602d509.bundle.js +0 -2
  259. package/dist/172.67ba9379059ac602d509.bundle.js.map +0 -1
  260. package/dist/173.fd7ee2abdf75fc0ed3a3.bundle.js +0 -2
  261. package/dist/173.fd7ee2abdf75fc0ed3a3.bundle.js.map +0 -1
  262. package/dist/175.341ea8612291026d2630.bundle.js +0 -2
  263. package/dist/175.341ea8612291026d2630.bundle.js.map +0 -1
  264. package/dist/176.7cdff30cd9372f424163.bundle.js +0 -2
  265. package/dist/176.7cdff30cd9372f424163.bundle.js.map +0 -1
  266. package/dist/177.57ac19484b6430c0f242.bundle.js +0 -2
  267. package/dist/177.57ac19484b6430c0f242.bundle.js.map +0 -1
  268. package/dist/180.f19924b6b550773f9163.bundle.js +0 -2
  269. package/dist/180.f19924b6b550773f9163.bundle.js.map +0 -1
  270. package/dist/181.db05a22a05f9c928b08c.bundle.js +0 -2
  271. package/dist/181.db05a22a05f9c928b08c.bundle.js.map +0 -1
  272. package/dist/182.1b40c7e8a8424e87da32.bundle.js +0 -2
  273. package/dist/183.1ed57fba52ab51806ec3.bundle.js +0 -2
  274. package/dist/183.1ed57fba52ab51806ec3.bundle.js.map +0 -1
  275. package/dist/21.ea150df1291050bc1c4a.bundle.js +0 -2
  276. package/dist/21.ea150df1291050bc1c4a.bundle.js.map +0 -1
  277. package/dist/23.b945d0565ded44df49c5.bundle.js.map +0 -1
  278. package/dist/24.77907cc1d707305663c9.bundle.js +0 -2
  279. package/dist/24.77907cc1d707305663c9.bundle.js.map +0 -1
  280. package/dist/25.9d7a3d8f98840b1fc5da.bundle.js.map +0 -1
  281. package/dist/26.a15a1adb6b30ab849e62.bundle.js.map +0 -1
  282. package/dist/27.83b24ef9ec0fd6964d92.bundle.js.map +0 -1
  283. package/dist/3.7f19eec4e1cff6bb8ff2.bundle.js.map +0 -1
  284. package/dist/30.a2596e679fb09411b854.bundle.js.map +0 -1
  285. package/dist/31.fbcd8b1840a84a281e47.bundle.js +0 -2
  286. package/dist/31.fbcd8b1840a84a281e47.bundle.js.map +0 -1
  287. package/dist/35.8be1042671722a19f3b4.bundle.js.map +0 -1
  288. package/dist/36.8d7becdfce12d9a0de33.bundle.js +0 -2
  289. package/dist/36.8d7becdfce12d9a0de33.bundle.js.map +0 -1
  290. package/dist/38.f4b561d7ee5b236ba481.bundle.js.map +0 -1
  291. package/dist/39.68f59c2a9aeb4c4100c9.bundle.js +0 -2
  292. package/dist/39.68f59c2a9aeb4c4100c9.bundle.js.map +0 -1
  293. package/dist/4.186c084105c931abbe1a.bundle.js.map +0 -1
  294. package/dist/42.87fe547d27ce0c30deef.bundle.js +0 -2
  295. package/dist/42.87fe547d27ce0c30deef.bundle.js.map +0 -1
  296. package/dist/43.34060633fa9548ec3437.bundle.js +0 -2
  297. package/dist/43.34060633fa9548ec3437.bundle.js.map +0 -1
  298. package/dist/5.5f48e5c6fc10b52dd415.bundle.js.map +0 -1
  299. package/dist/53.78084dd64a27f7a6d2e8.bundle.js.map +0 -1
  300. package/dist/54.fe5e554af6ba2c5778c1.bundle.js.map +0 -1
  301. package/dist/56.9c6f6ecafc1909c42dda.bundle.js.map +0 -1
  302. package/dist/61.faf4ab26276a053ccac5.bundle.js +0 -2
  303. package/dist/61.faf4ab26276a053ccac5.bundle.js.map +0 -1
  304. package/dist/62.86f5ed4f7b582a8aa17d.bundle.js.map +0 -1
  305. package/dist/7.c7d8fb1dfdb444052435.bundle.js.map +0 -1
  306. package/dist/71.4dbbc366049697f736c5.bundle.js.map +0 -1
  307. package/dist/9.7bdbee8225f687ec81bc.bundle.js +0 -2
  308. package/dist/9.7bdbee8225f687ec81bc.bundle.js.map +0 -1
  309. package/dist/97.e88574ad257bd44724c3.bundle.js +0 -2
  310. package/dist/97.e88574ad257bd44724c3.bundle.js.map +0 -1
  311. package/dist/bundle.f540ee201846422b1cb9.bundle.js +0 -92
  312. package/dist/bundle.f540ee201846422b1cb9.bundle.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///./src/js/angular/rest/connectors.rest.service.js","webpack:///./src/js/angular/externalsync/controllers.js"],"names":["angular","module","factory","ConnectorsRestService","$inject","$http","getConnectors","get","initConnector","prefix","hasConnector","checkConnector","data","post","headers","jsonToFormData","str","Object","keys","forEach","key","push","encodeURIComponent","join","fromArrayMap","arrayMap","$translate","_","reduce","acc","value","Error","instant","hasOwnProperty","mapCreateValuesToUiValues","values","options","i","length","option","__type","__name","j","__childOptions","child","k","valueK","isDefined","__defaultValue","optionEl","isUndefined","map","String","toJson","_evaluateSparqlQuery","http","repository","query","buildNamePrefix","substring","createConnectorQuery","name","fields","reportError","fcopy","sortObject","obj","newObject","each","childOption","copy","fromJson","e","__label","message","removeEmptyValues","Array","isArray","filter","item","trim","finalString","replace","ConnectorsCtrl","$scope","$repositories","$uibModal","toastr","ModalService","$q","RDF4JRepositoriesRestService","resetProgress","repair","beingBuiltConnector","percentDone","status","processedEntities","estimatedEntities","indexedEntities","entitiesPerSecond","actionName","waitOnRepairStartOnce","eta","inline","iri","openProgressModal","$","extend","doneCallback","modalInstance","dismiss","open","templateUrl","controller","size","backdrop","scope","executeCreate","connector","errorCallback","modal","addStatements","getActiveRepository","update","then","res","existing","success","err","error","getError","finally","loader","controllers","definitions","getLoaderMessage","timeSeconds","Date","now","loaderStartTime","timeHuman","getHumanReadableSeconds","progressMessage","extraMessage","setLoader","isRunning","isLicenseValid","canWriteActiveRepo","connectors","all","connectorIris","createStatusQueryForAny","evaluateSparqlQuery","results","bindings","statusObject","JSON","parse","console","parseFirstBuildingResult","d","split","catch","getOptions","isEmpty","isObject","toPrettyJson","$watch","getActiveLocation","copyConnector","newValues","resolve","result","skipConversion","newConnector","inst","type","openSimpleModal","title","warning","delete","isExternal","indexOf","popoverMsg","force","namePrefix","deleteConnectorQuery","viewQuery","DeleteConnectorCtrl","$uibModalInstance","ok","close","cancel","ExtendNewConnectorCtrl","toQuery","label","addField","index","optionName","newField","defaultValues","splice","addOption","array","deleteOption","addMapOption","deleteMapOption","form","$valid","CreateConnectorCtrl","$controller","this","CreateProgressCtrl","$interval","initProgress","statusIri","createStatusQueryForIri","progressInterval","getFirstStatusFromResult","toFixed","etaSeconds","$on","input","Math","ceil"],"mappings":"+EAAAA,QACKC,OAAO,4CAA6C,IACpDC,QAAQ,wBAAyBC,GAEtCA,EAAsBC,QAAU,CAAC,SAIjC,SAASD,EAAsBE,GAE3B,MAAO,CACHC,cAMJ,WACI,OAAOD,EAAME,IAZO,oBAMpBC,cASJ,SAAuBC,GACnB,OAAOJ,EAAME,IAAI,kCAAyCE,IAT1DC,aAYJ,SAAsBD,GAClB,OAAOJ,EAAME,IAAI,mCAA0CE,IAZ3DE,eAeJ,SAAwBC,GACpB,OAAOP,EAAMQ,KAAK,wBAAgCD,EAAM,CACpDE,QAAS,CACL,eAAgB,oB,gCChChC,mBAiBA,SAASC,EAAeH,GACpB,MAAMI,EAAM,GAIZ,OAHAC,OAAOC,KAAKN,GAAMO,SAAQ,SAAUC,GAChCJ,EAAIK,KAAKC,mBAAmBF,GAAO,IAAME,mBAAmBV,EAAKQ,QAE9DJ,EAAIO,KAAK,KASpB,SAASC,EAAaC,EAAUC,GAC5B,OAAOC,EAAEC,OAA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BX,EAAOS,oBAAoBQ,wBAEhEgH,EAAUrB,OAAO5G,EAAOqI,kBACpBrI,EAAOS,oBAAoBe,cAC3BxB,EAAOS,oBAAoBe,qBAI5C,KAEHxB,EAAOyI,IAAI,YAAY,WACnBR,EAAUrB,OAAO5G,EAAOqI,qBAIhCrI,EAAOS,oBAAsBT,EAAOS,qBAAuB,IAGtDT,EAAOS,oBAAoBU,QAAUnB,EAAOS,oBAAoBW,KACjE8G,IAIJlI,EAAOmF,OAAO,2BAA2B,SAAUzI,GAC3CsD,EAAOS,oBAAoBU,QAAUzE,GACrCwL,OA1tBZtN,QACKC,OAAO,6CANI,CACZ,oDACA,8CAKCgH,WAAW,iBAAkB9B,GAC7B8B,WAAW,yBAA0BgF,GACrChF,WAAW,sBAAuBgG,GAClChG,WAAW,qBAAsBmG,GACjCnG,WAAW,sBAAuB2E,GAClC9G,OAAO,QAwtBZ,WACI,OAAO,SAAUgJ,GACb,OAAOC,KAAKC,KAAKF,OA1fzB3I,EAAe/E,QAAU,CAAC,SAAU,QAAS,gBAAiB,YAAa,SAAU,eAAgB,KAAM,+BAAgC,wBAAyB,cAkVpKwL,EAAoBxL,QAAU,CAAC,SAAU,oBAAqB,cAc9D6L,EAAuB7L,QAAU,CAAC,SAAU,oBAAqB,YAAa,YAAa,UAgE3F6M,EAAoB7M,QAAU,CAAC,SAAU,cAAe,QAAS,oBAAqB,YAAa,YAAa,SAAU,WAqB1HgN,EAAmBhN,QAAU,CAAC,SAAU,YAAa,QAAS,gBAAiB","file":"38.c8620e7cbab859b6f236.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.connectors.service', [])\n .factory('ConnectorsRestService', ConnectorsRestService);\n\nConnectorsRestService.$inject = ['$http'];\n\nconst CONNECTORS_ENDPOINT = 'rest/connectors';\n\nfunction ConnectorsRestService($http) {\n\n return {\n getConnectors,\n initConnector,\n hasConnector,\n checkConnector\n };\n\n function getConnectors() {\n return $http.get(CONNECTORS_ENDPOINT);\n }\n\n function initConnector(prefix) {\n return $http.get(`${CONNECTORS_ENDPOINT}/options?prefix=${prefix}`);\n }\n\n function hasConnector(prefix) {\n return $http.get(`${CONNECTORS_ENDPOINT}/existing?prefix=${prefix}`);\n }\n\n function checkConnector(data) {\n return $http.post(`${CONNECTORS_ENDPOINT}/check`, data, {\n headers: {\n 'Content-Type': 'text/plain'\n }\n });\n }\n}\n","import 'angular/rest/rdf4j.repositories.rest.service';\nimport 'angular/rest/connectors.rest.service';\n\nconst modules = [\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'graphdb.framework.rest.connectors.service'\n];\n\nangular\n .module('graphdb.framework.externalsync.controllers', modules)\n .controller('ConnectorsCtrl', ConnectorsCtrl)\n .controller('ExtendNewConnectorCtrl', ExtendNewConnectorCtrl)\n .controller('CreateConnectorCtrl', CreateConnectorCtrl)\n .controller('CreateProgressCtrl', CreateProgressCtrl)\n .controller('DeleteConnectorCtrl', DeleteConnectorCtrl)\n .filter('ceil', ceil);\n\nfunction jsonToFormData(data) {\n const str = [];\n Object.keys(data).forEach(function (key) {\n str.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));\n });\n return str.join('&');\n}\n\nfunction toArrayMap(map) {\n return _.map(map, function (value, key) {\n return {key: key, value: value};\n });\n}\n\nfunction fromArrayMap(arrayMap, $translate) {\n return _.reduce(arrayMap, function (acc, value) {\n if (value.key === '' && value.value === '') {\n // empty pair, skip it\n } else if (value.key === '') {\n throw new Error($translate.instant('externalsync.empty.value.key.error', {value: value.value}));\n } else if (acc.hasOwnProperty(value.key)) {\n throw new Error($translate.instant('externalsync.duplicate.key.error', {key: value.key}));\n } else {\n acc[value.key] = value.value;\n }\n return acc;\n }, {});\n}\n\nfunction mapCreateValuesToUiValues(values, options) {\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n if (option.__type === 'StringArray') {\n if (!values[option.__name]) {\n values[option.__name] = [''];\n }\n } else if (option.__type === 'OptionArray') {\n if (!values[option.__name]) { // values has no entry for this option\n values[option.__name] = [];\n const optionEl = {};\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'StringArray') {\n optionEl[child.__name] = [''];\n } else {\n optionEl[child.__name] = (!angular.isUndefined(child.__defaultValue) ? child.__defaultValue : '');\n }\n }\n values[option.__name].push(optionEl);\n } else { // values already has en entry for this option\n // Copies the default value for Boolean child options if no explicit value is set\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'Boolean') {\n for (let k = 0; k < values[option.__name].length; k++) {\n const valueK = values[option.__name][k];\n if (!valueK.hasOwnProperty([child.__name]) && angular.isDefined(child.__defaultValue)) {\n valueK[child.__name] = child.__defaultValue;\n }\n }\n }\n }\n }\n } else if (option.__type === 'Map') {\n if (!values[option.__name]) {\n values[option.__name] = [];\n } else {\n values[option.__name] = toArrayMap(values[option.__name]);\n }\n } else if (option.__type === 'JsonString') {\n if (values[option.__name] && !(values[option.__name] instanceof String) && typeof values[option.__name] !== 'string') {\n values[option.__name] = angular.toJson(values[option.__name], 2);\n }\n } else {\n if (angular.isUndefined(values[option.__name])) {\n values[option.__name] = (!angular.isUndefined(option.__defaultValue) ? option.__defaultValue : '');\n }\n }\n }\n\n return values;\n}\n\nfunction _evaluateSparqlQuery(http, repository, query) {\n return http.post('repositories/' + repository, jsonToFormData({query: query}),\n {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/sparql-results+json',\n 'X-GraphDB-Local-Consistency': 'updating'\n }\n });\n}\n\nfunction buildNamePrefix(prefix) {\n return prefix.substring(0, prefix.length - 1) + '/instance#';\n}\n\nfunction createConnectorQuery(name, prefix, fields, options, reportError) {\n // Returns a copy of the parameter obj sorted according to the order in options\n function sortObject(obj, options) {\n const newObject = {};\n _.each(options, function (option) {\n if (angular.isDefined(obj[option.__name])) {\n if (option.__type === 'OptionArray') {\n newObject[option.__name] = [];\n _.each(obj[option.__name], function (childOption) {\n newObject[option.__name].push(sortObject(childOption, option.__childOptions));\n });\n } else {\n newObject[option.__name] = angular.copy(obj[option.__name]);\n }\n }\n });\n return newObject;\n }\n\n const fcopy = sortObject(fields, options);\n\n for (let i = 0; i < options.length; i++) {\n try {\n if (options[i].__type === 'Map') {\n fcopy[options[i].__name] = fromArrayMap(fcopy[options[i].__name], $translate);\n } else if (options[i].__type === 'JsonString') {\n fcopy[options[i].__name] = angular.fromJson(fcopy[options[i].__name]);\n }\n } catch (e) {\n reportError(options[i].__label, e.message);\n return null;\n }\n }\n\n removeEmptyValues(fcopy);\n //escapeValues(fields);\n let finalString = '';\n finalString += 'PREFIX :<' + prefix + '>\\n';\n const namePrefix = buildNamePrefix(prefix);\n finalString += 'PREFIX inst:<' + namePrefix + '>\\n';\n finalString += 'INSERT DATA {\\n';\n finalString += \"\\tinst:\" + name + \" :createConnector '''\\n\"; // eslint-disable-line quotes\n finalString += angular.toJson(fcopy, 2);\n finalString += \"\\n''' .\\n}\\n\"; // eslint-disable-line quotes\n finalString = finalString.replace(/\\\\/g, '\\\\\\\\\\\\');\n return finalString;\n}\n\nfunction createStatusQueryForIri(iri) {\n const statusIri = iri.replace(/\\/instance#.+$/, '#connectorStatus');\n let finalString = '';\n finalString += 'SELECT ?status {\\n';\n finalString += '\\t<' + iri + '> <' + statusIri + '> ?status';\n finalString += '\\n}';\n return finalString;\n}\n\nfunction createStatusQueryForAny(connectors) {\n const connectorIris = _.map(connectors,\n function (k) {\n return '<' + k.value + 'connectorStatus' + '>';\n }).join('|');\n\n if (connectorIris) {\n return 'SELECT ?connector ?status { ?connector ' + connectorIris + ' ?status }';\n }\n\n return null;\n}\n\nfunction repairConnectorQuery(name, prefix) {\n const namePrefix = buildNamePrefix(prefix);\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:repairConnector \"\"\\n' +\n '}';\n}\n\nfunction deleteConnectorQuery(name, prefix, force) {\n const namePrefix = prefix.substring(0, prefix.length - 1) + \"/instance#\";\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:dropConnector \"' + (force ? \"force\" : \"\") + '\"\\n' +\n '}';\n}\n\nfunction removeEmptyValues(data) {\n // remove empty values from array\n if (Array.isArray(data)) {\n data = _.filter(data, function (item) {\n return item !== null && (!item.trim || item.trim() !== '');\n });\n }\n // remove empty values from object values\n Object.keys(data).forEach(function (key) {\n if ((data[key] === '' || data[key] == null) && data[key] !== false) {\n delete data[key];\n } else if (typeof data[key] === 'object') {\n data[key] = removeEmptyValues(data[key]);\n }\n });\n return data;\n}\n\nfunction parseFirstBuildingResult(results) {\n if (results.bindings) {\n for (let i = 0; i < results.bindings.length; i++) {\n try {\n const statusObject = JSON.parse(results.bindings[i].status.value);\n if (statusObject.status === 'BUILDING') {\n return {\n connector: results.bindings[i].connector.value,\n status: statusObject\n };\n }\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n }\n }\n }\n\n return {};\n}\n\nConnectorsCtrl.$inject = ['$scope', '$http', '$repositories', '$uibModal', 'toastr', 'ModalService', '$q', 'RDF4JRepositoriesRestService', 'ConnectorsRestService', '$translate'];\n\nfunction ConnectorsCtrl($scope, $http, $repositories, $uibModal, toastr, ModalService, $q, RDF4JRepositoriesRestService, ConnectorsRestService, $translate) {\n $scope.loader = false;\n\n $scope.controllers = [];\n\n $scope.existing = {};\n\n $scope.definitions = {};\n\n $scope.getLoaderMessage = function () {\n const timeSeconds = (Date.now() - $scope.loaderStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n };\n\n $scope.setLoader = function (isRunning, progressMessage, extraMessage) {\n if (isRunning) {\n $scope.loader = true;\n $scope.loaderStartTime = Date.now();\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n } else {\n $scope.loader = false;\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n }\n };\n\n $scope.initConnector = function (connector) {\n return ConnectorsRestService.initConnector(encodeURIComponent(connector.value))\n .then(function (res) {\n $scope.definitions[connector.key] = res.data;\n\n return ConnectorsRestService.hasConnector(encodeURIComponent(connector.value))\n .then(function (res) {\n $scope.existing[connector.key] = res.data;\n\n });\n });\n };\n\n $scope.getConnectors = function () {\n if (!$scope.isLicenseValid()) {\n return;\n }\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n $scope.setLoader(true, $translate.instant('externalsync.fetching.connectors'), $translate.instant('common.extra.message'));\n\n ConnectorsRestService.getConnectors()\n .then(function (res) {\n $scope.connectors = Object.keys(res.data).map(function (key) {\n return {key: key, value: res.data[key]};\n });\n\n $q.all(_.map($scope.connectors, function (connector) {\n return $scope.initConnector(connector);\n })).finally(function () {\n resetProgress();\n\n const query = createStatusQueryForAny($scope.connectors);\n\n if (query) {\n evaluateSparqlQuery(query)\n .then(function (res) {\n const status = parseFirstBuildingResult(res.data.results);\n if (status.connector) {\n // has a building connector, open progress indicator\n const d = status.connector.split(/#/);\n d[0] = d[0].replace(/\\/instance$/, '#');\n showProgress(d[0], d[1]);\n }\n })\n .finally(function () {\n $scope.setLoader(false);\n });\n } else {\n $scope.setLoader(false);\n }\n });\n }).catch(function (e) {\n $scope.setLoader(false);\n toastr.error(getError(e), $translate.instant('externalsync.could.not.get.connectors.error'));\n });\n\n $scope.existing = {};\n };\n\n $scope.getOptions = function (connector) {\n return $scope.definitions[connector.key];\n };\n\n $scope.isEmpty = function (value) {\n return angular.isObject(value) && Object.keys(value).length === 0;\n };\n\n $scope.toPrettyJson = function (value) {\n return angular.toJson(value, 2);\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, $scope.getConnectors);\n\n $scope.$watch(function () {\n return $repositories.getActiveLocation();\n }, $scope.getConnectors);\n\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function resetProgress(repair) {\n $scope.beingBuiltConnector = {\n percentDone: 0,\n status: {\n processedEntities: 0,\n estimatedEntities: 0,\n indexedEntities: 0,\n entitiesPerSecond: 0\n },\n actionName: repair ? $translate.instant('externalsync.repairing') : $translate.instant('externalsync.creating'),\n waitOnRepairStartOnce: !!repair,\n eta: '-',\n inline: false,\n iri: null\n };\n }\n\n function openProgressModal(prefix, name, repair) {\n resetProgress(repair);\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: false,\n doneCallback: function () {\n $scope.beingBuiltConnector.modalInstance.dismiss('cancel');\n }\n });\n\n $scope.beingBuiltConnector.modalInstance = $uibModal.open({\n templateUrl: 'pages/connectorProgress.html',\n controller: 'CreateProgressCtrl',\n size: 'lg',\n backdrop: 'static',\n scope: $scope\n });\n\n return $scope.beingBuiltConnector.modalInstance;\n }\n\n function showProgress(prefix, name) {\n resetProgress();\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: true,\n doneCallback: function () {\n $scope.beingBuiltConnector.inline = false;\n }\n });\n }\n\n function executeCreate(connector, obj, errorCallback) {\n const modal = openProgressModal(connector.value, obj.name, false);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: obj.query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(connector.value)).then(function (res) {\n $scope.existing[connector.key] = res.data;\n });\n });\n toastr.success($translate.instant('created.connector', {name: obj.name}));\n }, function (err) {\n toastr.error(getError(err));\n errorCallback();\n }).finally(function () {\n modal.dismiss('cancel');\n });\n }\n\n $scope.copyConnector = function (connector, values) {\n let newValues;\n if (!angular.isUndefined(values)) {\n newValues = angular.copy(values);\n newValues.name = newValues.name + '-copy';\n }\n const modal = $uibModal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function () {\n return connector;\n },\n values: function () {\n return angular.isUndefined(newValues) ? {name: '', values: {}} : newValues;\n },\n options: function () {\n return $scope.getOptions(connector);\n }\n }\n });\n\n modal.result.then(function (obj) {\n executeCreate(connector, obj, function () {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.newConnector = function (connector, values) {\n const modal = $uibModal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function () {\n return connector;\n },\n values: function () {\n return angular.isUndefined(values) ? {name: '', values: {}} : values;\n },\n options: function () {\n return $scope.getOptions(connector);\n }\n }\n });\n\n modal.result.then(function (obj) {\n executeCreate(connector, obj, function () {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.repair = function (inst, type) {\n ModalService.openSimpleModal({\n title: $translate.instant('externalsync.confirm.repair'),\n message: $translate.instant('externalsync.repair.warning.msg'),\n warning: true\n }).result\n .then(function () {\n const modal = openProgressModal(type.value, inst.name, true);\n\n const query = repairConnectorQuery(inst.name, type.value);\n\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function (res) {\n $scope.existing[type.key] = res.data;\n });\n });\n toastr.success($translate.instant('externalsync.repair.success.msg', {name: inst.name}));\n }, function (err) {\n toastr.error(getError(err));\n }).finally(function () {\n modal.dismiss('cancel');\n });\n });\n };\n\n $scope.delete = function (inst, type) {\n const isExternal = type.key.indexOf(\"Elastic\") >= 0 || type.key.indexOf(\"Solr\") >= 0;\n\n $uibModal.open({\n templateUrl: 'js/angular/externalsync/templates/deleteConnector.html',\n controller: 'DeleteConnectorCtrl',\n resolve: {\n popoverMsg: function () {\n return isExternal ? $translate.instant('delete.connector.conditional', {type: type.key}) : '';\n }\n }\n }).result\n .then(function(force) {\n $scope.setLoader(true, $translate.instant('externalsync.delete.progress.msg', {name: inst.name}),\n $translate.instant('externalsync.extra.message.warning'));\n\n const query = deleteConnectorQuery(inst.name, type.value, force);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function (res) {\n $scope.existing[type.key] = res.data;\n });\n });\n if (force) {\n toastr.success($translate.instant('externalsync.delete.force.success.msg', {name: inst.name}));\n if (isExternal) {\n toastr.warning($translate.instant('externalsync.delete.remote.warning', {key: type.key}));\n }\n } else {\n toastr.success($translate.instant('externalsync.delete.success.msg', {name: inst.name}));\n }\n }, function (err) {\n toastr.error(getError(err));\n }).finally(function() {\n $scope.setLoader(false);\n });\n });\n };\n\n $scope.viewQuery = function (connector, inst) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n const options = $scope.getOptions(connector);\n return createConnectorQuery(inst.name, connector.value,\n mapCreateValuesToUiValues(inst.values, options), options);\n }\n }\n });\n };\n}\n\nDeleteConnectorCtrl.$inject = ['$scope', '$uibModalInstance', 'popoverMsg'];\nfunction DeleteConnectorCtrl($scope, $uibModalInstance, popoverMsg) {\n $scope.force = false;\n $scope.popoverMsg = popoverMsg;\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.force);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss();\n };\n}\n\nExtendNewConnectorCtrl.$inject = ['$scope', '$uibModalInstance', 'connector', '$uibModal', 'toastr'];\nfunction ExtendNewConnectorCtrl($scope, $uibModalInstance, connector, $uibModal, toastr) {\n\n $scope.connector = connector;\n\n $scope.addField = function (index, optionName) {\n const newField = angular.copy($scope.defaultValues[optionName][0]);\n $scope.values[optionName].splice(index + 1, 0, newField);\n };\n\n $scope.addOption = function (index, array) {\n array.splice(index + 1, 0, '');\n };\n\n $scope.deleteOption = function (index, array) {\n array.splice(index, 1);\n };\n\n $scope.addMapOption = function (index, array) {\n array.splice(index + 1, 0, {key: '', value: ''});\n };\n\n $scope.deleteMapOption = function (index, array) {\n array.splice(index, 1);\n };\n\n function toQuery() {\n return createConnectorQuery($scope.name, connector.value, $scope.values, $scope.options,\n function (label, error) {\n toastr.error(error, label);\n });\n }\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n const query = toQuery();\n\n if (query) {\n $uibModalInstance.close({name: $scope.name, values: $scope.values, options: $scope.options, query: query});\n }\n }\n };\n\n $scope.viewQuery = function () {\n const query = toQuery();\n\n if (query) {\n $uibModal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nCreateConnectorCtrl.$inject = ['$scope', '$controller', '$http', '$uibModalInstance', 'connector', '$uibModal', 'values', 'options'];\n\nfunction CreateConnectorCtrl($scope, $controller, $http, $uibModalInstance, connector, $uibModal, values, options) {\n angular.extend(this, $controller('ExtendNewConnectorCtrl', {\n $scope: $scope,\n $uibModalInstance: $uibModalInstance,\n connector: connector,\n $uibModal: $uibModal\n }));\n $scope.values = values.values;\n $scope.options = options;\n $scope.name = values.name;\n if (!values.skipConversion) {\n $scope.values = mapCreateValuesToUiValues($scope.values, $scope.options);\n }\n $scope.defaultValues = angular.copy($scope.values);\n}\n\n// Note that this is a fancy controller: it's used both for a modal and for a directive.\n// This means you can't rely on custom injection through resolve in the modal and the scope\n// must be shared with the main connectors controller.\nCreateProgressCtrl.$inject = ['$scope', '$interval', '$http', '$repositories', '$translate'];\n\nfunction CreateProgressCtrl($scope, $interval, $http, $repositories, $translate) {\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function initProgress() {\n const query = createStatusQueryForIri($scope.beingBuiltConnector.iri);\n\n // reset iri value so that watch will fire again when we do something with the same connector\n $scope.beingBuiltConnector.iri = null;\n\n $scope.progressInterval = $interval(function () {\n function getFirstStatusFromResult(results) {\n if (results.bindings) {\n if (results.bindings.length > 0) {\n try {\n return JSON.parse(results.bindings[0].status.value);\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n }\n }\n }\n\n return {};\n }\n\n evaluateSparqlQuery(query)\n .then(function (res) {\n const status = getFirstStatusFromResult(res.data.results);\n if (status.status === 'BUILDING') {\n $scope.beingBuiltConnector.status = status;\n $scope.beingBuiltConnector.percentDone = (100 * status.processedEntities / status.estimatedEntities).toFixed(0);\n $scope.beingBuiltConnector.eta = $scope.getHumanReadableSeconds(status.etaSeconds);\n $scope.beingBuiltConnector.actionName = status.repair ? $translate.instant('externalsync.repairing') : $translate.instant('externalsync.creating');\n $scope.beingBuiltConnector.waitOnRepairStartOnce = false;\n } else if (status.status === 'BUILT' && !$scope.beingBuiltConnector.waitOnRepairStartOnce) {\n // done\n $interval.cancel($scope.progressInterval);\n if ($scope.beingBuiltConnector.doneCallback) {\n $scope.beingBuiltConnector.doneCallback();\n }\n }\n });\n }, 1000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel($scope.progressInterval);\n });\n }\n\n $scope.beingBuiltConnector = $scope.beingBuiltConnector || {};\n\n // for modal instance we get the iri before hand and can start progress now\n if (!$scope.beingBuiltConnector.inline && $scope.beingBuiltConnector.iri) {\n initProgress();\n }\n\n // for inline progress we need to watch for the iri value\n $scope.$watch('beingBuiltConnector.iri', function (value) {\n if ($scope.beingBuiltConnector.inline && value) {\n initProgress();\n }\n });\n}\n\nfunction ceil() {\n return function (input) {\n return Math.ceil(input);\n };\n}\n"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[39,134],{39:function(e,n){function t(e,n){return{showToastMessageWithDelay:function(t){return new Promise(r=>{e.success(n.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},81:function(e,n,t){"use strict";t.r(n);t(39),t(5);function r(e,n,t,r,o,i,a,u,s,c,d,g,f,l,p){var w;e.page=1,e.totalPages=5,e.helpHidden=1===f.get(l.HIDE_GRAPH_CONFIG_HELP),e.toggleHelp=function(n){void 0===n&&(n=f.get(l.HIDE_GRAPH_CONFIG_HELP)),1!==n?(f.set(l.HIDE_GRAPH_CONFIG_HELP,1),e.helpHidden=!0):(f.set(l.HIDE_GRAPH_CONFIG_HELP,0),e.helpHidden=!1)},e.fixedVisualCallback=function(n,t){e.newConfig.startIRI=n,e.newConfig.startIRILabel=t,w=!0},e.isDefaultGraph=function(e){return"Minimal"===e.name||"Advanced"===e.name},e.isUserGraph=function(n){return!e.isDefaultGraph(n)},e.getSampleName=function(e,n){const t=e[n+"Description"];return t||(e.id?"Copy of "+e.name:e.name)};const y=c.configName;function m(e){r.warning(e)}function C(n){let t;return"query"===n.startMode&&1===e.page?t=n.startGraphQuery:2===e.page?t=n.expandQuery:3===e.page?t=n.resourceQuery:4===e.page?t=n.predicateLabelQuery:5===e.page&&(t=n.resourcePropertiesQuery),angular.isDefined(t)?t:""}function h(){function i(){e.getAutocompletePromise=s.checkAutocompleteStatus()}u.getGraphConfigSamples().success((function(n){e.samples=_.filter(n,(function(n){return!n.id||e.newConfig.id!==n.id||(e.revertConfig=n,!1)}))})).error((function(e){r.error(getError(e),p.instant("graphexplore.error.graph.configs"))})),e.createGraphConfig=function(){u.createGraphConfig(e.newConfig).success((async function(){await d.showToastMessageWithDelay("graphexplore.saved.new.config"),t.url("graphs-visualizations")})).error((function(e){r.error(getError(e),p.instant("graphexplore.error.could.not.create"))}))},e.updateGraphConfig=function(){u.updateGraphConfig(e.newConfig).success((async function(){await d.showToastMessageWithDelay("graphexplore.saved.config"),t.url("graphs-visualizations")})).error((function(e){r.error(getError(e),p.instant("graphexplore.error.could.not.save"))}))},e.$on("autocompleteStatus",(function(){i()})),i(),e.getNamespacesPromise=g.getNamespaces(e.getActiveRepository());const a=function(e,n,t,r,o,i){n?u.validateQuery(n,t,r,o,i).success((function(){e()})).error((function(e){m(getError(e))})):e()};function c(){f()&&e.$broadcast("addStartFixedNodeAutomatically",{startIRI:e.newConfig.startIRI})}function f(){return 1===e.page&&"node"===e.newConfig.startMode}e.validateCurrentPage=function(n){e.updateModel(),1===e.page?"node"!==e.newConfig.startMode||e.newConfig.startIRI?"query"!==e.newConfig.startMode||e.newConfig.startGraphQuery?"query"===e.newConfig.startMode?a(n,e.newConfig.startGraphQuery,"graph"):n():m(p.instant("graphexplore.provide.query")):m(p.instant("graphexplore.select.start.node")):2===e.page?a(n,e.newConfig.expandQuery,"construct",["node"]):3===e.page?a(n,e.newConfig.resourceQuery,"tuple",["node"],[],["type","label","comment","rank"]):4===e.page?a(n,e.newConfig.predicateLabelQuery,"tuple",["edge"],["label"]):5===e.page&&a(n,e.newConfig.resourcePropertiesQuery,"tuple",["node"],["property","value"])},e.goToPage=function(n){e.page!==n&&e.validateCurrentPage((function(){e.showEditor(),e.page=n,e.notoolbar=1!==e.page}))},e.goToPreviousPage=function(){e.page>1&&e.goToPage(e.page-1),f()&&(w=!1)},e.goToNextPage=function(){c(),("node"!==e.newConfig.startMode||w)&&e.goToPage(e.page+1)},e.saveGraphConfig=function(){c(),f()&&!w||(e.newConfig.startQueryIncludeInferred=e.currentQuery.inference,e.newConfig.startQuerySameAs=e.currentQuery.sameAs,e.validateCurrentPage((function(){e.newConfig.name?e.isUpdate?e.updateGraphConfig(e.newConfig):e.createGraphConfig(e.newConfig):m(p.instant("graphexplore.provide.config.name"))})))},e.updateModel=function(){const n=window.editor.getValue().trim();"query"===e.newConfig.startMode&&1===e.page?e.newConfig.startGraphQuery=n:2===e.page?e.newConfig.expandQuery=n:3===e.page?e.newConfig.resourceQuery=n:4===e.page?e.newConfig.predicateLabelQuery=n:5===e.page&&(e.newConfig.resourcePropertiesQuery=n)},e.setQuery=function(e){window.editor.setValue(e||" ")},e.updateDirty=function(){if(e.revertConfig){const n=C(e.revertConfig),t=window.editor.getValue().trim();e.queryEditorIsDirty=n!==t}},e.updateEditor=function(){n((function(){e.currentQuery.query=C(e.newConfig),o.isActiveRepoOntopType()&&(e.nocount=!0),e.currentQuery.inference=e.newConfig.startQueryIncludeInferred,e.currentQuery.sameAs=e.newConfig.startQuerySameAs,R(),S(e.currentQuery.id)}),100)},e.showEditor=function(){window.editor&&window.editor.xhr&&window.editor.xhr.abort(),e.viewMode="yasr"},e.showPreview=function(){e.currentQuery.outputType="table",e.runQuery()},e.revertEditor=function(){e.setQuery(C(e.revertConfig))},e.$watch("newConfig.startMode",(function(t){"query"===t&&n((function(){e.updateEditor()}),0)})),e.$watch("page",(function(t){("query"===e.newConfig.startMode||t>1)&&n((function(){e.showEditor(),e.updateEditor()}),0)}))}e.newConfig={startQueryIncludeInferred:!0,startQuerySameAs:!0},e.newConfig.startMode="search",e.isUpdate=!1,e.shared=!1,e.encodeQuery=function(e){return encodeURIComponent(e)},y?(e.isUpdate=!0,u.getConfig(y).success((function(n){e.newConfig=n,h()})).error((function(e){r.error(getError(e),p.instant("created.connector",{name:y}))}))):(e.isUpdate=!1,h());const b={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:e.newConfig.startQueryIncludeInferred,sameAs:e.newConfig.startQuerySameAs};function Q(e){}function T(n,t,r){const o=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=n,n?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=t,e.extraMessage=r,o.addClass("hide")):(e.progressMessage="",e.extraMessage="",o.removeClass("hide")),null===e.$$phase&&e.$apply()}function M(t){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}const o=t;if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let t;t=n(o?function(){e.fixSizesOnHorizontalViewModeSwitch(o)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){n.cancel(t)}))}window.yasr&&window.yasr.container&&n((function(){window.yasr.container.resize()}),100)}function v(){M(!0)}function S(e){n((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function x(n,t){e.executedQueryTab=e.currentQuery,t&&"SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType()?r.warning(p.instant("query.editor.warning.msg")):"update"!==window.editor.getQueryMode()?(e.explainRequested=t,e.queryIsRunning||(n?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.viewMode="editor",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch(),T(!0,p.instant("evaluating.query.msg")),window.editor.query())):r.warning(p.instant("cannot.execute.update.error"))}function E(){T(!0,p.instant("common.refreshing.namespaces"),p.instant("common.extra.message")),g.getRepositoryNamespaces().success((function(n){const t={};n.results.bindings.forEach((function(e){t[e.prefix.value]=e.namespace.value})),e.namespaces=t})).error((function(n){e.repositoryError=getError(n)})).finally((function(){T(!1)}))}function q(){i.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){let n=getError(e);return r.error(n,p.instant("common.add.known.prefixes.error")),!0}))}function I(n){let t=void 0;return angular.forEach(e.tabsData,(function(e){if(e.name===n.name&&e.query===n.body)return t=e.id,e})),t}function R(){e.tabsData=[e.currentQuery];let t=e.currentQuery;null==e.currentQuery.query||""===e.currentQuery.query?window.editor.setValue(" "):window.editor.setValue(e.currentQuery.query),n((function(){e.currentTabConfig={},e.currentTabConfig.queryType=t.queryType,e.currentTabConfig.resultsCount=t.resultsCount,e.currentTabConfig.offset=t.offset,e.currentTabConfig.allResultsCount=t.allResultsCount,e.currentTabConfig.page=t.page,e.currentTabConfig.pageSize=t.pageSize,e.currentTabConfig.timeFinished=t.timeFinished,e.currentTabConfig.timeTook=t.timeTook,e.currentTabConfig.sizeDelta=t.sizeDelta,e.$apply()}),0),$("#yasr").css("padding","0")}function P(e){return $(e).attr("data-id")}e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.tabsData=e.tabs=[b],e.saveTab=function(n){const t=function(n){for(let t=0;t<e.tabsData.length;t++){if(e.tabsData[t].id===n)return t}}(n);if(void 0===t)return{};const r=e.tabsData[t];return e.saveQueryToLocal(r),r},e.loadTab=R,e.addNewTab=function(e,n,t){},e.runQuery=x,e.getNamespaces=E,e.changePagination=function(){x(!0,e.explainRequested)},e.toggleSampleQueries=function(){},e.addKnownPrefixes=q,e.getExistingTabId=I,e.querySelected=function(n){const t=I(n);e.toggleSampleQueries(),angular.isDefined(t)?S(t):e.addNewTab(null,n.name,n.body)},e.saveQueryToLocal=Q,e.setLoader=T,e.getLoaderMessage=function(){const n=(Date.now()-e.queryStartTime)/1e3,t=e.getHumanReadableSeconds(n);let r;r=e.progressMessage?e.progressMessage+"... "+t:p.instant("common.running.operation",{timeHuman:t});e.extraMessage&&n>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=M,e.changeViewMode=function(t){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,M(),$(".dataTables_filter").remove(),$(".resultsTable").remove(),n((function(){R(),S(t)}),100)},e.showHideEditor=v,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!0,e.orientationViewMode||v(),e.getActiveRepository()&&E(),e.$on("$destroy",(function(){window.editor=null,window.yasr=null})),$("textarea").on("paste",(function(){n((function(){q()}),0)})),e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(){e.currentQuery})),e.$on("tabAction",(function(n,t){t.relatedTarget&&e.saveTab(P(t.relatedTarget)),e.loadTab(P(t.target))})),e.$on("deleteAllexeptSelected",(function(n,t){e.tabsData=t,e.tabs=t})),e.currentQuery=angular.copy(b),e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.getResultsDescription=function(){},e.getUpdateDescription=function(){},e.getStaleWarningMessage=function(){}}angular.module("graphdb.framework.graphexplore.controllers.graphviz.config",["graphdb.framework.utils.notifications","graphdb.framework.utils.localstorageadapter"]).controller("GraphConfigCtrl",r),r.$inject=["$scope","$timeout","$location","toastr","$repositories","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","Notifications","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","$translate"]}}]);
2
+ //# sourceMappingURL=39.c630c0e36b0dc913bbe3.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/graphexplore/controllers/graphs-config.controller.js"],"names":["Notifications","toastr","$translate","showToastMessageWithDelay","message","Promise","r","success","instant","setTimeout","angular","module","factory","$inject","GraphConfigCtrl","$scope","$timeout","$location","$repositories","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","selectedFixedNodeChanged","page","totalPages","helpHidden","get","HIDE_GRAPH_CONFIG_HELP","toggleHelp","value","undefined","set","fixedVisualCallback","uri","label","newConfig","startIRI","startIRILabel","isDefaultGraph","sample","name","isUserGraph","getSampleName","property","extra","id","configName","showInvalidMsg","warning","getQueryForCurrentPage","config","query","startMode","startGraphQuery","expandQuery","resourceQuery","predicateLabelQuery","resourcePropertiesQuery","isDefined","initForConfig","checkAutocompleteStatus","getAutocompletePromise","getGraphConfigSamples","data","samples","_","filter","s","revertConfig","error","getError","createGraphConfig","async","url","updateGraphConfig","$on","getNamespacesPromise","getNamespaces","getActiveRepository","validateQueryWithCallback","successCallback","queryType","params","all","oneOf","validateQuery","broadcastAddStartFixedNodeEvent","checkPageAndMode","$broadcast","validateCurrentPage","updateModel","goToPage","nextPage","showEditor","notoolbar","goToPreviousPage","goToNextPage","saveGraphConfig","startQueryIncludeInferred","currentQuery","inference","startQuerySameAs","sameAs","isUpdate","window","editor","getValue","trim","setQuery","setValue","updateDirty","q1","q2","queryEditorIsDirty","updateEditor","isActiveRepoOntopType","nocount","loadTab","selectTab","xhr","abort","viewMode","showPreview","outputType","runQuery","revertEditor","$watch","shared","encodeQuery","encodeURIComponent","getConfig","defaultTabConfig","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","cancel","yasr","container","resize","showHideEditor","$","tab","changePage","explain","executedQueryTab","getQueryType","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","msg","getExistingTabId","existingTabId","tabsData","item","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","queryExists","tabs","saveTab","idx","i","length","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","on","$watchCollection","tabEvent","relatedTarget","target","copy","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","controller"],"mappings":"+EAMA,SAASA,EAAcC,EAAQC,GAC3B,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBL,EAAOM,QAAQL,EAAWM,QAAQJ,IAClCK,WAAWH,EAAG,SApB1BI,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBZ,GAE9BA,EAAca,QAAU,CAAC,SAAU,e,gCCJnC,kBAYA,SAASC,EAAgBC,EAAQC,EAAUC,EAAWhB,EAAQiB,EAAeC,EAAmBC,EAASC,EAAwBC,EAAyBC,EAAcvB,EAAewB,EAA8BC,EAAqBC,EAAQxB,GAoB9O,IAAIyB,EAlBJZ,EAAOa,KAAO,EACdb,EAAOc,WAAa,EAEpBd,EAAOe,WAAwE,IAA3DL,EAAoBM,IAAIL,EAAOM,wBAEnDjB,EAAOkB,WAAa,SAAUC,QACZC,IAAVD,IACAA,EAAQT,EAAoBM,IAAIL,EAAOM,yBAE7B,IAAVE,GACAT,EAAoBW,IAAIV,EAAOM,uBAAwB,GACvDjB,EAAOe,YAAa,IAEpBL,EAAoBW,IAAIV,EAAOM,uBAAwB,GACvDjB,EAAOe,YAAa,IAK5Bf,EAAOsB,oBAAsB,SAAUC,EAAKC,GACxCxB,EAAOyB,UAAUC,SAAWH,EAC5BvB,EAAOyB,UAAUE,cAAgBH,EACjCZ,GAA2B,GAG/BZ,EAAO4B,eAAiB,SAAUC,GAC9B,MAAwB,YAAhBA,EAAOC,MAAsC,aAAhBD,EAAOC,MAGhD9B,EAAO+B,YAAc,SAAUF,GAC3B,OAAQ7B,EAAO4B,eAAeC,IAGlC7B,EAAOgC,cAAgB,SAAUH,EAAQI,GACrC,MAAMC,EAAQL,EAAOI,EAAW,eAChC,OAAIC,IAKOL,EAAOM,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rP,QACKC,OAAO,6DAA8D,CAClE,wCACA,gDAEHqP,WAAW,kBAAmBlP,GAEnCA,EAAgBD,QAAU,CAAC,SAAU,WAAY,YAAa,SAAU,gBAAiB,oBAAqB,UAAW,yBAA0B,0BAA2B,eAAgB,gBAAiB,+BAAgC,sBAAuB,SAAU","file":"39.c630c0e36b0dc913bbe3.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr', '$translate'];\n\nfunction Notifications(toastr, $translate) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success($translate.instant(message));\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.graphexplore.controllers.graphviz.config', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('GraphConfigCtrl', GraphConfigCtrl);\n\nGraphConfigCtrl.$inject = ['$scope', '$timeout', '$location', 'toastr', '$repositories', 'SparqlRestService', '$filter', 'GraphConfigRestService', 'AutocompleteRestService', '$routeParams', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction GraphConfigCtrl($scope, $timeout, $location, toastr, $repositories, SparqlRestService, $filter, GraphConfigRestService, AutocompleteRestService, $routeParams, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys, $translate) {\n\n $scope.page = 1;\n $scope.totalPages = 5;\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP) === 1;\n\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n var selectedFixedNodeChanged;\n $scope.fixedVisualCallback = function (uri, label) {\n $scope.newConfig.startIRI = uri;\n $scope.newConfig.startIRILabel = label;\n selectedFixedNodeChanged = true;\n };\n\n $scope.isDefaultGraph = function (sample) {\n return (sample.name === 'Minimal' || sample.name === 'Advanced');\n };\n\n $scope.isUserGraph = function (sample) {\n return !$scope.isDefaultGraph(sample);\n };\n\n $scope.getSampleName = function (sample, property) {\n const extra = sample[property + 'Description'];\n if (extra) {\n // Sample has description, use it\n return extra;\n } else {\n // Sample is a copy of existing config, prepend Copy of to name\n return sample.id ? 'Copy of ' + sample.name : sample.name;\n }\n };\n\n const getGraphConfigSamples = function () {\n GraphConfigRestService.getGraphConfigSamples()\n .success(function (data) {\n $scope.samples = _.filter(data, function (s) {\n // Skip the currently edited config from samples and store it into a revert variable\n if (!s.id || $scope.newConfig.id !== s.id) {\n return true;\n } else {\n $scope.revertConfig = s;\n return false;\n }\n });\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.graph.configs'));\n });\n };\n\n const configName = $routeParams.configName;\n $scope.newConfig = {startQueryIncludeInferred: true, startQuerySameAs: true};\n $scope.newConfig.startMode = 'search';\n $scope.isUpdate = false;\n $scope.shared = false;\n\n $scope.encodeQuery = function (query) {\n return encodeURIComponent(query);\n };\n\n function showInvalidMsg(message) {\n toastr.warning(message);\n }\n\n if (configName) {\n $scope.isUpdate = true;\n GraphConfigRestService.getConfig(configName)\n .success(function (data) {\n $scope.newConfig = data;\n initForConfig();\n })\n .error(function (data) {\n toastr.error(getError(data), $translate.instant('created.connector', {name: configName}));\n });\n } else {\n $scope.isUpdate = false;\n initForConfig();\n }\n\n function getQueryForCurrentPage(config) {\n let query;\n\n if (config.startMode === 'query' && $scope.page === 1) {\n query = config.startGraphQuery;\n } else if ($scope.page === 2) {\n query = config.expandQuery;\n } else if ($scope.page === 3) {\n query = config.resourceQuery;\n } else if ($scope.page === 4) {\n query = config.predicateLabelQuery;\n } else if ($scope.page === 5) {\n query = config.resourcePropertiesQuery;\n }\n\n return angular.isDefined(query) ? query : '';\n }\n\n function initForConfig() {\n getGraphConfigSamples();\n $scope.createGraphConfig = function () {\n GraphConfigRestService.createGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('graphexplore.saved.new.config');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.could.not.create'));\n });\n };\n\n $scope.updateGraphConfig = function () {\n GraphConfigRestService.updateGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('graphexplore.saved.config');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), $translate.instant('graphexplore.error.could.not.save'));\n });\n };\n\n function checkAutocompleteStatus() {\n $scope.getAutocompletePromise = AutocompleteRestService.checkAutocompleteStatus();\n }\n\n $scope.$on('autocompleteStatus', function() {\n checkAutocompleteStatus();\n });\n\n checkAutocompleteStatus();\n $scope.getNamespacesPromise = RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository());\n\n const validateQueryWithCallback = function (successCallback, query, queryType, params, all, oneOf) {\n if (!query) {\n successCallback();\n } else {\n GraphConfigRestService.validateQuery(query, queryType, params, all, oneOf)\n .success(function () {\n successCallback();\n }).error(function (data) {\n showInvalidMsg(getError(data));\n });\n }\n };\n\n $scope.validateCurrentPage = function (successCallback) {\n $scope.updateModel();\n\n if ($scope.page === 1) {\n if ($scope.newConfig.startMode === 'node' && !$scope.newConfig.startIRI) {\n showInvalidMsg($translate.instant('graphexplore.select.start.node'));\n } else if ($scope.newConfig.startMode === 'query' && !$scope.newConfig.startGraphQuery) {\n showInvalidMsg($translate.instant('graphexplore.provide.query'));\n } else if ($scope.newConfig.startMode === 'query') {\n validateQueryWithCallback(successCallback, $scope.newConfig.startGraphQuery, 'graph')\n } else {\n successCallback();\n }\n } else if ($scope.page === 2) {\n validateQueryWithCallback(successCallback, $scope.newConfig.expandQuery, 'construct', ['node'])\n } else if ($scope.page === 3) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourceQuery, 'tuple', ['node'], [], ['type', 'label', 'comment', 'rank']);\n } else if ($scope.page === 4) {\n validateQueryWithCallback(successCallback, $scope.newConfig.predicateLabelQuery, 'tuple', ['edge'], ['label']);\n } else if ($scope.page === 5) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourcePropertiesQuery, 'tuple', ['node'], ['property', 'value']);\n }\n };\n\n $scope.goToPage = function (nextPage) {\n if ($scope.page === nextPage) {\n // already there\n return;\n }\n\n $scope.validateCurrentPage(function () {\n $scope.showEditor();\n $scope.page = nextPage;\n $scope.notoolbar = $scope.page !== 1;\n });\n };\n\n $scope.goToPreviousPage = function () {\n if ($scope.page > 1) {\n $scope.goToPage($scope.page - 1);\n }\n\n if (checkPageAndMode()) {\n selectedFixedNodeChanged = false;\n }\n };\n\n $scope.goToNextPage = function () {\n broadcastAddStartFixedNodeEvent();\n if ($scope.newConfig.startMode !== 'node' || selectedFixedNodeChanged) {\n $scope.goToPage($scope.page + 1);\n }\n };\n\n function broadcastAddStartFixedNodeEvent() {\n if (checkPageAndMode()) {\n $scope.$broadcast('addStartFixedNodeAutomatically', {startIRI: $scope.newConfig.startIRI});\n }\n }\n\n function checkPageAndMode() {\n return $scope.page === 1 && $scope.newConfig.startMode === 'node';\n }\n\n $scope.saveGraphConfig = function () {\n broadcastAddStartFixedNodeEvent();\n\n if (checkPageAndMode() && !selectedFixedNodeChanged) {\n return;\n }\n\n $scope.newConfig.startQueryIncludeInferred = $scope.currentQuery.inference;\n $scope.newConfig.startQuerySameAs = $scope.currentQuery.sameAs;\n\n $scope.validateCurrentPage(function () {\n if (!$scope.newConfig.name) {\n showInvalidMsg($translate.instant('graphexplore.provide.config.name'));\n return;\n }\n $scope.isUpdate ? $scope.updateGraphConfig($scope.newConfig) : $scope.createGraphConfig($scope.newConfig);\n });\n };\n\n $scope.updateModel = function () {\n const query = window.editor.getValue().trim();\n if ($scope.newConfig.startMode === 'query' && $scope.page === 1) {\n $scope.newConfig.startGraphQuery = query;\n } else if ($scope.page === 2) {\n $scope.newConfig.expandQuery = query;\n } else if ($scope.page === 3) {\n $scope.newConfig.resourceQuery = query;\n } else if ($scope.page === 4) {\n $scope.newConfig.predicateLabelQuery = query;\n } else if ($scope.page === 5) {\n $scope.newConfig.resourcePropertiesQuery = query;\n }\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n $scope.updateDirty = function () {\n if ($scope.revertConfig) {\n const q1 = getQueryForCurrentPage($scope.revertConfig);\n const q2 = window.editor.getValue().trim();\n $scope.queryEditorIsDirty = q1 !== q2;\n }\n };\n\n // Updates the position of the query editor to match the current div placeholder\n // and sets the editor's query to the relevant query from the model.\n $scope.updateEditor = function () {\n $timeout(function () {\n $scope.currentQuery.query = getQueryForCurrentPage($scope.newConfig);\n // // Check for ontop repository and override nocount property (it's default value is false)\n if ($repositories.isActiveRepoOntopType()) {\n $scope.nocount = true;\n }\n $scope.currentQuery.inference = $scope.newConfig.startQueryIncludeInferred;\n $scope.currentQuery.sameAs = $scope.newConfig.startQuerySameAs;\n loadTab();\n selectTab($scope.currentQuery.id);\n }, 100);\n\n };\n\n $scope.showEditor = function () {\n if (window.editor && window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.revertEditor = function () {\n $scope.setQuery(getQueryForCurrentPage($scope.revertConfig));\n };\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('newConfig.startMode', function (value) {\n if (value === 'query') {\n $timeout(function () {\n $scope.updateEditor();\n }, 0);\n }\n });\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('page', function (value) {\n if ($scope.newConfig.startMode === 'query' || value > 1) {\n $timeout(function () {\n $scope.showEditor();\n $scope.updateEditor();\n }, 0);\n }\n });\n }\n\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n // But Why? Can't we reuse it instead of borrow?\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: $scope.newConfig.startQueryIncludeInferred,\n sameAs: $scope.newConfig.startQuerySameAs\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message;\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = $translate.instant('common.running.operation', {timeHuman: timeHuman});\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const codemirrorWrapperSelector = '.CodeMirror-wrap';\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector(codemirrorWrapperSelector)) {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView)\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector(codemirrorWrapperSelector).style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (explain && !(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning($translate.instant('query.editor.warning.msg'));\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning($translate.instant('cannot.execute.update.error'));\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch()\n }\n\n setLoader(true, $translate.instant('evaluating.query.msg'));\n window.editor.query();\n }\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, $translate.instant('common.refreshing.namespaces'), $translate.instant('common.extra.message'));\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n let msg = getError(data);\n toastr.error(msg, $translate.instant('common.add.known.prefixes.error'));\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n let tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query == null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query);\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove padding of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n }\n\n}\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[4,113],{42:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",n),n.$inject=["$http"];function n(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const n=$.param({force:t});return e.delete("rest/cluster/config?"+n)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},58:function(e,t,n){"use strict";n.r(t),n.d(t,"NodeState",(function(){return o})),n.d(t,"LinkState",(function(){return r}));n(4),n(42);angular.module("graphdb.framework.clustermanagement.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",s).controller("CreateClusterCtrl",l).controller("DeleteClusterCtrl",c).controller("EditClusterCtrl",d).controller("AddLocationFromClusterCtrl",u).controller("AddNodesDialogCtrl",f).controller("RemoveNodesDialogCtrl",m).factory("RemoteLocationsService",i);const o={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER",DELETED:"DELETED"},r={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION"};function s(e,t,n,s,a,l,c,i,u,d,g,f,m,p,C,h){let _;function L(t){_||(_=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{_=null,e.childContext.redraw()}))}function N(){return C.getLocationsWithRpcAddresses().then(t=>{const n=t.find(e=>e.isLocal);n&&(n.endpoint=e.currentNode.endpoint,n.rpcAddress=e.currentNode.address),e.clusterModel.locations=t})}function $(t){s.success(t),e.getClusterConfiguration()}function v(e,t,n){let o=e.message||e;400===t&&Array.isArray(e)?o=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412===t&&(o=Object.keys(e).reduce((t,n)=>t+`<div>${n} - ${e[n]}</div>`,"")),s.error(o,n,{allowHtml:!0})}e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=o,e.leaderChanged=!1,e.currentLeader=null,e.childContext={},e.shouldShowClusterSettingsPanel=!1,e.onopen=e.onclose=()=>angular.noop(),e.toggleSidePanel=()=>{e.shouldShowClusterSettingsPanel=!e.shouldShowClusterSettingsPanel},e.toggleLegend=()=>{e.childContext.toggleLegend&&e.childContext.toggleLegend()},e.setLoader=function(t,n){g.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=g((function(){e.loader=t}),50)):e.loader=!1},e.childContext.selectNode=function(t){e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},e.getLoaderMessage=function(){return e.loaderMessage||p.instant("common.loading")},e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=function(){return f.getClusterStatus().then((function(t){const n=t.data.slice(),s=n.find(e=>e.nodeState===o.LEADER);var a,l;a=e.currentLeader,(l=s)&&a&&a.address===l.address||(e.currentLeader=s,e.leaderChanged=!0),e.currentNode=n.find(t=>t.address===e.currentNode.address);const c=[];s&&Object.keys(s.syncStatus).forEach(e=>{const t=s.syncStatus[e];t!==r.NO_CONNECTION&&c.push({id:`${s.address}-${e}`,source:s.address,target:e,status:t})}),e.clusterModel.hasCluster=!0,e.clusterModel.nodes=n,e.clusterModel.links=c})).catch((function(t){404===t.status&&(e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null)}))},e.showCreateClusterDialog=function(){l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.finally((function(){N(),L(!0)}))},e.showDeleteDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then((function(t){const n=p.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,n),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>e===o.DELETED)){const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");s.success(e)}else{const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),n=Object.keys(t.data).reduce((e,n)=>e+`<div>${n} - ${t.data[n]}</div>`,"");s.success(n,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=p.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete"),n=Object.keys(e.data).reduce((t,n)=>t+`<div>${n} - ${e.data[n]}</div>`,"");s.error(n,t,{allowHtml:!0})}).finally(()=>{e.setLoader(!1),L(!0),h.$broadcast("reloadLocations")})}))},e.showEditConfigurationDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:function(){return{clusterConfiguration:e.clusterConfiguration}}}}).result.finally((function(){L(!0)}))},e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>N()),e.showAddNodeToClusterDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then((function(t){const n=p.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.rpcAddress);f.addNodesToCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.add_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.add_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0)})})).finally(()=>N())},e.showRemoveNodesFromClusterDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const n=p.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.address);f.removeNodesFromCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.remove_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0)})}))},(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=u((function(){L()}),1e3);e.$on("$destroy",(function(){u.cancel(t)}))});const S=angular.element(i),E=function(){e.childContext.resize()};S.bind("resize",E);const T=function(t){const n=t.target,o=document.getElementById("nodeTooltip");e.selectedNode&&o!==n&&!o.contains(n)&&e.childContext.selectNode(null)};S.bind("mousedown",T),e.$on("$destroy",(function(){S.unbind("resize",E),S.unbind("mousedown",T)}))}s.$inject=["$scope","$http","$q","toastr","$repositories","$modal","$sce","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope"];const a=function(){const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"};function l(e,t,n,o,r,s,l,c,i,u){e.pageTitle=s.instant("cluster_management.cluster_page.create_page_title"),e.autofocusId="autofocus",e.errors=[],e.clusterConfiguration={electionMinTimeout:8e3,electionRangeTimeout:6e3,heartbeatInterval:2e3,messageSizeKB:64,verificationTimeout:1500,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.getAdvancedOptionsClass=a,e.createCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),o.createCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.create_failed")),e.errors.splice(0),412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n?e.errors.push(...t):409===n&&e.errors.push(t)}(t.data,t.status)})).finally(()=>{e.setLoader(!1),u.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,n=e.selectedLocations&&e.selectedLocations.length>=2;return t&&n},e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),300):e.loader=!1},e.addNodeToList=function(t){t.rpcAddress&&(e.selectedLocations.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,n){n.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(n))},e.addLocation=function(){i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){e.isClusterConfigurationValid()?e.createCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}function c(e,t){e.forceDelete=!1,e.ok=function(){t.close(e.forceDelete)},e.cancel=function(){t.dismiss("cancel")}}function i(e,t,n,o,r){return{addLocation:function(){let e;return n.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(n=>(e=n,e.isLocal=!1,e.endpoint=e.uri,function(e){let n;return o.addLocation(e).catch(e=>{const n=getError(e.data,e.status);return t.error(n,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return n=t.find(t=>t.endpoint===e.uri),n})}(e)))},getLocationsWithRpcAddresses:s};function s(){return o.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const n=getError(e.data,e.status);t.error(n,r.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return o.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}function u(e,t,n,o,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=g(o),e.isValidLocation=function(){return(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1},e.ok=function(){e.newLocation?t.close(e.newLocation):n.error(r.instant("location.cannot.be.empty.error"))},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,n,o,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=angular.copy(a.clusterConfiguration),e.loader=!1,e.updateCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),o.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===n||"string"==typeof t?e.errors.push(t):412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n&&e.errors.push(...t)}(t.data,t.status)})).finally(()=>e.setLoader(!1))},e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),300):e.loader=!1},e.ok=function(){e.isClusterConfigurationValid()?e.updateCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}l.$inject=["$scope","$modalInstance","$timeout","ClusterRestService","toastr","$translate","data","$modal","RemoteLocationsService","$rootScope"],c.$inject=["$scope","$modalInstance"],i.$inject=["$http","toastr","$modal","LocationsRestService","$translate"],u.$inject=["$scope","$modalInstance","toastr","productInfo","$translate"],d.$inject=["$scope","$modalInstance","$timeout","ClusterRestService","toastr","$translate","data"];const g=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion};function f(e,t,n,o,r){const s=angular.copy(n.clusterConfiguration),a=angular.copy(n.clusterModel);e.nodes=[],e.clusterNodes=a.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint})),e.locations=a.locations.filter(e=>!s.nodes.includes(e.rpcAddress)),e.locations.forEach(e=>e.isNew=!0),e.addNodeToList=function(t){t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,n){e.nodes.splice(t,1),e.locations.push(n)},e.addLocation=function(){r.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){t.close(e.nodes)},e.cancel=function(){t.dismiss("cancel")}}function m(e,t,n){const o=angular.copy(n.clusterModel);e.clusterNodes=o.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=function(t,n){n.shouldRemove=!n.shouldRemove,n.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=function(){const n=e.clusterNodes.filter(e=>e.shouldRemove);t.close(n)},e.cancel=function(){t.dismiss("cancel")}}f.$inject=["$scope","$modalInstance","data","$modal","RemoteLocationsService"],m.$inject=["$scope","$modalInstance","data"]}}]);
2
- //# sourceMappingURL=4.186c084105c931abbe1a.bundle.js.map
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[4,113],{42:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",n),n.$inject=["$http"];function n(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const n=$.param({force:t});return e.delete("rest/cluster/config?"+n)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},58:function(e,t,n){"use strict";n.r(t),n.d(t,"NodeState",(function(){return o})),n.d(t,"LinkState",(function(){return r}));n(4),n(42);angular.module("graphdb.framework.clustermanagement.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.repositories.service","graphdb.framework.rest.cluster.service","toastr","pageslide-directive"]).controller("ClusterManagementCtrl",s).controller("CreateClusterCtrl",l).controller("DeleteClusterCtrl",c).controller("EditClusterCtrl",d).controller("AddLocationFromClusterCtrl",u).controller("AddNodesDialogCtrl",f).controller("RemoveNodesDialogCtrl",m).factory("RemoteLocationsService",i);const o={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER",DELETED:"DELETED"},r={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION"};function s(e,t,n,s,a,l,c,i,u,d,g,f,m,p,C,h){let _;function L(t){_||(_=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{_=null,e.childContext.redraw()}))}function N(){return C.getLocationsWithRpcAddresses().then(t=>{const n=t.find(e=>e.isLocal);n&&(n.endpoint=e.currentNode.endpoint,n.rpcAddress=e.currentNode.address),e.clusterModel.locations=t})}function $(t){s.success(t),e.getClusterConfiguration()}function v(e,t,n){let o=e.message||e;400===t&&Array.isArray(e)?o=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412===t&&(o=Object.keys(e).reduce((t,n)=>t+`<div>${n} - ${e[n]}</div>`,"")),s.error(o,n,{allowHtml:!0})}e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=o,e.leaderChanged=!1,e.currentLeader=null,e.childContext={},e.shouldShowClusterSettingsPanel=!1,e.onopen=e.onclose=()=>angular.noop(),e.toggleSidePanel=()=>{e.shouldShowClusterSettingsPanel=!e.shouldShowClusterSettingsPanel},e.toggleLegend=()=>{e.childContext.toggleLegend&&e.childContext.toggleLegend()},e.setLoader=function(t,n){g.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=g((function(){e.loader=t}),50)):e.loader=!1},e.childContext.selectNode=function(t){e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},e.getLoaderMessage=function(){return e.loaderMessage||p.instant("common.loading")},e.getClusterConfiguration=()=>f.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=function(){return f.getClusterStatus().then((function(t){const n=t.data.slice(),s=n.find(e=>e.nodeState===o.LEADER);var a,l;a=e.currentLeader,(l=s)&&a&&a.address===l.address||(e.currentLeader=s,e.leaderChanged=!0),e.currentNode=n.find(t=>t.address===e.currentNode.address);const c=[];s&&Object.keys(s.syncStatus).forEach(e=>{const t=s.syncStatus[e];t!==r.NO_CONNECTION&&c.push({id:`${s.address}-${e}`,source:s.address,target:e,status:t})}),e.clusterModel.hasCluster=!0,e.clusterModel.nodes=n,e.clusterModel.links=c})).catch((function(t){404===t.status&&(e.clusterModel.hasCluster=!1,e.clusterModel.nodes=[],e.clusterModel.links=[],e.clusterConfiguration=null)}))},e.showCreateClusterDialog=function(){l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.finally((function(){N(),L(!0)}))},e.showDeleteDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then((function(t){const n=p.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,n),f.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>e===o.DELETED)){const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");s.success(e)}else{const e=p.instant("cluster_management.delete_cluster_dialog.notifications.success_delete_partial"),n=Object.keys(t.data).reduce((e,n)=>e+`<div>${n} - ${t.data[n]}</div>`,"");s.success(n,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=p.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete"),n=Object.keys(e.data).reduce((t,n)=>t+`<div>${n} - ${e.data[n]}</div>`,"");s.error(n,t,{allowHtml:!0})}).finally(()=>{e.setLoader(!1),L(!0),h.$broadcast("reloadLocations")})}))},e.showEditConfigurationDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:function(){return{clusterConfiguration:e.clusterConfiguration}}}}).result.finally((function(){L(!0)}))},e.getCurrentNodeStatus=()=>f.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>N()),e.showAddNodeToClusterDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/add-nodes-dialog.html",controller:"AddNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel,clusterConfiguration:e.clusterConfiguration}}}}).result.then((function(t){const n=p.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.rpcAddress);f.addNodesToCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.add_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.add_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0)})})).finally(()=>N())},e.showRemoveNodesFromClusterDialog=()=>{l.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const n=p.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.address);f.removeNodesFromCluster(o).then(()=>{$(p.instant("cluster_management.cluster_page.notifications.remove_nodes_success"))}).catch(e=>{const t=p.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");v(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0)})}))},(e.loader=!0,e.getCurrentNodeStatus().then(()=>e.getClusterConfiguration()).then(()=>e.getClusterStatus()).finally(()=>{e.setLoader(!1)})).finally(()=>{const t=u((function(){L()}),1e3);e.$on("$destroy",(function(){u.cancel(t)}))});const S=angular.element(i),E=function(){e.childContext.resize()};S.bind("resize",E);const T=function(t){const n=t.target,o=document.getElementById("nodeTooltip");e.selectedNode&&o!==n&&!o.contains(n)&&e.childContext.selectNode(null)};S.bind("mousedown",T),e.$on("$destroy",(function(){S.unbind("resize",E),S.unbind("mousedown",T)}))}s.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope"];const a=function(){const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"};function l(e,t,n,o,r,s,l,c,i,u){e.pageTitle=s.instant("cluster_management.cluster_page.create_page_title"),e.autofocusId="autofocus",e.errors=[],e.clusterConfiguration={electionMinTimeout:8e3,electionRangeTimeout:6e3,heartbeatInterval:2e3,messageSizeKB:64,verificationTimeout:1500,nodes:[]},e.locations=l.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=l.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.getAdvancedOptionsClass=a,e.createCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.creating_cluster_loader")),e.clusterConfiguration.nodes=e.selectedLocations.map(e=>e.rpcAddress),o.createCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.create_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.create_failed")),e.errors.splice(0),412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n?e.errors.push(...t):409===n&&e.errors.push(t)}(t.data,t.status)})).finally(()=>{e.setLoader(!1),u.$broadcast("reloadLocations")})},e.isClusterConfigurationValid=()=>{const t=!e.clusterConfigurationForm.$invalid,n=e.selectedLocations&&e.selectedLocations.length>=2;return t&&n},e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),300):e.loader=!1},e.addNodeToList=function(t){t.rpcAddress&&(e.selectedLocations.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,n){n.isLocal||(e.selectedLocations.splice(t,1),e.locations.push(n))},e.addLocation=function(){i.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){e.isClusterConfigurationValid()?e.createCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}function c(e,t){e.forceDelete=!1,e.ok=function(){t.close(e.forceDelete)},e.cancel=function(){t.dismiss("cancel")}}function i(e,t,n,o,r){return{addLocation:function(){let e;return n.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationFromClusterCtrl"}).result.then(n=>(e=n,e.isLocal=!1,e.endpoint=e.uri,function(e){let n;return o.addLocation(e).catch(e=>{const n=getError(e.data,e.status);return t.error(n,r.instant("common.error")),!1}).then(e=>!!e&&s()).then(t=>{if(!1!==t)return n=t.find(t=>t.endpoint===e.uri),n})}(e)))},getLocationsWithRpcAddresses:s};function s(){return o.getLocations().then((function(e){return e.data.map(e=>({isLocal:e.local,endpoint:e.uri,rpcAddress:e.rpcAddress||"",error:e.errorMsg}))})).catch((function(e){const n=getError(e.data,e.status);t.error(n,r.instant("common.error"))})).then(e=>{if(e)return function(e){const t=e.filter(e=>!e.isLocal&&!e.error).map(e=>function(e){return o.getLocationRpcAddress(e.endpoint)}(e).then(t=>(e.rpcAddress=t.data,e.isAvailable=!0,e)).catch(t=>{e.isAvailable=!1,e.error=getError(t.data,t.status)}));return Promise.allSettled(t).then(()=>e)}(e)})}}function u(e,t,n,o,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=g(o),e.isValidLocation=function(){return(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1},e.ok=function(){e.newLocation?t.close(e.newLocation):n.error(r.instant("location.cannot.be.empty.error"))},e.cancel=function(){t.dismiss("cancel")}}function d(e,t,n,o,r,s,a){e.pageTitle=s.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=angular.copy(a.clusterConfiguration),e.loader=!1,e.updateCluster=function(){return e.setLoader(!0,s.instant("cluster_management.cluster_page.updating_cluster_loader")),o.updateCluster(e.clusterConfiguration).then(()=>{r.success(s.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch((function(t){!function(t,n){delete e.preconditionErrors,r.error(s.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===n||"string"==typeof t?e.errors.push(t):412===n?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===n&&e.errors.push(...t)}(t.data,t.status)})).finally(()=>e.setLoader(!1))},e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=function(t,o){n.cancel(e.loaderTimeout),t?e.loaderTimeout=n((function(){e.loader=t,e.loaderMessage=o}),300):e.loader=!1},e.ok=function(){e.isClusterConfigurationValid()?e.updateCluster():r.warning(s.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=function(){t.dismiss("cancel")}}l.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"],c.$inject=["$scope","$uibModalInstance"],i.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"],u.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"],d.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"];const g=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion};function f(e,t,n,o,r){const s=angular.copy(n.clusterConfiguration),a=angular.copy(n.clusterModel);e.nodes=[],e.clusterNodes=a.nodes.map(e=>({rpcAddress:e.address,endpoint:e.endpoint})),e.locations=a.locations.filter(e=>!s.nodes.includes(e.rpcAddress)),e.locations.forEach(e=>e.isNew=!0),e.addNodeToList=function(t){t.rpcAddress&&(e.nodes.push(t),e.locations=e.locations.filter(e=>e.endpoint!==t.endpoint))},e.removeNodeFromList=function(t,n){e.nodes.splice(t,1),e.locations.push(n)},e.addLocation=function(){r.addLocation().then(t=>{t&&e.locations.push(t)})},e.ok=function(){t.close(e.nodes)},e.cancel=function(){t.dismiss("cancel")}}function m(e,t,n){const o=angular.copy(n.clusterModel);e.clusterNodes=o.nodes,e.clusterNodes.forEach(e=>e.shouldRemove=!1),e.nodesToRemoveCount=0,e.leftNodesLessThanTwo=!1,e.toggleNode=function(t,n){n.shouldRemove=!n.shouldRemove,n.shouldRemove?e.nodesToRemoveCount++:e.nodesToRemoveCount--,e.leftNodesLessThanTwo=e.clusterNodes.length-e.nodesToRemoveCount<2},e.ok=function(){const n=e.clusterNodes.filter(e=>e.shouldRemove);t.close(n)},e.cancel=function(){t.dismiss("cancel")}}f.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"],m.$inject=["$scope","$uibModalInstance","data"]}}]);
2
+ //# sourceMappingURL=4.d3fb6d0dcca79643bcb3.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///./src/js/angular/rest/cluster.rest.service.js","webpack:///./src/js/angular/clustermanagement/controllers.js"],"names":["angular","module","factory","ClusterRestService","$inject","$http","getClusterConfig","get","createCluster","groupConfiguration","post","updateCluster","nodes","patch","deleteCluster","forceDelete","data","$","param","force","delete","addNodesToCluster","nodesArray","removeNodesFromCluster","headers","getClusterStatus","getNodeStatus","controller","ClusterManagementCtrl","CreateClusterCtrl","DeleteClusterCtrl","EditClusterCtrl","AddLocationFromClusterCtrl","AddNodesDialogCtrl","RemoveNodesDialogCtrl","RemoteLocationsService","NodeState","LEADER","FOLLOWER","CANDIDATE","OUT_OF_SYNC","NO_CONNECTION","READ_ONLY","RESTRICTED","NO_CLUSTER","DELETED","LinkState","IN_SYNC","SYNCING","$scope","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","$location","$translate","$rootScope","updateRequest","then","clusterConfiguration","getClusterConfiguration","currentNode","leaderChanged","getCurrentNodeStatus","finally","childContext","redraw","getLocationsWithRpcAddresses","locations","localNode","find","location","isLocal","endpoint","rpcAddress","address","clusterModel","onAddRemoveSuccess","message","success","handleAddRemoveErrors","status","title","failMessage","Array","isArray","reduce","acc","error","Object","keys","key","allowHtml","loader","isLeader","currentLeader","shouldShowClusterSettingsPanel","onopen","onclose","noop","toggleSidePanel","toggleLegend","setLoader","cancel","loaderTimeout","loaderMessage","selectNode","node","selectedNode","$apply","getLoaderMessage","instant","response","catch","slice","leader","nodeState","newLeader","links","syncStatus","forEach","push","id","source","target","hasCluster","showCreateClusterDialog","open","templateUrl","size","resolve","result","showDeleteDialog","values","every","successMessage","failedNodesList","$broadcast","showEditConfigurationDialog","showAddNodeToClusterDialog","nodesRpcAddress","map","failMessageTitle","showRemoveNodesFromClusterDialog","timer","$on","w","element","resize","bind","mousedown","event","nodeTooltipElement","document","getElementById","contains","unbind","getAdvancedOptionsClass","optionsModule","isAriaExpanded","getAttribute","$uibModalInstance","pageTitle","autofocusId","errors","electionMinTimeout","electionRangeTimeout","heartbeatInterval","messageSizeKB","verificationTimeout","filter","selectedLocations","close","preconditionErrors","splice","handleErrors","isClusterConfigurationValid","isFormValid","clusterConfigurationForm","$invalid","nodesListValid","length","addNodeToList","loc","removeNodeFromList","index","addLocation","newLocation","ok","warning","dismiss","LocationsRestService","windowClass","dataAddLocation","uri","locationData","msg","getError","locationAdded","addLocationHttp","getLocations","local","errorMsg","locationsArray","rpcAddressFetchers","getLocationRpcAddress","isAvailable","Promise","allSettled","getRemoteLocationsRpcAddresses","productInfo","docBase","getDocBase","isValidLocation","indexOf","copy","productShortVersion","clusterNodes","includes","isNew","shouldRemove","nodesToRemoveCount","leftNodesLessThanTwo","toggle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KiH,aACLhL,EAAOiL,qBAEPjL,EAAOiL,qBAEXjL,EAAOkL,qBAAuBlL,EAAO6K,aAAapC,OAASzI,EAAOiL,mBAAqB,GAG3FjL,EAAOgJ,GAAK,WACR,MAAMoC,EAAgBpL,EAAO6K,aAAa/C,OAAQ/D,GAASA,EAAKiH,cAChE3D,EAAkBW,MAAMoD,IAG5BpL,EAAO2D,OAAS,WACZ0D,EAAkB6B,QAAQ,WApElClK,EAAmB7B,QAAU,CAAC,SAAU,oBAAqB,OAAQ,YAAa,0BA0ClF8B,EAAsB9B,QAAU,CAAC,SAAU,oBAAqB","file":"4.d3fb6d0dcca79643bcb3.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.cluster.service', [])\n .factory('ClusterRestService', ClusterRestService);\n\nClusterRestService.$inject = ['$http'];\n\nconst CLUSTER_GROUP_ENDPOINT = 'rest/cluster';\n\nfunction ClusterRestService($http) {\n return {\n getClusterConfig,\n createCluster,\n updateCluster,\n deleteCluster,\n addNodesToCluster,\n removeNodesFromCluster,\n getClusterStatus,\n getNodeStatus\n };\n\n function getClusterConfig() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/config`);\n }\n\n function createCluster(groupConfiguration) {\n return $http.post(`${CLUSTER_GROUP_ENDPOINT}/config`, groupConfiguration);\n }\n\n function updateCluster(groupConfiguration) {\n if (groupConfiguration.nodes) {\n delete groupConfiguration.nodes;\n }\n return $http.patch(`${CLUSTER_GROUP_ENDPOINT}/config`, groupConfiguration);\n }\n\n function deleteCluster(forceDelete) {\n const data = $.param({\n force: forceDelete\n });\n return $http.delete(`${CLUSTER_GROUP_ENDPOINT}/config?${data}`);\n }\n\n function addNodesToCluster(nodesArray) {\n return $http.post(`${CLUSTER_GROUP_ENDPOINT}/config/node`, {nodes: nodesArray});\n }\n\n function removeNodesFromCluster(nodesArray) {\n return $http.delete(`${CLUSTER_GROUP_ENDPOINT}/config/node`, {data: {nodes: nodesArray}, headers: {'Content-Type': 'application/json'}});\n }\n\n function getClusterStatus() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/group/status`);\n }\n\n function getNodeStatus() {\n return $http.get(`${CLUSTER_GROUP_ENDPOINT}/node/status`);\n }\n}\n","import 'angular/core/services';\nimport 'angular/rest/cluster.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.cluster.service',\n 'toastr',\n 'pageslide-directive'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.controllers', modules)\n .controller('ClusterManagementCtrl', ClusterManagementCtrl)\n .controller('CreateClusterCtrl', CreateClusterCtrl)\n .controller('DeleteClusterCtrl', DeleteClusterCtrl)\n .controller('EditClusterCtrl', EditClusterCtrl)\n .controller('AddLocationFromClusterCtrl', AddLocationFromClusterCtrl)\n .controller('AddNodesDialogCtrl', AddNodesDialogCtrl)\n .controller('RemoveNodesDialogCtrl', RemoveNodesDialogCtrl)\n .factory('RemoteLocationsService', RemoteLocationsService);\n\nexport const NodeState = {\n LEADER: 'LEADER',\n FOLLOWER: 'FOLLOWER',\n CANDIDATE: 'CANDIDATE',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n NO_CONNECTION: 'NO_CONNECTION',\n READ_ONLY: 'READ_ONLY',\n RESTRICTED: 'RESTRICTED',\n NO_CLUSTER: 'NO_CLUSTER',\n DELETED: 'DELETED'\n};\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION'\n};\n\nClusterManagementCtrl.$inject = ['$scope', '$http', '$q', 'toastr', '$repositories', '$uibModal', '$sce',\n '$window', '$interval', 'ModalService', '$timeout', 'ClusterRestService', '$location', '$translate', 'RemoteLocationsService', '$rootScope'];\n\nfunction ClusterManagementCtrl($scope, $http, $q, toastr, $repositories, $uibModal, $sce,\n $window, $interval, ModalService, $timeout, ClusterRestService, $location, $translate, RemoteLocationsService, $rootScope) {\n $scope.loader = true;\n $scope.isLeader = false;\n $scope.currentNode = null;\n $scope.clusterModel = {};\n $scope.NodeState = NodeState;\n $scope.leaderChanged = false;\n $scope.currentLeader = null;\n\n // Holds child context\n $scope.childContext = {};\n\n $scope.shouldShowClusterSettingsPanel = false;\n $scope.onopen = $scope.onclose = () => angular.noop();\n\n $scope.toggleSidePanel = () => {\n $scope.shouldShowClusterSettingsPanel = !$scope.shouldShowClusterSettingsPanel;\n };\n\n $scope.toggleLegend = () => {\n if ($scope.childContext.toggleLegend) {\n $scope.childContext.toggleLegend();\n }\n };\n\n // TODO: Similar function is declared multiple times in different components. Find out how to avoid it!\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n }, 50);\n } else {\n $scope.loader = false;\n }\n };\n\n function selectNode(node) {\n if ($scope.selectedNode !== node) {\n $scope.selectedNode = node;\n } else {\n $scope.selectedNode = null;\n }\n $scope.$apply();\n }\n\n $scope.childContext.selectNode = selectNode;\n\n function initialize() {\n $scope.loader = true;\n\n return $scope.getCurrentNodeStatus()\n .then(() => {\n return $scope.getClusterConfiguration();\n })\n .then(() => {\n return $scope.getClusterStatus();\n })\n .finally(() => {\n $scope.setLoader(false);\n });\n }\n\n let updateRequest;\n function updateCluster(force) {\n if (updateRequest) {\n return;\n }\n\n updateRequest = $scope.getClusterStatus()\n .then(() => {\n if (force || !$scope.clusterConfiguration) {\n return $scope.getClusterConfiguration();\n }\n })\n .then(() => {\n if (!$scope.currentNode || $scope.leaderChanged) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .finally(() => {\n updateRequest = null;\n $scope.childContext.redraw();\n });\n }\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.getClusterConfiguration = () => {\n return ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.clusterConfiguration = response.data;\n if (!$scope.currentNode) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .catch(() => {\n $scope.clusterConfiguration = null;\n });\n };\n\n function isLeaderChanged(currentLeader, newLeader) {\n if (!newLeader) {\n // If election is in place and there is no leader yet, consider it as leader change\n return true;\n }\n return !currentLeader || currentLeader.address !== newLeader.address;\n }\n\n $scope.getClusterStatus = function () {\n return ClusterRestService.getClusterStatus()\n .then(function (response) {\n const nodes = response.data.slice();\n const leader = nodes.find((node) => node.nodeState === NodeState.LEADER);\n\n if (isLeaderChanged($scope.currentLeader, leader)) {\n $scope.currentLeader = leader;\n $scope.leaderChanged = true;\n }\n $scope.currentNode = nodes.find((node) => node.address === $scope.currentNode.address);\n\n const links = [];\n if (leader) {\n Object.keys(leader.syncStatus).forEach((node) => {\n const status = leader.syncStatus[node];\n if (status !== LinkState.NO_CONNECTION) {\n links.push({\n id: `${leader.address}-${node}`,\n source: leader.address,\n target: node,\n status\n });\n }\n });\n }\n $scope.clusterModel.hasCluster = true;\n $scope.clusterModel.nodes = nodes;\n $scope.clusterModel.links = links;\n })\n .catch(function (error) {\n if (error.status === 404) {\n $scope.clusterModel.hasCluster = false;\n $scope.clusterModel.nodes = [];\n $scope.clusterModel.links = [];\n $scope.clusterConfiguration = null;\n }\n });\n };\n\n $scope.showCreateClusterDialog = function () {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-create-dialog.html',\n controller: 'CreateClusterCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n getLocationsWithRpcAddresses();\n updateCluster(true);\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then(function (forceDelete) {\n const loaderMessage = $translate.instant('cluster_management.delete_cluster_dialog.loader_message');\n $scope.setLoader(true, loaderMessage);\n ClusterRestService.deleteCluster(forceDelete)\n .then((response) => {\n const allNodesDeleted = Object.values(response.data).every((nodeState) => nodeState === NodeState.DELETED);\n if (allNodesDeleted) {\n const successMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.success_delete');\n toastr.success(successMessage);\n } else {\n const successMessage = $translate.instant(\n 'cluster_management.delete_cluster_dialog.notifications.success_delete_partial');\n const failedNodesList = Object.keys(response.data)\n .reduce((message, key) => message += `<div>${key} - ${response.data[key]}</div>`, '');\n toastr.success(failedNodesList, successMessage, {allowHtml: true});\n }\n $scope.getClusterConfiguration();\n })\n .catch((error) => {\n const failMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.fail_delete');\n const failedNodesList = Object.keys(error.data)\n .reduce((message, key) => message += `<div>${key} - ${error.data[key]}</div>`, '');\n toastr.error(failedNodesList, failMessage, {allowHtml: true});\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n $rootScope.$broadcast('reloadLocations');\n });\n });\n };\n\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n updateCluster(true);\n });\n };\n\n $scope.getCurrentNodeStatus = () => {\n return ClusterRestService.getNodeStatus()\n .then((response) => {\n $scope.leaderChanged = false;\n $scope.currentNode = response.data;\n })\n .catch((error) => {\n $scope.currentNode = error.data;\n $scope.clusterModel.hasCluster = false;\n })\n .then(() => getLocationsWithRpcAddresses());\n };\n\n function getLocationsWithRpcAddresses() {\n return RemoteLocationsService.getLocationsWithRpcAddresses()\n .then((locations) => {\n const localNode = locations.find((location) => location.isLocal);\n if (localNode) {\n localNode.endpoint = $scope.currentNode.endpoint;\n localNode.rpcAddress = $scope.currentNode.address;\n }\n $scope.clusterModel.locations = locations;\n });\n }\n\n $scope.showAddNodeToClusterDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/add-nodes-dialog.html',\n controller: 'AddNodesDialogCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel,\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.then(function (nodes) {\n const loaderMessage = $translate.instant('cluster_management.cluster_page.add_nodes_loader');\n $scope.setLoader(true, loaderMessage);\n\n const nodesRpcAddress = nodes.map((node) => node.rpcAddress);\n ClusterRestService.addNodesToCluster(nodesRpcAddress)\n .then(() => {\n const successMessage = $translate.instant(\n 'cluster_management.cluster_page.notifications.add_nodes_success');\n onAddRemoveSuccess(successMessage);\n })\n .catch((error) => {\n const failMessageTitle = $translate.instant('cluster_management.cluster_page.notifications.add_nodes_fail');\n handleAddRemoveErrors(error.data, error.status, failMessageTitle);\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n });\n })\n .finally(() => getLocationsWithRpcAddresses());\n };\n\n $scope.showRemoveNodesFromClusterDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html',\n controller: 'RemoveNodesDialogCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel\n };\n }\n }\n });\n\n modalInstance.result.then(function (nodes) {\n const loaderMessage = $translate.instant('cluster_management.cluster_page.remove_nodes_loader');\n $scope.setLoader(true, loaderMessage);\n\n const nodesRpcAddress = nodes.map((node) => node.address);\n ClusterRestService.removeNodesFromCluster(nodesRpcAddress)\n .then(() => {\n const successMessage = $translate.instant('cluster_management.cluster_page.notifications.remove_nodes_success');\n onAddRemoveSuccess(successMessage);\n })\n .catch((error) => {\n const failMessageTitle = $translate.instant('cluster_management.cluster_page.notifications.remove_nodes_fail');\n handleAddRemoveErrors(error.data, error.status, failMessageTitle);\n })\n .finally(() => {\n $scope.setLoader(false);\n updateCluster(true);\n });\n });\n };\n\n function onAddRemoveSuccess(message) {\n toastr.success(message);\n $scope.getClusterConfiguration();\n }\n\n function handleAddRemoveErrors(data, status, title) {\n let failMessage = data.message || data;\n\n if (status === 400 && Array.isArray(data)) {\n failMessage = data.reduce((acc, error) => acc += `<div>${error}</div>`, '');\n } else if (status === 412) {\n failMessage = Object.keys(data)\n .reduce((message, key) => message += `<div>${key} - ${data[key]}</div>`, '');\n }\n toastr.error(failMessage, title, {allowHtml: true});\n }\n\n initialize()\n .finally(() => {\n const timer = $interval(function () {\n updateCluster();\n }, 1000);\n\n $scope.$on(\"$destroy\", function () {\n $interval.cancel(timer);\n });\n });\n\n // track window resizing and window mousedown\n const w = angular.element($window);\n const resize = function () {\n $scope.childContext.resize();\n };\n w.bind('resize', resize);\n\n const mousedown = function (event) {\n const target = event.target;\n const nodeTooltipElement = document.getElementById('nodeTooltip');\n if ($scope.selectedNode && nodeTooltipElement !== target && !nodeTooltipElement.contains(target)) {\n $scope.childContext.selectNode(null);\n }\n };\n w.bind('mousedown', mousedown);\n $scope.$on('$destroy', function () {\n w.unbind('resize', resize);\n w.unbind('mousedown', mousedown);\n });\n}\n\nconst getAdvancedOptionsClass = function () {\n const optionsModule = document.getElementById('advancedOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'fa fa-angle-down';\n }\n }\n return 'fa fa-angle-right';\n};\n\nCreateClusterCtrl.$inject = ['$scope', '$uibModalInstance', '$timeout', 'ClusterRestService', 'toastr', '$translate', 'data', '$uibModal',\n 'RemoteLocationsService', '$rootScope'];\n\nfunction CreateClusterCtrl($scope, $uibModalInstance, $timeout, ClusterRestService, toastr, $translate, data, $uibModal, RemoteLocationsService, $rootScope) {\n $scope.pageTitle = $translate.instant('cluster_management.cluster_page.create_page_title');\n $scope.autofocusId = 'autofocus';\n $scope.errors = [];\n $scope.clusterConfiguration = {\n electionMinTimeout: 8000,\n electionRangeTimeout: 6000,\n heartbeatInterval: 2000,\n messageSizeKB: 64,\n verificationTimeout: 1500,\n nodes: []\n };\n\n $scope.locations = data.clusterModel.locations.filter((location) => !location.isLocal);\n $scope.selectedLocations = data.clusterModel.locations.filter((location) => location.isLocal);\n\n $scope.loader = false;\n\n $scope.getAdvancedOptionsClass = getAdvancedOptionsClass;\n\n $scope.createCluster = function () {\n $scope.setLoader(true, $translate.instant('cluster_management.cluster_page.creating_cluster_loader'));\n $scope.clusterConfiguration.nodes = $scope.selectedLocations.map((node) => node.rpcAddress);\n return ClusterRestService.createCluster($scope.clusterConfiguration)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_page.notifications.create_success'));\n $uibModalInstance.close();\n })\n .catch(function (error) {\n handleErrors(error.data, error.status);\n })\n .finally(() => {\n $scope.setLoader(false);\n $rootScope.$broadcast('reloadLocations');\n });\n };\n\n function handleErrors(data, status) {\n delete $scope.preconditionErrors;\n toastr.error($translate.instant('cluster_management.cluster_page.notifications.create_failed'));\n $scope.errors.splice(0);\n if (status === 412) {\n $scope.preconditionErrors = Object.keys(data).map((key) => `${key} - ${data[key]}`);\n } else if (status === 400) {\n $scope.errors.push(...data);\n } else if (status === 409) {\n $scope.errors.push(data);\n }\n }\n\n $scope.isClusterConfigurationValid = () => {\n const isFormValid = !$scope.clusterConfigurationForm.$invalid;\n const nodesListValid = $scope.selectedLocations && $scope.selectedLocations.length >= 2;\n return isFormValid && nodesListValid;\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.addNodeToList = function (location) {\n if (!location.rpcAddress) {\n return;\n }\n $scope.selectedLocations.push(location);\n $scope.locations = $scope.locations.filter((loc) => loc.endpoint !== location.endpoint);\n };\n\n $scope.removeNodeFromList = function (index, node) {\n if (node.isLocal) {\n return;\n }\n $scope.selectedLocations.splice(index, 1);\n $scope.locations.push(node);\n };\n\n $scope.addLocation = function () {\n RemoteLocationsService.addLocation()\n .then((newLocation) => {\n if (newLocation) {\n $scope.locations.push(newLocation);\n }\n });\n };\n\n $scope.ok = function () {\n if (!$scope.isClusterConfigurationValid()) {\n toastr.warning($translate.instant('cluster_management.cluster_page.notifications.form_invalid'));\n return;\n }\n $scope.createCluster();\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nDeleteClusterCtrl.$inject = ['$scope', '$uibModalInstance'];\n\nfunction DeleteClusterCtrl($scope, $uibModalInstance) {\n $scope.forceDelete = false;\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.forceDelete);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nRemoteLocationsService.$inject = ['$http', 'toastr', '$uibModal', 'LocationsRestService', '$translate'];\n\nfunction RemoteLocationsService($http, toastr, $uibModal, LocationsRestService, $translate) {\n return {\n addLocation: addLocation,\n getLocationsWithRpcAddresses: getLocationsWithRpcAddresses\n };\n\n function getLocationsWithRpcAddresses() {\n return getLocations()\n .then((locations) => {\n if (locations) {\n return getRemoteLocationsRpcAddresses(locations);\n }\n });\n }\n\n /**\n * Sets multiple remote locations' rpc addresses. Skips local location and locations with errors\n * @param {any[]} locationsArray\n * @return {Promise<[]>} locationArray with filled rpc addresses\n */\n function getRemoteLocationsRpcAddresses(locationsArray) {\n const rpcAddressFetchers = locationsArray.filter((location) => !location.isLocal && !location.error).map((location) => {\n return getLocationRpcAddress(location)\n .then((response) => {\n location.rpcAddress = response.data;\n location.isAvailable = true;\n return location;\n })\n .catch((error) => {\n location.isAvailable = false;\n location.error = getError(error.data, error.status);\n });\n });\n return Promise.allSettled(rpcAddressFetchers).then(() => locationsArray);\n }\n\n /**\n * Fetch locations and map them to a location model\n *\n * @return {*} all remote locations mapped to a location model\n */\n function getLocations() {\n return LocationsRestService.getLocations()\n .then(function (response) {\n return response.data.map((loc) => {\n return {\n isLocal: loc.local,\n endpoint: loc.uri,\n rpcAddress: loc.rpcAddress || '',\n error: loc.errorMsg\n };\n });\n })\n .catch(function (error) {\n const msg = getError(error.data, error.status);\n toastr.error(msg, $translate.instant('common.error'));\n });\n }\n\n /**\n * Fetch rpc address of a remote location\n * @param {*} location the remote location\n * @return {Promise<String>} the rpc address of the location\n */\n function getLocationRpcAddress(location) {\n return LocationsRestService.getLocationRpcAddress(location.endpoint);\n\n }\n\n function addLocation() {\n let newLocation;\n return $uibModal.open({\n templateUrl: 'js/angular/templates/modal/add-location.html',\n windowClass: 'addLocationDialog',\n controller: 'AddLocationFromClusterCtrl'\n }).result\n .then((dataAddLocation) => {\n newLocation = dataAddLocation;\n newLocation.isLocal = false;\n newLocation.endpoint = newLocation.uri;\n return addLocationHttp(newLocation);\n });\n }\n\n function addLocationHttp(locationData) {\n let newLocation;\n return LocationsRestService.addLocation(locationData)\n .catch((error) => {\n const msg = getError(error.data, error.status);\n toastr.error(msg, $translate.instant('common.error'));\n return false;\n })\n .then((locationAdded) => {\n if (locationAdded) {\n return getLocationsWithRpcAddresses();\n }\n return false;\n })\n .then((locations) => {\n if (locations === false) {\n return;\n }\n newLocation = locations.find((location) => location.endpoint === locationData.uri);\n return newLocation;\n });\n }\n}\n\nAddLocationFromClusterCtrl.$inject = ['$scope', '$uibModalInstance', 'toastr', 'productInfo', '$translate'];\n\nfunction AddLocationFromClusterCtrl($scope, $uibModalInstance, toastr, productInfo, $translate) {\n //TODO: This, along with the view are duplicated from repositories page. Must be extracted for re-usability.\n $scope.newLocation = {\n 'uri': '',\n 'authType': 'signature',\n 'username': '',\n 'password': '',\n 'active': false\n };\n $scope.docBase = getDocBase(productInfo);\n\n $scope.isValidLocation = function () {\n return ($scope.newLocation.uri.length < 6 ||\n $scope.newLocation.uri.indexOf('http:') === 0 || $scope.newLocation.uri.indexOf('https:') === 0)\n && $scope.newLocation.uri.indexOf('/repositories') <= -1;\n };\n\n $scope.ok = function () {\n if (!$scope.newLocation) {\n toastr.error($translate.instant('location.cannot.be.empty.error'));\n return;\n }\n $uibModalInstance.close($scope.newLocation);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nEditClusterCtrl.$inject = ['$scope', '$uibModalInstance', '$timeout', 'ClusterRestService', 'toastr', '$translate', 'data'];\n\nfunction EditClusterCtrl($scope, $uibModalInstance, $timeout, ClusterRestService, toastr, $translate, data) {\n $scope.pageTitle = $translate.instant('cluster_management.cluster_page.edit_page_title');\n $scope.errors = [];\n $scope.clusterConfiguration = angular.copy(data.clusterConfiguration);\n $scope.loader = false;\n\n $scope.updateCluster = function () {\n $scope.setLoader(true, $translate.instant('cluster_management.cluster_page.updating_cluster_loader'));\n return ClusterRestService.updateCluster($scope.clusterConfiguration)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_page.notifications.update_success'));\n $uibModalInstance.close();\n })\n .catch(function (response) {\n handleErrors(response.data, response.status);\n })\n .finally(() => $scope.setLoader(false));\n };\n\n function handleErrors(data, status) {\n delete $scope.preconditionErrors;\n toastr.error($translate.instant('cluster_management.cluster_page.notifications.update_failed'));\n $scope.errors.splice(0);\n\n if (status === 409 || typeof data === 'string') {\n $scope.errors.push(data);\n } else if (status === 412) {\n $scope.preconditionErrors = Object.keys(data).map((key) => `${key} - ${data[key]}`);\n } else if (status === 400) {\n $scope.errors.push(...data);\n }\n }\n\n $scope.isClusterConfigurationValid = () => {\n return !$scope.clusterConfigurationForm.$invalid;\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.ok = function () {\n if (!$scope.isClusterConfigurationValid()) {\n toastr.warning($translate.instant('cluster_management.cluster_page.notifications.form_invalid'));\n return;\n }\n $scope.updateCluster();\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nconst getDocBase = function (productInfo) {\n return `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}`;\n};\n\nAddNodesDialogCtrl.$inject = ['$scope', '$uibModalInstance', 'data', '$uibModal', 'RemoteLocationsService'];\n\nfunction AddNodesDialogCtrl($scope, $uibModalInstance, data, $uibModal, RemoteLocationsService) {\n const clusterConfiguration = angular.copy(data.clusterConfiguration);\n const clusterModel = angular.copy(data.clusterModel);\n $scope.nodes = [];\n\n $scope.clusterNodes = clusterModel.nodes.map((node) => ({rpcAddress: node.address, endpoint: node.endpoint}));\n $scope.locations = clusterModel.locations.filter((location) => !clusterConfiguration.nodes.includes(location.rpcAddress));\n $scope.locations.forEach((location) => location.isNew = true);\n\n $scope.addNodeToList = function (location) {\n if (!location.rpcAddress) {\n return;\n }\n $scope.nodes.push(location);\n $scope.locations = $scope.locations.filter((loc) => loc.endpoint !== location.endpoint);\n };\n\n $scope.removeNodeFromList = function (index, node) {\n $scope.nodes.splice(index, 1);\n $scope.locations.push(node);\n };\n\n $scope.addLocation = function () {\n RemoteLocationsService.addLocation()\n .then((newLocation) => {\n if (newLocation) {\n $scope.locations.push(newLocation);\n }\n });\n };\n\n $scope.ok = function () {\n $uibModalInstance.close($scope.nodes);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n\nRemoveNodesDialogCtrl.$inject = ['$scope', '$uibModalInstance', 'data'];\n\nfunction RemoveNodesDialogCtrl($scope, $uibModalInstance, data) {\n const clusterModel = angular.copy(data.clusterModel);\n\n $scope.clusterNodes = clusterModel.nodes;\n $scope.clusterNodes.forEach((node) => node.shouldRemove = false);\n $scope.nodesToRemoveCount = 0;\n $scope.leftNodesLessThanTwo = false;\n\n $scope.toggleNode = function (index, node) {\n node.shouldRemove = !node.shouldRemove;\n if (node.shouldRemove) {\n $scope.nodesToRemoveCount++;\n } else {\n $scope.nodesToRemoveCount--;\n }\n $scope.leftNodesLessThanTwo = $scope.clusterNodes.length - $scope.nodesToRemoveCount < 2;\n };\n\n $scope.ok = function () {\n const nodesToRemove = $scope.clusterNodes.filter((node) => node.shouldRemove);\n $uibModalInstance.close(nodesToRemove);\n };\n\n $scope.cancel = function () {\n $uibModalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[40,94],{136:function(e,r,t){"use strict";t.r(r);t(4),t(11),t(108),t(90),t(10),t(34),t(35);angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.directives","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives"])},90:function(e,r,t){"use strict";t.r(r);t(4),t(14);const i=angular.module("graphdb.framework.impex.import.directives",["graphdb.framework.utils.uriutils"]);i.directive("validateUri",["UriUtils",function(e){return{restrict:"A",require:"ngModel",link:function(r,t,i,a){a.$parsers.unshift((function(t){let i=!0;return"named"===r.target&&(i=e.isValidIri(t)),a.$setValidity("validateUri",i),t}))}}}]),i.directive("filesTable",(function(){return{restrict:"A",templateUrl:"js/angular/import/templates/filesTable.html"}})),i.directive("filesOntoLoader",(function(){return{link:function(e,r,t){e.$watch("file.status",(function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+t.size+'" height="'+t.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.2.2-TR2">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[40,94],{136:function(e,r,t){"use strict";t.r(r);t(4),t(11),t(108),t(90),t(10),t(34),t(35);angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.directives","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.core.directives"])},90:function(e,r,t){"use strict";t.r(r);t(4),t(14);const i=angular.module("graphdb.framework.impex.import.directives",["graphdb.framework.utils.uriutils"]);i.directive("validateUri",["UriUtils",function(e){return{restrict:"A",require:"ngModel",link:function(r,t,i,a){a.$parsers.unshift((function(t){let i=!0;return"named"===r.target&&(i=e.isValidIri(t)),a.$setValidity("validateUri",i),t}))}}}]),i.directive("filesTable",(function(){return{restrict:"A",templateUrl:"js/angular/import/templates/filesTable.html"}})),i.directive("filesOntoLoader",(function(){return{link:function(e,r,t){e.$watch("file.status",(function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+t.size+'" height="'+t.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.3.0-TR1">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
2
2
  //# sourceMappingURL=40.50b40301c8cc69a70457.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./src/js/angular/import/app.js","webpack:///./src/js/angular/import/directives.js"],"names":["angular","module","importDirectives","directive","UriUtils","restrict","require","link","scope","element","attr","ctrl","$parsers","unshift","value","valid","target","isValidIri","$setValidity","templateUrl","$watch","file","status","$","has","length","append","size"],"mappings":"8FAAA,iDAmBAA,QAAQC,OAAO,iCAXC,CACZ,SACA,UACA,eACA,eACA,4CACA,6CACA,+CACA,uC,gCChBJ,kBAGA,MAAMC,EAAmBF,QAAQC,OAAO,4CAA6C,CACjF,qCAGJC,EAAiBC,UAAU,cAAe,CAAC,WAAY,SAAUC,GAC7D,MAAO,CACHC,SAAU,IACVC,QAAS,UACTC,KAAM,SAAUC,EAAOC,EAASC,EAAMC,GAClCA,EAAKC,SAASC,SAAQ,SAAUC,GAC5B,IAAIC,GAAQ,EAQZ,MANqB,UAAjBP,EAAMQ,SACND,EAAQX,EAASa,WAAWH,IAGhCH,EAAKO,aAAa,cAAeH,GAE1BD,UAMvBZ,EAAiBC,UAAU,cAAc,WACrC,MAAO,CACHE,SAAU,IACVc,YAAa,kDAIrBjB,EAAiBC,UAAU,mBAAmB,WAC1C,MAAO,CACHI,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMY,OAAO,eAAe,WACE,cAAtBZ,EAAMa,KAAKC,QAAgD,cAAtBd,EAAMa,KAAKC,SAC3CC,EAAEd,GAASe,IAAI,UAAUC,OAAS,GACnCF,EAAEd,GAASiB,OAAO,kBAAoBhB,EAAKiB,KAAO,aAAejB,EAAKiB,KAAO","file":"40.50b40301c8cc69a70457.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/import/controllers';\nimport 'angular/import/directives';\nimport 'angular/core/services/repositories.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'toastr',\n 'ngRoute',\n 'ngFileUpload',\n 'ui.bootstrap',\n 'graphdb.framework.impex.import.directives',\n 'graphdb.framework.impex.import.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.impex.import', modules);\n","import 'angular/core/services';\nimport 'angular/utils/uri-utils';\n\nconst importDirectives = angular.module('graphdb.framework.impex.import.directives', [\n 'graphdb.framework.utils.uriutils'\n]);\n\nimportDirectives.directive('validateUri', ['UriUtils', function (UriUtils) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$parsers.unshift(function (value) {\n let valid = true;\n\n if (scope.target === 'named') {\n valid = UriUtils.isValidIri(value);\n }\n\n ctrl.$setValidity('validateUri', valid);\n\n return value;\n });\n }\n };\n}]);\n\nimportDirectives.directive('filesTable', function () {\n return {\n restrict: 'A',\n templateUrl: 'js/angular/import/templates/filesTable.html'\n };\n});\n\nimportDirectives.directive('filesOntoLoader', function () {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=2.2.2-TR2\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n});\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./src/js/angular/import/app.js","webpack:///./src/js/angular/import/directives.js"],"names":["angular","module","importDirectives","directive","UriUtils","restrict","require","link","scope","element","attr","ctrl","$parsers","unshift","value","valid","target","isValidIri","$setValidity","templateUrl","$watch","file","status","$","has","length","append","size"],"mappings":"8FAAA,iDAmBAA,QAAQC,OAAO,iCAXC,CACZ,SACA,UACA,eACA,eACA,4CACA,6CACA,+CACA,uC,gCChBJ,kBAGA,MAAMC,EAAmBF,QAAQC,OAAO,4CAA6C,CACjF,qCAGJC,EAAiBC,UAAU,cAAe,CAAC,WAAY,SAAUC,GAC7D,MAAO,CACHC,SAAU,IACVC,QAAS,UACTC,KAAM,SAAUC,EAAOC,EAASC,EAAMC,GAClCA,EAAKC,SAASC,SAAQ,SAAUC,GAC5B,IAAIC,GAAQ,EAQZ,MANqB,UAAjBP,EAAMQ,SACND,EAAQX,EAASa,WAAWH,IAGhCH,EAAKO,aAAa,cAAeH,GAE1BD,UAMvBZ,EAAiBC,UAAU,cAAc,WACrC,MAAO,CACHE,SAAU,IACVc,YAAa,kDAIrBjB,EAAiBC,UAAU,mBAAmB,WAC1C,MAAO,CACHI,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMY,OAAO,eAAe,WACE,cAAtBZ,EAAMa,KAAKC,QAAgD,cAAtBd,EAAMa,KAAKC,SAC3CC,EAAEd,GAASe,IAAI,UAAUC,OAAS,GACnCF,EAAEd,GAASiB,OAAO,kBAAoBhB,EAAKiB,KAAO,aAAejB,EAAKiB,KAAO","file":"40.50b40301c8cc69a70457.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/import/controllers';\nimport 'angular/import/directives';\nimport 'angular/core/services/repositories.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nconst modules = [\n 'toastr',\n 'ngRoute',\n 'ngFileUpload',\n 'ui.bootstrap',\n 'graphdb.framework.impex.import.directives',\n 'graphdb.framework.impex.import.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.impex.import', modules);\n","import 'angular/core/services';\nimport 'angular/utils/uri-utils';\n\nconst importDirectives = angular.module('graphdb.framework.impex.import.directives', [\n 'graphdb.framework.utils.uriutils'\n]);\n\nimportDirectives.directive('validateUri', ['UriUtils', function (UriUtils) {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$parsers.unshift(function (value) {\n let valid = true;\n\n if (scope.target === 'named') {\n valid = UriUtils.isValidIri(value);\n }\n\n ctrl.$setValidity('validateUri', valid);\n\n return value;\n });\n }\n };\n}]);\n\nimportDirectives.directive('filesTable', function () {\n return {\n restrict: 'A',\n templateUrl: 'js/angular/import/templates/filesTable.html'\n };\n});\n\nimportDirectives.directive('filesOntoLoader', function () {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=2.3.0-TR1\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n});\n"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[42,102],{144:function(n,e,i){"use strict";i.r(e);i(95);angular.module("graphdb.framework.plugins",["ngRoute","graphdb.framework.plugins.controllers"])},95:function(n,e,i){"use strict";i.r(e);i(19);function t(n,e,i,t,r,o,s,l){let u;const a=function(){n.clear(),r.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()&&c()};n.clear=function(){n.searchPluginsTerm="",n.plugins=[],n.displayedPlugins=[]};const c=function(){g(),u=e((function(){g()}),5e3)},g=function(){s.getPlugins(n.getActiveRepository()).success((function(e){n.plugins=n.buildPluginsArray(e.results.bindings)})).error((function(n){i.error(getError(n))})).finally((function(){n.filterResults(),n.setLoader(!1)}))};n.buildPluginsArray=function(n){return n.map(n=>({name:n.s.value,enabled:"true"===n.o.value})).filter((function(n){return"plugincontrol"!==n.name&&"literals-index"!==n.name})).sort((function(n,e){const i=n.name.toLowerCase(),t=e.name.toLowerCase();return i<t?-1:i>t?1:0}))},n.filterResults=function(){const e=n.plugins.filter(e=>-1!==e.name.indexOf(n.searchPluginsTerm));f(e)&&n.updateDisplayedPlugins(e)};const f=function(e){if(!n.displayedPlugins||n.displayedPlugins.length!==e.length)return!0;for(const i in e)if(!n.displayedPlugins.find(n=>angular.equals(n,e[i])))return!0;return!1};function d(){u&&e.cancel(u)}n.updateDisplayedPlugins=function(e){n.displayedPlugins=e,setTimeout((function(){n.applyRowStyles()}),0)},n.setLoader=function(e,i){o.cancel(n.loaderTimeout),e?n.loaderTimeout=o((function(){n.loader=e,n.loaderMessage=i}),300):n.loader=!1},n.$on("repositoryIsSet",(function(){d(),a()})),n.$on("$destroy",(function(){d(),$(window).off("resize.plugin")})),$(window).on("resize.plugin",(function(){n.applyRowStyles()})),n.applyRowStyles=function(){const e=$("#wb-plugins-pluginInPlugins").width(),i=$("tr").width(),t=Math.floor(e/i);$(".wb-plugins-row").toArray().forEach((e,i)=>{n.isGreyBackground(t,i)?$(e).addClass("grey-row"):$(e).removeClass("grey-row")})},n.isGreyBackground=function(n,e){const i=(Math.floor(e/n)+1)%2!=1,t=e%2!=0;if(n%2!=0){if(i&&!t||!i&&!t)return!0;if(i&&t||!i&&t)return!1}else{if(i&&!t||!i&&t)return!1;if(i&&t||!i&&!t)return!0}},n.togglePlugin=function(e,t){const r=n.getActiveRepository(),o=t?l.instant("deactivating.plugin",{pluginName:e}):l.instant("activating.plugin",{pluginName:e});n.setLoader(!0,o),s.togglePlugin(r,t,e).error((function(n){i.error(getError(n))})).finally((function(){g(),n.setLoader(!1)}))},n.getLoaderMessage=function(){return n.loaderMessage||l.instant("common.loading")},n.onSearchTermChanged=function(){n.filterResults()},a()}angular.module("graphdb.framework.plugins.controllers",["graphdb.framework.rest.plugins.service"]).controller("PluginsCtrl",t),t.$inject=["$scope","$interval","toastr","$repositories","$licenseService","$timeout","PluginsRestService","$translate"]}}]);
2
+ //# sourceMappingURL=42.45ee7b629beac3e06cc2.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:///./src/js/angular/plugins/app.js","webpack:///./src/js/angular/plugins/controllers.js"],"names":["angular","module","PluginsCtrl","$scope","$interval","toastr","$repositories","$licenseService","$timeout","PluginsRestService","$translate","timer","init","clear","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","getPlugins","searchPluginsTerm","plugins","displayedPlugins","initPlugins","success","data","buildPluginsArray","results","bindings","error","getError","finally","filterResults","setLoader","map","plugin","name","s","value","enabled","o","filter","sort","a","b","textA","toLowerCase","textB","matchedPlugins","indexOf","displayedPluginsChanged","updateDisplayedPlugins","length","find","element","equals","cancelTimer","cancel","setTimeout","applyRowStyles","loader","message","loaderTimeout","loaderMessage","$on","$","window","off","on","tableWidth","width","rowWidth","columnPerRow","Math","floor","toArray","forEach","index","isGreyBackground","addClass","removeClass","oddRow","evenElement","togglePlugin","pluginName","repoId","instant","getLoaderMessage","onSearchTermChanged","controller","$inject"],"mappings":"+FAAA,aAOAA,QAAQC,OAAO,4BALC,CACZ,UACA,2C,gCCJJ,aAYA,SAASC,EAAYC,EAAQC,EAAWC,EAAQC,EAAeC,EAAiBC,EAAUC,EAAoBC,GAE1G,IAAIC,EAEJ,MAAMC,EAAO,WACTT,EAAOU,QACFN,EAAgBO,kBAChBR,EAAcS,wB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CAACF,WAAYA,IACrJhF,EAAO6B,WAAU,EAAM4B,GACvBnD,EAAmByE,aAAaE,EAAQ9C,EAAS6C,GAC5CvD,OAAM,SAAUJ,GACjBnB,EAAOuB,MAAMC,SAASL,OACvBM,SAAQ,WACPR,IACAnB,EAAO6B,WAAU,OAIzB7B,EAAOmF,iBAAmB,WACtB,OAAOnF,EAAO2D,eAAiBpD,EAAW2E,QAAQ,mBAGtDlF,EAAOoF,oBAAsB,WACzBpF,EAAO4B,iBAGXnB,IAtLJZ,QACKC,OAAO,wCALI,CACZ,2CAKCuF,WAAW,cAAetF,GAE/BA,EAAYuF,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,kBAAmB,WAAY,qBAAsB","file":"42.45ee7b629beac3e06cc2.bundle.js","sourcesContent":["import 'angular/plugins/controllers';\n\nconst modules = [\n 'ngRoute',\n 'graphdb.framework.plugins.controllers'\n];\n\nangular.module('graphdb.framework.plugins', modules);\n","import 'angular/rest/plugins.rest.service';\n\nconst modules = [\n 'graphdb.framework.rest.plugins.service'\n];\n\nangular\n .module('graphdb.framework.plugins.controllers', modules)\n .controller('PluginsCtrl', PluginsCtrl);\n\nPluginsCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', '$timeout', 'PluginsRestService', '$translate'];\n\nfunction PluginsCtrl($scope, $interval, toastr, $repositories, $licenseService, $timeout, PluginsRestService, $translate) {\n\n let timer;\n\n const init = function () {\n $scope.clear();\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n getPlugins();\n };\n\n $scope.clear = function () {\n $scope.searchPluginsTerm = '';\n $scope.plugins = [];\n $scope.displayedPlugins = [];\n };\n\n const getPlugins = function () {\n initPlugins();\n timer = $interval(function () {\n initPlugins();\n }, 5000);\n };\n\n const initPlugins = function () {\n PluginsRestService.getPlugins($scope.getActiveRepository())\n .success(function (data) {\n $scope.plugins = $scope.buildPluginsArray(data.results.bindings);\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.filterResults();\n $scope.setLoader(false);\n });\n };\n\n $scope.buildPluginsArray = function (plugins) {\n return plugins.map((plugin) => ({\n name: plugin.s.value,\n enabled: plugin.o.value === 'true'\n })).filter(function (plugin) {\n return plugin.name !== 'plugincontrol' && plugin.name !== 'literals-index';\n }).sort(function (a, b) {\n const textA = a.name.toLowerCase();\n const textB = b.name.toLowerCase();\n return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;\n });\n };\n\n $scope.filterResults = function () {\n const matchedPlugins = $scope.plugins.filter((plugin) => plugin.name.indexOf($scope.searchPluginsTerm) !== -1);\n if (displayedPluginsChanged(matchedPlugins)) {\n $scope.updateDisplayedPlugins(matchedPlugins);\n }\n };\n\n /**\n * Checks if displayed plugins in the view are different than <code>plugins</code>.\n * @param {*} plugins - plugins to be checked.\n * @return {boolean} returns true if <code>plugins</code> are different from those which are shown in the view.\n */\n const displayedPluginsChanged = function (plugins) {\n if (!$scope.displayedPlugins || $scope.displayedPlugins.length !== plugins.length) {\n return true;\n }\n\n for (const plugin in plugins) {\n if (!$scope.displayedPlugins.find((element) => angular.equals(element, plugins[plugin]))) {\n return true;\n }\n }\n\n return false;\n };\n\n $scope.updateDisplayedPlugins = function (plugins) {\n $scope.displayedPlugins = plugins;\n setTimeout(function () {\n $scope.applyRowStyles();\n }, 0);\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n // this is used when repository is changed from the upper menu to refresh the plugins for it.\n $scope.$on('repositoryIsSet', function () {\n cancelTimer();\n init();\n });\n\n $scope.$on('$destroy', function () {\n cancelTimer();\n $(window).off('resize.plugin');\n });\n\n $(window).on('resize.plugin', function () {\n $scope.applyRowStyles();\n });\n\n function cancelTimer() {\n if (timer) {\n $interval.cancel(timer);\n }\n }\n\n $scope.applyRowStyles = function () {\n const tableWidth = $('#wb-plugins-pluginInPlugins').width();\n const rowWidth = $('tr').width();\n const columnPerRow = Math.floor(tableWidth / rowWidth);\n $('.wb-plugins-row').toArray().forEach((value, index) => {\n if ($scope.isGreyBackground(columnPerRow, index)) {\n $(value).addClass('grey-row');\n } else {\n $(value).removeClass('grey-row');\n }\n });\n };\n\n $scope.isGreyBackground = function (columnPerRow, index) {\n const row = Math.floor(index / columnPerRow) + 1;\n const oddRow = row % 2 !== 1;\n const evenElement = index % 2 !== 0;\n const evenColumns = columnPerRow % 2 !== 0;\n\n if (evenColumns) {\n if (oddRow && !evenElement || !oddRow && !evenElement) {\n return true;\n }\n if (oddRow && evenElement || !oddRow && evenElement) {\n return false;\n }\n } else {\n if (oddRow && !evenElement || !oddRow && evenElement) {\n return false;\n }\n if (oddRow && evenElement || !oddRow && !evenElement) {\n return true;\n }\n }\n };\n\n $scope.togglePlugin = function (pluginName, enabled) {\n const repoId = $scope.getActiveRepository();\n const message = enabled ? $translate.instant('deactivating.plugin', {pluginName: pluginName}) : $translate.instant('activating.plugin', {pluginName: pluginName});\n $scope.setLoader(true, message);\n PluginsRestService.togglePlugin(repoId, enabled, pluginName)\n .error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n initPlugins();\n $scope.setLoader(false);\n });\n };\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.onSearchTermChanged = function () {\n $scope.filterResults();\n };\n\n init();\n}\n"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[43,104],{146:function(e,t,o){"use strict";o.r(t);o(4),o(11),o(96);angular.module("graphdb.framework.jmx.queries",["toastr","ui.bootstrap","graphdb.framework.jmx.queries.controllers","graphdb.framework.core.directives"])},96:function(e,t,o){"use strict";o.r(t);o(4),o(13);const n=angular.module("graphdb.framework.jmx.queries.controllers",["ui.bootstrap","toastr","graphdb.framework.rest.monitoring.service"]);n.controller("QueriesCtrl",["$scope","$uibModal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","$translate",function(e,t,o,n,r,i,s,u,a){e.loader=!0,e.stringLimit=500,e.expanded={},e.error="",e.paused=!1;const c=document.createElement("a");e.parseNode=function(e){if(null==e)return null;let t="local";if(e.indexOf("://localhost:")<0&&e.indexOf("://localhost/")<0){c.href=e;let o=c.hostname;(function(e){const t=e.split(".");for(let e=0,o=0;e<t.length;e++)if(parseInt(t[e],10)>=0&&parseInt(t[e],10)<=255?o++:o=0,4===o)return!0;return!1})(c.hostname)||(o=c.hostname.split(".")[0]),t=o+":"+c.port}const o=e.match(/\/repositories\/([^\/]+)#(\d+)/);return[o[2],t,o[1]]},e.togglePause=function(){e.paused=!e.paused},e.getQueries=function(){e.getQueriesRunning||e.paused||e.error||!r.getActiveRepository()||(e.getQueriesRunning=!0,u.monitorQuery(r.getActiveRepository()).success((function(t){const o=t;e.noQueries=0===o.length,e.queries={};for(let t=0;t<o.length;t++)o[t].parsedNode=e.parseNode(o[t].node),e.queries[o[t].trackId]=o[t];e.noActiveRepository=!1,e.loader=!1,e.getQueriesRunning=!1})).error((function(t){e.error=getError(t),e.loader=!1,e.getQueriesRunning=!1})))};const l=n((function(){r.isActiveRepoOntopType()||e.getQueries()}),1e3);e.$on("$destroy",(function(){n.cancel(l)})),e.deleteQueryHttp=function(t){e.loader=!0,u.deleteQuery(t,r.getActiveRepository()).success((function(){o.success(a.instant("abort.request.sent.msg")),e.loader=!1})).error((function(t){const n=getError(t);o.error(n,a.instant("common.error")),e.loader=!1}))},e.abortQuery=function(t){s.openSimpleModal({title:a.instant("confirm.abort"),message:a.instant("confirm.abort.warning.msg"),warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.downloadQuery=function(e){const t="query_"+e+".rq";let o="/rest/monitor/repository/"+r.getActiveRepository()+"/query/download?query="+encodeURIComponent(e)+"&filename="+encodeURIComponent(t);i.isAuthenticated()&&(o=o+"&authToken="+encodeURIComponent(i.getAuthToken())),window.open(o,"_blank")},e.toggleQueryExpanded=function(t){e.expanded[t]=!e.expanded[t]}}]),n.controller("DeleteQueryCtrl",["$scope","$uibModalInstance",function(e,t){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")}}])}}]);
2
+ //# sourceMappingURL=43.72fbe7e5d290c40db9ec.bundle.js.map