graphdb-workbench 1.11.2 → 1.11.3-TR1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/10.94e753e068396d6b6ec9.bundle.js +2 -0
- package/dist/10.94e753e068396d6b6ec9.bundle.js.map +1 -0
- package/dist/11.043e8d20764e39c10e31.bundle.js +2 -0
- package/dist/11.043e8d20764e39c10e31.bundle.js.map +1 -0
- package/dist/111.73819c3722ceee587ce7.bundle.js +2 -0
- package/dist/111.73819c3722ceee587ce7.bundle.js.map +1 -0
- package/dist/112.b48a6ea437c1c3ddd7b5.bundle.js +2 -0
- package/dist/112.b48a6ea437c1c3ddd7b5.bundle.js.map +1 -0
- package/dist/113.09a0a17c31bfc387c352.bundle.js +2 -0
- package/dist/113.09a0a17c31bfc387c352.bundle.js.map +1 -0
- package/dist/{114.edebb3161ce52d4ca2e1.bundle.js → 114.dcc909bf7059e08fad2a.bundle.js} +2 -2
- package/dist/{114.edebb3161ce52d4ca2e1.bundle.js.map → 114.dcc909bf7059e08fad2a.bundle.js.map} +1 -1
- package/dist/119.08aed6d34851afdefac5.bundle.js +2 -0
- package/dist/119.08aed6d34851afdefac5.bundle.js.map +1 -0
- package/dist/12.bb55709d82da219afedf.bundle.js +2 -0
- package/dist/12.bb55709d82da219afedf.bundle.js.map +1 -0
- package/dist/121.574db48a413271cafc2e.bundle.js +2 -0
- package/dist/121.574db48a413271cafc2e.bundle.js.map +1 -0
- package/dist/123.9ba8fea15f3fcddc734d.bundle.js +2 -0
- package/dist/123.9ba8fea15f3fcddc734d.bundle.js.map +1 -0
- package/dist/125.4ffda62ed511df3132f6.bundle.js +2 -0
- package/dist/125.4ffda62ed511df3132f6.bundle.js.map +1 -0
- package/dist/126.c5fd3ba65878ffcc3c03.bundle.js +2 -0
- package/dist/126.c5fd3ba65878ffcc3c03.bundle.js.map +1 -0
- package/dist/129.5d023d0fbbb2c517932c.bundle.js +2 -0
- package/dist/129.5d023d0fbbb2c517932c.bundle.js.map +1 -0
- package/dist/131.e7a34e7f2b2e5898249d.bundle.js +2 -0
- package/dist/131.e7a34e7f2b2e5898249d.bundle.js.map +1 -0
- package/dist/132.b98cc245bf2c668b2ffd.bundle.js +2 -0
- package/dist/132.b98cc245bf2c668b2ffd.bundle.js.map +1 -0
- package/dist/134.72b76429fe72a9fc5119.bundle.js +2 -0
- package/dist/134.72b76429fe72a9fc5119.bundle.js.map +1 -0
- package/dist/136.991f41ef4565f68c31a7.bundle.js +2 -0
- package/dist/136.991f41ef4565f68c31a7.bundle.js.map +1 -0
- package/dist/137.b62f0afcb15c29764c04.bundle.js +2 -0
- package/dist/137.b62f0afcb15c29764c04.bundle.js.map +1 -0
- package/dist/138.fba22be7b3b98750e0c3.bundle.js +2 -0
- package/dist/138.fba22be7b3b98750e0c3.bundle.js.map +1 -0
- package/dist/{14.0c709b039159410b0b91.bundle.js → 14.6f8b993e972dee32e159.bundle.js} +2 -2
- package/dist/14.6f8b993e972dee32e159.bundle.js.map +1 -0
- package/dist/140.b4777706146b1ac867ed.bundle.js +2 -0
- package/dist/140.b4777706146b1ac867ed.bundle.js.map +1 -0
- package/dist/141.4464fb26b1893e0dbc7a.bundle.js +2 -0
- package/dist/141.4464fb26b1893e0dbc7a.bundle.js.map +1 -0
- package/dist/142.4d4fdae663dbeb2df310.bundle.js +2 -0
- package/dist/142.4d4fdae663dbeb2df310.bundle.js.map +1 -0
- package/dist/145.c9ab7d2a56005326406c.bundle.js +2 -0
- package/dist/145.c9ab7d2a56005326406c.bundle.js.map +1 -0
- package/dist/146.f5efcb8ef74bf52d3daf.bundle.js +2 -0
- package/dist/146.f5efcb8ef74bf52d3daf.bundle.js.map +1 -0
- package/dist/{147.0798c61ee5472e70b552.bundle.js → 147.fa44265c07ea2c3c5615.bundle.js} +2 -2
- package/dist/{147.0798c61ee5472e70b552.bundle.js.map → 147.fa44265c07ea2c3c5615.bundle.js.map} +1 -1
- package/dist/148.8b1e910543c6c25b2f0b.bundle.js +2 -0
- package/dist/148.8b1e910543c6c25b2f0b.bundle.js.map +1 -0
- package/dist/15.eb562ad073aa0fcd725f.bundle.js +2 -0
- package/dist/15.eb562ad073aa0fcd725f.bundle.js.map +1 -0
- package/dist/16.0a3c03f05a4bbdfe83ef.bundle.js +2 -0
- package/dist/16.0a3c03f05a4bbdfe83ef.bundle.js.map +1 -0
- package/dist/18.c3e44ed00a2532402729.bundle.js +3 -0
- package/dist/18.c3e44ed00a2532402729.bundle.js.map +1 -0
- package/dist/20.264daf29beccbf7de84a.bundle.js +2 -0
- package/dist/20.264daf29beccbf7de84a.bundle.js.map +1 -0
- package/dist/22.e85ffde858c596437b7a.bundle.js +1 -1
- package/dist/22.e85ffde858c596437b7a.bundle.js.map +1 -1
- package/dist/23.c58eff831306fad29d42.bundle.js +2 -0
- package/dist/23.c58eff831306fad29d42.bundle.js.map +1 -0
- package/dist/25.8c10d875bf32c8648157.bundle.js +2 -0
- package/dist/25.8c10d875bf32c8648157.bundle.js.map +1 -0
- package/dist/{26.57526f30f6b3c581334d.bundle.js → 26.c59631eb4bc0bf8d26b2.bundle.js} +2 -2
- package/dist/26.c59631eb4bc0bf8d26b2.bundle.js.map +1 -0
- package/dist/27.ed9e0cc8aaa3a12c1fa2.bundle.js +2 -0
- package/dist/27.ed9e0cc8aaa3a12c1fa2.bundle.js.map +1 -0
- package/dist/28.8f5d9fc8ee46db2a6357.bundle.js +2 -0
- package/dist/28.8f5d9fc8ee46db2a6357.bundle.js.map +1 -0
- package/dist/30.d341c7532759bc79f41a.bundle.js +1 -1
- package/dist/30.d341c7532759bc79f41a.bundle.js.map +1 -1
- package/dist/{32.ba5b5ca3e4b7dcf5bd15.bundle.js → 32.1059e272ed99ba3db699.bundle.js} +2 -2
- package/dist/32.1059e272ed99ba3db699.bundle.js.map +1 -0
- package/dist/{35.b8c8d16a8707c20a1fcb.bundle.js → 35.1f53c71368afc468cc10.bundle.js} +2 -2
- package/dist/35.1f53c71368afc468cc10.bundle.js.map +1 -0
- package/dist/{36.d96e6ee811e8340ae320.bundle.js → 36.aced0c9768c16e4d29ef.bundle.js} +2 -2
- package/dist/36.aced0c9768c16e4d29ef.bundle.js.map +1 -0
- package/dist/37.dcbe2e4e1f86ca2da209.bundle.js +1 -1
- package/dist/37.dcbe2e4e1f86ca2da209.bundle.js.map +1 -1
- package/dist/38.171aa543e807777b4f29.bundle.js +1 -1
- package/dist/38.171aa543e807777b4f29.bundle.js.map +1 -1
- package/dist/40.f660048c67e9b6d478dc.bundle.js +2 -0
- package/dist/40.f660048c67e9b6d478dc.bundle.js.map +1 -0
- package/dist/{42.190f8880ee8f3a97a042.bundle.js → 42.9bbccd6cb2c263d7b873.bundle.js} +2 -2
- package/dist/42.9bbccd6cb2c263d7b873.bundle.js.map +1 -0
- package/dist/{43.899bf21ce1de203ace21.bundle.js → 43.6f609ec150488009b166.bundle.js} +2 -2
- package/dist/43.6f609ec150488009b166.bundle.js.map +1 -0
- package/dist/{44.c649782fa0755b53a62c.bundle.js → 44.8be8b582a97146d3ad6f.bundle.js} +2 -2
- package/dist/44.8be8b582a97146d3ad6f.bundle.js.map +1 -0
- package/dist/47.b94dca10f70c70009f46.bundle.js +2 -0
- package/dist/47.b94dca10f70c70009f46.bundle.js.map +1 -0
- package/dist/{48.52c5b13ab244c45a8c43.bundle.js → 48.10699147cdbee9af3c2b.bundle.js} +2 -2
- package/dist/48.10699147cdbee9af3c2b.bundle.js.map +1 -0
- package/dist/{5.21d2da4b4bc2b26e2534.bundle.js → 5.275d1f74283aff0821f2.bundle.js} +2 -2
- package/dist/5.275d1f74283aff0821f2.bundle.js.map +1 -0
- package/dist/{56.ce399f5788c0f5fe937b.bundle.js → 56.dae3cb719fcb013d7a06.bundle.js} +2 -2
- package/dist/56.dae3cb719fcb013d7a06.bundle.js.map +1 -0
- package/dist/68.5fa639981e7ce624fb73.bundle.js +2 -0
- package/dist/68.5fa639981e7ce624fb73.bundle.js.map +1 -0
- package/dist/{7.a0f5ec224bebd08058f4.bundle.js → 7.9946929545b7635857ac.bundle.js} +2 -2
- package/dist/7.9946929545b7635857ac.bundle.js.map +1 -0
- package/dist/75.3dd1e0c0ad0cf40ed6a1.bundle.js +2 -0
- package/dist/75.3dd1e0c0ad0cf40ed6a1.bundle.js.map +1 -0
- package/dist/78.6caec59329b53bb098ee.bundle.js +2 -0
- package/dist/78.6caec59329b53bb098ee.bundle.js.map +1 -0
- package/dist/{79.f4a2c3ec71bed08d61b9.bundle.js → 79.0f7567cb18c210d45806.bundle.js} +2 -2
- package/dist/79.0f7567cb18c210d45806.bundle.js.map +1 -0
- package/dist/{9.c9fc88a79b7990e29e04.bundle.js → 9.c4b55fc1e3fc858be626.bundle.js} +2 -2
- package/dist/9.c4b55fc1e3fc858be626.bundle.js.map +1 -0
- package/dist/{94.3efcd047d4d4e506cbd7.bundle.js → 94.afe4c166f07dbf1bc30f.bundle.js} +2 -2
- package/dist/94.afe4c166f07dbf1bc30f.bundle.js.map +1 -0
- package/dist/{96.754454264340bc9d9a70.bundle.js → 96.f7d3f181e8860ce2bd8b.bundle.js} +2 -2
- package/dist/96.f7d3f181e8860ce2bd8b.bundle.js.map +1 -0
- package/dist/bundle.48ae48a008439cff2323.bundle.js +79 -0
- package/dist/bundle.48ae48a008439cff2323.bundle.js.map +1 -0
- package/dist/index.html +7 -7
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +18 -18
- package/dist/js/angular/core/directives/queryeditor/templates/query-sample.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +3 -3
- package/dist/js/angular/core/templates/core-errors.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +3 -3
- package/dist/js/angular/externalsync/templates/deleteConnector.html +1 -1
- package/dist/js/angular/graphexplore/templates/modal/save-graph.html +1 -1
- package/dist/js/angular/graphexplore/templates/rdfsCommentLabelTemplate.html +3 -3
- package/dist/js/angular/graphexplore/templates/searchIconInputTemplate.html +3 -3
- package/dist/js/angular/import/templates/filesTable.html +12 -12
- package/dist/js/angular/import/templates/settingsModal.html +19 -19
- package/dist/js/angular/import/templates/textSnippet.html +4 -4
- package/dist/js/angular/import/templates/urlImport.html +4 -4
- package/dist/js/angular/repositories/templates/fedx-repo.html +28 -19
- package/dist/js/angular/repositories/templates/ontop-repo.html +8 -8
- package/dist/js/angular/security/templates/modal/default-authorities.html +3 -3
- package/dist/js/angular/security/templates/user.html +12 -12
- package/dist/js/angular/security/templates/users.html +11 -11
- package/dist/js/angular/settings/modal/location-settings.html +5 -5
- package/dist/js/angular/templates/modal/add-location.html +3 -3
- package/dist/js/angular/templates/modal/edit-location.html +3 -3
- package/dist/js/angular/templates/modal/editRepoFile.html +1 -1
- package/dist/js/angular/templates/modal/upload-repository-config.html +2 -2
- package/dist/pages/autocomplete.html +8 -8
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/clusterInfo.html +2 -2
- package/dist/pages/connectorsInfo.html +5 -5
- package/dist/pages/create-index.html +16 -16
- package/dist/pages/createConnector.html +22 -22
- package/dist/pages/dependencies.html +12 -12
- package/dist/pages/domainRangeInfo.html +4 -4
- package/dist/pages/edit.html +7 -7
- package/dist/pages/explore.html +10 -10
- package/dist/pages/export.html +14 -14
- package/dist/pages/find.html +2 -2
- package/dist/pages/graph-config/saveGraphConfig.html +28 -40
- package/dist/pages/graphs-visualizations.html +46 -46
- package/dist/pages/home.html +10 -10
- package/dist/pages/import.html +7 -7
- package/dist/pages/info.html +16 -16
- package/dist/pages/jdbc-create.html +20 -20
- package/dist/pages/jdbc.html +3 -3
- package/dist/pages/licenseInfo.html +1 -1
- package/dist/pages/login.html +2 -2
- package/dist/pages/monitor/queries.html +6 -6
- package/dist/pages/monitor/resources.html +3 -3
- package/dist/pages/namespaces.html +14 -14
- package/dist/pages/ontorefine.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +16 -16
- package/dist/pages/rdfrank.html +17 -17
- package/dist/pages/registerLicenseInfo.html +3 -3
- package/dist/pages/repositories.html +22 -22
- package/dist/pages/repository.html +28 -28
- package/dist/pages/similarity-indexes.html +15 -15
- package/dist/pages/sparql-template-create.html +9 -9
- package/dist/pages/sparql-templates.html +3 -3
- package/dist/pages/sparql.html +8 -8
- package/dist/pages/webapi.html +3 -3
- package/dist/res/swagger/index.html +25 -25
- package/package.json +5 -4
- package/dist/10.f0277e5092cea150b5a8.bundle.js +0 -2
- package/dist/10.f0277e5092cea150b5a8.bundle.js.map +0 -1
- package/dist/11.bdd794940dcfd5daa9a1.bundle.js +0 -2
- package/dist/11.bdd794940dcfd5daa9a1.bundle.js.map +0 -1
- package/dist/111.056eb71072bfd8f6551b.bundle.js +0 -2
- package/dist/111.056eb71072bfd8f6551b.bundle.js.map +0 -1
- package/dist/112.50fd62c66c6594e055a3.bundle.js +0 -2
- package/dist/112.50fd62c66c6594e055a3.bundle.js.map +0 -1
- package/dist/113.2c059fa7d06fd04149eb.bundle.js +0 -2
- package/dist/113.2c059fa7d06fd04149eb.bundle.js.map +0 -1
- package/dist/119.dfdf8b9afa2c31b90232.bundle.js +0 -2
- package/dist/119.dfdf8b9afa2c31b90232.bundle.js.map +0 -1
- package/dist/12.a3762f9fba854a28c1cb.bundle.js +0 -2
- package/dist/12.a3762f9fba854a28c1cb.bundle.js.map +0 -1
- package/dist/121.aa10886f87136602a6cf.bundle.js +0 -2
- package/dist/121.aa10886f87136602a6cf.bundle.js.map +0 -1
- package/dist/123.318a247a0939300080aa.bundle.js +0 -2
- package/dist/123.318a247a0939300080aa.bundle.js.map +0 -1
- package/dist/125.4978d60a14b65499a047.bundle.js +0 -2
- package/dist/125.4978d60a14b65499a047.bundle.js.map +0 -1
- package/dist/126.4a830f0d18f079b1dca7.bundle.js +0 -2
- package/dist/126.4a830f0d18f079b1dca7.bundle.js.map +0 -1
- package/dist/129.7ca4a0a32cacb6feb225.bundle.js +0 -2
- package/dist/129.7ca4a0a32cacb6feb225.bundle.js.map +0 -1
- package/dist/131.087611adf6562e7e1b00.bundle.js +0 -2
- package/dist/131.087611adf6562e7e1b00.bundle.js.map +0 -1
- package/dist/132.b1ed3e4c9238c5b6303b.bundle.js +0 -2
- package/dist/132.b1ed3e4c9238c5b6303b.bundle.js.map +0 -1
- package/dist/134.653804476f9803033cbe.bundle.js +0 -2
- package/dist/134.653804476f9803033cbe.bundle.js.map +0 -1
- package/dist/136.5d60eb9d8d66581003ce.bundle.js +0 -2
- package/dist/136.5d60eb9d8d66581003ce.bundle.js.map +0 -1
- package/dist/137.0cfdd5934c6a400ab990.bundle.js +0 -2
- package/dist/137.0cfdd5934c6a400ab990.bundle.js.map +0 -1
- package/dist/138.611df35cbfdfec860909.bundle.js +0 -2
- package/dist/138.611df35cbfdfec860909.bundle.js.map +0 -1
- package/dist/14.0c709b039159410b0b91.bundle.js.map +0 -1
- package/dist/140.b0310ba39e9c3237f48a.bundle.js +0 -2
- package/dist/140.b0310ba39e9c3237f48a.bundle.js.map +0 -1
- package/dist/141.5d76be84a3151e69fc9d.bundle.js +0 -2
- package/dist/141.5d76be84a3151e69fc9d.bundle.js.map +0 -1
- package/dist/142.a4094b510036aaf72b0b.bundle.js +0 -2
- package/dist/142.a4094b510036aaf72b0b.bundle.js.map +0 -1
- package/dist/145.6536295098a4f2e030e3.bundle.js +0 -2
- package/dist/145.6536295098a4f2e030e3.bundle.js.map +0 -1
- package/dist/146.ee9db0da29c25ec7fbf9.bundle.js +0 -2
- package/dist/146.ee9db0da29c25ec7fbf9.bundle.js.map +0 -1
- package/dist/148.0ce4968734a80e71b2b9.bundle.js +0 -2
- package/dist/148.0ce4968734a80e71b2b9.bundle.js.map +0 -1
- package/dist/15.fc7c799455b5aec64393.bundle.js +0 -2
- package/dist/15.fc7c799455b5aec64393.bundle.js.map +0 -1
- package/dist/16.005766c64d76f95231b1.bundle.js +0 -2
- package/dist/16.005766c64d76f95231b1.bundle.js.map +0 -1
- package/dist/18.2ddbba81e5b663db1894.bundle.js +0 -3
- package/dist/18.2ddbba81e5b663db1894.bundle.js.map +0 -1
- package/dist/20.a35d80fb5e80ae3874ce.bundle.js +0 -2
- package/dist/20.a35d80fb5e80ae3874ce.bundle.js.map +0 -1
- package/dist/23.102a20601f717ba91551.bundle.js +0 -2
- package/dist/23.102a20601f717ba91551.bundle.js.map +0 -1
- package/dist/25.bd69d5c4040e1547800b.bundle.js +0 -2
- package/dist/25.bd69d5c4040e1547800b.bundle.js.map +0 -1
- package/dist/26.57526f30f6b3c581334d.bundle.js.map +0 -1
- package/dist/27.ab75434b1389b977291c.bundle.js +0 -2
- package/dist/27.ab75434b1389b977291c.bundle.js.map +0 -1
- package/dist/28.b2180a7cba95d9328e1a.bundle.js +0 -2
- package/dist/28.b2180a7cba95d9328e1a.bundle.js.map +0 -1
- package/dist/32.ba5b5ca3e4b7dcf5bd15.bundle.js.map +0 -1
- package/dist/35.b8c8d16a8707c20a1fcb.bundle.js.map +0 -1
- package/dist/36.d96e6ee811e8340ae320.bundle.js.map +0 -1
- package/dist/40.c754ab2b3b35c2acb854.bundle.js +0 -2
- package/dist/40.c754ab2b3b35c2acb854.bundle.js.map +0 -1
- package/dist/42.190f8880ee8f3a97a042.bundle.js.map +0 -1
- package/dist/43.899bf21ce1de203ace21.bundle.js.map +0 -1
- package/dist/44.c649782fa0755b53a62c.bundle.js.map +0 -1
- package/dist/47.421938875d2461427ae3.bundle.js +0 -2
- package/dist/47.421938875d2461427ae3.bundle.js.map +0 -1
- package/dist/48.52c5b13ab244c45a8c43.bundle.js.map +0 -1
- package/dist/5.21d2da4b4bc2b26e2534.bundle.js.map +0 -1
- package/dist/56.ce399f5788c0f5fe937b.bundle.js.map +0 -1
- package/dist/68.6b887fe6160e5bd8742b.bundle.js +0 -2
- package/dist/68.6b887fe6160e5bd8742b.bundle.js.map +0 -1
- package/dist/7.a0f5ec224bebd08058f4.bundle.js.map +0 -1
- package/dist/75.dbd9915663de96056138.bundle.js +0 -2
- package/dist/75.dbd9915663de96056138.bundle.js.map +0 -1
- package/dist/78.608f8074bef29a89d68b.bundle.js +0 -2
- package/dist/78.608f8074bef29a89d68b.bundle.js.map +0 -1
- package/dist/79.f4a2c3ec71bed08d61b9.bundle.js.map +0 -1
- package/dist/9.c9fc88a79b7990e29e04.bundle.js.map +0 -1
- package/dist/94.3efcd047d4d4e506cbd7.bundle.js.map +0 -1
- package/dist/96.754454264340bc9d9a70.bundle.js.map +0 -1
- package/dist/bundle.ac70985c70f7da448f2d.bundle.js +0 -79
- package/dist/bundle.ac70985c70f7da448f2d.bundle.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/graphexplore/controllers/graphs-config.controller.js"],"names":["Notifications","toastr","showToastMessageWithDelay","message","Promise","r","success","setTimeout","angular","module","factory","$inject","GraphConfigCtrl","$scope","$timeout","$location","$repositories","$modal","ModalService","SparqlRestService","$filter","GraphConfigRestService","AutocompleteRestService","$routeParams","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","selectedFixedNodeChanged","page","totalPages","helpHidden","get","HIDE_GRAPH_CONFIG_HELP","toggleHelp","value","undefined","set","fixedVisualCallback","uri","label","newConfig","startIRI","startIRILabel","isDefaultGraph","sample","name","isUserGraph","getSampleName","property","extra","id","getGraphConfigSamples","data","samples","_","filter","s","revertConfig","error","getError","configName","showInvalidMsg","warning","getQueryForCurrentPage","config","query","startMode","startGraphQuery","expandQuery","resourceQuery","predicateLabelQuery","resourcePropertiesQuery","isDefined","initForConfig","checkAutocompleteStatus","getAutocompletePromise","createGraphConfig","async","url","updateGraphConfig","$on","getNamespacesPromise","getNamespaces","getActiveRepository","validateQueryWithCallback","successCallback","queryType","params","all","oneOf","validateQuery","broadcastAddStartFixedNodeEvent","checkPageAndMode","$broadcast","validateCurrentPage","updateModel","goToPage","nextPage","showEditor","notoolbar","goToPreviousPage","goToNextPage","saveGraphConfig","startQueryIncludeInferred","currentQuery","inference","startQuerySameAs","sameAs","isUpdate","window","editor","getValue","trim","setQuery","setValue","updateDirty","q1","q2","queryEditorIsDirty","updateEditor","isActiveRepoOntopType","nocount","loadTab","selectTab","xhr","abort","viewMode","showPreview","outputType","runQuery","revertEditor","$watch","shared","encodeQuery","encodeURIComponent","getConfig","defaultTabConfig","resetCurrentTabConfig","currentTabConfig","pageSize","allResultsCount","resultsCount","queryExists","tabsData","tabs","saveTab","idx","i","length","findTabIndexByID","tab","saveQueryToLocal","addNewTab","callback","tabName","savedQuery","changePagination","explainRequested","toggleSampleQueries","addKnownPrefixes","getExistingTabId","querySelected","tabId","body","setLoader","getLoaderMessage","timeSeconds","Date","now","queryStartTime","timeHuman","getHumanReadableSeconds","progressMessage","extraMessage","fixSizesOnHorizontalViewModeSwitch","changeViewMode","tabID","orientationViewMode","$","remove","showHideEditor","focusQueryEditor","element","document","find","is","focus","currentQueryTab","isRunning","yasrInnerContainer","getElementById","queryIsRunning","countTimeouted","addClass","removeClass","$$phase","$apply","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","verticalView","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","cancel","yasr","container","resize","changePage","explain","executedQueryTab","getQueryType","getQueryMode","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","JSON","stringify","msg","existingTabId","item","on","$watchCollection","offset","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","tabEvent","relatedTarget","target","copy","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","controller"],"mappings":"+EAMA,SAASA,EAAcC,GACnB,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBJ,EAAOK,QAAQH,GACfI,WAAWF,EAAG,SApB1BG,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBV,GAE9BA,EAAcW,QAAU,CAAC,W,gCCJzB,kBAYA,SAASC,EAAgBC,EAAQC,EAAUC,EAAWd,EAAQe,EAAeC,EAAQC,EAAcC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,UACxCtO,EAAOuL,WACR,GAGHlB,EAAE,SAASkE,IAAI,UAAW,KAG9B,SAASC,EAAW/D,GAChB,OAAOJ,EAAEI,GAASgE,KAAK,WAG3BzO,EAAOmE,IAAI,aAAa,SAAUmJ,EAAGoB,GAC7BA,EAASC,eACT3O,EAAOoI,QAAQoG,EAAWE,EAASC,gBAEvC3O,EAAO6G,QAAQ2H,EAAWE,EAASE,YAGvC5O,EAAOmE,IAAI,0BAA0B,SAAUmJ,EAAGnF,GAC9CnI,EAAOkI,SAAWC,EAClBnI,EAAOmI,KAAOA,KAIlBnI,EAAO2F,aAAehG,QAAQkP,KAAKlH,GAEnC3H,EAAO8O,mBAAoB,EAC3B9O,EAAO8I,WAAa,GACpB9I,EAAO+O,cAAgB,GAEvB/O,EAAOgP,sBAAwB,aAG/BhP,EAAOiP,qBAAuB,aAG9BjP,EAAOkP,uBAAyB,aA/sBpCvP,QACKC,OAAO,6DAA8D,CAClE,wCACA,gDAEHuP,WAAW,kBAAmBpP,GAEnCA,EAAgBD,QAAU,CAAC,SAAU,WAAY,YAAa,SAAU,gBAAiB,SAAU,eAAgB,oBAAqB,UAAW,yBAA0B,0BAA2B,eAAgB,gBAAiB,+BAAgC,sBAAuB","file":"36.d96e6ee811e8340ae320.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr'];\n\nfunction Notifications(toastr) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success(message);\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.graphexplore.controllers.graphviz.config', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('GraphConfigCtrl', GraphConfigCtrl);\n\nGraphConfigCtrl.$inject = ['$scope', '$timeout', '$location', 'toastr', '$repositories', '$modal', 'ModalService', 'SparqlRestService', '$filter', 'GraphConfigRestService', 'AutocompleteRestService', '$routeParams', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys'];\n\nfunction GraphConfigCtrl($scope, $timeout, $location, toastr, $repositories, $modal, ModalService, SparqlRestService, $filter, GraphConfigRestService, AutocompleteRestService, $routeParams, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys) {\n\n $scope.page = 1;\n $scope.totalPages = 5;\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP) === 1;\n\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_GRAPH_CONFIG_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_GRAPH_CONFIG_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n var selectedFixedNodeChanged;\n $scope.fixedVisualCallback = function (uri, label) {\n $scope.newConfig.startIRI = uri;\n $scope.newConfig.startIRILabel = label;\n selectedFixedNodeChanged = true;\n };\n\n $scope.isDefaultGraph = function (sample) {\n return (sample.name === 'Minimal' || sample.name === 'Advanced');\n };\n\n $scope.isUserGraph = function (sample) {\n return !$scope.isDefaultGraph(sample);\n };\n\n $scope.getSampleName = function (sample, property) {\n const extra = sample[property + 'Description'];\n if (extra) {\n // Sample has description, use it\n return extra;\n } else {\n // Sample is a copy of existing config, prepend Copy of to name\n return sample.id ? 'Copy of ' + sample.name : sample.name;\n }\n };\n\n const getGraphConfigSamples = function () {\n GraphConfigRestService.getGraphConfigSamples()\n .success(function (data) {\n $scope.samples = _.filter(data, function (s) {\n // Skip the currently edited config from samples and store it into a revert variable\n if (!s.id || $scope.newConfig.id !== s.id) {\n return true;\n } else {\n $scope.revertConfig = s;\n return false;\n }\n });\n }).error(function (data) {\n toastr.error(getError(data), 'Could not get graph configs. You may not see sample values');\n });\n };\n\n const configName = $routeParams.configName;\n $scope.newConfig = {startQueryIncludeInferred: true, startQuerySameAs: true};\n $scope.newConfig.startMode = 'search';\n $scope.isUpdate = false;\n $scope.shared = false;\n\n $scope.encodeQuery = function (query) {\n return encodeURIComponent(query);\n };\n\n function showInvalidMsg(message) {\n toastr.warning(message);\n }\n\n if (configName) {\n $scope.isUpdate = true;\n GraphConfigRestService.getConfig(configName)\n .success(function (data) {\n $scope.newConfig = data;\n initForConfig();\n })\n .error(function (data) {\n toastr.error(getError(data), 'Could not load config for name ' + configName);\n });\n } else {\n $scope.isUpdate = false;\n initForConfig();\n }\n\n function getQueryForCurrentPage(config) {\n let query;\n\n if (config.startMode === 'query' && $scope.page === 1) {\n query = config.startGraphQuery;\n } else if ($scope.page === 2) {\n query = config.expandQuery;\n } else if ($scope.page === 3) {\n query = config.resourceQuery;\n } else if ($scope.page === 4) {\n query = config.predicateLabelQuery;\n } else if ($scope.page === 5) {\n query = config.resourcePropertiesQuery;\n }\n\n return angular.isDefined(query) ? query : '';\n }\n\n function initForConfig() {\n getGraphConfigSamples();\n $scope.createGraphConfig = function () {\n GraphConfigRestService.createGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('Saved new graph config');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), 'Error! Could not create graph config');\n });\n };\n\n $scope.updateGraphConfig = function () {\n GraphConfigRestService.updateGraphConfig($scope.newConfig)\n .success(async function () {\n await Notifications.showToastMessageWithDelay('Graph config saved');\n $location.url('graphs-visualizations');\n }).error(function (data) {\n toastr.error(getError(data), 'Error! Could not save graph config');\n });\n };\n\n function checkAutocompleteStatus() {\n $scope.getAutocompletePromise = AutocompleteRestService.checkAutocompleteStatus();\n }\n\n $scope.$on('autocompleteStatus', function() {\n checkAutocompleteStatus();\n });\n\n checkAutocompleteStatus();\n $scope.getNamespacesPromise = RDF4JRepositoriesRestService.getNamespaces($scope.getActiveRepository());\n\n const validateQueryWithCallback = function (successCallback, query, queryType, params, all, oneOf) {\n if (!query) {\n successCallback();\n } else {\n GraphConfigRestService.validateQuery(query, queryType, params, all, oneOf)\n .success(function () {\n successCallback();\n }).error(function (data) {\n showInvalidMsg(getError(data));\n });\n }\n };\n\n $scope.validateCurrentPage = function (successCallback) {\n $scope.updateModel();\n\n if ($scope.page === 1) {\n if ($scope.newConfig.startMode === 'node' && !$scope.newConfig.startIRI) {\n showInvalidMsg('Please select start node.');\n } else if ($scope.newConfig.startMode === 'query' && !$scope.newConfig.startGraphQuery) {\n showInvalidMsg('Please provide start graph query.');\n } else if ($scope.newConfig.startMode === 'query') {\n validateQueryWithCallback(successCallback, $scope.newConfig.startGraphQuery, 'graph')\n } else {\n successCallback();\n }\n } else if ($scope.page === 2) {\n validateQueryWithCallback(successCallback, $scope.newConfig.expandQuery, 'construct', ['node'])\n } else if ($scope.page === 3) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourceQuery, 'tuple', ['node'], [], ['type', 'label', 'comment', 'rank']);\n } else if ($scope.page === 4) {\n validateQueryWithCallback(successCallback, $scope.newConfig.predicateLabelQuery, 'tuple', ['edge'], ['label']);\n } else if ($scope.page === 5) {\n validateQueryWithCallback(successCallback, $scope.newConfig.resourcePropertiesQuery, 'tuple', ['node'], ['property', 'value']);\n }\n };\n\n $scope.goToPage = function (nextPage) {\n if ($scope.page === nextPage) {\n // already there\n return;\n }\n\n $scope.validateCurrentPage(function () {\n $scope.showEditor();\n $scope.page = nextPage;\n $scope.notoolbar = $scope.page !== 1;\n });\n };\n\n $scope.goToPreviousPage = function () {\n if ($scope.page > 1) {\n $scope.goToPage($scope.page - 1);\n }\n\n if (checkPageAndMode()) {\n selectedFixedNodeChanged = false;\n }\n };\n\n $scope.goToNextPage = function () {\n broadcastAddStartFixedNodeEvent();\n if (selectedFixedNodeChanged) {\n $scope.goToPage($scope.page + 1);\n }\n };\n\n function broadcastAddStartFixedNodeEvent() {\n if (checkPageAndMode()) {\n $scope.$broadcast('addStartFixedNodeAutomatically', {startIRI: $scope.newConfig.startIRI});\n }\n }\n\n function checkPageAndMode() {\n return $scope.page === 1 && $scope.newConfig.startMode === 'node';\n }\n\n $scope.saveGraphConfig = function () {\n broadcastAddStartFixedNodeEvent();\n\n if (checkPageAndMode() && !selectedFixedNodeChanged) {\n return;\n }\n\n $scope.newConfig.startQueryIncludeInferred = $scope.currentQuery.inference;\n $scope.newConfig.startQuerySameAs = $scope.currentQuery.sameAs;\n\n $scope.validateCurrentPage(function () {\n if (!$scope.newConfig.name) {\n showInvalidMsg('Please provide config name.');\n return;\n }\n $scope.isUpdate ? $scope.updateGraphConfig($scope.newConfig) : $scope.createGraphConfig($scope.newConfig);\n });\n };\n\n $scope.updateModel = function () {\n const query = window.editor.getValue().trim();\n if ($scope.newConfig.startMode === 'query' && $scope.page === 1) {\n $scope.newConfig.startGraphQuery = query;\n } else if ($scope.page === 2) {\n $scope.newConfig.expandQuery = query;\n } else if ($scope.page === 3) {\n $scope.newConfig.resourceQuery = query;\n } else if ($scope.page === 4) {\n $scope.newConfig.predicateLabelQuery = query;\n } else if ($scope.page === 5) {\n $scope.newConfig.resourcePropertiesQuery = query;\n }\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n $scope.updateDirty = function () {\n if ($scope.revertConfig) {\n const q1 = getQueryForCurrentPage($scope.revertConfig);\n const q2 = window.editor.getValue().trim();\n $scope.queryEditorIsDirty = q1 !== q2;\n }\n };\n\n // Updates the position of the query editor to match the current div placeholder\n // and sets the editor's query to the relevant query from the model.\n $scope.updateEditor = function () {\n $timeout(function () {\n $scope.currentQuery.query = getQueryForCurrentPage($scope.newConfig);\n // // Check for ontop repository and override nocount property (it's default value is false)\n if ($repositories.isActiveRepoOntopType()) {\n $scope.nocount = true;\n }\n $scope.currentQuery.inference = $scope.newConfig.startQueryIncludeInferred;\n $scope.currentQuery.sameAs = $scope.newConfig.startQuerySameAs;\n loadTab($scope.currentQuery.id);\n selectTab($scope.currentQuery.id);\n }, 100);\n\n };\n\n $scope.showEditor = function () {\n if (window.editor && window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.revertEditor = function () {\n $scope.setQuery(getQueryForCurrentPage($scope.revertConfig));\n };\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('newConfig.startMode', function (value) {\n if (value === 'query') {\n $timeout(function () {\n $scope.updateEditor();\n }, 0);\n }\n });\n\n // Trigger for showing the editor and moving it to the right position\n $scope.$watch('page', function (value) {\n if ($scope.newConfig.startMode === 'query' || value > 1) {\n $timeout(function () {\n $scope.showEditor();\n $scope.updateEditor();\n }, 0);\n }\n });\n }\n\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n // But Why? Can't we reuse it instead of borrow?\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: 'select * where { \\n' +\n '\\t?s ?p ?o .\\n' +\n '} limit 100 \\n',\n inference: $scope.newConfig.startQueryIncludeInferred,\n sameAs: $scope.newConfig.startQuerySameAs\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n let backendRepositoryID = $scope.getActiveRepository();\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = 'Running operation...' + timeHuman;\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n }\n\n\n // start of query editor results orientation operations\n function fixSizesOnHorizontalViewModeSwitch(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const codemirrorWrapperSelector = '.CodeMirror-wrap';\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector(codemirrorWrapperSelector)) {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n document.getElementById('yasr').style.minHeight = newHeight + 'px';\n } else {\n let timer;\n if (verticalView) {\n timer = $timeout(function () {\n $scope.fixSizesOnHorizontalViewModeSwitch(verticalView)\n }, 100);\n } else {\n timer = $timeout($scope.fixSizesOnHorizontalViewModeSwitch, 100);\n }\n\n $scope.$on('$destroy', function () {\n $timeout.cancel(timer);\n });\n }\n } else {\n if ($scope.viewMode === 'yasr') {\n let newHeight = visibleWindowHeight() - (document.querySelector(codemirrorWrapperSelector).getBoundingClientRect().top);\n newHeight -= 40;\n document.querySelector(codemirrorWrapperSelector).style.height = newHeight + 'px';\n } else {\n $scope.noPadding = {};\n document.querySelector(codemirrorWrapperSelector).style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab(tabID);\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function deleteCachedSparqlResults() {\n }\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (explain && !(window.editor.getQueryType() === 'SELECT' || window.editor.getQueryType() === 'CONSTRUCT')) {\n toastr.warning('Explain only works with SELECT or CONSTRUCT queries.');\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning('Cannot execute updates from this editor.');\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch()\n }\n\n setLoader(true, 'Evaluating query');\n window.editor.query();\n }\n }\n\n function getNamespaces() {\n // Signals the namespaces are to be fetched => loader will be shown\n setLoader(true, 'Refreshing namespaces', 'Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first.');\n RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n let msg = getError(data);\n toastr.error(msg, 'Error! Could not add known prefixes');\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n let maxID = 1;\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab(id) {\n $scope.tabsData = [$scope.currentQuery];\n\n let tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query == null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query);\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove padding of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n }\n\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[40,75],{106:function(e,o,r){"use strict";r.r(o);r(2),r(7),r(71);angular.module("graphdb.framework.jmx.queries",["toastr","ui.bootstrap","graphdb.framework.jmx.queries.controllers","graphdb.framework.core.directives"])},71:function(e,o,r){"use strict";r.r(o);r(2),r(11);const t=angular.module("graphdb.framework.jmx.queries.controllers",["ui.bootstrap","toastr","graphdb.framework.rest.monitoring.service"]);t.controller("QueriesCtrl",["$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService",function(e,o,r,t,n,i,s,u){e.loader=!0,e.stringLimit=500,e.expanded={},e.jolokiaError="";const c=document.createElement("a");e.parseNode=function(e){if(null==e)return null;let o="local";if(e.indexOf("://localhost:")<0&&e.indexOf("://localhost/")<0){c.href=e;let r=c.hostname;(function(e){const o=e.split(".");for(let e=0,r=0;e<o.length;e++)if(parseInt(o[e],10)>=0&&parseInt(o[e],10)<=255?r++:r=0,4===r)return!0;return!1})(c.hostname)||(r=c.hostname.split(".")[0]),o=r+":"+c.port}const r=e.match(/\/repositories\/([^\/]+)#(\d+)/);return[r[2],o,r[1]]},e.getQueries=function(){e.getQueriesRunning||e.paused||e.jolokiaError||!n.getActiveRepository()||(e.getQueriesRunning=!0,u.monitorQuery().success((function(o){const r=o;e.noQueries=0===r.length,e.queries={};for(let o=0;o<r.length;o++)r[o].parsedNode=e.parseNode(r[o].node),e.queries[r[o].trackId]=r[o];e.noActiveRepository=!1,e.loader=!1,e.getQueriesRunning=!1})).error((function(o){e.jolokiaError=getError(o),e.loader=!1,e.getQueriesRunning=!1})))};const a=t((function(){n.isActiveRepoOntopType()||e.getQueries()}),1e3);e.$on("$destroy",(function(){t.cancel(a)})),e.deleteQueryHttp=function(o){e.loader=!0,u.deleteQuery(o).success((function(){r.success("Abort request sent."),e.loader=!1})).error((function(o){const t=getError(o);r.error(t,"Error"),e.loader=!1}))},e.abortQuery=function(o){s.openSimpleModal({title:"Confirm abort",message:"Are you sure you want to abort the query?",warning:!0}).result.then((function(){e.deleteQueryHttp(o)}))},e.downloadQuery=function(e){const o="query_"+e+".rq";let r="rest/monitor/query/download?queryId="+encodeURIComponent(e)+"&repository="+encodeURIComponent(n.getActiveRepository())+"&filename="+encodeURIComponent(o);i.isAuthenticated()&&(r=r+"&authToken="+encodeURIComponent(i.getAuthToken())),window.open(r,"_blank")},e.toggleQueryExpanded=function(o){e.expanded[o]=!e.expanded[o]}}]),t.controller("DeleteQueryCtrl",["$scope","$modalInstance",function(e,o){e.ok=function(){o.close()},e.cancel=function(){o.dismiss("cancel")}}])}}]);
|
|
2
|
-
//# sourceMappingURL=40.c754ab2b3b35c2acb854.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/queries/app.js","webpack:///./src/js/angular/queries/controllers.js"],"names":["angular","module","queriesCtrl","controller","$scope","$modal","toastr","$interval","$repositories","$jwtAuth","ModalService","MonitoringRestService","loader","stringLimit","expanded","jolokiaError","parser","document","createElement","parseNode","node","shortUrl","indexOf","href","hostname","ip","blocks","split","i","sequence","length","parseInt","containsIPV4","port","match","getQueries","getQueriesRunning","paused","getActiveRepository","monitorQuery","success","data","newQueries","noQueries","queries","parsedNode","trackId","noActiveRepository","error","getError","timer","isActiveRepoOntopType","$on","cancel","deleteQueryHttp","queryId","deleteQuery","msg","abortQuery","openSimpleModal","title","message","warning","result","then","downloadQuery","filename","link","encodeURIComponent","isAuthenticated","getAuthToken","window","open","toggleQueryExpanded","$modalInstance","ok","close","dismiss"],"mappings":"8FAAA,uBAWAA,QAAQC,OAAO,gCAPC,CACZ,SACA,eACA,4CACA,uC,gCCRJ,kBAGA,MAAMC,EAAcF,QAAQC,OAAO,4CAA6C,CAC5E,eACA,SACA,8CAGJC,EAAYC,WAAW,cAAe,CAAC,SAAU,SAAU,SAAU,YAAa,gBAAiB,WAAY,eAAgB,wBAC3H,SAAUC,EAAQC,EAAQC,EAAQC,EAAWC,EAAeC,EAAUC,EAAcC,GAEhFP,EAAOQ,QAAS,EAChBR,EAAOS,YAAc,IACrBT,EAAOU,SAAW,GAClBV,EAAOW,aAAe,GAiBtB,MAAMC,EAASC,SAASC,cAAc,KAItCd,EAAOe,UAAY,SAAUC,GACzB,GAAY,MAARA,EACA,OAAO,KAGX,IAAIC,EAAW,QACf,GAAID,EAAKE,QAAQ,iBAAmB,GAAKF,EAAKE,QAAQ,iBAAmB,EAAG,CACxEN,EAAOO,KAAOH,EACd,IAAII,EAAWR,EAAOQ,UA3B9B,SAAsBC,GAClB,MAAMC,EAASD,EAAGE,MAAM,KACxB,IAAK,IAAIC,EAAI,EAAGC,EAAW,EAAGD,EAAIF,EAAOI,OAAQF,IAM7C,GALIG,SAASL,EAAOE,GAAI,KAAO,GAAKG,SAASL,EAAOE,GAAI,KAAO,IAC3DC,IAEAA,EAAW,EAEE,IAAbA,EACA,OAAO,EAGf,OAAO,GAg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AAS,IACVC,OAAOC,MAAK,WACX5D,EAAOkD,gBAAgBC,OAI/BnD,EAAO6D,cAAgB,SAAUV,GAC7B,MAAMW,EAAW,SAAWX,EAAU,MACtC,IAAIY,EAAO,uCAAyCC,mBAAmBb,GACjE,eAAiBa,mBAAmB5D,EAAc8B,uBAClD,aAAe8B,mBAAmBF,GACpCzD,EAAS4D,oBACTF,EAAOA,EAAO,cAAgBC,mBAAmB3D,EAAS6D,iBAG9DC,OAAOC,KAAKL,EAAM,WAGtB/D,EAAOqE,oBAAsB,SAAUlB,GACnCnD,EAAOU,SAASyC,IAAYnD,EAAOU,SAASyC,OAKxDrD,EAAYC,WAAW,kBAAmB,CAAC,SAAU,iBAAkB,SAAUC,EAAQsE,GAErFtE,EAAOuE,GAAK,WACRD,EAAeE,SAGnBxE,EAAOiD,OAAS,WACZqB,EAAeG,QAAQ","file":"40.c754ab2b3b35c2acb854.bundle.js","sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/queries/controllers';\n\nconst modules = [\n 'toastr',\n 'ui.bootstrap',\n 'graphdb.framework.jmx.queries.controllers',\n 'graphdb.framework.core.directives'\n];\n\nangular.module('graphdb.framework.jmx.queries', modules);\n","import 'angular/core/services';\nimport 'angular/rest/monitoring.rest.service';\n\nconst queriesCtrl = angular.module('graphdb.framework.jmx.queries.controllers', [\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.rest.monitoring.service'\n]);\n\nqueriesCtrl.controller('QueriesCtrl', ['$scope', '$modal', 'toastr', '$interval', '$repositories', '$jwtAuth', 'ModalService', 'MonitoringRestService',\n function ($scope, $modal, toastr, $interval, $repositories, $jwtAuth, ModalService, MonitoringRestService) {\n\n $scope.loader = true;\n $scope.stringLimit = 500;\n $scope.expanded = {};\n $scope.jolokiaError = '';\n\n function containsIPV4(ip) {\n const blocks = ip.split('.');\n for (let i = 0, sequence = 0; i < blocks.length; i++) {\n if (parseInt(blocks[i], 10) >= 0 && parseInt(blocks[i], 10) <= 255) {\n sequence++;\n } else {\n sequence = 0;\n }\n if (sequence === 4) {\n return true;\n }\n }\n return false;\n }\n\n const parser = document.createElement('a');\n\n // Parses a node of the kind http://host.example.com:7200/repositories/repo#NN,\n // where NN is the track ID into an array [NN, host:7200, repo].\n $scope.parseNode = function (node) {\n if (node == null) {\n return null;\n }\n\n let shortUrl = 'local';\n if (node.indexOf('://localhost:') < 0 && node.indexOf('://localhost/') < 0) {\n parser.href = node;\n let hostname = parser.hostname;\n if (!containsIPV4(parser.hostname)) {\n hostname = parser.hostname.split('.')[0];\n }\n shortUrl = hostname + ':' + parser.port;\n }\n const match = node.match(/\\/repositories\\/([^\\/]+)#(\\d+)/); // eslint-disable-line no-useless-escape\n\n return [match[2], shortUrl, match[1]];\n };\n\n $scope.getQueries = function () {\n // Skip execution if already getting from previous call, if paused, if jolokia returned an error,\n // or if no repository is available\n if ($scope.getQueriesRunning || $scope.paused || $scope.jolokiaError || !$repositories.getActiveRepository()) {\n return;\n }\n\n $scope.getQueriesRunning = true;\n MonitoringRestService.monitorQuery().success(function (data) {\n const newQueries = data;\n $scope.noQueries = newQueries.length === 0;\n\n // Converts array to object. Angular seems to handle updates on objects better, i.e.\n // it doesn't recreate DOM elements for queries that are already displayed.\n $scope.queries = {};\n for (let i = 0; i < newQueries.length; i++) {\n newQueries[i].parsedNode = $scope.parseNode(newQueries[i].node);\n $scope.queries[newQueries[i].trackId] = newQueries[i];\n }\n\n $scope.noActiveRepository = false;\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n }).error(function (data) {\n $scope.jolokiaError = getError(data);\n $scope.loader = false;\n $scope.getQueriesRunning = false;\n });\n };\n\n const timer = $interval(function () {\n // Don't call getQueries for Ontop type repository\n if ($repositories.isActiveRepoOntopType()) {\n return;\n }\n $scope.getQueries();\n }, 1000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n\n $scope.deleteQueryHttp = function (queryId) {\n\n $scope.loader = true;\n MonitoringRestService.deleteQuery(queryId).success(function () {\n toastr.success('Abort request sent.');\n $scope.loader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n\n $scope.loader = false;\n });\n };\n\n $scope.abortQuery = function (queryId) {\n ModalService.openSimpleModal({\n title: 'Confirm abort',\n message: 'Are you sure you want to abort the query?',\n warning: true\n }).result.then(function () {\n $scope.deleteQueryHttp(queryId);\n });\n };\n\n $scope.downloadQuery = function (queryId) {\n const filename = 'query_' + queryId + '.rq';\n let link = 'rest/monitor/query/download?queryId=' + encodeURIComponent(queryId)\n + '&repository=' + encodeURIComponent($repositories.getActiveRepository())\n + '&filename=' + encodeURIComponent(filename);\n if ($jwtAuth.isAuthenticated()) {\n link = link + '&authToken=' + encodeURIComponent($jwtAuth.getAuthToken());\n }\n\n window.open(link, '_blank');\n };\n\n $scope.toggleQueryExpanded = function (queryId) {\n $scope.expanded[queryId] = !$scope.expanded[queryId];\n };\n }]);\n\n\nqueriesCtrl.controller('DeleteQueryCtrl', ['$scope', '$modalInstance', function ($scope, $modalInstance) {\n\n $scope.ok = function () {\n $modalInstance.close();\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}]);\n"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
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","$rootScope","checkLicenseHardcoded","res","isLicenseHardcoded","getLicenseInfo","license","message","valid","RegisterLicenseCtrl","$location","$modal","$window","$jwtAuth","$on","isAdmin","path","sendLicenseToValidateAndActivate","textAreaSel","$","licenseCode","sendLicenseToValidate","validatedLicense","licensee","val","open","templateUrl","controller","resolve","result","decodedLicense","atob","replace","registerLicense","history","back","confirmWantedNewLicenseDetails","$watch","currentFile","file","extractFromLicenseFile","getBackToPreviousPage","ValidateLicenseModalCtrl","ok","LoaderSamplesCtrl","setLoader","angular","module","$inject","config","$httpProvider","interceptors","push","run","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,oBAAqB,MACzB,CACH,MAAMU,EAAMC,SAASJ,EAASC,MAC9BX,EAAOe,MAAMF,EAAK,+BAK9Bd,EAAOO,cAEPP,EAAOiB,YAAc,WACjBjB,EAAOQ,QAAS,EAChBL,EAAmBe,iBAAiBlB,EAAOK,SAASC,YAAYI,MAAK,WACjER,EAAeiB,QACflB,EAAOmB,QAAQ,+BAChB,SAAUT,GACT,MAAMG,EAAMC,SAASJ,EAASC,MAC9BX,EAAOe,MAAMF,EAAK,6BAI1Bd,EAAOqB,WAAa,WAChBrB,EAAOiB,eAGXjB,EAAOsB,OAAS,WACZpB,EAAeqB,QAAQ,WAM/B,SAASC,EAAYxB,EAAQG,EAAoBF,EAAQwB,GACrDzB,EAAOQ,QAAS,EAEhBL,EAAmBuB,wBACdN,SAAQ,SAAUO,GACfF,EAAWG,mBAA8B,SAARD,KAEpCX,OAAM,WACHS,EAAWG,oBAAqB,EAChC3B,EAAOe,MAAM,0CAEhBN,MAAK,WACFP,EAAmB0B,iBACdT,SAAQ,SAAUO,GACf3B,EAAOQ,QAAS,EAChBR,EAAO8B,QAAUH,KAIpBX,OAAM,WAEHhB,EAAOQ,QAAS,EAChBR,EAAO8B,QAAU,CAACC,QAAS,sBAAuBC,OAAO,SAO7E,SAASC,EAAo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,QAAS,EAChBR,EAAOqE,UAAY,SAAU7D,GACzBR,EAAOQ,OAASA,GAvMxB8D,QACKC,OAAO,yCAA0C,CAC9C,YACA,eACA,0CACA,WAEHpB,WAAW,6BAA8BpD,GACzCoD,WAAW,2BAA4Be,GACvCf,WAAW,cAAe3B,GAC1B2B,WAAW,sBAAuBlB,GAClCkB,WAAW,oBAAqBiB,GAErCrE,EAA2ByE,QAAU,CAAC,SAAU,SAAU,iBAAkB,sBA4C5EhD,EAAYgD,QAAU,CAAC,SAAU,qBAAsB,SAAU,cA6BjEvC,EAAoBuC,QAAU,CAAC,SAAU,qBAAsB,YAAa,SAAU,SAAU,UAAW,YA4F3GN,EAAyBM,QAAU,CAAC,SAAU,iBAAkB,WAgBhEJ,EAAkBI,QAAU,CAAC,W,gCCrM7B,mDAsBA,SAASC,EAAOC,GACZA,EAAcC,aAAaC,KAAK,4BAKpC,SAASC,EAAIpD,EAAYS,GACrBT,EAAWa,IAAI,wBAAwB,WAC/Bb,EAAWG,oBAA0C,sBAApBM,EAAU4C,OAC3C5C,EAAUM,KAAK,cAtB3B8B,QAAQC,OAAO,6BAA8B,CACzC,SACA,eACA,yCACA,yCACA,mDACA,4CAECE,OAAOA,GACPI,IAAIA,GAETJ,EAAOD,QAAU,CAAC,gBAAiB,kBAMnCK,EAAIL,QAAU,CAAC,aAAc","file":"42.190f8880ee8f3a97a042.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', 'toastr', '$rootScope'];\n\nfunction LicenseCtrl($scope, LicenseRestService, toastr, $rootScope) {\n $scope.loader = true;\n\n LicenseRestService.checkLicenseHardcoded()\n .success(function (res) {\n $rootScope.isLicenseHardcoded = (res === 'true');\n })\n .error(function () {\n $rootScope.isLicenseHardcoded = false;\n toastr.error('Error checking license availability');\n })\n .then(function () {\n LicenseRestService.getLicenseInfo()\n .success(function (res) {\n $scope.loader = false;\n $scope.license = res;\n // check if you have a hardcoded license that is not activated through the workbench and if\n // you do disable ability to update license\n })\n .error(function () {\n // no license but we need to check for 417\n $scope.loader = false;\n $scope.license = {message: 'No license was set.', valid: false};\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 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'];\n\nfunction run($rootScope, $location) {\n $rootScope.$on('$locationChangeStart', function () {\n if ($rootScope.isLicenseHardcoded && $location.url() === '/license/register') {\n $location.path('license');\n }\n });\n}\n"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/utils/notifications.js","webpack:///./src/js/angular/similarity/controllers/create-index.controller.js"],"names":["Notifications","toastr","showToastMessageWithDelay","message","Promise","r","success","setTimeout","angular","module","factory","$inject","CreateSimilarityIdxCtrl","$scope","$modal","$timeout","SimilarityRestService","SparqlRestService","$location","productInfo","RDF4JRepositoriesRestService","LocalStorageAdapter","LSKeys","indexType","search","type","undefined","startsWith","viewType","newIndex","info","page","defaultTabConfig","id","name","query","inference","sameAs","initForViewType","indexNameFromLocation","editSearchQuery","options","searchQueries","searchQuery","analogicalQuery","currentQuery","notoolbarInference","notoolbarSameAs","window","editor","setQuery","allSamples","samples","stopList","analyzer","isLiteralIndex","getAndRemoveOption","getIndexes","data","literalIndexes","concat","filter","idx","status","map","inputIndex","desiredIdx","j","length","error","msg","getError","filenamePattern","RegExp","validateIndex","invalidIndexName","saveQueries","test","getQueryType","appendOption","option","value","key","optArr","split","i","join","saveQueryToLocal","currentQueryTab","setLoader","isRunning","progressMessage","extraMessage","yasrInnerContainer","element","document","getElementById","queryIsRunning","queryStartTime","Date","now","countTimeouted","addClass","removeClass","$$phase","$apply","fixSizesOnHorizontalViewModeSwitch","verticalViewParam","visibleWindowHeight","innerHeight","documentElement","clientHeight","body","verticalView","orientationViewMode","viewMode","newHeight","querySelector","getBoundingClientRect","style","height","noPadding","minHeight","paddingRight","paddingLeft","timer","$on","cancel","yasr","container","resize","showHideEditor","selectTab","$","tab","runQuery","changePage","explain","executedQueryTab","warning","getQueryMode","explainRequested","currentTabConfig","resultsCount","resetCurrentTabConfig","getNamespaces","getRepositoryNamespaces","usedPrefixes","results","bindings","forEach","e","prefix","namespace","namespaces","repositoryError","finally","addKnownPrefixes","JSON","stringify","getValue","isDefined","setValue","getExistingTabId","existingTabId","tabsData","item","loadTab","queryType","offset","allResultsCount","pageSize","timeFinished","timeTook","sizeDelta","css","getQueryID","attr","getSearchQueries","getSamples","selectQuery","infer","tabs","copy","$watch","helpHidden","get","HIDE_SIMILARITY_HELP","toggleHelp","set","viewQuery","getQuery","indexName","indexOptions","indexStopList","queryInference","querySameAs","indexAnalyzer","open","templateUrl","controller","resolve","isInvalidIndexName","isEmptyIndexName","trim","goToPage","showEditor","notoolbar","createIndex","index","err","url","xhr","abort","showPreview","outputType","queryExists","saveTab","findTabIndexByID","addNewTab","callback","tabName","savedQuery","changePagination","toggleSampleQueries","querySelected","tabId","getLoaderMessage","timeSeconds","timeHuman","getHumanReadableSeconds","changeViewMode","tabID","remove","focusQueryEditor","find","is","focus","getActiveRepository","on","$watchCollection","tabEvent","relatedTarget","target","showSampleQueries","sampleQueries","getResultsDescription","getUpdateDescription","getStaleWarningMessage","saveSearchQuery","changedQuery","isSearchQuery","then","async","response","getCloseBtnMsg"],"mappings":"+EAMA,SAASA,EAAcC,GACnB,MAAO,CACHC,0BASJ,SAAmCC,GAC/B,OAAO,IAAIC,QAASC,IAChBJ,EAAOK,QAAQH,GACfI,WAAWF,EAAG,SApB1BG,QACKC,OAAO,wCAAyC,IAChDC,QAAQ,gBAAiBV,GAE9BA,EAAcW,QAAU,CAAC,W,gCCJzB,kBAYA,SAASC,EAAwBC,EAAQZ,EAAQa,EAAQC,EAAUC,EAAuBC,EAAmBC,EAAWC,EAAanB,EAAeoB,EAA8BC,EAAqBC,GAEnM,MAAMC,EAAYL,EAAUM,SAASC,UACnBC,IAAdH,GAA2BA,EAAUI,WAAW,QAChDd,EAAOe,SAAW,OAElBf,EAAOe,SAAWL,EAKtBV,EAAOgB,SAAW,GAElBhB,EAAOiB,KAAOX,EACdN,EAAOkB,KAAO,EAEd,MAAMC,EAAmB,CACrBC,GAAI,IACJC,KAAM,GACNC,MAAO,GACPC,WAAW,EACXC,QAAQ,GAcZ,MAAMC,EAAkB,WAXF,IAAUC,EAwB5B,GAZA1B,EAAO2B,gBAAkBtB,EAAUM,SAASgB,gBAC5C3B,EAAOkB,KAAOlB,EAAO2B,gBAAkB,EAAI,EAC3C3B,EAAOgB,SAASK,MAdYK,EAcWrB,EAAUM,SAASU,MAZlC,IAAhBrB,EAAOkB,KACAQ,EAEA,WAAaA,EAGrB,GAOP1B,EAAOgB,SAASY,QAAWvB,EAAUM,SAASiB,QAAUvB,EAAUM,SAASiB,QAA+B,SAApB5B,EAAOe,SA9BtE,kBACA,GA+BnBf,EAAO6B,gBACP7B,EAAOgB,SAASc,YAAczB,EAAUM,SAASmB,YAAczB,EAAUM,SAASmB,YAAc9B,EAA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AsD5BhC,EAAOiH,IAAI,aAAa,SAAUyB,EAAG0F,GAC7BA,EAASC,eACTrO,EAAO4M,QAAQzC,EAAWiE,EAASC,gBAEvCrO,EAAO0J,QAAQS,EAAWiE,EAASE,YAGvCtO,EAAOiH,IAAI,0BAA0B,SAAUyB,EAAG+B,GAC9CzK,EAAOwJ,SAAWiB,EAClBzK,EAAOyK,KAAOA,KAIlBzK,EAAOgC,aAAerC,QAAQ+K,KAAKvJ,GAEnCnB,EAAOuO,mBAAoB,EAC3BvO,EAAOiN,WAAa,GACpBjN,EAAOwO,cAAgB,GAEvBxO,EAAOyO,sBAAwB,aAG/BzO,EAAO0O,qBAAuB,aAG9B1O,EAAO2O,uBAAyB,aAGhC3O,EAAO4O,gBAAkB,WAErB,GAAqC,WAAjCzM,OAAOC,OAAO6B,eAEd,YADA7E,EAAOoE,MAAM,6CAGjB,IAAIX,EAAO,CACPxB,KAAMrB,EAAOgB,SAASK,KACtBwN,aAAc7O,EAAOgC,aAAaV,MAClCwN,cAA+B,IAAhB9O,EAAOkB,MAG1B,OAAOf,EAAsByO,gBAAgB3F,KAAKC,UAAUrG,IACvDkM,MAAKC,uBACI7P,EAAcE,0BAA0C,IAAhBW,EAAOkB,KAAa,uBAAyB,4BAC3Fb,EAAUiM,IAAI,iBACf,SAAU2C,GACT7P,EAAOoE,MAAME,SAASuL,GAAW,+BAI7CjP,EAAOkP,eAAiB,WACpB,MAAO,WAAalP,EAAO2B,gBAAkB,gBAAiB,kBAAoB,gCAtvB1FhC,QACKC,OAAO,kDAAmD,CACvD,wCACA,gDAEH+L,WAAW,0BAA2B5L,GAE3CA,EAAwBD,QAAU,CAAC,SAAU,SAAU,SAAU,WAAY,wBAAyB,oBAAqB,YAAa,cAAe,gBAAiB,+BAAgC,sBAAuB","file":"43.899bf21ce1de203ace21.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.utils.notifications', [])\n .factory('Notifications', Notifications);\n\nNotifications.$inject = ['toastr'];\n\nfunction Notifications(toastr) {\n return {\n showToastMessageWithDelay\n };\n\n /**\n * This method will show message with tiny delay and only after completion\n * of latter redirection to \"graphs-visualizations\" page will happen.\n * @param {string} message The message to be displayed.\n * @return {Promise<any>}\n */\n function showToastMessageWithDelay(message) {\n return new Promise((r) => {\n toastr.success(message);\n setTimeout(r, 200);\n });\n }\n}\n","import 'angular/utils/notifications';\nimport 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.similarity.controllers.create', [\n 'graphdb.framework.utils.notifications',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('CreateSimilarityIdxCtrl', CreateSimilarityIdxCtrl);\n\nCreateSimilarityIdxCtrl.$inject = ['$scope', 'toastr', '$modal', '$timeout', 'SimilarityRestService', 'SparqlRestService', '$location', 'productInfo', 'Notifications', 'RDF4JRepositoriesRestService', 'LocalStorageAdapter', 'LSKeys'];\n\nfunction CreateSimilarityIdxCtrl($scope, toastr, $modal, $timeout, SimilarityRestService, SparqlRestService, $location, productInfo, Notifications, RDF4JRepositoriesRestService, LocalStorageAdapter, LSKeys) {\n\n const indexType = $location.search().type;\n if (indexType === undefined || indexType.startsWith('text')) {\n $scope.viewType = 'text';\n } else {\n $scope.viewType = indexType;\n }\n\n const textDefaultOptions = '-termweight idf';\n const predDefaultOptions = '';\n $scope.newIndex = {};\n\n $scope.info = productInfo;\n $scope.page = 1;\n\n const defaultTabConfig = {\n id: '1',\n name: '',\n query: '',\n inference: true,\n sameAs: true\n };\n\n let getNewIndexName = function (indexNameFromLocation) {\n if (indexNameFromLocation) {\n if ($scope.page !== 1) {\n return indexNameFromLocation;\n } else {\n return 'Copy_of_' + indexNameFromLocation;\n }\n }\n return '';\n };\n\n const initForViewType = function () {\n $scope.editSearchQuery = $location.search().editSearchQuery;\n $scope.page = $scope.editSearchQuery ? 2 : 1;\n $scope.newIndex.name = getNewIndexName($location.search().name);\n $scope.newIndex.options = ($location.search().options ? $location.search().options : ($scope.viewType === \"text\") ? textDefaultOptions : predDefaultOptions);\n\n if ($scope.searchQueries) {\n $scope.newIndex.searchQuery = $location.search().searchQuery ? $location.search().searchQuery : $scope.searchQueries[$scope.viewType];\n if ($scope.viewType === 'predication') {\n $scope.newIndex.analogicalQuery = $location.search().analogicalQuery ? $location.search().analogicalQuery : $scope.searchQueries['analogical'];\n }\n }\n\n if ($scope.editSearchQuery) {\n // Default will be opened search query tab for edition\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n $scope.notoolbarInference = true;\n $scope.notoolbarSameAs = true;\n if (window.editor) {\n $scope.setQuery($scope.newIndex.searchQuery);\n }\n } else {\n if ($scope.viewType === 'text' && $scope.allSamples) {\n $scope.samples = $scope.allSamples['text'];\n $scope.newIndex.stopList = ($location.search().stopList ? $location.search().stopList : undefined);\n $scope.newIndex.analyzer = ($location.search().analyzer ? $location.search().analyzer : 'org.apache.lucene.analysis.en.EnglishAnalyzer');\n const isLiteralIndex = getAndRemoveOption('-literal_index');\n if (isLiteralIndex !== undefined) {\n $scope.newIndex.isLiteralIndex = isLiteralIndex;\n }\n if (window.editor) {\n $scope.setQuery($scope.samples['literals']);\n }\n }\n if ($scope.viewType === 'predication' && $scope.allSamples) {\n SimilarityRestService.getIndexes()\n .success(function (data) {\n $scope.literalIndexes = ['no-index'].concat(data\n .filter(function (idx) {\n return idx.type === 'textLiteral' && (idx.status === 'BUILT' || idx.status === 'OUTDATED')\n })\n .map(function (idx) {\n return idx.name;\n }));\n\n if ($scope.newIndex.inputIndex === undefined) {\n const desiredIdx = getAndRemoveOption('-input_index');\n if (desiredIdx !== undefined) {\n for (let j = 0; j < $scope.literalIndexes.length; j++) {\n if (desiredIdx === $scope.literalIndexes[j]) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[j];\n }\n }\n }\n }\n if ($scope.newIndex.inputIndex === undefined) {\n $scope.newIndex.inputIndex = $scope.literalIndexes[0];\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Could not get indexes');\n });\n\n $scope.samples = $scope.allSamples['predication'];\n if (window.editor) {\n $scope.setQuery($scope.samples['predication']);\n }\n }\n }\n };\n\n const filenamePattern = new RegExp('^[a-zA-Z0-9-_]+$');\n\n const validateIndex = function () {\n $scope.invalidIndexName = false;\n $scope.saveQueries();\n if (!$scope.newIndex.name) {\n $scope.invalidIndexName = 'Index name cannot be empty';\n return false;\n }\n if (!filenamePattern.test($scope.newIndex.name)) {\n $scope.invalidIndexName = 'Index name can contain only letters (a-z, A-Z), numbers (0-9), \"-\" and \"_\"';\n return false;\n }\n\n if (!$scope.newIndex.query) {\n toastr.error('Select query cannot be empty.');\n return false;\n }\n\n if (!$scope.newIndex.searchQuery) {\n toastr.error('Search query cannot be empty.');\n return false;\n }\n\n if ($scope.viewType === 'predication' && !$scope.newIndex.analogicalQuery) {\n toastr.error('Analogical query cannot be empty.');\n return false;\n }\n\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error('Similarity index requires SELECT queries.');\n return;\n }\n\n return true;\n };\n\n const appendOption = function (option, value) {\n $scope.newIndex.options = $scope.newIndex.options + ($scope.newIndex.options === '' ? '' : ' ') + option + ' ' + value;\n };\n\n SimilarityRestService.getSearchQueries().success(function (data) {\n $scope.searchQueries = data;\n SimilarityRestService.getSamples().success(function (samples) {\n defaultTabConfig.query = $location.search().selectQuery ? $location.search().selectQuery : samples['text']['literals'];\n defaultTabConfig.inference = !($location.search().infer === 'false');\n defaultTabConfig.sameAs = !($location.search().sameAs === 'false');\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n $scope.currentQuery = angular.copy(defaultTabConfig);\n $scope.allSamples = samples;\n initForViewType();\n });\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Could not get search queries');\n });\n\n $scope.$watch('viewType', function () {\n initForViewType();\n });\n\n $scope.helpHidden = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP) === 1;\n $scope.toggleHelp = function (value) {\n if (value === undefined) {\n value = LocalStorageAdapter.get(LSKeys.HIDE_SIMILARITY_HELP);\n }\n if (value !== 1) {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 1);\n $scope.helpHidden = true;\n } else {\n LocalStorageAdapter.set(LSKeys.HIDE_SIMILARITY_HELP, 0);\n $scope.helpHidden = false;\n }\n };\n\n $scope.viewQuery = function () {\n if (!validateIndex()) {\n return;\n }\n\n SimilarityRestService.getQuery({\n indexName: $scope.newIndex.name,\n indexOptions: $scope.newIndex.options,\n query: $scope.currentQuery.query,\n indexStopList: $scope.newIndex.stopList,\n queryInference: $scope.currentQuery.inference,\n querySameAs: $scope.currentQuery.sameAs,\n viewType: $scope.viewType,\n indexAnalyzer: $scope.newIndex.analyzer\n }).success(function (query) {\n if (query) {\n $modal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n return query;\n }\n }\n });\n }\n });\n };\n\n $scope.$watch('newIndex.name', function () {\n $scope.isInvalidIndexName = false;\n $scope.isEmptyIndexName = false;\n });\n\n $scope.saveQueries = function () {\n // save the current query\n const query = window.editor.getValue().trim();\n if ($scope.page === 1) {\n $scope.newIndex.query = query;\n } else if ($scope.page === 2) {\n $scope.newIndex.searchQuery = query;\n } else if ($scope.page === 3) {\n $scope.newIndex.analogicalQuery = query;\n }\n };\n\n $scope.goToPage = function (page) {\n // ugly fix for GDB-3099\n if (page !== 1 && $scope.viewMode !== 'yasr') {\n $scope.showEditor();\n $timeout(function () {\n if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n }\n if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n window.editor.setValue($scope.currentQuery.query || ' ');\n });\n }\n\n $scope.saveQueries();\n // get the saved query\n if (page === 1) {\n $scope.currentQuery.query = $scope.newIndex.query;\n } else if (page === 2) {\n $scope.currentQuery.query = $scope.newIndex.searchQuery;\n } else if (page === 3) {\n $scope.currentQuery.query = $scope.newIndex.analogicalQuery;\n }\n\n loadTab();\n $scope.notoolbar = page !== 1;\n\n $scope.page = page;\n };\n\n $scope.createIndex = function () {\n if (!validateIndex()) {\n return;\n }\n // Check existing indexes\n SimilarityRestService.getIndexes()\n .success(function (data) {\n data.forEach(function (index) {\n if (index.name === $scope.newIndex.name) {\n $scope.invalidIndexName = 'Index with this name already exists.';\n }\n });\n if (!$scope.invalidIndexName) {\n let indexType = $scope.viewType;\n\n if ($scope.literalIndexes !== undefined) {\n const inputIndex = $scope.newIndex.inputIndex;\n if (inputIndex !== $scope.literalIndexes[0]) {\n appendOption('-input_index', inputIndex);\n }\n }\n if ($scope.newIndex.isLiteralIndex === 'true') {\n appendOption('-literal_index', 'true');\n indexType = 'textLiteral';\n }\n\n SimilarityRestService.createIndex('POST',\n $scope.newIndex.name,\n $scope.newIndex.options,\n $scope.newIndex.query,\n $scope.newIndex.searchQuery,\n $scope.newIndex.analogicalQuery,\n $scope.newIndex.stopList,\n $scope.currentQuery.inference,\n $scope.currentQuery.sameAs,\n indexType,\n $scope.newIndex.analyzer)\n .error(function (err) {\n toastr.error(getError(err), 'Could not create index');\n });\n $location.url('similarity');\n }\n\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Could not get indexes');\n });\n };\n\n // Called when user clicks on a sample query\n $scope.setQuery = function (query) {\n // Hack for YASQE bug\n window.editor.setValue(query ? query : ' ');\n };\n\n // TODO don't copy paste each time, this is the same as in the graph config\n // DOWN HERE WE KEEP EVERYTHING PURELY QUERY EDITOR (MOSTLY BORROWED FROM query-editor.controller.js)\n\n $scope.showEditor = function () {\n if (window.editor.xhr) {\n window.editor.xhr.abort();\n }\n $scope.viewMode = 'yasr';\n };\n\n $scope.showPreview = function () {\n // For some reason YASR gets confused and sets this to rawResponse\n // if we execute a CONSTRUCT and then a SELECT. This makes sure it's always table.\n $scope.currentQuery.outputType = 'table';\n $scope.runQuery();\n };\n\n $scope.resetCurrentTabConfig = function () {\n $scope.currentTabConfig = {\n pageSize: 100, // page limit 100 as this is only used for preview\n page: 1,\n allResultsCount: 0,\n resultsCount: 0\n };\n };\n\n $scope.queryExists = false;\n\n $scope.resetCurrentTabConfig();\n\n $scope.tabsData = $scope.tabs = [defaultTabConfig];\n\n // query tab operations\n $scope.saveTab = saveTab;\n $scope.loadTab = loadTab;\n $scope.addNewTab = addNewTab;\n\n // query operations\n $scope.runQuery = runQuery;\n $scope.getNamespaces = getNamespaces;\n $scope.changePagination = changePagination;\n $scope.toggleSampleQueries = toggleSampleQueries;\n $scope.addKnownPrefixes = addKnownPrefixes;\n $scope.getExistingTabId = getExistingTabId;\n $scope.querySelected = querySelected;\n $scope.saveQueryToLocal = saveQueryToLocal;\n\n $scope.setLoader = setLoader;\n $scope.getLoaderMessage = getLoaderMessage;\n\n // query editor and results orientation\n $scope.fixSizesOnHorizontalViewModeSwitch = fixSizesOnHorizontalViewModeSwitch;\n $scope.changeViewMode = changeViewMode;\n $scope.showHideEditor = showHideEditor;\n $scope.focusQueryEditor = focusQueryEditor;\n $scope.orientationViewMode = true;\n\n // start of repository actions\n $scope.getActiveRepository();\n\n function getAndRemoveOption(key) {\n const optArr = $scope.newIndex.options.split(' ');\n for (let i = 0; i < optArr.length; i++) {\n if (optArr[i] === key && i + 1 < optArr.length) {\n const value = optArr[i + 1];\n\n delete optArr[i];\n delete optArr[i + 1];\n $scope.newIndex.options = optArr.join(' ');\n\n return value;\n }\n }\n return undefined;\n }\n\n function saveQueryToLocal(currentQueryTab) {\n }\n\n function setLoader(isRunning, progressMessage, extraMessage) {\n const yasrInnerContainer = angular.element(document.getElementById('yasr-inner'));\n $scope.queryIsRunning = isRunning;\n if (isRunning) {\n $scope.queryStartTime = Date.now();\n $scope.countTimeouted = false;\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n yasrInnerContainer.addClass('hide');\n } else {\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n yasrInnerContainer.removeClass('hide');\n }\n // We might call this from angular or outside angular so take care of applying the scope.\n if ($scope.$$phase === null) {\n $scope.$apply();\n }\n }\n\n function getLoaderMessage() {\n const timeSeconds = (Date.now() - $scope.queryStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = '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(verticalViewParam) {\n function visibleWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0;\n }\n\n const verticalView = verticalViewParam;\n if (!$scope.orientationViewMode) {\n $scope.noPadding = {paddingRight: 15, paddingLeft: 0};\n\n // window.editor is undefined if no repo is selected\n if (window.editor && document.querySelector('.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 } else {\n $scope.noPadding = {};\n document.querySelector('.CodeMirror-wrap').style.height = '';\n }\n document.getElementById('yasr').style.minHeight = '';\n }\n if (window.yasr && window.yasr.container) {\n $timeout(function () {\n window.yasr.container.resize();\n }, 100);\n }\n }\n\n if (!$scope.orientationViewMode) {\n showHideEditor();\n }\n\n function changeViewMode(tabID) {\n $scope.viewMode = 'none';\n $scope.orientationViewMode = !$scope.orientationViewMode;\n fixSizesOnHorizontalViewModeSwitch();\n $('.dataTables_filter').remove();\n $('.resultsTable').remove();\n $timeout(function () {\n loadTab();\n selectTab(tabID);\n }, 100);\n }\n\n function showHideEditor() {\n fixSizesOnHorizontalViewModeSwitch(true);\n }\n\n function focusQueryEditor() {\n if (!angular.element(document).find('.editable-input').is(':focus')) {\n angular.element(document).find('.CodeMirror textarea:first-child').focus();\n }\n }\n\n // end of query editor results orientation operations\n\n function selectTab(id) {\n $timeout(function () {\n $('a[data-id = \"' + id + '\"]').tab('show');\n }, 0);\n }\n\n // start of query operations\n function runQuery(changePage, explain) {\n $scope.executedQueryTab = $scope.currentQuery;\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error('Similarity indexes work only with SELECT queries.');\n return;\n }\n if (explain && !(window.editor.getQueryType() === 'SELECT')) {\n toastr.warning('Explain only works with SELECT queries.');\n return;\n }\n\n if (window.editor.getQueryMode() === 'update') {\n toastr.warning('Cannot execute updates from this editor.');\n return;\n }\n\n $scope.explainRequested = explain;\n if (!$scope.queryIsRunning) {\n if (changePage) {\n $scope.currentTabConfig.resultsCount = 0;\n } else {\n $scope.resetCurrentTabConfig();\n }\n\n // Hides the editor and shows the yasr results\n $scope.viewMode = 'editor';\n if ($scope.orientationViewMode) {\n $scope.fixSizesOnHorizontalViewModeSwitch();\n }\n\n setLoader(true, 'Evaluating query');\n window.editor.query();\n }\n }\n\n // FIXME: this is copy-pasted in graphs-config.controller.js and query-editor.controller.js. Find a way to avoid duplications\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 RDF4JRepositoriesRestService.getRepositoryNamespaces()\n .success(function (data) {\n const usedPrefixes = {};\n data.results.bindings.forEach(function (e) {\n usedPrefixes[e.prefix.value] = e.namespace.value;\n });\n $scope.namespaces = usedPrefixes;\n })\n .error(function (data) {\n $scope.repositoryError = getError(data);\n })\n .finally(function () {\n // Signals namespaces were fetched => loader will be hidden\n setLoader(false);\n });\n }\n\n function changePagination() {\n runQuery(true, $scope.explainRequested);\n }\n\n if ($scope.getActiveRepository()) {\n getNamespaces();\n }\n\n $scope.$on('$destroy', function () {\n window.editor = null;\n window.yasr = null;\n });\n\n function toggleSampleQueries() {\n }\n\n // Add known prefixes\n function addKnownPrefixes() {\n SparqlRestService.addKnownPrefixes(JSON.stringify(window.editor.getValue()))\n .success(function (data) {\n if (angular.isDefined(window.editor) && angular.isDefined(data) && data !== window.editor.getValue()) {\n window.editor.setValue(data);\n }\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error! Could not add known prefixes');\n return true;\n });\n }\n\n $('textarea').on('paste', function () {\n $timeout(function () {\n addKnownPrefixes();\n }, 0);\n });\n\n function querySelected(query) {\n const tabId = getExistingTabId(query);\n $scope.toggleSampleQueries();\n if (!angular.isDefined(tabId)) {\n $scope.addNewTab(null, query.name, query.body);\n } else {\n selectTab(tabId);\n }\n }\n\n function getExistingTabId(query) {\n let existingTabId = undefined;\n angular.forEach($scope.tabsData, function (item) {\n if (item.name === query.name && item.query === query.body) {\n existingTabId = item.id;\n return item;\n }\n });\n\n return existingTabId;\n }\n\n\n // end of query operations\n\n // start of query tab operations\n function findTabIndexByID(id) {\n for (let i = 0; i < $scope.tabsData.length; i++) {\n const tab = $scope.tabsData[i];\n if (tab.id === id) {\n return i;\n }\n }\n }\n\n $scope.$watchCollection('[currentQuery.inference, currentQuery.sameAs]', function () {\n saveQueryToLocal($scope.currentQuery);\n });\n\n function saveTab(id) {\n const idx = findTabIndexByID(id);\n // Tab was deleted, don't try to save it's state\n if (idx === undefined) {\n return {};\n }\n const tab = $scope.tabsData[idx];\n //tab.query = window.editor.getValue();\n $scope.saveQueryToLocal(tab);\n return tab;\n }\n\n function addNewTab(callback, tabName, savedQuery) {\n }\n\n function loadTab() {\n $scope.tabsData = [$scope.currentQuery];\n\n const tab = $scope.currentQuery;\n\n if ($scope.currentQuery.query === null || $scope.currentQuery.query === '') {\n // hack for YASQE bug\n window.editor.setValue(' ');\n } else {\n window.editor.setValue($scope.currentQuery.query || ' ');\n }\n\n $timeout(function () {\n $scope.currentTabConfig = {};\n $scope.currentTabConfig.queryType = tab.queryType;\n $scope.currentTabConfig.resultsCount = tab.resultsCount;\n\n $scope.currentTabConfig.offset = tab.offset;\n $scope.currentTabConfig.allResultsCount = tab.allResultsCount;\n $scope.currentTabConfig.page = tab.page;\n $scope.currentTabConfig.pageSize = tab.pageSize;\n\n $scope.currentTabConfig.timeFinished = tab.timeFinished;\n $scope.currentTabConfig.timeTook = tab.timeTook;\n $scope.currentTabConfig.sizeDelta = tab.sizeDelta;\n $scope.$apply();\n }, 0);\n\n //Remove paddign of yasr so it will be aligned with sparql editor\n $('#yasr').css('padding', '0');\n }\n\n function getQueryID(element) {\n return $(element).attr('data-id');\n }\n\n $scope.$on('tabAction', function (e, tabEvent) {\n if (tabEvent.relatedTarget) {\n $scope.saveTab(getQueryID(tabEvent.relatedTarget));\n }\n $scope.loadTab(getQueryID(tabEvent.target));\n });\n\n $scope.$on('deleteAllexeptSelected', function (e, tabs) {\n $scope.tabsData = tabs;\n $scope.tabs = tabs;\n });\n // end of query tab operations\n\n $scope.currentQuery = angular.copy(defaultTabConfig);\n // $scope.state = {};\n $scope.showSampleQueries = false;\n $scope.savedQuery = {};\n $scope.sampleQueries = {};\n\n $scope.getResultsDescription = function () {\n };\n\n $scope.getUpdateDescription = function () {\n };\n\n $scope.getStaleWarningMessage = function () {\n };\n\n $scope.saveSearchQuery = function () {\n // Should validate that query is SELECT\n if (window.editor.getQueryType() !== 'SELECT') {\n toastr.error('Similarity index requires SELECT queries.');\n return;\n }\n let data = {\n name: $scope.newIndex.name,\n changedQuery: $scope.currentQuery.query,\n isSearchQuery: $scope.page === 2\n };\n\n return SimilarityRestService.saveSearchQuery(JSON.stringify(data))\n .then(async function () {\n await Notifications.showToastMessageWithDelay($scope.page === 2 ? 'Changed search query' : 'Changed analogical query');\n $location.url('similarity');\n }, function (response) {\n toastr.error(getError(response), 'Could not change query!');\n });\n };\n\n $scope.getCloseBtnMsg = function () {\n return \"Closes \" + ($scope.editSearchQuery ? \"query edition\": \"index creation\") + \" without saving the changes.\"\n }\n}\n"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/autocomplete/controllers.js"],"names":["AutocompleteCtrl","$scope","$interval","toastr","$repositories","$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","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,EAAQC,EAAUC,EAAyBC,GAE3G,IAAIC,EAEJ,SAASC,IACDD,GACAP,EAAUS,OAAOF,GAIzBR,EAAOW,WAAa,eAEpBX,EAAOY,kBAAoB,SAAUC,GACjCb,EAAOc,eAAiBD,GAG5B,MAAME,EAAuB,WACzBT,EAAwBU,0BACnBC,SAAQ,SAAUC,GACflB,EAAOmB,oBAAsBD,EAC7BX,EAAoBa,sBAAsBF,MAC3CG,OAAM,SAAUH,GACfhB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EAAO6D,YAAc,SAAUT,IA/JL,SAAUA,GAChCpD,EAAO+B,WAAU,EAAM,4BAEvBzB,EAAwBwD,kBAAkBV,GACrCnC,SAAQ,WACLU,IACAF,OACDJ,OAAM,SAAUH,GACfhB,EAAOmB,MAAMC,SAASJ,OACvBe,SAAQ,WACPjC,EAAO+B,WAAU,MAsJzB+B,CAAkBV,IAGtBpD,EAAOoC,IAAI,mBAAmB,WAC1B3B,KACKN,EAAc4D,uBACX5D,EAAc6D,yBACV7D,EAAc8D,yBAG1BjE,EAAO6B,iBACPK,SAvHK/B,EAAc4D,uBACX5D,EAAc6D,yBACV7D,EAAc8D,yBAG1BjE,EAAO6B,iBACPK,KAyHR,SAASgC,EAAalE,EAAQmE,EAAgB9D,EAAUa,GACpDlB,EAAOoD,MAAQgB,QAAQC,KAAKnD,EAAKkC,OACjCpD,EAAOqD,MAAQnC,EAAKmC,MAEpBrD,EAAOsE,GAAK,WACJtE,EAAOuE,KAAKC,QACZL,EAAeM,MAAMzE,EAAOoD,QAIpCpD,EAAOU,OAAS,WACZyD,EAAeO,QAAQ,WAG3B1E,EAAO2E,YAAc,SAAUC,GAC3B5E,EAAOoD,MAAMF,SAAW0B,EACxBvE,GAAS,WACLwE,EAAE,8BAA8BC,UACjC,IAhRXV,QACKW,OAAO,6CANI,CACZ,SACA,gDAKCvB,WAAW,mBAAoBzD,GAC/ByD,WAAW,eAAgBU,GAEhCnE,EAAiBiF,QAAU,CAAC,SAAU,YAAa,SAAU,gBAAiB,SAAU,WAAY,0BAA2B,uBAuP/Hd,EAAac,QAAU,CAAC,SAAU,iBAAkB,WAAY","file":"44.c649782fa0755b53a62c.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', '$modal', '$timeout', 'AutocompleteRestService', '$autocompleteStatus'];\n\nfunction AutocompleteCtrl($scope, $interval, toastr, $repositories, $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 (!$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 (!$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 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{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=47.421938875d2461427ae3.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":"47.421938875d2461427ae3.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":""}
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAuBC,EAAqBC,GAC7M,MAAMC,EAAmB,CACrBC,GAAI,IACJC,KAAM,GACNC,MAAO,kDAGPC,WAAW,EACXC,QAAQ,GAGZ,IACIC,EADAC,EAAYZ,EAASa,eAYzB,SAASC,EAASC,EAAOH,GACrBP,EAAiBI,UAAYG,EAAUI,YAAYC,kBACnDZ,EAAiBK,OAASE,EAAUI,YAAYE,eAEhDH,EAAMI,gBAAkBP,EAAUI,YAAYI,cAC9CL,EAAMM,oBAAsBT,EAAUI,YAAYM,sBAClDP,EAAMQ,SAAWR,EAAMS,KAAOrB,EAAoBsB,IAAIrB,EAAOsB,aAAe,CAACrB,GAE7EU,EAAMY,iBAAiB,iDAAiD,SAAUC,EAAQC,EAAQd,GAC9Fe,EAAiBf,EAAMgB,iBAG3BhB,EAAMiB,IAAI,kBAAmBC,GAqFjC,SAASH,EAAiBI,IA2wB1B,WAEI,GAAIxC,EAAcyC,wBACd,OAEJ,MAAMC,EAAYC,SAASC,eAAe,WACtCF,GAAc7C,EAAOwC,aAAatB,WAAc2B,EAAUG,SAGnDhD,EAAOw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,SAAW9G,EAAO0H,iBAAiBZ,UAAY,eAE/C,4CAIf9G,EAAOgT,uBAAyB,WAC5B,MAAMC,EAAuF,GAA1EL,KAAKM,OAAOjP,KAAKC,MAAQlE,EAAO0H,iBAAiBqE,cAAgB,KACpF,GAAIkH,GAAc,KACd,MAAO,mCAAqCjT,EAAO0Q,wBAAwBuC,GAAc,UAIjG,MAAM9M,EAAS,aAIftC,QAAQC,QAAQtD,GAAS2S,KAAK,SAAUhN,GAExCnG,EAAOyC,IAAI,YAAY,WACnBoB,QAAQC,QAAQtD,GAAS4S,OAAO,SAAUjN,MAoDlD,SAASkN,EAAqBrT,EAAQsT,EAAgBpL,GAC9CA,EAAKwC,cACL1K,EAAO0K,aAAc,GAEzB1K,EAAOiB,MAAQ4C,QAAQ0P,KAAKrL,EAAKjH,OACjCjB,EAAOoO,MAAQlG,EAAKkG,MACpBpO,EAAOqO,KAAOnG,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":"48.52c5b13ab244c45a8c43.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":""}
|