graphdb-workbench 2.2.3 → 2.2.4-TR2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/{102.7141102a059ef5eba1ea.bundle.js → 102.d52dc777ce7b5de1a30a.bundle.js} +2 -2
  2. package/dist/{102.7141102a059ef5eba1ea.bundle.js.map → 102.d52dc777ce7b5de1a30a.bundle.js.map} +1 -1
  3. package/dist/{104.ecd04b9cba294e159ca5.bundle.js → 104.09c8b5802e53cd9dced9.bundle.js} +2 -2
  4. package/dist/{104.ecd04b9cba294e159ca5.bundle.js.map → 104.09c8b5802e53cd9dced9.bundle.js.map} +1 -1
  5. package/dist/{107.5972b71755d2f24f6f44.bundle.js → 107.481f84627ac231f49e56.bundle.js} +2 -2
  6. package/dist/{107.5972b71755d2f24f6f44.bundle.js.map → 107.481f84627ac231f49e56.bundle.js.map} +1 -1
  7. package/dist/108.d61b0e4a54e1d0e6550d.bundle.js +2 -0
  8. package/dist/{108.162ea156d1fc4ad2525f.bundle.js.map → 108.d61b0e4a54e1d0e6550d.bundle.js.map} +1 -1
  9. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js → 11.89d3de4f2e80e373ecf2.bundle.js} +3 -3
  10. package/dist/{11.f7cb87be309f6bd00aa5.bundle.js.map → 11.89d3de4f2e80e373ecf2.bundle.js.map} +1 -1
  11. package/dist/{115.abb22e52d5886ed645c1.bundle.js → 115.36a12f5a0804f33cb569.bundle.js} +2 -2
  12. package/dist/{115.abb22e52d5886ed645c1.bundle.js.map → 115.36a12f5a0804f33cb569.bundle.js.map} +1 -1
  13. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js → 117.9c58e6155d7467c45284.bundle.js} +2 -2
  14. package/dist/{117.ed07ffe3ff3bead9b43b.bundle.js.map → 117.9c58e6155d7467c45284.bundle.js.map} +1 -1
  15. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js → 118.7cdbf2a7be83e4cdc7e2.bundle.js} +2 -2
  16. package/dist/{118.57c922b04fbcf0d65d1c.bundle.js.map → 118.7cdbf2a7be83e4cdc7e2.bundle.js.map} +1 -1
  17. package/dist/{119.7b75484ef37c16039937.bundle.js → 119.f7c106efa2582220baa7.bundle.js} +2 -2
  18. package/dist/{119.7b75484ef37c16039937.bundle.js.map → 119.f7c106efa2582220baa7.bundle.js.map} +1 -1
  19. package/dist/{12.eb41e4af80fee51d893c.bundle.js → 12.b4ac6d1ff3d669d3e63f.bundle.js} +2 -2
  20. package/dist/{12.eb41e4af80fee51d893c.bundle.js.map → 12.b4ac6d1ff3d669d3e63f.bundle.js.map} +1 -1
  21. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js → 120.d20d9e20e2d3c5476f8d.bundle.js} +2 -2
  22. package/dist/{120.0f42d5a0967c1f4636ca.bundle.js.map → 120.d20d9e20e2d3c5476f8d.bundle.js.map} +1 -1
  23. package/dist/{121.f85253eb7e057efdb05d.bundle.js → 121.dc96efcaf4dc5e63f58d.bundle.js} +2 -2
  24. package/dist/{121.f85253eb7e057efdb05d.bundle.js.map → 121.dc96efcaf4dc5e63f58d.bundle.js.map} +1 -1
  25. package/dist/{126.349ebcea493c77fecf7e.bundle.js → 126.4c2fb40676d2508bbc65.bundle.js} +2 -2
  26. package/dist/{126.349ebcea493c77fecf7e.bundle.js.map → 126.4c2fb40676d2508bbc65.bundle.js.map} +1 -1
  27. package/dist/{13.bc3607638ad1e2068125.bundle.js → 13.f6b8f9a2288e2485ee20.bundle.js} +2 -2
  28. package/dist/{13.bc3607638ad1e2068125.bundle.js.map → 13.f6b8f9a2288e2485ee20.bundle.js.map} +1 -1
  29. package/dist/148.45985ae23de642595544.bundle.js +1 -1
  30. package/dist/148.45985ae23de642595544.bundle.js.map +1 -1
  31. package/dist/16.2ca98f5bec0fae221cef.bundle.js +3 -0
  32. package/dist/{16.cd06772f9e031d37db03.bundle.js.map → 16.2ca98f5bec0fae221cef.bundle.js.map} +1 -1
  33. package/dist/{17.45b5c34f6c73bde1113d.bundle.js → 17.b19a2d3870590d21e8e9.bundle.js} +2 -2
  34. package/dist/{17.45b5c34f6c73bde1113d.bundle.js.map → 17.b19a2d3870590d21e8e9.bundle.js.map} +1 -1
  35. package/dist/{19.92f27dd146df127e8d6e.bundle.js → 19.34c180252e48207f01b4.bundle.js} +3 -3
  36. package/dist/{19.92f27dd146df127e8d6e.bundle.js.map → 19.34c180252e48207f01b4.bundle.js.map} +1 -1
  37. package/dist/20.9e9e388a98851c65f8f7.bundle.js +2 -0
  38. package/dist/{20.4eb25ede434dc329ecf1.bundle.js.map → 20.9e9e388a98851c65f8f7.bundle.js.map} +1 -1
  39. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js +2 -0
  40. package/dist/21.8434e1ecb6fcfa06e1f1.bundle.js.map +1 -0
  41. package/dist/{23.16fc17b0a8983ce3d809.bundle.js → 23.22e3720d741ee87c8108.bundle.js} +2 -2
  42. package/dist/{23.16fc17b0a8983ce3d809.bundle.js.map → 23.22e3720d741ee87c8108.bundle.js.map} +1 -1
  43. package/dist/{24.04d84edbd8f93d036633.bundle.js → 24.63acd0fc451fc797ff79.bundle.js} +2 -2
  44. package/dist/{24.04d84edbd8f93d036633.bundle.js.map → 24.63acd0fc451fc797ff79.bundle.js.map} +1 -1
  45. package/dist/{26.3a642e64c7803f3b32f1.bundle.js → 26.194b2d09daa679b7e09c.bundle.js} +2 -2
  46. package/dist/{26.3a642e64c7803f3b32f1.bundle.js.map → 26.194b2d09daa679b7e09c.bundle.js.map} +1 -1
  47. package/dist/27.35fe33bb9622c2e29c43.bundle.js +2 -0
  48. package/dist/{27.fef157d9275358c9f1a0.bundle.js.map → 27.35fe33bb9622c2e29c43.bundle.js.map} +1 -1
  49. package/dist/{29.a1b30610d7960a86b1cb.bundle.js → 29.e4eadb676659c5d6e44b.bundle.js} +3 -3
  50. package/dist/{29.a1b30610d7960a86b1cb.bundle.js.map → 29.e4eadb676659c5d6e44b.bundle.js.map} +1 -1
  51. package/dist/{30.3a05504ff287ca6df711.bundle.js → 30.0fb90b3cdf78fcde6251.bundle.js} +2 -2
  52. package/dist/{30.3a05504ff287ca6df711.bundle.js.map → 30.0fb90b3cdf78fcde6251.bundle.js.map} +1 -1
  53. package/dist/{31.13d5a8e9834cd5db589c.bundle.js → 31.8dd9fe71d36bd04a0433.bundle.js} +2 -2
  54. package/dist/{31.13d5a8e9834cd5db589c.bundle.js.map → 31.8dd9fe71d36bd04a0433.bundle.js.map} +1 -1
  55. package/dist/{32.59a7369287d15e8b9ab6.bundle.js → 32.8e1c25a47debdf5145d8.bundle.js} +2 -2
  56. package/dist/{32.59a7369287d15e8b9ab6.bundle.js.map → 32.8e1c25a47debdf5145d8.bundle.js.map} +1 -1
  57. package/dist/33.89b51420b48880728b96.bundle.js +2 -0
  58. package/dist/33.89b51420b48880728b96.bundle.js.map +1 -0
  59. package/dist/{35.fe688fc32270724c391d.bundle.js → 35.a9846fba95e98a294957.bundle.js} +2 -2
  60. package/dist/{35.fe688fc32270724c391d.bundle.js.map → 35.a9846fba95e98a294957.bundle.js.map} +1 -1
  61. package/dist/{36.7da22f08c8e850885cc5.bundle.js → 36.4dbd0f9007404b0adbe2.bundle.js} +2 -2
  62. package/dist/{36.7da22f08c8e850885cc5.bundle.js.map → 36.4dbd0f9007404b0adbe2.bundle.js.map} +1 -1
  63. package/dist/37.ac99eb00fe71266c5bff.bundle.js +2 -0
  64. package/dist/{37.8a9855206d5ae5eba9be.bundle.js.map → 37.ac99eb00fe71266c5bff.bundle.js.map} +1 -1
  65. package/dist/{39.0eebc4b972cff879c1c9.bundle.js → 39.8f8ae5c232bd2f023e7c.bundle.js} +2 -2
  66. package/dist/{39.0eebc4b972cff879c1c9.bundle.js.map → 39.8f8ae5c232bd2f023e7c.bundle.js.map} +1 -1
  67. package/dist/4.5391679fa01c55e842cc.bundle.js +2 -0
  68. package/dist/4.5391679fa01c55e842cc.bundle.js.map +1 -0
  69. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js → 40.50f010a0a0ce99da5092.bundle.js} +2 -2
  70. package/dist/{40.10f42e3f6d8d87bd3221.bundle.js.map → 40.50f010a0a0ce99da5092.bundle.js.map} +1 -1
  71. package/dist/{41.368780c518c3f6cab4b7.bundle.js → 41.d09e0f01eac3492e3376.bundle.js} +2 -2
  72. package/dist/{41.368780c518c3f6cab4b7.bundle.js.map → 41.d09e0f01eac3492e3376.bundle.js.map} +1 -1
  73. package/dist/{42.1a48ae582180fa6374f9.bundle.js → 42.9561ff9cd77df0f86a91.bundle.js} +2 -2
  74. package/dist/{42.1a48ae582180fa6374f9.bundle.js.map → 42.9561ff9cd77df0f86a91.bundle.js.map} +1 -1
  75. package/dist/{43.64268be8880acd392fee.bundle.js → 43.0400aae23dac518b78ec.bundle.js} +2 -2
  76. package/dist/{43.64268be8880acd392fee.bundle.js.map → 43.0400aae23dac518b78ec.bundle.js.map} +1 -1
  77. package/dist/{53.58a23efc22865c67d57d.bundle.js → 53.54b20545d5504efa8958.bundle.js} +2 -2
  78. package/dist/{53.58a23efc22865c67d57d.bundle.js.map → 53.54b20545d5504efa8958.bundle.js.map} +1 -1
  79. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js → 54.81f97307e31f5eabb5f0.bundle.js} +2 -2
  80. package/dist/{54.1e2e99cd8cdf20b99a4f.bundle.js.map → 54.81f97307e31f5eabb5f0.bundle.js.map} +1 -1
  81. package/dist/{55.693c1a0dd775181e1e29.bundle.js → 55.e8df33b84ca578a9a633.bundle.js} +2 -2
  82. package/dist/{55.693c1a0dd775181e1e29.bundle.js.map → 55.e8df33b84ca578a9a633.bundle.js.map} +1 -1
  83. package/dist/{56.62459de7af529d956b75.bundle.js → 56.d765faad673f618d41b0.bundle.js} +2 -2
  84. package/dist/{56.62459de7af529d956b75.bundle.js.map → 56.d765faad673f618d41b0.bundle.js.map} +1 -1
  85. package/dist/{60.2cb24e628b92cb3e0210.bundle.js → 60.f13766507ec5f29fde78.bundle.js} +2 -2
  86. package/dist/{60.2cb24e628b92cb3e0210.bundle.js.map → 60.f13766507ec5f29fde78.bundle.js.map} +1 -1
  87. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js → 65.aa9736b7aad2582ca7ea.bundle.js} +2 -2
  88. package/dist/{65.6c12c48ac0d6f57a5079.bundle.js.map → 65.aa9736b7aad2582ca7ea.bundle.js.map} +1 -1
  89. package/dist/{67.5ae0610f77a1455ce92b.bundle.js → 67.e7bd652fadf93be1fbae.bundle.js} +2 -2
  90. package/dist/{67.5ae0610f77a1455ce92b.bundle.js.map → 67.e7bd652fadf93be1fbae.bundle.js.map} +1 -1
  91. package/dist/{69.90776e70cb361d1ac6d5.bundle.js → 69.6b915e6a7a9c36a78e2b.bundle.js} +2 -2
  92. package/dist/{69.90776e70cb361d1ac6d5.bundle.js.map → 69.6b915e6a7a9c36a78e2b.bundle.js.map} +1 -1
  93. package/dist/{71.3e927496e6e4175a3127.bundle.js → 71.624ca936339bf337e46a.bundle.js} +2 -2
  94. package/dist/{71.3e927496e6e4175a3127.bundle.js.map → 71.624ca936339bf337e46a.bundle.js.map} +1 -1
  95. package/dist/{72.bc99fbec188b4e49aa53.bundle.js → 72.3a5620a182219e9ea05d.bundle.js} +2 -2
  96. package/dist/{72.bc99fbec188b4e49aa53.bundle.js.map → 72.3a5620a182219e9ea05d.bundle.js.map} +1 -1
  97. package/dist/{73.40b5cbae08c7f3a58438.bundle.js → 73.f162e544378754078826.bundle.js} +2 -2
  98. package/dist/{73.40b5cbae08c7f3a58438.bundle.js.map → 73.f162e544378754078826.bundle.js.map} +1 -1
  99. package/dist/{74.cc42a1dcef7e9b830354.bundle.js → 74.7595755907badb1a99b8.bundle.js} +2 -2
  100. package/dist/{74.cc42a1dcef7e9b830354.bundle.js.map → 74.7595755907badb1a99b8.bundle.js.map} +1 -1
  101. package/dist/{75.31d1a4766c80c90b2afc.bundle.js → 75.4cc7ff534d56a05c578a.bundle.js} +2 -2
  102. package/dist/{75.31d1a4766c80c90b2afc.bundle.js.map → 75.4cc7ff534d56a05c578a.bundle.js.map} +1 -1
  103. package/dist/{76.89d209ce08efa7429e87.bundle.js → 76.cd0cfea4c96e88230dbe.bundle.js} +2 -2
  104. package/dist/{76.89d209ce08efa7429e87.bundle.js.map → 76.cd0cfea4c96e88230dbe.bundle.js.map} +1 -1
  105. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js → 77.df7767b1a0a3a0efa202.bundle.js} +2 -2
  106. package/dist/{77.64c49e9e99b0ae3fbbca.bundle.js.map → 77.df7767b1a0a3a0efa202.bundle.js.map} +1 -1
  107. package/dist/{79.0fbaedffc1f583a6064f.bundle.js → 79.4d64b377b0308809136f.bundle.js} +2 -2
  108. package/dist/{79.0fbaedffc1f583a6064f.bundle.js.map → 79.4d64b377b0308809136f.bundle.js.map} +1 -1
  109. package/dist/{80.6d489af9482e358c8dd8.bundle.js → 80.36e424031127d1743f20.bundle.js} +2 -2
  110. package/dist/{80.6d489af9482e358c8dd8.bundle.js.map → 80.36e424031127d1743f20.bundle.js.map} +1 -1
  111. package/dist/{94.94158487a9024ff3a623.bundle.js → 94.b1ccdd207229ae57569f.bundle.js} +2 -2
  112. package/dist/{94.94158487a9024ff3a623.bundle.js.map → 94.b1ccdd207229ae57569f.bundle.js.map} +1 -1
  113. package/dist/{97.48e14b67906b4d61a1b1.bundle.js → 97.951e03ffd2d5a10f868d.bundle.js} +2 -2
  114. package/dist/{97.48e14b67906b4d61a1b1.bundle.js.map → 97.951e03ffd2d5a10f868d.bundle.js.map} +1 -1
  115. package/dist/{98.cc7086155b76601af017.bundle.js → 98.745b4c457214d4189d7a.bundle.js} +2 -2
  116. package/dist/{98.cc7086155b76601af017.bundle.js.map → 98.745b4c457214d4189d7a.bundle.js.map} +1 -1
  117. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js → bundle.651116fe2383a66f32c9.bundle.js} +21 -21
  118. package/dist/{bundle.d34ddcc40dd190254f1c.bundle.js.map → bundle.651116fe2383a66f32c9.bundle.js.map} +1 -1
  119. package/dist/index.html +3 -3
  120. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  121. package/dist/pages/autocomplete.html +1 -1
  122. package/dist/pages/choose-repository-type.html +1 -1
  123. package/dist/pages/cluster-management/clusterInfo.html +3 -3
  124. package/dist/pages/create-index.html +4 -4
  125. package/dist/pages/dependencies.html +1 -1
  126. package/dist/pages/domainRangeInfo.html +2 -2
  127. package/dist/pages/edit.html +1 -1
  128. package/dist/pages/explore.html +1 -1
  129. package/dist/pages/export.html +1 -1
  130. package/dist/pages/find.html +1 -1
  131. package/dist/pages/graph-config/saveGraphConfig.html +11 -11
  132. package/dist/pages/graphs-visualizations.html +7 -7
  133. package/dist/pages/guides.html +1 -1
  134. package/dist/pages/import.html +1 -1
  135. package/dist/pages/jdbc-create.html +5 -5
  136. package/dist/pages/monitor/queries.html +1 -1
  137. package/dist/pages/monitor/resources.html +2 -2
  138. package/dist/pages/namespaces.html +2 -2
  139. package/dist/pages/plugins.html +1 -1
  140. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  141. package/dist/pages/rdfrank.html +2 -2
  142. package/dist/pages/repositories.html +2 -2
  143. package/dist/pages/repository.html +2 -2
  144. package/dist/pages/similarity-indexes.html +1 -1
  145. package/dist/pages/sparql-template-create.html +5 -5
  146. package/dist/pages/sparql.html +3 -3
  147. package/dist/pages/webapi.html +2 -2
  148. package/dist/res/swagger/index.html +27 -27
  149. package/package.json +1 -1
  150. package/dist/108.162ea156d1fc4ad2525f.bundle.js +0 -2
  151. package/dist/16.cd06772f9e031d37db03.bundle.js +0 -3
  152. package/dist/20.4eb25ede434dc329ecf1.bundle.js +0 -2
  153. package/dist/21.5586732af2e5cec0d05a.bundle.js +0 -2
  154. package/dist/21.5586732af2e5cec0d05a.bundle.js.map +0 -1
  155. package/dist/27.fef157d9275358c9f1a0.bundle.js +0 -2
  156. package/dist/33.fde8076c81c87c25c367.bundle.js +0 -2
  157. package/dist/33.fde8076c81c87c25c367.bundle.js.map +0 -1
  158. package/dist/37.8a9855206d5ae5eba9be.bundle.js +0 -2
  159. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js +0 -2
  160. package/dist/4.ca3eb6b5da0890c0abe0.bundle.js.map +0 -1
