graphdb-workbench 2.0.0-TR5 → 2.0.0-TR9
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/README.md +6 -1
- package/dist/{0.21974a2453b9a92dec33.bundle.js → 0.965871b861f4dddbba56.bundle.js} +3 -3
- package/dist/0.965871b861f4dddbba56.bundle.js.map +1 -0
- package/dist/{112.b871480dd961ac3c18b6.bundle.js → 112.0c1bdd906ac321ffbf5f.bundle.js} +2 -2
- package/dist/{112.b871480dd961ac3c18b6.bundle.js.map → 112.0c1bdd906ac321ffbf5f.bundle.js.map} +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js.map +1 -1
- package/dist/{12.449fb5148a68a44ba324.bundle.js → 12.5d4da897bdd91e8808fa.bundle.js} +2 -2
- package/dist/12.5d4da897bdd91e8808fa.bundle.js.map +1 -0
- package/dist/13.f62fa8acc6e68826e07a.bundle.js +4 -0
- package/dist/13.f62fa8acc6e68826e07a.bundle.js.map +1 -0
- package/dist/14.349458c1675f763995a5.bundle.js +2 -0
- package/dist/14.349458c1675f763995a5.bundle.js.map +1 -0
- package/dist/15.ebce70c05fd90026747b.bundle.js +2 -0
- package/dist/15.ebce70c05fd90026747b.bundle.js.map +1 -0
- package/dist/{17.4b048ae019a8d2fd5b46.bundle.js → 17.f01afdf3b3892d73a3fe.bundle.js} +2 -2
- package/dist/17.f01afdf3b3892d73a3fe.bundle.js.map +1 -0
- package/dist/{18.5514f95535bdd2a71d6e.bundle.js → 18.10f65755b64a6534289e.bundle.js} +2 -2
- package/dist/{18.5514f95535bdd2a71d6e.bundle.js.map → 18.10f65755b64a6534289e.bundle.js.map} +1 -1
- package/dist/{21.e75213686a349ae7df89.bundle.js → 21.b6bf0d54a846411501c7.bundle.js} +2 -2
- package/dist/{21.e75213686a349ae7df89.bundle.js.map → 21.b6bf0d54a846411501c7.bundle.js.map} +1 -1
- package/dist/22.e8167eba683605211409.bundle.js +2 -0
- package/dist/22.e8167eba683605211409.bundle.js.map +1 -0
- package/dist/{23.32f2701680565c5d107b.bundle.js → 23.e3ca5b7bb2cee4f9467f.bundle.js} +3 -3
- package/dist/{23.32f2701680565c5d107b.bundle.js.map → 23.e3ca5b7bb2cee4f9467f.bundle.js.map} +1 -1
- package/dist/{24.8dd957168a8be963b393.bundle.js → 24.d5ea0f435b896dc12709.bundle.js} +2 -2
- package/dist/{24.8dd957168a8be963b393.bundle.js.map → 24.d5ea0f435b896dc12709.bundle.js.map} +1 -1
- package/dist/25.5b3feb79a7be0ca1f4ad.bundle.js +2 -0
- package/dist/25.5b3feb79a7be0ca1f4ad.bundle.js.map +1 -0
- package/dist/26.c4983d9f3009f41beb11.bundle.js +2 -0
- package/dist/26.c4983d9f3009f41beb11.bundle.js.map +1 -0
- package/dist/27.04085d1d15db39ca4a36.bundle.js +2 -0
- package/dist/27.04085d1d15db39ca4a36.bundle.js.map +1 -0
- package/dist/{28.b1c15ce7633c501836c5.bundle.js → 28.57b84065ebe40bb45f72.bundle.js} +2 -2
- package/dist/{28.b1c15ce7633c501836c5.bundle.js.map → 28.57b84065ebe40bb45f72.bundle.js.map} +1 -1
- package/dist/{29.66259b8a21bbb5431a06.bundle.js → 29.959ae6b366d15d0ddea9.bundle.js} +2 -2
- package/dist/{29.66259b8a21bbb5431a06.bundle.js.map → 29.959ae6b366d15d0ddea9.bundle.js.map} +1 -1
- package/dist/{3.9eb2c7cced9d8b971c99.bundle.js → 3.26d967229917c7c5cdfb.bundle.js} +2 -2
- package/dist/{3.9eb2c7cced9d8b971c99.bundle.js.map → 3.26d967229917c7c5cdfb.bundle.js.map} +1 -1
- package/dist/{30.4d469715c2f2d1028b4b.bundle.js → 30.3592aaa1063719853218.bundle.js} +2 -2
- package/dist/30.3592aaa1063719853218.bundle.js.map +1 -0
- package/dist/{31.d810abed46d7c73ade7f.bundle.js → 31.c808da656c9ee6b7e84e.bundle.js} +2 -2
- package/dist/{31.d810abed46d7c73ade7f.bundle.js.map → 31.c808da656c9ee6b7e84e.bundle.js.map} +1 -1
- package/dist/{32.4f4c8e24d97a9d315335.bundle.js → 32.92b02260015995b4f777.bundle.js} +2 -2
- package/dist/{32.4f4c8e24d97a9d315335.bundle.js.map → 32.92b02260015995b4f777.bundle.js.map} +1 -1
- package/dist/{33.ea3b66016bbeff928fc3.bundle.js → 33.479162c943ca9a1982aa.bundle.js} +2 -2
- package/dist/33.479162c943ca9a1982aa.bundle.js.map +1 -0
- package/dist/34.22a096bd891109c927f5.bundle.js +2 -0
- package/dist/34.22a096bd891109c927f5.bundle.js.map +1 -0
- package/dist/{35.b9183a8ffba2bbd8daa1.bundle.js → 35.9c81c96cc1621f9468aa.bundle.js} +2 -2
- package/dist/{35.b9183a8ffba2bbd8daa1.bundle.js.map → 35.9c81c96cc1621f9468aa.bundle.js.map} +1 -1
- package/dist/{36.d444f7ad7724d126da1c.bundle.js → 36.cee947247d32cdcec00e.bundle.js} +2 -2
- package/dist/{36.d444f7ad7724d126da1c.bundle.js.map → 36.cee947247d32cdcec00e.bundle.js.map} +1 -1
- package/dist/{37.e82ed70c9f1ccac1fa36.bundle.js → 37.42e443af5752a63a28fe.bundle.js} +2 -2
- package/dist/{37.e82ed70c9f1ccac1fa36.bundle.js.map → 37.42e443af5752a63a28fe.bundle.js.map} +1 -1
- package/dist/{38.93c5a81548a3294efd9d.bundle.js → 38.5fff5c171cdd2563aad1.bundle.js} +2 -2
- package/dist/{38.93c5a81548a3294efd9d.bundle.js.map → 38.5fff5c171cdd2563aad1.bundle.js.map} +1 -1
- package/dist/{39.30dddbc6461137994eb4.bundle.js → 39.91c49550b6e2d11104fa.bundle.js} +2 -2
- package/dist/{39.30dddbc6461137994eb4.bundle.js.map → 39.91c49550b6e2d11104fa.bundle.js.map} +1 -1
- package/dist/4.786e6f1de67e5c6289a3.bundle.js +2 -0
- package/dist/4.786e6f1de67e5c6289a3.bundle.js.map +1 -0
- package/dist/{40.ae6db480b8323937451c.bundle.js → 40.a7e0220eb0c8a125abde.bundle.js} +2 -2
- package/dist/{40.ae6db480b8323937451c.bundle.js.map → 40.a7e0220eb0c8a125abde.bundle.js.map} +1 -1
- package/dist/41.1258b9502ba9383894d7.bundle.js +2 -0
- package/dist/{41.ba8cb2fb7f46ccb2ab28.bundle.js.map → 41.1258b9502ba9383894d7.bundle.js.map} +1 -1
- package/dist/{43.8d096939ee87946076e0.bundle.js → 43.86f9220f4f79feec5b27.bundle.js} +2 -2
- package/dist/{43.8d096939ee87946076e0.bundle.js.map → 43.86f9220f4f79feec5b27.bundle.js.map} +1 -1
- package/dist/{47.92a64d48c14c1ae82934.bundle.js → 47.fca0edd51becf34c06b7.bundle.js} +2 -2
- package/dist/{47.92a64d48c14c1ae82934.bundle.js.map → 47.fca0edd51becf34c06b7.bundle.js.map} +1 -1
- package/dist/{48.4b57a948edab2d3b9c55.bundle.js → 48.e495edf3c48e1b2fc052.bundle.js} +2 -2
- package/dist/{48.4b57a948edab2d3b9c55.bundle.js.map → 48.e495edf3c48e1b2fc052.bundle.js.map} +1 -1
- package/dist/49.80591a5efda019de6e4a.bundle.js +2 -0
- package/dist/49.80591a5efda019de6e4a.bundle.js.map +1 -0
- package/dist/{53.4b8ed1b79c1c20cdadd4.bundle.js → 53.c29678970b0cb8aa4b47.bundle.js} +2 -2
- package/dist/{53.4b8ed1b79c1c20cdadd4.bundle.js.map → 53.c29678970b0cb8aa4b47.bundle.js.map} +1 -1
- package/dist/{55.751acc0e54255fa3ace7.bundle.js → 55.427172af3ba7612f747a.bundle.js} +2 -2
- package/dist/{55.751acc0e54255fa3ace7.bundle.js.map → 55.427172af3ba7612f747a.bundle.js.map} +1 -1
- package/dist/{57.677c1eebf6a003639fff.bundle.js → 57.41b09f5fa3ee623aab83.bundle.js} +2 -2
- package/dist/{57.677c1eebf6a003639fff.bundle.js.map → 57.41b09f5fa3ee623aab83.bundle.js.map} +1 -1
- package/dist/{58.2c460e480eefb1a02aea.bundle.js → 58.ce5a29dded68f58c53b4.bundle.js} +2 -2
- package/dist/{58.2c460e480eefb1a02aea.bundle.js.map → 58.ce5a29dded68f58c53b4.bundle.js.map} +1 -1
- package/dist/{59.b8e9155530acba27a6fa.bundle.js → 59.10efdeff3a8ef9e5733d.bundle.js} +2 -2
- package/dist/{59.b8e9155530acba27a6fa.bundle.js.map → 59.10efdeff3a8ef9e5733d.bundle.js.map} +1 -1
- package/dist/{60.27e731a670680751538c.bundle.js → 60.97fb695857f6241ae612.bundle.js} +2 -2
- package/dist/{60.27e731a670680751538c.bundle.js.map → 60.97fb695857f6241ae612.bundle.js.map} +1 -1
- package/dist/{61.fce8a2436742c2e20032.bundle.js → 61.5d71ec3fe0cda230482b.bundle.js} +2 -2
- package/dist/{61.fce8a2436742c2e20032.bundle.js.map → 61.5d71ec3fe0cda230482b.bundle.js.map} +1 -1
- package/dist/{62.9e101a1894ee0f9a48be.bundle.js → 62.d53d104f74f9fbdacb35.bundle.js} +2 -2
- package/dist/{62.9e101a1894ee0f9a48be.bundle.js.map → 62.d53d104f74f9fbdacb35.bundle.js.map} +1 -1
- package/dist/{63.3ffdfd6f35fe62ea729c.bundle.js → 63.46514dd9cf756bd0e831.bundle.js} +2 -2
- package/dist/{63.3ffdfd6f35fe62ea729c.bundle.js.map → 63.46514dd9cf756bd0e831.bundle.js.map} +1 -1
- package/dist/{65.96a1f2f3c83a29e2c6c3.bundle.js → 65.401f44aaddb8aec6be1e.bundle.js} +2 -2
- package/dist/{65.96a1f2f3c83a29e2c6c3.bundle.js.map → 65.401f44aaddb8aec6be1e.bundle.js.map} +1 -1
- package/dist/{66.cf37216fb6f8e53cef2b.bundle.js → 66.7a1e4093247d23b65387.bundle.js} +2 -2
- package/dist/{66.cf37216fb6f8e53cef2b.bundle.js.map → 66.7a1e4093247d23b65387.bundle.js.map} +1 -1
- package/dist/{69.60ff11762016829be80d.bundle.js → 69.1944a1afebe9115c9262.bundle.js} +2 -2
- package/dist/{69.60ff11762016829be80d.bundle.js.map → 69.1944a1afebe9115c9262.bundle.js.map} +1 -1
- package/dist/7.0d2811d01a379d8b75fb.bundle.js +3 -0
- package/dist/7.0d2811d01a379d8b75fb.bundle.js.map +1 -0
- package/dist/{70.f86421bf02a9bfda5b95.bundle.js → 70.84500509fe2b0d19ab93.bundle.js} +2 -2
- package/dist/{70.f86421bf02a9bfda5b95.bundle.js.map → 70.84500509fe2b0d19ab93.bundle.js.map} +1 -1
- package/dist/{76.fa9e5d02f7e1367b9b29.bundle.js → 76.2fa18e115678c4e24682.bundle.js} +2 -2
- package/dist/{76.fa9e5d02f7e1367b9b29.bundle.js.map → 76.2fa18e115678c4e24682.bundle.js.map} +1 -1
- package/dist/8.7209929899c18f8a4580.bundle.js +2 -0
- package/dist/8.7209929899c18f8a4580.bundle.js.map +1 -0
- package/dist/{80.37504cf0c1e5ad897478.bundle.js → 80.83e56da7d7a69fc34eed.bundle.js} +2 -2
- package/dist/{80.37504cf0c1e5ad897478.bundle.js.map → 80.83e56da7d7a69fc34eed.bundle.js.map} +1 -1
- package/dist/{82.9b4d4dc326055aa47e04.bundle.js → 82.74d50036c210cb10b7f5.bundle.js} +2 -2
- package/dist/{82.9b4d4dc326055aa47e04.bundle.js.map → 82.74d50036c210cb10b7f5.bundle.js.map} +1 -1
- package/dist/{84.fab513b88806deb0981a.bundle.js → 84.7f42dd9d7dc01baaf465.bundle.js} +2 -2
- package/dist/{84.fab513b88806deb0981a.bundle.js.map → 84.7f42dd9d7dc01baaf465.bundle.js.map} +1 -1
- package/dist/{86.b319a8b9fcabecd7a6c7.bundle.js → 86.581cbc54b6c6b6ea9f19.bundle.js} +2 -2
- package/dist/{86.b319a8b9fcabecd7a6c7.bundle.js.map → 86.581cbc54b6c6b6ea9f19.bundle.js.map} +1 -1
- package/dist/{87.765567c0cbe89cbdb03c.bundle.js → 87.3606797303ead8dc2879.bundle.js} +2 -2
- package/dist/{87.765567c0cbe89cbdb03c.bundle.js.map → 87.3606797303ead8dc2879.bundle.js.map} +1 -1
- package/dist/{88.50c46652774325bffad3.bundle.js → 88.f5b8f83e57c9bea3c137.bundle.js} +2 -2
- package/dist/{88.50c46652774325bffad3.bundle.js.map → 88.f5b8f83e57c9bea3c137.bundle.js.map} +1 -1
- package/dist/{89.91c58e1902b0f444b068.bundle.js → 89.f9b4c4ddff2c0b5b70f7.bundle.js} +2 -2
- package/dist/{89.91c58e1902b0f444b068.bundle.js.map → 89.f9b4c4ddff2c0b5b70f7.bundle.js.map} +1 -1
- package/dist/{9.16a945b967e9a52bf535.bundle.js → 9.6a95a5c1eec963050422.bundle.js} +2 -2
- package/dist/{9.16a945b967e9a52bf535.bundle.js.map → 9.6a95a5c1eec963050422.bundle.js.map} +1 -1
- package/dist/{90.e12e77898d6341e59d8f.bundle.js → 90.4d42ba583fbc1d63d3d2.bundle.js} +2 -2
- package/dist/{90.e12e77898d6341e59d8f.bundle.js.map → 90.4d42ba583fbc1d63d3d2.bundle.js.map} +1 -1
- package/dist/95.1f83b03f48326a6cec45.bundle.js +2 -0
- package/dist/{95.decfcd3477dee353025b.bundle.js.map → 95.1f83b03f48326a6cec45.bundle.js.map} +1 -1
- package/dist/{bundle.6ce2d745fe23f2a6d129.bundle.js → bundle.1a982e7b3e2d9d06a802.bundle.js} +5 -5
- package/dist/bundle.1a982e7b3e2d9d06a802.bundle.js.map +1 -0
- package/dist/css/graphs-vizualizations.css +9 -1
- package/dist/css/lib/yasr.css +1 -0
- package/dist/css/yasr.custom.css +9 -0
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +1 -0
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/{main.ea86ac1b6d636ab25dc7.css → main.db108895fbac32ad7e7b.css} +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/clusterInfo.html +1 -1
- 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 +11 -11
- package/dist/pages/graphs-visualizations.html +20 -10
- 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 +2 -2
- 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 +25 -25
- package/package.json +1 -1
- package/dist/0.21974a2453b9a92dec33.bundle.js.map +0 -1
- package/dist/12.449fb5148a68a44ba324.bundle.js.map +0 -1
- package/dist/13.77a8eae45bc4cda5fae7.bundle.js +0 -4
- package/dist/13.77a8eae45bc4cda5fae7.bundle.js.map +0 -1
- package/dist/14.a1d84445382b665e13e0.bundle.js +0 -2
- package/dist/14.a1d84445382b665e13e0.bundle.js.map +0 -1
- package/dist/15.73ffeb044255abbac7bf.bundle.js +0 -2
- package/dist/15.73ffeb044255abbac7bf.bundle.js.map +0 -1
- package/dist/17.4b048ae019a8d2fd5b46.bundle.js.map +0 -1
- package/dist/22.a3b52347055f1adac9ce.bundle.js +0 -2
- package/dist/22.a3b52347055f1adac9ce.bundle.js.map +0 -1
- package/dist/25.34da4f496fc62f2dae9b.bundle.js +0 -2
- package/dist/25.34da4f496fc62f2dae9b.bundle.js.map +0 -1
- package/dist/26.02814d2ed726f5a71d4e.bundle.js +0 -2
- package/dist/26.02814d2ed726f5a71d4e.bundle.js.map +0 -1
- package/dist/27.827ef7f030a5501be29a.bundle.js +0 -2
- package/dist/27.827ef7f030a5501be29a.bundle.js.map +0 -1
- package/dist/30.4d469715c2f2d1028b4b.bundle.js.map +0 -1
- package/dist/33.ea3b66016bbeff928fc3.bundle.js.map +0 -1
- package/dist/34.620159c2b04af0a88d1b.bundle.js +0 -2
- package/dist/34.620159c2b04af0a88d1b.bundle.js.map +0 -1
- package/dist/4.6a8bdb4c9048dd910bfd.bundle.js +0 -2
- package/dist/4.6a8bdb4c9048dd910bfd.bundle.js.map +0 -1
- package/dist/41.ba8cb2fb7f46ccb2ab28.bundle.js +0 -2
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js +0 -2
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js.map +0 -1
- package/dist/7.036cd4322fa473fb187a.bundle.js +0 -3
- package/dist/7.036cd4322fa473fb187a.bundle.js.map +0 -1
- package/dist/8.46db359ed59a04d3799b.bundle.js +0 -2
- package/dist/8.46db359ed59a04d3799b.bundle.js.map +0 -1
- package/dist/95.decfcd3477dee353025b.bundle.js +0 -2
- package/dist/bundle.6ce2d745fe23f2a6d129.bundle.js.map +0 -1
package/dist/{40.ae6db480b8323937451c.bundle.js.map → 40.a7e0220eb0c8a125abde.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/resources/app.js","webpack:///./src/js/lib/nvd3/angular-nvd3.js"],"names":["angular","module","directive","utils","restrict","scope","data","options","api","events","config","link","element","attrs","defaultConfig","extended","visible","disabled","autorefresh","refreshDataOnly","deepWatchData","debounce","configureEvents","dispatch","forEach","value","key","undefined","_config","on","configureWrapper","name","_","deepExtend","enable","text","class","css","width","chart","textAlign","defaultWrapper","wrapElement","html","addClass","removeAttr","prepend","find","after","append","extend","refresh","updateWithOptions","update","clearElement","isDefined","nv","models","type","id","Math","random","toString","substr","indexOf","chartType","configure","updateWithData","classes","removeClass","configureStyles","addGraph","resizeHandler","windowResize","d3","select","remove","attr","height","datum","transition","duration","call","empty","clear","i","graphs","length","splice","tooltip","cleanup","getScope","$watch","newOptions","newData","oldData","newConfig","oldConfig","eventHandler","event","$on","e","factory","func","wait","immediate","timeout","context","this","args","arguments","later","apply","callNow","clearTimeout","setTimeout","dst","me","obj","constructor","Object"],"mappings":"2FAAA,0CAgBAA,QAAQC,OAAO,kCATC,CACZ,SACA,eACA,OACA,8CACA,+CACA,uC,mBCTJ,WAEI,aAEAD,QAAQC,OAAO,OAAQ,IAElBC,UAAU,OAAQ,CAAC,QAAS,SAASC,GAClC,MAAO,CACHC,SAAU,KACVC,MAAO,CACHC,KAAM,IACNC,QAAS,IACTC,IAAK,KACLC,OAAQ,KACRC,OAAQ,MAEZC,KAAM,SAASN,EAAOO,EAASC,GAC3B,IAAIC,EAAgB,CAChBC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,aAAa,EACbC,iBAAiB,EACjBC,eAAe,EACfC,SAAU,IAiMd,SAASC,EAAgBC,EAAUhB,GAC3BgB,GAAYhB,GACZP,QAAQwB,QAAQD,GAAU,SAASE,EAAOC,QACjBC,IAAjBpB,EAAQmB,IAAuC,OAAjBnB,EAAQmB,GAClCrB,EAAMuB,QAAQb,WAAUR,EAAQmB,GAAOD,EAAMI,IAEhDN,EAASM,GAAGH,EAAM,KAAMnB,EAAQmB,OAOjD,SAASI,EAAiBC,GACtB,IAAIC,EAAI7B,EAAM8B,WAgClB,SAAwBD,GACpB,OAAQA,GACJ,IAAK,QAAS,MAAO,CACjBE,QAAQ,EACRC,KAAM,mBACNC,MAAO,KACPC,IAAK,CACDC,MAAOjC,EAAME,QAAQgC,MAAMD,MAAQ,KACnCE,UAAW,WAGnB,IAAK,WAAY,MAAO,CACpBN,QAAQ,EACRC,KAAM,sBACNE,IAAK,CACDC,MAAOjC,EAAME,QAAQgC,MAAMD,MAAQ,KACnCE,UAAW,WAGnB,IAAK,UAAW,MAAO,CACnBN,QAAQ,EACRC,KAAM,qCACNE,IAAK,CACDC,MAAOjC,EAAME,QAAQgC,MAAMD,MAAQ,KACnCE,U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K6F,aAAeH,EAAI1F,GAAK6F,cAAgBC,OAC7DH,EAAGpF,WAAWmF,EAAI1F,GAAMD,GAExB2F,EAAI1F,GAAOD,QAKpB2F,OApX3B","file":"40.ae6db480b8323937451c.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/resources/controllers';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/nvd3/angular-nvd3';\n\nconst modules = [\n 'toastr',\n 'ui.bootstrap',\n 'nvd3',\n 'graphdb.framework.jmx.resources.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.jmx.resources', modules);\n\n","/**************************************************************************\n * AngularJS-nvD3, v1.0.0-beta; MIT License; 25/02/2015 22:27\n * http://krispo.github.io/angular-nvd3\n **************************************************************************/\n(function(){\n\n 'use strict';\n\n angular.module('nvd3', [])\n\n .directive('nvd3', ['utils', function(utils){\n return {\n restrict: 'AE',\n scope: {\n data: '=', //chart data, [required]\n options: '=', //chart options, according to nvd3 core api, [required]\n api: '=?', //directive global api, [optional]\n events: '=?', //global events that directive would subscribe to, [optional]\n config: '=?' //global directive configuration, [optional]\n },\n link: function(scope, element, attrs){\n var defaultConfig = {\n extended: false,\n visible: true,\n disabled: false,\n autorefresh: true,\n refreshDataOnly: false,\n deepWatchData: true,\n debounce: 10 // default 10ms, time silence to prevent refresh while multiple options changes at a time\n };\n\n //basic directive configuration\n scope._config = angular.extend(defaultConfig, scope.config);\n\n //directive global api\n scope.api = {\n // Fully refresh directive\n refresh: function(){\n scope.api.updateWithOptions(scope.options);\n },\n\n // Update chart layout (for example if container is resized)\n update: function() {\n scope.chart.update();\n },\n\n // Update chart with new options\n updateWithOptions: function(options){\n // Clearing\n scope.api.clearElement();\n\n // Exit if options are not yet bound\n if (angular.isDefined(options) === false) return;\n\n // Exit if chart is hidden\n if (!scope._config.visible) return;\n\n // Initialize chart with specific type\n scope.chart = nv.models[options.chart.type]();\n\n // Generate random chart ID\n scope.chart.id = Math.random().toString(36).substr(2, 15);\n\n angular.forEach(scope.chart, function(value, key){\n if ([\n 'options',\n '_options',\n '_inherited',\n '_d3options',\n 'state',\n 'id',\n 'resizeHandler'\n ].indexOf(key) >= 0);\n\n else if (key === 'dispatch') {\n if (options.chart[key] === undefined || options.chart[key] === null) {\n if (scope._config.extended) options.chart[key] = {};\n }\n configureEvents(scope.chart[key], options.chart[key]);\n }\n\n else if ([\n 'lines',\n 'lines1',\n 'lines2',\n 'bars',\n 'bars1',\n 'bars2',\n 'stack1',\n 'stack2',\n 'stacked',\n 'multibar',\n 'discretebar',\n 'pie',\n 'scatter',\n 'bullet',\n 'sparkline',\n 'legend',\n 'distX',\n 'distY',\n 'xAxis',\n 'x2Axis',\n 'yAxis',\n 'yAxis1',\n 'yAxis2',\n 'y1Axis',\n 'y2Axis',\n 'y3Axis',\n 'y4Axis',\n 'interactiveLayer',\n 'controls'\n ].indexOf(key) >= 0){\n if (options.chart[key] === undefined || options.chart[key] === null) {\n if (scope._config.extended) options.chart[key] = {};\n }\n configure(scope.chart[key], options.chart[key], options.chart.type);\n }\n\n //TODO: need to fix bug in nvd3\n else if ((key === 'xTickFormat' || key === 'yTickFormat') && options.chart.type === 'lineWithFocusChart');\n\n else if (options.chart[key] === undefined || options.chart[key] === null){\n if (scope._config.extended) options.chart[key] = value();\n }\n\n else scope.chart[key](options.chart[key]);\n });\n\n // Update with data\n scope.api.updateWithData(scope.data);\n\n // Configure wrappers\n if (options['title'] || scope._config.extended) configureWrapper('title');\n if (options['subtitle'] || scope._config.extended) configureWrapper('subtitle');\n if (options['caption'] || scope._config.extended) configureWrapper('caption');\n\n\n // Configure styles\n if (options['styles'] || scope._config.extended) configureStyles();\n\n nv.addGraph(function() {\n // Update the chart when window resizes\n scope.chart.resizeHandler = nv.utils.windowResize(function() { scope.chart.update(); });\n return scope.chart;\n }, options.chart['callback']);\n },\n\n // Update chart with new data\n updateWithData: function (data){\n if (data) {\n scope.options.chart['transitionDuration'] = +scope.options.chart['transitionDuration'] || 250;\n // remove whole svg element with old data\n d3.select(element[0]).select('svg').remove();\n\n // Select the current element to add <svg> element and to render the chart in\n d3.select(element[0]).append('svg')\n .attr('height', scope.options.chart.height)\n .attr('width', scope.options.chart.width || '100%')\n .datum(data)\n .transition().duration(scope.options.chart['transitionDuration'])\n .call(scope.chart);\n }\n },\n\n // Fully clear directive element\n clearElement: function (){\n element.find('.title').remove();\n element.find('.subtitle').remove();\n element.find('.caption').remove();\n element.empty();\n if (scope.chart) {\n // clear window resize event handler\n if (scope.chart.resizeHandler) scope.chart.resizeHandler.clear();\n\n // remove chart from nv.graph list\n for (var i = 0; i < nv.graphs.length; i++)\n if (nv.graphs[i].id === scope.chart.id) {\n nv.graphs.splice(i, 1);\n }\n }\n scope.chart = null;\n nv.tooltip.cleanup();\n },\n\n // Get full directive scope\n getScope: function(){ return scope; }\n };\n\n // Configure the chart model with the passed options\n function configure(chart, options, chartType){\n if (chart && options){\n angular.forEach(chart, function(value, key){\n if (key === 'dispatch') {\n if (options[key] === undefined || options[key] === null) {\n if (scope._config.extended) options[key] = {};\n }\n configureEvents(value, options[key]);\n }\n else if ([\n 'scatter',\n 'defined',\n 'options',\n 'axis',\n 'rangeBand',\n 'rangeBands',\n '_options',\n '_inherited',\n '_d3options',\n '_calls'\n ].indexOf(key) < 0){\n if (options[key] === undefined || options[key] === null){\n if (scope._config.extended) options[key] = value();\n }\n else chart[key](options[key]);\n }\n });\n }\n }\n\n // Subscribe to the chart events (contained in 'dispatch')\n // and pass eventHandler functions in the 'options' parameter\n function configureEvents(dispatch, options){\n if (dispatch && options){\n angular.forEach(dispatch, function(value, key){\n if (options[key] === undefined || options[key] === null){\n if (scope._config.extended) options[key] = value.on;\n }\n else dispatch.on(key + '._', options[key]);\n });\n }\n }\n\n // Configure 'title', 'subtitle', 'caption'.\n // nvd3 has no sufficient models for it yet.\n function configureWrapper(name){\n var _ = utils.deepExtend(defaultWrapper(name), scope.options[name] || {});\n\n if (scope._config.extended) scope.options[name] = _;\n\n var wrapElement = angular.element('<div></div>').html(_['html'] || '')\n .addClass(name).addClass(_.class)\n .removeAttr('style')\n .css(_.css);\n\n if (!_['html']) wrapElement.text(_.text);\n\n if (_.enable) {\n if (name === 'title') element.prepend(wrapElement);\n else if (name === 'subtitle') element.find('.title').after(wrapElement);\n else if (name === 'caption') element.append(wrapElement);\n }\n }\n\n // Add some styles to the whole directive element\n function configureStyles(){\n var _ = utils.deepExtend(defaultStyles(), scope.options['styles'] || {});\n\n if (scope._config.extended) scope.options['styles'] = _;\n\n angular.forEach(_.classes, function(value, key){\n value ? element.addClass(key) : element.removeClass(key);\n });\n\n element.removeAttr('style').css(_.css);\n }\n\n // Default values for 'title', 'subtitle', 'caption'\n function defaultWrapper(_){\n switch (_){\n case 'title': return {\n enable: false,\n text: 'Write Your Title',\n class: 'h4',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n case 'subtitle': return {\n enable: false,\n text: 'Write Your Subtitle',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n case 'caption': return {\n enable: false,\n text: 'Figure 1. Write Your Caption text.',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n }\n }\n\n // Default values for styles\n function defaultStyles(){\n return {\n classes: {\n 'with-3d-shadow': true,\n 'with-transitions': true,\n 'gallery': false\n },\n css: {}\n };\n }\n\n /* Event Handling */\n // Watching on options changing\n scope.$watch('options', utils.debounce(function(newOptions){\n if (!scope._config.disabled && scope._config.autorefresh) scope.api.refresh();\n }, scope._config.debounce, true), true);\n\n // Watching on data changing\n scope.$watch('data', function(newData, oldData){\n if (newData !== oldData && scope.chart){\n if (!scope._config.disabled && scope._config.autorefresh) {\n scope._config.refreshDataOnly ? scope.chart.update() : scope.api.refresh(); // if wanted to refresh data only, use chart.update method, otherwise use full refresh.\n }\n }\n }, scope._config.deepWatchData);\n\n // Watching on config changing\n scope.$watch('config', function(newConfig, oldConfig){\n if (newConfig !== oldConfig){\n scope._config = angular.extend(defaultConfig, newConfig);\n scope.api.refresh();\n }\n }, true);\n\n //subscribe on global events\n angular.forEach(scope.events, function(eventHandler, event){\n scope.$on(event, function(e){\n return eventHandler(e, scope);\n });\n });\n\n // remove completely when directive is destroyed\n element.on('$destroy', function () {\n scope.api.clearElement();\n });\n }\n };\n }])\n\n .factory('utils', function(){\n return {\n debounce: function(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n },\n deepExtend: function(dst){\n var me = this;\n angular.forEach(arguments, function(obj) {\n if (obj !== dst) {\n angular.forEach(obj, function(value, key) {\n if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {\n me.deepExtend(dst[key], value);\n } else {\n dst[key] = value;\n }\n });\n }\n });\n return dst;\n }\n };\n });\n})();"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/resources/app.js","webpack:///./src/js/lib/nvd3/angular-nvd3.js"],"names":["angular","module","directive","utils","restrict","scope","data","options","api","events","config","link","element","attrs","defaultConfig","extended","visible","disabled","autorefresh","refreshDataOnly","deepWatchData","debounce","configureEvents","dispatch","forEach","value","key","undefined","_config","on","configureWrapper","name","_","deepExtend","enable","text","class","css","width","chart","textAlign","defaultWrapper","wrapElement","html","addClass","removeAttr","prepend","find","after","append","extend","refresh","updateWithOptions","update","clearElement","isDefined","nv","models","type","id","Math","random","toString","substr","indexOf","chartType","configure","updateWithData","classes","removeClass","configureStyles","addGraph","resizeHandler","windowResize","d3","select","remove","attr","height","datum","transition","duration","call","empty","clear","i","graphs","length","splice","tooltip","cleanup","getScope","$watch","newOptions","newData","oldData","newConfig","oldConfig","eventHandler","event","$on","e","factory","func","wait","immediate","timeout","context","this","args","arguments","later","apply","callNow","cl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B2F,OApX3B","file":"40.a7e0220eb0c8a125abde.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/resources/controllers';\nimport 'angular/core/services/repositories.service';\nimport 'd3/build/d3';\nimport 'lib/nvd3/angular-nvd3';\n\nconst modules = [\n 'toastr',\n 'ui.bootstrap',\n 'nvd3',\n 'graphdb.framework.jmx.resources.controllers',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.jmx.resources', modules);\n\n","/**************************************************************************\n * AngularJS-nvD3, v1.0.0-beta; MIT License; 25/02/2015 22:27\n * http://krispo.github.io/angular-nvd3\n **************************************************************************/\n(function(){\n\n 'use strict';\n\n angular.module('nvd3', [])\n\n .directive('nvd3', ['utils', function(utils){\n return {\n restrict: 'AE',\n scope: {\n data: '=', //chart data, [required]\n options: '=', //chart options, according to nvd3 core api, [required]\n api: '=?', //directive global api, [optional]\n events: '=?', //global events that directive would subscribe to, [optional]\n config: '=?' //global directive configuration, [optional]\n },\n link: function(scope, element, attrs){\n var defaultConfig = {\n extended: false,\n visible: true,\n disabled: false,\n autorefresh: true,\n refreshDataOnly: false,\n deepWatchData: true,\n debounce: 10 // default 10ms, time silence to prevent refresh while multiple options changes at a time\n };\n\n //basic directive configuration\n scope._config = angular.extend(defaultConfig, scope.config);\n\n //directive global api\n scope.api = {\n // Fully refresh directive\n refresh: function(){\n scope.api.updateWithOptions(scope.options);\n },\n\n // Update chart layout (for example if container is resized)\n update: function() {\n scope.chart.update();\n },\n\n // Update chart with new options\n updateWithOptions: function(options){\n // Clearing\n scope.api.clearElement();\n\n // Exit if options are not yet bound\n if (angular.isDefined(options) === false) return;\n\n // Exit if chart is hidden\n if (!scope._config.visible) return;\n\n // Initialize chart with specific type\n scope.chart = nv.models[options.chart.type]();\n\n // Generate random chart ID\n scope.chart.id = Math.random().toString(36).substr(2, 15);\n\n angular.forEach(scope.chart, function(value, key){\n if ([\n 'options',\n '_options',\n '_inherited',\n '_d3options',\n 'state',\n 'id',\n 'resizeHandler'\n ].indexOf(key) >= 0);\n\n else if (key === 'dispatch') {\n if (options.chart[key] === undefined || options.chart[key] === null) {\n if (scope._config.extended) options.chart[key] = {};\n }\n configureEvents(scope.chart[key], options.chart[key]);\n }\n\n else if ([\n 'lines',\n 'lines1',\n 'lines2',\n 'bars',\n 'bars1',\n 'bars2',\n 'stack1',\n 'stack2',\n 'stacked',\n 'multibar',\n 'discretebar',\n 'pie',\n 'scatter',\n 'bullet',\n 'sparkline',\n 'legend',\n 'distX',\n 'distY',\n 'xAxis',\n 'x2Axis',\n 'yAxis',\n 'yAxis1',\n 'yAxis2',\n 'y1Axis',\n 'y2Axis',\n 'y3Axis',\n 'y4Axis',\n 'interactiveLayer',\n 'controls'\n ].indexOf(key) >= 0){\n if (options.chart[key] === undefined || options.chart[key] === null) {\n if (scope._config.extended) options.chart[key] = {};\n }\n configure(scope.chart[key], options.chart[key], options.chart.type);\n }\n\n //TODO: need to fix bug in nvd3\n else if ((key === 'xTickFormat' || key === 'yTickFormat') && options.chart.type === 'lineWithFocusChart');\n\n else if (options.chart[key] === undefined || options.chart[key] === null){\n if (scope._config.extended) options.chart[key] = value();\n }\n\n else scope.chart[key](options.chart[key]);\n });\n\n // Update with data\n scope.api.updateWithData(scope.data);\n\n // Configure wrappers\n if (options['title'] || scope._config.extended) configureWrapper('title');\n if (options['subtitle'] || scope._config.extended) configureWrapper('subtitle');\n if (options['caption'] || scope._config.extended) configureWrapper('caption');\n\n\n // Configure styles\n if (options['styles'] || scope._config.extended) configureStyles();\n\n nv.addGraph(function() {\n // Update the chart when window resizes\n scope.chart.resizeHandler = nv.utils.windowResize(function() { scope.chart.update(); });\n return scope.chart;\n }, options.chart['callback']);\n },\n\n // Update chart with new data\n updateWithData: function (data){\n if (data) {\n scope.options.chart['transitionDuration'] = +scope.options.chart['transitionDuration'] || 250;\n // remove whole svg element with old data\n d3.select(element[0]).select('svg').remove();\n\n // Select the current element to add <svg> element and to render the chart in\n d3.select(element[0]).append('svg')\n .attr('height', scope.options.chart.height)\n .attr('width', scope.options.chart.width || '100%')\n .datum(data)\n .transition().duration(scope.options.chart['transitionDuration'])\n .call(scope.chart);\n }\n },\n\n // Fully clear directive element\n clearElement: function (){\n element.find('.title').remove();\n element.find('.subtitle').remove();\n element.find('.caption').remove();\n element.empty();\n if (scope.chart) {\n // clear window resize event handler\n if (scope.chart.resizeHandler) scope.chart.resizeHandler.clear();\n\n // remove chart from nv.graph list\n for (var i = 0; i < nv.graphs.length; i++)\n if (nv.graphs[i].id === scope.chart.id) {\n nv.graphs.splice(i, 1);\n }\n }\n scope.chart = null;\n nv.tooltip.cleanup();\n },\n\n // Get full directive scope\n getScope: function(){ return scope; }\n };\n\n // Configure the chart model with the passed options\n function configure(chart, options, chartType){\n if (chart && options){\n angular.forEach(chart, function(value, key){\n if (key === 'dispatch') {\n if (options[key] === undefined || options[key] === null) {\n if (scope._config.extended) options[key] = {};\n }\n configureEvents(value, options[key]);\n }\n else if ([\n 'scatter',\n 'defined',\n 'options',\n 'axis',\n 'rangeBand',\n 'rangeBands',\n '_options',\n '_inherited',\n '_d3options',\n '_calls'\n ].indexOf(key) < 0){\n if (options[key] === undefined || options[key] === null){\n if (scope._config.extended) options[key] = value();\n }\n else chart[key](options[key]);\n }\n });\n }\n }\n\n // Subscribe to the chart events (contained in 'dispatch')\n // and pass eventHandler functions in the 'options' parameter\n function configureEvents(dispatch, options){\n if (dispatch && options){\n angular.forEach(dispatch, function(value, key){\n if (options[key] === undefined || options[key] === null){\n if (scope._config.extended) options[key] = value.on;\n }\n else dispatch.on(key + '._', options[key]);\n });\n }\n }\n\n // Configure 'title', 'subtitle', 'caption'.\n // nvd3 has no sufficient models for it yet.\n function configureWrapper(name){\n var _ = utils.deepExtend(defaultWrapper(name), scope.options[name] || {});\n\n if (scope._config.extended) scope.options[name] = _;\n\n var wrapElement = angular.element('<div></div>').html(_['html'] || '')\n .addClass(name).addClass(_.class)\n .removeAttr('style')\n .css(_.css);\n\n if (!_['html']) wrapElement.text(_.text);\n\n if (_.enable) {\n if (name === 'title') element.prepend(wrapElement);\n else if (name === 'subtitle') element.find('.title').after(wrapElement);\n else if (name === 'caption') element.append(wrapElement);\n }\n }\n\n // Add some styles to the whole directive element\n function configureStyles(){\n var _ = utils.deepExtend(defaultStyles(), scope.options['styles'] || {});\n\n if (scope._config.extended) scope.options['styles'] = _;\n\n angular.forEach(_.classes, function(value, key){\n value ? element.addClass(key) : element.removeClass(key);\n });\n\n element.removeAttr('style').css(_.css);\n }\n\n // Default values for 'title', 'subtitle', 'caption'\n function defaultWrapper(_){\n switch (_){\n case 'title': return {\n enable: false,\n text: 'Write Your Title',\n class: 'h4',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n case 'subtitle': return {\n enable: false,\n text: 'Write Your Subtitle',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n case 'caption': return {\n enable: false,\n text: 'Figure 1. Write Your Caption text.',\n css: {\n width: scope.options.chart.width + 'px',\n textAlign: 'center'\n }\n };\n }\n }\n\n // Default values for styles\n function defaultStyles(){\n return {\n classes: {\n 'with-3d-shadow': true,\n 'with-transitions': true,\n 'gallery': false\n },\n css: {}\n };\n }\n\n /* Event Handling */\n // Watching on options changing\n scope.$watch('options', utils.debounce(function(newOptions){\n if (!scope._config.disabled && scope._config.autorefresh) scope.api.refresh();\n }, scope._config.debounce, true), true);\n\n // Watching on data changing\n scope.$watch('data', function(newData, oldData){\n if (newData !== oldData && scope.chart){\n if (!scope._config.disabled && scope._config.autorefresh) {\n scope._config.refreshDataOnly ? scope.chart.update() : scope.api.refresh(); // if wanted to refresh data only, use chart.update method, otherwise use full refresh.\n }\n }\n }, scope._config.deepWatchData);\n\n // Watching on config changing\n scope.$watch('config', function(newConfig, oldConfig){\n if (newConfig !== oldConfig){\n scope._config = angular.extend(defaultConfig, newConfig);\n scope.api.refresh();\n }\n }, true);\n\n //subscribe on global events\n angular.forEach(scope.events, function(eventHandler, event){\n scope.$on(event, function(e){\n return eventHandler(e, scope);\n });\n });\n\n // remove completely when directive is destroyed\n element.on('$destroy', function () {\n scope.api.clearElement();\n });\n }\n };\n }])\n\n .factory('utils', function(){\n return {\n debounce: function(func, wait, immediate) {\n var timeout;\n return function() {\n var context = this, args = arguments;\n var later = function() {\n timeout = null;\n if (!immediate) func.apply(context, args);\n };\n var callNow = immediate && !timeout;\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(context, args);\n };\n },\n deepExtend: function(dst){\n var me = this;\n angular.forEach(arguments, function(obj) {\n if (obj !== dst) {\n angular.forEach(obj, function(value, key) {\n if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {\n me.deepExtend(dst[key], value);\n } else {\n dst[key] = value;\n }\n });\n }\n });\n return dst;\n }\n };\n });\n})();"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[41,95],{40:function(e,t,n){"use strict";n.r(t);n(2),n(9);function r(e,t,n,r){e.supportsStatistics=!0,e.settings={statistics:!1},e.getSettings=function(){e.loader=!0,r.getStatistics().then((function(t){e.settings.statistics="true"===t.data,e.supportsStatistics=!0}),(function(n){if(404===n.status)e.supportsStatistics=!1;else{const e=getError(n.data);t.error(e,"Error getting settings")}}))},e.getSettings(),e.setSettings=function(){e.loader=!0,r.toggleStatistics(e.settings.statistics).then((function(){n.close(),t.success("Settings have been saved")}),(function(e){const n=getError(e.data);t.error(n,"Error saving settings")}))},e.submitForm=function(){e.setSettings()},e.cancel=function(){n.dismiss("cancel")}}function i(e,t,n,r,i,s){e.loadingLicense=function(){return n.loadingLicense},n.checkLicenseStatus(),e.revertToFree=function(){s.openSimpleModal({title:"Confirm operation",message:"Reverting to a GraphDB Free license will make SE and EE features unusable. Are you sure?",warning:!0}).result.then((function(){t.unregisterLicense().success((function(){n.checkLicenseStatus()}))}))}}function s(e,t,n,r,i,s,o){e.$on("securityInit",(function(){o.isAdmin()||n.path("/license")})),e.sendLicenseToValidateAndActivate=a;const c=$(".license-textarea");function a(e){t.sendLicenseToValidate(e).success((function(n){"Invalid"!==n.licensee?(c.val(e),function(e,n){r.open({templateUrl:"js/angular/settings/modal/validate-license.html",controller:"ValidateLicenseModalCtrl",size:"lg",resolve:{license:function(){return e}}}).result.then((function(){!function(e){e||(e=c.val());if(e){const n=atob(e.replace(/\s/g,""));t.registerLicense(n).success((function(){s.history.back()})).error((function(){i.error("Error registering GraphDB license")}))}else i.error("No license code available in textarea")}(n)}))}(n,e)):(c.val(""),i.error(n.message))})).error((function(){i.error("Invalid license")}))}e.$watch("currentFile",(function(){if(e.currentFile){const n=e.currentFile;t.extractFromLicenseFile(n).success((function(e){a(e)})).error((function(){i.error("Could not upload file")}))}})),e.getBackToPreviousPage=function(){s.history.back()}}function o(e,t,n){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")},e.license=n}function c(e){e.loader=!0,e.setLoader=function(t){e.loader=t}}angular.module("graphdb.framework.settings.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.jwtauth","toastr"]).controller("ActiveLocationSettingsCtrl",r).controller("ValidateLicenseModalCtrl",o).controller("LicenseCtrl",i).controller("RegisterLicenseCtrl",s).controller("LoaderSamplesCtrl",c),r.$inject=["$scope","toastr","$modalInstance","LicenseRestService"],i.$inject=["$scope","LicenseRestService","$licenseService","toastr","$rootScope","ModalService"],s.$inject=["$scope","LicenseRestService","$location","$modal","toastr","$window","$jwtAuth"],o.$inject=["$scope","$modalInstance","license"],c.$inject=["$scope"]},75:function(e,t,n){"use strict";n.r(t);n(2),n(7),n(5),n(40),n(15),n(9),n(26),n(27);function r(e){e.interceptors.push("$unauthorizedInterceptor")}function i(e,t,n){e.$on("$locationChangeStart",(function(){n.isLicenseHardcoded&&"/license/register"===t.url()&&t.path("license")}))}angular.module("graphdb.framework.settings",["toastr","ui.bootstrap","graphdb.framework.rest.license.service","graphdb.framework.settings.controllers","graphdb.framework.core.interceptors.unauthorized","graphdb.framework.core.services.jwtauth"]).config(r).run(i),r.$inject=["$httpProvider","$routeProvider"],i.$inject=["$rootScope","$location","$licenseService"]}}]);
|
|
2
|
+
//# sourceMappingURL=41.1258b9502ba9383894d7.bundle.js.map
|
package/dist/{41.ba8cb2fb7f46ccb2ab28.bundle.js.map → 41.1258b9502ba9383894d7.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/settings/controllers.js","webpack:///./src/js/angular/settings/app.js"],"names":["ActiveLocationSettingsCtrl","$scope","toastr","$modalInstance","LicenseRestService","supportsStatistics","settings","statistics","getSettings","loader","getStatistics","then","response","data","status","msg","getError","error","setSettings","toggleStatistics","close","success","submitForm","cancel","dismiss","LicenseCtrl","$licenseService","$rootScope","ModalService","loadingLicense","checkLicenseStatus","revertToFree","openSimpleModal","title","message","warning","result","unregisterLicense","RegisterLicenseCtrl","$location","$modal","$window","$jwtAuth","$on","isAdmin","path","sendLicenseToValidateAndActivate","textAreaSel","$","licenseCode","sendLicenseToValidate","validatedLicense","licensee","val","license","open","templateUrl","controller","size","resolve","decodedLicense","atob","replace","registerLicense","history","back","confirmWantedNewLicenseDetails","$watch","currentFile","file","extractFromLicenseFile","getBackToPreviousPage","ValidateLicenseModalCtrl","ok","LoaderSamplesCtrl","setLoader","angular","module","$inject","config","$httpProvider","interceptors","push","run","isLicenseHardcoded","url"],"mappings":"6FAAA,iBAkBA,SAASA,EAA2BC,EAAQC,EAAQC,EAAgBC,GAChEH,EAAOI,oBAAqB,EAC5BJ,EAAOK,SAAW,CAACC,YAAY,GAC/BN,EAAOO,YAEP,WACIP,EAAOQ,QAAS,EAChBL,EAAmBM,gBAAgBC,MAAK,SAAUC,GAC9CX,EAAOK,SAASC,WAA+B,SAAlBK,EAASC,KACtCZ,EAAOI,oBAAqB,KAC7B,SAAUO,GACT,GAAwB,MAApBA,EAASE,OACTb,EAAOI,oB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GACZA,EAAcC,aAAaC,KAAK,4BAKpC,SAASC,EAAIxD,EAAYY,EAAWb,GAChCC,EAAWgB,IAAI,wBAAwB,WAC/BjB,EAAgB0D,oBAA0C,sBAApB7C,EAAU8C,OAChD9C,EAAUM,KAAK,cAtB3B+B,QAAQC,OAAO,6BAA8B,CACzC,SACA,eACA,yCACA,yCACA,mDACA,4CAECE,OAAOA,GACPI,IAAIA,GAETJ,EAAOD,QAAU,CAAC,gBAAiB,kBAMnCK,EAAIL,QAAU,CAAC,aAAc,YAAa","file":"41.ba8cb2fb7f46ccb2ab28.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\n\nangular\n .module('graphdb.framework.settings.controllers', [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.jwtauth',\n 'toastr'\n ])\n .controller('ActiveLocationSettingsCtrl', ActiveLocationSettingsCtrl)\n .controller('ValidateLicenseModalCtrl', ValidateLicenseModalCtrl)\n .controller('LicenseCtrl', LicenseCtrl)\n .controller('RegisterLicenseCtrl', RegisterLicenseCtrl)\n .controller('LoaderSamplesCtrl', LoaderSamplesCtrl);\n\nActiveLocationSettingsCtrl.$inject = ['$scope', 'toastr', '$modalInstance', 'LicenseRestService'];\n\nfunction ActiveLocationSettingsCtrl($scope, toastr, $modalInstance, LicenseRestService) {\n $scope.supportsStatistics = true;\n $scope.settings = {statistics: false};\n $scope.getSettings = getSettings;\n\n function getSettings() {\n $scope.loader = true;\n LicenseRestService.getStatistics().then(function (response) {\n $scope.settings.statistics = response.data === 'true';\n $scope.supportsStatistics = true;\n }, function (response) {\n if (response.status === 404) {\n $scope.supportsStatistics = false;\n } else {\n const msg = getError(response.data);\n toastr.error(msg, 'Error getting settings');\n }\n });\n }\n\n $scope.getSettings();\n\n $scope.setSettings = function () {\n $scope.loader = true;\n LicenseRestService.toggleStatistics($scope.settings.statistics).then(function () {\n $modalInstance.close();\n toastr.success('Settings have been saved');\n }, function (response) {\n const msg = getError(response.data);\n toastr.error(msg, 'Error saving settings');\n });\n };\n\n $scope.submitForm = function () {\n $scope.setSettings();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$licenseService', 'toastr', '$rootScope', 'ModalService'];\n\nfunction LicenseCtrl($scope, LicenseRestService, $licenseService, toastr, $rootScope, ModalService) {\n\n $scope.loadingLicense = function() {\n return $licenseService.loadingLicense;\n }\n\n $licenseService.checkLicenseStatus();\n\n $scope.revertToFree = function () {\n ModalService.openSimpleModal({\n title: 'Confirm operation',\n message: \"Reverting to a GraphDB Free license will make SE and EE repositories unusable. Are you sure?\",\n warning: true\n }).result\n .then(function () {\n LicenseRestService.unregisterLicense()\n .success(function () {\n $licenseService.checkLicenseStatus();\n })\n });\n };\n}\n\nRegisterLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$location', '$modal', 'toastr', '$window', '$jwtAuth'];\n\nfunction RegisterLicenseCtrl($scope, LicenseRestService, $location, $modal, toastr, $window, $jwtAuth) {\n $scope.$on('securityInit', function () {\n if (!$jwtAuth.isAdmin()) {\n $location.path('/license');\n }\n });\n\n $scope.sendLicenseToValidateAndActivate = sendLicenseToValidateAndActivate;\n\n const textAreaSel = $('.license-textarea');\n\n // watch for uploaded license file\n $scope.$watch('currentFile', function () {\n if ($scope.currentFile) {\n const file = $scope.currentFile;\n LicenseRestService.extractFromLicenseFile(file)\n .success(function (licenseCode) {\n sendLicenseToValidateAndActivate(licenseCode);\n }).error(function () {\n toastr.error('Could not upload file');\n });\n }\n });\n\n $scope.getBackToPreviousPage = function () {\n $window.history.back();\n };\n\n // send license code for validation and activation\n function sendLicenseToValidateAndActivate(licenseCode) {\n LicenseRestService.sendLicenseToValidate(licenseCode)\n .success(function (validatedLicense) {\n if (validatedLicense.licensee !== 'Invalid') {\n // write code to textarea\n textAreaSel.val(licenseCode);\n // pop dialog for license details confirmation\n confirmWantedNewLicenseDetails(validatedLicense, licenseCode);\n } else {\n // clear textarea on invalid license\n textAreaSel.val('');\n // show error\n toastr.error(validatedLicense.message);\n }\n })\n .error(function () {\n toastr.error('Invalid license');\n });\n }\n\n\n // pops a modal dialog which asks you if your expected license details are correct\n // and sends license to GraphDB upon confirmation\n function confirmWantedNewLicenseDetails(license, licenseCode) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/settings/modal/validate-license.html',\n controller: 'ValidateLicenseModalCtrl',\n size: 'lg',\n resolve: {\n license: function () {\n return license;\n }\n }\n });\n\n modalInstance.result.then(function () {\n registerLicense(licenseCode);\n });\n }\n\n // send license code to GraphDB for activation\n function registerLicense(licenseCode) {\n if (!licenseCode) {\n licenseCode = textAreaSel.val();\n }\n\n if (licenseCode) {\n // replacing whitespace makes this work on Safari too,\n // whereas other browser happily ignore the whitespace\n const decodedLicense = atob(licenseCode.replace(/\\s/g, ''));\n LicenseRestService.registerLicense(decodedLicense)\n .success(function () {\n $window.history.back();\n }).error(function () {\n toastr.error('Error registering GraphDB license');\n });\n } else {\n toastr.error('No license code available in textarea');\n }\n }\n}\n\nValidateLicenseModalCtrl.$inject = ['$scope', '$modalInstance', 'license'];\n\nfunction ValidateLicenseModalCtrl($scope, $modalInstance, license) {\n $scope.ok = ok;\n $scope.cancel = cancel;\n $scope.license = license;\n\n function ok() {\n $modalInstance.close();\n }\n\n function cancel() {\n $modalInstance.dismiss('cancel');\n }\n}\n\nLoaderSamplesCtrl.$inject = ['$scope'];\n\nfunction LoaderSamplesCtrl($scope) {\n $scope.loader = true;\n $scope.setLoader = function (loader) {\n $scope.loader = loader;\n };\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/rest/license.rest.service';\nimport 'angular/settings/controllers';\nimport 'angular/core/interceptors/unauthorized.interceptor';\nimport 'angular/core/services/jwt-auth.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nangular.module('graphdb.framework.settings', [\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.rest.license.service',\n 'graphdb.framework.settings.controllers',\n 'graphdb.framework.core.interceptors.unauthorized',\n 'graphdb.framework.core.services.jwtauth'\n])\n .config(config)\n .run(run);\n\nconfig.$inject = ['$httpProvider', '$routeProvider'];\n\nfunction config($httpProvider) {\n $httpProvider.interceptors.push('$unauthorizedInterceptor');\n}\n\nrun.$inject = ['$rootScope', '$location', '$licenseService'];\n\nfunction run($rootScope, $location, $licenseService) {\n $rootScope.$on('$locationChangeStart', function () {\n if ($licenseService.isLicenseHardcoded && $location.url() === '/license/register') {\n $location.path('license');\n }\n });\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/settings/controllers.js","webpack:///./src/js/angular/settings/app.js"],"names":["ActiveLocationSettingsCtrl","$scope","toastr","$modalInstance","LicenseRestService","supportsStatistics","settings","statistics","getSettings","loader","getStatistics","then","response","data","status","msg","getError","error","setSettings","toggleStatistics","close","success","submitForm","cancel","dismiss","LicenseCtrl","$licenseService","$rootScope","ModalService","loadingLicense","checkLicenseStatus","revertToFree","openSimpleModal","title","message","warning","result","unregisterLicense","RegisterLicenseCtrl","$location","$modal","$window","$jwtAuth","$on","isAdmin","path","sendLicenseToValidateAndActivate","textAreaSel","$","licenseCode","sendLicenseToValidate","validatedLicense","licensee","val","license","open","templateUrl","controller","size","resolve","decodedLicense","atob","replace","registerLicense","history","back","confirmWantedNewLicenseDetails","$watch","currentFile","file","extractFromLicenseFile","getBackToPreviousPage","ValidateLicenseModalCtrl","ok","LoaderSamplesCtrl","setLoader","angular","module","$inject","config","$httpProvider","interceptors","push","run","isLicenseHardcoded","url"],"mappings":"6FAAA,iBAkBA,SAASA,EAA2BC,EAAQC,EAAQC,EAAgBC,GAChEH,EAAOI,oBAAqB,EAC5BJ,EAAOK,SAAW,CAACC,YAAY,GAC/BN,EAAOO,YAEP,WACIP,EAAOQ,QAAS,EAChBL,EAAmBM,gBAAgBC,MAAK,SAAUC,GAC9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AU,UAAW,YA6F3GN,EAAyBM,QAAU,CAAC,SAAU,iBAAkB,WAgBhEJ,EAAkBI,QAAU,CAAC,W,gCClM7B,mDAsBA,SAASC,EAAOC,GACZA,EAAcC,aAAaC,KAAK,4BAKpC,SAASC,EAAIxD,EAAYY,EAAWb,GAChCC,EAAWgB,IAAI,wBAAwB,WAC/BjB,EAAgB0D,oBAA0C,sBAApB7C,EAAU8C,OAChD9C,EAAUM,KAAK,cAtB3B+B,QAAQC,OAAO,6BAA8B,CACzC,SACA,eACA,yCACA,yCACA,mDACA,4CAECE,OAAOA,GACPI,IAAIA,GAETJ,EAAOD,QAAU,CAAC,gBAAiB,kBAMnCK,EAAIL,QAAU,CAAC,aAAc,YAAa","file":"41.1258b9502ba9383894d7.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/services/jwt-auth.service';\n\nangular\n .module('graphdb.framework.settings.controllers', [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.jwtauth',\n 'toastr'\n ])\n .controller('ActiveLocationSettingsCtrl', ActiveLocationSettingsCtrl)\n .controller('ValidateLicenseModalCtrl', ValidateLicenseModalCtrl)\n .controller('LicenseCtrl', LicenseCtrl)\n .controller('RegisterLicenseCtrl', RegisterLicenseCtrl)\n .controller('LoaderSamplesCtrl', LoaderSamplesCtrl);\n\nActiveLocationSettingsCtrl.$inject = ['$scope', 'toastr', '$modalInstance', 'LicenseRestService'];\n\nfunction ActiveLocationSettingsCtrl($scope, toastr, $modalInstance, LicenseRestService) {\n $scope.supportsStatistics = true;\n $scope.settings = {statistics: false};\n $scope.getSettings = getSettings;\n\n function getSettings() {\n $scope.loader = true;\n LicenseRestService.getStatistics().then(function (response) {\n $scope.settings.statistics = response.data === 'true';\n $scope.supportsStatistics = true;\n }, function (response) {\n if (response.status === 404) {\n $scope.supportsStatistics = false;\n } else {\n const msg = getError(response.data);\n toastr.error(msg, 'Error getting settings');\n }\n });\n }\n\n $scope.getSettings();\n\n $scope.setSettings = function () {\n $scope.loader = true;\n LicenseRestService.toggleStatistics($scope.settings.statistics).then(function () {\n $modalInstance.close();\n toastr.success('Settings have been saved');\n }, function (response) {\n const msg = getError(response.data);\n toastr.error(msg, 'Error saving settings');\n });\n };\n\n $scope.submitForm = function () {\n $scope.setSettings();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$licenseService', 'toastr', '$rootScope', 'ModalService'];\n\nfunction LicenseCtrl($scope, LicenseRestService, $licenseService, toastr, $rootScope, ModalService) {\n\n $scope.loadingLicense = function() {\n return $licenseService.loadingLicense;\n };\n\n $licenseService.checkLicenseStatus();\n\n $scope.revertToFree = function () {\n ModalService.openSimpleModal({\n title: 'Confirm operation',\n message: \"Reverting to a GraphDB Free license will make SE and EE features unusable. Are you sure?\",\n warning: true\n }).result\n .then(function () {\n LicenseRestService.unregisterLicense()\n .success(function () {\n $licenseService.checkLicenseStatus();\n });\n });\n };\n}\n\nRegisterLicenseCtrl.$inject = ['$scope', 'LicenseRestService', '$location', '$modal', 'toastr', '$window', '$jwtAuth'];\n\nfunction RegisterLicenseCtrl($scope, LicenseRestService, $location, $modal, toastr, $window, $jwtAuth) {\n $scope.$on('securityInit', function () {\n if (!$jwtAuth.isAdmin()) {\n $location.path('/license');\n }\n });\n\n $scope.sendLicenseToValidateAndActivate = sendLicenseToValidateAndActivate;\n\n const textAreaSel = $('.license-textarea');\n\n // watch for uploaded license file\n $scope.$watch('currentFile', function () {\n if ($scope.currentFile) {\n const file = $scope.currentFile;\n LicenseRestService.extractFromLicenseFile(file)\n .success(function (licenseCode) {\n sendLicenseToValidateAndActivate(licenseCode);\n }).error(function () {\n toastr.error('Could not upload file');\n });\n }\n });\n\n $scope.getBackToPreviousPage = function () {\n $window.history.back();\n };\n\n // send license code for validation and activation\n function sendLicenseToValidateAndActivate(licenseCode) {\n LicenseRestService.sendLicenseToValidate(licenseCode)\n .success(function (validatedLicense) {\n if (validatedLicense.licensee !== 'Invalid') {\n // write code to textarea\n textAreaSel.val(licenseCode);\n // pop dialog for license details confirmation\n confirmWantedNewLicenseDetails(validatedLicense, licenseCode);\n } else {\n // clear textarea on invalid license\n textAreaSel.val('');\n // show error\n toastr.error(validatedLicense.message);\n }\n })\n .error(function () {\n toastr.error('Invalid license');\n });\n }\n\n\n // pops a modal dialog which asks you if your expected license details are correct\n // and sends license to GraphDB upon confirmation\n function confirmWantedNewLicenseDetails(license, licenseCode) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/settings/modal/validate-license.html',\n controller: 'ValidateLicenseModalCtrl',\n size: 'lg',\n resolve: {\n license: function () {\n return license;\n }\n }\n });\n\n modalInstance.result.then(function () {\n registerLicense(licenseCode);\n });\n }\n\n // send license code to GraphDB for activation\n function registerLicense(licenseCode) {\n if (!licenseCode) {\n licenseCode = textAreaSel.val();\n }\n\n if (licenseCode) {\n // replacing whitespace makes this work on Safari too,\n // whereas other browser happily ignore the whitespace\n const decodedLicense = atob(licenseCode.replace(/\\s/g, ''));\n LicenseRestService.registerLicense(decodedLicense)\n .success(function () {\n $window.history.back();\n }).error(function () {\n toastr.error('Error registering GraphDB license');\n });\n } else {\n toastr.error('No license code available in textarea');\n }\n }\n}\n\nValidateLicenseModalCtrl.$inject = ['$scope', '$modalInstance', 'license'];\n\nfunction ValidateLicenseModalCtrl($scope, $modalInstance, license) {\n $scope.ok = ok;\n $scope.cancel = cancel;\n $scope.license = license;\n\n function ok() {\n $modalInstance.close();\n }\n\n function cancel() {\n $modalInstance.dismiss('cancel');\n }\n}\n\nLoaderSamplesCtrl.$inject = ['$scope'];\n\nfunction LoaderSamplesCtrl($scope) {\n $scope.loader = true;\n $scope.setLoader = function (loader) {\n $scope.loader = loader;\n };\n}\n","import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/rest/license.rest.service';\nimport 'angular/settings/controllers';\nimport 'angular/core/interceptors/unauthorized.interceptor';\nimport 'angular/core/services/jwt-auth.service';\nimport 'ng-file-upload/dist/ng-file-upload.min';\nimport 'ng-file-upload/dist/ng-file-upload-shim.min';\n\nangular.module('graphdb.framework.settings', [\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.rest.license.service',\n 'graphdb.framework.settings.controllers',\n 'graphdb.framework.core.interceptors.unauthorized',\n 'graphdb.framework.core.services.jwtauth'\n])\n .config(config)\n .run(run);\n\nconfig.$inject = ['$httpProvider', '$routeProvider'];\n\nfunction config($httpProvider) {\n $httpProvider.interceptors.push('$unauthorizedInterceptor');\n}\n\nrun.$inject = ['$rootScope', '$location', '$licenseService'];\n\nfunction run($rootScope, $location, $licenseService) {\n $rootScope.$on('$locationChangeStart', function () {\n if ($licenseService.isLicenseHardcoded && $location.url() === '/license/register') {\n $location.path('license');\n }\n });\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{
|
|
2
|
-
//# sourceMappingURL=43.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[43],{43:function(e,o,n){"use strict";n.r(o);n(14);function t(e,o,n,t,r,c,i,u,l){let s;function a(){s&&o.cancel(s)}e.pluginName="autocomplete",e.setPluginIsActive=function(o){e.pluginIsActive=o};const d=function(){u.checkAutocompleteStatus().success((function(o){e.autocompleteEnabled=o,l.setAutocompleteStatus(o)})).error((function(e){n.error(getError(e))}))},f=function(){u.refreshIndexIRIs().success((function(o){e.shouldIndexIRIs=o})).error((function(e){n.error(getError(e))}))},g=function(){u.refreshIndexStatus().success((function(o){e.indexStatus=o})).error((function(e){n.error(getError(e))}))},p=function(){u.refreshLabelConfig().success((function(o){e.labelConfig=o})).error((function(e){n.error(getError(e))}))};e.checkForPlugin=function(){e.pluginFound=!1,e.setLoader(!0),u.checkForPlugin().success((function(o){e.pluginFound=!0===o,e.pluginFound?(d(),f(),g(),p()):(e.autocompleteEnabled=!1,e.loading=!1)})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))};const m=function(){s=o((function(){e.$broadcast("checkIsActive"),e.autocompleteEnabled&&g()}),5e3)};e.$on("$destroy",(function(){a()}));e.setLoader=function(o,n){i.cancel(e.loaderTimeout),o?e.loaderTimeout=i((function(){e.loader=o,e.loaderMessage=n}),300):e.loader=!1},e.getLoaderMessage=function(){return e.loaderMessage||"Loading..."},e.toggleAutocomplete=function(){const o=!e.autocompleteEnabled;e.setLoader(!0,o?"Enabling autocomplete...":"Disabling autocomplete..."),u.toggleAutocomplete(o).success((function(){d(),g()})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.toggleIndexIRIs=function(){e.setLoader(!0,"Setting index IRIs..."),u.toggleIndexIRIs(!e.shouldIndexIRIs).success((function(){f(),g()})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.buildIndex=function(){e.setLoader(!0,"Requesting index build..."),u.buildIndex().success((function(){e.indexStatus="BUILDING"})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.interruptIndexing=function(){e.setLoader(!0,"Interrupting index..."),u.interruptIndexing().success((function(){g()})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))},e.getDegradedReason=function(){return t.getDegradedReason()},e.addLabel=function(){e.editLabel({labelIri:"",languages:""},!0)},e.editLabel=function(o,t){c.open({templateUrl:"js/angular/autocomplete/templates/modal/add-label.html",controller:"AddLabelCtrl",resolve:{data:function(){return{label:o,isNew:t}}}}).result.then((function(o){!function(o){e.setLoader(!0,"Updating label config..."),u.addLabelConfig(o).success((function(){p(),g()})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))}(o)}))},e.removeLabel=function(o){!function(o){e.setLoader(!0,"Updating label config..."),u.removeLabelConfig(o).success((function(){p(),g()})).error((function(e){n.error(getError(e))})).finally((function(){e.setLoader(!1)}))}(o)},e.$on("repositoryIsSet",(function(){a(),r.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()&&(e.checkForPlugin(),m())})),r.isLicenseValid()&&t.getActiveRepository()&&!t.isActiveRepoOntopType()&&!t.isActiveRepoFedXType()&&(e.checkForPlugin(),m())}function r(e,o,n,t){e.label=angular.copy(t.label),e.isNew=t.isNew,e.ok=function(){e.form.$valid&&o.close(e.label)},e.cancel=function(){o.dismiss("cancel")},e.setTemplate=function(o){e.label.labelIri=o,n((function(){$("#wb-autocomplete-languages").focus()}),0)}}angular.module("graphdb.framework.autocomplete.controllers",["toastr","graphdb.framework.rest.autocomplete.service"]).controller("AutocompleteCtrl",t).controller("AddLabelCtrl",r),t.$inject=["$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus"],r.$inject=["$scope","$modalInstance","$timeout","data"]}}]);
|
|
2
|
+
//# sourceMappingURL=43.86f9220f4f79feec5b27.bundle.js.map
|
package/dist/{43.8d096939ee87946076e0.bundle.js.map → 43.86f9220f4f79feec5b27.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/autocomplete/controllers.js"],"names":["AutocompleteCtrl","$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus","timer","cancelTimer","cancel","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","refreshEnabledStatus","checkAutocompleteStatus","success","data","autocompleteEnabled","setAutocompleteStatus","error","getError","refreshIndexIRIs","shouldIndexIRIs","refreshIndexStatus","indexStatus","refreshLabelConfig","labelConfig","checkForPlugin","pluginFound","setLoader","loading","finally","pullStatus","$broadcast","$on","loader","message","loaderTimeout","loaderMessage","getLoaderMessage","toggleAutocomplete","newValue","toggleIndexIRIs","buildIndex","interruptIndexing","getDegradedReason","addLabel","editLabel","labelIri","languages","label","isNew","open","templateUrl","controller","resolve","result","then","addLabelConfig","removeLabel","removeLabelConfig","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","AddLabelCtrl","$modalInstance","angular","copy","ok","form","$valid","close","dismiss","setTemplate","iri","$","focus","module","$inject"],"mappings":"0FAAA,aAcA,SAASA,EAAiBC,EAAQC,EAAWC,EAAQC,EAAeC,EAAiBC,EAAQC,EAAUC,EAAyBC,GAE5H,IAAIC,EAEJ,SAASC,IACDD,GACAR,EAAUU,OAAOF,GAIzBT,EAAOY,WAAa,eAEpBZ,EAAOa,kBAAoB,SAAUC,GACjCd,EAAOe,eAAiBD,GAG5B,MAAME,EAAuB,WACzBT,EAAwBU,0BACnBC,SAAQ,SAAUC,GACfnB,EAAOoB,oBAAsBD,EAC7BX,EAAoBa,sBAAsBF,MAC3CG,OAAM,SAAUH,GACfjB,EAAOoB,MAAMC,SAASJ,QAI5BK,EAAmB,WACrBjB,EAAwBiB,mBACnBN,SAAQ,SAAUC,GACfnB,EAAOyB,gBAAkBN,KAC1BG,OAAM,SAAUH,GACfjB,EAAOoB,MAAMC,SAASJ,QAI5BO,EAAqB,WACvBnB,EAAwBmB,qBACnBR,SAAQ,SAAUC,GACfnB,EAAO2B,YAAcR,KAExBG,OAAM,SAAUH,GACbjB,EAAOoB,MAAMC,SAASJ,QAI5BS,EAAqB,WACvBrB,EAAwBqB,qBACnBV,SAAQ,SAAUC,GACfnB,EAAO6B,YAAcV,KACtBG,OAAM,SAAUH,GACfjB,EAAOoB,MAAMC,SAASJ,QAgClCnB,EAAO8B,eAAiB,WACpB9B,EAAO+B,aAAc,EAErB/B,EAAOgC,WAAU,GAEjBzB,EAAwBuB,iBACnBZ,SAAQ,SAAUC,GACfnB,EAAO+B,aAAuB,IAATZ,EACjBnB,EAAO+B,aACPf,IACAQ,IACAE,IACAE,MAEA5B,EAAOoB,qBAAsB,EAC7BpB,EAAOiC,SAAU,MAEtBX,OAAM,SAAUH,GACfjB,EAAOoB,MAAMC,SAASJ,OACvBe,SAAQ,WACPlC,EAAOgC,WAAU,OAI7B,MAAMG,EAAa,WACf1B,EAAQR,GAAU,WACdD,EAAOoC,WAA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,WACLyE,EAAE,8BAA8BC,UACjC,IAlRXV,QACKW,OAAO,6CANI,CACZ,SACA,gDAKCxB,WAAW,mBAAoB1D,GAC/B0D,WAAW,eAAgBW,GAEhCrE,EAAiBmF,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,kBAAmB,SAAU,WAAY,0BAA2B,uBAyPlJd,EAAac,QAAU,CAAC,SAAU,iBAAkB,WAAY","file":"43.8d096939ee87946076e0.bundle.js","sourcesContent":["import 'angular/rest/autocomplete.rest.service';\n\nconst modules = [\n 'toastr',\n 'graphdb.framework.rest.autocomplete.service'\n];\n\nangular\n .module('graphdb.framework.autocomplete.controllers', modules)\n .controller('AutocompleteCtrl', AutocompleteCtrl)\n .controller('AddLabelCtrl', AddLabelCtrl);\n\nAutocompleteCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', '$modal', '$timeout', 'AutocompleteRestService', '$autocompleteStatus'];\n\nfunction AutocompleteCtrl($scope, $interval, toastr, $repositories, $licenseService, $modal, $timeout, AutocompleteRestService, $autocompleteStatus) {\n\n let timer;\n\n function cancelTimer() {\n if (timer) {\n $interval.cancel(timer);\n }\n }\n\n $scope.pluginName = 'autocomplete';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n }\n\n const refreshEnabledStatus = function () {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (data) {\n $scope.autocompleteEnabled = data;\n $autocompleteStatus.setAutocompleteStatus(data);\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexIRIs = function () {\n AutocompleteRestService.refreshIndexIRIs()\n .success(function (data) {\n $scope.shouldIndexIRIs = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexStatus = function () {\n AutocompleteRestService.refreshIndexStatus()\n .success(function (data) {\n $scope.indexStatus = data;\n })\n .error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshLabelConfig = function () {\n AutocompleteRestService.refreshLabelConfig()\n .success(function (data) {\n $scope.labelConfig = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const addLabelConfig = function (label) {\n $scope.setLoader(true, 'Updating label config...');\n\n AutocompleteRestService.addLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const removeLabelConfig = function (label) {\n $scope.setLoader(true, 'Updating label config...');\n\n AutocompleteRestService.removeLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.checkForPlugin = function () {\n $scope.pluginFound = false;\n\n $scope.setLoader(true);\n\n AutocompleteRestService.checkForPlugin()\n .success(function (data) {\n $scope.pluginFound = data === true;\n if ($scope.pluginFound) {\n refreshEnabledStatus();\n refreshIndexIRIs();\n refreshIndexStatus();\n refreshLabelConfig();\n } else {\n $scope.autocompleteEnabled = false;\n $scope.loading = false;\n }\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const pullStatus = function () {\n timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($scope.autocompleteEnabled) {\n refreshIndexStatus();\n }\n }, 5000);\n };\n\n $scope.$on(\"$destroy\", function () {\n cancelTimer();\n });\n\n const init = function() {\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || 'Loading...';\n };\n\n $scope.toggleAutocomplete = function () {\n const newValue = !$scope.autocompleteEnabled;\n $scope.setLoader(true, newValue ? 'Enabling autocomplete...' : 'Disabling autocomplete...');\n\n AutocompleteRestService.toggleAutocomplete(newValue)\n .success(function () {\n refreshEnabledStatus();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.toggleIndexIRIs = function () {\n $scope.setLoader(true, 'Setting index IRIs...');\n\n AutocompleteRestService.toggleIndexIRIs(!$scope.shouldIndexIRIs)\n .success(function () {\n refreshIndexIRIs();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.buildIndex = function () {\n $scope.setLoader(true, 'Requesting index build...');\n\n AutocompleteRestService.buildIndex()\n .success(function () {\n $scope.indexStatus = 'BUILDING';\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.interruptIndexing = function () {\n $scope.setLoader(true, 'Interrupting index...');\n\n AutocompleteRestService.interruptIndexing()\n .success(function () {\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.addLabel = function () {\n $scope.editLabel({labelIri: '', languages: ''}, true);\n };\n\n $scope.editLabel = function (label, isNew) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/autocomplete/templates/modal/add-label.html',\n controller: 'AddLabelCtrl',\n resolve: {\n data: function () {\n return {\n label: label,\n isNew: isNew\n };\n }\n }\n });\n\n modalInstance.result.then(function (label) {\n addLabelConfig(label);\n });\n };\n\n $scope.removeLabel = function (label) {\n removeLabelConfig(label);\n };\n\n $scope.$on('repositoryIsSet', function () {\n cancelTimer();\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n });\n\n init();\n}\n\nAddLabelCtrl.$inject = ['$scope', '$modalInstance', '$timeout', 'data'];\n\nfunction AddLabelCtrl($scope, $modalInstance, $timeout, data) {\n $scope.label = angular.copy(data.label);\n $scope.isNew = data.isNew;\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.label);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.setTemplate = function (iri) {\n $scope.label.labelIri = iri;\n $timeout(function () {\n $('#wb-autocomplete-languages').focus();\n }, 0);\n };\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/autocomplete/controllers.js"],"names":["AutocompleteCtrl","$scope","$interval","toastr","$repositories","$licenseService","$modal","$timeout","AutocompleteRestService","$autocompleteStatus","timer","cancelTimer","cancel","pluginName","setPluginIsActive","isPluginActive","pluginIsActive","refreshEnabledStatus","checkAutocompleteStatus","success","data","autocompleteEnabled","setAutocompleteStatus","error","getError","refreshIndexIRIs","shouldIndexIRIs","refreshIndexStatus","indexStatus","refreshLabelConfig","labelConfig","checkForPlugin","pluginFound","setLoader","loading","finally","pullStatus","$broadcast","$on","loader","message","loaderTimeout","loaderMessage","getLoaderMessage","toggleAutocomplete","newValue","toggleIndexIRIs","buildIndex","interruptIndexing","getDegradedReason","addLabel","editLabel","labelIri","languages","label","isNew","open","templateUrl","controller","resolve","result","then","addLabelConfig","removeLabel","removeLabelConfig","isLicenseValid","getActiveRepository","isActiveRepoOntopType","isActiveRepoFedXType","AddLabelCtrl","$modalInstance","angular","copy","ok","form","$valid","close","dismiss","setTemplate","iri","$","focus","module","$inject"],"mappings":"0FAAA,aAcA,SAASA,EAAiBC,EAAQC,EAAWC,EAAQC,EAAeC,EAAiBC,EAAQC,EAAUC,EAAyBC,GAE5H,IAAIC,EAEJ,SAASC,IACDD,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0BAA2B,uBAyPlJd,EAAac,QAAU,CAAC,SAAU,iBAAkB,WAAY","file":"43.86f9220f4f79feec5b27.bundle.js","sourcesContent":["import 'angular/rest/autocomplete.rest.service';\n\nconst modules = [\n 'toastr',\n 'graphdb.framework.rest.autocomplete.service'\n];\n\nangular\n .module('graphdb.framework.autocomplete.controllers', modules)\n .controller('AutocompleteCtrl', AutocompleteCtrl)\n .controller('AddLabelCtrl', AddLabelCtrl);\n\nAutocompleteCtrl.$inject = ['$scope', '$interval', 'toastr', '$repositories', '$licenseService', '$modal', '$timeout', 'AutocompleteRestService', '$autocompleteStatus'];\n\nfunction AutocompleteCtrl($scope, $interval, toastr, $repositories, $licenseService, $modal, $timeout, AutocompleteRestService, $autocompleteStatus) {\n\n let timer;\n\n function cancelTimer() {\n if (timer) {\n $interval.cancel(timer);\n }\n }\n\n $scope.pluginName = 'autocomplete';\n\n $scope.setPluginIsActive = function (isPluginActive) {\n $scope.pluginIsActive = isPluginActive;\n }\n\n const refreshEnabledStatus = function () {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function (data) {\n $scope.autocompleteEnabled = data;\n $autocompleteStatus.setAutocompleteStatus(data);\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexIRIs = function () {\n AutocompleteRestService.refreshIndexIRIs()\n .success(function (data) {\n $scope.shouldIndexIRIs = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshIndexStatus = function () {\n AutocompleteRestService.refreshIndexStatus()\n .success(function (data) {\n $scope.indexStatus = data;\n })\n .error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const refreshLabelConfig = function () {\n AutocompleteRestService.refreshLabelConfig()\n .success(function (data) {\n $scope.labelConfig = data;\n }).error(function (data) {\n toastr.error(getError(data));\n });\n };\n\n const addLabelConfig = function (label) {\n $scope.setLoader(true, 'Updating label config...');\n\n AutocompleteRestService.addLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const removeLabelConfig = function (label) {\n $scope.setLoader(true, 'Updating label config...');\n\n AutocompleteRestService.removeLabelConfig(label)\n .success(function () {\n refreshLabelConfig();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.checkForPlugin = function () {\n $scope.pluginFound = false;\n\n $scope.setLoader(true);\n\n AutocompleteRestService.checkForPlugin()\n .success(function (data) {\n $scope.pluginFound = data === true;\n if ($scope.pluginFound) {\n refreshEnabledStatus();\n refreshIndexIRIs();\n refreshIndexStatus();\n refreshLabelConfig();\n } else {\n $scope.autocompleteEnabled = false;\n $scope.loading = false;\n }\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n const pullStatus = function () {\n timer = $interval(function () {\n $scope.$broadcast('checkIsActive');\n if ($scope.autocompleteEnabled) {\n refreshIndexStatus();\n }\n }, 5000);\n };\n\n $scope.$on(\"$destroy\", function () {\n cancelTimer();\n });\n\n const init = function() {\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n };\n\n $scope.setLoader = function (loader, message) {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(function () {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n $scope.getLoaderMessage = function () {\n return $scope.loaderMessage || 'Loading...';\n };\n\n $scope.toggleAutocomplete = function () {\n const newValue = !$scope.autocompleteEnabled;\n $scope.setLoader(true, newValue ? 'Enabling autocomplete...' : 'Disabling autocomplete...');\n\n AutocompleteRestService.toggleAutocomplete(newValue)\n .success(function () {\n refreshEnabledStatus();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.toggleIndexIRIs = function () {\n $scope.setLoader(true, 'Setting index IRIs...');\n\n AutocompleteRestService.toggleIndexIRIs(!$scope.shouldIndexIRIs)\n .success(function () {\n refreshIndexIRIs();\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.buildIndex = function () {\n $scope.setLoader(true, 'Requesting index build...');\n\n AutocompleteRestService.buildIndex()\n .success(function () {\n $scope.indexStatus = 'BUILDING';\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.interruptIndexing = function () {\n $scope.setLoader(true, 'Interrupting index...');\n\n AutocompleteRestService.interruptIndexing()\n .success(function () {\n refreshIndexStatus();\n }).error(function (data) {\n toastr.error(getError(data));\n }).finally(function () {\n $scope.setLoader(false);\n });\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.addLabel = function () {\n $scope.editLabel({labelIri: '', languages: ''}, true);\n };\n\n $scope.editLabel = function (label, isNew) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/autocomplete/templates/modal/add-label.html',\n controller: 'AddLabelCtrl',\n resolve: {\n data: function () {\n return {\n label: label,\n isNew: isNew\n };\n }\n }\n });\n\n modalInstance.result.then(function (label) {\n addLabelConfig(label);\n });\n };\n\n $scope.removeLabel = function (label) {\n removeLabelConfig(label);\n };\n\n $scope.$on('repositoryIsSet', function () {\n cancelTimer();\n if (!$licenseService.isLicenseValid() ||\n !$repositories.getActiveRepository() ||\n $repositories.isActiveRepoOntopType() ||\n $repositories.isActiveRepoFedXType()) {\n return;\n }\n $scope.checkForPlugin();\n pullStatus();\n });\n\n init();\n}\n\nAddLabelCtrl.$inject = ['$scope', '$modalInstance', '$timeout', 'data'];\n\nfunction AddLabelCtrl($scope, $modalInstance, $timeout, data) {\n $scope.label = angular.copy(data.label);\n $scope.isNew = data.isNew;\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.label);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n\n $scope.setTemplate = function (iri) {\n $scope.label.labelIri = iri;\n $timeout(function () {\n $('#wb-autocomplete-languages').focus();\n }, 0);\n };\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{
|
|
2
|
-
//# sourceMappingURL=47.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{45:function(e,t){function i(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,i,n){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:n.fitTextMin||"inherit",max:n.fitTextMax||"inherit",calcSize:10,lines:1},a=i.parent(),c=i[0],l=c.style,f=window.getComputedStyle(i[0],null),r=i.children().length||o.lines,s="inherit"===o.min?f["font-size"]:o.min,d="inherit"===o.max?f["font-size"]:o.max,p=f["line-height"],u=f.display;let h;function m(){const e=o.calcSize*r/c.offsetWidth/r;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(a[0]).paddingLeft),i=parseFloat(getComputedStyle(a[0]).paddingRight);return(a[0].offsetWidth-(t+i))*e*o.compressor}(e),parseFloat(d)),parseFloat(s))}function w(){h&&e.cancel(h),h=e((function(){c.offsetHeight*c.offsetWidth!=0&&(l.fontSize=o.calcSize+"px",l.lineHeight="1",l.display="inline-block",l.fontSize=m()+"px",l.lineHeight=p,l.display=u)}),o.loadDelay)}t.$watch((function(){return[a[0].offsetWidth,i[0].offsetWidth].join("_")}),(function(){w()})),$(window).on("resize",o.debounce((function(){t.$apply(w)}),o.delay)),t.$on("$destroy",(function(){h&&e.cancel(h),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",i),i.$inject=["$timeout"]}}]);
|
|
2
|
+
//# sourceMappingURL=47.fca0edd51becf34c06b7.bundle.js.map
|
package/dist/{47.92a64d48c14c1ae82934.bundle.js.map → 47.fca0edd51becf34c06b7.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/core/directives/fit-text.directive.js"],"names":["fitTextDirective","$timeout","restrict","scope","min","max","link","element","attrs","config","_","debounce","fitTextMin","fitTextMax","parent","domElem","domElemStyle","style","computed","window","getComputedStyle","newlines","children","length","lines","minFontSize","maxFontSize","lineHeight","display","resizePromise","calculate","ratio","calcSize","offsetWidth","Math","paddingLeft","parseFloat","paddingRight","compressor","getMaxFontSize","resizer","cancel","offsetHeight","fontSize","loadDelay","$watch","join","$","on","$apply","delay","$on","off","angular","module","directive","$inject"],"mappings":"2EAOA,SAASA,EAAiBC,GACtB,MAAO,CACHC,SAAU,IACVC,MAAO,CACHC,IAAK,IACLC,IAAK,KAETC,KAAM,SAAUH,EAAOI,EAASC,GAE5B,MAAMC,EAAS,CACX,SAAYC,EAAEC,SACd,MAAS,IACT,UAAa,GACb,WAAc,EACd,IAAOH,EAAMI,YAAc,UAC3B,IAAOJ,EAAMK,YAAc,UAC3B,SAAY,GACZ,MAAS,GAGPC,EAASP,EAAQO,SACjBC,EAAUR,EAAQ,GAClBS,EAAeD,EAAQE,MACvBC,EAAWC,OAAOC,iBAAiBb,EAAQ,GAAI,MAC/Cc,EAAWd,EAAQe,WAAWC,QAAUd,EAAOe,MAC/CC,EAA6B,YAAfhB,EAAOL,IAAoBc,EAAS,aAAeT,EAAOL,IACxEsB,EAA6B,YAAfjB,EAAOJ,IAAoBa,EAAS,aAAeT,EAAOJ,IACxEsB,EAAaT,EAAS,eACtBU,EAAUV,EAAkB,QAClC,IAAIW,EAEJ,SAASC,IACL,MAAMC,EAAStB,EAAOuB,SAAWX,EAAYN,EAAQkB,YAAcZ,EACnE,OAAOa,KAAK7B,IAAI6B,KAAK9B,IAGzB,SAAwB2B,GACpB,MAAMI,EAAcC,WAAWhB,iBAAiBN,EAAO,IAAIqB,aACrDE,EAAeD,WAAWhB,iBAAiBN,EAAO,IAAIuB,cAE5D,OAAQvB,EAAO,GAAGmB,aAAeE,EAAcE,IAAiBN,EAAQtB,EAAO6B,WAPtDC,CAAeR,GAAQK,WAAWV,IAAeU,WAAWX,IA0BzF,SAASe,IACDX,GACA5B,EAASwC,OAAOZ,GAGpBA,EAAgB5B,GAAS,WApBrBc,EAAQ2B,aAAe3B,EAAQkB,aAAgB,IAKnDjB,EAAa2B,SAAWlC,EAAOuB,SAAW,KAC1ChB,EAAaW,WAAa,IAC1BX,EAAaY,QAAU,eAGvBZ,EAAa2B,SAAWb,IAAc,KACtCd,EAAaW,WAAaA,EAC1BX,EAAaY,QAAUA,KAUpBnB,EAAOmC,WAGdzC,EAAM0C,QAAO,WACT,MAAO,CACH/B,EAAO,GAAGmB,YACV1B,EAAQ,GAAG0B,aACba,KAAK,QACR,WACCN,OAGJO,EAAE5B,QAAQ6B,GAAG,SAAUvC,EAAOE,UAAS,WACnCR,EAAM8C,OAAOT,KACd/B,EAAOyC,QAEV/C,EAAMgD,IAAI,YAAY,WACdtB,GACA5B,EAASwC,OAAOZ,GAEpBkB,EAAE5B,QAAQiC,IAAI,eA5F9BC,QACKC,OAAO,4CAA6C,IACpDC,UAAU,UAAWvD,GAE1BA,EAAiBwD,QAAU,CAAC","file":"47.
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/core/directives/fit-text.directive.js"],"names":["fitTextDirective","$timeout","restrict","scope","min","max","link","element","attrs","config","_","debounce","fitTextMin","fitTextMax","parent","domElem","domElemStyle","style","computed","window","getComputedStyle","newlines","children","length","lines","minFontSize","maxFontSize","lineHeight","display","resizePromise","calculate","ratio","calcSize","offsetWidth","Math","paddingLeft","parseFloat","paddingRight","compressor","getMaxFontSize","resizer","cancel","offsetHeight","fontSize","loadDelay","$watch","join","$","on","$apply","delay","$on","off","angular","module","directive","$inject"],"mappings":"2EAOA,SAAS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0C,QAAO,WACT,MAAO,CACH/B,EAAO,GAAGmB,YACV1B,EAAQ,GAAG0B,aACba,KAAK,QACR,WACCN,OAGJO,EAAE5B,QAAQ6B,GAAG,SAAUvC,EAAOE,UAAS,WACnCR,EAAM8C,OAAOT,KACd/B,EAAOyC,QAEV/C,EAAMgD,IAAI,YAAY,WACdtB,GACA5B,EAASwC,OAAOZ,GAEpBkB,EAAE5B,QAAQiC,IAAI,eA5F9BC,QACKC,OAAO,4CAA6C,IACpDC,UAAU,UAAWvD,GAE1BA,EAAiBwD,QAAU,CAAC","file":"47.fca0edd51becf34c06b7.bundle.js","sourcesContent":["// This is a rework of the ng-FitText.js which can be found here https://github.com/patrickmarabeas/ng-FitText.js\nangular\n .module('graphdb.framework.core.directives.fittext', [])\n .directive('fitText', fitTextDirective);\n\nfitTextDirective.$inject = ['$timeout'];\n\nfunction fitTextDirective($timeout) {\n return {\n restrict: 'A',\n scope: {\n min: '=',\n max: '='\n },\n link: function (scope, element, attrs) {\n\n const config = {\n 'debounce': _.debounce,\n 'delay': 100,\n 'loadDelay': 10,\n 'compressor': 1,\n 'min': attrs.fitTextMin || 'inherit',\n 'max': attrs.fitTextMax || 'inherit',\n 'calcSize': 10,\n 'lines': 1\n };\n\n const parent = element.parent();\n const domElem = element[0];\n const domElemStyle = domElem.style;\n const computed = window.getComputedStyle(element[0], null);\n const newlines = element.children().length || config.lines;\n const minFontSize = config.min === 'inherit' ? computed['font-size'] : config.min;\n const maxFontSize = config.max === 'inherit' ? computed['font-size'] : config.max;\n const lineHeight = computed['line-height'];\n const display = computed['display'];\n let resizePromise;\n\n function calculate() {\n const ratio = (config.calcSize * newlines) / domElem.offsetWidth / newlines;\n return Math.max(Math.min(getMaxFontSize(ratio), parseFloat(maxFontSize)), parseFloat(minFontSize));\n }\n\n function getMaxFontSize(ratio) {\n const paddingLeft = parseFloat(getComputedStyle(parent[0]).paddingLeft);\n const paddingRight = parseFloat(getComputedStyle(parent[0]).paddingRight);\n\n return (parent[0].offsetWidth - (paddingLeft + paddingRight)) * ratio * config.compressor;\n }\n\n function resize() {\n if (domElem.offsetHeight * domElem.offsetWidth === 0) {\n return;\n }\n\n // Preset standard values for making the size calculation\n domElemStyle.fontSize = config.calcSize + 'px';\n domElemStyle.lineHeight = '1';\n domElemStyle.display = 'inline-block';\n\n // Set usage values\n domElemStyle.fontSize = calculate() + 'px';\n domElemStyle.lineHeight = lineHeight;\n domElemStyle.display = display;\n }\n\n function resizer() {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n\n resizePromise = $timeout(function () {\n resize();\n }, config.loadDelay);\n }\n\n scope.$watch(function () {\n return [\n parent[0].offsetWidth,\n element[0].offsetWidth\n ].join('_');\n }, function () {\n resizer();\n });\n\n $(window).on('resize', config.debounce(function () {\n scope.$apply(resizer)\n }, config.delay));\n\n scope.$on('$destroy', function () {\n if (resizePromise) {\n $timeout.cancel(resizePromise);\n }\n $(window).off('resize');\n });\n }\n };\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{
|
|
2
|
-
//# sourceMappingURL=48.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{39:function(a,e){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>'}}))}}]);
|
|
2
|
+
//# sourceMappingURL=48.e495edf3c48e1b2fc052.bundle.js.map
|
package/dist/{48.4b57a948edab2d3b9c55.bundle.js.map → 48.e495edf3c48e1b2fc052.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/core/directives/paginations.js"],"names":["angular","module","directive","template"],"mappings":"2EAAAA,QAAQC,OAAO,gDAAiD,IAC3DC,UAAU,eAAe,WACtB,MAAO,CACHC,SAAU","file":"48.
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/core/directives/paginations.js"],"names":["angular","module","directive","template"],"mappings":"2EAAAA,QAAQC,OAAO,gDAAiD,IAC3DC,UAAU,eAAe,WACtB,MAAO,CACHC,SAAU","file":"48.e495edf3c48e1b2fc052.bundle.js","sourcesContent":["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"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{33:function(e,t,n){"use strict";n.r(t);n(4),n(12);function r(e,t,n,r,o,i,a,s,u,c,d,l,g,f){const y={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let p,m=c.getPrincipal();function h(e,t){y.inference=t.appSettings.DEFAULT_INFERENCE,y.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=g.get(f.TABS_STATE)||[y],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){T(n.currentQuery)})),e.$on("repositoryIsSet",S)}function T(t){!function(){if(r.isActiveRepoOntopType())return;const t=document.getElementById("sameAs");!t||e.currentQuery.inference||t.disabled?e.currentQuery.inference&&t.disabled&&(t.removeAttribute("disabled"),e.currentQuery.sameAs=m.appSettings.DEFAULT_SAMEAS):(t.disabled=!0,e.currentQuery.sameAs=!1)}(),e.tabs.forEach((function(n,o){n.id===t.id&&(e.tabs[o].query=t.query,r.isActiveRepoOntopType()||(e.tabs[o].inference=t.inference,e.tabs[o].sameAs=t.sameAs))})),g.set(f.TABS_STATE,e.tabs)}function b(t,n,r,o){const i=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=o,i.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,i.removeClass("hide")),null===e.$$phase&&e.$apply()}function w(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function C(){w(!0)}function S(t,n){n.newRepo&&(e.tabsData=g.get(f.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),g.set(f.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function E(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function v(o,i){if(e.executedQueryTab=e.currentQuery,i){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void n.warning("Explain only works with SELECT or CONSTRUCT queries.");if(r.isActiveRepoOntopType())return void n.warning("Explain not supported for Virtual repositories.")}if(e.explainRequested=i,!e.queryIsRunning){if(o?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&r.isActiveRepoOntopType())return void n.warning("Updates are not supported for Virtual repositories.");if(b(!0,"update"===e.lastRunQueryMode?"Executing update":"Evaluating query"),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function Q(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?a.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);n.error(t,"Error! Could not get saved queries")})):$("#sampleQueriesCollapse").collapse("hide")}function A(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function M(t){return function(n,r,o){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:o},$(t).modal("show")}}function q(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}m?h(e,m):e.$on("securityInit",(function(e){m=c.getPrincipal(),h(e.currentScope,m)})),this.hint=document.createElement("span"),this.hint.innerHTML='Hint: "abC" matches "abC*", "ab c*" and "ab-c*"',this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=q(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=g.get(f.TABS_STATE)||[y];const o=q(n),i=e.tabsData[o];i.yasrData&&b(!0,"Rendering results",null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=i.outputType,i.yasrData&&(i.yasrData.customError?(e.yasr.results={getException:function(){return i.yasrData.customError}},b(!1)):t((function(){e.setYasrResponse(i.yasrData,i.textStatus,i.jqXhrOrErrorString),b(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),g.set(f.TABS_STATE_CURRENT_ID,n),e.currentQuery=i,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=i.queryType,e.currentTabConfig.resultsCount=i.resultsCount,e.currentTabConfig.offset=i.offset,e.currentTabConfig.allResultsCount=i.allResultsCount,e.currentTabConfig.allResultsCountExact=i.allResultsCountExact,e.currentTabConfig.page=i.page,e.currentTabConfig.pageSize=i.pageSize,e.currentTabConfig.timeFinished=i.timeFinished,e.currentTabConfig.timeTook=i.timeTook,e.currentTabConfig.sizeDelta=i.sizeDelta,e.currentTabConfig.customUpdateMessage=i.customUpdateMessage,e.currentTabConfig.errorMessage=i.errorMessage,e.currentTabConfig.warningMessage=i.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),p||(p=setInterval(x,200));!function(){const t=r.isActiveRepoOntopType(),n=r.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t&&(t.disabled=!!e);n&&(n.disabled=!!e)})(t),e.nocount=!(!t&&!n)||!m.appSettings.EXECUTE_COUNT,t&&(e.currentQuery.inference=!0,e.currentQuery.sameAs=!0)}()},e.addNewTab=function(n,r,o){if(!_(!0))return;let i;i=r||o?{id:"1",name:r,query:o,inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS};D++;const a=""+D;e.tabsData=e.tabs;const s=i;s.id=a,e.tabsData.push(s),g.set(f.TABS_STATE_MAXID,D),g.set(f.TABS_STATE,e.tabsData);const u=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),E(a),n&&n.apply(this,u)}),0),e.tabs=e.tabsData},e.isTabChangeOk=_,e.runQuery=v,e.abortCurrentQuery=function(){l.abortQueryByAlias(e.currentTrackAlias).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:'Edit Saved Query: "'+t.name+'"',query:t,edit:!0,okButtonText:"Save"}}}}).result.then((function(r){const o={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?a.addNewSavedQuery(o).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit saved query")})):a.editSavedQuery(o).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success("Saved query "+t.name+" was edited.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit Saved query")}))}))},e.getNamespaces=function(){b(!0,"Refreshing namespaces","Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first."),e.namespacesLoading=!0,d.getRepositoryNamespaces().success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){b(!1),e.namespacesLoading=!1}))},e.changePagination=function(){v(!0,e.explainRequested)},e.toggleSampleQueries=Q,e.addKnownPrefixes=function(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,"Error! Could not add known prefixes"),!0}))},e.getExistingTabId=A,e.querySelected=function(t){const n=A(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?E(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){i.openSimpleModal({title:"Confirm",message:"Are you sure you want to delete the saved query '"+t+"'?",warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){a.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success("Saved query: "+t+" was deleted.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot delete saved query")}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:"Create New Saved Query",query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:"Create",queryExists:n}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){a.addNewSavedQuery(t).success((function(){n.success("Saved query "+t.name+" was saved.")})).error((function(r){let o=getError(r);if(n.error(o,"Error! Cannot create saved query"),o="Query '"+t.name+"' already exists!"){t.query=t.body;const n=!0;e.saveQuery(t,n)}}))},e.saveQueryToLocal=T,e.setLoader=b,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?e.progressMessage+"... "+n:"Running operation... "+n;e.extraMessage&&t>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=w,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,g.set(f.VIEW_MODE,e.orientationViewMode),w()},e.showHideEditor=C,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!g.get(f.VIEW_MODE)||"true"===g.get(f.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return r.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return r.getActiveRepository()},e.orientationViewMode||C(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),g.set(f.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),g.set(f.TABS_STATE,e.tabs),clearInterval(p)})),e.$on("$destroy",(function(){clearInterval(p),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const n=$("#sampleQueriesCollapse");!n.is(t.target)&&0===n.has(t.target).length&&e.showSampleQueries&&Q()}));let D=g.get(f.TABS_STATE_MAXID)||1;function R(e){return $(e).attr("data-id")}function x(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function _(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info("New tabs may not be opened while query or update is running."):n.info("Tabs may not be switched while query or update is running."),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(R(r.relatedTarget))),e.loadTab(R(r.target));const o=["#ED4F2F","","#ED4F2F"],i=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",o[n]);const a=function(){n++,n<o.length?($(r.target).css("color",o[n]),r.target.timer=t(a,i[n])):$(r.target).css("color","")};t(a,i[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=M("#editQueryContainer"),e.deleteQueryModal=M("#confirmDeleteContainer"),e.saveQueryModal=M("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t="Showing results from "+s("currency")(e.currentTabConfig.offset,"",0)+" to "+s("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=e.currentTabConfig.allResultsCountExact?" of ":" of at least ",t+=s("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?e.currentTabConfig.customUpdateMessage:void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?"Removed "+Math.abs(e.currentTabConfig.sizeDelta)+" statements.":e.currentTabConfig.sizeDelta>0?"Added "+e.currentTabConfig.sizeDelta+" statements.":"The number of statements did not change."},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return"Possibly stale result (obtained "+e.getHumanReadableSeconds(t)+" ago)."};const N=function(){};angular.element(u).bind("resize",N),e.$on("$destroy",(function(){angular.element(u).unbind("resize",N)}))}function o(e,t,n){n.queryExists&&(e.queryExists=!0),e.query=angular.copy(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",r).controller("QuerySampleModalCtrl",o),r.$inject=["$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys"],o.$inject=["$scope","$modalInstance","data"]}}]);
|
|
2
|
+
//# sourceMappingURL=49.80591a5efda019de6e4a.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack:///./src/js/angular/core/directives/queryeditor/query-editor.controller.js"],"names":["QueryEditorCtrl","$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys","defaultTabConfig","id","name","query","inference","sameAs","checkQueryIntervalId","principal","getPrincipal","initTabs","scope","appSettings","DEFAULT_INFERENCE","DEFAULT_SAMEAS","skipCountQuery","EXECUTE_COUNT","ignoreSharedQueries","IGNORE_SHARED_QUERIES","tabsData","tabs","get","TABS_STATE","$watchCollection","newVal","oldVal","saveQueryToLocal","currentQuery","$on","deleteCachedSparqlResults","currentQueryTab","isActiveRepoOntopType","sameAsBtn","document","getElementById","disabled","removeAttribute","shouldDisableSameAs","forEach","tab","index","set","setLoader","isRunning","progressMessage","extraMessage","noTimer","yasrInnerContainer","angular","element","queryIsRunning","queryStartTime","Date","now","countTimeouted","noLoaderTimer","addClass","currentTrackAlias","abortRequested","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalView","visibleWindowHeight","window","innerHeight","documentElement","clientHeight","body","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","editor","timer","cancel","yasr","container","resize","showHideEditor","foo","params","newRepo","item","yasrData","undefined","queryType","resultsCount","allResultsCount","sizeDelta","errorMessage","repositoryError","selectTab","$","runQuery","changePage","explain","executedQueryTab","getQueryType","warning","explainRequested","currentTabConfig","resetCurrentTabConfig","lastRunQueryMode","getQueryMode","toggleSampleQueries","showSampleQueries","getSavedQueries","success","data","sampleQueries","collapse","width","error","msg","getError","getExistingTabId","existingTabId","showModal","modalSelector","shared","savedQuery","getValue","modal","findTabIndexByID","i","length","currentScope","this","hint","createElement","innerHTML","fontSize","color","backgroundColor","position","zIndex","$watch","newValue","elRect","appendChild","top","left","right","offsetWidth","parentNode","removeChild","pageSize","page","queryExists","saveTab","idx","loadTab","setValue","updateDownloadDropdown","$broadcast","options","output","outputType","customError","results","getException","setYasrResponse","textStatus","jqXhrOrErrorString","hasClass","click","TABS_STATE_CURRENT_ID","offset","allResultsCountExact","timeFinished","timeTook","customUpdateMessage","warningMessage","css","setInterval","showOrHideSaveAsDropDown","isOntop","isFedX","isActiveRepoFedXType","inferenceBtn","handleSameAsAndInferenceBtns","nocount","overrideSameAsInferenceAndNoCountIfNeeded","addNewTab","callback","tabName","isTabChangeOk","maxID","newID","newTab","push","TABS_STATE_MAXID","callbackArgs","Array","prototype","slice","call","arguments","apply","abortCurrentQuery","abortQueryByAlias","editQuery","open","templateUrl","controller","resolve","title","edit","okButtonText","result","then","queryModal","addNewSavedQuery","deleteQueryHttp","editSavedQuery","getNamespaces","namespacesLoading","getRepositoryNamespaces","usedPrefixes","bindings","e","prefix","value","namespace","namespaces","finally","changePagination","addKnownPrefixes","JSON","stringify","isDefined","querySelected","tabId","highlightNextTabChange","deleteQuery","savedQueryName","openSimpleModal","message","deleteSavedQuery","saveQuery","saveQueryHttp","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","VIEW_MODE","focusQueryEditor","find","is","focus","getActiveRepository","getActiveRepositoryNoError","onbeforeunload","clearInterval","mouseup","event","target","has","getQueryID","attr","$saveAsDropDown","queryValid","header","remove","isNew","info","tabEvent","relatedTarget","colors","times","highlightFun","editQueryModal","deleteQueryModal","saveQueryModal","getResultsDescription","desc","currentPageEnd","Math","min","getUpdateDescription","abs","getStaleWarningMessage","secondsAgo","round","bind","unbind","QuerySampleModalCtrl","$modalInstance","copy","ok","form","$valid","close","dismiss","module","$inject"],"mappings":"0FAAA,kBAaA,SAASA,EAAgBC,EAAQC,EAAUC,EAAQC,EAAeC,EAAQC,EAAcC,EAAmBC,EAASC,EAASC,EAAUC,EAA8BC,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G,EAAKmG,KACnBrO,EAAOsO,aAAepG,EAAKoG,aAC3BtO,EAAOwT,GAAK,WACJxT,EAAOyT,KAAKC,QACZJ,EAAeK,MAAM3T,EAAOiB,QAIpCjB,EAAOgG,OAAS,WACZsN,EAAeM,QAAQ,WA96B/B/P,QACKgQ,OAAO,4DAA6D,CACjE,8CACA,0CAEH3F,WAAW,kBAAmBnO,GAC9BmO,WAAW,uBAAwBmF,GAExCtT,EAAgB+T,QAAU,CAAC,SAAU,WAAY,SAAU,gBAAiB,SAAU,eAAgB,oBAAqB,UAAW,UAAW,WAAY,+BAAgC,wBAAyB,sBAAuB,UAq5B7OT,EAAqBS,QAAU,CAAC,SAAU,iBAAkB","file":"49.80591a5efda019de6e4a.bundle.js","sourcesContent":["import 'angular/utils/local-storage-adapter';\nimport 'angular/rest/sparql.rest.service';\n\nangular\n .module('graphdb.framework.core.directives.queryeditor.controllers', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.rest.sparql.service'\n ])\n .controller('QueryEditorCtrl', QueryEditorCtrl)\n .controller('QuerySampleModalCtrl', QuerySampleModalCtrl);\n\nQueryEditorCtrl.$inject = ['$scope', '$timeout', 'toastr', '$repositories', '$modal', 'ModalService', 'SparqlRestService', '$filter', '$window', '$jwtAuth', 'RDF4JRepositoriesRestService', 'MonitoringRestService', 'LocalStorageAdapter', 'LSKeys'];\n\nfunction QueryEditorCtrl($scope, $timeout, toastr, $repositories, $modal, ModalService, SparqlRestService, $filter, $window, $jwtAuth, RDF4JRepositoriesRestService, MonitoringRestService, LocalStorageAdapter, LSKeys) {\n const defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: true,\n sameAs: true\n };\n\n let principal = $jwtAuth.getPrincipal();\n let checkQueryIntervalId;\n if (principal) {\n initTabs($scope, principal);\n // principal is not yet set, wait for its initialization\n } else {\n $scope.$on('securityInit', function (scope) {\n principal = $jwtAuth.getPrincipal();\n initTabs(scope.currentScope, principal);\n });\n }\n\n function initTabs(scope, principal) {\n defaultTabConfig.inference = principal.appSettings.DEFAULT_INFERENCE;\n defaultTabConfig.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n\n scope.skipCountQuery = !principal.appSettings.EXECUTE_COUNT;\n scope.ignoreSharedQueries = principal.appSettings.IGNORE_SHARED_QUERIES;\n scope.tabsData = scope.tabs = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function (newVal, oldVal, scope) {\n saveQueryToLocal(scope.currentQuery);\n });\n\n scope.$on('repositoryIsSet', deleteCachedSparqlResults);\n }\n\n this.hint = document.createElement(\"span\");\n this.hint.innerHTML = \"Hint: \\\"abC\\\" matches \\\"abC*\\\", \\\"ab c*\\\" and \\\"ab-c*\\\"\";\n this.hint.style.fontSize = \"12px\";\n this.hint.style.color = \"gray\";\n this.hint.style.backgroundColor = \"white\";\n this.hint.style.position = \"absolute\";\n this.hint.style.zIndex = \"3\";\n this.hint.style.paddingLeft = 12 + \"px\";\n\n $scope.$watch(function() {\n return angular.element('.CodeMirror-hints').length;\n }, (newValue) => {\n if (newValue) {\n const elRect = angular.element('.CodeMirror-hints')[0].getBoundingClientRect();\n document.body.appendChild(this.hint);\n this.hint.style.top = elRect.top - 20 + \"px\";\n this.hint.style.left = elRect.right - this.hint.offsetWidth - 12 + \"px\";\n } else {\n this.hint && this.hint.parentNode && this.hint.parentNode.removeChild(this.hint);\n }\n });\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 1000,\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n $scope.isTabChangeOk = isTabChangeOk;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.abortCurrentQuery = abortCurrentQuery;\n $scope.editQuery = editQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.deleteQuery = deleteQuery;\n $scope.deleteQueryHttp = deleteQueryHttp;\n $scope.saveQuery = saveQuery;\n $scope.saveQueryHttp = saveQueryHttp;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = LocalStorageAdapter.get(LSKeys.VIEW_MODE) ? LocalStorageAdapter.get(LSKeys.VIEW_MODE) === \"true\" : true;\n $scope.viewMode = 'none';\n\n // start of repository actions\n // FIXME: do we need this??\n // $scope.getActiveRepository();\n $scope.getActiveRepository = function () {\n // same as getActiveRepository() but takes into account repo errors\n return $repositories.getActiveRepository();\n };\n\n $scope.getActiveRepositoryNoError = function () {\n if (!$scope.repositoryError) {\n return $repositories.getActiveRepository();\n }\n };\n\n function saveQueryToLocal(currentQueryTab) {\n shouldDisableSameAs();\n $scope.tabs.forEach(function (tab, index) {\n if (tab.id === currentQueryTab.id) {\n $scope.tabs[index].query = currentQueryTab.query;\n // Don't store inference and sameAs values for Ontop repository,\n // because they are overridden afterwards to true\n if (!$repositories.isActiveRepoOntopType()) {\n $scope.tabs[index].inference = currentQueryTab.inference;\n $scope.tabs[index].sameAs = currentQueryTab.sameAs;\n }\n }\n });\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n }\n\n function setLoader(isRunning, progressMessage, extraMessage, noTimer) {\n const yasrInnerContainer = angular.element(document.getElementById(\"yasr-inner\"));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n $scope.noLoaderTimer = noTimer;\n yasrInnerContainer.addClass(\"hide\");\n } else {\n $scope.progressMessage = \"\";\n $scope.extraMessage = \"\";\n $scope.noLoaderTimer = false;\n $scope.currentTrackAlias = null;\n $scope.abortRequested = false;\n yasrInnerContainer.removeClass(\"hide\");\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n let timeHuman = \"\";\n let message = \"\";\n\n if (!$scope.noLoaderTimer) {\n timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n }\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + \"... \" + timeHuman;\n } else {\n message = \"Running operation... \" + timeHuman;\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += \"\\n\" + $scope.extraMessage;\n }\n\n return message;\n }\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalView) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.CodeMirror-wrap')) {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n //window.editor.refresh();\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView);\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector('.CodeMirror-wrap').getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector('.CodeMirror-wrap').style.height = newHeight + 'px';\n //window.editor.refresh();\n } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n //window.editor.refresh();\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode() {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n LocalStorageAdapter.set(LSKeys.VIEW_MODE, $scope.orientationViewMode);\n fixSizesOnHorizontalViewModeSwitch();\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(\":focus\")) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function deleteCachedSparqlResults(foo, params) {\n if (params.newRepo) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE);\n $scope.tabsData.forEach(function (item) {\n item.yasrData = undefined;\n item.queryType = undefined;\n item.resultsCount = 0;\n item.allResultsCount = 0;\n item.sizeDelta = undefined;\n });\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n $scope.tabs = $scope.tabsData;\n\n // The repository is changed. Remove error messages as well, if any\n $scope.currentQuery = {};\n $scope.errorMessage = null;\n $scope.repositoryError = null;\n }\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n window.onbeforeunload = function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n };\n\n $scope.$on('$destroy', function () {\n if ($scope.currentQuery) {\n $scope.saveTab($scope.currentQuery.id);\n }\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabs);\n clearInterval(checkQueryIntervalId);\n });\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (explain) {\n if (!(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning('Explain only works with SELECT or CONSTRUCT queries.');\n return;\n }\n\n if ($repositories.isActiveRepoOntopType()) {\n toastr.warning('Explain not supported for Virtual repositories.');\n return;\n }\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n $scope.lastRunQueryMode = window.editor.getQueryMode();\n\n if ($scope.lastRunQueryMode === 'update' && $repositories.isActiveRepoOntopType()) {\n toastr.warning('Updates are not supported for Virtual repositories.');\n return;\n }\n\n setLoader(true, $scope.lastRunQueryMode === 'update' ? 'Executing update' : 'Evaluating query');\n if ($scope.viewMode !== 'none') {\n $scope.viewMode = 'none';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n const timer = $timeout(window.editor.query, 500);\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n } else {\n window.editor.query();\n }\n }\n }\n\n function abortCurrentQuery() {\n MonitoringRestService.abortQueryByAlias($scope.currentTrackAlias)\n .success(function () {\n $scope.abortRequested = true;\n });\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, 'Refreshing namespaces', 'Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first.');\n $scope.namespacesLoading = true;\n\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n $scope.namespacesLoading = false;\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n $scope.$on(\"$destroy\", function () {\n clearInterval(checkQueryIntervalId);\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n $scope.showSampleQueries = !$scope.showSampleQueries;\n if ($scope.showSampleQueries) {\n SparqlRestService.getSavedQueries()\n .success(function (data) {\n $scope.sampleQueries = data;\n $('#sampleQueriesCollapse').collapse('show').width('300px');\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error! Could not get saved queries');\n });\n } else {\n $('#sampleQueriesCollapse').collapse('hide');\n }\n }\n\n // Hide the sample queries when the user clicks somewhere else in the UI.\n $(document).mouseup(function (event) {\n const container = $('#sampleQueriesCollapse');\n if (!container.is(event.target) // if the target of the click isn't the container..\n && container.has(event.target).length === 0 //... nor a descendant of the container\n && $scope.showSampleQueries) {\n toggleSampleQueries();\n }\n });\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error! Could not add known prefixes');\n return true;\n });\n }\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n\n if ($scope.isTabChangeOk(false)) {\n $scope.highlightNextTabChange = true;\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n $scope.tabsData.forEach(function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n return existingTabId;\n }\n\n function editQuery(query) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: 'Edit Saved Query: \"' + query.name + '\"',\n query: query,\n edit: true,\n okButtonText: 'Save'\n };\n }\n }\n });\n\n modalInstance.result.then(function (queryModal) {\n const data = {\n name: queryModal.name,\n body: queryModal.body,\n shared: queryModal.shared\n };\n if (query.name !== queryModal.name) {\n SparqlRestService.addNewSavedQuery(data)\n .success(function () {\n $scope.deleteQueryHttp(query.name, true);\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, 'Error! Cannot edit saved query');\n });\n } else {\n SparqlRestService.editSavedQuery(data)\n .success(function () {\n $('#editQueryContainer').modal('hide');\n $scope.toggleSampleQueries();\n toastr.success('Saved query ' + query.name + ' was edited.');\n })\n .error(function (error) {\n const msg = getError(error);\n toastr.error(msg, 'Error! Cannot edit Saved query');\n });\n }\n });\n }\n\n function deleteQueryHttp(savedQueryName, edit) {\n SparqlRestService.deleteSavedQuery(savedQueryName)\n .success(function () {\n $scope.toggleSampleQueries();\n if (!edit) {\n toastr.success('Saved query: ' + savedQueryName + ' was deleted.');\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error! Cannot delete saved query');\n });\n }\n\n function deleteQuery(savedQueryName) {\n ModalService.openSimpleModal({\n title: 'Confirm',\n message: 'Are you sure you want to delete the saved query ' + '\\'' + savedQueryName + '\\'?',\n warning: true\n }).result\n .then(function () {\n $scope.deleteQueryHttp(savedQueryName);\n });\n }\n\n function saveQueryHttp(query) {\n SparqlRestService.addNewSavedQuery(query)\n .success(function () {\n toastr.success('Saved query ' + query.name + ' was saved.');\n })\n .error(function (data) {\n let msg = getError(data);\n toastr.error(msg, 'Error! Cannot create saved query');\n // TODO: This condition will always be true\n if (msg = \"Query '\" + query.name + \"' already exists!\") {\n query.query = query.body;\n const queryExists = true;\n $scope.saveQuery(query, queryExists);\n }\n });\n }\n\n function saveQuery(query, queryExists) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/core/directives/queryeditor/templates/query-sample.html',\n controller: 'QuerySampleModalCtrl',\n resolve: {\n data: function () {\n return {\n title: 'Create New Saved Query',\n query: {name: query.name, body: query.query, shared: query.shared},\n edit: false,\n okButtonText: 'Create',\n queryExists: queryExists\n };\n }\n }\n });\n\n modalInstance.result.then(function (query) {\n $scope.saveQueryHttp(query);\n }, function () {\n });\n }\n\n // end of query operations\n\n function showModal(modalSelector) {\n return function (name, query, shared) {\n $scope.savedQuery = {\n name: name,\n query: query || window.editor.getValue(),\n shared: shared\n };\n $(modalSelector).modal('show');\n };\n }\n\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n let maxID = LocalStorageAdapter.get(LSKeys.TABS_STATE_MAXID) || 1;\n\n function addNewTab(callback, tabName, savedQuery) { // optional callback to call after tab has been added\n if (!isTabChangeOk(true)) {\n return;\n }\n let defaultTabConfig;\n if (tabName || savedQuery) {\n defaultTabConfig = {\n id: \"1\",\n name: tabName,\n query: savedQuery,\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n } else {\n defaultTabConfig = {\n id: \"1\",\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: principal.appSettings.DEFAULT_INFERENCE,\n sameAs: principal.appSettings.DEFAULT_SAMEAS\n };\n }\n\n maxID++;\n const newID = '' + maxID;\n $scope.tabsData = $scope.tabs;\n\n const newTab = defaultTabConfig;\n newTab.id = newID;\n\n $scope.tabsData.push(newTab);\n\n LocalStorageAdapter.set(LSKeys.TABS_STATE_MAXID, maxID);\n LocalStorageAdapter.set(LSKeys.TABS_STATE, $scope.tabsData);\n const callbackArgs = Array.prototype.slice.call(arguments, 1); // skip one argument, i.e. the callback itself\n $timeout(function () {\n $scope.$apply();\n selectTab(newID);\n if (callback) {\n callback.apply(this, callbackArgs);\n }\n }, 0);\n $scope.tabs = $scope.tabsData;\n }\n\n function loadTab(id) {\n $scope.tabsData = LocalStorageAdapter.get(LSKeys.TABS_STATE) || [defaultTabConfig];\n\n // find available tab\n const idx = findTabIndexByID(id);\n const tab = $scope.tabsData[idx];\n\n if (tab.yasrData) {\n setLoader(true, 'Rendering results', null, true);\n }\n\n // set query in editor available on the current tab\n $timeout(function () {\n if ($scope.currentQuery.query === '') {\n $scope.currentQuery.query = \" \";\n }\n $timeout(function () {\n window.editor.setValue($scope.currentQuery.query);\n $scope.yasr.updateDownloadDropdown();\n $scope.$broadcast('tabLoaded', $scope.currentQuery.id);\n\n // set query results in query results sections after\n // previous query execution. Yasr response rendering depends on the\n // query type of window.editor!\n $scope.yasr.options.output = tab.outputType; // this may be undefined, that's fine!\n if (tab.yasrData) {\n if (tab.yasrData.customError) {\n // Our injected custom (not real HTTP) error\n $scope.yasr.results = {\n getException: function () {\n return tab.yasrData.customError;\n }\n };\n setLoader(false);\n } else {\n // Real YASR result\n $timeout(function () {\n $scope.setYasrResponse(tab.yasrData, tab.textStatus, tab.jqXhrOrErrorString);\n setLoader(false);\n if ($('.yasr_btnGroup li:nth-child(2)').hasClass(\"active\")) {\n $timeout(function () {\n $('.yasr_btnGroup li:nth-child(2) a').get(0).click();\n }, 0);\n }\n }, 0);\n }\n }\n }, 0);\n }, 0);\n\n\n // persist current tab id in local storage\n LocalStorageAdapter.set(LSKeys.TABS_STATE_CURRENT_ID, id);\n\n $scope.currentQuery = tab;\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.allResultsCountExact = tab.allResultsCountExact;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.currentTabConfig.customUpdateMessage = tab.customUpdateMessage;\n $scope.currentTabConfig.errorMessage = tab.errorMessage;\n $scope.currentTabConfig.warningMessage = tab.warningMessage;\n\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n\n if (!checkQueryIntervalId) {\n checkQueryIntervalId = setInterval(showOrHideSaveAsDropDown, 200);\n }\n overrideSameAsInferenceAndNoCountIfNeeded();\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n function showOrHideSaveAsDropDown() {\n // If selected tab has results and query in editor controller is invalid save as\n // dropdown menu will be removed and on fixing query latter will be added\n if ($scope.currentTabConfig.resultsCount >= 0) {\n const $saveAsDropDown = $('.saveAsDropDown');\n if ($saveAsDropDown.length > 0 && !window.editor.queryValid) {\n yasr.header.find('.saveAsDropDown').remove();\n } else if ($saveAsDropDown.length === 0 && window.editor.queryValid) {\n yasr.updateDownloadDropdown();\n }\n }\n }\n\n function isTabChangeOk(isNew) {\n if ($scope.queryIsRunning && !$scope.namespacesLoading) {\n if (isNew) {\n toastr.info('New tabs may not be opened while query or update is running.');\n } else {\n toastr.info('Tabs may not be switched while query or update is running.');\n }\n\n return false;\n }\n\n return true;\n }\n\n // Raise this flag to provide visual feedback to the user the next time a tab changes\n // (either manually or by the system). See GDB-1983.\n $scope.highlightNextTabChange = false;\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n // Cancel any highlight timer that might have been left by the last highlight\n $timeout.cancel(tabEvent.relatedTarget.timer);\n $(tabEvent.relatedTarget).css('color', '');\n\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n\n $scope.loadTab(getQueryID(tabEvent.target));\n\n // These arrays define how the tab change will be visually enhanced.\n // colors contains the colors to set to the tab name,\n // while times defines the times in milliseconds to keep each color.\n // Once we cycle through the arrays we restore the default color.\n const colors = ['#ED4F2F', '', '#ED4F2F'];\n const times = [400, 400, 400];\n if ($scope.highlightNextTabChange) {\n $scope.highlightNextTabChange = false;\n let index = 0;\n $(tabEvent.target).css('color', colors[index]);\n const highlightFun = function () {\n index++;\n if (index < colors.length) {\n $(tabEvent.target).css('color', colors[index]);\n tabEvent.target.timer = $timeout(highlightFun, times[index]);\n } else {\n $(tabEvent.target).css('color', '');\n }\n };\n $timeout(highlightFun, times[index]);\n }\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = {};\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n $scope.editQueryModal = showModal('#editQueryContainer');\n $scope.deleteQueryModal = showModal('#confirmDeleteContainer');\n $scope.saveQueryModal = showModal('#saveQueryContainer');\n\n $scope.getResultsDescription = function () {\n let desc;\n if ($scope.currentTabConfig.resultsCount === 0) {\n desc = \"No results.\";\n } else {\n const currentPageEnd = ($scope.currentTabConfig.page - 1) * $scope.currentTabConfig.pageSize\n + Math.min($scope.currentTabConfig.resultsCount, $scope.currentTabConfig.pageSize);\n desc = \"Showing results from \" + $filter('currency')($scope.currentTabConfig.offset, '', 0)\n + \" to \" + $filter('currency')(currentPageEnd, '', 0);\n if ($scope.currentTabConfig.allResultsCount > 0) {\n // Unsure total results count \"of at least\" happens if counting timed out or\n // counting was disabled and we got at least $pageSize + 1 results for the current page.\n // It may reset become exact when we navigate and reach the end of results.\n desc += $scope.currentTabConfig.allResultsCountExact\n ? \" of \" : \" of at least \";\n desc += $filter('currency')($scope.currentTabConfig.allResultsCount, '', 0);\n }\n desc += \".\";\n }\n\n return desc;\n };\n\n $scope.getUpdateDescription = function () {\n if ($scope.currentTabConfig.customUpdateMessage) {\n return $scope.currentTabConfig.customUpdateMessage;\n } else if ($scope.currentTabConfig.sizeDelta === undefined) {\n return '';\n } else if ($scope.currentTabConfig.sizeDelta < 0) {\n return 'Removed ' + Math.abs($scope.currentTabConfig.sizeDelta) + ' statements.';\n } else if ($scope.currentTabConfig.sizeDelta > 0) {\n return 'Added ' + $scope.currentTabConfig.sizeDelta + ' statements.';\n } else {\n return 'The number of statements did not change.';\n }\n };\n\n $scope.getStaleWarningMessage = function () {\n const secondsAgo = Math.round((Date.now() - $scope.currentTabConfig.timeFinished) / 60000) * 60;\n if (secondsAgo >= 3600) { // must be at least an hour\n return \"Possibly stale result (obtained \" + $scope.getHumanReadableSeconds(secondsAgo) + \" ago).\";\n }\n };\n\n const resize = function () {\n // $scope.fixSizesOnHorizontalViewModeSwitch();\n };\n\n angular.element($window).bind('resize', resize);\n\n $scope.$on('$destroy', function () {\n angular.element($window).unbind('resize', resize);\n });\n\n /**\n * In case of Ontop repository, sameAs, inference and nocount are\n * overridden to true and #sameAs and #inference buttons are disabled, In case of FedX repo nocount is overridden\n */\n function overrideSameAsInferenceAndNoCountIfNeeded() {\n const isOntop = $repositories.isActiveRepoOntopType();\n const isFedX = $repositories.isActiveRepoFedXType();\n handleSameAsAndInferenceBtns(isOntop);\n\n $scope.nocount = (isOntop || isFedX) ? true : !principal.appSettings.EXECUTE_COUNT;\n if (isOntop) {\n $scope.currentQuery.inference = true;\n $scope.currentQuery.sameAs = true;\n }\n }\n\n function handleSameAsAndInferenceBtns(isOntop) {\n const sameAsBtn = document.getElementById('sameAs');\n const inferenceBtn = document.getElementById('inference');\n\n if (sameAsBtn) {\n sameAsBtn.disabled = !!isOntop;\n }\n\n if (inferenceBtn) {\n inferenceBtn.disabled = !!isOntop;\n }\n }\n\n // The sameAs is meaningless without inference.\n // Set its value to false and disable button\n function shouldDisableSameAs() {\n // don't try to override sameAs if repository is Ontop type\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n const sameAsBtn = document.getElementById('sameAs');\n if (sameAsBtn && !$scope.currentQuery.inference && !sameAsBtn.disabled) {\n sameAsBtn.disabled = true;\n $scope.currentQuery.sameAs = false;\n } else if ($scope.currentQuery.inference && sameAsBtn.disabled) {\n sameAsBtn.removeAttribute('disabled');\n $scope.currentQuery.sameAs = principal.appSettings.DEFAULT_SAMEAS;\n }\n }\n}\n\nQuerySampleModalCtrl.$inject = ['$scope', '$modalInstance', 'data'];\n\nfunction QuerySampleModalCtrl($scope, $modalInstance, data) {\n if (data.queryExists) {\n $scope.queryExists = true;\n }\n $scope.query = angular.copy(data.query);\n $scope.title = data.title;\n $scope.edit = data.edit;\n $scope.okButtonText = data.okButtonText;\n $scope.ok = function () {\n if ($scope.form.$valid) {\n $modalInstance.close($scope.query);\n }\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n"],"sourceRoot":""}
|