graphdb-workbench 2.5.0-TR1 → 2.5.0-TR2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{0.8a2ce9646b78087ee8d5.bundle.js → 0.5cf9732a04e93f12731e.bundle.js} +1 -1
- package/dist/{10.87d69dcbb678eb017d9f.bundle.js → 10.eaecca674349ae64405b.bundle.js} +1 -1
- package/dist/108.7e527e2daa85d33a37e8.bundle.js +1 -0
- package/dist/{11.6eed30e27d3e87797f46.bundle.js → 11.00f9d1d1c4f991bc1ce4.bundle.js} +1 -1
- package/dist/{114.d577fb9878db595454b9.bundle.js → 114.2b3a6bb6ee773061303b.bundle.js} +1 -1
- package/dist/{117.467e62548d2cfc97dc4e.bundle.js → 117.7f5d816abf5b77ef3fbd.bundle.js} +1 -1
- package/dist/{12.684e3924524ec083514c.bundle.js → 12.8bb532c884a451e3f8fa.bundle.js} +2 -2
- package/dist/{124.4eba62fcc75057b1c2cd.bundle.js → 124.97257036d8794229c8fe.bundle.js} +1 -1
- package/dist/{128.e30b33b7db3e9d4c0807.bundle.js → 128.1f57f66c0e4398a2c115.bundle.js} +1 -1
- package/dist/{13.1914ded040724e7084a3.bundle.js → 13.96a152f024ccbd18a722.bundle.js} +1 -1
- package/dist/{130.03898700075c053f1da0.bundle.js → 130.8d0c570a8363e55b4892.bundle.js} +1 -1
- package/dist/{133.5c94ce3b0d29e2b6bf81.bundle.js → 133.c9432441d39dbdf45a46.bundle.js} +1 -1
- package/dist/{134.b6e0a5b639bd74a9bf33.bundle.js → 134.64ab677e16aa2b0c78b1.bundle.js} +1 -1
- package/dist/{136.1dae14fd2886c20f7c26.bundle.js → 136.22f6c4a19299925123a0.bundle.js} +1 -1
- package/dist/{138.dab019c29bc5eba28cd0.bundle.js → 138.6dccf89299df5ba81af2.bundle.js} +1 -1
- package/dist/14.e4d543000ac65753d253.bundle.js +1 -0
- package/dist/{144.abdb4b7d99aa88e11e4c.bundle.js → 144.d72be2c687a7d0249625.bundle.js} +1 -1
- package/dist/{146.87958778020f11da609e.bundle.js → 146.49a2b40691494c6a5486.bundle.js} +1 -1
- package/dist/{15.7f44e2d9c5fa8ddec358.bundle.js → 15.4c321cabb25d09b7c7d2.bundle.js} +1 -1
- package/dist/{150.22e2b067f545e64dd485.bundle.js → 150.2ce51c5750848ed010dc.bundle.js} +1 -1
- package/dist/{153.e797ad0c7e150c84f0d8.bundle.js → 153.f710bf5c73f7d736a4b1.bundle.js} +1 -1
- package/dist/{155.20fa01821db5148427f2.bundle.js → 155.46f2a94df187ed492591.bundle.js} +1 -1
- package/dist/{16.cc9d3a90ac69d93da51a.bundle.js → 16.6204732b58f59043436f.bundle.js} +1 -1
- package/dist/168.604316ed153524b052f3.bundle.js +1 -1
- package/dist/{17.8ad0f827f24eaa9b9235.bundle.js → 17.aedb44984ef305e0c70f.bundle.js} +1 -1
- package/dist/170.e191fb225ddb65024473.bundle.js +1 -0
- package/dist/173.ae711cba7e2c97fc73b5.bundle.js +1 -1
- package/dist/{18.3848b0ae0c5a64b97244.bundle.js → 18.488e471db34855b418d6.bundle.js} +2 -2
- package/dist/{19.6852479fbabf869e8a34.bundle.js → 19.21c59626445a9385699a.bundle.js} +1 -1
- package/dist/{2.d513e38bb30bcc94b0b8.bundle.js → 2.9a37e6579bbd99faa7df.bundle.js} +2 -2
- package/dist/{20.ea7a9e37933784499808.bundle.js → 20.7b83550ae0524adafae2.bundle.js} +1 -1
- package/dist/200.95c99f2cbcc8567cfafb.bundle.js +1 -1
- package/dist/{21.28e4367a15081fa5509e.bundle.js → 21.17e9bf36c5712302e4d3.bundle.js} +1 -1
- package/dist/{22.95bde4da51ed9cc67c2c.bundle.js → 22.cdc2663b96debbc6a65b.bundle.js} +2 -2
- package/dist/23.e54645da219284390374.bundle.js +1 -1
- package/dist/{24.ff95d974197c38fdf6de.bundle.js → 24.8ad805c765b343209036.bundle.js} +1 -1
- package/dist/{31.20b44039f4a26f4b8b8f.bundle.js → 25.1140a5ef5bf075c3491f.bundle.js} +2 -2
- package/dist/{25.075024f4d2dbb1ffc2d8.bundle.js → 26.d7177f34f8098990bcb3.bundle.js} +1 -1
- package/dist/{26.a0254b14fd5b89382ecd.bundle.js → 27.259ab6929d861a838a12.bundle.js} +1 -1
- package/dist/{27.7aab590febc0b18c99ea.bundle.js → 28.c1f0f131faa88af53758.bundle.js} +1 -1
- package/dist/{28.26b027df1246476fb97e.bundle.js → 29.4443dad5ba9aad14b478.bundle.js} +1 -1
- package/dist/{29.830ad0e2c46541581ec9.bundle.js → 30.bf3e693ce3351bce27eb.bundle.js} +1 -1
- package/dist/{30.94037e5f764e24e2e414.bundle.js → 31.163ee32806665a6dddc2.bundle.js} +1 -1
- package/dist/{32.40e988f74c315a0e8ac5.bundle.js → 32.299ae5cd6e71391a700b.bundle.js} +1 -1
- package/dist/33.3701773f9c0698ce5ae7.bundle.js +1 -0
- package/dist/{33.ef84d171e89aae3fda11.bundle.js → 34.38770b233efed1f35272.bundle.js} +1 -1
- package/dist/{34.04e9922baabd006f0b6a.bundle.js → 35.258b98e04cadda4357be.bundle.js} +1 -1
- package/dist/{35.a875748384ad3c8a44ef.bundle.js → 36.a8e153e08c2b12d049f0.bundle.js} +1 -1
- package/dist/{36.3c55e8a9c2160b6885c8.bundle.js → 37.1119f4daa657494b2dee.bundle.js} +1 -1
- package/dist/{37.96039a4ad1c088b016d0.bundle.js → 38.d15791426b51ee288dc5.bundle.js} +1 -1
- package/dist/{38.c69f9d8967f405c3bd43.bundle.js → 39.9efb9b21bd341c60d1e4.bundle.js} +1 -1
- package/dist/{4.e786ee254f00109e6e92.bundle.js → 4.bd56ee8cbc353164d400.bundle.js} +1 -1
- package/dist/{39.ea9f894be518351c03cc.bundle.js → 40.dd1047127a761d6c693c.bundle.js} +1 -1
- package/dist/{40.1fe72814f99ffeb51fd0.bundle.js → 41.c04dc34ce71145c5235b.bundle.js} +1 -1
- package/dist/42.54663aebeff19dc1a04b.bundle.js +1 -0
- package/dist/{42.5eb5c97ec7533b587e5b.bundle.js → 43.7fe7063c77cece5cf59e.bundle.js} +1 -1
- package/dist/{43.0837b1e9a428e4dde8a2.bundle.js → 44.73e88426aa1d3cc58091.bundle.js} +1 -1
- package/dist/{44.726c8daab9870e19a9a4.bundle.js → 45.2c7f65e05059e34ab746.bundle.js} +1 -1
- package/dist/{45.c748eed08dd120f34e7a.bundle.js → 46.95ac85b4987df292517e.bundle.js} +1 -1
- package/dist/{46.7394224fd7bde0e83c59.bundle.js → 47.801c3fb2b25e4e6dbbf5.bundle.js} +1 -1
- package/dist/{47.d4a63c708fcc3aa5f9e7.bundle.js → 48.ae955aa8fea59fb24b79.bundle.js} +1 -1
- package/dist/49.c0bffcf362b3538f7f42.bundle.js +1 -0
- package/dist/{5.1f97ab7c93d1d6bbbaaf.bundle.js → 5.adea5d522be945b9d8d3.bundle.js} +1 -1
- package/dist/{49.f7c442dec730bf71188a.bundle.js → 50.f82d79aa8e75c28b2c75.bundle.js} +1 -1
- package/dist/{50.1a859f31c02968721863.bundle.js → 51.14acfebcc61778b5045a.bundle.js} +1 -1
- package/dist/{51.b2417e306086dd6f9c58.bundle.js → 52.89e5fcc6a82e2e2d11cb.bundle.js} +1 -1
- package/dist/{52.09d4428375d1538b883d.bundle.js → 53.15d83110f5d1b6e0f021.bundle.js} +1 -1
- package/dist/{53.71ed9791d3fd7019334b.bundle.js → 54.058f9938d40042f017c0.bundle.js} +1 -1
- package/dist/{54.aaaa5baf70c0b701938c.bundle.js → 55.cdfe9e9734ec244dccf2.bundle.js} +1 -1
- package/dist/{55.32cdab6677fb19b90cce.bundle.js → 56.914a47bab6bf9c7e4d61.bundle.js} +1 -1
- package/dist/{56.254bfcb8d814d3e3759b.bundle.js → 57.de9b6f6789d80f1ee398.bundle.js} +1 -1
- package/dist/{57.0b4eaa43acf093de9ec5.bundle.js → 58.96b61554d69abf431857.bundle.js} +1 -1
- package/dist/{58.f85af8f862e02471553a.bundle.js → 59.7c3f6c5c030f93b69c00.bundle.js} +1 -1
- package/dist/{59.95cd5c267f4b6d4dcaed.bundle.js → 60.f848378894d660806d43.bundle.js} +1 -1
- package/dist/{60.6164ef0489a252a415a4.bundle.js → 61.0e2fc08f48e7a83de619.bundle.js} +1 -1
- package/dist/{61.f46e0fcc52884ef5be07.bundle.js → 62.31d980d635d5aa6cc42a.bundle.js} +1 -1
- package/dist/{62.189767fdd1fb0395b009.bundle.js → 63.95216588581bb1f62328.bundle.js} +1 -1
- package/dist/{63.ecc6c0f67c579d13ee67.bundle.js → 64.2d3b8812de9eb6d3bae7.bundle.js} +1 -1
- package/dist/{64.eb6e6040937f208bdb43.bundle.js → 65.bf364041da1c850b076d.bundle.js} +1 -1
- package/dist/{65.7554f0d43835dc6ea555.bundle.js → 66.69e4ab8673cdd0336061.bundle.js} +1 -1
- package/dist/{7.1c0bde1ff36bec0cab62.bundle.js → 7.8bf1a2c5b84a141e21a7.bundle.js} +2 -2
- package/dist/{72.4a57d178044fe2c11b72.bundle.js → 72.20d6c82cb7230ef10a0f.bundle.js} +1 -1
- package/dist/{75.27b46b06d2be61863ef3.bundle.js → 75.13e0f311c6c98067c4f8.bundle.js} +1 -1
- package/dist/{76.f8a3ef565854da38ea9e.bundle.js → 76.44bdcc2130c6a744bc55.bundle.js} +1 -1
- package/dist/{77.55c0024f4f2e60b87e30.bundle.js → 77.0373cd7f1c2851df3908.bundle.js} +1 -1
- package/dist/81.c350699b7e38b228dca3.bundle.js +1 -0
- package/dist/{83.5838bc112ddd23c54bdf.bundle.js → 83.ac30096c59d105a3d52a.bundle.js} +1 -1
- package/dist/{9.fb1b2ce8103077876f1a.bundle.js → 9.1e2a1467755135bb1717.bundle.js} +1 -1
- package/dist/{bundle.986982107cd13ca86335.bundle.js → bundle.4f4714a6ecd45bda1c44.bundle.js} +12 -12
- package/dist/css/bootstrap-graphdb-theme.css +0 -4
- package/dist/index.html +4 -4
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +14 -13
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/{main.ef1675ae9664feabc0d4.css → main.964fb6ea8405dc7f47ca.css} +1 -1
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +4 -4
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +11 -11
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +5 -5
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- 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/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-template-create.html +5 -5
- package/dist/pages/sparql.html +3 -3
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +27 -27
- package/package.json +1 -1
- package/dist/108.d94d772e6dd0625999b4.bundle.js +0 -1
- package/dist/14.1d5ac7dcef27b9afa3b1.bundle.js +0 -1
- package/dist/170.d3353f96b0bfc33175f4.bundle.js +0 -1
- package/dist/41.33bd300e0214b2e9d86f.bundle.js +0 -1
- package/dist/48.1e7be0e4fe6693a64811.bundle.js +0 -1
- package/dist/66.b7aa9c231089ed35bd28.bundle.js +0 -1
- package/dist/81.6f01e116a287be03e0c8.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{133:function(t,e,n){"use strict";n.r(e);n(6),n(26);const r="UPLOADING",i="PENDING",s="ERROR",a="DONE",o="NONE",l=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.uriutils","graphdb.framework.guides.services"]);l.controller("CommonCtrl",["$scope","$http","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService",function(t,e,n,r,i,o,l,c,u,p,f,m,d){t.files=[],t.fileChecked={},t.checkAll=!1,t.popoverTemplateUrl="settingsPopoverTemplate.html",t.fileQuery="",t.getAppData=function(){f.getInfo().success((function(e){t.appData={},t.appData.properties={};for(let n=0;n<e.length;n++)t.appData.properties[e[n].key]={source:e[n].source,value:e[n].value};t.maxUploadFileSizeMB=t.appData.properties["graphdb.workbench.maxUploadSize"].value/1048576})).error((function(t){const e=getError(t);n.error(e,p.instant("common.error"))}))},t.getAppData(),t.fileFormats=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];{const e=_.map(t.fileFormats,(function(t){return"."+t+".gz"})),n=_.map(t.fileFormats,(function(t){return"."+t}));t.fileFormatsExtended=_.reduce(_.union(e,n,[".zip"]),(function(t,e){return t+", "+e})),t.fileFormatsHuman=_.reduce(n,(function(t,e){return t+" "+e}))+p.instant("import.gz.zip"),t.textFileFormatsHuman=_.reduce(_.filter(n,(function(t){return".brf"!==t})),(function(t,e){return t+" "+e}))}t.updateListHttp=function(r){e({method:"GET",url:t.getBaseUrl()}).success((function(e){0===t.files.length||r?(t.files=e,_.forEach(t.files,(function(e){e.type||(e.type=t.defaultType)})),t.rebatch()):t.files.forEach((function(n){const r=_.find(e,_.matches({name:n.name}));n.status&&r&&_.assign(n,r),n.type||(n.type=t.defaultType)})),r&&"user"===t.viewType&&(t.files=_.filter(t.files,(function(t){return void 0!==t.status}))),t.showClearStatuses=_.filter(t.files,(function(t){return t.status===a||t.status===s})).length>0,t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),t.loader=!1})).error((function(e){n.warning(p.instant("import.error.could.not.get.files",{data:getError(e)})),t.loader=!1}))},t.$watch((function(){return $(t.tabId).is(":visible")}),(function(){$(t.tabId).is(":visible")&&(t.updateListHttp(!1),u.hash(t.viewType))})),t.updateList=function(e){t.canWriteActiveRepo()&&$(t.tabId).is(":visible")&&t.updateListHttp(e)},t.init=function(){t.setRestricted(),t.isRestricted||(t.updateList(!0),t.getSettings())},t.$on("repositoryIsSet",t.init),t.pullList=function(){const e=r((function(){t.updating||t.updateList(!1)}),4e3);t.$on("$destroy",(function(){r.cancel(e)}))},t.getVisibleFiles=function(){return l("filter")(t.files,{name:t.fileQuery,type:t.getTypeFilter()})},t.getTypeFilter=function(){return"server"!==t.viewType||"file"!==t.showItems&&"directory"!==t.showItems?"":t.showItems},t.selectAllFiles=function(){t.getVisibleFiles().forEach((function(e){t.fileChecked[e.name]=t.checkAll&&t.importable(e)}))},t.getSettingsFor=function(e,n){return n||_.isEmpty(e)||_.isEmpty(t.savedSettings[e])?angular.copy(t.defaultSettings):t.savedSettings[e]},t.setSettingsFor=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n);const r={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalCtrl",resolve:{settings:function(){return angular.copy(t.settings)},hasParserSettings:t.isLocalLocation,defaultSettings:function(){return t.defaultSettings},isMultiple:function(){return!e}},size:"lg"};m.isActive()&&(r.backdrop="static",r.keyboard=!1);o.open(r).result.then((function(e){t.settings=e,""===t.settingsFor?t.importSelected():t.importFile(t.settingsFor,!0)}),(function(e){t.settings=e}))},t.updateImport=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n),t.importFile(e,!1)},t.stopImport=function(r){e({method:"DELETE",url:t.getBaseUrl(),params:{name:r.name,type:r.type}}).success((function(){t.updateList()})).error((function(t){n.warning(p.instant("import.error.could.not.stop",{data:getError(t)}))}))},t.importable=function(){return!0},t.hasImportable=function(){return _.filter(t.files,(function(e){return t.importable(e)})).length>0},t.showTable=function(){const e=t.files.length>0&&("user"===t.viewType||"server"===t.viewType);return t.checkAll&&t.switchBatch(!0),e},t.switchBatch=function(e){e?t.selectAllFiles():t.checkAll&&(t.checkAll=!1),t.batch=_.map(_.filter(t.files,(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name").length>0},t.rebatch=function(){const e={};t.batch=!1,_.each(t.files,(function(n){e[n.name]=t.fileChecked[n.name],t.batch|=t.fileChecked[n.name]})),t.batch||(t.checkAll=!1),t.fileChecked=e},t.getSelectedFiles=function(){return _.map(_.filter(t.getVisibleFiles(),(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name")},t.importSelected=function(e){const n=t.getSelectedFiles(),r=function(){const i=n.shift();i&&(e&&(t.settings=t.getSettingsFor(i)),t.importFile(i,!0,r))};r()};const g=function(r,i){e({method:"DELETE",url:t.getBaseUrl()+"/status",params:{remove:i},data:r,headers:{"Content-type":"application/json;charset=utf-8"}}).success((function(){t.updateList(!0)})).error((function(t){n.warning(p.instant("import.error.could.not.clear",{data:getError(t)}))}))};t.resetStatus=function(t){g(t,!1)},t.resetStatusSelected=function(){t.resetStatus(t.getSelectedFiles())},t.removeEntry=function(t=[]){d.openConfirmation(p.instant("common.confirm"),p.instant("import.remove.confirm.msg",{name:t.join(", ")}),()=>{g(t,!0)})},t.removeEntrySelected=function(){t.removeEntry(t.getSelectedFiles())},t.isLocalLocation=function(){const t=i.getActiveLocation();return t&&t.local},t.filterSettings=function(e){let n=_.omitBy(t.savedSettings[e],_.isNull);return n=_.omit(n,["repoLocationHash","status","message","name","data","type","format","fileNames","$$hashKey"]),_.map(_.keys(n),(function(t){return[t,n[t]]}))},t.getSettings=function(){t.canWriteActiveRepo()&&e({method:"GET",url:"rest/repositories/"+i.getActiveRepository()+"/import/settings/default"}).success((function(e){t.defaultSettings=e})).error((function(t){n.warning(p.instant("import.error.default.settings",{data:getError(t)}))}))},t.getBaseUrl=function(){return"rest/repositories/"+i.getActiveRepository()+"/import/"+t.viewUrl},t.pritifySettings=function(t){return JSON.stringify(t,null," ")},t.toTitleCase=function(t){return t?_.upperFirst(t.toLowerCase()):t}}]),l.controller("ImportCtrl",["$scope","$http","toastr","$controller","$translate",function(t,e,n,r,i){t.loader=!0,angular.extend(this,r("CommonCtrl",{$scope:t})),t.viewUrl="server",t.defaultType="server",t.tabId="#import-server",t.showItems="all",t.pullList();const s=function(r,s){t.canWriteActiveRepo()&&e({method:"POST",url:t.getBaseUrl(),data:{importSettings:s?null:t.settings,fileNames:r}}).success((function(){t.updateList(),t.batch=!1,t.fileChecked={}})).error((function(t){n.error(i.instant("import.could.not.send.file",{data:getError(t)}))}))};t.importSelected=function(e){const n=t.getSelectedFiles();s(n,e)},t.importFile=function(t){s([t])},t.init()}]),l.controller("UploadCtrl",["$scope","Upload","$http","toastr","$controller","$uibModal","$translate",function(t,e,n,a,l,c,u){t.loader=!0,angular.extend(this,l("CommonCtrl",{$scope:t})),t.viewUrl="upload",t.defaultType="file",t.tabId="#import-user",t.pullList(),t.currentFiles=[],t.importable=function(){return!0},t.fileSelected=function(t,e,n,r,i){i.length>0&&i.forEach((function(t){a.warning(u.instant("import.large.file",{name:t.name,size:Math.floor(t.size/1048576)}))}))},t.$watchCollection("currentFiles",(function(){t.currentFiles&&t.currentFiles.forEach((function(e){if("bz2"===e.name.substr(e.name.lastIndexOf(".")+1)){const n=t.currentFiles.indexOf(e);n>-1&&t.currentFiles.splice(n,1),a.error(u.instant("import.could.not.upload",{name:e.name}))}})),t.files=_.uniqBy(_.union(_.map(t.currentFiles,(function(t){return{name:t.name,type:"file",file:t}})),t.files),(function(t){return t.name})),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),_.each(t.currentFiles,(function(e){t.updateImport(e.name)}))})),t.importFile=function(o,l,c){const p=_.findIndex(t.files,{name:o});if(p<0)a.warning(u.instant("import.no.such.file",{name:o}));else{const o=t.files[p];if("text"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/text",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.data",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){});else if("url"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/url",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.url",{data:getError(t)}))})).finally(c||function(){});else{let n;t.settings.name=o.name,n=o.file?{file:o.file,importSettings:e.jsonBlob(t.settings)}:{importSettings:e.jsonBlob(t.settings)},e.upload({url:t.getBaseUrl()+(l?"":"/update")+"/file",data:n}).progress((function(t){if(o.file?(o.file=null,o.status=r):o.status!==r&&(o.status=i),o.status===r){const e=parseInt(100*t.loaded/t.total);o.message=e+"% uploaded"}})).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.upload.file",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){})}}},t.updateTextImport=function(e){t.updating=!0,n({method:"POST",url:t.getBaseUrl()+"/update/text",data:e}).success((function(t){})).error((function(t){a.error(u.instant("import.could.not.update.text",{data:getError(t)}))})).finally((function(){t.updating=!1}))},t.pastedDataIdx=1;const p=function(){const t=new Date;return t.getFullYear()+"-"+_.padStart(t.getMonth()+1,2,"0")+"-"+_.padStart(t.getDate(),2,"0")+" "+_.padStart(t.getHours(),2,"0")+":"+_.padStart(t.getMinutes(),2,"0")+":"+_.padStart(t.getSeconds(),2,"0")+"."+_.padStart(t.getMilliseconds(),3,"0")};t.pasteData=function(e){e&&e.data;c.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"TextCtrl",resolve:{text:function(){return e?e.data:""},format:function(){return e?e.format:"text/turtle"}}}).result.then((function(n){e?(e.data===n.text&&e.format===n.format||e.status===o||(e.status=o,e.message=u.instant("import.text.snippet.not.imported")),e.data=n.text,e.format=n.format,t.updateTextImport(e)):(e={type:"text",name:"Text snippet "+p(),format:n.format,data:n.text},t.files.unshift(e),t.updateImport(e.name)),n.startImport&&t.setSettingsFor(e.name)}))},t.rdfDataFromURL=function(){c.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"UrlCtrl",scope:t}).result.then((function(e){const n=_.find(t.files,{type:"url",name:e.url});n?n.format=e.format:t.files.unshift({type:"url",name:e.url,format:e.format,data:e.url}),t.updateImport(e.url,!0),e.startImport&&t.setSettingsFor(e.url,!0)}))},t.init()}]),l.controller("UrlCtrl",["$scope","$uibModalInstance","toastr",function(t,e){t.importFormat={name:"Auto",type:""},t.startImport=!0,t.cancel=function(){e.dismiss()},t.ok=function(){e.close({url:t.dataUrl,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TextCtrl",["$scope","$uibModalInstance","text","format",function(t,e,n,r){t.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],t.rdfText=n,t.importFormat=_.find(t.importFormats,{type:r}),t.startImport=!0,t.setFormat=function(e){t.importFormat=e},t.cancel=function(){e.dismiss()},t.ok=function(){e.close({text:t.rdfText,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TabCtrl",["$scope","$location",function(t,e){t.viewType=e.hash(),"user"!==t.viewType&&"server"!==t.viewType&&(t.viewType="user"),t.isCollapsed=!1,"user"===t.viewType?t.templateUrl="js/angular/import/templates/uploadInfo.html":t.templateUrl="js/angular/import/templates/importInfo.html",t.changeHelpTemplate=function(e){t.templateUrl="js/angular/import/templates/"+e},t.commonUrl="js/angular/import/templates/commonInfo.html"}]),l.controller("SettingsModalCtrl",["$scope","$uibModalInstance","toastr","UriUtils","settings","hasParserSettings","defaultSettings","isMultiple","$translate",function(t,e,n,r,i,s,a,o,l){t.hasError=function(t,e){return _.find(t,(function(t){return e===t.$name}))},t.settings=i,t.hasParserSettings=s,t.settings.context?"default"===t.settings.context?(t.target="default",t.settings.context=""):t.target="named":t.target="data",t.isMultiple=o,t.enableReplace=!(!t.settings.replaceGraphs||!t.settings.replaceGraphs.length);const c=function(){"default"===t.target?t.settings.context="default":"data"===t.target&&(t.settings.context=""),t.enableReplace?"default"!==t.target&&"named"!==t.target||(t.settings.replaceGraphs=[t.settings.context]):t.settings.replaceGraphs=[]};t.ok=function(){t.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),t.settingsForm.$valid&&(c(),e.close(t.settings))},t.cancel=function(){c(),e.dismiss(t.settings)},t.reset=function(){t.settings=angular.copy(a),t.target="data"},t.addReplaceGraph=function(e){let i=!0;"default"!==e&&(i=r.isValidIri(e)),t.settingsForm.replaceGraph.$setTouched(),t.settingsForm.replaceGraph.$setValidity("replaceGraph",i),t.settingsForm.replaceGraph.$valid&&(t.settings.replaceGraphs=t.settings.replaceGraphs||[],-1===_.indexOf(t.settings.replaceGraphs,e)?(t.replaceGraph="",t.settings.replaceGraphs.push(e)):n.warning(l.instant("import.graph.already.in.list")))},t.checkEnterReplaceGraph=function(e,n){13===e.keyCode&&(e.preventDefault(),t.addReplaceGraph(n))},t.showAdvancedSettings=!1,t.switchParserSettings=function(){t.showAdvancedSettings=!t.showAdvancedSettings}}])}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{133:function(t,e,n){"use strict";n.r(e);n(7),n(26);const r="UPLOADING",i="PENDING",s="ERROR",a="DONE",o="NONE",l=angular.module("graphdb.framework.impex.import.controllers",["ui.bootstrap","toastr","graphdb.framework.core.services.repositories","graphdb.framework.utils.uriutils","graphdb.framework.guides.services"]);l.controller("CommonCtrl",["$scope","$http","toastr","$interval","$repositories","$uibModal","$filter","$jwtAuth","$location","$translate","LicenseRestService","GuidesService","ModalService",function(t,e,n,r,i,o,l,c,u,p,f,m,d){t.files=[],t.fileChecked={},t.checkAll=!1,t.popoverTemplateUrl="settingsPopoverTemplate.html",t.fileQuery="",t.getAppData=function(){f.getInfo().success((function(e){t.appData={},t.appData.properties={};for(let n=0;n<e.length;n++)t.appData.properties[e[n].key]={source:e[n].source,value:e[n].value};t.maxUploadFileSizeMB=t.appData.properties["graphdb.workbench.maxUploadSize"].value/1048576})).error((function(t){const e=getError(t);n.error(e,p.instant("common.error"))}))},t.getAppData(),t.fileFormats=["ttl","ttls","rdf","rj","n3","nt","nq","trig","trigs","trix","brf","owl","jsonld","xml","rdfs","ndjsonld","ndjson","jsonl"];{const e=_.map(t.fileFormats,(function(t){return"."+t+".gz"})),n=_.map(t.fileFormats,(function(t){return"."+t}));t.fileFormatsExtended=_.reduce(_.union(e,n,[".zip"]),(function(t,e){return t+", "+e})),t.fileFormatsHuman=_.reduce(n,(function(t,e){return t+" "+e}))+p.instant("import.gz.zip"),t.textFileFormatsHuman=_.reduce(_.filter(n,(function(t){return".brf"!==t})),(function(t,e){return t+" "+e}))}t.updateListHttp=function(r){e({method:"GET",url:t.getBaseUrl()}).success((function(e){0===t.files.length||r?(t.files=e,_.forEach(t.files,(function(e){e.type||(e.type=t.defaultType)})),t.rebatch()):t.files.forEach((function(n){const r=_.find(e,_.matches({name:n.name}));n.status&&r&&_.assign(n,r),n.type||(n.type=t.defaultType)})),r&&"user"===t.viewType&&(t.files=_.filter(t.files,(function(t){return void 0!==t.status}))),t.showClearStatuses=_.filter(t.files,(function(t){return t.status===a||t.status===s})).length>0,t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),t.loader=!1})).error((function(e){n.warning(p.instant("import.error.could.not.get.files",{data:getError(e)})),t.loader=!1}))},t.$watch((function(){return $(t.tabId).is(":visible")}),(function(){$(t.tabId).is(":visible")&&(t.updateListHttp(!1),u.hash(t.viewType))})),t.updateList=function(e){t.canWriteActiveRepo()&&$(t.tabId).is(":visible")&&t.updateListHttp(e)},t.init=function(){t.setRestricted(),t.isRestricted||(t.updateList(!0),t.getSettings())},t.$on("repositoryIsSet",t.init),t.pullList=function(){const e=r((function(){t.updating||t.updateList(!1)}),4e3);t.$on("$destroy",(function(){r.cancel(e)}))},t.getVisibleFiles=function(){return l("filter")(t.files,{name:t.fileQuery,type:t.getTypeFilter()})},t.getTypeFilter=function(){return"server"!==t.viewType||"file"!==t.showItems&&"directory"!==t.showItems?"":t.showItems},t.selectAllFiles=function(){t.getVisibleFiles().forEach((function(e){t.fileChecked[e.name]=t.checkAll&&t.importable(e)}))},t.getSettingsFor=function(e,n){return n||_.isEmpty(e)||_.isEmpty(t.savedSettings[e])?angular.copy(t.defaultSettings):t.savedSettings[e]},t.setSettingsFor=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n);const r={templateUrl:"js/angular/import/templates/settingsModal.html",controller:"SettingsModalCtrl",resolve:{settings:function(){return angular.copy(t.settings)},hasParserSettings:t.isLocalLocation,defaultSettings:function(){return t.defaultSettings},isMultiple:function(){return!e}},size:"lg"};m.isActive()&&(r.backdrop="static",r.keyboard=!1);o.open(r).result.then((function(e){t.settings=e,""===t.settingsFor?t.importSelected():t.importFile(t.settingsFor,!0)}),(function(e){t.settings=e}))},t.updateImport=function(e,n){t.settingsFor=e,t.settings=t.getSettingsFor(e,n),t.importFile(e,!1)},t.stopImport=function(r){e({method:"DELETE",url:t.getBaseUrl(),params:{name:r.name,type:r.type}}).success((function(){t.updateList()})).error((function(t){n.warning(p.instant("import.error.could.not.stop",{data:getError(t)}))}))},t.importable=function(){return!0},t.hasImportable=function(){return _.filter(t.files,(function(e){return t.importable(e)})).length>0},t.showTable=function(){const e=t.files.length>0&&("user"===t.viewType||"server"===t.viewType);return t.checkAll&&t.switchBatch(!0),e},t.switchBatch=function(e){e?t.selectAllFiles():t.checkAll&&(t.checkAll=!1),t.batch=_.map(_.filter(t.files,(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name").length>0},t.rebatch=function(){const e={};t.batch=!1,_.each(t.files,(function(n){e[n.name]=t.fileChecked[n.name],t.batch|=t.fileChecked[n.name]})),t.batch||(t.checkAll=!1),t.fileChecked=e},t.getSelectedFiles=function(){return _.map(_.filter(t.getVisibleFiles(),(function(e){return t.fileChecked[e.name]&&t.importable(e)})),"name")},t.importSelected=function(e){const n=t.getSelectedFiles(),r=function(){const i=n.shift();i&&(e&&(t.settings=t.getSettingsFor(i)),t.importFile(i,!0,r))};r()};const g=function(r,i){e({method:"DELETE",url:t.getBaseUrl()+"/status",params:{remove:i},data:r,headers:{"Content-type":"application/json;charset=utf-8"}}).success((function(){t.updateList(!0)})).error((function(t){n.warning(p.instant("import.error.could.not.clear",{data:getError(t)}))}))};t.resetStatus=function(t){g(t,!1)},t.resetStatusSelected=function(){t.resetStatus(t.getSelectedFiles())},t.removeEntry=function(t=[]){d.openConfirmation(p.instant("common.confirm"),p.instant("import.remove.confirm.msg",{name:t.join(", ")}),()=>{g(t,!0)})},t.removeEntrySelected=function(){t.removeEntry(t.getSelectedFiles())},t.isLocalLocation=function(){const t=i.getActiveLocation();return t&&t.local},t.filterSettings=function(e){let n=_.omitBy(t.savedSettings[e],_.isNull);return n=_.omit(n,["repoLocationHash","status","message","name","data","type","format","fileNames","$$hashKey"]),_.map(_.keys(n),(function(t){return[t,n[t]]}))},t.getSettings=function(){t.canWriteActiveRepo()&&e({method:"GET",url:"rest/repositories/"+i.getActiveRepository()+"/import/settings/default"}).success((function(e){t.defaultSettings=e})).error((function(t){n.warning(p.instant("import.error.default.settings",{data:getError(t)}))}))},t.getBaseUrl=function(){return"rest/repositories/"+i.getActiveRepository()+"/import/"+t.viewUrl},t.pritifySettings=function(t){return JSON.stringify(t,null," ")},t.toTitleCase=function(t){return t?_.upperFirst(t.toLowerCase()):t}}]),l.controller("ImportCtrl",["$scope","$http","toastr","$controller","$translate",function(t,e,n,r,i){t.loader=!0,angular.extend(this,r("CommonCtrl",{$scope:t})),t.viewUrl="server",t.defaultType="server",t.tabId="#import-server",t.showItems="all",t.pullList();const s=function(r,s){t.canWriteActiveRepo()&&e({method:"POST",url:t.getBaseUrl(),data:{importSettings:s?null:t.settings,fileNames:r}}).success((function(){t.updateList(),t.batch=!1,t.fileChecked={}})).error((function(t){n.error(i.instant("import.could.not.send.file",{data:getError(t)}))}))};t.importSelected=function(e){const n=t.getSelectedFiles();s(n,e)},t.importFile=function(t){s([t])},t.init()}]),l.controller("UploadCtrl",["$scope","Upload","$http","toastr","$controller","$uibModal","$translate",function(t,e,n,a,l,c,u){t.loader=!0,angular.extend(this,l("CommonCtrl",{$scope:t})),t.viewUrl="upload",t.defaultType="file",t.tabId="#import-user",t.pullList(),t.currentFiles=[],t.importable=function(){return!0},t.fileSelected=function(t,e,n,r,i){i.length>0&&i.forEach((function(t){a.warning(u.instant("import.large.file",{name:t.name,size:Math.floor(t.size/1048576)}))}))},t.$watchCollection("currentFiles",(function(){t.currentFiles&&t.currentFiles.forEach((function(e){if("bz2"===e.name.substr(e.name.lastIndexOf(".")+1)){const n=t.currentFiles.indexOf(e);n>-1&&t.currentFiles.splice(n,1),a.error(u.instant("import.could.not.upload",{name:e.name}))}})),t.files=_.uniqBy(_.union(_.map(t.currentFiles,(function(t){return{name:t.name,type:"file",file:t}})),t.files),(function(t){return t.name})),t.savedSettings=_.mapKeys(_.filter(t.files,"parserSettings"),"name"),_.each(t.currentFiles,(function(e){t.updateImport(e.name)}))})),t.importFile=function(o,l,c){const p=_.findIndex(t.files,{name:o});if(p<0)a.warning(u.instant("import.no.such.file",{name:o}));else{const o=t.files[p];if("text"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/text",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.data",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){});else if("url"===o.type)t.settings.name=o.name,t.settings.type=o.type,t.settings.data=o.data,t.settings.format=o.format,o.status=i,n({method:"POST",url:t.getBaseUrl()+(l?"":"/update")+"/url",data:t.settings}).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.send.url",{data:getError(t)}))})).finally(c||function(){});else{let n;t.settings.name=o.name,n=o.file?{file:o.file,importSettings:e.jsonBlob(t.settings)}:{importSettings:e.jsonBlob(t.settings)},e.upload({url:t.getBaseUrl()+(l?"":"/update")+"/file",data:n}).progress((function(t){if(o.file?(o.file=null,o.status=r):o.status!==r&&(o.status=i),o.status===r){const e=parseInt(100*t.loaded/t.total);o.message=e+"% uploaded"}})).success((function(){t.updateList()})).error((function(t){a.error(u.instant("import.could.not.upload.file",{data:getError(t)})),o.status=s,o.message=getError(t)})).finally(c||function(){})}}},t.updateTextImport=function(e){t.updating=!0,n({method:"POST",url:t.getBaseUrl()+"/update/text",data:e}).success((function(t){})).error((function(t){a.error(u.instant("import.could.not.update.text",{data:getError(t)}))})).finally((function(){t.updating=!1}))},t.pastedDataIdx=1;const p=function(){const t=new Date;return t.getFullYear()+"-"+_.padStart(t.getMonth()+1,2,"0")+"-"+_.padStart(t.getDate(),2,"0")+" "+_.padStart(t.getHours(),2,"0")+":"+_.padStart(t.getMinutes(),2,"0")+":"+_.padStart(t.getSeconds(),2,"0")+"."+_.padStart(t.getMilliseconds(),3,"0")};t.pasteData=function(e){e&&e.data;c.open({templateUrl:"js/angular/import/templates/textSnippet.html",controller:"TextCtrl",resolve:{text:function(){return e?e.data:""},format:function(){return e?e.format:"text/turtle"}}}).result.then((function(n){e?(e.data===n.text&&e.format===n.format||e.status===o||(e.status=o,e.message=u.instant("import.text.snippet.not.imported")),e.data=n.text,e.format=n.format,t.updateTextImport(e)):(e={type:"text",name:"Text snippet "+p(),format:n.format,data:n.text},t.files.unshift(e),t.updateImport(e.name)),n.startImport&&t.setSettingsFor(e.name)}))},t.rdfDataFromURL=function(){c.open({templateUrl:"js/angular/import/templates/urlImport.html",controller:"UrlCtrl",scope:t}).result.then((function(e){const n=_.find(t.files,{type:"url",name:e.url});n?n.format=e.format:t.files.unshift({type:"url",name:e.url,format:e.format,data:e.url}),t.updateImport(e.url,!0),e.startImport&&t.setSettingsFor(e.url,!0)}))},t.init()}]),l.controller("UrlCtrl",["$scope","$uibModalInstance","toastr",function(t,e){t.importFormat={name:"Auto",type:""},t.startImport=!0,t.cancel=function(){e.dismiss()},t.ok=function(){e.close({url:t.dataUrl,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TextCtrl",["$scope","$uibModalInstance","text","format",function(t,e,n,r){t.importFormats=[{name:"RDF/JSON",type:"application/rdf+json"},{name:"JSON-LD",type:"application/ld+json"},{name:"NDJSON-LD",type:"application/x-ld+ndjson"},{name:"RDF/XML",type:"application/rdf+xml"},{name:"N3",type:"text/rdf+n3"},{name:"N-Triples",type:"text/plain"},{name:"N-Quads",type:"text/x-nquads"},{name:"Turtle",type:"text/turtle"},{name:"Turtle*",type:"application/x-turtlestar"},{name:"TriX",type:"application/trix"},{name:"TriG",type:"application/x-trig"},{name:"TriG*",type:"application/x-trigstar"}],t.rdfText=n,t.importFormat=_.find(t.importFormats,{type:r}),t.startImport=!0,t.setFormat=function(e){t.importFormat=e},t.cancel=function(){e.dismiss()},t.ok=function(){e.close({text:t.rdfText,format:t.importFormat.type,startImport:t.startImport})}}]),l.controller("TabCtrl",["$scope","$location",function(t,e){t.viewType=e.hash(),"user"!==t.viewType&&"server"!==t.viewType&&(t.viewType="user"),t.isCollapsed=!1,"user"===t.viewType?t.templateUrl="js/angular/import/templates/uploadInfo.html":t.templateUrl="js/angular/import/templates/importInfo.html",t.changeHelpTemplate=function(e){t.templateUrl="js/angular/import/templates/"+e},t.commonUrl="js/angular/import/templates/commonInfo.html"}]),l.controller("SettingsModalCtrl",["$scope","$uibModalInstance","toastr","UriUtils","settings","hasParserSettings","defaultSettings","isMultiple","$translate",function(t,e,n,r,i,s,a,o,l){t.hasError=function(t,e){return _.find(t,(function(t){return e===t.$name}))},t.settings=i,t.hasParserSettings=s,t.settings.context?"default"===t.settings.context?(t.target="default",t.settings.context=""):t.target="named":t.target="data",t.isMultiple=o,t.enableReplace=!(!t.settings.replaceGraphs||!t.settings.replaceGraphs.length);const c=function(){"default"===t.target?t.settings.context="default":"data"===t.target&&(t.settings.context=""),t.enableReplace?"default"!==t.target&&"named"!==t.target||(t.settings.replaceGraphs=[t.settings.context]):t.settings.replaceGraphs=[]};t.ok=function(){t.settingsForm.replaceGraph.$setValidity("replaceGraph",!0),t.settingsForm.$valid&&(c(),e.close(t.settings))},t.cancel=function(){c(),e.dismiss(t.settings)},t.reset=function(){t.settings=angular.copy(a),t.target="data"},t.addReplaceGraph=function(e){let i=!0;"default"!==e&&(i=r.isValidIri(e,e.toString())),t.settingsForm.replaceGraph.$setTouched(),t.settingsForm.replaceGraph.$setValidity("replaceGraph",i),t.settingsForm.replaceGraph.$valid&&(t.settings.replaceGraphs=t.settings.replaceGraphs||[],-1===_.indexOf(t.settings.replaceGraphs,e)?(t.replaceGraph="",t.settings.replaceGraphs.push(e)):n.warning(l.instant("import.graph.already.in.list")))},t.checkEnterReplaceGraph=function(e,n){13===e.keyCode&&(e.preventDefault(),t.addReplaceGraph(n))},t.showAdvancedSettings=!1,t.switchParserSettings=function(){t.showAdvancedSettings=!t.showAdvancedSettings}}])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{116:function(t,e,i){"use strict";i.r(e);i(7),i(26);const r=angular.module("graphdb.framework.impex.import.directives",["graphdb.framework.utils.uriutils"]);r.directive("validateUri",["UriUtils",function(t){return{restrict:"A",require:"ngModel",link:function(e,i,r,n){n.$parsers.unshift((function(i){let r=!0;return"named"===e.target&&(r=t.isValidIri(i,i.toString())),n.$setValidity("validateUri",r),i}))}}}]),r.directive("filesTable",(function(){return{restrict:"A",templateUrl:"js/angular/import/templates/filesTable.html"}})),r.directive("filesOntoLoader",(function(){return{link:function(t,e,i){t.$watch("file.status",(function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+i.size+'" height="'+i.size+'" data="js/angular/templates/loader/ot-loader.svg?v=2.5.0-TR2">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{134:function(e,r,t){"use strict";t.r(r);t(6),t(24),t(36),t(37);var s=t(4);const n=function(e){return e.location?`${e.id}@${e.location}`:e.id},o=angular.module("graphdb.framework.security.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.jwtauth","graphdb.framework.core.services.openIDService","graphdb.framework.rest.security.service","toastr","ngTagsInput"]),i=function(e){let r=s.UserType.USER;const t={READ_REPO:{},WRITE_REPO:{}},n={},o=[];for(let i=0;i<e.length;i++){const a=e[i];if(a===s.UserRole.ROLE_ADMIN)r=s.UserType.ADMIN;else if(a===s.UserRole.ROLE_REPO_MANAGER)r!==s.UserType.ADMIN&&(r=s.UserType.REPO_MANAGER);else if(a===s.UserRole.ROLE_USER)r=s.UserType.USER;else if(0===a.indexOf("READ_REPO_")||0===a.indexOf("WRITE_REPO_")){const e=a.indexOf("_",a.indexOf("_")+1),r=a.substr(0,e),s=a.substr(e+1);t[r][s]=!0,n[s]=n[s]||{},"READ_REPO"===r?n[s].read=!0:"WRITE_REPO"===r&&(n[s].write=!0)}else 0===a.indexOf("CUSTOM_")&&o.push(a.substr("CUSTOM_".length))}return{userType:r,userTypeDescription:s.UserUtils.getUserRoleName(r),grantedAuthorities:t,repositories:n,customRoles:o}};o.controller("LoginCtrl",["$scope","$http","toastr","$jwtAuth","$openIDAuth","$location","$rootScope","$translate",function(e,r,t,s,n,o,i,a){e.username="",e.password="",s.reinitializeSecurity(),e.loginWithOpenID=function(){s.loginOpenID()},o.search().noaccess?t.error(a.instant("security.no.rights.config.error"),a.instant("security.login.error")):o.search().expired&&t.error(a.instant("security.auth.token.expired"),a.instant("security.login.error")),e.isGDBLoginEnabled=function(){return s.passwordLoginEnabled},e.isOpenIDEnabled=function(){return s.openIDEnabled},e.login=function(){return r({method:"POST",url:"rest/login",data:{username:e.username,password:e.password}}).success((function(e,r,t){s.authenticate(e,t("Authorization")).then(()=>{i.returnToUrl?o.url(i.returnToUrl):o.path("/")})})).error((function(r,s){if(401===s)t.error(a.instant("security.wrong.credentials"),a.instant("common.error")),e.wrongCredentials=!0,e.username="",e.password="";else{const e=getError(r);t.error(e,s)}}))}}]),o.controller("UsersCtrl",["$scope","$uibModal","toastr","$window","$jwtAuth","$timeout","ModalService","SecurityRestService","$translate",function(e,r,t,s,o,a,u,c,p){e.loader=!0,e.securityEnabled=function(){return o.isSecurityEnabled()},e.hasExternalAuth=function(){return o.hasExternalAuth()},e.getAuthImplementation=function(){return o.getAuthImplementation()},e.freeAccessEnabled=function(){return o.isFreeAccessEnabled()},e.getUsers=function(){c.getUsers().success((function(r){e.users=r;for(let r=0;r<e.users.length;r++){const t=i(e.users[r].grantedAuthorities);e.users[r].userType=t.userType,e.users[r].userTypeDescription=t.userTypeDescription,e.users[r].repositories=t.repositories,e.users[r].customRoles=t.customRoles}e.loader=!1})).error((function(r){const s=getError(r);t.error(s,p.instant("common.error")),e.loader=!1}))},e.getUsers(),e.$on("repositoryIsSet",(function(){e.getUsers()})),e.toggleSecurity=function(){if(o.toggleSecurity(!o.isSecurityEnabled()),o.isSecurityEnabled()){const r=a((function(){s.location.reload()}),500);e.$on("$destroy",(function(){a.cancel(r)}))}},e.toggleFreeAccess=function(t){!o.isFreeAccessEnabled()||o.isFreeAccessEnabled()&&t?c.getFreeAccess().then((function(s){let i=s.data.authorities,a=s.data.appSettings||{DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0};r.open({templateUrl:"js/angular/security/templates/modal/default-authorities.html",controller:"DefaultAuthoritiesCtrl",resolve:{data:function(){return{defaultAuthorities:function(){const r={READ_REPO:{},WRITE_REPO:{}},t=_.mapKeys(e.getRepositories(),(function(e){return n(e)}));return _.each(i,(function(e){0===e.indexOf("WRITE_REPO_")?t.hasOwnProperty(e.substr(11))&&(r.WRITE_REPO[e.substr(11)]=!0):0===e.indexOf("READ_REPO_")&&t.hasOwnProperty(e.substr(10))&&(r.READ_REPO[e.substr(10)]=!0)})),r},appSettings:a}}}}).result.then((function(e){i=e.authorities,a=e.appSettings,o.toggleFreeAccess(t||!o.isFreeAccessEnabled(),i,a,t)}))})):o.toggleFreeAccess(!o.isFreeAccessEnabled(),[])},e.editFreeAccess=function(){e.toggleFreeAccess(!0)},e.removeUser=function(r){u.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("security.confirm.delete.user",{name:r}),warning:!0}).result.then((function(){e.loader=!0,c.deleteUser(r).success((function(){e.getUsers()})).error((function(r){const s=getError(r);t.error(s,p.instant("common.error")),e.loader=!1}))}))},e.encodeURIComponent=function(e){return encodeURIComponent(e)}}]),o.controller("DefaultAuthoritiesCtrl",["$scope","$http","$uibModalInstance","data","$rootScope",function(e,r,t,s,o){e.grantedAuthorities=s.defaultAuthorities(),e.appSettings=s.appSettings,e.hasActiveLocation=function(){return!_.isEmpty(o.globalLocation)},e.getRepositories=function(){return o.globalRepositories},e.ok=function(){const r=[];e.repositoryCheckError=!0;for(const t in e.grantedAuthorities.WRITE_REPO)e.grantedAuthorities.WRITE_REPO[t]&&(r.push("WRITE_REPO_"+t),r.push("READ_REPO_"+t),e.repositoryCheckError=!1);for(const t in e.grantedAuthorities.READ_REPO)e.grantedAuthorities.READ_REPO[t]&&-1===r.indexOf("READ_REPO_"+t)&&(r.push("READ_REPO_"+t),e.repositoryCheckError=!1);e.repositoryCheckError||t.close({authorities:r,appSettings:e.appSettings})},e.cancel=function(){t.dismiss("cancel")},e.createUniqueKey=function(e){return n(e)}}]),o.controller("CommonUserCtrl",["$rootScope","$scope","$http","toastr","$window","$timeout","$location","$jwtAuth","$translate","passwordPlaceholder",function(e,r,t,o,i,a,u,c,p,d){e.$on("$translateChangeSuccess",(function(){r.passwordPlaceholder=p.instant(d)})),r.isAdmin=function(){return c.hasRole(s.UserRole.ROLE_ADMIN)},r.hasExternalAuth=function(){return c.hasExternalAuth()},r.hasEditRestrictions=function(){return r.user&&r.user.username===s.UserType.ADMIN},r.isOverrideAuth=function(){return c.isDefaultAuthEnabled()},r.setGrantedAuthorities=function(){!function(e){function r(){for(let r=0;r<arguments.length;r++){const t=arguments[r];_.indexOf(e.user.grantedAuthorities,t)<0&&e.user.grantedAuthorities.push(t)}}if(e.user.grantedAuthorities=[],e.repositoryCheckError=!0,e.userType===s.UserType.ADMIN)e.repositoryCheckError=!1,r(s.UserRole.ROLE_ADMIN);else if(e.userType===s.UserType.REPO_MANAGER)e.repositoryCheckError=!1,r(s.UserRole.ROLE_REPO_MANAGER);else{r(s.UserRole.ROLE_USER);for(const t in e.grantedAuthorities.WRITE_REPO)e.grantedAuthorities.WRITE_REPO[t]&&(e.repositoryCheckError=!1,r("WRITE_REPO_"+t,"READ_REPO_"+t));for(const t in e.grantedAuthorities.READ_REPO)e.grantedAuthorities.READ_REPO[t]&&(e.repositoryCheckError=!1,r("READ_REPO_"+t))}e.customRoles&&e.customRoles.forEach(e=>r("CUSTOM_"+e))}(r)},r.$watch("userType",(function(){r.isUser()||(r.customRoles="")})),r.isUser=function(){return r.userType===s.UserType.USER},r.hasReadPermission=function(e){const t=n(e);return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&(r.grantedAuthorities.READ_REPO["*"]||r.grantedAuthorities.WRITE_REPO["*"])||r.grantedAuthorities.READ_REPO[t]||r.grantedAuthorities.WRITE_REPO[t]},r.hasWritePermission=function(e){const t=n(e);return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&r.grantedAuthorities.WRITE_REPO["*"]||r.grantedAuthorities.WRITE_REPO[t]},r.readCheckDisabled=function(e){return r.hasWritePermission(e)||"SYSTEM"!==e.id&&"*"!==e&&r.grantedAuthorities.READ_REPO["*"]||r.hasEditRestrictions()},r.writeCheckDisabled=function(e){return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&"*"!==e&&r.grantedAuthorities.WRITE_REPO["*"]||r.hasEditRestrictions()},r.createUniqueKey=function(e){return n(e)},r.userType=s.UserType.USER,r.grantedAuthorities={READ_REPO:{},WRITE_REPO:{}},r.validatePassword=function(){return r.noPassword?(r.passwordError="",r.confirmPasswordError="",!0):r.user.password!==r.user.confirmpassword?(r.user.password?(r.passwordError="",r.confirmPasswordError=p.instant("security.confirm.password")):(r.passwordError=p.instant("security.enter.password"),r.confirmPasswordError=""),!1):(r.passwordError="",r.confirmPasswordError="",!0)},r.isLocalAuthentication=function(){return"Local"===c.getAuthImplementation()},r.updateUser=function(){if(!r.validateForm())return!1;r.isLocalAuthentication()&&r.setGrantedAuthorities(),r.repositoryCheckError||r.updateUserHttp()},r.setNoPassword=function(){r.noPassword&&(r.user.password="",r.user.confirmpassword="",r.passwordError="",r.confirmPasswordError="")},r.shouldDisableSameAs=function(){const e=$("#sameAsCheck");return r.user&&!r.user.appSettings.DEFAULT_INFERENCE&&e.prop("checked")&&(e.prop("checked",!1),r.user.appSettings.DEFAULT_SAMEAS=!1),r.user&&!r.user.appSettings.DEFAULT_INFERENCE},r.addCustomRole=function(e){return e.text=e.text.toUpperCase(),e}}]),o.controller("AddUserCtrl",["$scope","$http","toastr","$window","$timeout","$location","$jwtAuth","$controller","SecurityRestService","ModalService","$translate",function(e,r,t,n,o,i,a,u,c,p,d){angular.extend(this,u("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.password.placeholder"})),e.mode="add",e.saveButtonText=d.instant("common.create.btn"),e.goBack=function(){const r=o((function(){n.history.back()}),100);e.$on("$destroy",(function(){o.cancel(r)}))},e.pageTitle=d.instant("view.create.user.title"),e.passwordPlaceholder=d.instant("security.password.placeholder"),e.user={username:"",password:"",confirmpassword:"",grantedAuthorities:[],appSettings:{DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0}},e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?p.openSimpleModal({title:d.instant("security.create.admin"),message:d.instant("security.admin.login.warning"),warning:!0}).result.then((function(){e.createUser()})):e.createUser()},e.createUserHttp=function(){e.loader=!0,c.createUser({username:e.user.username,pass:e.user.password,appSettings:e.user.appSettings,grantedAuthorities:e.user.grantedAuthorities}).success((function(){t.success(d.instant("security.user.created",{name:e.user.username}));const r=o((function(){e.loader=!1,n.history.back()}),2e3);e.$on("$destroy",(function(){o.cancel(r)}))})).error((function(r){const s=getError(r);e.loader=!1,t.error(s,d.instant("common.error"))}))},e.createUser=function(){e.validateForm()&&(e.setGrantedAuthorities(),e.repositoryCheckError||e.createUserHttp())},e.validateForm=function(){let r=!0;return e.user.username?e.usernameError="":(e.usernameError=d.instant("security.enter.username"),r=!1),e.noPassword?(e.passwordError="",e.confirmPasswordError=""):(e.user.password?e.passwordError="":(e.passwordError=d.instant("security.enter.password"),r=!1),e.user.confirmpassword&&e.user.password===e.user.confirmpassword?e.confirmPasswordError="":(e.confirmPasswordError=d.instant("security.confirm.password"),r=!1)),r}}]),o.controller("EditUserCtrl",["$scope","$http","toastr","$window","$routeParams","$timeout","$location","$jwtAuth","$controller","SecurityRestService","ModalService","$translate",function(e,r,t,n,o,a,u,c,p,d,l,E){angular.extend(this,p("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.mode="edit",e.saveButtonText=E.instant("common.save.btn"),e.goBack=function(){const r=a((function(){n.history.back()}),100);e.$on("$destroy",(function(){a.cancel(r)}))},e.params=o,e.pageTitle=E.instant("view.edit.user.title",{userId:e.params.userId}),e.passwordPlaceholder=E.instant("security.new.password"),e.userType=s.UserType.USER;const g={DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0};c.hasRole(s.UserRole.ROLE_ADMIN)||u.url("settings"),e.getUserData=function(){d.getUser(e.params.userId).success((function(r){e.userData=r,e.user={username:e.userData.username},e.user.password="",e.user.confirmpassword="",e.user.external=e.userData.external,e.user.appSettings=r.appSettings||g,e.userType=s.UserType.USER;const t=i(r.grantedAuthorities);e.userType=t.userType,e.grantedAuthorities=t.grantedAuthorities,e.customRoles=t.customRoles})).error((function(e){const r=getError(e);t.error(r,E.instant("common.error"))}))},e.getUserData(),e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?l.openSimpleModal({title:E.instant("security.save.admin.settings"),message:E.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0,d.updateUser({username:e.user.username,pass:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings,grantedAuthorities:e.user.grantedAuthorities}).success((function(){t.success(E.instant("security.user.updated",{name:e.user.username}));const r=a((function(){e.loader=!1,n.history.back()}),2e3);e.$on("$destroy",(function(){a.cancel(r)})),c.getPrincipal().then(r=>{e.user.username===r.username&&(r.appSettings=e.user.appSettings)})})).error((function(r){const s=getError(r);e.loader=!1,t.error(s,E.instant("common.error"))}))},e.validateForm=function(){return e.validatePassword()}}]),o.controller("RolesMappingController",["$scope","toastr","SecurityRestService","$translate",function(e,r,t,s){e.debugMapping=function(e,r){const s=r.split(":");t.getRolesMapping({role:e,method:s[1],mapping:s[0]})};e.$on("repositoryIsSet",(function(){t.getRoles().success((function(r){e.roleMappings=r,e.roles=_.keys(e.roleMappings),e.mappings=_.keys(e.roleMappings[e.roles[0]]);const t=_.map(e.roles,(function(r){return[r,_.filter(e.roleMappings[r]).length]}));e.roles=_.reverse(_.map(_.orderBy(t,(function(e){return e[1]})),(function(e){return e[0]})))})).error((function(t){const n=getError(t);e.loader=!1,r.error(n,s.instant("common.error"))}))}))}]),o.controller("ChangeUserPasswordSettingsCtrl",["$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","SecurityRestService","ModalService","$translate","ThemeService","WorkbenchSettingsStorageService","$q",function(e,r,t,n,o,a,u,c,p,d,l,E,g){angular.extend(this,u("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.themes=l.getThemes(),e.mode="settings",e.showWorkbenchSettings=!0,e.workbenchSettings=E.getWorkbenchSettings(),e.saveButtonText=d.instant("common.save.btn"),e.pageTitle=d.instant("view.settings.title"),e.passwordPlaceholder=d.instant("security.new.password"),e.grantedAuthorities={READ_REPO:{},WRITE_REPO:{}},e.loader=!1,e.selectedTheme=l.getTheme(),e.hasEditRestrictions=function(){return!0},e.isUser=function(){return e.userType===s.UserType.USER},e.goBack=function(){const r=n((function(){t.history.back()}),100);e.$on("$destroy",(function(){n.cancel(r)}))},e.getPrincipal=function(){return o.getPrincipal().then(r=>{e.currentUserData=angular.copy(r)})},e.getPrincipal().then(()=>{e.redirectAdmin(),h(e)}),e.updateCurrentUserData=function(){g.when(o.getPrincipal()).then(r=>_.assign(r,e.userData))},e.redirectAdmin=function(){e.currentUserData||a.redirectToLogin()};const h=function(r){r.userData=angular.copy(r.currentUserData),r.user={username:r.userData.username},r.user.password="",r.user.confirmpassword="",r.user.external=r.userData.external,r.user.appSettings=r.userData.appSettings,void 0===r.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA&&(r.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA=!0);const t=i(r.userData.authorities);e.userType=t.userType,e.grantedAuthorities=t.grantedAuthorities,e.customRoles=t.customRoles};e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?p.openSimpleModal({title:d.instant("security.save.admin.settings"),message:d.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0,c.updateUserData({username:e.user.username,pass:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings}).success((function(){e.updateCurrentUserData(),r.success(d.instant("security.user.updated",{name:e.user.username}));const s=n((function(){e.loader=!1,t.history.back()}),2e3);E.saveWorkbenchSettings(e.workbenchSettings),e.$on("$destroy",(function(){n.cancel(s)}))})).error((function(t){const s=getError(t);e.loader=!1,r.error(s,d.instant("common.error"))}))},e.updateUser=function(){if(!e.validateForm())return!1;e.updateUserHttp()},e.validateForm=function(){return e.validatePassword()},e.setThemeMode=function(){l.toggleThemeMode(e.workbenchSettings.mode)},e.setTheme=r=>{e.selectedTheme=r,e.workbenchSettings.theme=r.name,l.applyTheme(r.name)},e.$on("$destroy",(function(){const e=E.getWorkbenchSettings();l.toggleThemeMode(e.mode)}));e.workbenchSettings||(e.workbenchSettings={theme:"light"}),e.setThemeMode()}]),o.controller("DeleteUserCtrl",["$scope","$uibModalInstance","username",function(e,r,t){e.username=t,e.ok=function(){r.close()},e.cancel=function(){r.dismiss("cancel")}}])}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{134:function(e,r,t){"use strict";t.r(r);t(7),t(24),t(36),t(37);var s=t(5);const n=function(e){return e.location?`${e.id}@${e.location}`:e.id},o=angular.module("graphdb.framework.security.controllers",["ngCookies","ui.bootstrap","graphdb.framework.core.services.jwtauth","graphdb.framework.core.services.openIDService","graphdb.framework.rest.security.service","toastr","ngTagsInput"]),i=function(e){let r=s.UserType.USER;const t={READ_REPO:{},WRITE_REPO:{}},n={},o=[];for(let i=0;i<e.length;i++){const a=e[i];if(a===s.UserRole.ROLE_ADMIN)r=s.UserType.ADMIN;else if(a===s.UserRole.ROLE_REPO_MANAGER)r!==s.UserType.ADMIN&&(r=s.UserType.REPO_MANAGER);else if(a===s.UserRole.ROLE_USER)r=s.UserType.USER;else if(0===a.indexOf("READ_REPO_")||0===a.indexOf("WRITE_REPO_")){const e=a.indexOf("_",a.indexOf("_")+1),r=a.substr(0,e),s=a.substr(e+1);t[r][s]=!0,n[s]=n[s]||{},"READ_REPO"===r?n[s].read=!0:"WRITE_REPO"===r&&(n[s].write=!0)}else 0===a.indexOf("CUSTOM_")&&o.push(a.substr("CUSTOM_".length))}return{userType:r,userTypeDescription:s.UserUtils.getUserRoleName(r),grantedAuthorities:t,repositories:n,customRoles:o}};o.controller("LoginCtrl",["$scope","$http","toastr","$jwtAuth","$openIDAuth","$location","$rootScope","$translate",function(e,r,t,s,n,o,i,a){e.username="",e.password="",s.reinitializeSecurity(),e.loginWithOpenID=function(){s.loginOpenID()},o.search().noaccess?t.error(a.instant("security.no.rights.config.error"),a.instant("security.login.error")):o.search().expired&&t.error(a.instant("security.auth.token.expired"),a.instant("security.login.error")),e.isGDBLoginEnabled=function(){return s.passwordLoginEnabled},e.isOpenIDEnabled=function(){return s.openIDEnabled},e.login=function(){return r({method:"POST",url:"rest/login",data:{username:e.username,password:e.password}}).success((function(e,r,t){s.authenticate(e,t("Authorization")).then(()=>{i.returnToUrl?o.url(i.returnToUrl):o.path("/")})})).error((function(r,s){if(401===s)t.error(a.instant("security.wrong.credentials"),a.instant("common.error")),e.wrongCredentials=!0,e.username="",e.password="";else{const e=getError(r);t.error(e,s)}}))}}]),o.controller("UsersCtrl",["$scope","$uibModal","toastr","$window","$jwtAuth","$timeout","ModalService","SecurityRestService","$translate",function(e,r,t,s,o,a,u,c,p){e.loader=!0,e.securityEnabled=function(){return o.isSecurityEnabled()},e.hasExternalAuth=function(){return o.hasExternalAuth()},e.getAuthImplementation=function(){return o.getAuthImplementation()},e.freeAccessEnabled=function(){return o.isFreeAccessEnabled()},e.getUsers=function(){c.getUsers().success((function(r){e.users=r;for(let r=0;r<e.users.length;r++){const t=i(e.users[r].grantedAuthorities);e.users[r].userType=t.userType,e.users[r].userTypeDescription=t.userTypeDescription,e.users[r].repositories=t.repositories,e.users[r].customRoles=t.customRoles}e.loader=!1})).error((function(r){const s=getError(r);t.error(s,p.instant("common.error")),e.loader=!1}))},e.getUsers(),e.$on("repositoryIsSet",(function(){e.getUsers()})),e.toggleSecurity=function(){if(o.toggleSecurity(!o.isSecurityEnabled()),o.isSecurityEnabled()){const r=a((function(){s.location.reload()}),500);e.$on("$destroy",(function(){a.cancel(r)}))}},e.toggleFreeAccess=function(t){!o.isFreeAccessEnabled()||o.isFreeAccessEnabled()&&t?c.getFreeAccess().then((function(s){let i=s.data.authorities,a=s.data.appSettings||{DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0};r.open({templateUrl:"js/angular/security/templates/modal/default-authorities.html",controller:"DefaultAuthoritiesCtrl",resolve:{data:function(){return{defaultAuthorities:function(){const r={READ_REPO:{},WRITE_REPO:{}},t=_.mapKeys(e.getRepositories(),(function(e){return n(e)}));return _.each(i,(function(e){0===e.indexOf("WRITE_REPO_")?t.hasOwnProperty(e.substr(11))&&(r.WRITE_REPO[e.substr(11)]=!0):0===e.indexOf("READ_REPO_")&&t.hasOwnProperty(e.substr(10))&&(r.READ_REPO[e.substr(10)]=!0)})),r},appSettings:a}}}}).result.then((function(e){i=e.authorities,a=e.appSettings,o.toggleFreeAccess(t||!o.isFreeAccessEnabled(),i,a,t)}))})):o.toggleFreeAccess(!o.isFreeAccessEnabled(),[])},e.editFreeAccess=function(){e.toggleFreeAccess(!0)},e.removeUser=function(r){u.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("security.confirm.delete.user",{name:r}),warning:!0}).result.then((function(){e.loader=!0,c.deleteUser(r).success((function(){e.getUsers()})).error((function(r){const s=getError(r);t.error(s,p.instant("common.error")),e.loader=!1}))}))},e.encodeURIComponent=function(e){return encodeURIComponent(e)}}]),o.controller("DefaultAuthoritiesCtrl",["$scope","$http","$uibModalInstance","data","$rootScope",function(e,r,t,s,o){e.grantedAuthorities=s.defaultAuthorities(),e.appSettings=s.appSettings,e.hasActiveLocation=function(){return!_.isEmpty(o.globalLocation)},e.getRepositories=function(){return o.globalRepositories},e.ok=function(){const r=[];e.repositoryCheckError=!0;for(const t in e.grantedAuthorities.WRITE_REPO)e.grantedAuthorities.WRITE_REPO[t]&&(r.push("WRITE_REPO_"+t),r.push("READ_REPO_"+t),e.repositoryCheckError=!1);for(const t in e.grantedAuthorities.READ_REPO)e.grantedAuthorities.READ_REPO[t]&&-1===r.indexOf("READ_REPO_"+t)&&(r.push("READ_REPO_"+t),e.repositoryCheckError=!1);e.repositoryCheckError||t.close({authorities:r,appSettings:e.appSettings})},e.cancel=function(){t.dismiss("cancel")},e.createUniqueKey=function(e){return n(e)}}]),o.controller("CommonUserCtrl",["$rootScope","$scope","$http","toastr","$window","$timeout","$location","$jwtAuth","$translate","passwordPlaceholder",function(e,r,t,o,i,a,u,c,p,d){e.$on("$translateChangeSuccess",(function(){r.passwordPlaceholder=p.instant(d)})),r.isAdmin=function(){return c.hasRole(s.UserRole.ROLE_ADMIN)},r.hasExternalAuth=function(){return c.hasExternalAuth()},r.hasEditRestrictions=function(){return r.user&&r.user.username===s.UserType.ADMIN},r.isOverrideAuth=function(){return c.isDefaultAuthEnabled()},r.setGrantedAuthorities=function(){!function(e){function r(){for(let r=0;r<arguments.length;r++){const t=arguments[r];_.indexOf(e.user.grantedAuthorities,t)<0&&e.user.grantedAuthorities.push(t)}}if(e.user.grantedAuthorities=[],e.repositoryCheckError=!0,e.userType===s.UserType.ADMIN)e.repositoryCheckError=!1,r(s.UserRole.ROLE_ADMIN);else if(e.userType===s.UserType.REPO_MANAGER)e.repositoryCheckError=!1,r(s.UserRole.ROLE_REPO_MANAGER);else{r(s.UserRole.ROLE_USER);for(const t in e.grantedAuthorities.WRITE_REPO)e.grantedAuthorities.WRITE_REPO[t]&&(e.repositoryCheckError=!1,r("WRITE_REPO_"+t,"READ_REPO_"+t));for(const t in e.grantedAuthorities.READ_REPO)e.grantedAuthorities.READ_REPO[t]&&(e.repositoryCheckError=!1,r("READ_REPO_"+t))}e.customRoles&&e.customRoles.forEach(e=>r("CUSTOM_"+e))}(r)},r.$watch("userType",(function(){r.isUser()||(r.customRoles="")})),r.isUser=function(){return r.userType===s.UserType.USER},r.hasReadPermission=function(e){const t=n(e);return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&(r.grantedAuthorities.READ_REPO["*"]||r.grantedAuthorities.WRITE_REPO["*"])||r.grantedAuthorities.READ_REPO[t]||r.grantedAuthorities.WRITE_REPO[t]},r.hasWritePermission=function(e){const t=n(e);return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&r.grantedAuthorities.WRITE_REPO["*"]||r.grantedAuthorities.WRITE_REPO[t]},r.readCheckDisabled=function(e){return r.hasWritePermission(e)||"SYSTEM"!==e.id&&"*"!==e&&r.grantedAuthorities.READ_REPO["*"]||r.hasEditRestrictions()},r.writeCheckDisabled=function(e){return r.userType===s.UserType.ADMIN||r.userType===s.UserType.REPO_MANAGER||"SYSTEM"!==e.id&&"*"!==e&&r.grantedAuthorities.WRITE_REPO["*"]||r.hasEditRestrictions()},r.createUniqueKey=function(e){return n(e)},r.userType=s.UserType.USER,r.grantedAuthorities={READ_REPO:{},WRITE_REPO:{}},r.validatePassword=function(){return r.noPassword?(r.passwordError="",r.confirmPasswordError="",!0):r.user.password!==r.user.confirmpassword?(r.user.password?(r.passwordError="",r.confirmPasswordError=p.instant("security.confirm.password")):(r.passwordError=p.instant("security.enter.password"),r.confirmPasswordError=""),!1):(r.passwordError="",r.confirmPasswordError="",!0)},r.isLocalAuthentication=function(){return"Local"===c.getAuthImplementation()},r.updateUser=function(){if(!r.validateForm())return!1;r.isLocalAuthentication()&&r.setGrantedAuthorities(),r.repositoryCheckError||r.updateUserHttp()},r.setNoPassword=function(){r.noPassword&&(r.user.password="",r.user.confirmpassword="",r.passwordError="",r.confirmPasswordError="")},r.shouldDisableSameAs=function(){const e=$("#sameAsCheck");return r.user&&!r.user.appSettings.DEFAULT_INFERENCE&&e.prop("checked")&&(e.prop("checked",!1),r.user.appSettings.DEFAULT_SAMEAS=!1),r.user&&!r.user.appSettings.DEFAULT_INFERENCE},r.addCustomRole=function(e){return e.text=e.text.toUpperCase(),e}}]),o.controller("AddUserCtrl",["$scope","$http","toastr","$window","$timeout","$location","$jwtAuth","$controller","SecurityRestService","ModalService","$translate",function(e,r,t,n,o,i,a,u,c,p,d){angular.extend(this,u("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.password.placeholder"})),e.mode="add",e.saveButtonText=d.instant("common.create.btn"),e.goBack=function(){const r=o((function(){n.history.back()}),100);e.$on("$destroy",(function(){o.cancel(r)}))},e.pageTitle=d.instant("view.create.user.title"),e.passwordPlaceholder=d.instant("security.password.placeholder"),e.user={username:"",password:"",confirmpassword:"",grantedAuthorities:[],appSettings:{DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0}},e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?p.openSimpleModal({title:d.instant("security.create.admin"),message:d.instant("security.admin.login.warning"),warning:!0}).result.then((function(){e.createUser()})):e.createUser()},e.createUserHttp=function(){e.loader=!0,c.createUser({username:e.user.username,pass:e.user.password,appSettings:e.user.appSettings,grantedAuthorities:e.user.grantedAuthorities}).success((function(){t.success(d.instant("security.user.created",{name:e.user.username}));const r=o((function(){e.loader=!1,n.history.back()}),2e3);e.$on("$destroy",(function(){o.cancel(r)}))})).error((function(r){const s=getError(r);e.loader=!1,t.error(s,d.instant("common.error"))}))},e.createUser=function(){e.validateForm()&&(e.setGrantedAuthorities(),e.repositoryCheckError||e.createUserHttp())},e.validateForm=function(){let r=!0;return e.user.username?e.usernameError="":(e.usernameError=d.instant("security.enter.username"),r=!1),e.noPassword?(e.passwordError="",e.confirmPasswordError=""):(e.user.password?e.passwordError="":(e.passwordError=d.instant("security.enter.password"),r=!1),e.user.confirmpassword&&e.user.password===e.user.confirmpassword?e.confirmPasswordError="":(e.confirmPasswordError=d.instant("security.confirm.password"),r=!1)),r}}]),o.controller("EditUserCtrl",["$scope","$http","toastr","$window","$routeParams","$timeout","$location","$jwtAuth","$controller","SecurityRestService","ModalService","$translate",function(e,r,t,n,o,a,u,c,p,d,l,E){angular.extend(this,p("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.mode="edit",e.saveButtonText=E.instant("common.save.btn"),e.goBack=function(){const r=a((function(){n.history.back()}),100);e.$on("$destroy",(function(){a.cancel(r)}))},e.params=o,e.pageTitle=E.instant("view.edit.user.title",{userId:e.params.userId}),e.passwordPlaceholder=E.instant("security.new.password"),e.userType=s.UserType.USER;const g={DEFAULT_SAMEAS:!0,DEFAULT_INFERENCE:!0,EXECUTE_COUNT:!0,IGNORE_SHARED_QUERIES:!1,DEFAULT_VIS_GRAPH_SCHEMA:!0};c.hasRole(s.UserRole.ROLE_ADMIN)||u.url("settings"),e.getUserData=function(){d.getUser(e.params.userId).success((function(r){e.userData=r,e.user={username:e.userData.username},e.user.password="",e.user.confirmpassword="",e.user.external=e.userData.external,e.user.appSettings=r.appSettings||g,e.userType=s.UserType.USER;const t=i(r.grantedAuthorities);e.userType=t.userType,e.grantedAuthorities=t.grantedAuthorities,e.customRoles=t.customRoles})).error((function(e){const r=getError(e);t.error(r,E.instant("common.error"))}))},e.getUserData(),e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?l.openSimpleModal({title:E.instant("security.save.admin.settings"),message:E.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0,d.updateUser({username:e.user.username,pass:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings,grantedAuthorities:e.user.grantedAuthorities}).success((function(){t.success(E.instant("security.user.updated",{name:e.user.username}));const r=a((function(){e.loader=!1,n.history.back()}),2e3);e.$on("$destroy",(function(){a.cancel(r)})),c.getPrincipal().then(r=>{e.user.username===r.username&&(r.appSettings=e.user.appSettings)})})).error((function(r){const s=getError(r);e.loader=!1,t.error(s,E.instant("common.error"))}))},e.validateForm=function(){return e.validatePassword()}}]),o.controller("RolesMappingController",["$scope","toastr","SecurityRestService","$translate",function(e,r,t,s){e.debugMapping=function(e,r){const s=r.split(":");t.getRolesMapping({role:e,method:s[1],mapping:s[0]})};e.$on("repositoryIsSet",(function(){t.getRoles().success((function(r){e.roleMappings=r,e.roles=_.keys(e.roleMappings),e.mappings=_.keys(e.roleMappings[e.roles[0]]);const t=_.map(e.roles,(function(r){return[r,_.filter(e.roleMappings[r]).length]}));e.roles=_.reverse(_.map(_.orderBy(t,(function(e){return e[1]})),(function(e){return e[0]})))})).error((function(t){const n=getError(t);e.loader=!1,r.error(n,s.instant("common.error"))}))}))}]),o.controller("ChangeUserPasswordSettingsCtrl",["$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","SecurityRestService","ModalService","$translate","ThemeService","WorkbenchSettingsStorageService","$q",function(e,r,t,n,o,a,u,c,p,d,l,E,g){angular.extend(this,u("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"})),e.themes=l.getThemes(),e.mode="settings",e.showWorkbenchSettings=!0,e.workbenchSettings=E.getWorkbenchSettings(),e.saveButtonText=d.instant("common.save.btn"),e.pageTitle=d.instant("view.settings.title"),e.passwordPlaceholder=d.instant("security.new.password"),e.grantedAuthorities={READ_REPO:{},WRITE_REPO:{}},e.loader=!1,e.selectedTheme=l.getTheme(),e.hasEditRestrictions=function(){return!0},e.isUser=function(){return e.userType===s.UserType.USER},e.goBack=function(){const r=n((function(){t.history.back()}),100);e.$on("$destroy",(function(){n.cancel(r)}))},e.getPrincipal=function(){return o.getPrincipal().then(r=>{e.currentUserData=angular.copy(r)})},e.getPrincipal().then(()=>{e.redirectAdmin(),h(e)}),e.updateCurrentUserData=function(){g.when(o.getPrincipal()).then(r=>_.assign(r,e.userData))},e.redirectAdmin=function(){e.currentUserData||a.redirectToLogin()};const h=function(r){r.userData=angular.copy(r.currentUserData),r.user={username:r.userData.username},r.user.password="",r.user.confirmpassword="",r.user.external=r.userData.external,r.user.appSettings=r.userData.appSettings,void 0===r.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA&&(r.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA=!0);const t=i(r.userData.authorities);e.userType=t.userType,e.grantedAuthorities=t.grantedAuthorities,e.customRoles=t.customRoles};e.submit=function(){e.noPassword&&e.userType===s.UserType.ADMIN?p.openSimpleModal({title:d.instant("security.save.admin.settings"),message:d.instant("security.admin.pass.unset"),warning:!0}).result.then((function(){e.updateUser()})):e.updateUser()},e.updateUserHttp=function(){e.loader=!0,c.updateUserData({username:e.user.username,pass:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings}).success((function(){e.updateCurrentUserData(),r.success(d.instant("security.user.updated",{name:e.user.username}));const s=n((function(){e.loader=!1,t.history.back()}),2e3);E.saveWorkbenchSettings(e.workbenchSettings),e.$on("$destroy",(function(){n.cancel(s)}))})).error((function(t){const s=getError(t);e.loader=!1,r.error(s,d.instant("common.error"))}))},e.updateUser=function(){if(!e.validateForm())return!1;e.updateUserHttp()},e.validateForm=function(){return e.validatePassword()},e.setThemeMode=function(){l.toggleThemeMode(e.workbenchSettings.mode)},e.setTheme=r=>{e.selectedTheme=r,e.workbenchSettings.theme=r.name,l.applyTheme(r.name)},e.$on("$destroy",(function(){const e=E.getWorkbenchSettings();l.toggleThemeMode(e.mode)}));e.workbenchSettings||(e.workbenchSettings={theme:"light"}),e.setThemeMode()}]),o.controller("DeleteUserCtrl",["$scope","$uibModalInstance","username",function(e,r,t){e.username=t,e.ok=function(){r.close()},e.cancel=function(){r.dismiss("cancel")}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{174:function(n,t,s){"use strict";s.r(t),s.d(t,"ActiveOperationsInput",(function(){return o}));var i=s(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{174:function(n,t,s){"use strict";s.r(t),s.d(t,"ActiveOperationsInput",(function(){return o}));var i=s(4);class o{constructor(){this.allRunningOperations=[],this.status=i.OPERATION_STATUS.INFORMATION}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{119:function(e,a,s){"use strict";s.r(a);s(
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{119:function(e,a,s){"use strict";s.r(a);s(7),s(24),s(22),s(28);const n=angular.module("graphdb.framework.namespaces.controllers",["ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.core.services.jwtauth","graphdb.framework.rest.repositories.service","graphdb.framework.rest.rdf4j.repositories.service","toastr"]),t=function(){const e="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-]|[-]|[⁰-]|[Ⰰ-]|[、-]|[豈-﷏]|[ﷰ-�]",a="[A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-]|[-]|[⁰-]|[Ⰰ-]|[、-]|[豈-﷏]|[ﷰ-�]|_|-|[0-9]|·|[̀-ͯ]|[‿-⁀]";return new RegExp("^(?:"+e+")(?:(?:"+a+"|\\.)*(?:"+a+"))?$")}();n.controller("NamespacesCtrl",["$scope","$http","$repositories","toastr","$uibModal","ModalService","RepositoriesRestService","RDF4JRepositoriesRestService","$translate",function(e,a,s,n,c,r,i,o,p){function l(a,t){let c;c="object"==typeof a?a.prefix:a,o.deleteNamespacePrefix(s.getActiveRepository(),c).success((function(){t&&t.length>0?l(a=t.shift(),t):(e.selectedAll=!1,e.namespace={},e.getNamespaces(),e.searchNamespaces="",e.haveSelected=!1,e.loader=!1,e.displayedNamespaces=[],void 0===t?n.success(p.instant("namespace.prefix.deleted.successfully",{prefix:c}),""):n.success(p.instant("namespace.selected.namespaces.deleted.successfully"),""))})).error((function(a){const s=getError(a);n.error(s,p.instant("common.error")),e.loader=!1}))}function m(e,a){return function(e){return""===e||e.match(t)}(e)?!angular.isUndefined(a)&&""!==a||(n.error(p.instant("namespace.warning.provide.namespace"),p.instant("common.error")),!1):(n.error(p.instant("namespace.invalid.prefix",{prefix:e},p.instant("common.error"))),!1)}e.namespaces={},e.namespace={},e.loader=!1,e.haveSelected=!1,e.pageSizeOptions=[10,20,50,100],e.page=1,e.pageSize=e.pageSizeOptions[0],e.displayedNamespaces=[],e.getNamespaces=function(){s.getActiveRepository()&&(e.loader=!0,e.namespaces={},o.getNamespaces(s.getActiveRepository()).success((function(a){e.namespaces=a.results.bindings.map((function(e){return{prefix:e.prefix.value,namespace:e.namespace.value}})),e.namespaces.length>0&&(e.namespaces.sort((function(e,a){const s=e.prefix.toUpperCase(),n=a.prefix.toUpperCase();return s<n?-1:s>n?1:0})),e.matchedElements=e.namespaces,e.changePagination()),0===e.namespaces.length&&(e.loader=!1)})).error((function(a){const s=getError(a);n.error(s),e.loader=!1})))},e.changePagination=function(){angular.isDefined(e.namespaces)&&(e.displayedNamespaces=e.namespaces.slice(e.pageSize*(e.page-1),e.pageSize*e.page))},e.changePageSize=function(a){$(".ot-graph-page-size").removeClass("active"),e.page=1,e.searchNamespaces="",a&&(e.getNamespaces(),e.pageSize=a)},e.$watch("matchedElements",(function(){angular.isDefined(e.matchedElements)&&(e.displayedNamespaces=e.matchedElements.slice(e.pageSize*(e.page-1),e.pageSize*e.page))})),e.$watch((function(){return s.getActiveRepository()}),(function(){e.searchNamespaces="",e.getNamespaces(),e.selectedAll=!1})),e.onNamespaceSearch=function(){e.haveSelected=!1,e.selectedAll=!1,e.matchedElements=[],e.deselectAll(),e.filterResults()},e.filterResults=function(){angular.forEach(e.namespaces,(function(a){-1===a.namespace.indexOf(e.searchNamespaces)&&-1===a.prefix.indexOf(e.searchNamespaces)||e.matchedElements.push(a)}))},e.saveNamespace=function(a,t){return e.loader=!0,o.updateNamespacePrefix(s.getActiveRepository(),t,a).success((function(){e.getNamespaces(),n.success(p.instant("namespace.saved")),e.loader=!1})).error((function(a){const s=getError(a);n.error(s,p.instant("common.error")),e.loader=!1}))},e.editPrefix=function(a,t){e.loader=!0,i.getPrefix(s.getActiveRepository(),{from:a,to:t,location:s.getActiveRepositoryObject().location}).success((function(){e.getNamespaces(),e.loader=!1})).error((function(a){const s=getError(a);n.error(s,p.instant("common.error")),e.loader=!1}))},e.confirmReplace=function(e,a){r.openSimpleModal({title:p.instant("namespace.confirm.replace"),message:p.instant("namespace.already.exists.msg"),warning:!0}).result.then(e,a)},e.editPrefixAndNamespace=function(a,s,n){if(angular.isUndefined(a)&&(a=""),!m(a,s))return"";let t=!1;const c=n.prefix;angular.forEach(e.namespaces,(function(e){e.prefix===a&&c!==a&&(t=!0)})),t?e.confirmReplace((function(){e.saveNamespace(c,s).then((function(){c!==a&&e.editPrefix(c,a)}))}),(function(){e.getNamespaces()})):angular.isDefined(t)&&e.saveNamespace(c,s).then((function(){c!==a&&e.editPrefix(c,a)}))},e.addNamespace=function(){if(angular.isUndefined(e.namespace.prefix)&&(e.namespace.prefix=""),!m(e.namespace.prefix,e.namespace.namespace))return;e.selectedAll=!1;let a=!1;for(let s=0;s<e.namespaces.length;s++)e.namespaces[s].prefix===e.namespace.prefix&&(a=!0);a?e.confirmReplace((function(){e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace.namespace="",e.namespace.prefix="",setTimeout(()=>{e.form.$setUntouched(),e.form.$setPristine()})})):(e.saveNamespace(e.namespace.prefix,e.namespace.namespace),e.namespace.namespace="",e.namespace.prefix="",setTimeout(()=>{e.form.$setUntouched(),e.form.$setPristine()}))},e.removeNamespace=function(e){r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.msg",{prefix:e.prefix}),warning:!0}).result.then((function(){l(e)}))},e.checkAll=function(){angular.forEach(e.displayedNamespaces,(function(a){a.selected=e.selectedAll}))},e.deleteSelected=function(){let a=!1;angular.forEach(e.displayedNamespaces,(function(s){a||s.selected&&(a=!0,r.openSimpleModal({title:p.instant("common.confirm.delete"),message:p.instant("namespace.warning.delete.selected"),warning:!0}).result.then((function(){e.loader=!0;const a=[];angular.forEach(e.displayedNamespaces,(function(e){e.selected&&a.push(e)})),l(a.shift(),a),e.selectedAll=!1}),(function(){e.getNamespaces(),e.selectedAll=!1,e.searchNamespaces=""})))}))},e.checkIfSelectedNamespace=function(){e.haveSelected=!1,angular.forEach(e.namespaces,(function(a){a.selected&&(e.haveSelected=!0)}))},e.deselectAll=function(){angular.forEach(e.namespaces,(function(e){e.selected=!1}))}}]),n.controller("StandartModalCtrl",["$scope","$uibModalInstance",function(e,a){e.ok=function(){a.close(!0)},e.cancel=function(){a.dismiss("cancel")}}])}}]);
|