graphdb-workbench 2.0.0-TR5 → 2.0.0-TR9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/{0.21974a2453b9a92dec33.bundle.js → 0.965871b861f4dddbba56.bundle.js} +3 -3
- package/dist/0.965871b861f4dddbba56.bundle.js.map +1 -0
- package/dist/{112.b871480dd961ac3c18b6.bundle.js → 112.0c1bdd906ac321ffbf5f.bundle.js} +2 -2
- package/dist/{112.b871480dd961ac3c18b6.bundle.js.map → 112.0c1bdd906ac321ffbf5f.bundle.js.map} +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js +1 -1
- package/dist/114.282a327015f8ae87918b.bundle.js.map +1 -1
- package/dist/{12.449fb5148a68a44ba324.bundle.js → 12.5d4da897bdd91e8808fa.bundle.js} +2 -2
- package/dist/12.5d4da897bdd91e8808fa.bundle.js.map +1 -0
- package/dist/13.f62fa8acc6e68826e07a.bundle.js +4 -0
- package/dist/13.f62fa8acc6e68826e07a.bundle.js.map +1 -0
- package/dist/14.349458c1675f763995a5.bundle.js +2 -0
- package/dist/14.349458c1675f763995a5.bundle.js.map +1 -0
- package/dist/15.ebce70c05fd90026747b.bundle.js +2 -0
- package/dist/15.ebce70c05fd90026747b.bundle.js.map +1 -0
- package/dist/{17.4b048ae019a8d2fd5b46.bundle.js → 17.f01afdf3b3892d73a3fe.bundle.js} +2 -2
- package/dist/17.f01afdf3b3892d73a3fe.bundle.js.map +1 -0
- package/dist/{18.5514f95535bdd2a71d6e.bundle.js → 18.10f65755b64a6534289e.bundle.js} +2 -2
- package/dist/{18.5514f95535bdd2a71d6e.bundle.js.map → 18.10f65755b64a6534289e.bundle.js.map} +1 -1
- package/dist/{21.e75213686a349ae7df89.bundle.js → 21.b6bf0d54a846411501c7.bundle.js} +2 -2
- package/dist/{21.e75213686a349ae7df89.bundle.js.map → 21.b6bf0d54a846411501c7.bundle.js.map} +1 -1
- package/dist/22.e8167eba683605211409.bundle.js +2 -0
- package/dist/22.e8167eba683605211409.bundle.js.map +1 -0
- package/dist/{23.32f2701680565c5d107b.bundle.js → 23.e3ca5b7bb2cee4f9467f.bundle.js} +3 -3
- package/dist/{23.32f2701680565c5d107b.bundle.js.map → 23.e3ca5b7bb2cee4f9467f.bundle.js.map} +1 -1
- package/dist/{24.8dd957168a8be963b393.bundle.js → 24.d5ea0f435b896dc12709.bundle.js} +2 -2
- package/dist/{24.8dd957168a8be963b393.bundle.js.map → 24.d5ea0f435b896dc12709.bundle.js.map} +1 -1
- package/dist/25.5b3feb79a7be0ca1f4ad.bundle.js +2 -0
- package/dist/25.5b3feb79a7be0ca1f4ad.bundle.js.map +1 -0
- package/dist/26.c4983d9f3009f41beb11.bundle.js +2 -0
- package/dist/26.c4983d9f3009f41beb11.bundle.js.map +1 -0
- package/dist/27.04085d1d15db39ca4a36.bundle.js +2 -0
- package/dist/27.04085d1d15db39ca4a36.bundle.js.map +1 -0
- package/dist/{28.b1c15ce7633c501836c5.bundle.js → 28.57b84065ebe40bb45f72.bundle.js} +2 -2
- package/dist/{28.b1c15ce7633c501836c5.bundle.js.map → 28.57b84065ebe40bb45f72.bundle.js.map} +1 -1
- package/dist/{29.66259b8a21bbb5431a06.bundle.js → 29.959ae6b366d15d0ddea9.bundle.js} +2 -2
- package/dist/{29.66259b8a21bbb5431a06.bundle.js.map → 29.959ae6b366d15d0ddea9.bundle.js.map} +1 -1
- package/dist/{3.9eb2c7cced9d8b971c99.bundle.js → 3.26d967229917c7c5cdfb.bundle.js} +2 -2
- package/dist/{3.9eb2c7cced9d8b971c99.bundle.js.map → 3.26d967229917c7c5cdfb.bundle.js.map} +1 -1
- package/dist/{30.4d469715c2f2d1028b4b.bundle.js → 30.3592aaa1063719853218.bundle.js} +2 -2
- package/dist/30.3592aaa1063719853218.bundle.js.map +1 -0
- package/dist/{31.d810abed46d7c73ade7f.bundle.js → 31.c808da656c9ee6b7e84e.bundle.js} +2 -2
- package/dist/{31.d810abed46d7c73ade7f.bundle.js.map → 31.c808da656c9ee6b7e84e.bundle.js.map} +1 -1
- package/dist/{32.4f4c8e24d97a9d315335.bundle.js → 32.92b02260015995b4f777.bundle.js} +2 -2
- package/dist/{32.4f4c8e24d97a9d315335.bundle.js.map → 32.92b02260015995b4f777.bundle.js.map} +1 -1
- package/dist/{33.ea3b66016bbeff928fc3.bundle.js → 33.479162c943ca9a1982aa.bundle.js} +2 -2
- package/dist/33.479162c943ca9a1982aa.bundle.js.map +1 -0
- package/dist/34.22a096bd891109c927f5.bundle.js +2 -0
- package/dist/34.22a096bd891109c927f5.bundle.js.map +1 -0
- package/dist/{35.b9183a8ffba2bbd8daa1.bundle.js → 35.9c81c96cc1621f9468aa.bundle.js} +2 -2
- package/dist/{35.b9183a8ffba2bbd8daa1.bundle.js.map → 35.9c81c96cc1621f9468aa.bundle.js.map} +1 -1
- package/dist/{36.d444f7ad7724d126da1c.bundle.js → 36.cee947247d32cdcec00e.bundle.js} +2 -2
- package/dist/{36.d444f7ad7724d126da1c.bundle.js.map → 36.cee947247d32cdcec00e.bundle.js.map} +1 -1
- package/dist/{37.e82ed70c9f1ccac1fa36.bundle.js → 37.42e443af5752a63a28fe.bundle.js} +2 -2
- package/dist/{37.e82ed70c9f1ccac1fa36.bundle.js.map → 37.42e443af5752a63a28fe.bundle.js.map} +1 -1
- package/dist/{38.93c5a81548a3294efd9d.bundle.js → 38.5fff5c171cdd2563aad1.bundle.js} +2 -2
- package/dist/{38.93c5a81548a3294efd9d.bundle.js.map → 38.5fff5c171cdd2563aad1.bundle.js.map} +1 -1
- package/dist/{39.30dddbc6461137994eb4.bundle.js → 39.91c49550b6e2d11104fa.bundle.js} +2 -2
- package/dist/{39.30dddbc6461137994eb4.bundle.js.map → 39.91c49550b6e2d11104fa.bundle.js.map} +1 -1
- package/dist/4.786e6f1de67e5c6289a3.bundle.js +2 -0
- package/dist/4.786e6f1de67e5c6289a3.bundle.js.map +1 -0
- package/dist/{40.ae6db480b8323937451c.bundle.js → 40.a7e0220eb0c8a125abde.bundle.js} +2 -2
- package/dist/{40.ae6db480b8323937451c.bundle.js.map → 40.a7e0220eb0c8a125abde.bundle.js.map} +1 -1
- package/dist/41.1258b9502ba9383894d7.bundle.js +2 -0
- package/dist/{41.ba8cb2fb7f46ccb2ab28.bundle.js.map → 41.1258b9502ba9383894d7.bundle.js.map} +1 -1
- package/dist/{43.8d096939ee87946076e0.bundle.js → 43.86f9220f4f79feec5b27.bundle.js} +2 -2
- package/dist/{43.8d096939ee87946076e0.bundle.js.map → 43.86f9220f4f79feec5b27.bundle.js.map} +1 -1
- package/dist/{47.92a64d48c14c1ae82934.bundle.js → 47.fca0edd51becf34c06b7.bundle.js} +2 -2
- package/dist/{47.92a64d48c14c1ae82934.bundle.js.map → 47.fca0edd51becf34c06b7.bundle.js.map} +1 -1
- package/dist/{48.4b57a948edab2d3b9c55.bundle.js → 48.e495edf3c48e1b2fc052.bundle.js} +2 -2
- package/dist/{48.4b57a948edab2d3b9c55.bundle.js.map → 48.e495edf3c48e1b2fc052.bundle.js.map} +1 -1
- package/dist/49.80591a5efda019de6e4a.bundle.js +2 -0
- package/dist/49.80591a5efda019de6e4a.bundle.js.map +1 -0
- package/dist/{53.4b8ed1b79c1c20cdadd4.bundle.js → 53.c29678970b0cb8aa4b47.bundle.js} +2 -2
- package/dist/{53.4b8ed1b79c1c20cdadd4.bundle.js.map → 53.c29678970b0cb8aa4b47.bundle.js.map} +1 -1
- package/dist/{55.751acc0e54255fa3ace7.bundle.js → 55.427172af3ba7612f747a.bundle.js} +2 -2
- package/dist/{55.751acc0e54255fa3ace7.bundle.js.map → 55.427172af3ba7612f747a.bundle.js.map} +1 -1
- package/dist/{57.677c1eebf6a003639fff.bundle.js → 57.41b09f5fa3ee623aab83.bundle.js} +2 -2
- package/dist/{57.677c1eebf6a003639fff.bundle.js.map → 57.41b09f5fa3ee623aab83.bundle.js.map} +1 -1
- package/dist/{58.2c460e480eefb1a02aea.bundle.js → 58.ce5a29dded68f58c53b4.bundle.js} +2 -2
- package/dist/{58.2c460e480eefb1a02aea.bundle.js.map → 58.ce5a29dded68f58c53b4.bundle.js.map} +1 -1
- package/dist/{59.b8e9155530acba27a6fa.bundle.js → 59.10efdeff3a8ef9e5733d.bundle.js} +2 -2
- package/dist/{59.b8e9155530acba27a6fa.bundle.js.map → 59.10efdeff3a8ef9e5733d.bundle.js.map} +1 -1
- package/dist/{60.27e731a670680751538c.bundle.js → 60.97fb695857f6241ae612.bundle.js} +2 -2
- package/dist/{60.27e731a670680751538c.bundle.js.map → 60.97fb695857f6241ae612.bundle.js.map} +1 -1
- package/dist/{61.fce8a2436742c2e20032.bundle.js → 61.5d71ec3fe0cda230482b.bundle.js} +2 -2
- package/dist/{61.fce8a2436742c2e20032.bundle.js.map → 61.5d71ec3fe0cda230482b.bundle.js.map} +1 -1
- package/dist/{62.9e101a1894ee0f9a48be.bundle.js → 62.d53d104f74f9fbdacb35.bundle.js} +2 -2
- package/dist/{62.9e101a1894ee0f9a48be.bundle.js.map → 62.d53d104f74f9fbdacb35.bundle.js.map} +1 -1
- package/dist/{63.3ffdfd6f35fe62ea729c.bundle.js → 63.46514dd9cf756bd0e831.bundle.js} +2 -2
- package/dist/{63.3ffdfd6f35fe62ea729c.bundle.js.map → 63.46514dd9cf756bd0e831.bundle.js.map} +1 -1
- package/dist/{65.96a1f2f3c83a29e2c6c3.bundle.js → 65.401f44aaddb8aec6be1e.bundle.js} +2 -2
- package/dist/{65.96a1f2f3c83a29e2c6c3.bundle.js.map → 65.401f44aaddb8aec6be1e.bundle.js.map} +1 -1
- package/dist/{66.cf37216fb6f8e53cef2b.bundle.js → 66.7a1e4093247d23b65387.bundle.js} +2 -2
- package/dist/{66.cf37216fb6f8e53cef2b.bundle.js.map → 66.7a1e4093247d23b65387.bundle.js.map} +1 -1
- package/dist/{69.60ff11762016829be80d.bundle.js → 69.1944a1afebe9115c9262.bundle.js} +2 -2
- package/dist/{69.60ff11762016829be80d.bundle.js.map → 69.1944a1afebe9115c9262.bundle.js.map} +1 -1
- package/dist/7.0d2811d01a379d8b75fb.bundle.js +3 -0
- package/dist/7.0d2811d01a379d8b75fb.bundle.js.map +1 -0
- package/dist/{70.f86421bf02a9bfda5b95.bundle.js → 70.84500509fe2b0d19ab93.bundle.js} +2 -2
- package/dist/{70.f86421bf02a9bfda5b95.bundle.js.map → 70.84500509fe2b0d19ab93.bundle.js.map} +1 -1
- package/dist/{76.fa9e5d02f7e1367b9b29.bundle.js → 76.2fa18e115678c4e24682.bundle.js} +2 -2
- package/dist/{76.fa9e5d02f7e1367b9b29.bundle.js.map → 76.2fa18e115678c4e24682.bundle.js.map} +1 -1
- package/dist/8.7209929899c18f8a4580.bundle.js +2 -0
- package/dist/8.7209929899c18f8a4580.bundle.js.map +1 -0
- package/dist/{80.37504cf0c1e5ad897478.bundle.js → 80.83e56da7d7a69fc34eed.bundle.js} +2 -2
- package/dist/{80.37504cf0c1e5ad897478.bundle.js.map → 80.83e56da7d7a69fc34eed.bundle.js.map} +1 -1
- package/dist/{82.9b4d4dc326055aa47e04.bundle.js → 82.74d50036c210cb10b7f5.bundle.js} +2 -2
- package/dist/{82.9b4d4dc326055aa47e04.bundle.js.map → 82.74d50036c210cb10b7f5.bundle.js.map} +1 -1
- package/dist/{84.fab513b88806deb0981a.bundle.js → 84.7f42dd9d7dc01baaf465.bundle.js} +2 -2
- package/dist/{84.fab513b88806deb0981a.bundle.js.map → 84.7f42dd9d7dc01baaf465.bundle.js.map} +1 -1
- package/dist/{86.b319a8b9fcabecd7a6c7.bundle.js → 86.581cbc54b6c6b6ea9f19.bundle.js} +2 -2
- package/dist/{86.b319a8b9fcabecd7a6c7.bundle.js.map → 86.581cbc54b6c6b6ea9f19.bundle.js.map} +1 -1
- package/dist/{87.765567c0cbe89cbdb03c.bundle.js → 87.3606797303ead8dc2879.bundle.js} +2 -2
- package/dist/{87.765567c0cbe89cbdb03c.bundle.js.map → 87.3606797303ead8dc2879.bundle.js.map} +1 -1
- package/dist/{88.50c46652774325bffad3.bundle.js → 88.f5b8f83e57c9bea3c137.bundle.js} +2 -2
- package/dist/{88.50c46652774325bffad3.bundle.js.map → 88.f5b8f83e57c9bea3c137.bundle.js.map} +1 -1
- package/dist/{89.91c58e1902b0f444b068.bundle.js → 89.f9b4c4ddff2c0b5b70f7.bundle.js} +2 -2
- package/dist/{89.91c58e1902b0f444b068.bundle.js.map → 89.f9b4c4ddff2c0b5b70f7.bundle.js.map} +1 -1
- package/dist/{9.16a945b967e9a52bf535.bundle.js → 9.6a95a5c1eec963050422.bundle.js} +2 -2
- package/dist/{9.16a945b967e9a52bf535.bundle.js.map → 9.6a95a5c1eec963050422.bundle.js.map} +1 -1
- package/dist/{90.e12e77898d6341e59d8f.bundle.js → 90.4d42ba583fbc1d63d3d2.bundle.js} +2 -2
- package/dist/{90.e12e77898d6341e59d8f.bundle.js.map → 90.4d42ba583fbc1d63d3d2.bundle.js.map} +1 -1
- package/dist/95.1f83b03f48326a6cec45.bundle.js +2 -0
- package/dist/{95.decfcd3477dee353025b.bundle.js.map → 95.1f83b03f48326a6cec45.bundle.js.map} +1 -1
- package/dist/{bundle.6ce2d745fe23f2a6d129.bundle.js → bundle.1a982e7b3e2d9d06a802.bundle.js} +5 -5
- package/dist/bundle.1a982e7b3e2d9d06a802.bundle.js.map +1 -0
- package/dist/css/graphs-vizualizations.css +9 -1
- package/dist/css/lib/yasr.css +1 -0
- package/dist/css/yasr.custom.css +9 -0
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/queryeditor/templates/query-editor.html +1 -0
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/{main.ea86ac1b6d636ab25dc7.css → main.db108895fbac32ad7e7b.css} +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/clusterInfo.html +1 -1
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +20 -10
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +2 -2
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +2 -2
- package/dist/pages/repository.html +2 -2
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +25 -25
- package/package.json +1 -1
- package/dist/0.21974a2453b9a92dec33.bundle.js.map +0 -1
- package/dist/12.449fb5148a68a44ba324.bundle.js.map +0 -1
- package/dist/13.77a8eae45bc4cda5fae7.bundle.js +0 -4
- package/dist/13.77a8eae45bc4cda5fae7.bundle.js.map +0 -1
- package/dist/14.a1d84445382b665e13e0.bundle.js +0 -2
- package/dist/14.a1d84445382b665e13e0.bundle.js.map +0 -1
- package/dist/15.73ffeb044255abbac7bf.bundle.js +0 -2
- package/dist/15.73ffeb044255abbac7bf.bundle.js.map +0 -1
- package/dist/17.4b048ae019a8d2fd5b46.bundle.js.map +0 -1
- package/dist/22.a3b52347055f1adac9ce.bundle.js +0 -2
- package/dist/22.a3b52347055f1adac9ce.bundle.js.map +0 -1
- package/dist/25.34da4f496fc62f2dae9b.bundle.js +0 -2
- package/dist/25.34da4f496fc62f2dae9b.bundle.js.map +0 -1
- package/dist/26.02814d2ed726f5a71d4e.bundle.js +0 -2
- package/dist/26.02814d2ed726f5a71d4e.bundle.js.map +0 -1
- package/dist/27.827ef7f030a5501be29a.bundle.js +0 -2
- package/dist/27.827ef7f030a5501be29a.bundle.js.map +0 -1
- package/dist/30.4d469715c2f2d1028b4b.bundle.js.map +0 -1
- package/dist/33.ea3b66016bbeff928fc3.bundle.js.map +0 -1
- package/dist/34.620159c2b04af0a88d1b.bundle.js +0 -2
- package/dist/34.620159c2b04af0a88d1b.bundle.js.map +0 -1
- package/dist/4.6a8bdb4c9048dd910bfd.bundle.js +0 -2
- package/dist/4.6a8bdb4c9048dd910bfd.bundle.js.map +0 -1
- package/dist/41.ba8cb2fb7f46ccb2ab28.bundle.js +0 -2
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js +0 -2
- package/dist/49.71f6e0f6f3284bf63cab.bundle.js.map +0 -1
- package/dist/7.036cd4322fa473fb187a.bundle.js +0 -3
- package/dist/7.036cd4322fa473fb187a.bundle.js.map +0 -1
- package/dist/8.46db359ed59a04d3799b.bundle.js +0 -2
- package/dist/8.46db359ed59a04d3799b.bundle.js.map +0 -1
- package/dist/95.decfcd3477dee353025b.bundle.js +0 -2
- package/dist/bundle.6ce2d745fe23f2a6d129.bundle.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[34,85],{29:function(n,e){angular.module("graphdb.framework.rest.connectors.service",[]).factory("ConnectorsRestService",o),o.$inject=["$http"];const t="rest/connectors";function o(n){return{getConnectors:function(){return n.get(t)},initConnector:function(e){return n.get(`${t}/options?prefix=${e}`)},hasConnector:function(e){return n.get(`${t}/existing?prefix=${e}`)},checkConnector:function(e){return n.post(`${t}/check`,e,{headers:{"Content-Type":"text/plain"}})}}}},32:function(n,e,t){"use strict";t.r(e);t(10),t(29);function o(n){const e=[];return Object.keys(n).forEach((function(t){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n[t]))})),e.join("&")}function r(n,e){for(let o=0;o<e.length;o++){const r=e[o];if("StringArray"===r.__type)n[r.__name]||(n[r.__name]=[""]);else if("OptionArray"===r.__type)if(n[r.__name])for(let e=0;e<r.__childOptions.length;e++){const t=r.__childOptions[e];if("Boolean"===t.__type)for(let e=0;e<n[r.__name].length;e++){const o=n[r.__name][e];!o.hasOwnProperty([t.__name])&&angular.isDefined(t.__defaultValue)&&(o[t.__name]=t.__defaultValue)}}else{n[r.__name]=[];const e={};for(let n=0;n<r.__childOptions.length;n++){const t=r.__childOptions[n];"StringArray"===t.__type?e[t.__name]=[""]:e[t.__name]=angular.isUndefined(t.__defaultValue)?"":t.__defaultValue}n[r.__name].push(e)}else"Map"===r.__type?n[r.__name]?n[r.__name]=(t=n[r.__name],_.map(t,(function(n,e){return{key:e,value:n}}))):n[r.__name]=[]:"JsonString"===r.__type?n[r.__name]&&(n[r.__name]=angular.toJson(n[r.__name],2)):angular.isUndefined(n[r.__name])&&(n[r.__name]=angular.isUndefined(r.__defaultValue)?"":r.__defaultValue)}var t;return n}function i(n,e,t){return n.post("repositories/"+e,o({query:t}),{headers:{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/sparql-results+json","X-GraphDB-Local-Consistency":"updating"}})}function c(n){return n.substring(0,n.length-1)+"/instance#"}function a(n,e,t,o,r){const i=function n(e,t){const o={};return _.each(t,(function(t){angular.isDefined(e[t.__name])&&("OptionArray"===t.__type?(o[t.__name]=[],_.each(e[t.__name],(function(e){o[t.__name].push(n(e,t.__childOptions))}))):o[t.__name]=angular.copy(e[t.__name]))})),o}(t,o);for(let n=0;n<o.length;n++)try{"Map"===o[n].__type?i[o[n].__name]=(a=i[o[n].__name],_.reduce(a,(function(n,e){if(""===e.key&&""===e.value);else{if(""===e.key)throw new Error('Key may not be empty with value "'+e.value+'"');if(n.hasOwnProperty(e.key))throw new Error("Duplicate key "+e.key);n[e.key]=e.value}return n}),{})):"JsonString"===o[n].__type&&(i[o[n].__name]=angular.fromJson(i[o[n].__name]))}catch(e){return r(o[n].__label,e.message),null}var a;!function n(e){Array.isArray(e)&&(e=_.filter(e,(function(n){return null!==n&&(!n.trim||""!==n.trim())})));return Object.keys(e).forEach((function(t){""!==e[t]&&null!=e[t]||!1===e[t]?"object"==typeof e[t]&&(e[t]=n(e[t])):delete e[t]})),e}(i);let s="";return s+="PREFIX :<"+e+">\n",s+="PREFIX inst:<"+c(e)+">\n",s+="INSERT DATA {\n",s+="\tinst:"+n+" :createConnector '''\n",s+=angular.toJson(i,2),s+="\n''' .\n}\n",s=s.replace(/\\/g,"\\\\\\"),s}function s(n,e,t,s,l,u,f,p,d){function g(e){n.beingBuiltConnector={percentDone:0,status:{processedEntities:0,estimatedEntities:0,indexedEntities:0,entitiesPerSecond:0},actionName:e?"Repairing":"Creating",waitOnRepairStartOnce:!!e,eta:"-",inline:!1,iri:null}}function m(e,t,o){return g(o),$.extend(n.beingBuiltConnector,{iri:c(e)+t,name:t,inline:!1,doneCallback:function(){n.beingBuiltConnector.modalInstance.dismiss("cancel")}}),n.beingBuiltConnector.modalInstance=s.open({templateUrl:"pages/connectorProgress.html",controller:"CreateProgressCtrl",size:"lg",backdrop:"static",scope:n}),n.beingBuiltConnector.modalInstance}function C(e,r,i){const c=m(e.value,r.name,!1);p.addStatements(t.getActiveRepository(),o({update:r.query})).then((function(){d.getConnectors().then((function(){d.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))})),l.success("Created connector "+r.name)}),(function(n){l.error(getError(n)),i()})).finally((function(){c.dismiss("cancel")}))}n.loader=!1,n.controllers=[],n.existing={},n.definitions={},n.getLoaderMessage=function(){const e=(Date.now()-n.loaderStartTime)/1e3,t=n.getHumanReadableSeconds(e);let o="";return o=n.progressMessage?n.progressMessage+"... "+t:"Running operation..."+t,n.extraMessage&&e>10&&(o+="\n"+n.extraMessage),o},n.setLoader=function(e,t,o){e?(n.loader=!0,n.loaderStartTime=Date.now(),n.progressMessage=t,n.extraMessage=o):(n.loader=!1,n.progressMessage="",n.extraMessage="")},n.initConnector=function(e){return d.initConnector(encodeURIComponent(e.value)).then((function(t){return n.definitions[e.key]=t.data,d.hasConnector(encodeURIComponent(e.value)).then((function(t){n.existing[e.key]=t.data}))}))},n.getConnectors=function(){n.isLicenseValid()&&n.canWriteActiveRepo()&&(n.setLoader(!0,"Fetching connectors","Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first."),d.getConnectors().then((function(o){n.connectors=Object.keys(o.data).map((function(n){return{key:n,value:o.data[n]}})),f.all(_.map(n.connectors,(function(e){return n.initConnector(e)}))).finally((function(){g();const o=function(n){const e=_.map(n,(function(n){return"<"+n.value+"connectorStatus>"})).join("|");return e?"SELECT ?connector ?status { ?connector "+e+" ?status }":null}(n.connectors);o?function(n){return i(e,t.getActiveRepository(),n)}(o).then((function(e){const t=function(n){if(n.bindings)for(let e=0;e<n.bindings.length;e++)try{const t=JSON.parse(n.bindings[e].status.value);if("BUILDING"===t.status)return{connector:n.bindings[e].connector.value,status:t}}catch(n){console.error(n)}return{}}(e.data.results);if(t.connector){const e=t.connector.split(/#/);e[0]=e[0].replace(/\/instance$/,"#"),o=e[0],r=e[1],g(),$.extend(n.beingBuiltConnector,{iri:c(o)+r,name:r,inline:!0,doneCallback:function(){n.beingBuiltConnector.inline=!1}})}var o,r})).finally((function(){n.setLoader(!1)})):n.setLoader(!1)}))})).catch((function(e){n.setLoader(!1),l.error(getError(e),"Could not get connectors")})),n.existing={})},n.getOptions=function(e){return n.definitions[e.key]},n.isEmpty=function(n){return angular.isObject(n)&&0===Object.keys(n).length},n.toPrettyJson=function(n){return angular.toJson(n,2)},n.$watch((function(){return t.getActiveRepository()}),n.getConnectors),n.$watch((function(){return t.getActiveLocation()}),n.getConnectors),n.copyConnector=function(e,t){let o;angular.isUndefined(t)||(o=angular.copy(t),o.name=o.name+"-copy"),s.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(o)?{name:"",values:{}}:o},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.newConnector=function(e,t){s.open({templateUrl:"pages/createConnector.html",controller:"CreateConnectorCtrl",size:"lg",backdrop:"static",resolve:{connector:function(){return e},values:function(){return angular.isUndefined(t)?{name:"",values:{}}:t},options:function(){return n.getOptions(e)}}}).result.then((function(t){C(e,t,(function(){t.skipConversion=!0,n.newConnector(e,t)}))}))},n.repair=function(e,r){u.openSimpleModal({title:"Confirm repair",message:"Are you sure you want to repair this connector?<br>Note that repair means delete + recreate with the same settings.",warning:!0}).result.then((function(){const i=m(r.value,e.name,!0),a=(s=e.name,"PREFIX prefix:<"+(u=r.value)+">\nINSERT DATA {\n\t<"+c(u)+s+'> prefix:repairConnector ""\n}');var s,u;p.addStatements(t.getActiveRepository(),o({update:a})).then((function(){d.getConnectors().then((function(){d.hasConnector(encodeURIComponent(r.value)).then((function(e){n.existing[r.key]=e.data}))})),l.success("Repaired connector "+e.name)}),(function(n){l.error(getError(n))})).finally((function(){i.dismiss("cancel")}))}))},n.delete=function(e,r){const i=r.key.indexOf("Elastic")>=0||r.key.indexOf("Solr")>=0;s.open({templateUrl:"js/angular/externalsync/templates/deleteConnector.html",controller:"DeleteConnectorCtrl",resolve:{type:function(){return r.key},isExternal:function(){return i}}}).result.then((function(c){n.setLoader(!0,"Deleting connector "+e.name,"This is usually a fast operation but it might take a while.");const a=function(n,e,t){const o=e.substring(0,e.length-1)+"/instance#";return"PREFIX prefix:<"+e+">\nINSERT DATA {\n\t<"+o+n+'> prefix:dropConnector "'+(t?"force":"")+'"\n}'}(e.name,r.value,c);p.addStatements(t.getActiveRepository(),o({update:a})).then((function(){d.getConnectors().then((function(){d.hasConnector(encodeURIComponent(r.value)).then((function(e){n.existing[r.key]=e.data}))})),c?(l.success("Deleted (with force) connector "+e.name),i&&l.warning("You may have to remove the index manually from "+r.key)):l.success("Deleted connector "+e.name)}),(function(n){l.error(getError(n))})).finally((function(){n.setLoader(!1)}))}))},n.viewQuery=function(e,t){s.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){const o=n.getOptions(e);return a(t.name,e.value,r(t.values,o),o)}}})}}function l(n,e,t,o){n.force=!1,n.type=t,n.isExternal=o,n.ok=function(){e.close(n.force)},n.cancel=function(){e.dismiss()}}function u(n,e,t,o,r){function i(){return a(n.name,t.value,n.values,n.options,(function(n,e){r.error(e,n)}))}n.connector=t,n.addField=function(e,t){const o=angular.copy(n.defaultValues[t][0]);n.values[t].splice(e+1,0,o)},n.addOption=function(n,e){e.splice(n+1,0,"")},n.deleteOption=function(n,e){e.splice(n,1)},n.addMapOption=function(n,e){e.splice(n+1,0,{key:"",value:""})},n.deleteMapOption=function(n,e){e.splice(n,1)},n.ok=function(){if(n.form.$valid){const t=i();t&&e.close({name:n.name,values:n.values,options:n.options,query:t})}},n.viewQuery=function(){const n=i();n&&o.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:function(){return n}}})},n.cancel=function(){e.dismiss("cancel")}}function f(n,e,t,o,i,c,a,s){angular.extend(this,e("ExtendNewConnectorCtrl",{$scope:n,$modalInstance:o,connector:i,$modal:c})),n.values=a.values,n.options=s,n.name=a.name,a.skipConversion||(n.values=r(n.values,n.options)),n.defaultValues=angular.copy(n.values)}function p(n,e,t,o){function r(){const r=function(n){const e=n.replace(/\/instance#.+$/,"#connectorStatus");let t="";return t+="SELECT ?status {\n",t+="\t<"+n+"> <"+e+"> ?status",t+="\n}",t}(n.beingBuiltConnector.iri);n.beingBuiltConnector.iri=null,n.progressInterval=e((function(){(function(n){return i(t,o.getActiveRepository(),n)})(r).then((function(t){const o=function(n){if(n.bindings&&n.bindings.length>0)try{return JSON.parse(n.bindings[0].status.value)}catch(n){console.error(n)}return{}}(t.data.results);"BUILDING"===o.status?(n.beingBuiltConnector.status=o,n.beingBuiltConnector.percentDone=(100*o.processedEntities/o.estimatedEntities).toFixed(0),n.beingBuiltConnector.eta=n.getHumanReadableSeconds(o.etaSeconds),n.beingBuiltConnector.actionName=o.repair?"Repairing":"Creating",n.beingBuiltConnector.waitOnRepairStartOnce=!1):"BUILT"!==o.status||n.beingBuiltConnector.waitOnRepairStartOnce||(e.cancel(n.progressInterval),n.beingBuiltConnector.doneCallback&&n.beingBuiltConnector.doneCallback())}))}),1e3),n.$on("$destroy",(function(){e.cancel(n.progressInterval)}))}n.beingBuiltConnector=n.beingBuiltConnector||{},!n.beingBuiltConnector.inline&&n.beingBuiltConnector.iri&&r(),n.$watch("beingBuiltConnector.iri",(function(e){n.beingBuiltConnector.inline&&e&&r()}))}angular.module("graphdb.framework.externalsync.controllers",["graphdb.framework.rest.rdf4j.repositories.service","graphdb.framework.rest.connectors.service"]).controller("ConnectorsCtrl",s).controller("ExtendNewConnectorCtrl",u).controller("CreateConnectorCtrl",f).controller("CreateProgressCtrl",p).controller("DeleteConnectorCtrl",l).filter("ceil",(function(){return function(n){return Math.ceil(n)}})),s.$inject=["$scope","$http","$repositories","$modal","toastr","ModalService","$q","RDF4JRepositoriesRestService","ConnectorsRestService"],l.$inject=["$scope","$modalInstance","type","isExternal"],u.$inject=["$scope","$modalInstance","connector","$modal","toastr"],f.$inject=["$scope","$controller","$http","$modalInstance","connector","$modal","values","options"],p.$inject=["$scope","$interval","$http","$repositories"]}}]);
|
|
2
|
-
//# sourceMappingURL=34.620159c2b04af0a88d1b.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/rest/connectors.rest.service.js","webpack:///./src/js/angular/externalsync/controllers.js"],"names":["angular","module","factory","ConnectorsRestService","$inject","CONNECTORS_ENDPOINT","$http","getConnectors","get","initConnector","prefix","hasConnector","checkConnector","data","post","headers","jsonToFormData","str","Object","keys","forEach","key","push","encodeURIComponent","join","mapCreateValuesToUiValues","values","options","i","length","option","__type","__name","j","__childOptions","child","k","valueK","hasOwnProperty","isDefined","__defaultValue","optionEl","isUndefined","map","_","value","toJson","_evaluateSparqlQuery","http","repository","query","buildNamePrefix","substring","createConnectorQuery","name","fields","reportError","fcopy","sortObject","obj","newObject","each","childOption","copy","arrayMap","reduce","acc","Error","fromJson","e","__label","message","removeEmptyValues","Array","isArray","filter","item","trim","finalString","replace","ConnectorsCtrl","$scope","$repositories","$modal","toastr","ModalService","$q","RDF4JRepositoriesRestService","resetProgress","repair","beingBuiltConnector","percentDone","status","processedEntities","estimatedEntities","indexedEntities","entitiesPerSecond","actionName","waitOnRepairStartOnce","eta","inline","iri","openProgressModal","$","extend","doneCallback","modalInstance","dismiss","open","templateUrl","controller","size","backdrop","scope","executeCreate","connector","errorCallback","modal","addStatements","getActiveRepository","update","then","res","existing","success","err","error","getError","finally","loader","controllers","definitions","getLoaderMessage","timeSeconds","Date","now","loaderStartTime","timeHuman","getHumanReadableSeconds","progressMessage","extraMessage","setLoader","isRunning","isLicenseValid","canWriteActiveRepo","connectors","all","connectorIris","createStatusQueryForAny","evaluateSparqlQuery","results","bindings","statusObject","JSON","parse","console","parseFirstBuildingResult","d","split","catch","getOptions","isEmpty","isObject","toPrettyJson","$watch","getActiveLocation","copyConnector","newValues","resolve","result","skipConversion","newConnector","inst","type","openSimpleModal","title","warning","delete","isExternal","indexOf","force","namePrefix","deleteConnectorQuery","viewQuery","DeleteConnectorCtrl","$modalInstance","ok","close","cancel","ExtendNewConnectorCtrl","toQuery","label","addField","index","optionName","newField","defaultValues","splice","addOption","array","deleteOption","addMapOption","deleteMapOption","form","$valid","CreateConnectorCtrl","$controller","this","CreateProgressCtrl","$interval","initProgress","statusIri","createStatusQueryForIri","progressInterval","getFirstStatusFromResult","toFixed","etaSeconds","$on","input","Math","ceil"],"mappings":"8EAAAA,QACKC,OAAO,4CAA6C,IACpDC,QAAQ,wBAAyBC,GAEtCA,EAAsBC,QAAU,CAAC,SAEjC,MAAMC,EAAsB,kBAE5B,SAASF,EAAsBG,GAE3B,MAAO,CACHC,cAMJ,WACI,OAAOD,EAAME,IAAIH,IANjBI,cASJ,SAAuBC,GACnB,OAAOJ,EAAME,IAAI,GAAGH,oBAAsCK,MAT1DC,aAYJ,SAAsBD,GAClB,OAAO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Be,qBAI5C,KAEHxB,EAAOwI,IAAI,YAAY,WACnBR,EAAUrB,OAAO3G,EAAOoI,qBAIhCpI,EAAOS,oBAAsBT,EAAOS,qBAAuB,IAGtDT,EAAOS,oBAAoBU,QAAUnB,EAAOS,oBAAoBW,KACjE6G,IAIJjI,EAAOmF,OAAO,2BAA2B,SAAUvH,GAC3CoC,EAAOS,oBAAoBU,QAAUvD,GACrCqK,OA7tBZlN,QACKC,OAAO,6CANI,CACZ,oDACA,8CAKC6G,WAAW,iBAAkB9B,GAC7B8B,WAAW,yBAA0B+E,GACrC/E,WAAW,sBAAuB+F,GAClC/F,WAAW,qBAAsBkG,GACjClG,WAAW,sBAAuB0E,GAClC7G,OAAO,QA2tBZ,WACI,OAAO,SAAU+I,GACb,OAAOC,KAAKC,KAAKF,OA7fzB1I,EAAe5E,QAAU,CAAC,SAAU,QAAS,gBAAiB,SAAU,SAAU,eAAgB,KAAM,+BAAgC,yBAoVxIoL,EAAoBpL,QAAU,CAAC,SAAU,iBAAkB,OAAQ,cAenEyL,EAAuBzL,QAAU,CAAC,SAAU,iBAAkB,YAAa,SAAU,UAgErFyM,EAAoBzM,QAAU,CAAC,SAAU,cAAe,QAAS,iBAAkB,YAAa,SAAU,SAAU,WAqBpH4M,EAAmB5M,QAAU,CAAC,SAAU,YAAa,QAAS","file":"34.620159c2b04af0a88d1b.bundle.js","sourcesContent":["angular\n .module('graphdb.framework.rest.connectors.service', [])\n .factory('ConnectorsRestService', ConnectorsRestService);\n\nConnectorsRestService.$inject = ['$http'];\n\nconst CONNECTORS_ENDPOINT = 'rest/connectors';\n\nfunction ConnectorsRestService($http) {\n\n return {\n getConnectors,\n initConnector,\n hasConnector,\n checkConnector\n };\n\n function getConnectors() {\n return $http.get(CONNECTORS_ENDPOINT);\n }\n\n function initConnector(prefix) {\n return $http.get(`${CONNECTORS_ENDPOINT}/options?prefix=${prefix}`);\n }\n\n function hasConnector(prefix) {\n return $http.get(`${CONNECTORS_ENDPOINT}/existing?prefix=${prefix}`);\n }\n\n function checkConnector(data) {\n return $http.post(`${CONNECTORS_ENDPOINT}/check`, data, {\n headers: {\n 'Content-Type': 'text/plain'\n }\n });\n }\n}\n","import 'angular/rest/rdf4j.repositories.rest.service';\nimport 'angular/rest/connectors.rest.service';\n\nconst modules = [\n 'graphdb.framework.rest.rdf4j.repositories.service',\n 'graphdb.framework.rest.connectors.service'\n];\n\nangular\n .module('graphdb.framework.externalsync.controllers', modules)\n .controller('ConnectorsCtrl', ConnectorsCtrl)\n .controller('ExtendNewConnectorCtrl', ExtendNewConnectorCtrl)\n .controller('CreateConnectorCtrl', CreateConnectorCtrl)\n .controller('CreateProgressCtrl', CreateProgressCtrl)\n .controller('DeleteConnectorCtrl', DeleteConnectorCtrl)\n .filter('ceil', ceil);\n\nfunction jsonToFormData(data) {\n const str = [];\n Object.keys(data).forEach(function (key) {\n str.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));\n });\n return str.join('&');\n}\n\nfunction toArrayMap(map) {\n return _.map(map, function (value, key) {\n return {key: key, value: value};\n });\n}\n\nfunction fromArrayMap(arrayMap) {\n return _.reduce(arrayMap, function (acc, value) {\n if (value.key === '' && value.value === '') {\n // empty pair, skip it\n } else if (value.key === '') {\n throw new Error('Key may not be empty with value \"' + value.value + '\"');\n } else if (acc.hasOwnProperty(value.key)) {\n throw new Error('Duplicate key ' + value.key);\n } else {\n acc[value.key] = value.value;\n }\n return acc;\n }, {});\n}\n\nfunction mapCreateValuesToUiValues(values, options) {\n for (let i = 0; i < options.length; i++) {\n const option = options[i];\n if (option.__type === 'StringArray') {\n if (!values[option.__name]) {\n values[option.__name] = [''];\n }\n } else if (option.__type === 'OptionArray') {\n if (!values[option.__name]) { // values has no entry for this option\n values[option.__name] = [];\n const optionEl = {};\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'StringArray') {\n optionEl[child.__name] = [''];\n } else {\n optionEl[child.__name] = (!angular.isUndefined(child.__defaultValue) ? child.__defaultValue : '');\n }\n }\n values[option.__name].push(optionEl);\n } else { // values already has en entry for this option\n // Copies the default value for Boolean child options if no explicit value is set\n for (let j = 0; j < option.__childOptions.length; j++) {\n const child = option.__childOptions[j];\n if (child.__type === 'Boolean') {\n for (let k = 0; k < values[option.__name].length; k++) {\n const valueK = values[option.__name][k];\n if (!valueK.hasOwnProperty([child.__name]) && angular.isDefined(child.__defaultValue)) {\n valueK[child.__name] = child.__defaultValue;\n }\n }\n }\n }\n }\n } else if (option.__type === 'Map') {\n if (!values[option.__name]) {\n values[option.__name] = [];\n } else {\n values[option.__name] = toArrayMap(values[option.__name]);\n }\n } else if (option.__type === 'JsonString') {\n if (values[option.__name]) {\n values[option.__name] = angular.toJson(values[option.__name], 2);\n }\n } else {\n if (angular.isUndefined(values[option.__name])) {\n values[option.__name] = (!angular.isUndefined(option.__defaultValue) ? option.__defaultValue : '');\n }\n }\n }\n\n return values;\n}\n\nfunction _evaluateSparqlQuery(http, repository, query) {\n return http.post('repositories/' + repository, jsonToFormData({query: query}),\n {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n 'Accept': 'application/sparql-results+json',\n 'X-GraphDB-Local-Consistency': 'updating'\n }\n });\n}\n\nfunction buildNamePrefix(prefix) {\n return prefix.substring(0, prefix.length - 1) + '/instance#';\n}\n\nfunction createConnectorQuery(name, prefix, fields, options, reportError) {\n // Returns a copy of the parameter obj sorted according to the order in options\n function sortObject(obj, options) {\n const newObject = {};\n _.each(options, function (option) {\n if (angular.isDefined(obj[option.__name])) {\n if (option.__type === 'OptionArray') {\n newObject[option.__name] = [];\n _.each(obj[option.__name], function (childOption) {\n newObject[option.__name].push(sortObject(childOption, option.__childOptions));\n });\n } else {\n newObject[option.__name] = angular.copy(obj[option.__name]);\n }\n }\n });\n return newObject;\n }\n\n const fcopy = sortObject(fields, options);\n\n for (let i = 0; i < options.length; i++) {\n try {\n if (options[i].__type === 'Map') {\n fcopy[options[i].__name] = fromArrayMap(fcopy[options[i].__name]);\n } else if (options[i].__type === 'JsonString') {\n fcopy[options[i].__name] = angular.fromJson(fcopy[options[i].__name]);\n }\n } catch (e) {\n reportError(options[i].__label, e.message);\n return null;\n }\n }\n\n removeEmptyValues(fcopy);\n //escapeValues(fields);\n let finalString = '';\n finalString += 'PREFIX :<' + prefix + '>\\n';\n const namePrefix = buildNamePrefix(prefix);\n finalString += 'PREFIX inst:<' + namePrefix + '>\\n';\n finalString += 'INSERT DATA {\\n';\n finalString += \"\\tinst:\" + name + \" :createConnector '''\\n\"; // eslint-disable-line quotes\n finalString += angular.toJson(fcopy, 2);\n finalString += \"\\n''' .\\n}\\n\"; // eslint-disable-line quotes\n finalString = finalString.replace(/\\\\/g, '\\\\\\\\\\\\');\n return finalString;\n}\n\nfunction createStatusQueryForIri(iri) {\n const statusIri = iri.replace(/\\/instance#.+$/, '#connectorStatus');\n let finalString = '';\n finalString += 'SELECT ?status {\\n';\n finalString += '\\t<' + iri + '> <' + statusIri + '> ?status';\n finalString += '\\n}';\n return finalString;\n}\n\nfunction createStatusQueryForAny(connectors) {\n const connectorIris = _.map(connectors,\n function (k) {\n return '<' + k.value + 'connectorStatus' + '>';\n }).join('|');\n\n if (connectorIris) {\n return 'SELECT ?connector ?status { ?connector ' + connectorIris + ' ?status }';\n }\n\n return null;\n}\n\nfunction repairConnectorQuery(name, prefix) {\n const namePrefix = buildNamePrefix(prefix);\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:repairConnector \"\"\\n' +\n '}';\n}\n\nfunction deleteConnectorQuery(name, prefix, force) {\n const namePrefix = prefix.substring(0, prefix.length - 1) + \"/instance#\";\n return 'PREFIX prefix:<' + prefix + '>\\n' +\n 'INSERT DATA {\\n' +\n '\\t<' + namePrefix + name + '> prefix:dropConnector \"' + (force ? \"force\" : \"\") + '\"\\n' +\n '}';\n}\n\nfunction removeEmptyValues(data) {\n // remove empty values from array\n if (Array.isArray(data)) {\n data = _.filter(data, function (item) {\n return item !== null && (!item.trim || item.trim() !== '');\n });\n }\n // remove empty values from object values\n Object.keys(data).forEach(function (key) {\n if ((data[key] === '' || data[key] == null) && data[key] !== false) {\n delete data[key];\n } else if (typeof data[key] === 'object') {\n data[key] = removeEmptyValues(data[key]);\n }\n });\n return data;\n}\n\nfunction parseFirstBuildingResult(results) {\n if (results.bindings) {\n for (let i = 0; i < results.bindings.length; i++) {\n try {\n const statusObject = JSON.parse(results.bindings[i].status.value);\n if (statusObject.status === 'BUILDING') {\n return {\n connector: results.bindings[i].connector.value,\n status: statusObject\n };\n }\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n }\n }\n }\n\n return {};\n}\n\nConnectorsCtrl.$inject = ['$scope', '$http', '$repositories', '$modal', 'toastr', 'ModalService', '$q', 'RDF4JRepositoriesRestService', 'ConnectorsRestService'];\n\nfunction ConnectorsCtrl($scope, $http, $repositories, $modal, toastr, ModalService, $q, RDF4JRepositoriesRestService, ConnectorsRestService) {\n $scope.loader = false;\n\n $scope.controllers = [];\n\n $scope.existing = {};\n\n $scope.definitions = {};\n\n $scope.getLoaderMessage = function () {\n const timeSeconds = (Date.now() - $scope.loaderStartTime) / 1000;\n const timeHuman = $scope.getHumanReadableSeconds(timeSeconds);\n let message = '';\n if ($scope.progressMessage) {\n message = $scope.progressMessage + '... ' + timeHuman;\n } else {\n message = 'Running operation...' + timeHuman;\n }\n if ($scope.extraMessage && timeSeconds > 10) {\n message += '\\n' + $scope.extraMessage;\n }\n\n return message;\n };\n\n $scope.setLoader = function (isRunning, progressMessage, extraMessage) {\n if (isRunning) {\n $scope.loader = true;\n $scope.loaderStartTime = Date.now();\n $scope.progressMessage = progressMessage;\n $scope.extraMessage = extraMessage;\n } else {\n $scope.loader = false;\n $scope.progressMessage = '';\n $scope.extraMessage = '';\n }\n };\n\n $scope.initConnector = function (connector) {\n return ConnectorsRestService.initConnector(encodeURIComponent(connector.value))\n .then(function (res) {\n $scope.definitions[connector.key] = res.data;\n\n return ConnectorsRestService.hasConnector(encodeURIComponent(connector.value))\n .then(function (res) {\n $scope.existing[connector.key] = res.data;\n\n });\n });\n };\n\n $scope.getConnectors = function () {\n if (!$scope.isLicenseValid()) {\n return;\n }\n if (!$scope.canWriteActiveRepo()) {\n return;\n }\n\n $scope.setLoader(true, 'Fetching connectors', 'Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first.');\n\n ConnectorsRestService.getConnectors()\n .then(function (res) {\n $scope.connectors = Object.keys(res.data).map(function (key) {\n return {key: key, value: res.data[key]};\n });\n\n $q.all(_.map($scope.connectors, function (connector) {\n return $scope.initConnector(connector);\n })).finally(function () {\n resetProgress();\n\n const query = createStatusQueryForAny($scope.connectors);\n\n if (query) {\n evaluateSparqlQuery(query)\n .then(function (res) {\n const status = parseFirstBuildingResult(res.data.results);\n if (status.connector) {\n // has a building connector, open progress indicator\n const d = status.connector.split(/#/);\n d[0] = d[0].replace(/\\/instance$/, '#');\n showProgress(d[0], d[1]);\n }\n })\n .finally(function () {\n $scope.setLoader(false);\n });\n } else {\n $scope.setLoader(false);\n }\n });\n }).catch(function (e) {\n $scope.setLoader(false);\n toastr.error(getError(e), 'Could not get connectors');\n });\n\n $scope.existing = {};\n };\n\n $scope.getOptions = function (connector) {\n return $scope.definitions[connector.key];\n };\n\n $scope.isEmpty = function (value) {\n return angular.isObject(value) && Object.keys(value).length === 0;\n };\n\n $scope.toPrettyJson = function (value) {\n return angular.toJson(value, 2);\n };\n\n $scope.$watch(function () {\n return $repositories.getActiveRepository();\n }, $scope.getConnectors);\n\n $scope.$watch(function () {\n return $repositories.getActiveLocation();\n }, $scope.getConnectors);\n\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function resetProgress(repair) {\n $scope.beingBuiltConnector = {\n percentDone: 0,\n status: {\n processedEntities: 0,\n estimatedEntities: 0,\n indexedEntities: 0,\n entitiesPerSecond: 0\n },\n actionName: repair ? 'Repairing' : 'Creating',\n waitOnRepairStartOnce: !!repair,\n eta: '-',\n inline: false,\n iri: null\n };\n }\n\n function openProgressModal(prefix, name, repair) {\n resetProgress(repair);\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: false,\n doneCallback: function () {\n $scope.beingBuiltConnector.modalInstance.dismiss('cancel');\n }\n });\n\n $scope.beingBuiltConnector.modalInstance = $modal.open({\n templateUrl: 'pages/connectorProgress.html',\n controller: 'CreateProgressCtrl',\n size: 'lg',\n backdrop: 'static',\n scope: $scope\n });\n\n return $scope.beingBuiltConnector.modalInstance;\n }\n\n function showProgress(prefix, name) {\n resetProgress();\n\n $.extend($scope.beingBuiltConnector, {\n iri: buildNamePrefix(prefix) + name,\n name: name,\n inline: true,\n doneCallback: function () {\n $scope.beingBuiltConnector.inline = false;\n }\n });\n }\n\n function executeCreate(connector, obj, errorCallback) {\n const modal = openProgressModal(connector.value, obj.name, false);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: obj.query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(connector.value)).then(function (res) {\n $scope.existing[connector.key] = res.data;\n });\n });\n toastr.success('Created connector ' + obj.name);\n }, function (err) {\n toastr.error(getError(err));\n errorCallback();\n }).finally(function () {\n modal.dismiss('cancel');\n });\n }\n\n $scope.copyConnector = function (connector, values) {\n let newValues;\n if (!angular.isUndefined(values)) {\n newValues = angular.copy(values);\n newValues.name = newValues.name + '-copy';\n }\n const modal = $modal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function () {\n return connector;\n },\n values: function () {\n return angular.isUndefined(newValues) ? {name: '', values: {}} : newValues;\n },\n options: function () {\n return $scope.getOptions(connector);\n }\n }\n });\n\n modal.result.then(function (obj) {\n executeCreate(connector, obj, function () {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.newConnector = function (connector, values) {\n const modal = $modal.open({\n templateUrl: 'pages/createConnector.html',\n controller: 'CreateConnectorCtrl',\n size: 'lg',\n backdrop: 'static',\n resolve: {\n connector: function () {\n return connector;\n },\n values: function () {\n return angular.isUndefined(values) ? {name: '', values: {}} : values;\n },\n options: function () {\n return $scope.getOptions(connector);\n }\n }\n });\n\n modal.result.then(function (obj) {\n executeCreate(connector, obj, function () {\n obj.skipConversion = true;\n $scope.newConnector(connector, obj);\n });\n });\n };\n\n $scope.repair = function (inst, type) {\n ModalService.openSimpleModal({\n title: 'Confirm repair',\n message: 'Are you sure you want to repair this connector?<br>Note that repair means delete + recreate with the same settings.',\n warning: true\n }).result\n .then(function () {\n const modal = openProgressModal(type.value, inst.name, true);\n\n const query = repairConnectorQuery(inst.name, type.value);\n\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function (res) {\n $scope.existing[type.key] = res.data;\n });\n });\n toastr.success('Repaired connector ' + inst.name);\n }, function (err) {\n toastr.error(getError(err));\n }).finally(function () {\n modal.dismiss('cancel');\n });\n });\n };\n\n $scope.delete = function (inst, type) {\n const isExternal = type.key.indexOf(\"Elastic\") >= 0 || type.key.indexOf(\"Solr\") >= 0;\n\n $modal.open({\n templateUrl: 'js/angular/externalsync/templates/deleteConnector.html',\n controller: 'DeleteConnectorCtrl',\n resolve: {\n type: function () {\n return type.key;\n },\n isExternal: function () {\n return isExternal;\n }\n }\n }).result\n .then(function(force) {\n $scope.setLoader(true, 'Deleting connector ' + inst.name, 'This is usually a fast operation but it might take a while.');\n\n const query = deleteConnectorQuery(inst.name, type.value, force);\n RDF4JRepositoriesRestService.addStatements($repositories.getActiveRepository(), jsonToFormData({update: query}))\n .then(function () {\n ConnectorsRestService.getConnectors().then(function () {\n ConnectorsRestService.hasConnector(encodeURIComponent(type.value)).then(function (res) {\n $scope.existing[type.key] = res.data;\n });\n });\n if (force) {\n toastr.success(\"Deleted (with force) connector \" + inst.name);\n if (isExternal) {\n toastr.warning(\"You may have to remove the index manually from \" + type.key);\n }\n } else {\n toastr.success(\"Deleted connector \" + inst.name);\n }\n }, function (err) {\n toastr.error(getError(err));\n }).finally(function() {\n $scope.setLoader(false);\n });\n });\n };\n\n $scope.viewQuery = function (connector, inst) {\n $modal.open({\n templateUrl: 'pages/viewQuery.html',\n controller: 'ViewQueryCtrl',\n resolve: {\n query: function () {\n const options = $scope.getOptions(connector);\n return createConnectorQuery(inst.name, connector.value,\n mapCreateValuesToUiValues(inst.values, options), options);\n }\n }\n });\n };\n}\n\nDeleteConnectorCtrl.$inject = ['$scope', '$modalInstance', 'type', 'isExternal'];\nfunction DeleteConnectorCtrl($scope, $modalInstance, type, isExternal) {\n $scope.force = false;\n $scope.type = type;\n $scope.isExternal = isExternal;\n\n $scope.ok = function () {\n $modalInstance.close($scope.force);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss();\n };\n}\n\nExtendNewConnectorCtrl.$inject = ['$scope', '$modalInstance', 'connector', '$modal', 'toastr'];\nfunction ExtendNewConnectorCtrl($scope, $modalInstance, connector, $modal, toastr) {\n\n $scope.connector = connector;\n\n $scope.addField = function (index, optionName) {\n const newField = angular.copy($scope.defaultValues[optionName][0]);\n $scope.values[optionName].splice(index + 1, 0, newField);\n };\n\n $scope.addOption = function (index, array) {\n array.splice(index + 1, 0, '');\n };\n\n $scope.deleteOption = function (index, array) {\n array.splice(index, 1);\n };\n\n $scope.addMapOption = function (index, array) {\n array.splice(index + 1, 0, {key: '', value: ''});\n };\n\n $scope.deleteMapOption = function (index, array) {\n array.splice(index, 1);\n };\n\n function toQuery() {\n return createConnectorQuery($scope.name, connector.value, $scope.values, $scope.options,\n function (label, error) {\n toastr.error(error, label);\n });\n }\n\n $scope.ok = function () {\n if ($scope.form.$valid) {\n const query = toQuery();\n\n if (query) {\n $modalInstance.close({name: $scope.name, values: $scope.values, options: $scope.options, query: query});\n }\n }\n };\n\n $scope.viewQuery = function () {\n const query = toQuery();\n\n if (query) {\n $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 $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nCreateConnectorCtrl.$inject = ['$scope', '$controller', '$http', '$modalInstance', 'connector', '$modal', 'values', 'options'];\n\nfunction CreateConnectorCtrl($scope, $controller, $http, $modalInstance, connector, $modal, values, options) {\n angular.extend(this, $controller('ExtendNewConnectorCtrl', {\n $scope: $scope,\n $modalInstance: $modalInstance,\n connector: connector,\n $modal: $modal\n }));\n $scope.values = values.values;\n $scope.options = options;\n $scope.name = values.name;\n if (!values.skipConversion) {\n $scope.values = mapCreateValuesToUiValues($scope.values, $scope.options);\n }\n $scope.defaultValues = angular.copy($scope.values);\n}\n\n// Note that this is a fancy controller: it's used both for a modal and for a directive.\n// This means you can't rely on custom injection through resolve in the modal and the scope\n// must be shared with the main connectors controller.\nCreateProgressCtrl.$inject = ['$scope', '$interval', '$http', '$repositories'];\n\nfunction CreateProgressCtrl($scope, $interval, $http, $repositories) {\n function evaluateSparqlQuery(query) {\n return _evaluateSparqlQuery($http, $repositories.getActiveRepository(), query);\n }\n\n function initProgress() {\n const query = createStatusQueryForIri($scope.beingBuiltConnector.iri);\n\n // reset iri value so that watch will fire again when we do something with the same connector\n $scope.beingBuiltConnector.iri = null;\n\n $scope.progressInterval = $interval(function () {\n function getFirstStatusFromResult(results) {\n if (results.bindings) {\n if (results.bindings.length > 0) {\n try {\n return JSON.parse(results.bindings[0].status.value);\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n }\n }\n }\n\n return {};\n }\n\n evaluateSparqlQuery(query)\n .then(function (res) {\n const status = getFirstStatusFromResult(res.data.results);\n if (status.status === 'BUILDING') {\n $scope.beingBuiltConnector.status = status;\n $scope.beingBuiltConnector.percentDone = (100 * status.processedEntities / status.estimatedEntities).toFixed(0);\n $scope.beingBuiltConnector.eta = $scope.getHumanReadableSeconds(status.etaSeconds);\n $scope.beingBuiltConnector.actionName = status.repair ? 'Repairing' : 'Creating';\n $scope.beingBuiltConnector.waitOnRepairStartOnce = false;\n } else if (status.status === 'BUILT' && !$scope.beingBuiltConnector.waitOnRepairStartOnce) {\n // done\n $interval.cancel($scope.progressInterval);\n if ($scope.beingBuiltConnector.doneCallback) {\n $scope.beingBuiltConnector.doneCallback();\n }\n }\n });\n }, 1000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel($scope.progressInterval);\n });\n }\n\n $scope.beingBuiltConnector = $scope.beingBuiltConnector || {};\n\n // for modal instance we get the iri before hand and can start progress now\n if (!$scope.beingBuiltConnector.inline && $scope.beingBuiltConnector.iri) {\n initProgress();\n }\n\n // for inline progress we need to watch for the iri value\n $scope.$watch('beingBuiltConnector.iri', function (value) {\n if ($scope.beingBuiltConnector.inline && value) {\n initProgress();\n }\n });\n}\n\nfunction ceil() {\n return function (input) {\n return Math.ceil(input);\n };\n}\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[4,82],{41:function(e,t,o){"use strict";o.r(t),o.d(t,"getFileName",(function(){return r}));var i=o(72);const r=function(e){let t=e.lastIndexOf("/");-1===t&&(t=e.lastIndexOf("\\"));let o=e;return-1!==t&&(o=o.substring(t+1)),o},n=function(e){e&&(e.queryTimeout&&(e.queryTimeout.value=parseInt(e.queryTimeout.value)),e.queryLimitResults&&e.validationResultsLimitTotal&&e.validationResultsLimitPerConstraint?(e.queryLimitResults.value=parseInt(e.queryLimitResults.value),e.validationResultsLimitTotal.value=parseInt(e.validationResultsLimitTotal.value),e.validationResultsLimitPerConstraint.value=parseInt(e.validationResultsLimitPerConstraint.value)):e.leftJoinWorkerThreads&&e.boundJoinBlockSize&&e.joinWorkerThreads&&e.unionWorkerThreads&&(e.leftJoinWorkerThreads.value=parseInt(e.leftJoinWorkerThreads.value),e.boundJoinBlockSize.value=parseInt(e.boundJoinBlockSize.value),e.joinWorkerThreads.value=parseInt(e.joinWorkerThreads.value),e.unionWorkerThreads.value=parseInt(e.unionWorkerThreads.value)))},a=function(e){e&&e.member&&(e.member.value=[])},s=function(){const e=document.getElementById("shaclOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"fa fa-angle-down"}return"fa fa-angle-right"},l=function(e,t){e.queryTimeout&&(t.isInvalidQueryTimeout=!i.NUMBER_PATTERN.test(e.queryTimeout.value)),e.validationResultsLimitTotal&&e.validationResultsLimitPerConstraint&&e.queryLimitResults?(t.isInvalidValidationResultsLimitTotal=!i.NUMBER_PATTERN.test(e.validationResultsLimitTotal.value),t.isInvalidValidationResultsLimitPerConstraint=!i.NUMBER_PATTERN.test(e.validationResultsLimitPerConstraint.value),t.isInvalidQueryLimit=!i.NUMBER_PATTERN.test(e.queryLimitResults.value)):e.leftJoinWorkerThreads&&e.boundJoinBlockSize&&e.joinWorkerThreads&&e.unionWorkerThreads&&(t.isInvalidLeftJoinWorkerThreads=!i.NUMBER_PATTERN.test(e.leftJoinWorkerThreads.value),t.isInvalidBoundJoinBlockSize=!i.NUMBER_PATTERN.test(e.boundJoinBlockSize.value),t.isInvalidJoinWorkerThreads=!i.NUMBER_PATTERN.test(e.joinWorkerThreads.value),t.isInvalidUnionWorkerThreads=!i.NUMBER_PATTERN.test(e.unionWorkerThreads.value))},d=function(e){let t=Object.keys(e),o=Object.values(e);for(let e=0;e<t.length;e++)if(o[e])return"isInvalidQueryLimit"===(i=t[e])?"Invalid parameter query limit":"isInvalidQueryTimeout"===i?"Invalid parameter query timeout":"isInvalidValidationResultsLimitTotal"===i?"Invalid parameter validation results limit total":"isInvalidValidationResultsLimitPerConstraint"===i?"Invalid parameter validation results limit per constraint":"isInvalidJoinWorkerThreads"===i?"Invalid parameter join worker threads":"isInvalidLeftJoinWorkerThreads"===i?"Invalid parameter left join worker threads":"isInvalidUnionWorkerThreads"===i?"Invalid parameter union worker threads":"isInvalidBoundJoinBlockSize"===i?"Invalid parameter bound join block size":void 0;var i;return""},c=function(e){return`https://graphdb.ontotext.com/documentation/${e.productShortVersion}/${e.productType}`};function u(e,t,o,r,n,a,s,l,d){e.loader=!0,e.isLocationInactive=function(t){return!t.active||!e.hasActiveLocation()},e.getLocations=function(){return r.getLocations()},e.hasActiveLocation=function(){return r.hasActiveLocation()},e.getActiveLocation=function(){return r.getActiveLocation()},e.getLocationError=function(){return r.getLocationError()},e.getDegradedReason=function(){return r.getDegradedReason()},e.getRepositories=function(){return r.getRepositories()},e.deleteLocation=function(t){n.openSimpleModal({title:"Confirm detach",message:"Are you sure you want to detach the location '"+t+"'?",warning:!0}).result.then((function(){e.loader=!0,r.deleteLocation(t)}))},e.addLocationHttp=function(t){e.loader=!0,s.addLocation(t).success((function(t){e.locations=t,r.init()})).error((function(t){const i=getError(t);o.error(i,"Error"),e.loader=!1}))},e.addLocation=function(){t.open({templateUrl:"js/angular/templates/modal/add-location.html",windowClass:"addLocationDialog",controller:"AddLocationCtrl"}).result.then((function(t){e.addLocationHttp(t)}))},e.editLocationHttp=function(t){e.loader=!0,s.editLocation(t).success((function(t){e.locations=t,r.init()})).error((function(t){const i=getError(t);o.error(i,"Error"),e.loader=!1}))},e.editLocation=function(o){t.open({templateUrl:"js/angular/templates/modal/edit-location.html",controller:"EditLocationCtrl",resolve:{location:function(){return o}}}).result.then((function(t){e.editLocationHttp(t)}),(function(){}))},e.activateLocationRequest=function(t){e.loader=!0;const i={uri:t.uri};s.enableLocation(i).success((function(){r.setRepository(""),r.init()})).error((function(e){const i=getError(e);o.error(i,"Error"),document.getElementById("switch-"+t.$$hashKey).checked=!1}))},e.activateLocation=function(t){e.hasActiveLocation()?n.openSimpleModal({title:"Confirm location change",message:"Are you sure you want to change the location?",warning:!0}).result.then((function(){e.activateLocationRequest(t)}),(function(){document.getElementById("switch-"+t.$$hashKey).checked=!1})):e.activateLocationRequest(t)},e.setRepository=function(e){r.setRepository(e)},e.deleteRepository=function(t){n.openSimpleModal({title:"Confirm delete",message:`<p>Are you sure you want to delete the repository <strong>${t}</strong>?</p>\n <p><span class="icon-2x icon-warning" style="color: #d54a33"/>\n All data in the repository will be lost.</p>`,warning:!0}).result.then((function(){e.loader=!0,r.deleteRepository(t),function(e){const t=`dependencies-selectedGraph-${e}`,o=`classHierarchy-selectedGraph-${e}`;angular.forEach(l.keys(),(function(e){(e.startsWith(o)||e.startsWith(t))&&l.remove(e)}))}(t)}))},e.restartRepository=function(t){n.openSimpleModal({title:"Confirm restart",message:`<p>Are you sure you want to restart the repository <strong>${t}</strong>?</p>\n <p><span class="icon-2x icon-warning" style="color: #d54a33"/>\n The repository will be shut down immediately and all running queries\n and updates will be cancelled.</p>`,warning:!0}).result.then((function(){e.loader=!0,r.restartRepository(t)}))},e.toggleDefaultRepository=function(t){e.getDefaultRepository()===t?r.setDefaultRepository(null):r.setDefaultRepository(t)},e.getDefaultRepository=function(){return r.getDefaultRepository()},e.getRepositoryDownloadLink=function(e){let t=`rest/repositories/${e.id}${e.type===i.REPOSITORY_TYPES.ontop?"/downloadZip":"/download"}`;const o=a.getAuthToken();return o&&(t=`${t}?authToken=${encodeURIComponent(o)}`),t},e.copyToClipboard=function(e){n.openCopyToClipboardModal(e)},e.fromFile=function(){t.open({templateUrl:"js/angular/templates/modal/upload-repository-config.html",controller:"UploadRepositoryConfigCtrl"}).result.then((function(){r.init()}))},e.openActiveLocationSettings=function(){t.open({templateUrl:"js/angular/settings/modal/location-settings.html",controller:"ActiveLocationSettingsCtrl"})};const c=d((function(){r.initQuick()}),5e3);e.$on("$destroy",(function(){d.cancel(c)}))}function p(e,t,o,i){e.upload=function(t){t&&t.length&&(e.uploadFile=t[0])},e.ok=function(){e.uploadFile&&(e.uploadFileLoader=!0,o.upload({url:"rest/repositories",method:"POST",data:{config:e.uploadFile}}).success((function(){e.uploadFileLoader=!1,t.close()})).error((function(t){const o=getError(t);i.error(o,"Error"),e.uploadFileLoader=!1})))},e.cancel=function(){t.dismiss("cancel")}}function f(e,t,o,i){e.newLocation={uri:"",authType:"none",username:"",password:"",active:!1},e.docBase=c(i),e.isValidLocation=function(){return(e.newLocation.uri.length<6||0===e.newLocation.uri.indexOf("http:")||0===e.newLocation.uri.indexOf("https:"))&&e.newLocation.uri.indexOf("/repositories")<=-1},e.ok=function(){e.newLocation?t.close(e.newLocation):o.error("Location cannot be empty")},e.cancel=function(){t.dismiss("cancel")}}function h(e,t,o,i){e.editedLocation=angular.copy(o),e.docBase=c(i),e.ok=function(){t.close(e.editedLocation)},e.cancel=function(){t.dismiss("cancel")}}function m(e,t){e.pageTitle="Select repository type",e.repositoryTypes=i.REPOSITORY_TYPES,e.chooseRepositoryType=function(e){t.path(`${t.path()}/${e}`)}}function y(e,t,o,r,c,u,p,f){var h;e.rulesets=i.STATIC_RULESETS.slice(),e.repositoryTypes=i.REPOSITORY_TYPES,e.repoTooltips=i.REPO_TOOLTIPS,e.params=p,e.repositoryType=p.repositoryType,e.enable=!0,e.loader=!0,e.pageTitle="Create Repository",e.repositoryInfo={id:"",params:{},title:"",type:""},e.invalidValues={isInvalidQueryTimeout:!1,isInvalidQueryLimit:!1,isInvalidLeftJoinWorkerThreads:!1,isInvalidBoundJoinBlockSize:!1,isInvalidJoinWorkerThreads:!1,isInvalidUnionWorkerThreads:!1,isInvalidValidationResultsLimitPerConstraint:!1,isInvalidValidationResultsLimitTotal:!1},e.getConfig=function(o){f.getRepositoryConfiguration(o).success((function(t){e.repositoryInfo.params=t.params,e.repositoryInfo.type=t.type,n(e.repositoryInfo.params),a(e.repositoryInfo.params),e.loader=!1,c((function(){angular.element(document).find("#id").focus()}),50)})).error((function(o){const i=getError(o);t.error(i,"Error"),e.loader=!1}))},e.repositoryType&&(function(t){return e.isEnterprise()&&t===i.REPOSITORY_TYPES.graphdbRepo}(h=e.repositoryType)||function(t){return!e.isFreeEdition()&&!e.isEnterprise()&&t===i.REPOSITORY_TYPES.graphdbRepo}(h)||function(t){return e.isFreeEdition()&&t===i.REPOSITORY_TYPES.graphdbRepo}(h)||function(e){return e===i.REPOSITORY_TYPES.ontop}(h)||function(e){return e===i.REPOSITORY_TYPES.fedx}(h))?(e.repositoryInfo.type=e.repositoryType,e.getConfig(e.repositoryType),function(t){switch(t){case i.REPOSITORY_TYPES.graphdbRepo:e.pageTitle="Create GraphDB repository";break;case i.REPOSITORY_TYPES.ontop:e.pageTitle="Create Ontop Virtual SPARQL repository";break;case i.REPOSITORY_TYPES.fedx:e.pageTitle="Create FedX Virtual SPARQL repository"}}(e.repositoryType)):r.path("/repository/create"),e.hasActiveLocation=function(){return o.hasActiveLocation()},e.activeLocation=function(){return o.getActiveLocation()};let m=!1;e.uploadRuleset=function(o){o&&o.length&&(e.uploadFile=o[0],e.uploadFileLoader=!0,u.upload({url:"rest/repositories/uploadRuleSet",data:{ruleset:e.uploadFile}}).progress((function(e){})).success((function(o){if(o.success){const t=e.uploadFile.name,i={id:o.fileLocation,name:"Custom: "+t};e.rulesetPie?e.rulesets[0]=i:e.rulesets.unshift(i),e.rulesetPie=o.fileLocation,e.rulesetPieFile=t,e.repositoryInfo.params.ruleset.value=e.rulesetPie}else t.error(o.errorMessage),m=!0;e.uploadFileLoader=!1})).error((function(o){const i=getError(o);t.error(i,"Error"),e.uploadFile="",e.uploadFileLoader=!1})))},e.noMembersError=function(){t.error("FedX repository should be created with at least one member!")},e.goBackToPreviousLocation=function(){angular.isDefined(p.previous)?(delete r.$$search.previous,r.path("/")):r.path("/repository")},e.createRepoHttp=function(){e.loader=!0,f.createRepository(e.repositoryInfo).success((function(){t.success("The repository "+e.repositoryInfo.id+" has been created."),o.init(e.goBackToPreviousLocation)})).error((function(o){const i=getError(o);t.error(i,"Error"),e.loader=!1}))},e.createRepo=function(){if(!e.repositoryInfo.id)return void t.error("Repository ID cannot be empty");e.isInvalidRepoName=!i.FILENAME_PATTERN.test(e.repositoryInfo.id),l(e.repositoryInfo.params,e.invalidValues);const o=d(e.invalidValues);m?t.error("Invalid rule-set file. Please upload a valid one."):e.isInvalidRepoName?t.error("Wrong repo name"):"fedx"===e.repositoryType&&0===e.repositoryInfo.params.member.value.length?e.noMembersError():o?t.error(o):e.createRepoHttp()},e.rulesetWarning=function(){const t=e.repositoryInfo.params;return void 0===t||void 0===t.ruleset||void 0===t.disableSameAs?"":0===t.ruleset.value.indexOf("owl")&&"true"===t.disableSameAs.value?i.REPO_TOOLTIPS.rulesetWarnings.needsSameAs:0===t.ruleset.value.indexOf("rdfs")&&"false"===t.disableSameAs.value?i.REPO_TOOLTIPS.rulesetWarnings.doesntNeedSameAs:t.ruleset.value===e.rulesetPie?i.REPO_TOOLTIPS.rulesetWarnings.customRuleset:""},e.validateNumberInput=function(){l(e.repositoryInfo.params,e.invalidValues)},e.getShaclOptionsClass=function(){return s()},e.autofocusId="autofocus"}function v(e,t,o,i,r){i&&o.getRepositoryFileContent(i).success((function(t){e.fileContent=t})).error((function(e){const t=getError(e);r.error(t,"Error")})),e.ok=function(){t.close({content:e.fileContent,fileLocation:i})},e.cancel=function(){t.dismiss("cancel")}}function g(e,t,o,a,c,u,p){e.rulesets=i.STATIC_RULESETS.slice(),e.repositoryTypes=i.REPOSITORY_TYPES,e.repoTooltips=i.REPO_TOOLTIPS,e.editRepoPage=!0,e.canEditRepoId=!1,e.params=t,e.loader=!0,e.repositoryInfo={},e.repositoryInfo.id=e.params.repositoryId,e.repositoryInfo.restartRequested=!1,e.repositoryType="",e.saveRepoId=e.params.repositoryId,e.pageTitle="Edit Repository: "+e.params.repositoryId,e.invalidValues={isInvalidQueryTimeout:!1,isInvalidQueryLimit:!1,isInvalidLeftJoinWorkerThreads:!1,isInvalidBoundJoinBlockSize:!1,isInvalidJoinWorkerThreads:!1,isInvalidUnionWorkerThreads:!1,isInvalidValidationResultsLimitPerConstraint:!1,isInvalidValidationResultsLimitTotal:!1},e.hasActiveLocation=function(){return a.hasActiveLocation()},e.$watch(e.hasActiveLocation,(function(){e.hasActiveLocation&&p.getRepository(e.repositoryInfo.id).success((function(t){if(angular.isDefined(t.params.ruleset)){let o=!1;if(angular.forEach(e.rulesets,(function(e){e.id===t.params.ruleset.value&&(o=!0)})),t.params.ruleset&&!o){let o=r(t.params.ruleset.value);e.rulesets.unshift({id:t.params.ruleset.value,name:"Custom: "+o})}}e.repositoryInfo=t,e.setRepositoryType(t.type),n(e.repositoryInfo.params),e.repositoryInfo.saveId=e.saveRepoId,e.loader=!1})).error((function(i,r){if(404===r&&"system"!==t.repositoryId)o.error("Repo with name <b>"+t.repositoryId+"</b> doesn't exists","Error",{allowHtml:!0}),e.loader=!1,c.path("repository");else if(404===r&&"system"===t.repositoryId)o.error("<b>System</b> repository can't be edited","Error",{allowHtml:!0}),e.loader=!1,c.path("repository");else{const t=getError(i);o.error(t,"Error"),e.loader=!1}}))})),e.setRepositoryType=function(t){e.repositoryType=t},e.noMembersError=function(){o.error("FedX repository should be created with at least one member!")},e.editRepoHttp=function(){e.loader=!0,p.editRepository(e.repositoryInfo.saveId,e.repositoryInfo).success((function(){o.success("The repository "+e.repositoryInfo.saveId+" has been edited."),a.init(e.goBackToPreviousLocation),e.repositoryInfo.saveId===e.repositoryInfo.id&&e.repositoryInfo.restartRequested&&a.restartRepository(e.repositoryInfo.id)})).error((function(t){const i=getError(t);o.error(i,"Error"),e.loader=!1}))},e.editRepository=function(){e.isInvalidRepoName=!i.FILENAME_PATTERN.test(e.repositoryInfo.id),l(e.repositoryInfo.params,e.invalidValues);const t=d(e.invalidValues);let r=`Save changes to repository <strong>${e.repositoryInfo.id}</strong>?<br><br>`;e.repositoryInfo.saveId!==e.repositoryInfo.id?r+='<span class="icon-2x icon-warning" style="color: #d54a33"/>\n The repository will be stopped and renamed.':e.repositoryInfo.restartRequested?r+='<span class="icon-2x icon-warning" style="color: #d54a33"/>\n The repository will be restarted.':r+='<span class="icon-2x icon-warning" style="color: #d54a33"/>\n Repository restart required for changes to take effect.',e.isInvalidRepoName?o.error("Wrong repo name"):"fedx"===e.repositoryType&&0===e.repositoryInfo.params.member.value.length?e.noMembersError():t?o.error(t):u.openSimpleModal({title:"Confirm save",message:r,warning:!0}).result.then((function(){e.editRepoHttp()}))},e.editRepositoryId=function(){let t="<p>Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.</p>";e.isEnterprise()&&(t+="<p>If your repository is in a cluster, it is your responsibility to update the cluster after renaming.</p>"),u.openSimpleModal({title:"Confirm enable edit",message:t,warning:!0}).result.then((function(){e.canEditRepoId=!0}))},e.goBackToPreviousLocation=function(){angular.isDefined(t.previous)?(delete c.$$search.previous,c.path("/")):c.path("/repository")},e.validateNumberInput=function(){l(e.repositoryInfo.params,e.invalidValues)},e.getShaclOptionsClass=function(){return s()}}angular.module("graphdb.framework.repositories.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter","toastr","ngFileUpload"]).controller("LocationsAndRepositoriesCtrl",u).controller("AddLocationCtrl",f).controller("EditLocationCtrl",h).controller("ChooseRepositoryCtrl",m).controller("AddRepositoryCtrl",y).controller("EditRepositoryCtrl",g).controller("EditRepositoryFileCtrl",v).controller("UploadRepositoryConfigCtrl",p),u.$inject=["$scope","$modal","toastr","$repositories","ModalService","$jwtAuth","LocationsRestService","LocalStorageAdapter","$interval"],p.$inject=["$scope","$modalInstance","Upload","toastr"],f.$inject=["$scope","$modalInstance","toastr","productInfo"],h.$inject=["$scope","$modalInstance","location","productInfo"],m.$inject=["$scope","$location"],y.$inject=["$scope","toastr","$repositories","$location","$timeout","Upload","$routeParams","RepositoriesRestService"],v.$inject=["$scope","$modalInstance","RepositoriesRestService","file","toastr"],g.$inject=["$scope","$routeParams","toastr","$repositories","$location","ModalService","RepositoriesRestService"]},72:function(e,t,o){"use strict";o.r(t),o.d(t,"STATIC_RULESETS",(function(){return i})),o.d(t,"REPOSITORY_TYPES",(function(){return r})),o.d(t,"FILENAME_PATTERN",(function(){return n})),o.d(t,"NUMBER_PATTERN",(function(){return a})),o.d(t,"REPO_TOOLTIPS",(function(){return s}));const i=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],r={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},n=new RegExp("^[a-zA-Z0-9-_]+$"),a=new RegExp("[0-9]"),s={id:"Unique identifier for the repository. The ID must contain only letters (a-z, A-Z), numbers (0-9), '-' and '_'.",title:"Human readable description of the repository.",readOnly:"Protects the repository against any changes.",ruleset:"Sets of axiomatic triples, consistency checks and entailment rules, which determine the applied semantics with a PIE file.",rulesetWarnings:{needsSameAs:"Disabling owl:sameAs for this ruleset may cause incomplete inference with owl:sameAs statements.",doesntNeedSameAs:"This ruleset does not need owl:sameAs, consider disabling it.",customRuleset:"If the custom ruleset does not use owl:sameAs, consider disabling it. <br>If the ruleset uses owl:sameAs, disabling it may cause incomplete inference with owl:sameAs statements."},disableSameAs:"GraphDB uses a non-rule implementation of owl:sameAs, which can be enabled or disabled independently of the ruleset.",checkForInconsistencies:"Enables the consistency checks from the ruleset.",isShacl:"Enables support for SHACL validation.",shaclOptions:{cacheSelectNodes:"The SHACL implementation retrieves a lot of its relevant data through running SPARQL Select queries against the repository and against the changes in the transaction. This is usually good for performance, but while validating large amounts of data disabling this cache will use less memory.",undefinedTargetValidatesAllSubjects:"If no target is defined for a NodeShape, that NodeShape will be ignored. Enabling this will make such NodeShapes wildcard shapes and validate all subjects. Equivalent to setting sh:targetClass to owl:Thing or rdfs:Resource in an environment with a reasoner.",logValidationPlans:"Log (INFO) the executed validation plans as GraphViz DOT. It is recommended to disable parallel validation when this is enabled.",logValidationViolations:"Log (INFO) a list of violations and the triples that caused the violations. It is recommended to disable parallel validation when this is enabled.",parallelValidation:"Run SHACL validation in parallel.",globalLogValidationExecution:"Log (INFO) every execution step of the SHACL validation. This is fairly costly and should not be used in production. It is recommended to disable parallel validation when this is enabled.",performanceLogging:"Log (INFO) the execution time per shape. It is recommended to disable parallel validation and caching of select nodes when this is enabled.",eclipseRdf4jShaclExtensions:"Activates RDF4J's SHACL extensions that provide additional functionality (experimental).",dashDataShapes:"Activates DASH Data Shapes extensions that provide additional functionality (experimental)."},entityIdSize:"Defines the bit size of internal IDs used to index entities (URIs, blank nodes, literals, and RDF* embedded triples).<br>Use 40 bit ID only if you expect more than 2 billion unique RDF values.",enableContextIndex:"Builds an additional Context-Predicate-Subject-Object index to boost the SPARQL query performance of queries with GRAPH/FROM/FROM NAMED clauses.",enablePredicateList:"Enables the mappings from an entity (subject or object) to its predicates; enabling it can significantly speed up queries that use wildcard predicate patterns.",queryTimeout:"Sets the number of seconds after which the evaluation of a query will be terminated; values less than or equal to zero mean no limit.",throwQueryEvaluationExceptionOnTimeout:"Repository throws QueryEvaluationException when the duration of a query execution exceeds the timeout parameter.",queryLimitResults:"Sets the maximum number of results returned from a query after which the evaluation of a query will be terminated; values less than or equal to zero mean no limit.",nonInterpretablePredicates:"Semicolon-delimited list of predicates (full URIs) that GraphDB will not try to process with the registered GraphDB plugins.",ontop:{driverType:"Determines the type of SQL database to connect to.",propertiesFile:"Describes the JDBC configuration such as hostname and database name to connect to.",hostName:"The JDBC hostname to connect to.",port:"The JDBC port to connect to if different from the default for the chosen JDBC driver.",portIfRequired:"The JDBC port to connect to.",databaseName:"The database name to connect to.",userName:"The username to use for the JDBC connection.",password:"The password to use for the JDBC connection.",driverClass:"Classname of the chosen JDBC driver. It must be on the classpath (in the lib directory).",driverClassWarning:"JDBC driver not found in the classpath, please save it in the lib directory and restart GraphDB",url:"The JDBC URL that will be used. It is constructed using the supplied hostname, port and database name.",obdaFile:"Describes the mapping from SQL to RDF in either the OBDA or the R2RML format.",owlFile:"Specifies relations between the classes and properties in the cosntructed RDF graph. It can be in any supported RDF format.",constraintFile:"Specifies override of SQL primary and foreign keys.",testConn:"Attempts to establish a connection to the SQL database to test if the supplied configuration is correct."},fedx:{repositoryNotExistWarning:"The repository member has been removed from the local repositories",localReposInstructions:"Click on a repo to add a local repository as a member",withLogQueries:"Set whether to log queries",withDebugQueryPlan:"Whether to print the optimized query execution plan to stdout",enforceMaxQueryTime:"Max query time in seconds, 0 to disable",withIncludeInferredDefault:"Set whether to include inferred statements or not",withBoundJoinBlockSize:"Set the block size for bound joins",withJoinWorkerThreads:"Set the number of join worker threads for parallelization",withLeftJoinWorkerThreads:"Set the number of left join worker threads",unionWorkerThreads:"Set the number of union worker threads for parallelization",withLogQueryPlan:"Whether to log the query plan",withEnableServiceAsBoundJoin:"Whether external SERVICE clauses are evaluated using bound join",withSourceSelectionCacheSpec:"The cache specification for the SourceSelectionMemoryCache",removeMember:"Remove repository as a FedX member",editRepository:"Edit repository",setAsWritable:"Set repository as writable"}}}}]);
|
|
2
|
-
//# sourceMappingURL=4.6a8bdb4c9048dd910bfd.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///./src/js/angular/repositories/controllers.js","webpack:///./src/js/angular/repositories/repository.constants.js"],"names":["getFileName","path","lastIdx","lastIndexOf","name","substring","parseNumberParamsIfNeeded","params","queryTimeout","value","parseInt","queryLimitResults","validationResultsLimitTotal","validationResultsLimitPerConstraint","leftJoinWorkerThreads","boundJoinBlockSize","joinWorkerThreads","unionWorkerThreads","parseMemberParamIfNeeded","param","member","getShaclOptionsClass","optionsModule","document","getElementById","isAriaExpanded","getAttribute","validateNumberFields","invalidValues","isInvalidQueryTimeout","test","isInvalidValidationResultsLimitTotal","isInvalidValidationResultsLimitPerConstraint","isInvalidQueryLimit","isInvalidLeftJoinWorkerThreads","isInvalidBoundJoinBlockSize","isInvalidJoinWorkerThreads","isInvalidUnionWorkerThreads","checkInvalidValues","invalidValuesKeys","Object","keys","invalidValuesVal","values","i","length","getDocBase","productInfo","productShortVersion","productType","LocationsAndRepositoriesCtrl","$scope","$modal","toastr","$repositories","ModalService","$jwtAuth","LocationsRestService","LocalStorageAdapter","$interval","loader","isLocationInactive","location","active","hasActiveLocation","getLocations","getActiveLocation","getLocationError","getDegradedReason","getRepositories","deleteLocation","uri","openSimpleModal","title","message","warning","result","then","addLocationHttp","dataAddLocation","addLocation","success","data","locations","init","error","msg","getError","open","templateUrl","windowClass","controller","editLocationHttp","dataEditLocation","editLocation","resolve","activateLocationRequest","enableLocation","setRepository","$$hashKey","checked","activateLocation","id","deleteRepository","repositoryId","repoId","cashedDependenciesGraphPrefix","cashedClassHierarchyGraphPrefix","angular","forEach","key","startsWith","remove","removeCachedGraphsOnDelete","restartRepository","toggleDefaultRepository","getDefaultRepository","setDefaultRepository","getRepositoryDownloadLink","repository","url","type","ontop","token","getAuthToken","encodeURIComponent","copyToClipboard","openCopyToClipboardModal","fromFile","openActiveLocationSettings","timer","initQuick","$on","cancel","UploadRepositoryConfigCtrl","$modalInstance","Upload","upload","files","uploadFile","ok","uploadFileLoader","method","config","close","dismiss","AddLocationCtrl","newLocation","docBase","isValidLocation","indexOf","EditLocationCtrl","editedLocation","copy","ChooseRepositoryCtrl","$location","pageTitle","repositoryTypes","chooseRepositoryType","repoType","AddRepositoryCtrl","$timeout","$routeParams","RepositoriesRestService","repositoryType","rulesets","slice","repoTooltips","enable","repositoryInfo","getConfig","getRepositoryConfiguration","element","find","focus","isEnterprise","graphdbRepo","isValidEERepository","isFreeEdition","isValidSERepository","isValidFRRepository","isValidOntopRepository","fedx","isValidFedXRepository","setPageTitle","activeLocation","isInvalidPieFile","uploadRuleset","ruleset","progress","evt","fileName","newValue","fileLocation","rulesetPie","unshift","rulesetPieFile","errorMessage","noMembersError","goBackToPreviousLocation","isDefined","previous","$$search","createRepoHttp","createRepository","createRepo","isInvalidRepoName","rulesetWarning","pp","undefined","disableSameAs","rulesetWarnings","needsSameAs","doesntNeedSameAs","customRuleset","validateNumberInput","autofocusId","EditRepositoryFileCtrl","file","getRepositoryFileContent","fileContent","content","EditRepositoryCtrl","editRepoPage","canEditRepoId","restartRequested","saveRepoId","$watch","getRepository","ifRulesetExists","item","setRepositoryType","saveId","status","allowHtml","editRepoHttp","editRepository","modalMsg","editRepositoryId","module","$inject","STATIC_RULESETS","REPOSITORY_TYPES","free","eeWorker","eeMaster","se","FILENAME_PATTERN","RegExp","NUMBER_PATTERN","REPO_TOOLTIPS","readOnly","checkForInconsistencies","isShacl","shaclOptions","cacheSelectNodes","undefinedTargetValidatesAllSubjects","logValidationPlans","logValidationViolations","parallelValidation","globalLogValidationExecution","performanceLogging","eclipseRdf4jShaclExtensions","dashDataShapes","entityIdSize","enableContextIndex","enablePredicateList","throwQueryEvaluationExceptionOnTimeout","nonInterpretablePredicates","driverType","propertiesFile","hostName","port","portIfRequired","databaseName","userName","password","driverClass","driverClassWarning","obdaFile","owlFile","constraintFile","testConn","repositoryNotExistWarning","localReposInstructions","withLogQueries","withDebugQueryPlan","enforceMaxQueryTime","withIncludeInferredDefault","withBoundJoinBlockSize","withJoinWorkerThreads","withLeftJoinWorkerThreads","withLogQueryPlan","withEnableServiceAsBoundJoin","withSourceSelectionCacheSpec","removeMember","setAsWritable"],"mappings":"4FAAA,+DAQO,MAAMA,EAAc,SAASC,GAChC,IAAIC,EAAUD,EAAKE,YAAY,MACd,IAAbD,IACAA,EAAUD,EAAKE,YAAY,OAE/B,IAAIC,EAAOH,EAIX,OAHiB,IAAbC,IACAE,EAAOA,EAAKC,UAAUH,EAAU,IAE7BE,GAGLE,EAA4B,SAAUC,GACpCA,IACIA,EAAOC,eACPD,EAAOC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mBAAoB,mIAEpBC,wBAAyB,qJAEzBC,mBAAoB,oCACpBC,6BAA8B,8LAG9BC,mBAAoB,8IAEpBC,4BAA6B,2FAC7BC,eAAgB,+FAEpBC,aAAc,mMAEdC,mBAAoB,mJAEpBC,oBAAqB,kKAErBlQ,aAAc,wIAEdmQ,uCAAwC,mHAExChQ,kBAAmB,sKAEnBiQ,2BAA4B,+HAE5BlJ,MAAO,CACHmJ,WAAY,qDACZC,eAAgB,qFAChBC,SAAU,mCACVC,KAAM,wFACNC,eAAgB,+BAChBC,aAAc,mCACdC,SAAU,+CACVC,SAAU,+CACVC,YAAa,2FACbC,mBAAoB,kGACpB9J,IAAK,yGACL+J,SAAU,gFACVC,QAAS,8HAETC,eAAgB,sDAChBC,SAAU,4GAEdpG,KAAM,CACFqG,0BAA2B,qEAC3BC,uBAAwB,wDACxBC,eAAgB,6BAChBC,mBAAoB,gEACpBC,oBAAqB,0CACrBC,2BAA4B,oDAC5BC,uBAAwB,qCACxBC,sBAAuB,4DACvBC,0BAA2B,6CAC3BlR,mBAAoB,6DACpBmR,iBAAkB,gCAClBC,6BAA8B,kEAC9BC,6BAA8B,6DAC9BC,aAAc,qCACd3D,eAAgB,kBAChB4D,cAAe","file":"4.6a8bdb4c9048dd910bfd.bundle.js","sourcesContent":["import {\n FILENAME_PATTERN,\n NUMBER_PATTERN,\n REPO_TOOLTIPS,\n REPOSITORY_TYPES,\n STATIC_RULESETS\n} from \"./repository.constants\";\n\nexport const getFileName = function(path) {\n let lastIdx = path.lastIndexOf('/');\n if (lastIdx === -1) {\n lastIdx = path.lastIndexOf('\\\\');\n }\n let name = path;\n if (lastIdx !== -1) {\n name = name.substring(lastIdx + 1);\n }\n return name;\n};\n\nconst parseNumberParamsIfNeeded = function (params) {\n if (params) {\n if (params.queryTimeout) {\n params.queryTimeout.value = parseInt(params.queryTimeout.value);\n }\n if (params.queryLimitResults && params.validationResultsLimitTotal && params.validationResultsLimitPerConstraint) {\n // Parse parameters properly to number\n params.queryLimitResults.value = parseInt(params.queryLimitResults.value);\n params.validationResultsLimitTotal.value = parseInt(params.validationResultsLimitTotal.value);\n params.validationResultsLimitPerConstraint.value = parseInt(params.validationResultsLimitPerConstraint.value);\n } else if (params.leftJoinWorkerThreads && params.boundJoinBlockSize && params.joinWorkerThreads && params.unionWorkerThreads) {\n params.leftJoinWorkerThreads.value = parseInt(params.leftJoinWorkerThreads.value);\n params.boundJoinBlockSize.value = parseInt(params.boundJoinBlockSize.value);\n params.joinWorkerThreads.value = parseInt(params.joinWorkerThreads.value);\n params.unionWorkerThreads.value = parseInt(params.unionWorkerThreads.value);\n }\n }\n}\n\nconst parseMemberParamIfNeeded = function(param) {\n if (param && param.member) {\n param.member.value = [];\n }\n}\n\nconst getShaclOptionsClass = function () {\n const optionsModule = document.getElementById('shaclOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'fa fa-angle-down';\n }\n }\n return 'fa fa-angle-right';\n}\n\nconst validateNumberFields = function (params, invalidValues) {\n if (params.queryTimeout) {\n invalidValues.isInvalidQueryTimeout = !NUMBER_PATTERN.test(params.queryTimeout.value);\n }\n if (params.validationResultsLimitTotal && params.validationResultsLimitPerConstraint && params.queryLimitResults) {\n invalidValues.isInvalidValidationResultsLimitTotal = !NUMBER_PATTERN.test(params.validationResultsLimitTotal.value);\n invalidValues.isInvalidValidationResultsLimitPerConstraint = !NUMBER_PATTERN.test(params.validationResultsLimitPerConstraint.value);\n invalidValues.isInvalidQueryLimit = !NUMBER_PATTERN.test(params.queryLimitResults.value);\n }\n else if (params.leftJoinWorkerThreads && params.boundJoinBlockSize && params.joinWorkerThreads\n && params.unionWorkerThreads) {\n invalidValues.isInvalidLeftJoinWorkerThreads = !NUMBER_PATTERN.test(params.leftJoinWorkerThreads.value);\n invalidValues.isInvalidBoundJoinBlockSize = !NUMBER_PATTERN.test(params.boundJoinBlockSize.value);\n invalidValues.isInvalidJoinWorkerThreads = !NUMBER_PATTERN.test(params.joinWorkerThreads.value);\n invalidValues.isInvalidUnionWorkerThreads = !NUMBER_PATTERN.test(params.unionWorkerThreads.value);\n }\n}\n\nconst getInvalidParameterErrorMessage = function(param) {\n if(param === \"isInvalidQueryLimit\") {\n return 'Invalid parameter query limit';\n } else if (param === \"isInvalidQueryTimeout\") {\n return 'Invalid parameter query timeout';\n } else if (param === \"isInvalidValidationResultsLimitTotal\") {\n return 'Invalid parameter validation results limit total';\n } else if (param === \"isInvalidValidationResultsLimitPerConstraint\") {\n return 'Invalid parameter validation results limit per constraint';\n } else if (param === \"isInvalidJoinWorkerThreads\") {\n return 'Invalid parameter join worker threads';\n } else if (param === \"isInvalidLeftJoinWorkerThreads\") {\n return 'Invalid parameter left join worker threads';\n } else if (param === \"isInvalidUnionWorkerThreads\") {\n return 'Invalid parameter union worker threads';\n } else if (param === \"isInvalidBoundJoinBlockSize\") {\n return 'Invalid parameter bound join block size';\n }\n}\n\nconst checkInvalidValues = function(invalidValues) {\n let invalidValuesKeys = Object.keys(invalidValues);\n let invalidValuesVal = Object.values(invalidValues);\n\n for (let i = 0; i < invalidValuesKeys.length; i++) {\n if (invalidValuesVal[i]) {\n return getInvalidParameterErrorMessage(invalidValuesKeys[i]);\n }\n }\n return '';\n}\n\nconst getDocBase = function (productInfo) {\n return `https://graphdb.ontotext.com/documentation/${productInfo.productShortVersion}/${productInfo.productType}`;\n}\n\nconst modules = [\n 'ngCookies',\n 'ui.bootstrap',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.utils.localstorageadapter',\n 'toastr',\n 'ngFileUpload'\n];\n\nangular.module('graphdb.framework.repositories.controllers', modules)\n .controller('LocationsAndRepositoriesCtrl', LocationsAndRepositoriesCtrl)\n .controller('AddLocationCtrl', AddLocationCtrl)\n .controller('EditLocationCtrl', EditLocationCtrl)\n .controller('ChooseRepositoryCtrl', ChooseRepositoryCtrl)\n .controller('AddRepositoryCtrl', AddRepositoryCtrl)\n .controller('EditRepositoryCtrl', EditRepositoryCtrl)\n .controller('EditRepositoryFileCtrl', EditRepositoryFileCtrl)\n .controller('UploadRepositoryConfigCtrl', UploadRepositoryConfigCtrl);\n\nLocationsAndRepositoriesCtrl.$inject = ['$scope', '$modal', 'toastr', '$repositories', 'ModalService', '$jwtAuth', 'LocationsRestService', 'LocalStorageAdapter', '$interval'];\nfunction LocationsAndRepositoriesCtrl($scope, $modal, toastr, $repositories, ModalService, $jwtAuth, LocationsRestService, LocalStorageAdapter, $interval) {\n $scope.loader = true;\n\n $scope.isLocationInactive = function (location) {\n return !location.active || !$scope.hasActiveLocation();\n };\n\n //Get locations //TODO\n $scope.getLocations = function () {\n return $repositories.getLocations();\n };\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.getActiveLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n $scope.getLocationError = function () {\n return $repositories.getLocationError();\n };\n\n $scope.getDegradedReason = function () {\n return $repositories.getDegradedReason();\n };\n\n $scope.getRepositories = function () {\n return $repositories.getRepositories();\n };\n\n //Delete location\n $scope.deleteLocation = function (uri) {\n ModalService.openSimpleModal({\n title: 'Confirm detach',\n message: 'Are you sure you want to detach the location \\'' + uri + '\\'?',\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteLocation(uri);\n });\n };\n\n //Add new location\n\n $scope.addLocationHttp = function (dataAddLocation) {\n $scope.loader = true;\n LocationsRestService.addLocation(dataAddLocation)\n .success(function (data) {\n $scope.locations = data;\n //Reload locations and repositories\n $repositories.init();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n\n $scope.loader = false;\n });\n };\n\n $scope.addLocation = function () {\n $modal.open({\n templateUrl: 'js/angular/templates/modal/add-location.html',\n windowClass: 'addLocationDialog',\n controller: 'AddLocationCtrl'\n }).result\n .then(function (dataAddLocation) {\n $scope.addLocationHttp(dataAddLocation);\n });\n };\n\n //Edit location\n $scope.editLocationHttp = function (dataEditLocation) {\n $scope.loader = true;\n LocationsRestService.editLocation(dataEditLocation)\n .success(function (data) {\n $scope.locations = data;\n //Reload locations and repositories\n $repositories.init();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n\n $scope.loader = false;\n });\n };\n\n $scope.editLocation = function (location) {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/templates/modal/edit-location.html',\n controller: 'EditLocationCtrl',\n resolve: {\n location: function () {\n return location;\n }\n }\n });\n\n modalInstance.result.then(function (dataEditLocation) {\n $scope.editLocationHttp(dataEditLocation);\n }, function () {\n });\n };\n\n $scope.activateLocationRequest = function (location) {\n $scope.loader = true;\n const data = {\n 'uri': location.uri\n };\n LocationsRestService.enableLocation(data)\n .success(function () {\n $repositories.setRepository('');\n $repositories.init();\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n document.getElementById('switch-' + location.$$hashKey).checked = false;\n });\n };\n\n //Activate location\n $scope.activateLocation = function (location) {\n //This has to be fixed\n // if (document.getElementById('switch-' + location.$$hashKey).checked == true) {\n // return;\n // }\n if ($scope.hasActiveLocation()) {\n ModalService.openSimpleModal({\n title: 'Confirm location change',\n message: 'Are you sure you want to change the location?',\n warning: true\n }).result\n .then(function () {\n $scope.activateLocationRequest(location);\n }, function () {\n document.getElementById('switch-' + location.$$hashKey).checked = false;\n });\n } else {\n $scope.activateLocationRequest(location);\n }\n };\n\n //Change repository\n $scope.setRepository = function (id) {\n $repositories.setRepository(id);\n };\n\n //Delete repository\n $scope.deleteRepository = function (repositoryId) {\n ModalService.openSimpleModal({\n title: 'Confirm delete',\n message: `<p>Are you sure you want to delete the repository <strong>${repositoryId}</strong>?</p>\n <p><span class=\"icon-2x icon-warning\" style=\"color: #d54a33\"/>\n All data in the repository will be lost.</p>`,\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.deleteRepository(repositoryId);\n removeCachedGraphsOnDelete(repositoryId);\n });\n };\n\n $scope.restartRepository = function (repositoryId) {\n ModalService.openSimpleModal({\n title: 'Confirm restart',\n message: `<p>Are you sure you want to restart the repository <strong>${repositoryId}</strong>?</p>\n <p><span class=\"icon-2x icon-warning\" style=\"color: #d54a33\"/>\n The repository will be shut down immediately and all running queries\n and updates will be cancelled.</p>`,\n warning: true\n }).result\n .then(function () {\n $scope.loader = true;\n $repositories.restartRepository(repositoryId);\n });\n }\n\n $scope.toggleDefaultRepository = function (repositoryId) {\n if ($scope.getDefaultRepository() === repositoryId) {\n // unset\n $repositories.setDefaultRepository(null);\n } else {\n // set\n $repositories.setDefaultRepository(repositoryId);\n }\n };\n\n $scope.getDefaultRepository = function () {\n return $repositories.getDefaultRepository();\n };\n\n /* Unused, data urls don't behave well in all browsers, avoid them when possible\n $scope.getRepoTurtleConfig = function (repository) {\n function downloadRepoConfig(repoTurtleConfig, repository) {\n $('.download-turtle-config')\n .mouseup(function () {\n $(this)\n .attr('href', repoTurtleConfig)\n .attr('download', repository.id + '-config.ttl')\n });\n }\n\n $repositories.getRepositoryTurtleConfig(repository)\n .success(function (response) {\n var repoTurtleConfigDownload = 'data:application/octet-stream;charset=utf-8;base64,'\n + btoa(unescape(encodeURIComponent(response)));\n downloadRepoConfig(repoTurtleConfigDownload, repository);\n })\n .error(function () {\n toastr.error('Error getting repository configuration for '' + repository.id + ''');\n });\n };\n */\n\n $scope.getRepositoryDownloadLink = function (repository) {\n let url = `rest/repositories/${repository.id}${(repository.type === REPOSITORY_TYPES.ontop ? '/downloadZip': '/download')}`;\n const token = $jwtAuth.getAuthToken();\n if (token) {\n url = `${url}?authToken=${encodeURIComponent(token)}`;\n }\n return url;\n };\n\n ///Copy to clipboard popover options\n $scope.copyToClipboard = function (uri) {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n $scope.fromFile = function () {\n const modalInstance = $modal.open({\n templateUrl: 'js/angular/templates/modal/upload-repository-config.html',\n controller: 'UploadRepositoryConfigCtrl'\n });\n modalInstance.result.then(function () {\n $repositories.init();\n });\n };\n\n //Delete repository\n $scope.openActiveLocationSettings = function () {\n $modal.open({\n templateUrl: 'js/angular/settings/modal/location-settings.html',\n controller: 'ActiveLocationSettingsCtrl'\n });\n };\n\n const timer = $interval(function () {\n // Update repositories state\n $repositories.initQuick();\n }, 5000);\n\n $scope.$on('$destroy', function () {\n $interval.cancel(timer);\n });\n\n function removeCachedGraphsOnDelete(repoId) {\n const cashedDependenciesGraphPrefix = `dependencies-selectedGraph-${repoId}`;\n const cashedClassHierarchyGraphPrefix = `classHierarchy-selectedGraph-${repoId}`;\n angular.forEach(LocalStorageAdapter.keys(), function (key) {\n // remove everything but the hide prefixes setting, it should always persist\n if (key.startsWith(cashedClassHierarchyGraphPrefix) || key.startsWith(cashedDependenciesGraphPrefix)) {\n LocalStorageAdapter.remove(key);\n }\n });\n }\n\n}\n\nUploadRepositoryConfigCtrl.$inject = ['$scope', '$modalInstance', 'Upload', 'toastr'];\n\nfunction UploadRepositoryConfigCtrl($scope, $modalInstance, Upload, toastr) {\n $scope.upload = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n }\n };\n $scope.ok = function () {\n if ($scope.uploadFile) {\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories',\n method: 'POST',\n data: {config: $scope.uploadFile}\n })\n .success(function () {\n $scope.uploadFileLoader = false;\n $modalInstance.close();\n })\n .error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.uploadFileLoader = false;\n });\n }\n };\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nAddLocationCtrl.$inject = ['$scope', '$modalInstance', 'toastr', 'productInfo'];\n\nfunction AddLocationCtrl($scope, $modalInstance, toastr, productInfo) {\n\n $scope.newLocation = {\n 'uri': '',\n 'authType': 'none',\n 'username': '',\n 'password': '',\n 'active': false\n };\n $scope.docBase = getDocBase(productInfo);\n\n $scope.isValidLocation = function () {\n return ($scope.newLocation.uri.length < 6 ||\n $scope.newLocation.uri.indexOf('http:') === 0 || $scope.newLocation.uri.indexOf('https:') === 0)\n && $scope.newLocation.uri.indexOf('/repositories') <= -1;\n };\n\n $scope.ok = function () {\n if (!$scope.newLocation) {\n toastr.error('Location cannot be empty');\n return;\n }\n $modalInstance.close($scope.newLocation);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nEditLocationCtrl.$inject = ['$scope', '$modalInstance', 'location', 'productInfo'];\n\nfunction EditLocationCtrl($scope, $modalInstance, location, productInfo) {\n\n $scope.editedLocation = angular.copy(location);\n $scope.docBase = getDocBase(productInfo);\n\n $scope.ok = function () {\n $modalInstance.close($scope.editedLocation);\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nChooseRepositoryCtrl.$inject = ['$scope', '$location'];\nfunction ChooseRepositoryCtrl($scope, $location) {\n $scope.pageTitle = 'Select repository type';\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.chooseRepositoryType = function (repoType) {\n $location.path(`${$location.path()}/${repoType}`);\n };\n}\n\nAddRepositoryCtrl.$inject = ['$scope', 'toastr', '$repositories', '$location', '$timeout', 'Upload', '$routeParams', 'RepositoriesRestService'];\n\nfunction AddRepositoryCtrl($scope, toastr, $repositories, $location, $timeout, Upload, $routeParams, RepositoriesRestService) {\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.repoTooltips = REPO_TOOLTIPS;\n $scope.params = $routeParams;\n $scope.repositoryType = $routeParams.repositoryType;\n $scope.enable = true;\n\n $scope.loader = true;\n $scope.pageTitle = 'Create Repository';\n $scope.repositoryInfo = {\n id: '',\n params: {},\n title: '',\n type: ''\n };\n\n $scope.invalidValues = {\n isInvalidQueryTimeout: false,\n isInvalidQueryLimit: false,\n isInvalidLeftJoinWorkerThreads: false,\n isInvalidBoundJoinBlockSize: false,\n isInvalidJoinWorkerThreads : false,\n isInvalidUnionWorkerThreads : false,\n isInvalidValidationResultsLimitPerConstraint : false,\n isInvalidValidationResultsLimitTotal : false\n };\n\n function isValidEERepository(repositoryType) {\n return $scope.isEnterprise() && (repositoryType === REPOSITORY_TYPES.graphdbRepo);\n }\n\n function isValidSERepository(repositoryType) {\n return !$scope.isFreeEdition() && !$scope.isEnterprise() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n\n function isValidFRRepository(repositoryType) {\n return $scope.isFreeEdition() && repositoryType === REPOSITORY_TYPES.graphdbRepo;\n }\n function isValidOntopRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.ontop;\n }\n\n function isValidFedXRepository(repositoryType) {\n return repositoryType === REPOSITORY_TYPES.fedx;\n }\n\n function isRepositoryTypeValid(repositoryType) {\n return isValidEERepository(repositoryType) || isValidSERepository(repositoryType)\n || isValidFRRepository(repositoryType) || isValidOntopRepository(repositoryType)\n || isValidFedXRepository(repositoryType);\n }\n\n function setPageTitle(repositoryType) {\n switch (repositoryType) {\n case REPOSITORY_TYPES.graphdbRepo:\n $scope.pageTitle = 'Create GraphDB repository';\n break;\n case REPOSITORY_TYPES.ontop:\n $scope.pageTitle = 'Create Ontop Virtual SPARQL repository';\n break;\n case REPOSITORY_TYPES.fedx:\n $scope.pageTitle = 'Create FedX Virtual SPARQL repository';\n break;\n }\n }\n\n $scope.getConfig = function (repoType) {\n RepositoriesRestService.getRepositoryConfiguration(repoType).success(function (data) {\n $scope.repositoryInfo.params = data.params;\n $scope.repositoryInfo.type = data.type;\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n parseMemberParamIfNeeded($scope.repositoryInfo.params);\n $scope.loader = false;\n // The clean way is the \"autofocus\" attribute and we use it but it doesn't seem to\n // work in all browsers because of the way dynamic content is handled so give it another\n // try here.\n $timeout(function() {\n // Focus the ID field\n angular.element(document).find('#id').focus();\n }, 50);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.loader = false;\n });\n };\n\n if ($scope.repositoryType && isRepositoryTypeValid($scope.repositoryType)) {\n $scope.repositoryInfo.type = $scope.repositoryType;\n $scope.getConfig($scope.repositoryType);\n setPageTitle($scope.repositoryType);\n } else {\n $location.path('/repository/create');\n }\n\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.activeLocation = function () {\n return $repositories.getActiveLocation();\n };\n\n let isInvalidPieFile = false;\n $scope.uploadRuleset = function (files) {\n if (files && files.length) {\n $scope.uploadFile = files[0];\n $scope.uploadFileLoader = true;\n Upload.upload({\n url: 'rest/repositories/uploadRuleSet',\n data: {ruleset: $scope.uploadFile}\n }).progress(function (evt) {\n /*\t\t\t\t\t\tvar progressPercentage = parseInt(100.0 * evt.loaded / evt.total);\n console.log('progress: ' + progressPercentage + '% ' + evt.config.file.name);*/\n }).success(function (data) {\n if (!data.success) {\n toastr.error(data.errorMessage);\n isInvalidPieFile = true;\n } else {\n const fileName = $scope.uploadFile.name;\n const newValue = {id: data.fileLocation, name: 'Custom: ' + fileName};\n if ($scope.rulesetPie) {\n // file was previously uploaded\n $scope.rulesets[0] = newValue;\n } else {\n // file uploaded for the first time\n $scope.rulesets.unshift(newValue);\n }\n $scope.rulesetPie = data.fileLocation;\n $scope.rulesetPieFile = fileName;\n $scope.repositoryInfo.params.ruleset.value = $scope.rulesetPie;\n }\n $scope.uploadFileLoader = false;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.uploadFile = '';\n $scope.uploadFileLoader = false;\n });\n }\n };\n\n $scope.noMembersError = function () {\n toastr.error('FedX repository should be created with at least one member!');\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.createRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.createRepository($scope.repositoryInfo).success(function () {\n toastr.success('The repository ' + $scope.repositoryInfo.id + ' has been created.');\n $repositories.init($scope.goBackToPreviousLocation);\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.loader = false;\n });\n };\n\n $scope.createRepo = function () {\n if (!$scope.repositoryInfo.id) {\n toastr.error('Repository ID cannot be empty');\n return;\n }\n\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n const invalidValues = checkInvalidValues($scope.invalidValues);\n\n if (isInvalidPieFile) {\n toastr.error('Invalid rule-set file. Please upload a valid one.');\n } else if ($scope.isInvalidRepoName) {\n toastr.error('Wrong repo name');\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if (invalidValues) {\n toastr.error(invalidValues);\n } else {\n $scope.createRepoHttp();\n }\n };\n\n $scope.rulesetWarning = function () {\n const pp = $scope.repositoryInfo.params;\n if (pp === undefined || pp.ruleset === undefined || pp.disableSameAs === undefined) {\n return '';\n }\n\n if (pp.ruleset.value.indexOf('owl') === 0 && pp.disableSameAs.value === 'true') {\n return REPO_TOOLTIPS.rulesetWarnings.needsSameAs;\n } else if (pp.ruleset.value.indexOf('rdfs') === 0 && pp.disableSameAs.value === 'false') {\n return REPO_TOOLTIPS.rulesetWarnings.doesntNeedSameAs;\n } else if (pp.ruleset.value === $scope.rulesetPie) {\n return REPO_TOOLTIPS.rulesetWarnings.customRuleset;\n } else {\n return '';\n }\n };\n\n $scope.validateNumberInput = function () {\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n }\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n }\n //TODO - check if repositoryID exist\n\n // Request auto-focus of the ID input when creating a repo (but not when editing)\n $scope.autofocusId = 'autofocus';\n}\n\nEditRepositoryFileCtrl.$inject = ['$scope', '$modalInstance', 'RepositoriesRestService', 'file', 'toastr'];\n\nfunction EditRepositoryFileCtrl($scope, $modalInstance, RepositoriesRestService, file, toastr) {\n\n if (file) {\n RepositoriesRestService.getRepositoryFileContent(file).success(function (data) {\n $scope.fileContent = data;\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n });\n }\n\n $scope.ok = function () {\n $modalInstance.close({\n content: $scope.fileContent,\n fileLocation: file\n });\n };\n\n $scope.cancel = function () {\n $modalInstance.dismiss('cancel');\n };\n}\n\nEditRepositoryCtrl.$inject = ['$scope', '$routeParams', 'toastr', '$repositories', '$location', 'ModalService', 'RepositoriesRestService'];\n\nfunction EditRepositoryCtrl($scope, $routeParams, toastr, $repositories, $location, ModalService, RepositoriesRestService) {\n\n $scope.rulesets = STATIC_RULESETS.slice();\n $scope.repositoryTypes = REPOSITORY_TYPES;\n $scope.repoTooltips = REPO_TOOLTIPS;\n\n //TODO\n $scope.editRepoPage = true;\n $scope.canEditRepoId = false;\n $scope.params = $routeParams;\n $scope.loader = true;\n $scope.repositoryInfo = {};\n $scope.repositoryInfo.id = $scope.params.repositoryId;\n $scope.repositoryInfo.restartRequested = false;\n $scope.repositoryType = '';\n $scope.saveRepoId = $scope.params.repositoryId;\n $scope.pageTitle = 'Edit Repository: ' + $scope.params.repositoryId;\n $scope.invalidValues = {\n isInvalidQueryTimeout: false,\n isInvalidQueryLimit: false,\n isInvalidLeftJoinWorkerThreads: false,\n isInvalidBoundJoinBlockSize: false,\n isInvalidJoinWorkerThreads : false,\n isInvalidUnionWorkerThreads : false,\n isInvalidValidationResultsLimitPerConstraint : false,\n isInvalidValidationResultsLimitTotal : false\n };\n $scope.hasActiveLocation = function () {\n return $repositories.hasActiveLocation();\n };\n\n $scope.$watch($scope.hasActiveLocation, function () {\n if ($scope.hasActiveLocation) {\n RepositoriesRestService.getRepository($scope.repositoryInfo.id)\n .success(function (data) {\n if (angular.isDefined(data.params.ruleset)) {\n let ifRulesetExists = false;\n angular.forEach($scope.rulesets, function (item) {\n if (item.id === data.params.ruleset.value) {\n ifRulesetExists = true;\n }\n });\n if (data.params.ruleset && !ifRulesetExists) {\n let name = getFileName(data.params.ruleset.value);\n $scope.rulesets.unshift({id: data.params.ruleset.value, name: 'Custom: ' + name});\n }\n }\n $scope.repositoryInfo = data;\n $scope.setRepositoryType(data.type);\n parseNumberParamsIfNeeded($scope.repositoryInfo.params);\n $scope.repositoryInfo.saveId = $scope.saveRepoId;\n $scope.loader = false;\n })\n .error(function (data, status) {\n if (status === 404 && $routeParams.repositoryId !== 'system') {\n toastr.error('Repo with name ' + '<b>' + $routeParams.repositoryId + '</b>' + ' doesn\\'t exists', 'Error', {allowHtml: true});\n $scope.loader = false;\n $location.path('repository');\n } else if (status === 404 && $routeParams.repositoryId === 'system') {\n toastr.error('<b>System</b> repository can\\'t be edited', 'Error', {allowHtml: true});\n $scope.loader = false;\n $location.path('repository');\n } else {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.loader = false;\n }\n });\n }\n });\n\n $scope.setRepositoryType = function (type) {\n $scope.repositoryType = type;\n };\n\n $scope.noMembersError = function () {\n toastr.error('FedX repository should be created with at least one member!');\n };\n\n $scope.editRepoHttp = function () {\n $scope.loader = true;\n RepositoriesRestService.editRepository($scope.repositoryInfo.saveId, $scope.repositoryInfo)\n .success(function () {\n toastr.success('The repository ' + $scope.repositoryInfo.saveId + ' has been edited.');\n $repositories.init($scope.goBackToPreviousLocation);\n if ($scope.repositoryInfo.saveId === $scope.repositoryInfo.id && $scope.repositoryInfo.restartRequested) {\n $repositories.restartRepository($scope.repositoryInfo.id);\n }\n }).error(function (data) {\n const msg = getError(data);\n toastr.error(msg, 'Error');\n $scope.loader = false;\n });\n };\n\n $scope.editRepository = function () {\n $scope.isInvalidRepoName = !FILENAME_PATTERN.test($scope.repositoryInfo.id);\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n const invalidValues = checkInvalidValues($scope.invalidValues);\n let modalMsg = `Save changes to repository <strong>${$scope.repositoryInfo.id}</strong>?<br><br>`;\n if ($scope.repositoryInfo.saveId !== $scope.repositoryInfo.id) {\n modalMsg += `<span class=\"icon-2x icon-warning\" style=\"color: #d54a33\"/>\n The repository will be stopped and renamed.`;\n } else if ($scope.repositoryInfo.restartRequested) {\n modalMsg += `<span class=\"icon-2x icon-warning\" style=\"color: #d54a33\"/>\n The repository will be restarted.`;\n } else {\n modalMsg += `<span class=\"icon-2x icon-warning\" style=\"color: #d54a33\"/>\n Repository restart required for changes to take effect.`;\n }\n if ($scope.isInvalidRepoName) {\n toastr.error('Wrong repo name');\n } else if ($scope.repositoryType === \"fedx\" && $scope.repositoryInfo.params.member.value.length === 0) {\n $scope.noMembersError();\n } else if(invalidValues) {\n toastr.error(invalidValues);\n } else {\n ModalService.openSimpleModal({\n title: 'Confirm save',\n message: modalMsg,\n warning: true\n }).result\n .then(function () {\n $scope.editRepoHttp();\n });\n }\n }\n\n $scope.editRepositoryId = function () {\n let msg = '<p>Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.</p>';\n if ($scope.isEnterprise()) {\n msg += '<p>If your repository is in a cluster, it is your responsibility to update the cluster after renaming.</p>';\n }\n ModalService.openSimpleModal({\n title: 'Confirm enable edit',\n message: msg,\n warning: true\n }).result.then(function () {\n $scope.canEditRepoId = true;\n });\n };\n\n $scope.goBackToPreviousLocation = function () {\n if (angular.isDefined($routeParams.previous)) {\n delete $location.$$search.previous;\n $location.path('/');\n } else {\n $location.path('/repository');\n }\n };\n\n $scope.validateNumberInput = function () {\n validateNumberFields($scope.repositoryInfo.params, $scope.invalidValues);\n }\n\n $scope.getShaclOptionsClass = function () {\n return getShaclOptionsClass();\n }\n}\n","export const STATIC_RULESETS = [\n {id: 'empty', name: 'No inference'},\n {id: 'rdfs-optimized', name: 'RDFS (Optimized)'},\n {id: 'rdfs', name: 'RDFS'},\n {id: 'rdfsplus-optimized', name: 'RDFS-Plus (Optimized)'},\n {id: 'owl-horst-optimized', name: 'OWL-Horst (Optimized)'},\n {id: 'owl-horst', name: 'OWL-Horst'},\n {id: 'owl2-ql-optimized', name: 'OWL2-QL (Optimized)'},\n {id: 'owl2-ql', name: 'OWL2-QL'},\n {id: 'owl-max-optimized', name: 'OWL-Max (Optimized)'},\n {id: 'owl-max', name: 'OWL-Max'},\n {id: 'owl2-rl-optimized', name: 'OWL2-RL (Optimized)'},\n {id: 'owl2-rl', name: 'OWL2-RL'},\n\n];\n\nexport const REPOSITORY_TYPES = {graphdbRepo: 'graphdb', free: 'free', eeWorker: 'worker', eeMaster: 'master', ontop: 'ontop', se: 'se', fedx: 'fedx'};\nexport const FILENAME_PATTERN = new RegExp('^[a-zA-Z0-9-_]+$');\nexport const NUMBER_PATTERN = new RegExp('[0-9]');\n\nexport const REPO_TOOLTIPS = {\n id: \"Unique identifier for the repository. The ID must contain only letters (a-z, A-Z), numbers (0-9), '-' and '_'.\",\n title: \"Human readable description of the repository.\",\n readOnly: \"Protects the repository against any changes.\",\n ruleset: \"Sets of axiomatic triples, consistency checks and entailment rules, \" +\n \"which determine the applied semantics with a PIE file.\",\n rulesetWarnings: {\n needsSameAs: \"Disabling owl:sameAs for this ruleset may cause incomplete inference with owl:sameAs statements.\",\n doesntNeedSameAs: \"This ruleset does not need owl:sameAs, consider disabling it.\",\n customRuleset: \"If the custom ruleset does not use owl:sameAs, consider disabling it. <br>\" +\n \"If the ruleset uses owl:sameAs, disabling it may cause incomplete inference with owl:sameAs statements.\"\n },\n disableSameAs: \"GraphDB uses a non-rule implementation of owl:sameAs, \" +\n \"which can be enabled or disabled independently of the ruleset.\",\n checkForInconsistencies: \"Enables the consistency checks from the ruleset.\",\n isShacl: \"Enables support for SHACL validation.\",\n shaclOptions: {\n cacheSelectNodes: \"The SHACL implementation retrieves a lot of its relevant data through running \" +\n \"SPARQL Select queries against the repository and against the changes in the transaction. \" +\n \"This is usually good for performance, but while validating large amounts of data disabling this cache will use less memory.\",\n undefinedTargetValidatesAllSubjects: \"If no target is defined for a NodeShape, that NodeShape will be ignored. \" +\n \"Enabling this will make such NodeShapes wildcard shapes and validate all subjects. \" +\n \"Equivalent to setting sh:targetClass to owl:Thing or rdfs:Resource in an environment with a reasoner.\",\n logValidationPlans: \"Log (INFO) the executed validation plans as GraphViz DOT. \" +\n \"It is recommended to disable parallel validation when this is enabled.\",\n logValidationViolations: \"Log (INFO) a list of violations and the triples that caused the violations. \" +\n \"It is recommended to disable parallel validation when this is enabled.\",\n parallelValidation: \"Run SHACL validation in parallel.\",\n globalLogValidationExecution: \"Log (INFO) every execution step of the SHACL validation. \" +\n \"This is fairly costly and should not be used in production. \" +\n \"It is recommended to disable parallel validation when this is enabled.\",\n performanceLogging: \"Log (INFO) the execution time per shape. \" +\n \"It is recommended to disable parallel validation and caching of select nodes when this is enabled.\",\n eclipseRdf4jShaclExtensions: \"Activates RDF4J's SHACL extensions that provide additional functionality (experimental).\",\n dashDataShapes: \"Activates DASH Data Shapes extensions that provide additional functionality (experimental).\"\n },\n entityIdSize: \"Defines the bit size of internal IDs used to index entities (URIs, blank nodes, literals, and RDF* embedded triples).\" +\n \"<br>Use 40 bit ID only if you expect more than 2 billion unique RDF values.\",\n enableContextIndex: \"Builds an additional Context-Predicate-Subject-Object index to boost the \" +\n \"SPARQL query performance of queries with GRAPH/FROM/FROM NAMED clauses.\",\n enablePredicateList: \"Enables the mappings from an entity (subject or object) to its predicates; \" +\n \"enabling it can significantly speed up queries that use wildcard predicate patterns.\",\n queryTimeout: \"Sets the number of seconds after which the evaluation of a query will be terminated; \" +\n \"values less than or equal to zero mean no limit.\",\n throwQueryEvaluationExceptionOnTimeout: \"Repository throws QueryEvaluationException when the duration of a query execution \" +\n \"exceeds the timeout parameter.\",\n queryLimitResults: \"Sets the maximum number of results returned from a query after which the evaluation of \" +\n \"a query will be terminated; values less than or equal to zero mean no limit.\",\n nonInterpretablePredicates: \"Semicolon-delimited list of predicates (full URIs) that GraphDB will not try to process \" +\n \"with the registered GraphDB plugins.\",\n ontop: {\n driverType: \"Determines the type of SQL database to connect to.\",\n propertiesFile: \"Describes the JDBC configuration such as hostname and database name to connect to.\",\n hostName: 'The JDBC hostname to connect to.',\n port: \"The JDBC port to connect to if different from the default for the chosen JDBC driver.\",\n portIfRequired: \"The JDBC port to connect to.\",\n databaseName: 'The database name to connect to.',\n userName: 'The username to use for the JDBC connection.',\n password: 'The password to use for the JDBC connection.',\n driverClass: 'Classname of the chosen JDBC driver. It must be on the classpath (in the lib directory).',\n driverClassWarning: \"JDBC driver not found in the classpath, please save it in the lib directory and restart GraphDB\",\n url: 'The JDBC URL that will be used. It is constructed using the supplied hostname, port and database name.',\n obdaFile: \"Describes the mapping from SQL to RDF in either the OBDA or the R2RML format.\",\n owlFile: \"Specifies relations between the classes and properties in the cosntructed RDF graph. \" +\n \"It can be in any supported RDF format.\",\n constraintFile: \"Specifies override of SQL primary and foreign keys.\",\n testConn: \"Attempts to establish a connection to the SQL database to test if the supplied configuration is correct.\"\n },\n fedx: {\n repositoryNotExistWarning: 'The repository member has been removed from the local repositories',\n localReposInstructions: 'Click on a repo to add a local repository as a member',\n withLogQueries: 'Set whether to log queries',\n withDebugQueryPlan: 'Whether to print the optimized query execution plan to stdout',\n enforceMaxQueryTime: 'Max query time in seconds, 0 to disable',\n withIncludeInferredDefault: 'Set whether to include inferred statements or not',\n withBoundJoinBlockSize: 'Set the block size for bound joins',\n withJoinWorkerThreads: 'Set the number of join worker threads for parallelization',\n withLeftJoinWorkerThreads: 'Set the number of left join worker threads',\n unionWorkerThreads: 'Set the number of union worker threads for parallelization',\n withLogQueryPlan: 'Whether to log the query plan',\n withEnableServiceAsBoundJoin: 'Whether external SERVICE clauses are evaluated using bound join',\n withSourceSelectionCacheSpec: 'The cache specification for the SourceSelectionMemoryCache',\n removeMember: 'Remove repository as a FedX member',\n editRepository: 'Edit repository',\n setAsWritable: 'Set repository as writable'\n }\n};\n"],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[41,95],{39:function(e,t,n){"use strict";n.r(t);n(2),n(9);function r(e,t,n,r){e.supportsStatistics=!0,e.settings={statistics:!1},e.getSettings=function(){e.loader=!0,r.getStatistics().then((function(t){e.settings.statistics="true"===t.data,e.supportsStatistics=!0}),(function(n){if(404===n.status)e.supportsStatistics=!1;else{const e=getError(n.data);t.error(e,"Error getting settings")}}))},e.getSettings(),e.setSettings=function(){e.loader=!0,r.toggleStatistics(e.settings.statistics).then((function(){n.close(),t.success("Settings have been saved")}),(function(e){const n=getError(e.data);t.error(n,"Error saving settings")}))},e.submitForm=function(){e.setSettings()},e.cancel=function(){n.dismiss("cancel")}}function i(e,t,n,r,i,s){e.loadingLicense=function(){return n.loadingLicense},n.checkLicenseStatus(),e.revertToFree=function(){s.openSimpleModal({title:"Confirm operation",message:"Reverting to a GraphDB Free license will make SE and EE repositories unusable. Are you sure?",warning:!0}).result.then((function(){t.unregisterLicense().success((function(){n.checkLicenseStatus()}))}))}}function s(e,t,n,r,i,s,o){e.$on("securityInit",(function(){o.isAdmin()||n.path("/license")})),e.sendLicenseToValidateAndActivate=a;const c=$(".license-textarea");function a(e){t.sendLicenseToValidate(e).success((function(n){"Invalid"!==n.licensee?(c.val(e),function(e,n){r.open({templateUrl:"js/angular/settings/modal/validate-license.html",controller:"ValidateLicenseModalCtrl",size:"lg",resolve:{license:function(){return e}}}).result.then((function(){!function(e){e||(e=c.val());if(e){const n=atob(e.replace(/\s/g,""));t.registerLicense(n).success((function(){s.history.back()})).error((function(){i.error("Error registering GraphDB license")}))}else i.error("No license code available in textarea")}(n)}))}(n,e)):(c.val(""),i.error(n.message))})).error((function(){i.error("Invalid license")}))}e.$watch("currentFile",(function(){if(e.currentFile){const n=e.currentFile;t.extractFromLicenseFile(n).success((function(e){a(e)})).error((function(){i.error("Could not upload file")}))}})),e.getBackToPreviousPage=function(){s.history.back()}}function o(e,t,n){e.ok=function(){t.close()},e.cancel=function(){t.dismiss("cancel")},e.license=n}function c(e){e.loader=!0,e.setLoader=function(t){e.loader=t}}angular.module("graphdb.framework.settings.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.jwtauth","toastr"]).controller("ActiveLocationSettingsCtrl",r).controller("ValidateLicenseModalCtrl",o).controller("LicenseCtrl",i).controller("RegisterLicenseCtrl",s).controller("LoaderSamplesCtrl",c),r.$inject=["$scope","toastr","$modalInstance","LicenseRestService"],i.$inject=["$scope","LicenseRestService","$licenseService","toastr","$rootScope","ModalService"],s.$inject=["$scope","LicenseRestService","$location","$modal","toastr","$window","$jwtAuth"],o.$inject=["$scope","$modalInstance","license"],c.$inject=["$scope"]},75:function(e,t,n){"use strict";n.r(t);n(2),n(7),n(5),n(39),n(15),n(9),n(26),n(27);function r(e){e.interceptors.push("$unauthorizedInterceptor")}function i(e,t,n){e.$on("$locationChangeStart",(function(){n.isLicenseHardcoded&&"/license/register"===t.url()&&t.path("license")}))}angular.module("graphdb.framework.settings",["toastr","ui.bootstrap","graphdb.framework.rest.license.service","graphdb.framework.settings.controllers","graphdb.framework.core.interceptors.unauthorized","graphdb.framework.core.services.jwtauth"]).config(r).run(i),r.$inject=["$httpProvider","$routeProvider"],i.$inject=["$rootScope","$location","$licenseService"]}}]);
|
|
2
|
-
//# sourceMappingURL=41.ba8cb2fb7f46ccb2ab28.bundle.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{33:function(e,t,n){"use strict";n.r(t);n(4),n(12);function r(e,t,n,r,o,i,a,s,u,c,l,d,g,f){const p={id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:!0,sameAs:!0};let y,m=c.getPrincipal();function h(e,t){p.inference=t.appSettings.DEFAULT_INFERENCE,p.sameAs=t.appSettings.DEFAULT_SAMEAS,e.skipCountQuery=!t.appSettings.EXECUTE_COUNT,e.ignoreSharedQueries=t.appSettings.IGNORE_SHARED_QUERIES,e.tabsData=e.tabs=g.get(f.TABS_STATE)||[p],e.$watchCollection("[currentQuery.inference, currentQuery.sameAs]",(function(e,t,n){T(n.currentQuery)})),e.$on("repositoryIsSet",S)}function T(t){e.tabs.forEach((function(n,r){n.id===t.id&&(e.tabs[r].query=t.query,e.tabs[r].inference=t.inference,e.tabs[r].sameAs=t.sameAs)})),g.set(f.TABS_STATE,e.tabs)}function w(t,n,r,o){const i=angular.element(document.getElementById("yasr-inner"));e.queryIsRunning=t,t?(e.queryStartTime=Date.now(),e.countTimeouted=!1,e.progressMessage=n,e.extraMessage=r,e.noLoaderTimer=o,i.addClass("hide")):(e.progressMessage="",e.extraMessage="",e.noLoaderTimer=!1,e.currentTrackAlias=null,e.abortRequested=!1,i.removeClass("hide")),null===e.$$phase&&e.$apply()}function b(n){function r(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0}if(e.orientationViewMode){if("yasr"===e.viewMode){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px"}else e.noPadding={},document.querySelector(".CodeMirror-wrap").style.height="";document.getElementById("yasr").style.minHeight=""}else if(e.noPadding={paddingRight:15,paddingLeft:0},window.editor&&document.querySelector(".CodeMirror-wrap")){let e=r()-document.querySelector(".CodeMirror-wrap").getBoundingClientRect().top;e-=40,document.querySelector(".CodeMirror-wrap").style.height=e+"px",document.getElementById("yasr").style.minHeight=e+"px"}else{let r;r=t(n?function(){e.fixSizesOnHorizontalViewModeSwitch(n)}:e.fixSizesOnHorizontalViewModeSwitch,100),e.$on("$destroy",(function(){t.cancel(r)}))}window.yasr&&window.yasr.container&&t((function(){window.yasr.container.resize()}),100)}function C(){b(!0)}function S(t,n){n.newRepo&&(e.tabsData=g.get(f.TABS_STATE),e.tabsData.forEach((function(e){e.yasrData=void 0,e.queryType=void 0,e.resultsCount=0,e.allResultsCount=0,e.sizeDelta=void 0})),g.set(f.TABS_STATE,e.tabsData),e.tabs=e.tabsData,e.currentQuery={},e.errorMessage=null,e.repositoryError=null)}function E(e){t((function(){$('a[data-id = "'+e+'"]').tab("show")}),0)}function v(o,i){if(e.executedQueryTab=e.currentQuery,i){if("SELECT"!==window.editor.getQueryType()&&"CONSTRUCT"!==window.editor.getQueryType())return void n.warning("Explain only works with SELECT or CONSTRUCT queries.");if(r.isActiveRepoOntopType())return void n.warning("Explain not supported for Virtual repositories.")}if(e.explainRequested=i,!e.queryIsRunning){if(o?e.currentTabConfig.resultsCount=0:e.resetCurrentTabConfig(),e.lastRunQueryMode=window.editor.getQueryMode(),"update"===e.lastRunQueryMode&&r.isActiveRepoOntopType())return void n.warning("Updates are not supported for Virtual repositories.");if(w(!0,"update"===e.lastRunQueryMode?"Executing update":"Evaluating query"),"none"!==e.viewMode){e.viewMode="none",e.orientationViewMode&&e.fixSizesOnHorizontalViewModeSwitch();const n=t(window.editor.query,500);e.$on("$destroy",(function(){t.cancel(n)}))}else window.editor.query()}}function Q(){e.showSampleQueries=!e.showSampleQueries,e.showSampleQueries?a.getSavedQueries().success((function(t){e.sampleQueries=t,$("#sampleQueriesCollapse").collapse("show").width("300px")})).error((function(e){const t=getError(e);n.error(t,"Error! Could not get saved queries")})):$("#sampleQueriesCollapse").collapse("hide")}function M(t){let n=void 0;return e.tabsData.forEach((function(e){if(e.name===t.name&&e.query===t.body)return n=e.id,e})),n}function A(t){return function(n,r,o){e.savedQuery={name:n,query:r||window.editor.getValue(),shared:o},$(t).modal("show")}}function q(t){for(let n=0;n<e.tabsData.length;n++){if(e.tabsData[n].id===t)return n}}m?h(e,m):e.$on("securityInit",(function(e){m=c.getPrincipal(),h(e.currentScope,m)})),this.hint=document.createElement("span"),this.hint.innerHTML='Hint: "abC" matches "abC*", "ab c*" and "ab-c*"',this.hint.style.fontSize="12px",this.hint.style.color="gray",this.hint.style.backgroundColor="white",this.hint.style.position="absolute",this.hint.style.zIndex="3",this.hint.style.paddingLeft="12px",e.$watch((function(){return angular.element(".CodeMirror-hints").length}),e=>{if(e){const e=angular.element(".CodeMirror-hints")[0].getBoundingClientRect();document.body.appendChild(this.hint),this.hint.style.top=e.top-20+"px",this.hint.style.left=e.right-this.hint.offsetWidth-12+"px"}else this.hint&&this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint)}),e.resetCurrentTabConfig=function(){e.currentTabConfig={pageSize:1e3,page:1,allResultsCount:0,resultsCount:0}},e.queryExists=!1,e.resetCurrentTabConfig(),e.saveTab=function(t){const n=q(t);if(void 0===n)return{};const r=e.tabsData[n];return e.saveQueryToLocal(r),r},e.loadTab=function(n){e.tabsData=g.get(f.TABS_STATE)||[p];const o=q(n),i=e.tabsData[o];i.yasrData&&w(!0,"Rendering results",null,!0);t((function(){""===e.currentQuery.query&&(e.currentQuery.query=" "),t((function(){window.editor.setValue(e.currentQuery.query),e.yasr.updateDownloadDropdown(),e.$broadcast("tabLoaded",e.currentQuery.id),e.yasr.options.output=i.outputType,i.yasrData&&(i.yasrData.customError?(e.yasr.results={getException:function(){return i.yasrData.customError}},w(!1)):t((function(){e.setYasrResponse(i.yasrData,i.textStatus,i.jqXhrOrErrorString),w(!1),$(".yasr_btnGroup li:nth-child(2)").hasClass("active")&&t((function(){$(".yasr_btnGroup li:nth-child(2) a").get(0).click()}),0)}),0))}),0)}),0),g.set(f.TABS_STATE_CURRENT_ID,n),e.currentQuery=i,t((function(){e.currentTabConfig={},e.currentTabConfig.queryType=i.queryType,e.currentTabConfig.resultsCount=i.resultsCount,e.currentTabConfig.offset=i.offset,e.currentTabConfig.allResultsCount=i.allResultsCount,e.currentTabConfig.allResultsCountExact=i.allResultsCountExact,e.currentTabConfig.page=i.page,e.currentTabConfig.pageSize=i.pageSize,e.currentTabConfig.timeFinished=i.timeFinished,e.currentTabConfig.timeTook=i.timeTook,e.currentTabConfig.sizeDelta=i.sizeDelta,e.currentTabConfig.customUpdateMessage=i.customUpdateMessage,e.currentTabConfig.errorMessage=i.errorMessage,e.currentTabConfig.warningMessage=i.warningMessage,e.$apply()}),0),$("#yasr").css("padding","0"),y||(y=setInterval(x,200));!function(){const t=r.isActiveRepoOntopType(),n=r.isActiveRepoFedXType();(function(e){const t=document.getElementById("sameAs"),n=document.getElementById("inference");t.disabled=!(!t||!e),n.disabled=!(!n||!e)})(t),e.nocount=!(!t&&!n)||!m.appSettings.EXECUTE_COUNT,e.currentQuery.inference=!!t||m.appSettings.DEFAULT_INFERENCE,e.currentQuery.sameAs=!!t||m.appSettings.DEFAULT_SAMEAS}()},e.addNewTab=function(n,r,o){if(!N(!0))return;let i;i=r||o?{id:"1",name:r,query:o,inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS}:{id:"1",name:"",query:"select * where { \n\t?s ?p ?o .\n} limit 100 \n",inference:m.appSettings.DEFAULT_INFERENCE,sameAs:m.appSettings.DEFAULT_SAMEAS};D++;const a=""+D;e.tabsData=e.tabs;const s=i;s.id=a,e.tabsData.push(s),g.set(f.TABS_STATE_MAXID,D),g.set(f.TABS_STATE,e.tabsData);const u=Array.prototype.slice.call(arguments,1);t((function(){e.$apply(),E(a),n&&n.apply(this,u)}),0),e.tabs=e.tabsData},e.isTabChangeOk=N,e.runQuery=v,e.abortCurrentQuery=function(){d.abortQueryByAlias(e.currentTrackAlias).success((function(){e.abortRequested=!0}))},e.editQuery=function(t){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:'Edit Saved Query: "'+t.name+'"',query:t,edit:!0,okButtonText:"Save"}}}}).result.then((function(r){const o={name:r.name,body:r.body,shared:r.shared};t.name!==r.name?a.addNewSavedQuery(o).success((function(){e.deleteQueryHttp(t.name,!0)})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit saved query")})):a.editSavedQuery(o).success((function(){$("#editQueryContainer").modal("hide"),e.toggleSampleQueries(),n.success("Saved query "+t.name+" was edited.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot edit Saved query")}))}))},e.getNamespaces=function(){w(!0,"Refreshing namespaces","Normally this is a fast operation but it may take longer if a bigger repository needs to be initialised first."),e.namespacesLoading=!0,l.getRepositoryNamespaces().success((function(t){const n={};t.results.bindings.forEach((function(e){n[e.prefix.value]=e.namespace.value})),e.namespaces=n})).error((function(t){e.repositoryError=getError(t)})).finally((function(){w(!1),e.namespacesLoading=!1}))},e.changePagination=function(){v(!0,e.explainRequested)},e.toggleSampleQueries=Q,e.addKnownPrefixes=function(){a.addKnownPrefixes(JSON.stringify(window.editor.getValue())).success((function(e){angular.isDefined(window.editor)&&angular.isDefined(e)&&e!==window.editor.getValue()&&window.editor.setValue(e)})).error((function(e){const t=getError(e);return n.error(t,"Error! Could not add known prefixes"),!0}))},e.getExistingTabId=M,e.querySelected=function(t){const n=M(t);e.toggleSampleQueries(),e.isTabChangeOk(!1)&&(e.highlightNextTabChange=!0,angular.isDefined(n)?E(n):e.addNewTab(null,t.name,t.body))},e.deleteQuery=function(t){i.openSimpleModal({title:"Confirm",message:"Are you sure you want to delete the saved query '"+t+"'?",warning:!0}).result.then((function(){e.deleteQueryHttp(t)}))},e.deleteQueryHttp=function(t,r){a.deleteSavedQuery(t).success((function(){e.toggleSampleQueries(),r||n.success("Saved query: "+t+" was deleted.")})).error((function(e){const t=getError(e);n.error(t,"Error! Cannot delete saved query")}))},e.saveQuery=function(t,n){o.open({templateUrl:"js/angular/core/directives/queryeditor/templates/query-sample.html",controller:"QuerySampleModalCtrl",resolve:{data:function(){return{title:"Create New Saved Query",query:{name:t.name,body:t.query,shared:t.shared},edit:!1,okButtonText:"Create",queryExists:n}}}}).result.then((function(t){e.saveQueryHttp(t)}),(function(){}))},e.saveQueryHttp=function(t){a.addNewSavedQuery(t).success((function(){n.success("Saved query "+t.name+" was saved.")})).error((function(r){let o=getError(r);if(n.error(o,"Error! Cannot create saved query"),o="Query '"+t.name+"' already exists!"){t.query=t.body;const n=!0;e.saveQuery(t,n)}}))},e.saveQueryToLocal=T,e.setLoader=w,e.getLoaderMessage=function(){const t=(Date.now()-e.queryStartTime)/1e3;let n="",r="";e.noLoaderTimer||(n=e.getHumanReadableSeconds(t));r=e.progressMessage?e.progressMessage+"... "+n:"Running operation... "+n;e.extraMessage&&t>10&&(r+="\n"+e.extraMessage);return r},e.fixSizesOnHorizontalViewModeSwitch=b,e.changeViewMode=function(){e.viewMode="none",e.orientationViewMode=!e.orientationViewMode,g.set(f.VIEW_MODE,e.orientationViewMode),b()},e.showHideEditor=C,e.focusQueryEditor=function(){angular.element(document).find(".editable-input").is(":focus")||angular.element(document).find(".CodeMirror textarea:first-child").focus()},e.orientationViewMode=!g.get(f.VIEW_MODE)||"true"===g.get(f.VIEW_MODE),e.viewMode="none",e.getActiveRepository=function(){return r.getActiveRepository()},e.getActiveRepositoryNoError=function(){if(!e.repositoryError)return r.getActiveRepository()},e.orientationViewMode||C(),window.onbeforeunload=function(){e.currentQuery&&e.saveTab(e.currentQuery.id),g.set(f.TABS_STATE,e.tabs)},e.$on("$destroy",(function(){e.currentQuery&&e.saveTab(e.currentQuery.id),g.set(f.TABS_STATE,e.tabs),clearInterval(y)})),e.$on("$destroy",(function(){clearInterval(y),window.editor=null,window.yasr=null})),$(document).mouseup((function(t){const n=$("#sampleQueriesCollapse");!n.is(t.target)&&0===n.has(t.target).length&&e.showSampleQueries&&Q()}));let D=g.get(f.TABS_STATE_MAXID)||1;function R(e){return $(e).attr("data-id")}function x(){if(e.currentTabConfig.resultsCount>=0){const e=$(".saveAsDropDown");e.length>0&&!window.editor.queryValid?yasr.header.find(".saveAsDropDown").remove():0===e.length&&window.editor.queryValid&&yasr.updateDownloadDropdown()}}function N(t){return!(e.queryIsRunning&&!e.namespacesLoading)||(t?n.info("New tabs may not be opened while query or update is running."):n.info("Tabs may not be switched while query or update is running."),!1)}e.highlightNextTabChange=!1,e.$on("tabAction",(function(n,r){r.relatedTarget&&(t.cancel(r.relatedTarget.timer),$(r.relatedTarget).css("color",""),e.saveTab(R(r.relatedTarget))),e.loadTab(R(r.target));const o=["#ED4F2F","","#ED4F2F"],i=[400,400,400];if(e.highlightNextTabChange){e.highlightNextTabChange=!1;let n=0;$(r.target).css("color",o[n]);const a=function(){n++,n<o.length?($(r.target).css("color",o[n]),r.target.timer=t(a,i[n])):$(r.target).css("color","")};t(a,i[n])}})),e.$on("deleteAllexeptSelected",(function(t,n){e.tabsData=n,e.tabs=n})),e.currentQuery={},e.showSampleQueries=!1,e.savedQuery={},e.sampleQueries={},e.editQueryModal=A("#editQueryContainer"),e.deleteQueryModal=A("#confirmDeleteContainer"),e.saveQueryModal=A("#saveQueryContainer"),e.getResultsDescription=function(){let t;if(0===e.currentTabConfig.resultsCount)t="No results.";else{const n=(e.currentTabConfig.page-1)*e.currentTabConfig.pageSize+Math.min(e.currentTabConfig.resultsCount,e.currentTabConfig.pageSize);t="Showing results from "+s("currency")(e.currentTabConfig.offset,"",0)+" to "+s("currency")(n,"",0),e.currentTabConfig.allResultsCount>0&&(t+=e.currentTabConfig.allResultsCountExact?" of ":" of at least ",t+=s("currency")(e.currentTabConfig.allResultsCount,"",0)),t+="."}return t},e.getUpdateDescription=function(){return e.currentTabConfig.customUpdateMessage?e.currentTabConfig.customUpdateMessage:void 0===e.currentTabConfig.sizeDelta?"":e.currentTabConfig.sizeDelta<0?"Removed "+Math.abs(e.currentTabConfig.sizeDelta)+" statements.":e.currentTabConfig.sizeDelta>0?"Added "+e.currentTabConfig.sizeDelta+" statements.":"The number of statements did not change."},e.getStaleWarningMessage=function(){const t=60*Math.round((Date.now()-e.currentTabConfig.timeFinished)/6e4);if(t>=3600)return"Possibly stale result (obtained "+e.getHumanReadableSeconds(t)+" ago)."};const _=function(){};angular.element(u).bind("resize",_),e.$on("$destroy",(function(){angular.element(u).unbind("resize",_)}))}function o(e,t,n){n.queryExists&&(e.queryExists=!0),e.query=angular.copy(n.query),e.title=n.title,e.edit=n.edit,e.okButtonText=n.okButtonText,e.ok=function(){e.form.$valid&&t.close(e.query)},e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.core.directives.queryeditor.controllers",["graphdb.framework.utils.localstorageadapter","graphdb.framework.rest.sparql.service"]).controller("QueryEditorCtrl",r).controller("QuerySampleModalCtrl",o),r.$inject=["$scope","$timeout","toastr","$repositories","$modal","ModalService","SparqlRestService","$filter","$window","$jwtAuth","RDF4JRepositoriesRestService","MonitoringRestService","LocalStorageAdapter","LSKeys"],o.$inject=["$scope","$modalInstance","data"]}}]);
|
|
2
|
-
//# sourceMappingURL=49.71f6e0f6f3284bf63cab.bundle.js.map
|
|
@@ -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","forEach","tab","index","set","setLoader","isRunning","progressMessage","extraMessage","noTimer","yasrInnerContainer","angular","element","document","getElementById","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","isActiveRepoOntopType","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","sameAsBtn","inferenceBtn","disabled","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,EAAc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iO,WAAW,uBAAwBmF,GAExCpT,EAAgB6T,QAAU,CAAC,SAAU,WAAY,SAAU,gBAAiB,SAAU,eAAgB,oBAAqB,UAAW,UAAW,WAAY,+BAAgC,wBAAyB,sBAAuB,UAw3B7OT,EAAqBS,QAAU,CAAC,SAAU,iBAAkB","file":"49.71f6e0f6f3284bf63cab.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 $scope.tabs.forEach(function (tab, index) {\n if (tab.id === currentQueryTab.id) {\n $scope.tabs[index].query = currentQueryTab.query;\n $scope.tabs[index].inference = currentQueryTab.inference;\n $scope.tabs[index].sameAs = currentQueryTab.sameAs;\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 (data) {\n const msg = getError(data);\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 (data) {\n const msg = getError(data);\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 is disabled, In case of FedX repo nocount is overriden\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 $scope.currentQuery.inference = isOntop ? true : principal.appSettings.DEFAULT_INFERENCE;\n $scope.currentQuery.sameAs = isOntop ? true : principal.appSettings.DEFAULT_SAMEAS;\n }\n\n function handleSameAsAndInferenceBtns(isOntop) {\n const sameAsBtn = document.getElementById('sameAs');\n const inferenceBtn = document.getElementById('inference');\n\n sameAsBtn.disabled = !!(sameAsBtn && isOntop);\n inferenceBtn.disabled = !!(inferenceBtn && isOntop);\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":""}
|