graphdb-workbench 2.1.2 → 2.1.3-TR1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{0.1bd9b49fd9f95db7afda.bundle.js → 0.6f85dbec9122f837f5e7.bundle.js} +3 -3
- package/dist/0.6f85dbec9122f837f5e7.bundle.js.map +1 -0
- package/dist/{10.cabc799d9aabc46e7be7.bundle.js → 10.0d7e127640f8c0678145.bundle.js} +2 -2
- package/dist/{10.cabc799d9aabc46e7be7.bundle.js.map → 10.0d7e127640f8c0678145.bundle.js.map} +1 -1
- package/dist/{100.24bbc960b22ec8f26f68.bundle.js → 100.8a2c21d9df10d17f9291.bundle.js} +2 -2
- package/dist/{100.24bbc960b22ec8f26f68.bundle.js.map → 100.8a2c21d9df10d17f9291.bundle.js.map} +1 -1
- package/dist/{11.b2fd98471071348c3964.bundle.js → 11.c8ad938cfc97d57b4d9e.bundle.js} +2 -2
- package/dist/{11.b2fd98471071348c3964.bundle.js.map → 11.c8ad938cfc97d57b4d9e.bundle.js.map} +1 -1
- package/dist/{110.7419abdcd9b1e7b062ad.bundle.js → 110.4c6719423e79f089e594.bundle.js} +2 -2
- package/dist/{110.7419abdcd9b1e7b062ad.bundle.js.map → 110.4c6719423e79f089e594.bundle.js.map} +1 -1
- package/dist/{111.87635664a5306fc0c6bb.bundle.js → 111.93eb21f8bd85a9ef5d1b.bundle.js} +2 -2
- package/dist/{111.87635664a5306fc0c6bb.bundle.js.map → 111.93eb21f8bd85a9ef5d1b.bundle.js.map} +1 -1
- package/dist/{113.2a67bc73a80f0bbf6397.bundle.js → 113.b77f2a783cadc7a2d428.bundle.js} +2 -2
- package/dist/{113.2a67bc73a80f0bbf6397.bundle.js.map → 113.b77f2a783cadc7a2d428.bundle.js.map} +1 -1
- package/dist/114.db473421180e7bce6495.bundle.js +2 -0
- package/dist/114.db473421180e7bce6495.bundle.js.map +1 -0
- package/dist/{115.6751a154fb77d1efeec8.bundle.js → 115.00597ad4f535ccc61e03.bundle.js} +2 -2
- package/dist/{115.6751a154fb77d1efeec8.bundle.js.map → 115.00597ad4f535ccc61e03.bundle.js.map} +1 -1
- package/dist/{116.75f79d13526f131b61f0.bundle.js → 116.7a3c48b8b4348e54c7fd.bundle.js} +2 -2
- package/dist/{116.75f79d13526f131b61f0.bundle.js.map → 116.7a3c48b8b4348e54c7fd.bundle.js.map} +1 -1
- package/dist/{117.17c60bd040eada2f965d.bundle.js → 117.49b3141cc6594af99fbf.bundle.js} +2 -2
- package/dist/{117.17c60bd040eada2f965d.bundle.js.map → 117.49b3141cc6594af99fbf.bundle.js.map} +1 -1
- package/dist/{118.fc48834f75995ef9202f.bundle.js → 118.e1ebd5f3d7cf4f8e013a.bundle.js} +2 -2
- package/dist/{118.fc48834f75995ef9202f.bundle.js.map → 118.e1ebd5f3d7cf4f8e013a.bundle.js.map} +1 -1
- package/dist/{119.44cc6552449537efa8f5.bundle.js → 119.0427b867fee545388a66.bundle.js} +2 -2
- package/dist/{119.44cc6552449537efa8f5.bundle.js.map → 119.0427b867fee545388a66.bundle.js.map} +1 -1
- package/dist/{12.c008cc99a0d358fd58b7.bundle.js → 12.6bd2906fb955b8456713.bundle.js} +3 -3
- package/dist/{12.c008cc99a0d358fd58b7.bundle.js.map → 12.6bd2906fb955b8456713.bundle.js.map} +1 -1
- package/dist/{120.8f48d9b3f8071e4c42fd.bundle.js → 120.923b20db8c2c297742d8.bundle.js} +2 -2
- package/dist/{120.8f48d9b3f8071e4c42fd.bundle.js.map → 120.923b20db8c2c297742d8.bundle.js.map} +1 -1
- package/dist/13.d7290e4e69a54c71e974.bundle.js +3 -0
- package/dist/13.d7290e4e69a54c71e974.bundle.js.map +1 -0
- package/dist/136.3199d393576be61f53fd.bundle.js +1 -1
- package/dist/136.3199d393576be61f53fd.bundle.js.map +1 -1
- package/dist/14.638a884323fe9235b58f.bundle.js +2 -0
- package/dist/14.638a884323fe9235b58f.bundle.js.map +1 -0
- package/dist/{15.e870cbcf6346cc68bd66.bundle.js → 15.244542a39d9296cc4fd8.bundle.js} +2 -2
- package/dist/{15.e870cbcf6346cc68bd66.bundle.js.map → 15.244542a39d9296cc4fd8.bundle.js.map} +1 -1
- package/dist/{16.23e12f234078c8777ed0.bundle.js → 16.3b52e17f123523d84054.bundle.js} +2 -2
- package/dist/{16.23e12f234078c8777ed0.bundle.js.map → 16.3b52e17f123523d84054.bundle.js.map} +1 -1
- package/dist/{17.d1ac5f88f9ef9ee1c789.bundle.js → 17.a417430fca1e34e80912.bundle.js} +2 -2
- package/dist/{17.d1ac5f88f9ef9ee1c789.bundle.js.map → 17.a417430fca1e34e80912.bundle.js.map} +1 -1
- package/dist/{18.63478730d60e02069d90.bundle.js → 18.d6e541cf8e651a6d223e.bundle.js} +2 -2
- package/dist/{18.63478730d60e02069d90.bundle.js.map → 18.d6e541cf8e651a6d223e.bundle.js.map} +1 -1
- package/dist/19.b5b3699a309774176fc3.bundle.js +1 -1
- package/dist/19.b5b3699a309774176fc3.bundle.js.map +1 -1
- package/dist/{20.d707dfb57f695469ffaa.bundle.js → 20.a40b79082e0f2a9b3511.bundle.js} +2 -2
- package/dist/{20.d707dfb57f695469ffaa.bundle.js.map → 20.a40b79082e0f2a9b3511.bundle.js.map} +1 -1
- package/dist/{22.e1562d53daf95dd1fdca.bundle.js → 22.5f70a951e87768500861.bundle.js} +2 -2
- package/dist/{22.e1562d53daf95dd1fdca.bundle.js.map → 22.5f70a951e87768500861.bundle.js.map} +1 -1
- package/dist/{23.c1b822e6ccc61632355b.bundle.js → 23.3b94ee5770665e9f7ad6.bundle.js} +2 -2
- package/dist/{23.c1b822e6ccc61632355b.bundle.js.map → 23.3b94ee5770665e9f7ad6.bundle.js.map} +1 -1
- package/dist/{25.8c30b7bafb4875a3cc51.bundle.js → 25.7d9b6d389e1b3c30a2af.bundle.js} +2 -2
- package/dist/{25.8c30b7bafb4875a3cc51.bundle.js.map → 25.7d9b6d389e1b3c30a2af.bundle.js.map} +1 -1
- package/dist/26.176ffe2071a8d5d382b6.bundle.js +1 -1
- package/dist/26.176ffe2071a8d5d382b6.bundle.js.map +1 -1
- package/dist/{27.be71055c959c1ac75177.bundle.js → 27.5f249c88f0d56e478227.bundle.js} +2 -2
- package/dist/{27.be71055c959c1ac75177.bundle.js.map → 27.5f249c88f0d56e478227.bundle.js.map} +1 -1
- package/dist/{29.54cbff989a44a0f71dfd.bundle.js → 29.263746fd089adc12c9eb.bundle.js} +2 -2
- package/dist/{29.54cbff989a44a0f71dfd.bundle.js.map → 29.263746fd089adc12c9eb.bundle.js.map} +1 -1
- package/dist/31.4ecdb66b2c224a63525e.bundle.js +1 -1
- package/dist/31.4ecdb66b2c224a63525e.bundle.js.map +1 -1
- package/dist/{32.2582e2eccf29e8d5ec80.bundle.js → 32.31e5cd1ae5b1b26d0bc9.bundle.js} +2 -2
- package/dist/{32.2582e2eccf29e8d5ec80.bundle.js.map → 32.31e5cd1ae5b1b26d0bc9.bundle.js.map} +1 -1
- package/dist/34.024934549565ec56f905.bundle.js +2 -0
- package/dist/34.024934549565ec56f905.bundle.js.map +1 -0
- package/dist/{37.ef412d4cbc60967faa5e.bundle.js → 37.48944284f495dd519b6b.bundle.js} +2 -2
- package/dist/{37.ef412d4cbc60967faa5e.bundle.js.map → 37.48944284f495dd519b6b.bundle.js.map} +1 -1
- package/dist/{39.be2d8c75e4ab391ba984.bundle.js → 39.cd39b4ee76d8238325b0.bundle.js} +2 -2
- package/dist/{39.be2d8c75e4ab391ba984.bundle.js.map → 39.cd39b4ee76d8238325b0.bundle.js.map} +1 -1
- package/dist/{40.9272ebe1d2246ae3054f.bundle.js → 40.ba69b25514acd93c43c1.bundle.js} +2 -2
- package/dist/{40.9272ebe1d2246ae3054f.bundle.js.map → 40.ba69b25514acd93c43c1.bundle.js.map} +1 -1
- package/dist/{41.f69dd805b7e51756518f.bundle.js → 41.97280c0900f9b44ab8aa.bundle.js} +2 -2
- package/dist/{41.f69dd805b7e51756518f.bundle.js.map → 41.97280c0900f9b44ab8aa.bundle.js.map} +1 -1
- package/dist/43.166d4f55ba11d29b26ce.bundle.js +2 -0
- package/dist/43.166d4f55ba11d29b26ce.bundle.js.map +1 -0
- package/dist/46.c417c82de953a16f7489.bundle.js +2 -0
- package/dist/{46.a9d1c07290ab98930744.bundle.js.map → 46.c417c82de953a16f7489.bundle.js.map} +1 -1
- package/dist/{48.3c8d17c03f3fc081be89.bundle.js → 48.1c439f5ade00b986bb85.bundle.js} +2 -2
- package/dist/{48.3c8d17c03f3fc081be89.bundle.js.map → 48.1c439f5ade00b986bb85.bundle.js.map} +1 -1
- package/dist/{55.10bb020070b8c5910e4c.bundle.js → 55.80d6a899d8af7d382755.bundle.js} +2 -2
- package/dist/{55.10bb020070b8c5910e4c.bundle.js.map → 55.80d6a899d8af7d382755.bundle.js.map} +1 -1
- package/dist/{57.f432e4a7f6dbf5fa9e6e.bundle.js → 57.ff1a43af23df1c3e9eb6.bundle.js} +2 -2
- package/dist/{57.f432e4a7f6dbf5fa9e6e.bundle.js.map → 57.ff1a43af23df1c3e9eb6.bundle.js.map} +1 -1
- package/dist/{59.feebf4602360cb8257bb.bundle.js → 59.21763503ec43ce516ba9.bundle.js} +2 -2
- package/dist/{59.feebf4602360cb8257bb.bundle.js.map → 59.21763503ec43ce516ba9.bundle.js.map} +1 -1
- package/dist/{67.58d8539fcac19288b820.bundle.js → 67.d3301189c6f359502b7a.bundle.js} +2 -2
- package/dist/{67.58d8539fcac19288b820.bundle.js.map → 67.d3301189c6f359502b7a.bundle.js.map} +1 -1
- package/dist/{70.ede527b8438e19a67ebc.bundle.js → 70.bab18e599872f9ceb5bb.bundle.js} +2 -2
- package/dist/{70.ede527b8438e19a67ebc.bundle.js.map → 70.bab18e599872f9ceb5bb.bundle.js.map} +1 -1
- package/dist/{71.2ddcb945966fd051a3a1.bundle.js → 71.496a9c92cd02ea797086.bundle.js} +2 -2
- package/dist/{71.2ddcb945966fd051a3a1.bundle.js.map → 71.496a9c92cd02ea797086.bundle.js.map} +1 -1
- package/dist/{72.d2f8a53e83efcb8ab953.bundle.js → 72.e74783723284db9f1039.bundle.js} +2 -2
- package/dist/{72.d2f8a53e83efcb8ab953.bundle.js.map → 72.e74783723284db9f1039.bundle.js.map} +1 -1
- package/dist/{73.c29f06e5825684d56a9c.bundle.js → 73.c5ea427972a9d61d8bcf.bundle.js} +2 -2
- package/dist/{73.c29f06e5825684d56a9c.bundle.js.map → 73.c5ea427972a9d61d8bcf.bundle.js.map} +1 -1
- package/dist/{74.b50a23c1751e0fc30aec.bundle.js → 74.87400dce971708ada9bc.bundle.js} +2 -2
- package/dist/{74.b50a23c1751e0fc30aec.bundle.js.map → 74.87400dce971708ada9bc.bundle.js.map} +1 -1
- package/dist/{75.4f9197361b6427d97b6c.bundle.js → 75.f7026115ff4d35c53061.bundle.js} +2 -2
- package/dist/{75.4f9197361b6427d97b6c.bundle.js.map → 75.f7026115ff4d35c53061.bundle.js.map} +1 -1
- package/dist/{76.467d072ae323ab41fd3d.bundle.js → 76.7ed7e2f7802914105a2b.bundle.js} +2 -2
- package/dist/{76.467d072ae323ab41fd3d.bundle.js.map → 76.7ed7e2f7802914105a2b.bundle.js.map} +1 -1
- package/dist/{77.41a60a354d0fb3103b00.bundle.js → 77.8df8d6516be14b18a7c2.bundle.js} +2 -2
- package/dist/{77.41a60a354d0fb3103b00.bundle.js.map → 77.8df8d6516be14b18a7c2.bundle.js.map} +1 -1
- package/dist/{78.7de8a0f70f6dc1debd05.bundle.js → 78.3d0eba733bb5b528ee23.bundle.js} +2 -2
- package/dist/{78.7de8a0f70f6dc1debd05.bundle.js.map → 78.3d0eba733bb5b528ee23.bundle.js.map} +1 -1
- package/dist/{79.2f8b2ebcbd07d466c913.bundle.js → 79.f2adb62d49e1ff69c73d.bundle.js} +2 -2
- package/dist/{79.2f8b2ebcbd07d466c913.bundle.js.map → 79.f2adb62d49e1ff69c73d.bundle.js.map} +1 -1
- package/dist/{8.b21d6a5c1a9412deb34f.bundle.js → 8.fd2fec54b66b2afe1253.bundle.js} +2 -2
- package/dist/8.fd2fec54b66b2afe1253.bundle.js.map +1 -0
- package/dist/{80.8e71a1aaf3beb2320bf0.bundle.js → 80.40f6ab44b0f5a37f1f1b.bundle.js} +2 -2
- package/dist/{80.8e71a1aaf3beb2320bf0.bundle.js.map → 80.40f6ab44b0f5a37f1f1b.bundle.js.map} +1 -1
- package/dist/{81.2939c5d2b47cf48be6d5.bundle.js → 81.63bb784ce719c97dccc2.bundle.js} +2 -2
- package/dist/{81.2939c5d2b47cf48be6d5.bundle.js.map → 81.63bb784ce719c97dccc2.bundle.js.map} +1 -1
- package/dist/{82.69913e9f45a1dd96c6be.bundle.js → 82.f722c4f985e7c7375b7d.bundle.js} +2 -2
- package/dist/{82.69913e9f45a1dd96c6be.bundle.js.map → 82.f722c4f985e7c7375b7d.bundle.js.map} +1 -1
- package/dist/83.73515cde0a2215275d32.bundle.js +1 -1
- package/dist/83.73515cde0a2215275d32.bundle.js.map +1 -1
- package/dist/{84.5e89f3253c2c5885f662.bundle.js → 84.ed814bb2e6caa09eaf59.bundle.js} +2 -2
- package/dist/{84.5e89f3253c2c5885f662.bundle.js.map → 84.ed814bb2e6caa09eaf59.bundle.js.map} +1 -1
- package/dist/{85.f6ae072160876c4c5beb.bundle.js → 85.c1a85a647349f948774e.bundle.js} +2 -2
- package/dist/{85.f6ae072160876c4c5beb.bundle.js.map → 85.c1a85a647349f948774e.bundle.js.map} +1 -1
- package/dist/{88.4bfa7b74511d52c5c42f.bundle.js → 88.d3afc4e8e2613c803b60.bundle.js} +2 -2
- package/dist/{88.4bfa7b74511d52c5c42f.bundle.js.map → 88.d3afc4e8e2613c803b60.bundle.js.map} +1 -1
- package/dist/{89.6e767bc84921c435570c.bundle.js → 89.e206f700717532b86d4a.bundle.js} +2 -2
- package/dist/{89.6e767bc84921c435570c.bundle.js.map → 89.e206f700717532b86d4a.bundle.js.map} +1 -1
- package/dist/{90.5c5efc19e9053c029343.bundle.js → 90.192cdf37db2b7fe57457.bundle.js} +2 -2
- package/dist/{90.5c5efc19e9053c029343.bundle.js.map → 90.192cdf37db2b7fe57457.bundle.js.map} +1 -1
- package/dist/{92.b601c9bc8133fcf28163.bundle.js → 92.3adcb08e3ce3aa2196d9.bundle.js} +2 -2
- package/dist/{92.b601c9bc8133fcf28163.bundle.js.map → 92.3adcb08e3ce3aa2196d9.bundle.js.map} +1 -1
- package/dist/{94.4b1ada797602e279b977.bundle.js → 94.b7d4fbf7b903b58bbb9f.bundle.js} +2 -2
- package/dist/{94.4b1ada797602e279b977.bundle.js.map → 94.b7d4fbf7b903b58bbb9f.bundle.js.map} +1 -1
- package/dist/{95.95758068abd9eac4ed40.bundle.js → 95.4f4ec7e3bf1e54b69e22.bundle.js} +2 -2
- package/dist/{95.95758068abd9eac4ed40.bundle.js.map → 95.4f4ec7e3bf1e54b69e22.bundle.js.map} +1 -1
- package/dist/{98.8f1b6e94748a6049ed93.bundle.js → 98.46fcd4b9d0cee530a965.bundle.js} +2 -2
- package/dist/{98.8f1b6e94748a6049ed93.bundle.js.map → 98.46fcd4b9d0cee530a965.bundle.js.map} +1 -1
- package/dist/{bundle.595d7082ecc6c2683c9a.bundle.js → bundle.e02c0ceb3243288288de.bundle.js} +15 -15
- package/dist/bundle.e02c0ceb3243288288de.bundle.js.map +1 -0
- package/dist/css/yasr.custom.css +5 -1
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/{main.96399f8393ca515638d2.bundle.js → main.e83e6336936d01c58d59.bundle.js} +2 -2
- package/dist/{main.96399f8393ca515638d2.bundle.js.map → main.e83e6336936d01c58d59.bundle.js.map} +1 -1
- package/dist/{main.c3519a595e24d0a69ccd.css → main.fa014240754b8b1655a9.css} +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +15 -15
- package/dist/pages/graphs-visualizations.html +14 -14
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +4 -4
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +2 -2
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +27 -27
- package/dist/{vendor.31cf390ca240d8cd1ef3.bundle.js → vendor.7492dbcfefe195da8d15.bundle.js} +6 -6
- package/dist/{vendor.31cf390ca240d8cd1ef3.bundle.js.map → vendor.7492dbcfefe195da8d15.bundle.js.map} +1 -1
- package/package.json +1 -1
- package/dist/0.1bd9b49fd9f95db7afda.bundle.js.map +0 -1
- package/dist/114.ed2c2d1606cd75dbd7c6.bundle.js +0 -2
- package/dist/114.ed2c2d1606cd75dbd7c6.bundle.js.map +0 -1
- package/dist/13.9b9388352980715b16bb.bundle.js +0 -3
- package/dist/13.9b9388352980715b16bb.bundle.js.map +0 -1
- package/dist/14.c512cd1282fe7dec36bf.bundle.js +0 -2
- package/dist/14.c512cd1282fe7dec36bf.bundle.js.map +0 -1
- package/dist/34.100b126b4d89e99d4ac4.bundle.js +0 -2
- package/dist/34.100b126b4d89e99d4ac4.bundle.js.map +0 -1
- package/dist/43.f76be157f75bc7b3ea68.bundle.js +0 -2
- package/dist/43.f76be157f75bc7b3ea68.bundle.js.map +0 -1
- package/dist/46.a9d1c07290ab98930744.bundle.js +0 -2
- package/dist/8.b21d6a5c1a9412deb34f.bundle.js.map +0 -1
- package/dist/bundle.595d7082ecc6c2683c9a.bundle.js.map +0 -1
package/dist/{22.e1562d53daf95dd1fdca.bundle.js.map → 22.5f70a951e87768500861.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/clustermanagement/app.js","webpack:///./src/js/lib/d3-tip/d3-tip-patch.js","webpack:///./src/js/angular/clustermanagement/cluster-drawing.service.js","webpack:///./src/js/angular/clustermanagement/directives.js"],"names":["angular","module","direction","offset","html","node","initNode","svg","point","target","customPosition","tip","vis","el","tagName","toLowerCase","ownerSVGElement","createSVGPoint","document","body","appendChild","show","args","Array","prototype","slice","call","arguments","length","SVGElement","pop","coords","content","apply","this","poffset","dir","nodel","getNodeEl","i","directions","scrollTop","documentElement","scrollLeft","customPos","style","opacity","classed","direction_callbacks","get","top","left","hide","attr","n","v","d3","selection","functor","destroy","remove","map","bbox","getScreenBBox","y","offsetHeight","x","offsetWidth","s","e","w","nw","ne","sw","se","keys","select","createElement","position","targetel","event","getScreenCTM","parentNode","matrix","tbbox","getBBox","width","height","matrixTransform","clusterColors","ontoOrange","ontoBlue","ontoGreen","ontoGrey","createClusterSvgElement","element","append","createClusterZone","parent","clusterZone","setCreateClusterZone","hasCluster","translationsMap","selectAll","textGroup","text","no_cluster_configured","create_cluster_btn","updateClusterZoneLabels","moveElement","createNodes","nodesDataBinding","nodeRadius","isLegend","nodeGroup","enter","radius","_s32","Math","sqrt","points","data","line","createHexagon","exit","nodeElements","nodeTextHost","addHostnameToNodes","updateNodes","nodes","getNodeIconType","updateNodesIcon","nodeState","LEADER","FOLLOWER","CANDIDATE","updateNodesClasses","each","d","labelNode","hostname","updateNodesHostnameText","NO_CONNECTION","OUT_OF_SYNC","READ_ONLY","RESTRICTED","createLinks","linksDataBinding","updateLinks","setLinkColor","setLinkStyle","link","source","find","address","deltaX","deltaY","dist","normX","normY","sourceX","sourceY","targetX","targetY","getLinkCoordinates","status","IN_SYNC","SYNCING","positionNodesOnClusterZone","clusterZoneX","clusterZoneY","clusterZoneRadius","index","theta","PI","cos","sin","navigationBarWidth","clusterManagementDirectives","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","idTranslationKeyMap","node_state","link_state","directive","$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope","restrict","scope","updateTranslations","Object","forEach","key","instant","getWindowWidth","collapsed","MENU_STATE","max","floor","innerWidth","getWindowHeight","innerHeight","legendNodesGroup","legendWidth","legendHeight","showLegend","$on","elementId","getLabelFor","createLegendGroup","createClusterLegend","updateLabels","legendTooltip","nodesGroup","linksGroup","tooltipElement","min","getBoundingClientRect","toolTip","showLegendTooltip","hideLegendTooltip","legendNodes","getLegendNodes","legendLinks","getLegendLinks","customText","linkTypeText","linkTypeKey","translateLegendLinksAndNodes","nodeStateLabel","legendPadding","linkStateLabel","nodeStateLabelY","legendNodeData","on","stopPropagation","row","id","linkWidth","endX","linkG","positionLegend","resizeClusterComponent","plot","clusterModel","mouseupCallback","$apply","showCreateClusterDialog","setClusterZoneType","_","cloneDeep","links","shortenIri","endpoint","nodeData","childContext","selectNode","tooltip","windowWidth","$","window","pageX","pageY","linksData","drawLinks","redraw","resize","toggleLegend","config","$tooltipProvider","options","appendToBody","push","NO_CLUSTER"],"mappings":"iGAAA,yDAgB6BA,QAAQC,OAAO,sCAP5B,CACZ,YACA,SACA,kDACA,oD,oBCbJ,UAQQ,EAAO,QAAW,0BAAP,EAWX,WAIJ,OAAO,WACH,IAAIC,EAoJJ,WAA8B,MAAO,KAnJjCC,EAoJJ,WAA2B,MAAO,CAAC,EAAG,IAnJlCC,EAoJJ,WAAyB,MAAO,KAnJ5BC,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,WAAY,yBAC9DJ,EAAYmD,KAAK,CAAC3J,UAAW,YAAU4J,WAAYhD,WAAY,0BAC/DJ,EAAYmD,KAAK,CAAC3J,UAAW,YAAUW,YAAaiG,WAAY,2BAChEJ,EAAYmD,KAAK,CAAC3J,UAAW,YAAUU,cAAekG,WAAY,6BAClEJ,EAAYmD,KAAK,CAAC3J,UAAW,YAAUY,UAAWgG,WAAY,yBAC9DJ,EAAYmD,KAAK,CAAC3J,UAAW,YAAUa,WAAY+F,WAAY,0BAC/DJ,EAAY9B,QAAQ,CAACzM,EAAMuK,IAAUvK,EAAKuP,GAAKhF,GACxCgE,GAGLG,EAAiB,WACnB,MAAM2B,EAAQ,GAKd,OAJAA,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUC,QAAS4E,YAAa,uBACpDwB,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUE,QAAS2E,YAAa,uBACpDwB,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUtB,YAAamG,YAAa,2BACxDwB,EAAM5D,QAAQ,CAACvD,EAAMqB,IAAUrB,EAAKqG,GAAKhF,GAClC8F","file":"22.e1562d53daf95dd1fdca.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers';\nimport 'angular/clustermanagement/directives';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/d3-ONTO-chord-patch';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers',\n 'graphdb.framework.clustermanagement.directives'\n];\n\nconst clusterManagementApp = angular.module('graphdb.framework.clustermanagement', modules);\n","// d3.tip\n// Copyright (c) 2013 Justin Palmer\n//\n// Tooltips for d3.js SVG visualizations\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module with d3 as a dependency.\n define([], factory)\n } else if (typeof module === 'object' && module.exports) {\n // CommonJS\n module.exports = function(d3) {\n d3.tip = factory(d3)\n return d3.tip\n }\n } else {\n // Browser global.\n root.d3.tip = factory(root.d3)\n }\n}(this, function () {\n // Public - contructs a new tooltip\n //\n // Returns a tip\n return function() {\n var direction = d3_tip_direction,\n offset = d3_tip_offset,\n html = d3_tip_html,\n node = initNode(),\n svg = null,\n point = null,\n target = null,\n customPosition = null\n\n function tip(vis) {\n svg = getSVGNode(vis)\n point = svg.createSVGPoint()\n document.body.appendChild(node)\n }\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function() {\n var args = Array.prototype.slice.call(arguments)\n if(args[args.length - 1] instanceof SVGElement) target = args.pop()\n\n var content = html.apply(this, args),\n poffset = offset.apply(this, args),\n dir = direction.apply(this, args),\n nodel = getNodeEl(),\n i = directions.length,\n coords,\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft,\n customPos = customPosition.apply(this, args)\n\n nodel.html(content)\n .style({ opacity: 1, 'pointer-events': 'all' })\n\n while(i--) nodel.classed(directions[i], false)\n coords = direction_callbacks.get(dir).apply(this)\n\n if (customPos) {\n nodel.style(customPos)\n } else {\n nodel.classed(dir, true).style({\n top: (coords.top + poffset[0]) + scrollTop + 'px',\n left: (coords.left + poffset[1]) + scrollLeft + 'px'\n })\n }\n\n return tip\n }\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function() {\n var nodel = getNodeEl()\n nodel.style({ opacity: 0, 'pointer-events': 'none' })\n return tip\n }\n\n // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().attr(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.attr.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Proxy style calls to the d3 tip container. Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value\n tip.style = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().style(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.style.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function(v) {\n if (!arguments.length) return direction\n direction = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function(v) {\n if (!arguments.length) return offset\n offset = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function(v) {\n if (!arguments.length) return html\n html = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n tip.customPosition = function(v) {\n if (!arguments.length) return customPosition\n customPosition = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function() {\n if(node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n }\n\n function d3_tip_direction() { return 'n' }\n function d3_tip_offset() { return [0, 0] }\n function d3_tip_html() { return ' ' }\n\n var direction_callbacks = d3.map({\n n: direction_n,\n s: direction_s,\n e: direction_e,\n w: direction_w,\n nw: direction_nw,\n ne: direction_ne,\n sw: direction_sw,\n se: direction_se\n }),\n\n directions = direction_callbacks.keys()\n\n function direction_n() {\n var bbox = getScreenBBox()\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n }\n }\n\n function direction_s() {\n var bbox = getScreenBBox()\n return {\n top: bbox.s.y,\n left: bbox.s.x - node.offsetWidth / 2\n }\n }\n\n function direction_e() {\n var bbox = getScreenBBox()\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x\n }\n }\n\n function direction_w() {\n var bbox = getScreenBBox()\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth\n }\n }\n\n function direction_nw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n }\n }\n\n function direction_ne() {\n var bbox = getScreenBBox()\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n }\n }\n\n function direction_sw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n }\n }\n\n function direction_se() {\n var bbox = getScreenBBox()\n return {\n top: bbox.se.y,\n left: bbox.e.x\n }\n }\n\n function initNode() {\n var node = d3.select(document.createElement('div'))\n node.style({\n position: 'absolute',\n top: 0,\n opacity: 0,\n 'pointer-events': 'none',\n 'box-sizing': 'border-box'\n })\n\n return node.node()\n }\n\n function getSVGNode(el) {\n el = el.node()\n if(el.tagName.toLowerCase() === 'svg')\n return el\n\n return el.ownerSVGElement\n }\n\n function getNodeEl() {\n if(node === null) {\n node = initNode();\n // re-add node to DOM\n document.body.appendChild(node);\n };\n return d3.select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),\n // sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox() {\n var targetel = target || d3.event.target;\n\n while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {\n targetel = targetel.parentNode;\n }\n\n var bbox = {},\n matrix = targetel.getScreenCTM(),\n tbbox = targetel.getBBox(),\n width = tbbox.width,\n height = tbbox.height,\n x = tbbox.x,\n y = tbbox.y\n\n point.x = x\n point.y = y\n bbox.nw = point.matrixTransform(matrix)\n point.x += width\n bbox.ne = point.matrixTransform(matrix)\n point.y += height\n bbox.se = point.matrixTransform(matrix)\n point.x -= width\n bbox.sw = point.matrixTransform(matrix)\n point.y -= height / 2\n bbox.w = point.matrixTransform(matrix)\n point.x += width\n bbox.e = point.matrixTransform(matrix)\n point.x -= width / 2\n point.y -= height / 2\n bbox.n = point.matrixTransform(matrix)\n point.y += height\n bbox.s = point.matrixTransform(matrix)\n\n return bbox\n }\n\n return tip\n };\n\n}));","import {LinkState, NodeState} from \"./controllers\";\n\nexport const clusterColors = {\n ontoOrange: 'var(--onto-orange)',\n ontoBlue: 'var(--onto-blue)',\n ontoGreen: 'var(--onto-green)',\n ontoGrey: 'var(--onto-grey)'\n};\n\nexport function createClusterSvgElement(element) {\n return d3.select(element)\n .append('svg');\n}\n\nexport function createClusterZone(parent) {\n const clusterZone = parent.append('g');\n clusterZone\n .append(\"circle\")\n .classed('cluster-zone', true)\n .style('fill', 'transparent')\n .style('stroke-width', '2');\n return clusterZone;\n}\n\nexport function setCreateClusterZone(hasCluster, clusterZone, translationsMap) {\n clusterZone\n .select('.cluster-zone')\n .classed('no-cluster', !hasCluster);\n\n if (hasCluster) {\n clusterZone.selectAll('#no-cluster-zone').remove();\n } else {\n const textGroup = clusterZone\n .append('g')\n .attr(\"id\", \"no-cluster-zone\");\n textGroup\n .append('text')\n .attr('id', 'no-cluster-label')\n .text(translationsMap.no_cluster_configured || 'No cluster group configured')\n .attr('y', -50)\n .classed('h2', true)\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('id', 'create-cluster-label')\n .classed('h3', true)\n .text(translationsMap.create_cluster_btn || 'Click here to create a cluster')\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('y', 130)\n .attr('class', 'icon-any repo')\n .attr('fill', clusterColors.ontoOrange)\n .style('text-anchor', \"middle\")\n .classed('settings-icon', true)\n .text(\"\\ue92b\");\n }\n}\n\nexport function updateClusterZoneLabels(hasCluster, clusterZone, translationsMap) {\n if (hasCluster) {\n return;\n }\n clusterZone.select('#no-cluster-zone #no-cluster-label')\n .text(translationsMap.no_cluster_configured);\n clusterZone.select('#no-cluster-zone #create-cluster-label')\n .text(translationsMap.create_cluster_btn);\n}\n\nexport function moveElement(element, x, y) {\n element.attr('transform', () => {\n return `translate(${x}, ${y})`;\n });\n}\n\nexport function createNodes(nodesDataBinding, nodeRadius, isLegend) {\n const nodeGroup = nodesDataBinding.enter()\n .append('g')\n .attr('id', 'node-group')\n .classed('legend', isLegend);\n\n createHexagon(nodeGroup, nodeRadius);\n nodesDataBinding.exit().remove();\n\n nodeGroup\n .append('text')\n .attr('class', 'icon-any node-icon');\n\n addHostnameToNodes(nodeGroup, nodeRadius, isLegend);\n}\n\nfunction addHostnameToNodes(nodeElements, nodeRadius, isLegend) {\n const nodeTextHost = nodeElements.append('g');\n\n if (isLegend) {\n nodeTextHost.append('foreignObject')\n .attr('y', nodeRadius)\n .attr('x', -nodeRadius)\n .attr('width', nodeRadius * 2)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host');\n } else {\n nodeTextHost\n .append('rect')\n .attr('class', 'id-host-background')\n .attr('rx', 6);\n\n nodeTextHost\n .append('text')\n .attr('y', nodeRadius + 10)\n .attr('class', 'id id-host')\n .style('text-anchor', 'middle');\n }\n}\n\nexport function updateNodes(nodes) {\n updateNodesIcon(nodes);\n updateNodesClasses(nodes);\n updateNodesHostnameText(nodes);\n}\n\nfunction updateNodesClasses(nodes) {\n nodes\n .select('.node.member')\n .classed('leader', (node) => node.nodeState === NodeState.LEADER)\n .classed('follower', (node) => node.nodeState === NodeState.FOLLOWER)\n .classed('candidate', (node) => node.nodeState === NodeState.CANDIDATE)\n .classed('other', (node) => {\n return node.nodeState !== NodeState.LEADER &&\n node.nodeState !== NodeState.FOLLOWER &&\n node.nodeState !== NodeState.CANDIDATE;\n });\n}\n\nfunction updateNodesIcon(nodes) {\n nodes\n .select('.icon-any.node-icon')\n .text(getNodeIconType);\n}\n\nfunction getNodeIconType(node) {\n if (node.nodeState === NodeState.LEADER) {\n return '\\ue935';\n } else if (node.nodeState === NodeState.FOLLOWER) {\n return '\\ue963';\n } else if (node.nodeState === NodeState.CANDIDATE) {\n return '\\ue914';\n } else if (node.nodeState === NodeState.NO_CONNECTION) {\n return '\\ue931';\n } else if (node.nodeState === NodeState.OUT_OF_SYNC) {\n return '\\ue920';\n } else if (node.nodeState === NodeState.READ_ONLY) {\n return '\\ue95c';\n } else if (node.nodeState === NodeState.RESTRICTED) {\n return '\\ue933';\n }\n return '';\n}\n\nfunction updateNodesHostnameText(nodes) {\n nodes\n .select('.id.id-host')\n .each(function (d) {\n d.labelNode = this;\n })\n .text(function (d) {\n return d.hostname;\n });\n\n // Add padding styling to text background. left/right +5. top/bottom +1\n nodes\n .select('.id-host-background')\n .attr('width', function (d) {\n return d3.select(d.labelNode).node().getBBox().width + 10;\n })\n .attr('height', function (d) {\n return d3.select(d.labelNode).node().getBBox().height + 2;\n })\n .attr('x', function (d) {\n return d3.select(d.labelNode).node().getBBox().x - 5;\n })\n .attr('y', function (d) {\n return d3.select(d.labelNode).node().getBBox().y - 1;\n })\n .attr('fill', '#EEEEEE');\n}\n\nexport function createLinks(linksDataBinding) {\n linksDataBinding.enter()\n .append('path')\n .classed('link', true);\n\n linksDataBinding.exit().remove();\n}\n\nexport function updateLinks(linksDataBinding, nodes) {\n linksDataBinding\n .attr('stroke', setLinkColor)\n .style('stroke-dasharray', setLinkStyle)\n .attr('d', (link) => getLinkCoordinates(link, nodes));\n}\n\nexport function setLinkColor(link) {\n if (link.status === LinkState.IN_SYNC || link.status === LinkState.SYNCING) {\n return clusterColors.ontoGreen;\n } else if (link.status === LinkState.OUT_OF_SYNC) {\n return clusterColors.ontoGrey;\n }\n return 'none';\n}\n\nexport function setLinkStyle(link) {\n if (link.status === LinkState.OUT_OF_SYNC || link.status === LinkState.SYNCING) {\n return '10 10';\n }\n return 'none';\n}\n\nfunction getLinkCoordinates(link, nodes) {\n const source = nodes.find((node) => node.address === link.source);\n const target = nodes.find((node) => node.address === link.target);\n\n const deltaX = target.x - source.x;\n const deltaY = target.y - source.y;\n const dist = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const normX = deltaX / dist;\n const normY = deltaY / dist;\n\n // Padding from node center point\n const sourcePadding = 55;\n const targetPadding = 55;\n const sourceX = source.x + (sourcePadding * normX);\n const sourceY = source.y + (sourcePadding * normY);\n const targetX = target.x - (targetPadding * normX);\n const targetY = target.y - (targetPadding * normY);\n return 'M' + sourceX + ',' + sourceY + 'L' + targetX + ',' + targetY;\n}\n\nexport function positionNodesOnClusterZone(nodes, clusterZoneX, clusterZoneY, clusterZoneRadius) {\n nodes\n .attr('transform', (node, index) => {\n // Calculate initial positions for the new nodes based on\n // spreading them evenly on a circle around the center of the page.\n const theta = 2 * Math.PI * index / nodes[0].length;\n var x = clusterZoneX + Math.cos(theta) * clusterZoneRadius;\n var y = clusterZoneY + Math.sin(theta) * clusterZoneRadius;\n node.x = x;\n node.y = y;\n return `translate(${x}, ${y})`;\n });\n}\n\nfunction createHexagon(nodeGroup, radius) {\n const _s32 = (Math.sqrt(3) / 2);\n const xDiff = 0;\n const yDiff = 0;\n const points = [[radius + xDiff, yDiff], [radius / 2 + xDiff, radius * _s32 + yDiff], [-radius / 2 + xDiff, radius * _s32 + yDiff],\n [-radius + xDiff, yDiff],\n [-radius / 2 + xDiff, -radius * _s32 + yDiff], [radius / 2 + xDiff, -radius * _s32 + yDiff], [radius + xDiff, yDiff],\n [radius / 2 + xDiff, radius * _s32 + yDiff]];\n return nodeGroup\n .selectAll(\"path.area\")\n .data([points])\n .enter()\n .append(\"path\")\n .attr('class', 'node member')\n .attr(\"d\", d3.svg.line());\n}\n","import 'angular/utils/local-storage-adapter';\nimport * as CDS from \"./cluster-drawing.service\";\nimport {LinkState, NodeState} from \"./controllers\";\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\n\n\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\n\nconst nodeRadius = 50;\nconst legendNodeRadius = 25;\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives', [\n 'graphdb.framework.utils.localstorageadapter'\n]);\n\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\"\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state'\n};\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$rootScope',\n function ($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $rootScope) {\n return {\n restrict: 'A',\n link: function (scope, element) {\n scope.showLegend = false;\n $rootScope.$on('$translateChangeSuccess', function () {\n updateTranslations();\n updateLabels();\n });\n scope.$on(\"$destroy\", function () {\n legendTooltip.destroy();\n });\n function updateTranslations() {\n Object.keys(translationsMap).forEach((key) => {\n translationsMap[key] = $translate.instant('cluster_management.cluster_graphical_view.' + key);\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 600);\n }\n\n let legendNodesGroup;\n let legendWidth;\n let legendHeight;\n const legendPadding = 10;\n\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n scope.width = function () {\n return width;\n };\n\n scope.height = function () {\n return height;\n };\n\n // SVG components\n let svg;\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n if (legendNodesGroup) {\n legendNodesGroup.remove();\n }\n createLegendGroup();\n createClusterLegend();\n }\n\n function translateLegendLinksAndNodes(legendNodes, legendLinks) {\n legendNodes.forEach((node) => {\n node.toolTip = node.hostname = translationsMap[node.customText];\n });\n legendLinks.forEach((link) => {\n link.toolTip = link.linkTypeText = translationsMap[link.linkTypeKey];\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function initialize() {\n updateTranslations();\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n createClusterLegend();\n plot();\n }\n\n function createClusterZone(hasCluster) {\n svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n svg.call(legendTooltip);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n createLegendGroup();\n }\n\n function createLegendGroup() {\n legendNodesGroup = svg.append('g').attr('id', 'legend-group')\n .classed('hidden', !scope.showLegend)\n .classed('legend-group', true);\n }\n\n let tooltipElement;\n const legendTooltip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function () {\n const bbox = tooltipElement.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;\n\n return {\n left: bbox.left + scrollLeft + 'px',\n top: (bbox.top - 30) + scrollTop + 'px'\n };\n })\n .html(function (d) {\n return d.toolTip;\n });\n\n // Shows tooltip with legend node or link state\n const showLegendTooltip = function (d, element) {\n tooltipElement = element;\n legendTooltip.show(d, tooltipElement);\n };\n\n // Hides the tooltip with legend node or link state\n const hideLegendTooltip = function () {\n tooltipElement = null;\n legendTooltip.hide();\n };\n\n function createClusterLegend() {\n const nodeLinkStateTextHeight = 14;\n\n const nodeStateLabelY = legendPadding + nodeLinkStateTextHeight;\n const linkStateLabelY = nodeStateLabelY + legendPadding * 3 + legendNodeRadius * 5;\n\n const legendColumns = 4;\n const nodesXPadding = 15;\n const nodesYPadding = 15;\n\n const legendNodes = getLegendNodes();\n const legendLinks = getLegendLinks();\n translateLegendLinksAndNodes(legendNodes, legendLinks);\n\n legendNodesGroup.append('rect')\n .attr('id', 'legend-background')\n .attr('class', 'legend-background')\n .attr('fill', '#EEEEEE');\n\n const nodeStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'node_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', nodeStateLabelY)\n .text(getLabelFor('node_state'));\n\n const linkStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'link_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', linkStateLabelY)\n .text(getLabelFor('link_state'));\n\n const legendNodeData = legendNodesGroup.selectAll('#node-group').data(legendNodes);\n CDS.createNodes(legendNodeData, legendNodeRadius, true);\n CDS.updateNodes(legendNodeData);\n\n legendNodeData.select('.node.member')\n .on(\"mouseover\", function (d) {\n d3.event.stopPropagation();\n showLegendTooltip(d, this);\n })\n .on('mouseout', hideLegendTooltip);\n\n legendNodeData\n .attr('transform', function (d) {\n const row = Math.floor(d.id / legendColumns);\n const column = d.id % legendColumns;\n const x = legendPadding + legendNodeRadius + (nodesXPadding + legendNodeRadius * 2) * column;\n const y = legendPadding * 2 + nodeLinkStateTextHeight + legendNodeRadius + (nodesYPadding + legendNodeRadius\n * 2) * row;\n return `translate(${x}, ${y})`;\n });\n\n legendNodesGroup\n .call(function () {\n legendWidth = this.node().getBBox().width;\n });\n\n // Position node/link state labels\n nodeStateLabel.attr('x', legendPadding + legendWidth / 2);\n linkStateLabel.attr('x', legendPadding + legendWidth / 2);\n\n\n const linkWidth = legendWidth / 3;\n\n const linksGroup = legendNodesGroup.append('g').attr('id', 'links-group');\n const linksGroupY = linkStateLabelY + legendPadding;\n linksGroup.attr('transform', `translate(${legendPadding}, ${linksGroupY})`);\n\n legendLinks.forEach((link, index) => {\n const linkPadding = 5;\n const startX = linkPadding;\n const endX = linkWidth - linkPadding;\n\n const linkG = linksGroup\n .append('g')\n .classed('link', true)\n .classed('legend', true)\n .attr('transform', () => {\n const x = index * linkWidth;\n return `translate(${x}, 0)`;\n });\n\n linkG\n .append('path')\n .classed('link', true)\n .attr('stroke-dasharray', () => CDS.setLinkStyle(link))\n .attr('stroke', () => CDS.setLinkColor(link))\n .attr('d', () => {\n return `M${startX},0,${endX},0`;\n });\n\n linkG.append('foreignObject')\n .attr('y', 10)\n .attr('x', 5)\n .attr('width', linkWidth - 10)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host')\n .style(\"font-size\", \"9px\")\n .html(link.linkTypeText);\n\n linkG\n .on('mouseover', function () {\n d3.event.stopPropagation();\n showLegendTooltip(link, this);\n })\n .on('mouseout', hideLegendTooltip);\n });\n\n\n legendNodesGroup\n .call(function (d) {\n legendHeight = this.node().getBBox().height;\n legendWidth = this.node().getBBox().width;\n });\n\n legendNodesGroup.select('.legend-background')\n .attr('height', legendHeight + legendPadding * 4)\n .attr('width', legendWidth + legendPadding * 2)\n .attr('rx', '6');\n\n positionLegend();\n }\n\n function positionLegend() {\n const y = height - (legendHeight + legendPadding * 3 + 50);\n CDS.moveElement(legendNodesGroup, 0, y);\n }\n\n function createNodes(nodes) {\n nodes.forEach((node) => node.hostname = UriUtils.shortenIri(node.endpoint));\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n nodeData\n .on('click', (d) => {\n scope.childContext.selectNode(d);\n\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (d3.event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", d3.event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - d3.event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (d3.event.pageY - 28) + \"px\");\n });\n CDS.createNodes(nodeData, nodeRadius);\n CDS.updateNodes(nodeData);\n CDS.positionNodesOnClusterZone(nodeData, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n }\n\n // Properties and functions that can be used by parent\n scope.childContext.redraw = plot;\n scope.childContext.resize = function () {\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n positionLegend();\n };\n scope.childContext.toggleLegend = () => {\n scope.showLegend = !scope.showLegend;\n legendNodesGroup.classed('hidden', !scope.showLegend);\n };\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap);\n let mouseupCallback;\n if (!hasCluster) {\n mouseupCallback = () => {\n scope.$apply(function () {\n scope.showCreateClusterDialog();\n });\n };\n }\n clusterZone\n .on('mouseup', mouseupCallback);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = _.cloneDeep(scope.clusterModel.nodes) || [];\n const links = _.cloneDeep(scope.clusterModel.links) || [];\n createNodes(nodes);\n drawLinks(links, nodes);\n }\n\n initialize();\n }\n };\n }\n])\n .config(['$tooltipProvider', function ($tooltipProvider) {\n $tooltipProvider.options({appendToBody: true});\n}]);\n\n\nconst getLegendNodes = function () {\n const legendNodes = [];\n legendNodes.push({nodeState: NodeState.LEADER, customText: 'node_state_leader'});\n legendNodes.push({nodeState: NodeState.FOLLOWER, customText: 'node_state_follower'});\n legendNodes.push({nodeState: NodeState.CANDIDATE, customText: 'node_state_candidate'});\n legendNodes.push({nodeState: NodeState.NO_CLUSTER, customText: 'node_state_no_cluster'});\n legendNodes.push({nodeState: NodeState.OUT_OF_SYNC, customText: 'node_state_out_of_sync'});\n legendNodes.push({nodeState: NodeState.NO_CONNECTION, customText: 'node_state_no_connection'});\n legendNodes.push({nodeState: NodeState.READ_ONLY, customText: 'node_state_read_only'});\n legendNodes.push({nodeState: NodeState.RESTRICTED, customText: 'node_state_restricted'});\n legendNodes.forEach((node, index) => node.id = index);\n return legendNodes;\n};\n\nconst getLegendLinks = function () {\n const links = [];\n links.push({status: LinkState.IN_SYNC, linkTypeKey: 'link_state_in_sync'});\n links.push({status: LinkState.SYNCING, linkTypeKey: 'link_state_syncing'});\n links.push({status: LinkState.OUT_OF_SYNC, linkTypeKey: 'link_state_out_of_sync'});\n links.forEach((link, index) => link.id = index);\n return links;\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/clustermanagement/app.js","webpack:///./src/js/lib/d3-tip/d3-tip-patch.js","webpack:///./src/js/angular/clustermanagement/cluster-drawing.service.js","webpack:///./src/js/angular/clustermanagement/directives.js"],"names":["angular","module","direction","offset","html","node","initNode","svg","point","target","customPosition","tip","vis","el","tagName","toLowerCase","ownerSVGElement","createSVGPoint","document","body","appendChild","show","args","Array","prototype","slice","call","arguments","length","SVGElement","pop","coords","content","apply","this","poffset","dir","nodel","getNodeEl","i","directions","scrollTop","documentElement","scrollLeft","customPos","style","opacity","classed","direction_callbacks","get","top","left","hide","attr","n","v","d3","selection","functor","destroy","remove","map","bbox","getScreenBBox","y","offsetHeight","x","offsetWidth","s","e","w","nw","ne","sw","se","keys","select","createElement","position","targetel","event","getScreenCTM","parentNode","matrix","tbbox","getBBox","width","height","matrixTransform","clusterColors","ontoOrange","ontoBlue","ontoGreen","ontoGrey","createClusterSvgElement","element","append","createClusterZone","parent","clusterZone","setCreateClusterZone","hasCluster","translationsMap","selectAll","textGroup","text","no_cluster_configured","create_cluster_btn","updateClusterZoneLabels","moveElement","createNodes","nodesDataBinding","nodeRadius","isLegend","nodeGroup","enter","radius","_s32","Math","sqrt","points","data","line","createHexagon","exit","nodeElements","nodeTextHost","addHostnameToNodes","updateNodes","nodes","getNodeIconType","updateNodesIcon","nodeState","LEADER","FOLLOWER","CANDIDATE","updateNodesClasses","each","d","labelNode","hostname","updateNodesHostnameText","NO_CONNECTION","OUT_OF_SYNC","READ_ONLY","RESTRICTED","createLinks","linksDataBinding","updateLinks","setLinkColor","setLinkStyle","link","source","find","address","deltaX","deltaY","dist","normX","normY","sourceX","sourceY","targetX","targetY","getLinkCoordinates","status","IN_SYNC","SYNCING","positionNodesOnClusterZone","clusterZoneX","clusterZoneY","clusterZoneRadius","index","theta","PI","cos","sin","navigationBarWidth","clusterManagementDirectives","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","idTranslationKeyMap","node_state","link_state","directive","$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope","restrict","scope","updateTranslations","Object","forEach","key","instant","getWindowWidth","collapsed","MENU_STATE","max","floor","innerWidth","getWindowHeight","innerHeight","legendNodesGroup","legendWidth","legendHeight","showLegend","$on","elementId","getLabelFor","createLegendGroup","createClusterLegend","updateLabels","legendTooltip","nodesGroup","linksGroup","tooltipElement","min","getBoundingClientRect","toolTip","showLegendTooltip","hideLegendTooltip","legendNodes","getLegendNodes","legendLinks","getLegendLinks","customText","linkTypeText","linkTypeKey","translateLegendLinksAndNodes","nodeStateLabel","legendPadding","linkStateLabel","nodeStateLabelY","legendNodeData","on","stopPropagation","row","id","linkWidth","endX","linkG","positionLegend","resizeClusterComponent","plot","clusterModel","mouseupCallback","$apply","showCreateClusterDialog","setClusterZoneType","_","cloneDeep","links","shortenIri","endpoint","nodeData","childContext","selectNode","tooltip","windowWidth","$","window","pageX","pageY","linksData","drawLinks","redraw","resize","toggleLegend","config","$tooltipProvider","options","appendToBody","push","NO_CLUSTER"],"mappings":"iGAAA,yDAgB6BA,QAAQC,OAAO,sCAP5B,CACZ,YACA,SACA,kDACA,oD,oBCbJ,UAQQ,EAAO,QAAW,0BAAP,EAWX,WAIJ,OAAO,WACH,IAAIC,EAoJJ,WAA8B,MAAO,KAnJjCC,EAoJJ,WAA2B,MAAO,CAAC,EAAG,IAnJlCC,EAoJJ,WAAyB,MAAO,KAnJ5BC,EAAYC,IACZC,EAAY,KACZC,EAAY,KACZC,EAAY,KACZC,EAAiB,KAErB,SAASC,EAAIC,GAyOb,IAAoBC,EAxOhBN,EA0OgC,SADhCM,GADgBA,EAxOCD,GAyOTP,QACFS,QAAQC,cACHF,EAEJA,EAAGG,gBA5OVR,EAAQD,EAAIU,iBACZC,SAASC,KAAKC,YAAYf,GAM9BM,EAAIU,KAAO,WACP,IAAIC,EAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACnCL,EAAKA,EAAKM,OAAS,aAAcC,aAAYpB,EAASa,EAAKQ,OAE9D,IAKIC,EALAC,EAAU5B,EAAK6B,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LG,EAAiB,WACnB,MAAM2B,EAAQ,GAKd,OAJAA,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUC,QAAS4E,YAAa,uBACpDwB,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUE,QAAS2E,YAAa,uBACpDwB,EAAMqB,KAAK,CAAC1H,OAAQ,YAAUtB,YAAamG,YAAa,2BACxDwB,EAAM5D,QAAQ,CAACvD,EAAMqB,IAAUrB,EAAKqG,GAAKhF,GAClC8F","file":"22.5f70a951e87768500861.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers';\nimport 'angular/clustermanagement/directives';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/d3-ONTO-chord-patch';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers',\n 'graphdb.framework.clustermanagement.directives'\n];\n\nconst clusterManagementApp = angular.module('graphdb.framework.clustermanagement', modules);\n","// d3.tip\n// Copyright (c) 2013 Justin Palmer\n//\n// Tooltips for d3.js SVG visualizations\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module with d3 as a dependency.\n define([], factory)\n } else if (typeof module === 'object' && module.exports) {\n // CommonJS\n module.exports = function(d3) {\n d3.tip = factory(d3)\n return d3.tip\n }\n } else {\n // Browser global.\n root.d3.tip = factory(root.d3)\n }\n}(this, function () {\n // Public - contructs a new tooltip\n //\n // Returns a tip\n return function() {\n var direction = d3_tip_direction,\n offset = d3_tip_offset,\n html = d3_tip_html,\n node = initNode(),\n svg = null,\n point = null,\n target = null,\n customPosition = null\n\n function tip(vis) {\n svg = getSVGNode(vis)\n point = svg.createSVGPoint()\n document.body.appendChild(node)\n }\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function() {\n var args = Array.prototype.slice.call(arguments)\n if(args[args.length - 1] instanceof SVGElement) target = args.pop()\n\n var content = html.apply(this, args),\n poffset = offset.apply(this, args),\n dir = direction.apply(this, args),\n nodel = getNodeEl(),\n i = directions.length,\n coords,\n scrollTop = document.documentElement.scrollTop || document.body.scrollTop,\n scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft,\n customPos = customPosition.apply(this, args)\n\n nodel.html(content)\n .style({ opacity: 1, 'pointer-events': 'all' })\n\n while(i--) nodel.classed(directions[i], false)\n coords = direction_callbacks.get(dir).apply(this)\n\n if (customPos) {\n nodel.style(customPos)\n } else {\n nodel.classed(dir, true).style({\n top: (coords.top + poffset[0]) + scrollTop + 'px',\n left: (coords.left + poffset[1]) + scrollLeft + 'px'\n })\n }\n\n return tip\n }\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function() {\n var nodel = getNodeEl()\n nodel.style({ opacity: 0, 'pointer-events': 'none' })\n return tip\n }\n\n // Public: Proxy attr calls to the d3 tip container. Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().attr(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.attr.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Proxy style calls to the d3 tip container. Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value\n tip.style = function(n, v) {\n if (arguments.length < 2 && typeof n === 'string') {\n return getNodeEl().style(n)\n } else {\n var args = Array.prototype.slice.call(arguments)\n d3.selection.prototype.style.apply(getNodeEl(), args)\n }\n\n return tip\n }\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function(v) {\n if (!arguments.length) return direction\n direction = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function(v) {\n if (!arguments.length) return offset\n offset = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function(v) {\n if (!arguments.length) return html\n html = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n tip.customPosition = function(v) {\n if (!arguments.length) return customPosition\n customPosition = v == null ? v : d3.functor(v)\n\n return tip\n }\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function() {\n if(node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n }\n\n function d3_tip_direction() { return 'n' }\n function d3_tip_offset() { return [0, 0] }\n function d3_tip_html() { return ' ' }\n\n var direction_callbacks = d3.map({\n n: direction_n,\n s: direction_s,\n e: direction_e,\n w: direction_w,\n nw: direction_nw,\n ne: direction_ne,\n sw: direction_sw,\n se: direction_se\n }),\n\n directions = direction_callbacks.keys()\n\n function direction_n() {\n var bbox = getScreenBBox()\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n }\n }\n\n function direction_s() {\n var bbox = getScreenBBox()\n return {\n top: bbox.s.y,\n left: bbox.s.x - node.offsetWidth / 2\n }\n }\n\n function direction_e() {\n var bbox = getScreenBBox()\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x\n }\n }\n\n function direction_w() {\n var bbox = getScreenBBox()\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth\n }\n }\n\n function direction_nw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n }\n }\n\n function direction_ne() {\n var bbox = getScreenBBox()\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n }\n }\n\n function direction_sw() {\n var bbox = getScreenBBox()\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n }\n }\n\n function direction_se() {\n var bbox = getScreenBBox()\n return {\n top: bbox.se.y,\n left: bbox.e.x\n }\n }\n\n function initNode() {\n var node = d3.select(document.createElement('div'))\n node.style({\n position: 'absolute',\n top: 0,\n opacity: 0,\n 'pointer-events': 'none',\n 'box-sizing': 'border-box'\n })\n\n return node.node()\n }\n\n function getSVGNode(el) {\n el = el.node()\n if(el.tagName.toLowerCase() === 'svg')\n return el\n\n return el.ownerSVGElement\n }\n\n function getNodeEl() {\n if(node === null) {\n node = initNode();\n // re-add node to DOM\n document.body.appendChild(node);\n };\n return d3.select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast), nw(northwest),\n // sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox() {\n var targetel = target || d3.event.target;\n\n while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {\n targetel = targetel.parentNode;\n }\n\n var bbox = {},\n matrix = targetel.getScreenCTM(),\n tbbox = targetel.getBBox(),\n width = tbbox.width,\n height = tbbox.height,\n x = tbbox.x,\n y = tbbox.y\n\n point.x = x\n point.y = y\n bbox.nw = point.matrixTransform(matrix)\n point.x += width\n bbox.ne = point.matrixTransform(matrix)\n point.y += height\n bbox.se = point.matrixTransform(matrix)\n point.x -= width\n bbox.sw = point.matrixTransform(matrix)\n point.y -= height / 2\n bbox.w = point.matrixTransform(matrix)\n point.x += width\n bbox.e = point.matrixTransform(matrix)\n point.x -= width / 2\n point.y -= height / 2\n bbox.n = point.matrixTransform(matrix)\n point.y += height\n bbox.s = point.matrixTransform(matrix)\n\n return bbox\n }\n\n return tip\n };\n\n}));","import {LinkState, NodeState} from \"./controllers\";\n\nexport const clusterColors = {\n ontoOrange: 'var(--onto-orange)',\n ontoBlue: 'var(--onto-blue)',\n ontoGreen: 'var(--onto-green)',\n ontoGrey: 'var(--onto-grey)'\n};\n\nexport function createClusterSvgElement(element) {\n return d3.select(element)\n .append('svg');\n}\n\nexport function createClusterZone(parent) {\n const clusterZone = parent.append('g');\n clusterZone\n .append(\"circle\")\n .classed('cluster-zone', true)\n .style('fill', 'transparent')\n .style('stroke-width', '2');\n return clusterZone;\n}\n\nexport function setCreateClusterZone(hasCluster, clusterZone, translationsMap) {\n clusterZone\n .select('.cluster-zone')\n .classed('no-cluster', !hasCluster);\n\n if (hasCluster) {\n clusterZone.selectAll('#no-cluster-zone').remove();\n } else {\n const textGroup = clusterZone\n .append('g')\n .attr(\"id\", \"no-cluster-zone\");\n textGroup\n .append('text')\n .attr('id', 'no-cluster-label')\n .text(translationsMap.no_cluster_configured || 'No cluster group configured')\n .attr('y', -50)\n .classed('h2', true)\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('id', 'create-cluster-label')\n .classed('h3', true)\n .text(translationsMap.create_cluster_btn || 'Click here to create a cluster')\n .style('text-anchor', \"middle\");\n textGroup.append('text')\n .attr('y', 130)\n .attr('class', 'icon-any repo')\n .attr('fill', clusterColors.ontoOrange)\n .style('text-anchor', \"middle\")\n .classed('settings-icon', true)\n .text(\"\\ue92b\");\n }\n}\n\nexport function updateClusterZoneLabels(hasCluster, clusterZone, translationsMap) {\n if (hasCluster) {\n return;\n }\n clusterZone.select('#no-cluster-zone #no-cluster-label')\n .text(translationsMap.no_cluster_configured);\n clusterZone.select('#no-cluster-zone #create-cluster-label')\n .text(translationsMap.create_cluster_btn);\n}\n\nexport function moveElement(element, x, y) {\n element.attr('transform', () => {\n return `translate(${x}, ${y})`;\n });\n}\n\nexport function createNodes(nodesDataBinding, nodeRadius, isLegend) {\n const nodeGroup = nodesDataBinding.enter()\n .append('g')\n .attr('id', 'node-group')\n .classed('legend', isLegend);\n\n createHexagon(nodeGroup, nodeRadius);\n nodesDataBinding.exit().remove();\n\n nodeGroup\n .append('text')\n .attr('class', 'icon-any node-icon');\n\n addHostnameToNodes(nodeGroup, nodeRadius, isLegend);\n}\n\nfunction addHostnameToNodes(nodeElements, nodeRadius, isLegend) {\n const nodeTextHost = nodeElements.append('g');\n\n if (isLegend) {\n nodeTextHost.append('foreignObject')\n .attr('y', nodeRadius)\n .attr('x', -nodeRadius)\n .attr('width', nodeRadius * 2)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host');\n } else {\n nodeTextHost\n .append('rect')\n .attr('class', 'id-host-background')\n .attr('rx', 6);\n\n nodeTextHost\n .append('text')\n .attr('y', nodeRadius + 10)\n .attr('class', 'id id-host')\n .style('text-anchor', 'middle');\n }\n}\n\nexport function updateNodes(nodes) {\n updateNodesIcon(nodes);\n updateNodesClasses(nodes);\n updateNodesHostnameText(nodes);\n}\n\nfunction updateNodesClasses(nodes) {\n nodes\n .select('.node.member')\n .classed('leader', (node) => node.nodeState === NodeState.LEADER)\n .classed('follower', (node) => node.nodeState === NodeState.FOLLOWER)\n .classed('candidate', (node) => node.nodeState === NodeState.CANDIDATE)\n .classed('other', (node) => {\n return node.nodeState !== NodeState.LEADER &&\n node.nodeState !== NodeState.FOLLOWER &&\n node.nodeState !== NodeState.CANDIDATE;\n });\n}\n\nfunction updateNodesIcon(nodes) {\n nodes\n .select('.icon-any.node-icon')\n .text(getNodeIconType);\n}\n\nfunction getNodeIconType(node) {\n if (node.nodeState === NodeState.LEADER) {\n return '\\ue935';\n } else if (node.nodeState === NodeState.FOLLOWER) {\n return '\\ue963';\n } else if (node.nodeState === NodeState.CANDIDATE) {\n return '\\ue914';\n } else if (node.nodeState === NodeState.NO_CONNECTION) {\n return '\\ue931';\n } else if (node.nodeState === NodeState.OUT_OF_SYNC) {\n return '\\ue920';\n } else if (node.nodeState === NodeState.READ_ONLY) {\n return '\\ue95c';\n } else if (node.nodeState === NodeState.RESTRICTED) {\n return '\\ue933';\n }\n return '';\n}\n\nfunction updateNodesHostnameText(nodes) {\n nodes\n .select('.id.id-host')\n .each(function (d) {\n d.labelNode = this;\n })\n .text(function (d) {\n return d.hostname;\n });\n\n // Add padding styling to text background. left/right +5. top/bottom +1\n nodes\n .select('.id-host-background')\n .attr('width', function (d) {\n return d3.select(d.labelNode).node().getBBox().width + 10;\n })\n .attr('height', function (d) {\n return d3.select(d.labelNode).node().getBBox().height + 2;\n })\n .attr('x', function (d) {\n return d3.select(d.labelNode).node().getBBox().x - 5;\n })\n .attr('y', function (d) {\n return d3.select(d.labelNode).node().getBBox().y - 1;\n })\n .attr('fill', '#EEEEEE');\n}\n\nexport function createLinks(linksDataBinding) {\n linksDataBinding.enter()\n .append('path')\n .classed('link', true);\n\n linksDataBinding.exit().remove();\n}\n\nexport function updateLinks(linksDataBinding, nodes) {\n linksDataBinding\n .attr('stroke', setLinkColor)\n .style('stroke-dasharray', setLinkStyle)\n .attr('d', (link) => getLinkCoordinates(link, nodes));\n}\n\nexport function setLinkColor(link) {\n if (link.status === LinkState.IN_SYNC || link.status === LinkState.SYNCING) {\n return clusterColors.ontoGreen;\n } else if (link.status === LinkState.OUT_OF_SYNC) {\n return clusterColors.ontoGrey;\n }\n return 'none';\n}\n\nexport function setLinkStyle(link) {\n if (link.status === LinkState.OUT_OF_SYNC || link.status === LinkState.SYNCING) {\n return '10 10';\n }\n return 'none';\n}\n\nfunction getLinkCoordinates(link, nodes) {\n const source = nodes.find((node) => node.address === link.source);\n const target = nodes.find((node) => node.address === link.target);\n\n const deltaX = target.x - source.x;\n const deltaY = target.y - source.y;\n const dist = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const normX = deltaX / dist;\n const normY = deltaY / dist;\n\n // Padding from node center point\n const sourcePadding = 55;\n const targetPadding = 55;\n const sourceX = source.x + (sourcePadding * normX);\n const sourceY = source.y + (sourcePadding * normY);\n const targetX = target.x - (targetPadding * normX);\n const targetY = target.y - (targetPadding * normY);\n return 'M' + sourceX + ',' + sourceY + 'L' + targetX + ',' + targetY;\n}\n\nexport function positionNodesOnClusterZone(nodes, clusterZoneX, clusterZoneY, clusterZoneRadius) {\n nodes\n .attr('transform', (node, index) => {\n // Calculate initial positions for the new nodes based on\n // spreading them evenly on a circle around the center of the page.\n const theta = 2 * Math.PI * index / nodes[0].length;\n var x = clusterZoneX + Math.cos(theta) * clusterZoneRadius;\n var y = clusterZoneY + Math.sin(theta) * clusterZoneRadius;\n node.x = x;\n node.y = y;\n return `translate(${x}, ${y})`;\n });\n}\n\nfunction createHexagon(nodeGroup, radius) {\n const _s32 = (Math.sqrt(3) / 2);\n const xDiff = 0;\n const yDiff = 0;\n const points = [[radius + xDiff, yDiff], [radius / 2 + xDiff, radius * _s32 + yDiff], [-radius / 2 + xDiff, radius * _s32 + yDiff],\n [-radius + xDiff, yDiff],\n [-radius / 2 + xDiff, -radius * _s32 + yDiff], [radius / 2 + xDiff, -radius * _s32 + yDiff], [radius + xDiff, yDiff],\n [radius / 2 + xDiff, radius * _s32 + yDiff]];\n return nodeGroup\n .selectAll(\"path.area\")\n .data([points])\n .enter()\n .append(\"path\")\n .attr('class', 'node member')\n .attr(\"d\", d3.svg.line());\n}\n","import 'angular/utils/local-storage-adapter';\nimport * as CDS from \"./cluster-drawing.service\";\nimport {LinkState, NodeState} from \"./controllers\";\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\n\n\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\n\nconst nodeRadius = 50;\nconst legendNodeRadius = 25;\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives', [\n 'graphdb.framework.utils.localstorageadapter'\n]);\n\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\"\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state'\n};\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$rootScope',\n function ($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $rootScope) {\n return {\n restrict: 'A',\n link: function (scope, element) {\n scope.showLegend = false;\n $rootScope.$on('$translateChangeSuccess', function () {\n updateTranslations();\n updateLabels();\n });\n scope.$on(\"$destroy\", function () {\n legendTooltip.destroy();\n });\n function updateTranslations() {\n Object.keys(translationsMap).forEach((key) => {\n translationsMap[key] = $translate.instant('cluster_management.cluster_graphical_view.' + key);\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 600);\n }\n\n let legendNodesGroup;\n let legendWidth;\n let legendHeight;\n const legendPadding = 10;\n\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n scope.width = function () {\n return width;\n };\n\n scope.height = function () {\n return height;\n };\n\n // SVG components\n let svg;\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n if (legendNodesGroup) {\n legendNodesGroup.remove();\n }\n createLegendGroup();\n createClusterLegend();\n }\n\n function translateLegendLinksAndNodes(legendNodes, legendLinks) {\n legendNodes.forEach((node) => {\n node.toolTip = node.hostname = translationsMap[node.customText];\n });\n legendLinks.forEach((link) => {\n link.toolTip = link.linkTypeText = translationsMap[link.linkTypeKey];\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function initialize() {\n updateTranslations();\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n createClusterLegend();\n plot();\n }\n\n function createClusterZone(hasCluster) {\n svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n svg.call(legendTooltip);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n createLegendGroup();\n }\n\n function createLegendGroup() {\n legendNodesGroup = svg.append('g').attr('id', 'legend-group')\n .classed('hidden', !scope.showLegend)\n .classed('legend-group', true);\n }\n\n let tooltipElement;\n const legendTooltip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function () {\n const bbox = tooltipElement.getBoundingClientRect();\n const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;\n const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;\n\n return {\n left: bbox.left + scrollLeft + 'px',\n top: (bbox.top - 30) + scrollTop + 'px'\n };\n })\n .html(function (d) {\n return d.toolTip;\n });\n\n // Shows tooltip with legend node or link state\n const showLegendTooltip = function (d, element) {\n tooltipElement = element;\n legendTooltip.show(d, tooltipElement);\n };\n\n // Hides the tooltip with legend node or link state\n const hideLegendTooltip = function () {\n tooltipElement = null;\n legendTooltip.hide();\n };\n\n function createClusterLegend() {\n const nodeLinkStateTextHeight = 14;\n\n const nodeStateLabelY = legendPadding + nodeLinkStateTextHeight;\n const linkStateLabelY = nodeStateLabelY + legendPadding * 3 + legendNodeRadius * 5;\n\n const legendColumns = 4;\n const nodesXPadding = 15;\n const nodesYPadding = 15;\n\n const legendNodes = getLegendNodes();\n const legendLinks = getLegendLinks();\n translateLegendLinksAndNodes(legendNodes, legendLinks);\n\n legendNodesGroup.append('rect')\n .attr('id', 'legend-background')\n .attr('class', 'legend-background')\n .attr('fill', '#EEEEEE');\n\n const nodeStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'node_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', nodeStateLabelY)\n .text(getLabelFor('node_state'));\n\n const linkStateLabel = legendNodesGroup\n .append('text')\n .attr('id', 'link_state')\n .attr('class', 'id id-host')\n .attr('x', nodeRadius * 4)\n .attr('y', linkStateLabelY)\n .text(getLabelFor('link_state'));\n\n const legendNodeData = legendNodesGroup.selectAll('#node-group').data(legendNodes);\n CDS.createNodes(legendNodeData, legendNodeRadius, true);\n CDS.updateNodes(legendNodeData);\n\n legendNodeData.select('.node.member')\n .on(\"mouseover\", function (d) {\n d3.event.stopPropagation();\n showLegendTooltip(d, this);\n })\n .on('mouseout', hideLegendTooltip);\n\n legendNodeData\n .attr('transform', function (d) {\n const row = Math.floor(d.id / legendColumns);\n const column = d.id % legendColumns;\n const x = legendPadding + legendNodeRadius + (nodesXPadding + legendNodeRadius * 2) * column;\n const y = legendPadding * 2 + nodeLinkStateTextHeight + legendNodeRadius + (nodesYPadding + legendNodeRadius\n * 2) * row;\n return `translate(${x}, ${y})`;\n });\n\n legendNodesGroup\n .call(function () {\n legendWidth = this.node().getBBox().width;\n });\n\n // Position node/link state labels\n nodeStateLabel.attr('x', legendPadding + legendWidth / 2);\n linkStateLabel.attr('x', legendPadding + legendWidth / 2);\n\n\n const linkWidth = legendWidth / 3;\n\n const linksGroup = legendNodesGroup.append('g').attr('id', 'links-group');\n const linksGroupY = linkStateLabelY + legendPadding;\n linksGroup.attr('transform', `translate(${legendPadding}, ${linksGroupY})`);\n\n legendLinks.forEach((link, index) => {\n const linkPadding = 5;\n const startX = linkPadding;\n const endX = linkWidth - linkPadding;\n\n const linkG = linksGroup\n .append('g')\n .classed('link', true)\n .classed('legend', true)\n .attr('transform', () => {\n const x = index * linkWidth;\n return `translate(${x}, 0)`;\n });\n\n linkG\n .append('path')\n .classed('link', true)\n .attr('stroke-dasharray', () => CDS.setLinkStyle(link))\n .attr('stroke', () => CDS.setLinkColor(link))\n .attr('d', () => {\n return `M${startX},0,${endX},0`;\n });\n\n linkG.append('foreignObject')\n .attr('y', 10)\n .attr('x', 5)\n .attr('width', linkWidth - 10)\n .attr('height', 10)\n .attr('class', 'label-wrapper')\n .append('xhtml:div')\n .attr('class', 'id id-host')\n .style(\"font-size\", \"9px\")\n .html(link.linkTypeText);\n\n linkG\n .on('mouseover', function () {\n d3.event.stopPropagation();\n showLegendTooltip(link, this);\n })\n .on('mouseout', hideLegendTooltip);\n });\n\n\n legendNodesGroup\n .call(function (d) {\n legendHeight = this.node().getBBox().height;\n legendWidth = this.node().getBBox().width;\n });\n\n legendNodesGroup.select('.legend-background')\n .attr('height', legendHeight + legendPadding * 4)\n .attr('width', legendWidth + legendPadding * 2)\n .attr('rx', '6');\n\n positionLegend();\n }\n\n function positionLegend() {\n const y = height - (legendHeight + legendPadding * 3 + 50);\n CDS.moveElement(legendNodesGroup, 0, y);\n }\n\n function createNodes(nodes) {\n nodes.forEach((node) => node.hostname = UriUtils.shortenIri(node.endpoint));\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n nodeData\n .on('click', (d) => {\n scope.childContext.selectNode(d);\n\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (d3.event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", d3.event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - d3.event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (d3.event.pageY - 28) + \"px\");\n });\n CDS.createNodes(nodeData, nodeRadius);\n CDS.updateNodes(nodeData);\n CDS.positionNodesOnClusterZone(nodeData, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n }\n\n // Properties and functions that can be used by parent\n scope.childContext.redraw = plot;\n scope.childContext.resize = function () {\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n positionLegend();\n };\n scope.childContext.toggleLegend = () => {\n scope.showLegend = !scope.showLegend;\n legendNodesGroup.classed('hidden', !scope.showLegend);\n };\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap);\n let mouseupCallback;\n if (!hasCluster) {\n mouseupCallback = () => {\n scope.$apply(function () {\n scope.showCreateClusterDialog();\n });\n };\n }\n clusterZone\n .on('mouseup', mouseupCallback);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = _.cloneDeep(scope.clusterModel.nodes) || [];\n const links = _.cloneDeep(scope.clusterModel.links) || [];\n createNodes(nodes);\n drawLinks(links, nodes);\n }\n\n initialize();\n }\n };\n }\n])\n .config(['$tooltipProvider', function ($tooltipProvider) {\n $tooltipProvider.options({appendToBody: true});\n}]);\n\n\nconst getLegendNodes = function () {\n const legendNodes = [];\n legendNodes.push({nodeState: NodeState.LEADER, customText: 'node_state_leader'});\n legendNodes.push({nodeState: NodeState.FOLLOWER, customText: 'node_state_follower'});\n legendNodes.push({nodeState: NodeState.CANDIDATE, customText: 'node_state_candidate'});\n legendNodes.push({nodeState: NodeState.NO_CLUSTER, customText: 'node_state_no_cluster'});\n legendNodes.push({nodeState: NodeState.OUT_OF_SYNC, customText: 'node_state_out_of_sync'});\n legendNodes.push({nodeState: NodeState.NO_CONNECTION, customText: 'node_state_no_connection'});\n legendNodes.push({nodeState: NodeState.READ_ONLY, customText: 'node_state_read_only'});\n legendNodes.push({nodeState: NodeState.RESTRICTED, customText: 'node_state_restricted'});\n legendNodes.forEach((node, index) => node.id = index);\n return legendNodes;\n};\n\nconst getLegendLinks = function () {\n const links = [];\n links.push({status: LinkState.IN_SYNC, linkTypeKey: 'link_state_in_sync'});\n links.push({status: LinkState.SYNCING, linkTypeKey: 'link_state_syncing'});\n links.push({status: LinkState.OUT_OF_SYNC, linkTypeKey: 'link_state_out_of_sync'});\n links.forEach((link, index) => link.id = index);\n return links;\n};\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[23,50,86,87],{
|
|
2
|
-
//# sourceMappingURL=23.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[23,50,86,87],{129:function(e,a,n){"use strict";n.r(a);n(4),n(11),n(10),n(82),n(83),n(40),n(253);angular.module("graphdb.framework.namespaces",["LocalStorageModule","xeditable","ngAnimate","ngRoute","toastr","graphdb.framework.namespaces.controllers","graphdb.framework.namespaces.directives","graphdb.framework.core.services.repositories","graphdb.framework.core.directives","graphdb.framework.core.directives.paginations"]).run(["editableOptions",function(e){e.theme="bs3"}])},40:function(e,a){angular.module("graphdb.framework.core.directives.paginations",[]).directive("paginations",(function(){return{template:'<pagination class="nav navbar-right" total-items="matchedElements.length" items-per-page="pageSize" ng-model="page" ng-change="changePagination()" direction-links="false" boundary-links="true" max-size="5" rotate="true"></pagination>'}}))},82:function(e,a,n){"use strict";n.r(a);n(4),n(12),n(10),n(15);const s=angular.module("graphdb.framework.namespaces.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.framework.rest.repositories.service","graphdb.framework.rest.rdf4j.repositories.service","toastr"]),t=function(){const e="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-]|[-]|[⁰-]|[Ⰰ-]|[、-]|[豈-﷏]|[ﷰ-�]",a="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-]|[-]|[⁰-]|[Ⰰ-]|[、-]|[豈-﷏]|[ﷰ-�]|_|-|[0-9]|·|[̀-ͯ]|[‿-⁀]";return new RegExp("^(?:"+e+")(?:(?:"+a+"|\\.)*(?:"+a+"))?$")}();s.controller("NamespacesCtrl",["$scope","$http","$repositories","toastr","$modal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate",function(e,a,n,s,c,r,i,o,p){function l(a,t){let c;c="object"==typeof a?a.prefix:a,o.deleteNamespacePrefix(n.getActiveRepository(),c).success((function(){t&&t.length>0?l(a=t.shift(),t):(e.selectedAll=!1,e.namespace={},e.getNamespaces(),e.searchNamespaces="",e.haveSelected=!1,e.loader=!1,e.displayedNamespaces=[],void 0===t?s.success(p.instant("namespace.prefix.deleted.successfully",{prefix:c}),""):s.success(p.instant("namespace.selected.namespaces.deleted.successfully"),""))})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))}function m(e,a){return function(e){return""===e||e.match(t)}(e)?!angular.isUndefined(a)&&""!==a||(s.error(p.instant("namespace.warning.provide.namespace"),p.instant("common.error")),!1):(s.error(p.instant("namespace.invalid.prefix",{prefix:e},p.instant("common.error"))),!1)}e.namespaces={},e.namespace={},e.loader=!1,e.haveSelected=!1,e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.displayedNamespaces=[],e.getNamespaces=function(){n.getActiveRepository()&&(e.loader=!0,e.namespaces={},o.getNamespaces(n.getActiveRepository()).success((function(a){e.namespaces=a.results.bindings.map((function(e){return{prefix:e.prefix.value,namespace:e.namespace.value}})),e.namespaces.length>0&&(e.namespaces.sort((function(e,a){const n=e.prefix.toUpperCase(),s=a.prefix.toUpperCase();return n<s?-1:n>s?1:0})),e.matchedElements=e.namespaces,e.changePagination()),0===e.namespaces.length&&(e.loader=!1)})).error((function(a){const n=getError(a);s.error(n),e.loader=!1})))},e.changePagination=function(){angular.isDefined(e.namespaces)&&(e.displayedNamespaces=e.namespaces.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){$(".ot-graph-page-size").removeClass("active"),e.page=1,e.searchNamespaces="",a&&(e.getNamespaces(),e.pageSize=a)},e.$watch("matchedElements",(function(){angular.isDefined(e.matchedElements)&&(e.displayedNamespaces=e.matchedElements.slice(e.pageSize*(e.page-1),e.pageSize*e.page))})),e.$watch((function(){return n.getActiveRepository()}),(function(){e.searchNamespaces="",e.getNamespaces(),e.selectedAll=!1})),e.onNamespaceSearch=function(){e.haveSelected=!1,e.selectedAll=!1,e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.namespaces,(function(a){-1===a.namespace.indexOf(e.searchNamespaces)&&-1===a.prefix.indexOf(e.searchNamespaces)||e.matchedElements.push(a)}))},e.saveNamespace=function(a,t){return e.loader=!0,o.updateNamespacePrefix(n.getActiveRepository(),t,a).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.editPrefix=function(a,t){e.loader=!0,i.getPrefix(n.getActiveRepository(),{from:a,to:t,location:n.getActiveRepositoryObject().location}).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const n=getError(a);s.error(n,p.instant("common.error")),e.loader=!1}))},e.confirmReplace=function(e,a){r.openSimpleModal({title:p.instant("namespace.confirm.replace"),message:p.instant("namespace.already.exists.msg"),warning:!0}).result.then(e,a)},e.editPrefixAndNamespace=function(a,n,s){if(angular.isUndefined(a)&&(a=""),!m(a,n))return"";let t=!1;const c=s.prefix;angular.forEach(e.namespaces,(function(e){e.prefix===a&&c!==a&&(t=!0)})),t?e.confirmReplace((function(){e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))}),(function(){e.getNamespaces()})):angular.isDefined(t)&&e.saveNamespace(c,n).then((function(){c!==a&&e.editPrefix(c,a)}))},e.addNamespace=function(){if(angular.isUndefined(e.namespace.prefix)&&(e.namespace.prefix=""),!m(e.namespace.prefix,e.namespace.namespace))return;e.selectedAll=!1;let a=!1;for(let n=0;n<e.namespaces.length;n++)e.namespaces[n].prefix===e.namespace.prefix&&(a=!0);a?e.confirmReplace((function(){e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={}})):(e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace={})},e.removeNamespace=function(e){r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.msg",{prefix:e.prefix}),warning:!0}).result.then((function(){l(e)}))},e.checkAll=function(){angular.forEach(e.displayedNamespaces,(function(a){a.selected=e.selectedAll}))},e.deleteSelected=function(){let a=!1;angular.forEach(e.displayedNamespaces,(function(n){a||n.selected&&(a=!0,r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.selected"),warning:!0}).result.then((function(){e.loader=!0;const a=[];angular.forEach(e.displayedNamespaces,(function(e){e.selected&&a.push(e)})),l(a.shift(),a),e.selectedAll=!1}),(function(){e.getNamespaces(),e.selectedAll=!1,e.searchNamespaces=""})))}))},e.checkIfSelectedNamespace=function(){e.haveSelected=!1,angular.forEach(e.namespaces,(function(a){a.selected&&(e.haveSelected=!0)}))},e.deselectAll=function(){angular.forEach(e.namespaces,(function(e){e.selected=!1}))}}]),s.controller("StandartModalCtrl",["$scope","$modalInstance",function(e,a){e.ok=function(){a.close(!0)},e.cancel=function(){a.dismiss("cancel")}}])},83:function(e,a){angular.module("graphdb.framework.namespaces.directives",["ngRoute"]).directive("loaderPostRepeatDirective",["$timeout",function(e){return function(a){a.$last&&e((function(){a.$parent.loader=!1}),0)}}])}}]);
|
|
2
|
+
//# sourceMappingURL=23.3b94ee5770665e9f7ad6.bundle.js.map
|
package/dist/{23.c1b822e6ccc61632355b.bundle.js.map → 23.3b94ee5770665e9f7ad6.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/namespaces/app.js","webpack:///./src/js/angular/core/directives/paginations.js","webpack:///./src/js/angular/namespaces/controllers.js","webpack:///./src/js/angular/namespaces/directives.js"],"names":["angular","module","run","editableOptions","theme","directive","template","namespaces","pnPrefixRe","pnCharsBase","pnChars","pnCharsU","RegExp","controller","$scope","$http","$repositories","toastr","$modal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate","deleteNamespace","namespace","prefix","deleteNamespacePrefix","getActiveRepository","success","length","shift","selectedAll","getNamespaces","searchNamespaces","haveSelected","loader","displayedNamespaces","undefined","instant","error","data","msg","getError","validatePrefixAndNamespace","match","validatePrefix","isUndefined","pageSizeOptions","page","pageSize","results","bindings","map","e","value","sort","a","b","prefixA","toUpperCase","prefixB","matchedElements","changePagination","isDefined","slice","changePageSize","size","$","removeClass","$watch","onNamespaceSearch","deselectAll","filterResults","forEach","item","indexOf","push","saveNamespace","updateNamespacePrefix","editPrefix","oldPrefix","newPrefix","getPrefix","from","to","location","getActiveRepositoryObject","confirmReplace","okCallback","cancelCallback","openSimpleModal","title","message","warning","result","then","editPrefixAndNamespace","namespaceObject","prefixExist","elem","addNamespace","i","removeNamespace","checkAll","selected","deleteSelected","modalInstanceOpened","checkIfSelectedNamespace","$modalInstance","ok","close","cancel","dismiss","$timeout","scope","$last","$parent"],"mappings":"oGAAA,iDAqBsBA,QAAQC,OAA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AAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACrCA,EAAK8B,WACL1F,EAAOoB,cAAe,OAKlCpB,EAAOyD,YAAc,WACjBvE,QAAQyE,QAAQ3D,EAAOP,YAAY,SAAUmE,GACzCA,EAAK8B,UAAW,SAmBhCjG,EAAWM,WAAW,oBAAqB,CAAC,SAAU,iBAAkB,SAAUC,EAAQ8F,GAEtF9F,EAAO+F,GAAK,WAERD,EAAeE,OADA,IAInBhG,EAAOiG,OAAS,WACZH,EAAeI,QAAQ,e,iBC5VFhH,QAAQC,OAAO,0CAA2C,CAAC,YAGnEI,UAAU,4BAA6B,CAAC,WAAY,SAAU4G,GAC/E,OAAO,SAAUC,GACTA,EAAMC,OAKNF,GAAS,WACLC,EAAME,QAAQjF,QAAS,IACxB","file":"23.c1b822e6ccc61632355b.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/services/repositories.service';\nimport 'angular/namespaces/controllers';\nimport 'angular/namespaces/directives';\nimport 'angular/core/directives/paginations';\nimport 'angular-xeditable/dist/js/xeditable.min';\n\nconst modules = [\n 'LocalStorageModule',\n 'xeditable',\n 'ngAnimate',\n 'ngRoute',\n 'toastr',\n 'graphdb.framework.namespaces.controllers',\n 'graphdb.framework.namespaces.directives',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.core.directives.paginations'\n];\n\nconst namespacesApp = angular.module('graphdb.framework.namespaces', modules);\n\nnamespacesApp.run(['editableOptions', function (editableOptions) {\n editableOptions.theme = 'bs3';\n}]);\n","angular.module('graphdb.framework.core.directives.paginations', [])\n .directive('paginations', function () {\n return {\n template: '<pagination class=\"nav navbar-right\" total-items=\"matchedElements.length\" items-per-page=\"pageSize\" ng-model=\"page\" ng-change=\"changePagination()\" direction-links=\"false\" boundary-links=\"true\" max-size=\"5\" rotate=\"true\"></pagination>',\n };\n });\n","import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/rdf4j.repositories.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.services.jwtauth',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'toastr'\n];\n\nconst namespaces = angular.module('graphdb.framework.namespaces.controllers', modules);\n\n// A regular expression that validates a prefix according to the SPARQL 1.1 specification.\n// XXX: Technically this should include Unicode chars > 0xFFFF but those aren't fully supported in JavaScript\nconst pnPrefixRe = function () {\n const pnCharsBase = '[A-Z]|[a-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]'\n + '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]'\n + '|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\n const pnCharsU = pnCharsBase + '|_';\n const pnChars = pnCharsU + '|-|[0-9]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\n\n return new RegExp('^(?:' + pnCharsBase + ')(?:(?:' + pnChars + '|\\\\.)*(?:' + pnChars + '))?$');\n}();\n\nfunction validatePrefix(prefix) {\n return prefix === '' || prefix.match(pnPrefixRe);\n}\n\nnamespaces.controller('NamespacesCtrl', ['$scope', '$http', '$repositories', 'toastr', '$modal', 'ModalService', 'RepositoriesRestService', 'RDF4JRepositoriesRestService', '$translate',\n function ($scope, $http, $repositories, toastr, $modal, ModalService, RepositoriesRestService, RDF4JRepositoriesRestService, $translate) {\n $scope.namespaces = {};\n $scope.namespace = {};\n $scope.loader = false;\n $scope.haveSelected = false;\n $scope.pageSizeOptions = [10, 20, 50, 100];\n $scope.page = 1;\n $scope.pageSize = $scope.pageSizeOptions[0];\n $scope.displayedNamespaces = [];\n\n $scope.getNamespaces = function () {\n if (!$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.loader = true;\n $scope.namespaces = {};\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n namespace: e.namespace.value\n };\n });\n if ($scope.namespaces.length > 0) {\n $scope.namespaces.sort(function (a, b) {\n const prefixA = a.prefix.toUpperCase(); // ignore upper and lowercase\n const prefixB = b.prefix.toUpperCase(); // ignore upper and lowercase\n if (prefixA < prefixB) {\n return -1;\n }\n if (prefixA > prefixB) {\n return 1;\n }\n return 0;\n });\n $scope.matchedElements = $scope.namespaces;\n $scope.changePagination();\n }\n if ($scope.namespaces.length === 0) {\n // Remove the loader ourselves\n $scope.loader = false;\n } // else let the loaderPostRepeatDirective do it\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg);\n $scope.loader = false;\n });\n };\n\n $scope.changePagination = function () {\n if (angular.isDefined($scope.namespaces)) {\n $scope.displayedNamespaces = $scope.namespaces.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n };\n\n $scope.changePageSize = function (size) {\n $('.ot-graph-page-size').removeClass('active');\n $scope.page = 1;\n $scope.searchNamespaces = '';\n if (size) {\n $scope.getNamespaces();\n $scope.pageSize = size;\n }\n };\n\n $scope.$watch('matchedElements', function () {\n if (angular.isDefined($scope.matchedElements)) {\n $scope.displayedNamespaces = $scope.matchedElements.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n });\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.searchNamespaces = '';\n $scope.getNamespaces();\n $scope.selectedAll = false;\n });\n\n $scope.onNamespaceSearch = function() {\n $scope.haveSelected = false;\n $scope.selectedAll = false;\n $scope.matchedElements = [];\n $scope.deselectAll();\n $scope.filterResults();\n };\n\n $scope.filterResults = function() {\n angular.forEach($scope.namespaces, function (item) {\n if (item.namespace.indexOf($scope.searchNamespaces) !== -1 || item.prefix.indexOf($scope.searchNamespaces) !== -1) {\n $scope.matchedElements.push(item);\n }\n });\n };\n\n $scope.saveNamespace = function (prefix, namespace) {\n $scope.loader = true;\n return RDF4JRepositoriesRestService.updateNamespacePrefix($repositories.getActiveRepository(), namespace, prefix)\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editPrefix = function (oldPrefix, newPrefix) {\n $scope.loader = true;\n RepositoriesRestService.getPrefix($repositories.getActiveRepository(), {\n from: oldPrefix, to: newPrefix, location: $repositories.getActiveRepositoryObject().location})\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.confirmReplace = function (okCallback, cancelCallback) {\n ModalService.openSimpleModal({\n title: $translate.instant('namespace.confirm.replace'),\n message: $translate.instant('namespace.already.exists.msg'),\n warning: true\n }).result.then(okCallback, cancelCallback);\n };\n\n $scope.editPrefixAndNamespace = function (prefix, namespace, namespaceObject) {\n if (angular.isUndefined(prefix)) {\n prefix = '';\n }\n\n if (!validatePrefixAndNamespace(prefix, namespace)) {\n return '';\n }\n\n let prefixExist = false;\n const oldPrefix = namespaceObject.prefix;\n angular.forEach($scope.namespaces, function (elem) {\n if (elem.prefix === prefix && oldPrefix !== prefix) {\n prefixExist = true;\n }\n });\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }, function () {\n $scope.getNamespaces();\n });\n } else if (angular.isDefined(prefixExist)) {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }\n };\n\n $scope.addNamespace = function () {\n if (angular.isUndefined($scope.namespace.prefix)) {\n $scope.namespace.prefix = '';\n }\n\n if (!validatePrefixAndNamespace($scope.namespace.prefix, $scope.namespace.namespace)) {\n return;\n }\n\n $scope.selectedAll = false;\n let prefixExist = false;\n for (let i = 0; i < $scope.namespaces.length; i++) {\n if ($scope.namespaces[i].prefix === $scope.namespace.prefix) {\n prefixExist = true;\n }\n }\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n });\n } else {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n }\n };\n\n $scope.removeNamespace = function (namespace) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.msg', {prefix: namespace.prefix}),\n warning: true\n }).result.then(function () {\n deleteNamespace(namespace);\n });\n };\n\n $scope.checkAll = function () {\n angular.forEach($scope.displayedNamespaces, function (item) {\n item.selected = $scope.selectedAll;\n });\n };\n\n $scope.deleteSelected = function () {\n const openModalInstance = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.selected'),\n warning: true\n }).result.then(function () {\n $scope.loader = true;\n const namespaces = [];\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (namespace.selected) {\n namespaces.push(namespace);\n }\n });\n deleteNamespace(namespaces.shift(), namespaces);\n $scope.selectedAll = false;\n }, function () {\n $scope.getNamespaces();\n $scope.selectedAll = false;\n $scope.searchNamespaces = '';\n });\n };\n\n let modalInstanceOpened = false;\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (!modalInstanceOpened) {\n if (namespace.selected) {\n modalInstanceOpened = true;\n openModalInstance();\n }\n }\n });\n };\n\n function deleteNamespace(namespace, namespaces) {\n let prefix;\n if (typeof namespace === 'object') {\n prefix = namespace.prefix;\n } else {\n prefix = namespace;\n }\n RDF4JRepositoriesRestService.deleteNamespacePrefix($repositories.getActiveRepository(), prefix)\n .success(function () {\n if (namespaces && namespaces.length > 0) {\n namespace = namespaces.shift();\n deleteNamespace(namespace, namespaces);\n } else {\n $scope.selectedAll = false;\n $scope.namespace = {};\n $scope.getNamespaces();\n $scope.searchNamespaces = '';\n $scope.haveSelected = false;\n $scope.loader = false;\n $scope.displayedNamespaces = [];\n if (namespaces === undefined) {\n toastr.success($translate.instant('namespace.prefix.deleted.successfully', {prefix: prefix}), '');\n } else {\n toastr.success($translate.instant('namespace.selected.namespaces.deleted.successfully'), '');\n }\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n $scope.checkIfSelectedNamespace = function () {\n $scope.haveSelected = false;\n angular.forEach($scope.namespaces, function (item) {\n if (item.selected) {\n $scope.haveSelected = true;\n }\n });\n };\n\n $scope.deselectAll = function () {\n angular.forEach($scope.namespaces, function (item) {\n item.selected = false;\n });\n };\n\n function validatePrefixAndNamespace(prefix, namespace) {\n if (!validatePrefix(prefix)) {\n toastr.error($translate.instant('namespace.invalid.prefix', {prefix: prefix}, $translate.instant('common.error')));\n return false;\n }\n\n if (angular.isUndefined(namespace) || namespace === '') {\n toastr.error($translate.instant('namespace.warning.provide.namespace'), $translate.instant('common.error'));\n return false;\n }\n\n return true;\n }\n }]);\n\nnamespaces.controller('StandartModalCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n const result = true;\n $modalInstance.close(result);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n","const namespacesDirectives = angular.module('graphdb.framework.namespaces.directives', ['ngRoute']);\n\n// This directive will set the loader to false once the respective ngRepeat is done loading\nnamespacesDirectives.directive('loaderPostRepeatDirective', ['$timeout', function ($timeout) {\n return function (scope) {\n if (scope.$last) {\n // It's important to do this with timeout:\n // \"...since the setTimeout function gets pushed to the end of the queue of the browser,\n // its always right after everything is done in angular, usually ngRepeat which continues\n // after its parents postLinking function\"\n $timeout(function () {\n scope.$parent.loader = false;\n }, 0);\n }\n };\n}]);\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/namespaces/app.js","webpack:///./src/js/angular/core/directives/paginations.js","webpack:///./src/js/angular/namespaces/controllers.js","webpack:///./src/js/angular/namespaces/directives.js"],"names":["angular","module","run","editableOptions","theme","directive","template","namespaces","pnPrefixRe","pnCharsBase","pnChars","pnCharsU","RegExp","controller","$scope","$http","$repositories","toastr","$modal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate","deleteNamespace","namespace","prefix","deleteNamespacePrefix","getActiveRepository","success","length","shift","selectedAll","getNamespaces","searchNamespaces","haveSelected","loader","displayedNamespaces","undefined","instant","error","data","msg","getError","validatePrefixAndNamespace","match","validatePrefix","isUndefined","pageSizeOptions","page","pageSize","results","bindings","map","e","value","sort","a","b","prefixA","toUpperCase","prefixB","matchedElements","changePagination","isDefined","slice","changePageSize","size","$","removeClass","$watch","onNamespaceSearch","deselectAll","filterResults","forEach","item","indexOf","push","saveNamespace","updateNamespacePrefix","editPrefix","oldPrefix","newPrefix","getPrefix","from","to","location","getActiveRepositoryObject","confirmReplace","okCallback","cancelCallback","openSimpleModal","title","message","warning","result","then","editPrefixAndNamespace","namespaceObject","prefixExist","elem","addNamespace","i","removeNamespace","checkAll","selected","deleteSelected","modalInstanceOpened","checkIfSelectedNamespace","$modalInstance","ok","close","cancel","dismiss","$timeout","scope","$last","$parent"],"mappings":"oGAAA,iDAqBsBA,QAAQC,OAAO,+BAbrB,CACZ,qBACA,YACA,YACA,UACA,SACA,2CACA,0CACA,+CACA,oCACA,kDAKUC,IAAI,CAAC,kBAAmB,SAAUC,GAC5CA,EAAgBC,MAAQ,U,iBCxB5BJ,QAAQC,OAAO,gDAAiD,IAC3DI,UAAU,eAAe,WACtB,MAAO,CACHC,SAAU,iP,gCCHtB,8BAKA,MASMC,EAAaP,QAAQC,OAAO,2CATlB,CACZ,eACA,+CACA,0CACA,8CACA,oD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AAOiG,OAAS,WACZH,EAAeI,QAAQ,e,iBC5VFhH,QAAQC,OAAO,0CAA2C,CAAC,YAGnEI,UAAU,4BAA6B,CAAC,WAAY,SAAU4G,GAC/E,OAAO,SAAUC,GACTA,EAAMC,OAKNF,GAAS,WACLC,EAAME,QAAQjF,QAAS,IACxB","file":"23.3b94ee5770665e9f7ad6.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/core/services/repositories.service';\nimport 'angular/namespaces/controllers';\nimport 'angular/namespaces/directives';\nimport 'angular/core/directives/paginations';\nimport 'angular-xeditable/dist/js/xeditable.min';\n\nconst modules = [\n 'LocalStorageModule',\n 'xeditable',\n 'ngAnimate',\n 'ngRoute',\n 'toastr',\n 'graphdb.framework.namespaces.controllers',\n 'graphdb.framework.namespaces.directives',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives',\n 'graphdb.framework.core.directives.paginations'\n];\n\nconst namespacesApp = angular.module('graphdb.framework.namespaces', modules);\n\nnamespacesApp.run(['editableOptions', function (editableOptions) {\n editableOptions.theme = 'bs3';\n}]);\n","angular.module('graphdb.framework.core.directives.paginations', [])\n .directive('paginations', function () {\n return {\n template: '<pagination class=\"nav navbar-right\" total-items=\"matchedElements.length\" items-per-page=\"pageSize\" ng-model=\"page\" ng-change=\"changePagination()\" direction-links=\"false\" boundary-links=\"true\" max-size=\"5\" rotate=\"true\"></pagination>',\n };\n });\n","import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\nimport 'angular/core/services/repositories.service';\nimport 'angular/rest/rdf4j.repositories.rest.service';\n\nconst modules = [\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.services.jwtauth',\n 'graphdb.framework.rest.repositories.service',\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'toastr'\n];\n\nconst namespaces = angular.module('graphdb.framework.namespaces.controllers', modules);\n\n// A regular expression that validates a prefix according to the SPARQL 1.1 specification.\n// XXX: Technically this should include Unicode chars > 0xFFFF but those aren't fully supported in JavaScript\nconst pnPrefixRe = function () {\n const pnCharsBase = '[A-Z]|[a-z]|[\\u00C0-\\u00D6]|[\\u00D8-\\u00F6]|[\\u00F8-\\u02FF]|[\\u0370-\\u037D]'\n + '|[\\u037F-\\u1FFF]|[\\u200C-\\u200D]|[\\u2070-\\u218F]|[\\u2C00-\\u2FEF]|[\\u3001-\\uD7FF]'\n + '|[\\uF900-\\uFDCF]|[\\uFDF0-\\uFFFD]';\n const pnCharsU = pnCharsBase + '|_';\n const pnChars = pnCharsU + '|-|[0-9]|\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]';\n\n return new RegExp('^(?:' + pnCharsBase + ')(?:(?:' + pnChars + '|\\\\.)*(?:' + pnChars + '))?$');\n}();\n\nfunction validatePrefix(prefix) {\n return prefix === '' || prefix.match(pnPrefixRe);\n}\n\nnamespaces.controller('NamespacesCtrl', ['$scope', '$http', '$repositories', 'toastr', '$modal', 'ModalService', 'RepositoriesRestService', 'RDF4JRepositoriesRestService', '$translate',\n function ($scope, $http, $repositories, toastr, $modal, ModalService, RepositoriesRestService, RDF4JRepositoriesRestService, $translate) {\n $scope.namespaces = {};\n $scope.namespace = {};\n $scope.loader = false;\n $scope.haveSelected = false;\n $scope.pageSizeOptions = [10, 20, 50, 100];\n $scope.page = 1;\n $scope.pageSize = $scope.pageSizeOptions[0];\n $scope.displayedNamespaces = [];\n\n $scope.getNamespaces = function () {\n if (!$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.loader = true;\n $scope.namespaces = {};\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function (data) {\n $scope.namespaces = data.results.bindings.map(function (e) {\n return {\n prefix: e.prefix.value,\n namespace: e.namespace.value\n };\n });\n if ($scope.namespaces.length > 0) {\n $scope.namespaces.sort(function (a, b) {\n const prefixA = a.prefix.toUpperCase(); // ignore upper and lowercase\n const prefixB = b.prefix.toUpperCase(); // ignore upper and lowercase\n if (prefixA < prefixB) {\n return -1;\n }\n if (prefixA > prefixB) {\n return 1;\n }\n return 0;\n });\n $scope.matchedElements = $scope.namespaces;\n $scope.changePagination();\n }\n if ($scope.namespaces.length === 0) {\n // Remove the loader ourselves\n $scope.loader = false;\n } // else let the loaderPostRepeatDirective do it\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg);\n $scope.loader = false;\n });\n };\n\n $scope.changePagination = function () {\n if (angular.isDefined($scope.namespaces)) {\n $scope.displayedNamespaces = $scope.namespaces.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n };\n\n $scope.changePageSize = function (size) {\n $('.ot-graph-page-size').removeClass('active');\n $scope.page = 1;\n $scope.searchNamespaces = '';\n if (size) {\n $scope.getNamespaces();\n $scope.pageSize = size;\n }\n };\n\n $scope.$watch('matchedElements', function () {\n if (angular.isDefined($scope.matchedElements)) {\n $scope.displayedNamespaces = $scope.matchedElements.slice($scope.pageSize * ($scope.page - 1), $scope.pageSize * $scope.page);\n }\n });\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, function () {\n $scope.searchNamespaces = '';\n $scope.getNamespaces();\n $scope.selectedAll = false;\n });\n\n $scope.onNamespaceSearch = function() {\n $scope.haveSelected = false;\n $scope.selectedAll = false;\n $scope.matchedElements = [];\n $scope.deselectAll();\n $scope.filterResults();\n };\n\n $scope.filterResults = function() {\n angular.forEach($scope.namespaces, function (item) {\n if (item.namespace.indexOf($scope.searchNamespaces) !== -1 || item.prefix.indexOf($scope.searchNamespaces) !== -1) {\n $scope.matchedElements.push(item);\n }\n });\n };\n\n $scope.saveNamespace = function (prefix, namespace) {\n $scope.loader = true;\n return RDF4JRepositoriesRestService.updateNamespacePrefix($repositories.getActiveRepository(), namespace, prefix)\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.editPrefix = function (oldPrefix, newPrefix) {\n $scope.loader = true;\n RepositoriesRestService.getPrefix($repositories.getActiveRepository(), {\n from: oldPrefix, to: newPrefix, location: $repositories.getActiveRepositoryObject().location})\n .success(function () {\n $scope.getNamespaces();\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n };\n\n $scope.confirmReplace = function (okCallback, cancelCallback) {\n ModalService.openSimpleModal({\n title: $translate.instant('namespace.confirm.replace'),\n message: $translate.instant('namespace.already.exists.msg'),\n warning: true\n }).result.then(okCallback, cancelCallback);\n };\n\n $scope.editPrefixAndNamespace = function (prefix, namespace, namespaceObject) {\n if (angular.isUndefined(prefix)) {\n prefix = '';\n }\n\n if (!validatePrefixAndNamespace(prefix, namespace)) {\n return '';\n }\n\n let prefixExist = false;\n const oldPrefix = namespaceObject.prefix;\n angular.forEach($scope.namespaces, function (elem) {\n if (elem.prefix === prefix && oldPrefix !== prefix) {\n prefixExist = true;\n }\n });\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }, function () {\n $scope.getNamespaces();\n });\n } else if (angular.isDefined(prefixExist)) {\n $scope.saveNamespace(oldPrefix, namespace).then(function () {\n if (oldPrefix !== prefix) {\n $scope.editPrefix(oldPrefix, prefix);\n }\n });\n }\n };\n\n $scope.addNamespace = function () {\n if (angular.isUndefined($scope.namespace.prefix)) {\n $scope.namespace.prefix = '';\n }\n\n if (!validatePrefixAndNamespace($scope.namespace.prefix, $scope.namespace.namespace)) {\n return;\n }\n\n $scope.selectedAll = false;\n let prefixExist = false;\n for (let i = 0; i < $scope.namespaces.length; i++) {\n if ($scope.namespaces[i].prefix === $scope.namespace.prefix) {\n prefixExist = true;\n }\n }\n if (prefixExist) {\n $scope.confirmReplace(function () {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n });\n } else {\n $scope.saveNamespace($scope.namespace.prefix, $scope.namespace.namespace);\n $scope.namespace = {};\n }\n };\n\n $scope.removeNamespace = function (namespace) {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.msg', {prefix: namespace.prefix}),\n warning: true\n }).result.then(function () {\n deleteNamespace(namespace);\n });\n };\n\n $scope.checkAll = function () {\n angular.forEach($scope.displayedNamespaces, function (item) {\n item.selected = $scope.selectedAll;\n });\n };\n\n $scope.deleteSelected = function () {\n const openModalInstance = function () {\n ModalService.openSimpleModal({\n title: $translate.instant('common.confirm.delete'),\n message: $translate.instant('namespace.warning.delete.selected'),\n warning: true\n }).result.then(function () {\n $scope.loader = true;\n const namespaces = [];\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (namespace.selected) {\n namespaces.push(namespace);\n }\n });\n deleteNamespace(namespaces.shift(), namespaces);\n $scope.selectedAll = false;\n }, function () {\n $scope.getNamespaces();\n $scope.selectedAll = false;\n $scope.searchNamespaces = '';\n });\n };\n\n let modalInstanceOpened = false;\n angular.forEach($scope.displayedNamespaces, function (namespace) {\n if (!modalInstanceOpened) {\n if (namespace.selected) {\n modalInstanceOpened = true;\n openModalInstance();\n }\n }\n });\n };\n\n function deleteNamespace(namespace, namespaces) {\n let prefix;\n if (typeof namespace === 'object') {\n prefix = namespace.prefix;\n } else {\n prefix = namespace;\n }\n RDF4JRepositoriesRestService.deleteNamespacePrefix($repositories.getActiveRepository(), prefix)\n .success(function () {\n if (namespaces && namespaces.length > 0) {\n namespace = namespaces.shift();\n deleteNamespace(namespace, namespaces);\n } else {\n $scope.selectedAll = false;\n $scope.namespace = {};\n $scope.getNamespaces();\n $scope.searchNamespaces = '';\n $scope.haveSelected = false;\n $scope.loader = false;\n $scope.displayedNamespaces = [];\n if (namespaces === undefined) {\n toastr.success($translate.instant('namespace.prefix.deleted.successfully', {prefix: prefix}), '');\n } else {\n toastr.success($translate.instant('namespace.selected.namespaces.deleted.successfully'), '');\n }\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n $scope.checkIfSelectedNamespace = function () {\n $scope.haveSelected = false;\n angular.forEach($scope.namespaces, function (item) {\n if (item.selected) {\n $scope.haveSelected = true;\n }\n });\n };\n\n $scope.deselectAll = function () {\n angular.forEach($scope.namespaces, function (item) {\n item.selected = false;\n });\n };\n\n function validatePrefixAndNamespace(prefix, namespace) {\n if (!validatePrefix(prefix)) {\n toastr.error($translate.instant('namespace.invalid.prefix', {prefix: prefix}, $translate.instant('common.error')));\n return false;\n }\n\n if (angular.isUndefined(namespace) || namespace === '') {\n toastr.error($translate.instant('namespace.warning.provide.namespace'), $translate.instant('common.error'));\n return false;\n }\n\n return true;\n }\n }]);\n\nnamespaces.controller('StandartModalCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n const result = true;\n $modalInstance.close(result);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n","const namespacesDirectives = angular.module('graphdb.framework.namespaces.directives', ['ngRoute']);\n\n// This directive will set the loader to false once the respective ngRepeat is done loading\nnamespacesDirectives.directive('loaderPostRepeatDirective', ['$timeout', function ($timeout) {\n return function (scope) {\n if (scope.$last) {\n // It's important to do this with timeout:\n // \"...since the setTimeout function gets pushed to the end of the queue of the browser,\n // its always right after everything is done in angular, usually ngRepeat which continues\n // after its parents postLinking function\"\n $timeout(function () {\n scope.$parent.loader = false;\n }, 0);\n }\n };\n}]);\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[25,35,58,102],{106:function(n,e,t){"use strict";t.r(e);t(4),t(11),t(16),t(41),t(61);angular.module("graphdb.framework.externalsync",["graphdb.framework.core.controllers","graphdb.framework.externalsync.controllers","graphdb.framework.externalsync.directives","graphdb.framework.core.directives"]).filter("singular",(function(){return function(n){return angular.isUndefined(n)?n:n.replace(/ies$/,"y").replace(/s$/,"")}}))},39:function(n,e){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",t),t.$inject=["$http"];function t(n){return{getConnectors:function(){return n.get("rest/connectors")},initConnector:function(e){return n.get("rest/connectors/options?prefix="+e)},hasConnector:function(e){return n.get("rest/connectors/existing?prefix="+e)},checkConnector:function(e){return n.post("rest/connectors/check",e,{headers:{"Content-Type":"text/plain"}})}}}},41:function(n,e,t){"use strict";t.r(e);t(15),t(39);function o(n){const e=[];return Object.keys(n).forEach((function(t){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]))})),e.join("&")}function r(n,e){return _.reduce(n,(function(n,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(e.instant("externalsync.empty.value.key.error",{value:t.value}));if(n.hasOwnProperty(t.key))throw new Error(e.instant("externalsync.duplicate.key.error",{key:t.key}));n[t.key]=t.value}return n}),{})}function i(n,e){for(let o=0;o<e.length;o++){const r=e[o];if("StringArray"===r.__type)n[r.__name]||(n[r.__name]=[""]);else if("OptionArray"===r.__type)if(n[r.__name])for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];if("Boolean"===t.__type)for(let e=0;e<n[r.__name].length;e++){const o=n[r.__name][e];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{n[r.__name]=[];const e={};for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];"StringArray"===t.__type?e[t.__name]=[""]:e[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}n[r.__name].push(e)}else"Map"===r.__type?n[r.__name]?n[r.__name]=(t=n[r.__name],_.map(t,(function(n,e){return{key:e,value:n}}))):n[r.__name]=[]:"JsonString"===r.__type?!n[r.__name]||n[r.__name]instanceof String||"string"==typeof n[r.__name]||(n[r.__name]=angular.toJson(n[r.__name],2)):angular.isUndefined(n[r.__name])&&(n[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return n}function a(n,e,t){return n.post("repositories/"+e,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function c(n){return n.substring(0,n.length-1)+"/instance#"}function s(n,e,t,o,i){const a=function n(e,t){const o={};return _.each(t,(function(t){angular.isDefined(e[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(e[t.__name],(function(e){o[t.__name].push(n(e,t.__childOptions))}))):o[t.__name]=angular.copy(e[t.__name]))})),o}(t,o);for(let n=0;n<o.length;n++)try{"Map"===o[n].__type?a[o[n].__name]=r(a[o[n].__name],$translate):"JsonString"===o[n].__type&&(a[o[n].__name]=angular.fromJson(a[o[n].__name]))}catch(e){return i(o[n].__label,e.message),null}!function n(e){Array.isArray(e)&&(e=_.filter(e,(function(n){return null!==n&&(!n.trim||""!==n.trim())})));return Object.keys(e).forEach((function(t){""!==e[t]&&null!=e[t]||!1===e[t]?"object"==typeof e[t]&&(e[t]=n(e[t])):delete e[t]})),e}(a);let s="";s+="PREFIX :<"+e+">\n";return s+="PREFIX inst:<"+c(e)+">\n",s+="INSERT DATA {\n",s+="\tinst:"+n+" :createConnector '''\n",s+=angular.toJson(a,2),s+="\n''' .\n}\n",s=s.replace(/\\/g,"\\\\\\"),s}function l(n,e,t,r,l,u,f,p,g,d){function m(e){n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e?d.instant("externalsync.repairing"):d.instant("externalsync.creating"),waitOnRepairStartOnce:!!e,eta:"-",inline:!1,iri:null}}function y(e,t,o){return m(o),$.extend(n.beingBuiltConnector,{iri:c(e)+t,name:t,inline:!1,doneCallback:function(){n.beingBuiltConnector.modalInstance.dismiss("cancel")}}),n.beingBuiltConnector.modalInstance=r.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n}),n.beingBuiltConnector.modalInstance}function C(e,r,i){const a=y(e.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))})),l.success(d.instant("created.connector",{name:r.name}))}),(function(n){l.error(getError(n)),i()})).finally((function(){a.dismiss("cancel")}))}n.loader=!1,n.controllers=[],n.existing={},n.definitions={},n.getLoaderMessage=function(){const e=(Date.now()-n.loaderStartTime)/1e3,t=n.getHumanReadableSeconds(e);let o="";return o=n.progressMessage?n.progressMessage+"... "+t:d.instant("common.running.operation",{timeHuman:t}),n.extraMessage&&e>10&&(o+="\n"+n.extraMessage),o},n.setLoader=function(e,t,o){e?(n.loader=!0,n.loaderStartTime=Date.now(),n.progressMessage=t,n.extraMessage=o):(n.loader=!1,n.progressMessage="",n.extraMessage="")},n.initConnector=function(e){return g.initConnector(encodeURIComponent(e.value)).then((function(t){return n.definitions[e.key]=t.data,g.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))}))},n.getConnectors=function(){n.isLicenseValid()&&n.canWriteActiveRepo()&&(n.setLoader(!0,d.instant("externalsync.fetching.connectors"),d.instant("common.extra.message")),g.getConnectors().then((function(o){n.connectors=Object.keys(o.data).map((function(n){return{key:n,value:o.data[n]}})),f.all(_.map(n.connectors,(function(e){return n.initConnector(e)}))).finally((function(){m();const o=function(n){const e=_.map(n,(function(n){return"<"+n.value+"connectorStatus>"})).join("|");return e?"SELECT ?connector ?status { ?connector "+e+" ?status }":null}(n.connectors);o?function(n){return a(e,t.getActiveRepository(),n)}(o).then((function(e){const t=function(n){if(n.bindings)for(let e=0;e<n.bindings.length;e++)try{const t=JSON.parse(n.bindings[e].status.value);if("BUILDING"===t.status)return{connector:n.bindings[e].connector.value,status:t}}catch(n){console.error(n)}return{}}(e.data.results);if(t.connector){const e=t.connector.split(/#/);e[0]=e[0].replace(/\/instance$/,"#"),o=e[0],r=e[1],m(),$.extend(n.beingBuiltConnector,{iri:c(o)+r,name:r,inline:!0,doneCallback:function(){n.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){n.setLoader(!1)})):n.setLoader(!1)}))})).catch((function(e){n.setLoader(!1),l.error(getError(e),d.instant("externalsync.could.not.get.connectors.error"))})),n.existing={})},n.getOptions=function(e){return n.definitions[e.key]},n.isEmpty=function(n){return angular.isObject(n)&&0===Object.keys(n).length},n.toPrettyJson=function(n){return angular.toJson(n,2)},n.$watch((function(){return t.getActiveRepository()}),n.getConnectors),n.$watch((function(){return t.getActiveLocation()}),n.getConnectors),n.copyConnector=function(e,t){let o;angular.isUndefined(t)||(o=angular.copy(t),o.name=o.name+"-copy");r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.newConnector=function(e,t){r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.repair=function(e,r){u.openSimpleModal({title:d.instant("externalsync.confirm.repair"),message:d.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const i=y(r.value,e.name,!0),a=(s=e.name,"PREFIX prefix:<"+(u=r.value)+">\nINSERT DATA {\n\t<"+c(u)+s+'> prefix:repairConnector ""\n}');var s,u;p.addStatements(t.getActiveRepository(),o({update:a})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(r.value)).then((function(e){n.existing[r.key]=e.data}))})),l.success(d.instant("externalsync.repair.success.msg",{name:e.name}))}),(function(n){l.error(getError(n))})).finally((function(){i.dismiss("cancel")}))}))},n.delete=function(e,i){const a=i.key.indexOf("Elastic")>=0||i.key.indexOf("Solr")>=0;r.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return a?d.instant("delete.connector.conditional",{type:i.key}):""}}}).result.then((function(r){n.setLoader(!0,d.instant("externalsync.delete.progress.msg",{name:e.name}),d.instant("externalsync.extra.message.warning"));const c=function(n,e,t){const o=e.substring(0,e.length-1)+"/instance#";return"PREFIX prefix:<"+e+">\nINSERT DATA {\n\t<"+o+n+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(e.name,i.value,r);p.addStatements(t.getActiveRepository(),o({update:c})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(i.value)).then((function(e){n.existing[i.key]=e.data}))})),r?(l.success(d.instant("externalsync.delete.force.success.msg",{name:e.name})),a&&l.warning(d.instant("externalsync.delete.remote.warning",{key:i.key}))):l.success(d.instant("externalsync.delete.success.msg",{name:e.name}))}),(function(n){l.error(getError(n))})).finally((function(){n.setLoader(!1)}))}))},n.viewQuery=function(e,t){r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=n.getOptions(e);return s(t.name,e.value,i(t.values,o),o)}}})}}function u(n,e,t){n.force=!1,n.popoverMsg=t,n.ok=function(){e.close(n.force)},n.cancel=function(){e.dismiss()}}function f(n,e,t,o,r){function i(){return s(n.name,t.value,n.values,n.options,(function(n,e){r.error(e,n)}))}n.connector=t,n.addField=function(e,t){const o=angular.copy(n.defaultValues[t][0]);n.values[t].splice(e+1,0,o)},n.addOption=function(n,e){e.splice(n+1,0,"")},n.deleteOption=function(n,e){e.splice(n,1)},n.addMapOption=function(n,e){e.splice(n+1,0,{key:"",value:""})},n.deleteMapOption=function(n,e){e.splice(n,1)},n.ok=function(){if(n.form.$valid){const t=i();t&&e.close({name:n.name,values:n.values,options:n.options,query:t})}},n.viewQuery=function(){const n=i();n&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return n}}})},n.cancel=function(){e.dismiss("cancel")}}function p(n,e,t,o,r,a,c,s){angular.extend(this,e("ExtendNewConnectorCtrl",{$scope:n,$modalInstance:o,connector:r,$modal:a})),n.values=c.values,n.options=s,n.name=c.name,c.skipConversion||(n.values=i(n.values,n.options)),n.defaultValues=angular.copy(n.values)}function g(n,e,t,o,r){function i(){const i=function(n){const e=n.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+n+"> <"+e+"> ?status",t+="\n}",t}(n.beingBuiltConnector.iri);n.beingBuiltConnector.iri=null,n.progressInterval=e((function(){(function(n){return a(t,o.getActiveRepository(),n)})(i).then((function(t){const o=function(n){if(n.bindings&&n.bindings.length>0)try{return JSON.parse(n.bindings[0].status.value)}catch(n){console.error(n)}return{}}(t.data.results);"BUILDING"===o.status?(n.beingBuiltConnector.status=o,n.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),n.beingBuiltConnector.eta=n.getHumanReadableSeconds(o.etaSeconds),n.beingBuiltConnector.actionName=o.repair?r.instant("externalsync.repairing"):r.instant("externalsync.creating"),n.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||n.beingBuiltConnector.waitOnRepairStartOnce||(e.cancel(n.progressInterval),n.beingBuiltConnector.doneCallback&&n.beingBuiltConnector.doneCallback())}))}),1e3),n.$on("$destroy",(function(){e.cancel(n.progressInterval)}))}n.beingBuiltConnector=n.beingBuiltConnector||{},!n.beingBuiltConnector.inline&&n.beingBuiltConnector.iri&&i(),n.$watch("beingBuiltConnector.iri",(function(e){n.beingBuiltConnector.inline&&e&&i()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",l).controller("ExtendNewConnectorCtrl",f).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",g).controller("DeleteConnectorCtrl",u).filter("ceil",(function(){return function(n){return Math.ceil(n)}})),l.$inject=["$scope","$http","$repositories","$modal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],u.$inject=["$scope","$modalInstance","popoverMsg"],f.$inject=["$scope","$modalInstance","connector","$modal","toastr"],p.$inject=["$scope","$controller","$http","$modalInstance","connector","$modal","values","options"],g.$inject=["$scope","$interval","$http","$repositories","$translate"]},61:function(n,e,t){"use strict";t.r(e);t(4);angular.module("graphdb.framework.externalsync.directives",[]).directive("createProgress",(function(){return{templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",restrict:"EA"}}))}}]);
|
|
2
|
-
//# sourceMappingURL=25.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[25,35,58,102],{107:function(n,e,t){"use strict";t.r(e);t(4),t(11),t(16),t(41),t(61);angular.module("graphdb.framework.externalsync",["graphdb.framework.core.controllers","graphdb.framework.externalsync.controllers","graphdb.framework.externalsync.directives","graphdb.framework.core.directives"]).filter("singular",(function(){return function(n){return angular.isUndefined(n)?n:n.replace(/ies$/,"y").replace(/s$/,"")}}))},39:function(n,e){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",t),t.$inject=["$http"];function t(n){return{getConnectors:function(){return n.get("rest/connectors")},initConnector:function(e){return n.get("rest/connectors/options?prefix="+e)},hasConnector:function(e){return n.get("rest/connectors/existing?prefix="+e)},checkConnector:function(e){return n.post("rest/connectors/check",e,{headers:{"Content-Type":"text/plain"}})}}}},41:function(n,e,t){"use strict";t.r(e);t(15),t(39);function o(n){const e=[];return Object.keys(n).forEach((function(t){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]))})),e.join("&")}function r(n,e){return _.reduce(n,(function(n,t){if(""===t.key&&""===t.value);else{if(""===t.key)throw new Error(e.instant("externalsync.empty.value.key.error",{value:t.value}));if(n.hasOwnProperty(t.key))throw new Error(e.instant("externalsync.duplicate.key.error",{key:t.key}));n[t.key]=t.value}return n}),{})}function i(n,e){for(let o=0;o<e.length;o++){const r=e[o];if("StringArray"===r.__type)n[r.__name]||(n[r.__name]=[""]);else if("OptionArray"===r.__type)if(n[r.__name])for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];if("Boolean"===t.__type)for(let e=0;e<n[r.__name].length;e++){const o=n[r.__name][e];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{n[r.__name]=[];const e={};for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];"StringArray"===t.__type?e[t.__name]=[""]:e[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}n[r.__name].push(e)}else"Map"===r.__type?n[r.__name]?n[r.__name]=(t=n[r.__name],_.map(t,(function(n,e){return{key:e,value:n}}))):n[r.__name]=[]:"JsonString"===r.__type?!n[r.__name]||n[r.__name]instanceof String||"string"==typeof n[r.__name]||(n[r.__name]=angular.toJson(n[r.__name],2)):angular.isUndefined(n[r.__name])&&(n[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return n}function a(n,e,t){return n.post("repositories/"+e,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function c(n){return n.substring(0,n.length-1)+"/instance#"}function s(n,e,t,o,i){const a=function n(e,t){const o={};return _.each(t,(function(t){angular.isDefined(e[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(e[t.__name],(function(e){o[t.__name].push(n(e,t.__childOptions))}))):o[t.__name]=angular.copy(e[t.__name]))})),o}(t,o);for(let n=0;n<o.length;n++)try{"Map"===o[n].__type?a[o[n].__name]=r(a[o[n].__name],$translate):"JsonString"===o[n].__type&&(a[o[n].__name]=angular.fromJson(a[o[n].__name]))}catch(e){return i(o[n].__label,e.message),null}!function n(e){Array.isArray(e)&&(e=_.filter(e,(function(n){return null!==n&&(!n.trim||""!==n.trim())})));return Object.keys(e).forEach((function(t){""!==e[t]&&null!=e[t]||!1===e[t]?"object"==typeof e[t]&&(e[t]=n(e[t])):delete e[t]})),e}(a);let s="";s+="PREFIX :<"+e+">\n";return s+="PREFIX inst:<"+c(e)+">\n",s+="INSERT DATA {\n",s+="\tinst:"+n+" :createConnector '''\n",s+=angular.toJson(a,2),s+="\n''' .\n}\n",s=s.replace(/\\/g,"\\\\\\"),s}function l(n,e,t,r,l,u,f,p,g,d){function m(e){n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e?d.instant("externalsync.repairing"):d.instant("externalsync.creating"),waitOnRepairStartOnce:!!e,eta:"-",inline:!1,iri:null}}function y(e,t,o){return m(o),$.extend(n.beingBuiltConnector,{iri:c(e)+t,name:t,inline:!1,doneCallback:function(){n.beingBuiltConnector.modalInstance.dismiss("cancel")}}),n.beingBuiltConnector.modalInstance=r.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n}),n.beingBuiltConnector.modalInstance}function C(e,r,i){const a=y(e.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))})),l.success(d.instant("created.connector",{name:r.name}))}),(function(n){l.error(getError(n)),i()})).finally((function(){a.dismiss("cancel")}))}n.loader=!1,n.controllers=[],n.existing={},n.definitions={},n.getLoaderMessage=function(){const e=(Date.now()-n.loaderStartTime)/1e3,t=n.getHumanReadableSeconds(e);let o="";return o=n.progressMessage?n.progressMessage+"... "+t:d.instant("common.running.operation",{timeHuman:t}),n.extraMessage&&e>10&&(o+="\n"+n.extraMessage),o},n.setLoader=function(e,t,o){e?(n.loader=!0,n.loaderStartTime=Date.now(),n.progressMessage=t,n.extraMessage=o):(n.loader=!1,n.progressMessage="",n.extraMessage="")},n.initConnector=function(e){return g.initConnector(encodeURIComponent(e.value)).then((function(t){return n.definitions[e.key]=t.data,g.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))}))},n.getConnectors=function(){n.isLicenseValid()&&n.canWriteActiveRepo()&&(n.setLoader(!0,d.instant("externalsync.fetching.connectors"),d.instant("common.extra.message")),g.getConnectors().then((function(o){n.connectors=Object.keys(o.data).map((function(n){return{key:n,value:o.data[n]}})),f.all(_.map(n.connectors,(function(e){return n.initConnector(e)}))).finally((function(){m();const o=function(n){const e=_.map(n,(function(n){return"<"+n.value+"connectorStatus>"})).join("|");return e?"SELECT ?connector ?status { ?connector "+e+" ?status }":null}(n.connectors);o?function(n){return a(e,t.getActiveRepository(),n)}(o).then((function(e){const t=function(n){if(n.bindings)for(let e=0;e<n.bindings.length;e++)try{const t=JSON.parse(n.bindings[e].status.value);if("BUILDING"===t.status)return{connector:n.bindings[e].connector.value,status:t}}catch(n){console.error(n)}return{}}(e.data.results);if(t.connector){const e=t.connector.split(/#/);e[0]=e[0].replace(/\/instance$/,"#"),o=e[0],r=e[1],m(),$.extend(n.beingBuiltConnector,{iri:c(o)+r,name:r,inline:!0,doneCallback:function(){n.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){n.setLoader(!1)})):n.setLoader(!1)}))})).catch((function(e){n.setLoader(!1),l.error(getError(e),d.instant("externalsync.could.not.get.connectors.error"))})),n.existing={})},n.getOptions=function(e){return n.definitions[e.key]},n.isEmpty=function(n){return angular.isObject(n)&&0===Object.keys(n).length},n.toPrettyJson=function(n){return angular.toJson(n,2)},n.$watch((function(){return t.getActiveRepository()}),n.getConnectors),n.$watch((function(){return t.getActiveLocation()}),n.getConnectors),n.copyConnector=function(e,t){let o;angular.isUndefined(t)||(o=angular.copy(t),o.name=o.name+"-copy");r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.newConnector=function(e,t){r.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.repair=function(e,r){u.openSimpleModal({title:d.instant("externalsync.confirm.repair"),message:d.instant("externalsync.repair.warning.msg"),warning:!0}).result.then((function(){const i=y(r.value,e.name,!0),a=(s=e.name,"PREFIX prefix:<"+(u=r.value)+">\nINSERT DATA {\n\t<"+c(u)+s+'> prefix:repairConnector ""\n}');var s,u;p.addStatements(t.getActiveRepository(),o({update:a})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(r.value)).then((function(e){n.existing[r.key]=e.data}))})),l.success(d.instant("externalsync.repair.success.msg",{name:e.name}))}),(function(n){l.error(getError(n))})).finally((function(){i.dismiss("cancel")}))}))},n.delete=function(e,i){const a=i.key.indexOf("Elastic")>=0||i.key.indexOf("Solr")>=0;r.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{popoverMsg:function(){return a?d.instant("delete.connector.conditional",{type:i.key}):""}}}).result.then((function(r){n.setLoader(!0,d.instant("externalsync.delete.progress.msg",{name:e.name}),d.instant("externalsync.extra.message.warning"));const c=function(n,e,t){const o=e.substring(0,e.length-1)+"/instance#";return"PREFIX prefix:<"+e+">\nINSERT DATA {\n\t<"+o+n+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(e.name,i.value,r);p.addStatements(t.getActiveRepository(),o({update:c})).then((function(){g.getConnectors().then((function(){g.hasConnector(encodeURIComponent(i.value)).then((function(e){n.existing[i.key]=e.data}))})),r?(l.success(d.instant("externalsync.delete.force.success.msg",{name:e.name})),a&&l.warning(d.instant("externalsync.delete.remote.warning",{key:i.key}))):l.success(d.instant("externalsync.delete.success.msg",{name:e.name}))}),(function(n){l.error(getError(n))})).finally((function(){n.setLoader(!1)}))}))},n.viewQuery=function(e,t){r.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=n.getOptions(e);return s(t.name,e.value,i(t.values,o),o)}}})}}function u(n,e,t){n.force=!1,n.popoverMsg=t,n.ok=function(){e.close(n.force)},n.cancel=function(){e.dismiss()}}function f(n,e,t,o,r){function i(){return s(n.name,t.value,n.values,n.options,(function(n,e){r.error(e,n)}))}n.connector=t,n.addField=function(e,t){const o=angular.copy(n.defaultValues[t][0]);n.values[t].splice(e+1,0,o)},n.addOption=function(n,e){e.splice(n+1,0,"")},n.deleteOption=function(n,e){e.splice(n,1)},n.addMapOption=function(n,e){e.splice(n+1,0,{key:"",value:""})},n.deleteMapOption=function(n,e){e.splice(n,1)},n.ok=function(){if(n.form.$valid){const t=i();t&&e.close({name:n.name,values:n.values,options:n.options,query:t})}},n.viewQuery=function(){const n=i();n&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return n}}})},n.cancel=function(){e.dismiss("cancel")}}function p(n,e,t,o,r,a,c,s){angular.extend(this,e("ExtendNewConnectorCtrl",{$scope:n,$modalInstance:o,connector:r,$modal:a})),n.values=c.values,n.options=s,n.name=c.name,c.skipConversion||(n.values=i(n.values,n.options)),n.defaultValues=angular.copy(n.values)}function g(n,e,t,o,r){function i(){const i=function(n){const e=n.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+n+"> <"+e+"> ?status",t+="\n}",t}(n.beingBuiltConnector.iri);n.beingBuiltConnector.iri=null,n.progressInterval=e((function(){(function(n){return a(t,o.getActiveRepository(),n)})(i).then((function(t){const o=function(n){if(n.bindings&&n.bindings.length>0)try{return JSON.parse(n.bindings[0].status.value)}catch(n){console.error(n)}return{}}(t.data.results);"BUILDING"===o.status?(n.beingBuiltConnector.status=o,n.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),n.beingBuiltConnector.eta=n.getHumanReadableSeconds(o.etaSeconds),n.beingBuiltConnector.actionName=o.repair?r.instant("externalsync.repairing"):r.instant("externalsync.creating"),n.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||n.beingBuiltConnector.waitOnRepairStartOnce||(e.cancel(n.progressInterval),n.beingBuiltConnector.doneCallback&&n.beingBuiltConnector.doneCallback())}))}),1e3),n.$on("$destroy",(function(){e.cancel(n.progressInterval)}))}n.beingBuiltConnector=n.beingBuiltConnector||{},!n.beingBuiltConnector.inline&&n.beingBuiltConnector.iri&&i(),n.$watch("beingBuiltConnector.iri",(function(e){n.beingBuiltConnector.inline&&e&&i()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",l).controller("ExtendNewConnectorCtrl",f).controller("CreateConnectorCtrl",p).controller("CreateProgressCtrl",g).controller("DeleteConnectorCtrl",u).filter("ceil",(function(){return function(n){return Math.ceil(n)}})),l.$inject=["$scope","$http","$repositories","$modal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService","$translate"],u.$inject=["$scope","$modalInstance","popoverMsg"],f.$inject=["$scope","$modalInstance","connector","$modal","toastr"],p.$inject=["$scope","$controller","$http","$modalInstance","connector","$modal","values","options"],g.$inject=["$scope","$interval","$http","$repositories","$translate"]},61:function(n,e,t){"use strict";t.r(e);t(4);angular.module("graphdb.framework.externalsync.directives",[]).directive("createProgress",(function(){return{templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",restrict:"EA"}}))}}]);
|
|
2
|
+
//# sourceMappingURL=25.7d9b6d389e1b3c30a2af.bundle.js.map
|