@@ -1 +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,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AGJnE,EAAOiE,IAAI,YAAY,WACnB6B,OAAOC,OAAS,KAChBD,OAAOmE,KAAO,QAqBlBI,EAAE,YAAYiE,GAAG,SAAS,WACtBrO,GAAS,WACL0L,MACD,MAqCP3L,EAAOuO,iBAAiB,iDAAiD,WACpDvO,EAAOyF,gBAqD5BzF,EAAOiE,IAAI,aAAa,SAAUoH,EAAGmD,GAC7BA,EAASC,eACTzO,EAAO8M,QAAQJ,EAAW8B,EAASC,gBAEvCzO,EAAO2G,QAAQ+F,EAAW8B,EAASE,YAGvC1O,EAAOiE,IAAI,0BAA0B,SAAUoH,EAAGwB,GAC9C7M,EAAOiM,SAAWY,EAClB7M,EAAO6M,KAAOA,KAIlB7M,EAAOyF,aAAe9F,QAAQgP,KAAKlH,GAEnCzH,EAAO4O,mBAAoB,EAC3B5O,EAAOsN,WAAa,GACpBtN,EAAO6O,cAAgB,GAEvB7O,EAAO8O,sBAAwB,aAG/B9O,EAAO+O,qBAAuB,aAG9B/O,EAAOgP,uBAAyB,aAvsBpCrP,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.0eebc4b972cff879c1c9.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
+ {"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,GAAK,WAAaN,EAAOC,KAAOD,EAAOC,OAI7D,MAiBMM,EAAa5B,EAAa4B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nCA,EAAgBD,QAAU,CAAC,SAAU,WAAY,YAAa,SAAU,gBAAiB,oBAAqB,UAAW,yBAA0B,0BAA2B,eAAgB,gBAAiB,+BAAgC,sBAAuB,SAAU","file":"39.8f8ae5c232bd2f023e7c.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":""}
@@ -0,0 +1,2 @@
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[4,113],{43:function(e,t){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",n),n.$inject=["$http"];function n(e){return{getClusterConfig:function(){return e.get("rest/cluster/config")},createCluster:function(t){return e.post("rest/cluster/config",t)},updateCluster:function(t){t.nodes&&delete t.nodes;return e.patch("rest/cluster/config",t)},deleteCluster:function(t){const n=$.param({force:t});return e.delete("rest/cluster/config?"+n)},addNodesToCluster:function(t){return e.post("rest/cluster/config/node",{nodes:t})},removeNodesFromCluster:function(t){return e.delete("rest/cluster/config/node",{data:{nodes:t},headers:{"Content-Type":"application/json"}})},getClusterStatus:function(){return e.get("rest/cluster/group/status")},getNodeStatus:function(){return e.get("rest/cluster/node/status")}}}},59:function(e,t,n){"use strict";n.r(t),n.d(t,"NodeState",(function(){return r})),n.d(t,"LinkState",(function(){return s}));n(4),n(43);var o=n(67);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",a).controller("CreateClusterCtrl",c).controller("DeleteClusterCtrl",i).controller("EditClusterCtrl",g).controller("AddLocationFromClusterCtrl",d).controller("AddNodesDialogCtrl",m).controller("RemoveNodesDialogCtrl",p).factory("RemoteLocationsService",u);const r={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},s={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION"};function a(e,t,n,a,l,c,i,u,d,g,f,m,p,C,h,_){e.loader=!0,e.isLeader=!1,e.currentNode=null,e.clusterModel={},e.NodeState=r,e.leaderChanged=!1,e.currentLeader=null,e.childContext={},e.shouldShowClusterSettingsPanel=!1;let N;function L(t){N||(N=e.getClusterStatus().then(()=>{if(t||!e.clusterConfiguration)return e.getClusterConfiguration()}).then(()=>{if(!e.currentNode||e.leaderChanged)return e.getCurrentNodeStatus()}).finally(()=>{N=null,e.childContext.redraw()}))}function $(){return h.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 v(t){a.success(t),e.getClusterConfiguration()}function S(e,t,n){let r=e.message||e;400===t&&Array.isArray(e)?r=e.reduce((e,t)=>e+`<div>${t}</div>`,""):412!==t||Object(o.isString)(e)||(r=Object.keys(e).reduce((t,n)=>t+`<div>${n} - ${e[n]}</div>`,"")),a.error(r,n,{allowHtml:!0})}e.onopen=e.onclose=()=>angular.noop(),e.toggleSidePanel=()=>{e.shouldShowClusterSettingsPanel=!e.shouldShowClusterSettingsPanel},e.toggleLegend=()=>{e.childContext.toggleLegend&&e.childContext.toggleLegend()},e.setLoader=function(t,n){f.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=f((function(){e.loader=t}),50)):e.loader=!1},e.childContext.selectNode=function(t){e.selectedNode!==t?e.selectedNode=t:e.selectedNode=null,e.$apply()},e.getLoaderMessage=function(){return e.loaderMessage||C.instant("common.loading")},e.getClusterConfiguration=()=>m.getClusterConfig().then(t=>{if(e.clusterConfiguration=t.data,!e.currentNode)return e.getCurrentNodeStatus()}).catch(()=>{e.clusterConfiguration=null}),e.getClusterStatus=function(){return m.getClusterStatus().then((function(t){const n=t.data.slice(),o=n.find(e=>e.nodeState===r.LEADER);var a,l;a=e.currentLeader,(l=o)&&a&&a.address===l.address||(e.currentLeader=o,e.leaderChanged=!0),e.currentNode=n.find(t=>t.address===e.currentNode.address);const c=[];o&&Object.keys(o.syncStatus).forEach(e=>{const t=o.syncStatus[e];t!==s.NO_CONNECTION&&c.push({id:`${o.address}-${e}`,source:o.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(){c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-create-dialog.html",controller:"CreateClusterCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.finally((function(){$(),L(!0)}))},e.showDeleteDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then((function(t){const n=C.instant("cluster_management.delete_cluster_dialog.loader_message");e.setLoader(!0,n),m.deleteCluster(t).then(t=>{if(Object.values(t.data).every(e=>"Cluster was deleted on this node."===e)){const e=C.instant("cluster_management.delete_cluster_dialog.notifications.success_delete");a.success(e)}else{const e=C.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>`,"");a.warning(n,e,{allowHtml:!0})}e.getClusterConfiguration()}).catch(e=>{const t=C.instant("cluster_management.delete_cluster_dialog.notifications.fail_delete");S(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0),_.$broadcast("reloadLocations")})}))},e.showEditConfigurationDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:function(){return{clusterConfiguration:e.clusterConfiguration}}}}).result.finally((function(){L(!0)}))},e.getCurrentNodeStatus=()=>m.getNodeStatus().then(t=>{e.leaderChanged=!1,e.currentNode=t.data}).catch(t=>{e.currentNode=t.data,e.clusterModel.hasCluster=!1}).then(()=>$()),e.showAddNodeToClusterDialog=()=>{c.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=C.instant("cluster_management.cluster_page.add_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.rpcAddress);m.addNodesToCluster(o).then(()=>{v(C.instant("cluster_management.cluster_page.notifications.add_nodes_success"))}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.add_nodes_fail");S(e.data,e.status,t)}).finally(()=>{e.setLoader(!1),L(!0)})})).finally(()=>$())},e.showRemoveNodesFromClusterDialog=()=>{c.open({templateUrl:"js/angular/clustermanagement/templates/modal/remove-nodes-dialog.html",controller:"RemoveNodesDialogCtrl",size:"lg",resolve:{data:function(){return{clusterModel:e.clusterModel}}}}).result.then((function(t){const n=C.instant("cluster_management.cluster_page.remove_nodes_loader");e.setLoader(!0,n);const o=t.map(e=>e.address);m.removeNodesFromCluster(o).then(()=>{v(C.instant("cluster_management.cluster_page.notifications.remove_nodes_success"))}).catch(e=>{const t=C.instant("cluster_management.cluster_page.notifications.remove_nodes_fail");S(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=d((function(){L()}),1e3);e.$on("$destroy",(function(){d.cancel(t)}))});const w=angular.element(u),T=function(){e.childContext.resize()};w.bind("resize",T);const O=function(t){const n=t.target,o=document.getElementById("nodeTooltip");e.selectedNode&&o!==n&&!o.contains(n)&&e.childContext.selectNode(null)};w.bind("mousedown",O),e.$on("$destroy",(function(){w.unbind("resize",T),w.unbind("mousedown",O)}))}a.$inject=["$scope","$http","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","ClusterRestService","$location","$translate","RemoteLocationsService","$rootScope"];const l=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 c(e,t,n,o,r,s,a,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=a.clusterModel.locations.filter(e=>!e.isLocal),e.selectedLocations=a.clusterModel.locations.filter(e=>e.isLocal),e.loader=!1,e.getAdvancedOptionsClass=l,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 i(e,t){e.forceDelete=!1,e.ok=function(){t.close(e.forceDelete)},e.cancel=function(){t.dismiss("cancel")}}function u(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 d(e,t,n,o,r){e.newLocation={uri:"",authType:"signature",username:"",password:"",active:!1},e.docBase=f(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 g(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")}}c.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data","$uibModal","RemoteLocationsService","$rootScope"],i.$inject=["$scope","$uibModalInstance"],u.$inject=["$http","toastr","$uibModal","LocationsRestService","$translate"],d.$inject=["$scope","$uibModalInstance","toastr","productInfo","$translate"],g.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"];const f=function(e){return"https://graphdb.ontotext.com/documentation/"+e.productShortVersion};function m(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 p(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")}}m.$inject=["$scope","$uibModalInstance","data","$uibModal","RemoteLocationsService"],p.$inject=["$scope","$uibModalInstance","data"]}}]);
2
+ //# sourceMappingURL=4.5391679fa01c55e842cc.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","LinkState","IN_SYNC","SYNCING","$scope","$q","toastr","$repositories","$uibModal","$sce","$window","$interval","ModalService","$timeout","$location","$translate","$rootScope","loader","isLeader","currentNode","clusterModel","leaderChanged","currentLeader","childContext","shouldShowClusterSettingsPanel","updateRequest","then","clusterConfiguration","getClusterConfiguration","getCurrentNodeStatus","finally","redraw","getLocationsWithRpcAddresses","locations","localNode","find","location","isLocal","endpoint","rpcAddress","address","onAddRemoveSuccess","message","success","handleErrors","status","title","failMessage","Array","isArray","reduce","acc","error","Object","keys","key","allowHtml","onopen","onclose","noop","toggleSidePanel","toggleLegend","setLoader","cancel","loaderTimeout","loaderMessage","selectNode","node","selectedNode","$apply","getLoaderMessage","instant","response","catch","slice","leader","nodeState","newLeader","links","syncStatus","forEach","push","id","source","target","hasCluster","showCreateClusterDialog","open","templateUrl","size","resolve","result","showDeleteDialog","values","every","resultMsg","successMessage","failedNodesList","warning","$broadcast","showEditConfigurationDialog","showAddNodeToClusterDialog","nodesRpcAddress","map","failMessageTitle","showRemoveNodesFromClusterDialog","timer","$on","w","element","resize","bind","mousedown","event","nodeTooltipElement","document","getElementById","contains","unbind","getAdvancedOptionsClass","optionsModule","isAriaExpanded","getAttribute","$uibModalInstance","pageTitle","autofocusId","errors","electionMinTimeout","electionRangeTimeout","heartbeatInterval","messageSizeKB","verificationTimeout","filter","selectedLocations","close","preconditionErrors","splice","isClusterConfigurationValid","isFormValid","clusterConfigurationForm","$invalid","nodesListValid","length","addNodeToList","loc","removeNodeFromList","index","addLocation","newLocation","ok","dismiss","LocationsRestService","windowClass","dataAddLocation","uri","locationData","msg","getError","locationAdded","addLocationHttp","getLocations","local","errorMsg","locationsArray","rpcAddressFetchers","getLocationRpcAddress","isAvailable","Promise","allSettled","getRemoteLocationsRpcAddresses","productInfo","docBase","getDocBase","isValidLocation","indexOf","copy","productShortVersion","clusterNodes","includes","isNew","shouldRemove","nodesToRemoveCount","leftNodesLessThanTwo","toggleNode","nodesToRemove"],"mappings":"8EAAAA,QACKC,OAAO,yCAA0C,IACjDC,QAAQ,qBAAsBC,GAEnCA,EAAmBC,QAAU,CAAC,SAI9B,SAASD,EAAmBE,GACxB,MAAO,CACHC,iBAUJ,WACI,OAAOD,EAAME,IAAI,wBAVjBC,cAaJ,SAAuBC,GACnB,OAAOJ,EAAMK,KAAK,sBAAoCD,IAbtDE,cAgBJ,SAAuBF,GACfA,EAAmBG,cACZH,EAAmBG,MAE9B,OAAOP,EAAMQ,MAAM,sBAAoCJ,IAnBvDK,cAsBJ,SAAuBC,GACnB,MAAMC,EAAOC,EAAEC,MAAM,CACjBC,MAAOJ,IAEX,OAAOV,EAAMe,OAAO,uBAAoCJ,IAzBxDK,kBA4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G,WAAaF,EAASE,YAGlFlC,EAAO6I,mBAAqB,SAAUC,EAAO/E,GACzC/D,EAAOpC,MAAMwK,OAAOU,EAAO,GAC3B9I,EAAO6B,UAAUgD,KAAKd,IAG1B/D,EAAO+I,YAAc,WACjB5J,EAAuB4J,cAClBzH,KAAM0H,IACCA,GACAhJ,EAAO6B,UAAUgD,KAAKmE,MAKtChJ,EAAOiJ,GAAK,WACR1B,EAAkBW,MAAMlI,EAAOpC,QAGnCoC,EAAO2D,OAAS,WACZ4D,EAAkB2B,QAAQ,WAMlC,SAAShK,EAAsBc,EAAQuH,EAAmBvJ,GACtD,MAAMgD,EAAehE,QAAQ2N,KAAK3M,EAAKgD,cAEvChB,EAAO6K,aAAe7J,EAAapD,MACnCoC,EAAO6K,aAAajG,QAASb,GAASA,EAAKiH,cAAe,GAC1DhL,EAAOiL,mBAAqB,EAC5BjL,EAAOkL,sBAAuB,EAE9BlL,EAAOmL,WAAa,SAAUrC,EAAO/E,GACjCA,EAAKiH,cAAgBjH,EAAKiH,aACtBjH,EAAKiH,aACLhL,EAAOiL,qBAEPjL,EAAOiL,qBAEXjL,EAAOkL,qBAAuBlL,EAAO6K,aAAanC,OAAS1I,EAAOiL,mBAAqB,GAG3FjL,EAAOiJ,GAAK,WACR,MAAMmC,EAAgBpL,EAAO6K,aAAa7C,OAAQjE,GAASA,EAAKiH,cAChEzD,EAAkBW,MAAMkD,IAG5BpL,EAAO2D,OAAS,WACZ4D,EAAkB2B,QAAQ,WApElCjK,EAAmB7B,QAAU,CAAC,SAAU,oBAAqB,OAAQ,YAAa,0BA0ClF8B,EAAsB9B,QAAU,CAAC,SAAU,oBAAqB","file":"4.5391679fa01c55e842cc.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';\nimport {isString} from \"lodash\";\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.cluster.service',\n 'toastr',\n 'pageslide-directive'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.controllers', modules)\n .controller('ClusterManagementCtrl', ClusterManagementCtrl)\n .controller('CreateClusterCtrl', CreateClusterCtrl)\n .controller('DeleteClusterCtrl', DeleteClusterCtrl)\n .controller('EditClusterCtrl', EditClusterCtrl)\n .controller('AddLocationFromClusterCtrl', AddLocationFromClusterCtrl)\n .controller('AddNodesDialogCtrl', AddNodesDialogCtrl)\n .controller('RemoveNodesDialogCtrl', RemoveNodesDialogCtrl)\n .factory('RemoteLocationsService', RemoteLocationsService);\n\nexport const NodeState = {\n LEADER: 'LEADER',\n FOLLOWER: 'FOLLOWER',\n CANDIDATE: 'CANDIDATE',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n NO_CONNECTION: 'NO_CONNECTION',\n READ_ONLY: 'READ_ONLY',\n RESTRICTED: 'RESTRICTED',\n NO_CLUSTER: 'NO_CLUSTER'\n};\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION'\n};\n\nClusterManagementCtrl.$inject = ['$scope', '$http', '$q', 'toastr', '$repositories', '$uibModal', '$sce',\n '$window', '$interval', 'ModalService', '$timeout', 'ClusterRestService', '$location', '$translate', 'RemoteLocationsService', '$rootScope'];\n\nfunction ClusterManagementCtrl($scope, $http, $q, toastr, $repositories, $uibModal, $sce,\n $window, $interval, ModalService, $timeout, ClusterRestService, $location, $translate, RemoteLocationsService, $rootScope) {\n $scope.loader = true;\n $scope.isLeader = false;\n $scope.currentNode = null;\n $scope.clusterModel = {};\n $scope.NodeState = NodeState;\n $scope.leaderChanged = false;\n $scope.currentLeader = null;\n\n // Holds child context\n $scope.childContext = {};\n\n $scope.shouldShowClusterSettingsPanel = false;\n const DELETED_ON_NODE_MESSAGE = 'Cluster was deleted on this node.';\n $scope.onopen = $scope.onclose = () => angular.noop();\n\n $scope.toggleSidePanel = () => {\n $scope.shouldShowClusterSettingsPanel = !$scope.shouldShowClusterSettingsPanel;\n };\n\n $scope.toggleLegend = () => {\n if ($scope.childContext.toggleLegend) {\n $scope.childContext.toggleLegend();\n }\n };\n\n // TODO: Similar function is declared multiple times in different components. Find out how to avoid it!\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n }, 50);\n } else {\n $scope.loader = false;\n }\n };\n\n function selectNode(node) {\n if ($scope.selectedNode !== node) {\n $scope.selectedNode = node;\n } else {\n $scope.selectedNode = null;\n }\n $scope.$apply();\n }\n\n $scope.childContext.selectNode = selectNode;\n\n function initialize() {\n $scope.loader = true;\n\n return $scope.getCurrentNodeStatus()\n .then(() => {\n return $scope.getClusterConfiguration();\n })\n .then(() => {\n return $scope.getClusterStatus();\n })\n .finally(() => {\n $scope.setLoader(false);\n });\n }\n\n let updateRequest;\n function updateCluster(force) {\n if (updateRequest) {\n return;\n }\n\n updateRequest = $scope.getClusterStatus()\n .then(() => {\n if (force || !$scope.clusterConfiguration) {\n return $scope.getClusterConfiguration();\n }\n })\n .then(() => {\n if (!$scope.currentNode || $scope.leaderChanged) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .finally(() => {\n updateRequest = null;\n $scope.childContext.redraw();\n });\n }\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || $translate.instant('common.loading');\n };\n\n $scope.getClusterConfiguration = () => {\n return ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.clusterConfiguration = response.data;\n if (!$scope.currentNode) {\n return $scope.getCurrentNodeStatus();\n }\n })\n .catch(() => {\n $scope.clusterConfiguration = null;\n });\n };\n\n function isLeaderChanged(currentLeader, newLeader) {\n if (!newLeader) {\n // If election is in place and there is no leader yet, consider it as leader change\n return true;\n }\n return !currentLeader || currentLeader.address !== newLeader.address;\n }\n\n $scope.getClusterStatus = function () {\n return ClusterRestService.getClusterStatus()\n .then(function (response) {\n const nodes = response.data.slice();\n const leader = nodes.find((node) => node.nodeState === NodeState.LEADER);\n\n if (isLeaderChanged($scope.currentLeader, leader)) {\n $scope.currentLeader = leader;\n $scope.leaderChanged = true;\n }\n $scope.currentNode = nodes.find((node) => node.address === $scope.currentNode.address);\n\n const links = [];\n if (leader) {\n Object.keys(leader.syncStatus).forEach((node) => {\n const status = leader.syncStatus[node];\n if (status !== LinkState.NO_CONNECTION) {\n links.push({\n id: `${leader.address}-${node}`,\n source: leader.address,\n target: node,\n status\n });\n }\n });\n }\n $scope.clusterModel.hasCluster = true;\n $scope.clusterModel.nodes = nodes;\n $scope.clusterModel.links = links;\n })\n .catch(function (error) {\n if (error.status === 404) {\n $scope.clusterModel.hasCluster = false;\n $scope.clusterModel.nodes = [];\n $scope.clusterModel.links = [];\n $scope.clusterConfiguration = null;\n }\n });\n };\n\n $scope.showCreateClusterDialog = function () {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-create-dialog.html',\n controller: 'CreateClusterCtrl',\n size: 'lg',\n resolve: {\n data: function () {\n return {\n clusterModel: $scope.clusterModel\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n getLocationsWithRpcAddresses();\n updateCluster(true);\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then(function (forceDelete) {\n const loaderMessage = $translate.instant('cluster_management.delete_cluster_dialog.loader_message');\n $scope.setLoader(true, loaderMessage);\n ClusterRestService.deleteCluster(forceDelete)\n .then((response) => {\n const allNodesDeleted = Object.values(response.data).every((resultMsg) => resultMsg === DELETED_ON_NODE_MESSAGE);\n if (allNodesDeleted) {\n const successMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.success_delete');\n toastr.success(successMessage);\n } else {\n const successMessage = $translate.instant(\n 'cluster_management.delete_cluster_dialog.notifications.success_delete_partial');\n const failedNodesList = Object.keys(response.data)\n .reduce((message, key) => message += `<div>${key} - ${response.data[key]}</div>`, '');\n toastr.warning(failedNodesList, successMessage, {allowHtml: true});\n }\n $scope.getClusterConfiguration();\n })\n .catch((error) => {\n const failMessage = $translate.instant('cluster_management.delete_cluster_dialog.notifications.fail_delete');\n handleErrors(error.data, error.status, failMessage);\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 handleErrors(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 handleErrors(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 handleErrors(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 && !isString(data)) {\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],{137:function(e,r,t){"use strict";t.r(r);t(4),t(11),t(109),t(91),t(10),t(35),t(36);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"])},91: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.3">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
2
- //# sourceMappingURL=40.10f42e3f6d8d87bd3221.bundle.js.map
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[40,94],{137:function(e,r,t){"use strict";t.r(r);t(4),t(11),t(109),t(92),t(10),t(35),t(36);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"])},92: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.4-TR2">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
2
+ //# sourceMappingURL=40.50f010a0a0ce99da5092.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.10f42e3f6d8d87bd3221.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.3\">{{\\'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.50f010a0a0ce99da5092.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.4-TR2\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n});\n"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- (window.webpackJsonp=window.webpackJsonp||[]).push([[41,134],{40:function(n,e){function t(n,e){return{showToastMessageWithDelay:function(t){return new Promise(r=>{n.success(e.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},92:function(n,e,t){"use strict";t.r(e);t(4),t(10),t(13),t(40);function r(n,e,t,r,o,i){n.getSqlConfigurations=function(){!e.getActiveRepository()||e.isActiveRepoOntopType()||e.isActiveRepoFedXType()?n.jdbcConfigurations=[]:t.getJdbcConfigurations().success((function(e){n.jdbcConfigurations=e})).error((function(n){const e=getError(n);r.error(e,i.instant("jdbc.not.get.SQL.msg"))}))},n.$watch((function(){return e.getActiveRepository()}),(function(){n.getSqlConfigurations()})),n.deleteConfiguration=function(e){o.openSimpleModal({title:i.instant("common.warning"),message:i.instant("jdbc.delete.sql.table.warning.msg",{name:e}),warning:!0}).result.then((function(){t.deleteJdbcConfiguration(e).success((function(){n.getSqlConfigurations()})).error((function(n){r.error(getError(n),i.instant("jdbc.not.delete.sql.msg"))}))}))}}function o(n,e,t,r,o,i,s,u,c,a,l){n.name=e.search().name||"",n.getNamespaces=function(){y(!0,l.instant("common.refreshing.namespaces"),l.instant("common.extra.message")),u.getRepositoryNamespaces().success((function(e){const t={};e.results.bindings.forEach((function(n){t[n.prefix.value]=n.namespace.value})),n.namespaces=t})).error((function(e){n.repositoryError=getError(e)})).finally((function(){y(!1),w()}))},n.setLoader=y,n.addKnownPrefixes=C,n.page=1,n.noPadding={paddingRight:0,paddingLeft:0},n.sqlTypes=["string","iri","boolean","byte","short","int","long","float","double","decimal","date","time","timestamp","Get suggestion..."],n.currentTabConfig={},n.orientationViewMode=!0,n.currentQuery={},n.$watch((function(){return r.getActiveRepository()}),(function(n,t){n!==t&&e.path("jdbc")}));let g=null;n.goBack=function(){g=i((function(){o.history.back()}),1e3)};const f=n.$on("$locationChangeStart",(function(e){!function(e){n.currentQuery.isPristine||(confirm(l.instant("jdbc.warning.unsaved.changes"))?(window.removeEventListener("beforeunload",d),f(),i.cancel(g)):e.preventDefault())}(e)}));function d(e){n.currentQuery.isPristine||(e.returnValue=!0)}window.addEventListener("beforeunload",d),n.$on("$destroy",(function(n){window.removeEventListener("beforeunload",d),f(),i.cancel(g)}));const m={id:"1",name:"",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\n# Selects two variables to use as columns\nSELECT ?id ?label {\n ?id rdfs:label ?label\n # The following placeholder must be present in the query\n #!filter\n}",inference:!0,sameAs:!0,isNewConfiguration:!0,isPristine:!0};var p;function y(e,t,r){const o=angular.element(document.getElementById("yasr-inner"));n.queryIsRunning=e,e?(n.queryStartTime=Date.now(),n.countTimeouted=!1,n.progressMessage=t,n.extraMessage=r,o.addClass("hide")):(n.progressMessage="",n.extraMessage="",o.removeClass("hide")),null===n.$$phase&&n.$apply()}function w(){n.tabsData=[n.currentQuery];const e=n.currentQuery;n.currentQuery.query?window.editor.setValue(n.currentQuery.query):window.editor.setValue(" "),i((function(){n.currentTabConfig={},n.currentTabConfig.queryType=e.queryType,n.currentTabConfig.resultsCount=e.resultsCount,n.currentTabConfig.offset=e.offset,n.currentTabConfig.allResultsCount=e.allResultsCount,n.currentTabConfig.page=e.page,n.currentTabConfig.pageSize=e.pageSize,n.currentTabConfig.timeFinished=e.timeFinished,n.currentTabConfig.timeTook=e.timeTook,n.currentTabConfig.sizeDelta=e.sizeDelta,n.$apply()}),0),n.canWriteActiveRepo()||(window.editor.options.readOnly=!0)}function b(){n.tabsData=n.tabs=[m],n.currentQuery=angular.copy(m),h(),window.editor&&(n.setQuery(n.currentQuery.query),w()),n.$watch((function(){return n.currentQuery.query}),(function(e,t){e!==t&&n.setDirty()}))}function C(){c.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(n){angular.isDefined(window.editor)&&angular.isDefined(n)&&n!==window.editor.getValue()&&window.editor.setValue(n)})).error((function(n){const e=getError(n);return t.error(e,l.instant("common.add.known.prefixes.error")),!0}))}function v(){j()&&s.getColumnNames(n.currentQuery.query).success((function(e){s.getColumnsTypeSuggestion(n.currentQuery.query,e).success((function(t){const r=[];_.forEach(e,(function(n){r.push({column_name:n,column_type:t[n].column_type,nullable:!0,sparql_type:t[n].sparql_type})})),n.currentQuery.columns=r,n.setDirty()})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.types"))}))})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.names"))}))}function h(){2===n.page?n.viewMode="editor":n.viewMode="none"}function Q(n,e,t,r,o){let i=t[r].value;i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return"<div class = 'literal-cell'>"+("<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+i+"</p>")+"</div>"}function T(){return window.editor&&"SELECT"===window.editor.getQueryType()}function q(){return j()&&function(){if(!n.currentQuery.columns||!n.currentQuery.columns.length)return t.error(l.instant("jdbc.warning.one.column.msg"),l.instant("jdbc.invalid.columns")),!1;if(n.containsUnknownColumns())return t.error(l.instant("jdbc.warning.all.column.msg"),l.instant("jdbc.invalid.columns")),!1;return!0}()}function j(){return!!T()||(t.error(l.instant("jdbc.warning.invalid.query"),l.instant("jdbc.invalid.query)")),!1)}n.resetCurrentTabConfig=function(){n.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0,queryType:""}},n.saveTab=function(){},n.setQuery=function(n){window.editor.setValue(n||" ")},n.name?(p=n.name,s.getJdbcConfiguration(p).success((function(n){m.query=n.query,m.name=n.name,m.columns=n.columns,m.isNewConfiguration=!n.name,b()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.get.sql.msg2"))}))):b(),n.goToPage=function(e){n.page=e;const t=n.currentQuery.columns;2!==e||t&&0!==t.length||!T()||n.getColumnsSuggestions(),h()},n.save=function(){q()&&(n.currentQuery.name?n.currentQuery.isNewConfiguration?s.createNewJdbcConfiguration(n.currentQuery).success((function(){n.currentQuery.isPristine=!0,n.currentQuery.isNewConfiguration=!1,t.success(l.instant("jdbc.saved.configuration")),n.goBack()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.saved.configuration"))})):s.updateJdbcConfiguration(n.currentQuery).success((function(){n.currentQuery.isPristine=!0,n.currentQuery.isNewConfiguration=!1,t.success(l.instant("jdbc.configuration.updated")),n.goBack()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.saved.configuration"))})):t.error(l.instant("jdbc.required.configuration.name")))},n.hasPrecision=function(n){return"iri"===n||"string"===n||"decimal"===n},n.containsColumnsWithPrecision=function(e){return e&&e.some(e=>n.hasPrecision(e.column_type))},n.hasScale=function(n){return"decimal"===n},n.containsColumnsWithScale=function(e){return e&&e.some(e=>n.hasScale(e.column_type))},n.isLiteral=function(n){return"iri"!==n&&"unknown"!==n},n.containsNonLiteralColumnsOnly=function(e){return e&&e.every(e=>!n.isLiteral(e.column_type))},n.containsUnknownColumns=function(){return n.currentQuery.columns&&n.currentQuery.columns.find(n=>"unknown"===n.column_type)},$("textarea").on("paste",(function(){i((function(){C()}),0)})),n.selectColumnType=function(e,r){const o=_.find(n.currentQuery.columns,(function(n){return n.column_name===e}));"Get suggestion..."===o.column_type&&s.getColumnsTypeSuggestion(n.currentQuery.query,[e]).success((function(n){o.column_type=n[e].column_type,o.column_type===r?t.info(l.instant("jdbc.same.suggested.sql.type",{type:o.column_type}),l.instant("jdbc.suggest.sql.type"),{allowHtml:!0}):t.success(l.instant("jdbc.suggested.sql.type",{type:o.column_type}),l.instant("jdbc.suggest.sql.type"),{allowHtml:!0}),o.sparql_type=n[e].sparql_type})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.type"))})),n.setDirty()},n.getColumnsSuggestions=function(){n.currentQuery.columns&&n.currentQuery.columns.length>0?a.openSimpleModal({title:l.instant("common.warning"),message:l.instant("jdbc.warning.column.type.msg"),warning:!0}).result.then((function(){v()})):v()},n.deleteColumn=function(e,t){a.openSimpleModal({title:l.instant("common.warning"),message:l.instant("jdbc.warning.delete.column.msg",{columnName:e}),warning:!0}).result.then((function(){n.currentQuery.columns.splice(t,1),n.setDirty()}))},n.getPreview=function(){if(q()&&(n.executedQueryTab=n.currentQuery,!n.queryIsRunning)){n.currentQuery.outputType="table",n.resetCurrentTabConfig(),y(!0,l.instant("jdbc.preview.first.rows",{name:n.name}),l.instant("common.extra.message"));const e=function(e,r,o){!function(e,r,o){e.results&&e.results.bindings&&e.results.bindings.length?(window.yasr.plugins.table.options.getCellContent=Q,n.currentTabConfig.queryType="SELECT",window.yasr.setResponse(r,o,null)):t.info(l.instant("jdbc.table.definition"),l.instant("jdbc.preview.sql"))}(e,o,r),y(!1)},r=function(n){y(!1),t.error(getError(n,0,100),l.instant("jdbc.not.show.preview"))};if(n.canWriteActiveRepo()){const t=JSON.stringify({name:n.currentQuery.name,query:n.currentQuery.query,columns:n.currentQuery.columns||[]});s.getNewSqlTablePreview(t).done(e).fail(r)}else s.getExistingSqlTablePreview(n.currentQuery.name).done(e).fail(r)}},n.setDirty=function(){n.currentQuery.isPristine=!1},n.getTypeLabel=function(n){switch(n){case"iri":return"VARCHAR: IRI";case"string":return"VARCHAR: String";default:return n.indexOf(" ")>0?n:n.toUpperCase()}}}angular.module("graphdb.framework.jdbc.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr"],["graphdb.framework.utils.notifications"]).controller("JdbcListCtrl",r).controller("JdbcCreateCtrl",o),r.$inject=["$scope","$repositories","JdbcRestService","toastr","ModalService","$translate"],o.$inject=["$scope","$location","toastr","$repositories","$window","$timeout","JdbcRestService","RDF4JRepositoriesRestService","SparqlRestService","ModalService","$translate"]}}]);
2
- //# sourceMappingURL=41.368780c518c3f6cab4b7.bundle.js.map
1
+ (window.webpackJsonp=window.webpackJsonp||[]).push([[41,134],{40:function(n,e){function t(n,e){return{showToastMessageWithDelay:function(t){return new Promise(r=>{n.success(e.instant(t)),setTimeout(r,200)})}}}angular.module("graphdb.framework.utils.notifications",[]).factory("Notifications",t),t.$inject=["toastr","$translate"]},93:function(n,e,t){"use strict";t.r(e);t(4),t(10),t(13),t(40);function r(n,e,t,r,o,i){n.getSqlConfigurations=function(){!e.getActiveRepository()||e.isActiveRepoOntopType()||e.isActiveRepoFedXType()?n.jdbcConfigurations=[]:t.getJdbcConfigurations().success((function(e){n.jdbcConfigurations=e})).error((function(n){const e=getError(n);r.error(e,i.instant("jdbc.not.get.SQL.msg"))}))},n.$watch((function(){return e.getActiveRepository()}),(function(){n.getSqlConfigurations()})),n.deleteConfiguration=function(e){o.openSimpleModal({title:i.instant("common.warning"),message:i.instant("jdbc.delete.sql.table.warning.msg",{name:e}),warning:!0}).result.then((function(){t.deleteJdbcConfiguration(e).success((function(){n.getSqlConfigurations()})).error((function(n){r.error(getError(n),i.instant("jdbc.not.delete.sql.msg"))}))}))}}function o(n,e,t,r,o,i,s,u,c,a,l){n.name=e.search().name||"",n.getNamespaces=function(){y(!0,l.instant("common.refreshing.namespaces"),l.instant("common.extra.message")),u.getRepositoryNamespaces().success((function(e){const t={};e.results.bindings.forEach((function(n){t[n.prefix.value]=n.namespace.value})),n.namespaces=t})).error((function(e){n.repositoryError=getError(e)})).finally((function(){y(!1),w()}))},n.setLoader=y,n.addKnownPrefixes=C,n.page=1,n.noPadding={paddingRight:0,paddingLeft:0},n.sqlTypes=["string","iri","boolean","byte","short","int","long","float","double","decimal","date","time","timestamp","Get suggestion..."],n.currentTabConfig={},n.orientationViewMode=!0,n.currentQuery={},n.$watch((function(){return r.getActiveRepository()}),(function(n,t){n!==t&&e.path("jdbc")}));let g=null;n.goBack=function(){g=i((function(){o.history.back()}),1e3)};const f=n.$on("$locationChangeStart",(function(e){!function(e){n.currentQuery.isPristine||(confirm(l.instant("jdbc.warning.unsaved.changes"))?(window.removeEventListener("beforeunload",d),f(),i.cancel(g)):e.preventDefault())}(e)}));function d(e){n.currentQuery.isPristine||(e.returnValue=!0)}window.addEventListener("beforeunload",d),n.$on("$destroy",(function(n){window.removeEventListener("beforeunload",d),f(),i.cancel(g)}));const m={id:"1",name:"",query:"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n\n# Selects two variables to use as columns\nSELECT ?id ?label {\n ?id rdfs:label ?label\n # The following placeholder must be present in the query\n #!filter\n}",inference:!0,sameAs:!0,isNewConfiguration:!0,isPristine:!0};var p;function y(e,t,r){const o=angular.element(document.getElementById("yasr-inner"));n.queryIsRunning=e,e?(n.queryStartTime=Date.now(),n.countTimeouted=!1,n.progressMessage=t,n.extraMessage=r,o.addClass("hide")):(n.progressMessage="",n.extraMessage="",o.removeClass("hide")),null===n.$$phase&&n.$apply()}function w(){n.tabsData=[n.currentQuery];const e=n.currentQuery;n.currentQuery.query?window.editor.setValue(n.currentQuery.query):window.editor.setValue(" "),i((function(){n.currentTabConfig={},n.currentTabConfig.queryType=e.queryType,n.currentTabConfig.resultsCount=e.resultsCount,n.currentTabConfig.offset=e.offset,n.currentTabConfig.allResultsCount=e.allResultsCount,n.currentTabConfig.page=e.page,n.currentTabConfig.pageSize=e.pageSize,n.currentTabConfig.timeFinished=e.timeFinished,n.currentTabConfig.timeTook=e.timeTook,n.currentTabConfig.sizeDelta=e.sizeDelta,n.$apply()}),0),n.canWriteActiveRepo()||(window.editor.options.readOnly=!0)}function b(){n.tabsData=n.tabs=[m],n.currentQuery=angular.copy(m),h(),window.editor&&(n.setQuery(n.currentQuery.query),w()),n.$watch((function(){return n.currentQuery.query}),(function(e,t){e!==t&&n.setDirty()}))}function C(){c.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(n){angular.isDefined(window.editor)&&angular.isDefined(n)&&n!==window.editor.getValue()&&window.editor.setValue(n)})).error((function(n){const e=getError(n);return t.error(e,l.instant("common.add.known.prefixes.error")),!0}))}function v(){j()&&s.getColumnNames(n.currentQuery.query).success((function(e){s.getColumnsTypeSuggestion(n.currentQuery.query,e).success((function(t){const r=[];_.forEach(e,(function(n){r.push({column_name:n,column_type:t[n].column_type,nullable:!0,sparql_type:t[n].sparql_type})})),n.currentQuery.columns=r,n.setDirty()})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.types"))}))})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.names"))}))}function h(){2===n.page?n.viewMode="editor":n.viewMode="none"}function Q(n,e,t,r,o){let i=t[r].value;i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return"<div class = 'literal-cell'>"+("<p class='nonUri' style='border: none; background-color: transparent; padding: 0; margin: 0'>"+i+"</p>")+"</div>"}function T(){return window.editor&&"SELECT"===window.editor.getQueryType()}function q(){return j()&&function(){if(!n.currentQuery.columns||!n.currentQuery.columns.length)return t.error(l.instant("jdbc.warning.one.column.msg"),l.instant("jdbc.invalid.columns")),!1;if(n.containsUnknownColumns())return t.error(l.instant("jdbc.warning.all.column.msg"),l.instant("jdbc.invalid.columns")),!1;return!0}()}function j(){return!!T()||(t.error(l.instant("jdbc.warning.invalid.query"),l.instant("jdbc.invalid.query)")),!1)}n.resetCurrentTabConfig=function(){n.currentTabConfig={pageSize:100,page:1,allResultsCount:0,resultsCount:0,queryType:""}},n.saveTab=function(){},n.setQuery=function(n){window.editor.setValue(n||" ")},n.name?(p=n.name,s.getJdbcConfiguration(p).success((function(n){m.query=n.query,m.name=n.name,m.columns=n.columns,m.isNewConfiguration=!n.name,b()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.get.sql.msg2"))}))):b(),n.goToPage=function(e){n.page=e;const t=n.currentQuery.columns;2!==e||t&&0!==t.length||!T()||n.getColumnsSuggestions(),h()},n.save=function(){q()&&(n.currentQuery.name?n.currentQuery.isNewConfiguration?s.createNewJdbcConfiguration(n.currentQuery).success((function(){n.currentQuery.isPristine=!0,n.currentQuery.isNewConfiguration=!1,t.success(l.instant("jdbc.saved.configuration")),n.goBack()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.saved.configuration"))})):s.updateJdbcConfiguration(n.currentQuery).success((function(){n.currentQuery.isPristine=!0,n.currentQuery.isNewConfiguration=!1,t.success(l.instant("jdbc.configuration.updated")),n.goBack()})).error((function(n){const e=getError(n);t.error(e,l.instant("jdbc.not.saved.configuration"))})):t.error(l.instant("jdbc.required.configuration.name")))},n.hasPrecision=function(n){return"iri"===n||"string"===n||"decimal"===n},n.containsColumnsWithPrecision=function(e){return e&&e.some(e=>n.hasPrecision(e.column_type))},n.hasScale=function(n){return"decimal"===n},n.containsColumnsWithScale=function(e){return e&&e.some(e=>n.hasScale(e.column_type))},n.isLiteral=function(n){return"iri"!==n&&"unknown"!==n},n.containsNonLiteralColumnsOnly=function(e){return e&&e.every(e=>!n.isLiteral(e.column_type))},n.containsUnknownColumns=function(){return n.currentQuery.columns&&n.currentQuery.columns.find(n=>"unknown"===n.column_type)},$("textarea").on("paste",(function(){i((function(){C()}),0)})),n.selectColumnType=function(e,r){const o=_.find(n.currentQuery.columns,(function(n){return n.column_name===e}));"Get suggestion..."===o.column_type&&s.getColumnsTypeSuggestion(n.currentQuery.query,[e]).success((function(n){o.column_type=n[e].column_type,o.column_type===r?t.info(l.instant("jdbc.same.suggested.sql.type",{type:o.column_type}),l.instant("jdbc.suggest.sql.type"),{allowHtml:!0}):t.success(l.instant("jdbc.suggested.sql.type",{type:o.column_type}),l.instant("jdbc.suggest.sql.type"),{allowHtml:!0}),o.sparql_type=n[e].sparql_type})).error((function(n){t.error(getError(n),l.instant("jdbc.not.suggest.column.type"))})),n.setDirty()},n.getColumnsSuggestions=function(){n.currentQuery.columns&&n.currentQuery.columns.length>0?a.openSimpleModal({title:l.instant("common.warning"),message:l.instant("jdbc.warning.column.type.msg"),warning:!0}).result.then((function(){v()})):v()},n.deleteColumn=function(e,t){a.openSimpleModal({title:l.instant("common.warning"),message:l.instant("jdbc.warning.delete.column.msg",{columnName:e}),warning:!0}).result.then((function(){n.currentQuery.columns.splice(t,1),n.setDirty()}))},n.getPreview=function(){if(q()&&(n.executedQueryTab=n.currentQuery,!n.queryIsRunning)){n.currentQuery.outputType="table",n.resetCurrentTabConfig(),y(!0,l.instant("jdbc.preview.first.rows",{name:n.name}),l.instant("common.extra.message"));const e=function(e,r,o){!function(e,r,o){e.results&&e.results.bindings&&e.results.bindings.length?(window.yasr.plugins.table.options.getCellContent=Q,n.currentTabConfig.queryType="SELECT",window.yasr.setResponse(r,o,null)):t.info(l.instant("jdbc.table.definition"),l.instant("jdbc.preview.sql"))}(e,o,r),y(!1)},r=function(n){y(!1),t.error(getError(n,0,100),l.instant("jdbc.not.show.preview"))};if(n.canWriteActiveRepo()){const t=JSON.stringify({name:n.currentQuery.name,query:n.currentQuery.query,columns:n.currentQuery.columns||[]});s.getNewSqlTablePreview(t).done(e).fail(r)}else s.getExistingSqlTablePreview(n.currentQuery.name).done(e).fail(r)}},n.setDirty=function(){n.currentQuery.isPristine=!1},n.getTypeLabel=function(n){switch(n){case"iri":return"VARCHAR: IRI";case"string":return"VARCHAR: String";default:return n.indexOf(" ")>0?n:n.toUpperCase()}}}angular.module("graphdb.framework.jdbc.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.rest.monitoring.service","toastr"],["graphdb.framework.utils.notifications"]).controller("JdbcListCtrl",r).controller("JdbcCreateCtrl",o),r.$inject=["$scope","$repositories","JdbcRestService","toastr","ModalService","$translate"],o.$inject=["$scope","$location","toastr","$repositories","$window","$timeout","JdbcRestService","RDF4JRepositoriesRestService","SparqlRestService","ModalService","$translate"]}}]);
2
+ //# sourceMappingURL=41.d09e0f01eac3492e3376.bundle.js.map