graphdb-workbench 2.6.1-RC1 → 2.6.2-RC1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{10.2f1b7b3050f428758cd0.bundle.js → 10.c86a39a390b36ec08b90.bundle.js} +1 -1
- package/dist/{119.771db56d499dcdf1c953.bundle.js → 119.e2a1ccb260af6cddd91c.bundle.js} +1 -1
- package/dist/12.72b1cf9c0b2a0cf0e39b.bundle.js +1 -0
- package/dist/123.eb8114707f15749a90ae.bundle.js +1 -0
- package/dist/131.f41a0b6b9036447b1077.bundle.js +1 -1
- package/dist/{16.028d7ea5baf358e315cb.bundle.js → 16.af6bc53be819045291bd.bundle.js} +1 -1
- package/dist/21.72126081137288bb650e.bundle.js +1 -0
- package/dist/{23.91ef26cbbdeac17b5756.bundle.js → 23.a5165fa6e171a8db712b.bundle.js} +1 -1
- package/dist/242.3b1c3384513df758e880.bundle.js +1 -0
- package/dist/25.5a98f7b1bf5b195fa51f.bundle.js +1 -0
- package/dist/257.943f597bddc0d65103c5.bundle.js +1 -1
- package/dist/259.2c88332b7f1b47935a47.bundle.js +1 -1
- package/dist/26.8bd9dc57add455291ab8.bundle.js +1 -0
- package/dist/260.d745422c537bdd9647bb.bundle.js +1 -1
- package/dist/261.7efff7f93f61f061f5ca.bundle.js +1 -1
- package/dist/27.92bfb161b420732902a3.bundle.js +1 -1
- package/dist/28.2e0277168c8f14f9c085.bundle.js +1 -1
- package/dist/288.6cef162ec3cec3cde603.bundle.js +1 -1
- package/dist/31.1e6ed4b31ac8c0dc44cd.bundle.js +1 -0
- package/dist/40.53352fda81f370182e99.bundle.js +1 -1
- package/dist/5.f15016e5e47214a9bc88.bundle.js +1 -0
- package/dist/63.dbce2c16115eac52fed2.bundle.js +1 -1
- package/dist/{7.15f6406e6baaef520b7f.bundle.js → 7.112cbad7864c8da551d3.bundle.js} +1 -1
- package/dist/96.53f0a874878aedfa987a.bundle.js +1 -0
- package/dist/{bundle.3aedab803b7c4896e885.bundle.js → bundle.7ee600c0c4eb8eee72fc.bundle.js} +2 -2
- package/dist/css/aclmanagement.css +5 -0
- package/dist/css/clustermanagement.css +5 -1
- package/dist/css/create-similarity-index.css +4 -0
- package/dist/css/graphs-config.css +4 -0
- package/dist/css/jdbc-create.css +4 -0
- package/dist/css/lib/ontotext-yasgui-web-component.css +4 -0
- package/dist/css/sparql-templates.css +4 -0
- package/dist/i18n/locale-en.json +2 -1
- package/dist/i18n/locale-fr.json +2 -1
- package/dist/index.html +3 -3
- 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 +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +4 -4
- package/dist/pages/aclmanagement.html +2 -2
- 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 +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +8 -5
- 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 +8 -8
- 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 +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- 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-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/webapi.html +2 -2
- package/dist/plugins.js +16 -23
- package/dist/res/swagger/index.html +27 -27
- package/package.json +2 -2
- package/dist/12.75466fc44ea53c351a67.bundle.js +0 -1
- package/dist/123.2610627b06c4276727b1.bundle.js +0 -1
- package/dist/21.6fc8ebce5e63eedb5f9e.bundle.js +0 -1
- package/dist/242.eafa039a4e07364e4a8f.bundle.js +0 -1
- package/dist/25.f5a19d06088f0938fc9f.bundle.js +0 -1
- package/dist/26.85a305c95834a8a1a05a.bundle.js +0 -1
- package/dist/31.2c95be2edb9c756e0f13.bundle.js +0 -1
- package/dist/5.f58f4e96c07a6a7a0e06.bundle.js +0 -1
- package/dist/96.e01346a08ab153a02364.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[10,51,85,211,217],{103:function(e,t,s){"use strict";s.r(t),s.d(t,"ACListModel",(function(){return l})),s.d(t,"ACRuleModel",(function(){return n})),s.d(t,"StatementACRuleModel",(function(){return r})),s.d(t,"PluginACRuleModel",(function(){return i})),s.d(t,"ClearGraphACRuleModel",(function(){return a})),s.d(t,"SystemACRuleModel",(function(){return c})),s.d(t,"ACL_POLICY",(function(){return d})),s.d(t,"ACL_OPERATION",(function(){return p})),s.d(t,"ACL_SCOPE",(function(){return h})),s.d(t,"DEFAULT_CONTEXT_VALUES",(function(){return R})),s.d(t,"DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES",(function(){return _})),s.d(t,"DEFAULT_URI_VALUES",(function(){return g}));var o=s(63);class l{constructor(e=[]){this._aclRules=new Map,e.forEach(e=>{const t=e.scope;this._aclRules.has(t)||this._aclRules.set(t,[]),this._aclRules.get(t).push(e)})}size(e){return this._aclRules.get(e)&&this._aclRules.get(e).length}appendNewRule(e,t,s,o,l,n,r,i,a){const c=u.createRule(e,t,s,o,l,n,r,i,a);this._aclRules.has(e)||this._aclRules.set(e,[]),this._aclRules.get(e).push(c)}addRule(e,t){const s=this._aclRules.get(e);s?s.splice(t,0,u.createRule(e)):this._aclRules.set(e,[u.createRule(e)])}removeRule(e,t){const s=this._aclRules.get(e);s&&s.splice(t,1)}replaceRule(e,t,s){const o=this._aclRules.get(e);o&&o.splice(t,1,s)}getRule(e,t){const s=this._aclRules.get(e);return s?s[t]:null}isRuleDuplicated(e,t){const s=this.getRule(e,t);return!!s&&this._aclRules.get(e).some((e,l)=>l!==t&&Object(o.isEqual)(s,e))}getRuleCopy(e,t){const s=this.getRule(e,t);return u.createRule(s.scope,s.policy,s.role,s.operation,s.subject,s.predicate,s.object,s.context,s.plugin)}moveUp(e,t){const s=this._aclRules.get(e),o=s[t-1];s[t-1]=s[t],s[t]=o}moveDown(e,t){const s=this._aclRules.get(e),o=s[t+1];s[t+1]=s[t],s[t]=o}toJSON(){const e=[];return this._aclRules.forEach(t=>{t.forEach(t=>e.push(t.toJSON()))}),e}get aclRules(){return this._aclRules}set aclRules(e){this._aclRules=e}getRulesByScope(e){return this._aclRules.get(e)||[]}getRuleKeysByScope(e){return Object.keys(this.getRulesByScope(e)[0]||{})}}class n{constructor(e,t,s=d.ALLOW){this._scope=e,this._role=t,this._policy=s}get scope(){return this._scope}set scope(e){this._scope=e}get roleWithoutCustomPrefix(){return this._role.startsWith("!")?this._role.replace("CUSTOM_"," "):this._role.replace("CUSTOM_","")}get role(){return this._role}set role(e){this._role=e}get policy(){return this._policy}set policy(e){this._policy=e}toJSON(){}}class r extends n{constructor(e,t,s,o,l,n,r){super(h.STATEMENT,e,t),this._subject=s||"*",this._predicate=o||"*",this._object=l||"*",this._context=n||"*",this._operation=r||p.ALL}get subject(){return this._subject}set subject(e){this._subject=e}get predicate(){return this._predicate}set predicate(e){this._predicate=e}get object(){return this._object}set object(e){this._object=e}get context(){return this._context}set context(e){this._context=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,subject:this.subject,predicate:this.predicate,object:this.object,context:this.context}}}class i extends n{constructor(e,t,s,o){super(h.PLUGIN,e,t),this._plugin=s||"*",this._operation=o||p.ALL}get plugin(){return this._plugin}set plugin(e){this._plugin=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,plugin:this.plugin}}}class a extends n{constructor(e,t,s,o){super(h.CLEAR_GRAPH,e,t),this._context=s||"*",this._defaultResults=o||["*","default","custom"]}get context(){return this._context}set context(e){this._context=e}get defaultResults(){return this._defaultResults}set defaultResults(e){this._defaultResults=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,context:this.context}}}class c extends n{constructor(e,t,s){super(h.SYSTEM,e,t),this._operation=s||p.ALL}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation}}}class u{static createRule(e,t,s,o,l,n,u,d,p){switch(e){case h.STATEMENT:return new r(s,t,l,n,u,d,o);case h.PLUGIN:return new i(s,t,p,o);case h.CLEAR_GRAPH:return new a(s,t,d);case h.SYSTEM:return new c(s,t,o);default:throw new Error("Invalid scope: "+e+" provided")}}}const d={ALLOW:"allow",DENY:"deny"},p={READ:"read",WRITE:"write",ALL:"*"},h={STATEMENT:"statement",CLEAR_GRAPH:"clear_graph",PLUGIN:"plugin",SYSTEM:"system"},R=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],_=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"all",description:"acl_management.defaults.all"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],g=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"}]},128:function(e,t){angular.module("graphdb.framework.rest.aclmanagement.service",[]).factory("AclManagementRestService",s),s.$inject=["$http"];function s(e){return{getAcl:function(t){return e.get(`rest/repositories/${t}/acl`)},updateAcl:function(t,s){return e.put(`rest/repositories/${t}/acl`,s)}}}},129:function(e,t,s){"use strict";s.r(t),s.d(t,"mapAclRulesResponse",(function(){return l}));var o=s(103);const l=e=>{const t=new o.ACListModel;return e&&e.data&&e.data.forEach(e=>{t.appendNewRule(e.scope,e.policy,e.role,e.operation,e.subject,e.predicate,e.object,e.context,e.plugin)}),t}},199:function(e,t,s){"use strict";s.r(t);s(34),s(128);var o=s(129),l=s(63),n=s(75),r=s(103);function i(e,t,s,i,a,c,u,d,p){e.contextValue=void 0;const h=[];e.ruleData={},e.loading=!1,e.namespaces=[],e.rulesModel=void 0,e.rulesModelCopy=void 0,e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.editedRuleCopy=void 0,e.isNewRule=!1,e.modelIsDirty=!1,e.dirtyScope=new Set,e.activeTabScope=r.ACL_SCOPE.STATEMENT,e.ACL_SCOPE=r.ACL_SCOPE,e.DEFAULT_CONTEXT_VALUES=r.DEFAULT_CONTEXT_VALUES,e.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES=r.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES,e.DEFAULT_URI_VALUES=r.DEFAULT_URI_VALUES,e.rowHeights={},e.isEditMode=()=>void 0===e.editedRuleIndex&&e.rulesModel&&e.modelIsDirty&&e.dirtyScope.size>0,e.addRule=(t,s)=>{e.rulesModel.addRule(t,s),e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!0,f(t)},e.editRule=(t,s)=>{e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!1,e.editedRuleCopy=e.rulesModel.getRuleCopy(t,s),e.getRowHeight="height: "+e.rowHeights[e.editedRuleIndex],f(t)},e.deleteRule=(t,s)=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.delete_rule_confirmation",{index:s+1}),()=>{e.rulesModel.removeRule(t,s),f(t)})},e.saveRule=t=>{e.rulesModel.isRuleDuplicated(e.editedRuleScope,e.editedRuleIndex)?v():(e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.isNewRule=!1,f(t))},e.cancelEditing=(t,s)=>{e.isNewRule?(e.rulesModel.removeRule(t,s),e.isNewRule=!1):(e.rulesModel.replaceRule(t,s,e.editedRuleCopy),e.editedRuleCopy=void 0),e.editedRuleIndex=void 0,e.editedRuleScope=void 0,f(t)},e.moveUp=(t,s)=>{e.rulesModel.moveUp(t,s),e.selectedRule=s-1,f(t)},e.moveDown=(t,s)=>{e.rulesModel.moveDown(t,s),e.selectedRule=s+1,f(t)},e.saveAcl=()=>{e.loading=!0,_().then(R).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.updating_rules"))}).finally(()=>{e.loading=!1})},e.cancelAclSave=()=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.revert_acl_list"),()=>{g(),s.success(c.instant("acl_management.rulestable.messages.rules_reverted"))})},e.switchTab=(t,s)=>{void 0===e.editedRuleIndex?(e.activeTabScope=s,e.ruleKeys=e.rulesModel.getRuleKeysByScope(e.activeTabScope)):t.preventDefault()},e.setDirty=function(e){f(e)},e.performSearchActionOnEnter=function(t,s,o){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),e.triggerValidation(o),o.$valid&&e.saveRule(s))},e.triggerValidation=function(e){angular.forEach(e,(function(e){"object"==typeof e&&e.hasOwnProperty("$modelValue")&&e.$setTouched()}))};const R=()=>{const t=A();return i.getAcl(t).then(t=>{e.rulesModel=Object(o.mapAclRulesResponse)(t),e.rulesModelCopy=Object(o.mapAclRulesResponse)(t),m()}).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.loading_rules"))})},_=()=>{const t=A();return i.updateAcl(t,e.rulesModel.toJSON()).then(()=>{s.success(c.instant("acl_management.rulestable.messages.rules_updated"))})},g=()=>{A()&&(e.loading=!0,R().finally(()=>{e.loading=!1}))},m=()=>{e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.modelIsDirty=!1,e.editedRuleCopy=void 0,e.dirtyScope.clear()},f=t=>{!Object(l.isEqual)(e.rulesModel.getRulesByScope(t),e.rulesModelCopy.getRulesByScope(t))?e.dirtyScope.add(t):e.dirtyScope.delete(t),e.modelIsDirty=e.dirtyScope.size>0},A=()=>a.getActiveRepository(),v=()=>{s.error(c.instant("acl_management.errors.duplicated_rules"))},y=t=>{e.modelIsDirty&&(t.returnValue=!0)},S=()=>{window.removeEventListener("beforeunload",y),h.forEach(e=>e())},E=(s,o)=>{e.modelIsDirty&&(s.preventDefault(),u.openSimpleModal({title:c.instant("common.confirm"),message:c.instant("acl_management.rulestable.messages.unsaved_changes_confirmation"),warning:!0}).result.then((function(){S();const e=t.absUrl().length-t.url().length,s=o.substring(e);t.path(s)}),(function(){})))},L=()=>{e.getAutocompletePromise=p.checkAutocompleteStatus()};a.getActiveRepository()&&d.getNamespaces(a.getActiveRepository()).then(n.mapNamespacesResponse).then(t=>{e.namespaces=t}).catch(e=>{const t=getError(e);s.error(t,c.instant("error.getting.namespaces.for.repo"))}),h.push(e.$on("autocompleteStatus",L)),h.push(e.$watch(A,()=>{m(),g()})),h.push(e.$on("$locationChangeStart",E)),h.push(e.$on("$destroy",S)),window.addEventListener("beforeunload",y)}angular.module("graphdb.framework.aclmanagement.controllers",["graphdb.framework.rest.plugins.service","graphdb.framework.rest.aclmanagement.service"]).controller("AclManagementCtrl",i),i.$inject=["$scope","$location","toastr","AclManagementRestService","$repositories","$translate","ModalService","RDF4JRepositoriesRestService","AutocompleteRestService"]},75:function(e,t,s){"use strict";s.r(t),s.d(t,"mapNamespacesResponse",(function(){return o}));const o=e=>e&&e.data?e.data.results.bindings.map(e=>({prefix:e.prefix.value,uri:e.namespace.value})):[]}}]);
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[10,51,85,211,217],{103:function(e,t,s){"use strict";s.r(t),s.d(t,"ACListModel",(function(){return l})),s.d(t,"ACRuleModel",(function(){return n})),s.d(t,"StatementACRuleModel",(function(){return r})),s.d(t,"PluginACRuleModel",(function(){return i})),s.d(t,"ClearGraphACRuleModel",(function(){return a})),s.d(t,"SystemACRuleModel",(function(){return c})),s.d(t,"ACL_POLICY",(function(){return d})),s.d(t,"ACL_OPERATION",(function(){return p})),s.d(t,"ACL_SCOPE",(function(){return h})),s.d(t,"DEFAULT_CONTEXT_VALUES",(function(){return R})),s.d(t,"DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES",(function(){return _})),s.d(t,"DEFAULT_URI_VALUES",(function(){return g}));var o=s(63);class l{constructor(e=[]){this._aclRules=new Map,e.forEach(e=>{const t=e.scope;this._aclRules.has(t)||this._aclRules.set(t,[]),this._aclRules.get(t).push(e)})}size(e){return this._aclRules.get(e)&&this._aclRules.get(e).length}appendNewRule(e,t,s,o,l,n,r,i,a){const c=u.createRule(e,t,s,o,l,n,r,i,a);this._aclRules.has(e)||this._aclRules.set(e,[]),this._aclRules.get(e).push(c)}addRule(e,t){const s=this._aclRules.get(e);s?s.splice(t,0,u.createRule(e)):this._aclRules.set(e,[u.createRule(e)])}removeRule(e,t){const s=this._aclRules.get(e);s&&s.splice(t,1)}replaceRule(e,t,s){const o=this._aclRules.get(e);o&&o.splice(t,1,s)}getRule(e,t){const s=this._aclRules.get(e);return s?s[t]:null}isRuleDuplicated(e,t){const s=this.getRule(e,t);return!!s&&this._aclRules.get(e).some((e,l)=>l!==t&&Object(o.isEqual)(s,e))}getRuleCopy(e,t){const s=this.getRule(e,t);return u.createRule(s.scope,s.policy,s.role,s.operation,s.subject,s.predicate,s.object,s.context,s.plugin)}moveUp(e,t){const s=this._aclRules.get(e),o=s[t-1];s[t-1]=s[t],s[t]=o}moveDown(e,t){const s=this._aclRules.get(e),o=s[t+1];s[t+1]=s[t],s[t]=o}toJSON(){const e=[];return this._aclRules.forEach(t=>{t.forEach(t=>e.push(t.toJSON()))}),e}get aclRules(){return this._aclRules}set aclRules(e){this._aclRules=e}getRulesByScope(e){return this._aclRules.get(e)||[]}getRuleKeysByScope(e){return Object.keys(this.getRulesByScope(e)[0]||{})}}class n{constructor(e,t,s=d.ALLOW){this._scope=e,this._role=t,this._policy=s}get scope(){return this._scope}set scope(e){this._scope=e}get roleWithoutCustomPrefix(){return this._role.startsWith("!")?this._role.replace("CUSTOM_"," "):this._role.replace("CUSTOM_","")}get role(){return this._role}set role(e){this._role=e}get policy(){return this._policy}set policy(e){this._policy=e}toJSON(){}}class r extends n{constructor(e,t,s,o,l,n,r){super(h.STATEMENT,e,t),this._subject=s||"*",this._predicate=o||"*",this._object=l||"*",this._context=n||"*",this._operation=r||p.ALL}get subject(){return this._subject}set subject(e){this._subject=e}get predicate(){return this._predicate}set predicate(e){this._predicate=e}get object(){return this._object}set object(e){this._object=e}get context(){return this._context}set context(e){this._context=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,subject:this.subject,predicate:this.predicate,object:this.object,context:this.context}}}class i extends n{constructor(e,t,s,o){super(h.PLUGIN,e,t),this._plugin=s||"*",this._operation=o||p.ALL}get plugin(){return this._plugin}set plugin(e){this._plugin=e}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation,plugin:this.plugin}}}class a extends n{constructor(e,t,s,o){super(h.CLEAR_GRAPH,e,t),this._context=s||"*",this._defaultResults=o||["*","default","custom"]}get context(){return this._context}set context(e){this._context=e}get defaultResults(){return this._defaultResults}set defaultResults(e){this._defaultResults=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,context:this.context}}}class c extends n{constructor(e,t,s){super(h.SYSTEM,e,t),this._operation=s||p.ALL}get operation(){return this._operation}set operation(e){this._operation=e}toJSON(){return{scope:this.scope,policy:this.policy,role:this.role,operation:this.operation}}}class u{static createRule(e,t,s,o,l,n,u,d,p){switch(e){case h.STATEMENT:return new r(s,t,l,n,u,d,o);case h.PLUGIN:return new i(s,t,p,o);case h.CLEAR_GRAPH:return new a(s,t,d);case h.SYSTEM:return new c(s,t,o);default:throw new Error("Invalid scope: "+e+" provided")}}}const d={ALLOW:"allow",DENY:"deny"},p={READ:"read",WRITE:"write",ALL:"*"},h={STATEMENT:"statement",CLEAR_GRAPH:"clear_graph",PLUGIN:"plugin",SYSTEM:"system"},R=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],_=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"},{type:"default",value:"all",description:"acl_management.defaults.all"},{type:"default",value:"default",description:"acl_management.defaults.default"},{type:"default",value:"named",description:"acl_management.defaults.named"}],g=[{type:"default",value:"*",description:"acl_management.defaults.asterisk"}]},128:function(e,t){angular.module("graphdb.framework.rest.aclmanagement.service",[]).factory("AclManagementRestService",s),s.$inject=["$http"];function s(e){return{getAcl:function(t){return e.get(`rest/repositories/${t}/acl`)},updateAcl:function(t,s){return e.put(`rest/repositories/${t}/acl`,s)}}}},129:function(e,t,s){"use strict";s.r(t),s.d(t,"mapAclRulesResponse",(function(){return l}));var o=s(103);const l=e=>{const t=new o.ACListModel;return e&&e.data&&e.data.forEach(e=>{t.appendNewRule(e.scope,e.policy,e.role,e.operation,e.subject,e.predicate,e.object,e.context,e.plugin)}),t}},199:function(e,t,s){"use strict";s.r(t);s(34),s(128);var o=s(129),l=s(63),n=s(75),r=s(103);function i(e,t,s,i,a,c,u,d,p){e.contextValue=void 0;const h=[];e.ruleData={},e.loading=!1,e.namespaces=[],e.rulesModel=void 0,e.rulesModelCopy=void 0,e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.editedRuleCopy=void 0,e.isNewRule=!1,e.modelIsDirty=!1,e.dirtyScope=new Set,e.activeTabScope=r.ACL_SCOPE.STATEMENT,e.ACL_SCOPE=r.ACL_SCOPE,e.DEFAULT_CONTEXT_VALUES=r.DEFAULT_CONTEXT_VALUES,e.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES=r.DEFAULT_CLEAR_GRAPH_CONTEXT_VALUES,e.DEFAULT_URI_VALUES=r.DEFAULT_URI_VALUES,e.rowHeights={},e.isEditMode=()=>void 0===e.editedRuleIndex&&e.rulesModel&&e.modelIsDirty&&e.dirtyScope.size>0,e.addRule=(t,s)=>{e.rulesModel.addRule(t,s),e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!0,f(t)},e.editRule=(t,s)=>{e.editedRuleIndex=s,e.editedRuleScope=t,e.isNewRule=!1,e.editedRuleCopy=e.rulesModel.getRuleCopy(t,s),e.getRowHeight="height: "+e.rowHeights[e.editedRuleIndex],f(t)},e.deleteRule=(t,s)=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.delete_rule_confirmation",{index:s+1}),()=>{e.rulesModel.removeRule(t,s),f(t)})},e.saveRule=t=>{e.rulesModel.isRuleDuplicated(e.editedRuleScope,e.editedRuleIndex)?v():(e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.isNewRule=!1,f(t))},e.cancelEditing=(t,s)=>{e.isNewRule?(e.rulesModel.removeRule(t,s),e.isNewRule=!1):(e.rulesModel.replaceRule(t,s,e.editedRuleCopy),e.editedRuleCopy=void 0),e.editedRuleIndex=void 0,e.editedRuleScope=void 0,f(t)},e.moveUp=(t,s)=>{e.rulesModel.moveUp(t,s),f(t),e.modelIsDirty?e.selectedRule=s-1:e.selectedRule=void 0},e.moveDown=(t,s)=>{e.rulesModel.moveDown(t,s),f(t),e.modelIsDirty?e.selectedRule=s+1:e.selectedRule=void 0},e.saveAcl=()=>{e.loading=!0,_().then(R).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.updating_rules"))}).finally(()=>{e.loading=!1})},e.cancelAclSave=()=>{u.openConfirmation(c.instant("common.confirm"),c.instant("acl_management.rulestable.messages.revert_acl_list"),()=>{g(),s.success(c.instant("acl_management.rulestable.messages.rules_reverted"))})},e.switchTab=(t,s)=>{void 0===e.editedRuleIndex?(e.selectedRule=void 0,e.activeTabScope=s,e.ruleKeys=e.rulesModel.getRuleKeysByScope(e.activeTabScope)):t.preventDefault()},e.setDirty=function(e){f(e)},e.performSearchActionOnEnter=function(t,s,o){13===t.keyCode&&(t.stopPropagation(),t.preventDefault(),e.triggerValidation(o),o.$valid&&e.saveRule(s))},e.triggerValidation=function(e){angular.forEach(e,(function(e){"object"==typeof e&&e.hasOwnProperty("$modelValue")&&e.$setTouched()}))};const R=()=>{const t=A();return i.getAcl(t).then(t=>{e.rulesModel=Object(o.mapAclRulesResponse)(t),e.rulesModelCopy=Object(o.mapAclRulesResponse)(t),m()}).catch(e=>{const t=getError(e);s.error(t,c.instant("acl_management.errors.loading_rules"))})},_=()=>{const t=A();return i.updateAcl(t,e.rulesModel.toJSON()).then(()=>{s.success(c.instant("acl_management.rulestable.messages.rules_updated"))})},g=()=>{A()&&(e.loading=!0,R().finally(()=>{e.loading=!1}))},m=()=>{e.selectedRule=void 0,e.editedRuleIndex=void 0,e.editedRuleScope=void 0,e.modelIsDirty=!1,e.editedRuleCopy=void 0,e.dirtyScope.clear()},f=t=>{!Object(l.isEqual)(e.rulesModel.getRulesByScope(t),e.rulesModelCopy.getRulesByScope(t))?e.dirtyScope.add(t):e.dirtyScope.delete(t),e.modelIsDirty=e.dirtyScope.size>0},A=()=>a.getActiveRepository(),v=()=>{s.error(c.instant("acl_management.errors.duplicated_rules"))},y=t=>{e.modelIsDirty&&(t.returnValue=!0)},S=()=>{window.removeEventListener("beforeunload",y),h.forEach(e=>e())},E=(s,o)=>{e.modelIsDirty&&(s.preventDefault(),u.openSimpleModal({title:c.instant("common.confirm"),message:c.instant("acl_management.rulestable.messages.unsaved_changes_confirmation"),warning:!0}).result.then((function(){S();const e=t.absUrl().length-t.url().length,s=o.substring(e);t.path(s)}),(function(){})))},L=()=>{e.getAutocompletePromise=p.checkAutocompleteStatus()};a.getActiveRepository()&&d.getNamespaces(a.getActiveRepository()).then(n.mapNamespacesResponse).then(t=>{e.namespaces=t}).catch(e=>{const t=getError(e);s.error(t,c.instant("error.getting.namespaces.for.repo"))}),h.push(e.$on("autocompleteStatus",L)),h.push(e.$watch(A,()=>{m(),g()})),h.push(e.$on("$locationChangeStart",E)),h.push(e.$on("$destroy",S)),window.addEventListener("beforeunload",y)}angular.module("graphdb.framework.aclmanagement.controllers",["graphdb.framework.rest.plugins.service","graphdb.framework.rest.aclmanagement.service"]).controller("AclManagementCtrl",i),i.$inject=["$scope","$location","toastr","AclManagementRestService","$repositories","$translate","ModalService","RDF4JRepositoriesRestService","AutocompleteRestService"]},75:function(e,t,s){"use strict";s.r(t),s.d(t,"mapNamespacesResponse",(function(){return o}));const o=e=>e&&e.data?e.data.results.bindings.map(e=>({prefix:e.prefix.value,uri:e.namespace.value})):[]}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{227:function(e,t){const n=(e,t,n,l)=>{e.$location.url("/hierarchy"),e.$route.reload(),e.GuideUtils.waitFor(t,3).then(()=>{e.GuideUtils.classHierarchyFocus(t),e.GuideUtils.deferredShow(500)().then(()=>n())}).catch(e=>l(e))};PluginRegistry.add("guide.step",[{guideBlockName:"class-hierarchy",getSteps:(e,t)=>{const n=t.GuideUtils;e.mainAction="class-hierarchy";const l=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"class-hierarchy",showIntro:!0},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class_hierarchy_intro.content",url:"/hierarchy",elementSelector:"#classChart",placement:"left"},e)}];return e.introExtraContent&&l.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"",extraContent:e.introExtraContent,url:"/hierarchy",elementSelector:"#classChart #main-group",class:"clas-hierarchy-intro-guide-dialog",placement:"left"},e)}),angular.isArray(e.zoomIris)&&e.zoomIris.forEach(t=>{const
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{227:function(e,t){const n=(e,t,n,l)=>{e.$location.url("/hierarchy"),e.$route.reload(),e.GuideUtils.waitFor(t,3).then(()=>{e.GuideUtils.classHierarchyFocus(t),e.GuideUtils.deferredShow(500)().then(()=>n())}).catch(e=>l(e))};PluginRegistry.add("guide.step",[{guideBlockName:"class-hierarchy",getSteps:(e,t)=>{const n=t.GuideUtils;e.mainAction="class-hierarchy";const l=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"class-hierarchy",showIntro:!0},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class_hierarchy_intro.content",url:"/hierarchy",elementSelector:"#classChart",placement:"left"},e)}];return e.introExtraContent&&l.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"",extraContent:e.introExtraContent,url:"/hierarchy",elementSelector:"#classChart #main-group",class:"clas-hierarchy-intro-guide-dialog",placement:"left"},e)}),angular.isArray(e.zoomIris)&&e.zoomIris.forEach(t=>{const i=n.getGuideElementSelector("class-"+t.iri);l.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class_hierarchy_zoom.content",url:"/hierarchy",placement:"left",elementSelector:i,class:"class-hierarchy-zoom-content-guide-dialog",onNextClick:(e,t)=>{n.classHierarchyZoom(t.elementSelector),e.next()}},e,t)}),t.postExtraContent&&l.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"",extraContent:t.postExtraContent,url:"/hierarchy",placement:"left",beforeShowPromise:n.deferredShow(800),elementSelector:i,class:"class-hierarchy-instances-guide-dialog"},e)})}),l}},{guideBlockName:"class-hierarchy-instances",getSteps:(e,t)=>{const l=t.GuideUtils,i=t.$location,c=t.$route;e.title="guide.step_plugin.class-hierarchy-instances.title";const a=l.getGuideElementSelector("close-info-panel"),s=l.getGuideElementSelector("class-"+e.iri),o=[{guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances.content",url:"/hierarchy",elementSelector:s,class:"class-hierarchy-instance-guide-dialog",placement:"top",onNextClick:e=>{l.classHierarchyFocus(s),e.next()},initPreviousStep:()=>new Promise((e,t)=>{l.isVisible(a)?e():n({$location:i,$route:c,GuideUtils:l},s,e,t)})},e)},{guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-side-panel.content",url:"/hierarchy",elementSelector:".rdf-info-side-panel div",class:"class-hierarchy-side-panel-info-guide-dialog",canBePaused:!1,placement:"left",beforeShowPromise:l.deferredShow(800),onPreviousClick:()=>new Promise((function(e){l.waitFor(a,1).then(()=>$(a).trigger("click")),e()}))},e)}];angular.isArray(e.focusInstances)&&e.focusInstances.forEach(t=>{angular.isObject(t)||(t={instance:t}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-focus.content",url:"/hierarchy",canBePaused:!1,elementSelector:l.getGuideElementSelector("instance-"+t.instance),class:"class-hierarchy-side-bar-instance-info-guide-dialog",focusInstance:t.instance,extraContent:t.message},e)})});const r=l.getGuideElementSelector("instances-count");return e.followCountLink&&(o.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-count.content",url:"/hierarchy",canBePaused:!1,elementSelector:r,class:"class-hierarchy-side-panel-instances-count-guide-dialog",onNextClick:(e,t)=>{l.waitFor(t.elementSelector,3).then(()=>$(t.elementSelector).trigger("click")),e.next()}},e)}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-query.content",url:"/sparql",elementSelector:l.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,beforeShowPromise:()=>l.waitFor(l.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,3).then(()=>l.deferredShow(500)()),class:"class-hierarchy-instances-query-guide-dialog",scrollToHandler:l.scrollToTop},e)}),o.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-results.content",extraContent:!1!==e.showExtraCommentSparql?"guide.step_plugin.class-hierarchy-instances-results.extraContent":null,url:"/sparql",placement:"top",elementSelector:l.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,class:"class-hierarchy-instances-results-guide-dialog",fileName:e.fileName,scrollToHandler:l.scrollToTop,onNextClick:e=>{window.history.back(),e.next()},initPreviousStep:()=>Promise.resolve()},e)})),o.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.class-hierarchy-instances-side-panel-close.content",url:"/hierarchy",canBePaused:!1,elementSelector:a,class:"class-hierarchy-side-panel-close-guide-dialog",placement:"left",beforeShowPromise:e.followCountLink?l.deferredShow(1500):Promise.resolve(),advanceOn:{selector:a,event:"click"},onNextClick:()=>l.waitFor(a,3).then(()=>$(a).trigger("click")),initPreviousStep:(t,a)=>new Promise((o,u)=>{t.ShepherdService.getCurrentStepId()===a&&e.followCountLink?l.waitFor(r,3).then(()=>{$(r).trigger("click"),l.waitFor(l.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,3).then(()=>{l.deferredShow(50)().then(()=>o()).catch(e=>u(e))}).catch(e=>u(e)),o()}).catch(e=>u(e)):n({$location:i,$route:c,GuideUtils:l},s,o,u)})},e)}),o}}])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[12,96],{141:function(t,e,n){"use strict";n.r(e),n.d(e,"clusterColors",(function(){return r})),n.d(e,"font",(function(){return s})),n.d(e,"shortMessageLimit",(function(){return a})),n.d(e,"createClusterSvgElement",(function(){return c})),n.d(e,"createClusterZone",(function(){return i})),n.d(e,"setCreateClusterZone",(function(){return d})),n.d(e,"updateClusterZoneLabels",(function(){return l})),n.d(e,"moveElement",(function(){return u})),n.d(e,"createNodes",(function(){return f})),n.d(e,"updateNodes",(function(){return p})),n.d(e,"createLinks",(function(){return g})),n.d(e,"updateLinks",(function(){return S})),n.d(e,"setLinkColor",(function(){return m})),n.d(e,"setLinkStyle",(function(){return N})),n.d(e,"positionNodesOnClusterZone",(function(){return O}));var o=n(110);const r={ontoOrange:"var(--primary-color)",ontoBlue:"var(--secondary-color)",ontoGreen:"var(--tertiary-color)",ontoGrey:"var(--gray-color)"},s={FONT_AWESOME:"FONT_AWESOME",ICOMOON:"ICOMOON"},a=40;function c(t){return d3.select(t).append("svg")}function i(t){const e=t.append("g");return e.append("circle").classed("cluster-zone",!0).style("fill","transparent").style("stroke-width","2"),e}function d(t,e,n,o=!1){if(e.select(".cluster-zone").classed("no-cluster",!t).classed("has-access",o),t)e.selectAll("#no-cluster-zone").remove();else{const t=e.append("g").attr("id","no-cluster-zone");t.append("text").attr("id","no-cluster-label").text(n.no_cluster_configured).attr("y",-50).classed("h2",!0).style("text-anchor","middle"),o&&t.append("text").attr("id","create-cluster-label").classed("h3",!0).text(n.create_cluster_btn).style("text-anchor","middle"),t.append("text").attr("y",130).attr("class","icon-any repo").attr("fill",r.ontoOrange).style("text-anchor","middle").classed("settings-icon",!0).text("")}}function l(t,e,n){t||(e.select("#no-cluster-zone #no-cluster-label").text(n.no_cluster_configured),e.select("#no-cluster-zone #create-cluster-label").text(n.create_cluster_btn))}function u(t,e,n){t.attr("transform",()=>`translate(${e}, ${n})`)}function f(t,e,n){const o=t.enter().append("g").attr("id","node-group").classed("legend",n),r=o.merge(t).attr("id","node-group").classed("legend",n);return function(t,e){const n=Math.sqrt(3)/2,o=[[e+0,0],[e/2+0,e*n+0],[-e/2+0,e*n+0],[0-e,0],[-e/2+0,-e*n+0],[e/2+0,-e*n+0],[e+0,0],[e/2+0,e*n+0]];t.selectAll("path.area").data([o]).enter().append("path").attr("class","node member").attr("d",d3.line())}(o,e),t.exit().remove(),o.append("text").attr("class","icon-any node-icon"),function(t,e,n){const o=t.append("g");n?o.append("foreignObject").attr("y",e).attr("x",-e).attr("width",2*e).attr("height",10).attr("class","label-wrapper").append("xhtml:div").attr("class","id id-host"):(o.append("rect").attr("class","id-host-background").attr("rx",6),o.append("rect").attr("class","node-info-background").attr("rx",6),o.append("text").attr("y",e+15).attr("class","id id-host"),o.append("text").attr("y",e+45).attr("class","node-info-text"))}(o,e,n),r}function p(t){!function(t){t.select(".node-icon").each((function(t){const e=(n=t,_.isEmpty(n.recoveryStatus)?function(t){if(t.nodeState===o.NodeState.LEADER)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.FOLLOWER)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.CANDIDATE)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.NO_CONNECTION)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.OUT_OF_SYNC)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.READ_ONLY)return{icon:"",font:s.ICOMOON};if(t.nodeState===o.NodeState.RESTRICTED)return{icon:"",font:s.ICOMOON};return{icon:"",font:""}}(t):function(t){if(_.isEmpty(t.recoveryStatus))return"";switch(t.recoveryStatus.state){case o.RecoveryState.SEARCHING_FOR_NODE:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.WAITING_FOR_SNAPSHOT:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.RECEIVING_SNAPSHOT:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.APPLYING_SNAPSHOT:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.BUILDING_SNAPSHOT:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.SENDING_SNAPSHOT:return{icon:"",font:s.FONT_AWESOME};case o.RecoveryState.RECOVERY_OPERATION_FAILURE_WARNING:return{icon:"",font:s.ICOMOON};default:return{icon:"",font:""}}}(t));var n;d3.select(this).classed("icon-any",e.font===s.ICOMOON).classed("fa-d3",e.font===s.FONT_AWESOME).text(e.icon)}))}(t),function(t){t.select(".node.member").classed("leader",t=>t.nodeState===o.NodeState.LEADER).classed("follower",t=>t.nodeState===o.NodeState.FOLLOWER).classed("candidate",t=>t.nodeState===o.NodeState.CANDIDATE).classed("other",t=>t.nodeState!==o.NodeState.LEADER&&t.nodeState!==o.NodeState.FOLLOWER&&t.nodeState!==o.NodeState.CANDIDATE)}(t),function(t){t.select(".id.id-host").each((function(t){t.labelNode=this})).text((function(t){return t.hostname})),t.select(".id-host-background").attr("width",(function(t){return d3.select(t.labelNode).node().getBBox().width+10})).attr("height",(function(t){return d3.select(t.labelNode).node().getBBox().height+10})).attr("x",(function(t){return d3.select(t.labelNode).node().getBBox().x-5})).attr("y",(function(t){return d3.select(t.labelNode).node().getBBox().y-5}))}(t),function(t){let e,n;t.select(".node-info-text").each((function(t){t.infoNode=this})).select((function(){return this.parentNode})).append("foreignObject").attr("width",(function(t){if(_.isEmpty(t.recoveryStatus))return 0;const o=y(h(t));return e=o.height,n=o.width,n})).attr("height",(function(t){return _.isEmpty(t.recoveryStatus)?0:e})).attr("x",(function(t){return-n/2})).attr("y",(function(t){return 78})).classed("hidden",(function(t){return _.isEmpty(t.recoveryStatus)})).style("font-size","12px").style("font-weight","400").style("text-align","center").style("padding","4px").style("background","#EEEEEE").style("border-radius","6px").attr("class","node-info-fo").append("xhtml:div").html((function(t){return h(t)})),t.select(".node-info-text").remove(),function(t){t.select(".node-info-fo").on("click",null).on("click",(function(t,e){t.preventDefault(),t.stopPropagation();const n=h(e),o=d3.select(this),r=e.recoveryStatus.message&&e.recoveryStatus.message.length>a&&o.text()!==e.recoveryStatus.message;let s;s=r?y(e.recoveryStatus.message).width:y(n).width,o.attr("width",(function(t){return s})).attr("x",(function(t){return-s/2})).html(`<div>${r?e.recoveryStatus.message:n}</div>`)}))}(t)}(t)}function h(t){return t.recoveryStatus.message&&t.recoveryStatus.message.length>a?t.recoveryStatus.message.substring(0,a)+"...":t.recoveryStatus.message||""}function y(t){const e=document.createElement("div");e.innerHTML=t,e.style.padding="4px",e.style.position="absolute",e.style.visibility="hidden",e.style.fontSize="12px",e.style.fontWeight="400",e.style.textAlign="center",e.style.height="auto",e.style.width="auto",e.style.whiteSpace="nowrap",document.body.appendChild(e);const n=e.getBoundingClientRect(),o=n.height,r=n.width;return document.body.removeChild(e),{height:o,width:r}}function g(t){t.enter().append("path").classed("link",!0),t.exit().remove()}function S(t,e){t.attr("stroke",m).style("stroke-dasharray",N).attr("d",t=>function(t,e){const n=e.find(e=>e.address===t.source),o=e.find(e=>e.address===t.target),r=o.x-n.x,s=o.y-n.y,a=Math.sqrt(r*r+s*s),c=r/a,i=s/a,d=n.x+55*c,l=n.y+55*i,u=o.x-55*c,f=o.y-55*i;return"M"+d+","+l+"L"+u+","+f}(t,e))}function m(t){return t.status===o.LinkState.IN_SYNC||t.status===o.LinkState.SYNCING?r.ontoGreen:t.status===o.LinkState.OUT_OF_SYNC?r.ontoGrey:"none"}function N(t){return t.status===o.LinkState.OUT_OF_SYNC||t.status===o.LinkState.SYNCING?"10 10":"none"}function O(t,e,n,o){t.attr("transform",(r,s)=>{const a=2*Math.PI*s/t.size(),c=e+Math.cos(a)*o,i=n+Math.sin(a)*o;return r.x=c,r.y=i,`translate(${c}, ${i})`})}},200:function(t,e,n){"use strict";n.r(e);n(10);var o=n(141),r=n(110),s=n(402);let a=240;const c=angular.module("graphdb.framework.clustermanagement.directives",["graphdb.framework.utils.localstorageadapter"]),i={no_cluster_configured:"",create_cluster_btn:"",legend_node_state:"",legend_link_state:"",node_state_leader:"Leader",node_state_follower:"Follower",node_state_candidate:"Candidate",node_state_no_cluster:"No cluster",node_state_out_of_sync:"Out of sync",node_state_no_connection:"No connection",node_state_read_only:"Read only",node_state_restricted:"Restricted",link_state_in_sync:"In sync",link_state_syncing:"Syncing",link_state_out_of_sync:"Out of sync",recovery_state:{searching_for_node:"Searching for node",waiting_for_snapshot:"Waiting for snapshot from node",receiving_snapshot:"Receiving a snapshot from node",applying_snapshot:"Applying a snapshot",building_snapshot:"Building a snapshot for node",sending_snapshot:"Sending a snapshot to node",recovery_operation_failure_warning:"Node unable to recover. Action required"}},d={node_state:"legend_node_state",link_state:"legend_link_state"};c.directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$rootScope",function(t,e,n,r,c,f){return{restrict:"A",link:function(p,h){const y=p.isAdmin();function g(t,e=""){Object.keys(t).forEach(n=>{let o="";e&&(o+=e),o+="."+n;const r=t[n];"string"==typeof r?t[n]=c.instant("cluster_management.cluster_graphical_view"+o):"object"==typeof r&&g(r,o)})}function S(){const o="collapsedMenu"===e.get(n.MENU_STATE);return a=o?70:240,Math.max(Math.floor(.95*(t.innerWidth-a)),600)}function m(){return Math.max(.95*(t.innerHeight-250),600)}let N,O,x;p.showLegend=!1,f.$on("$translateChangeSuccess",(function(){g(i),function(){o.updateClusterZoneLabels(v,T,i),Object.keys(d).forEach(t=>{d3.select("#"+t).text(R(t))}),N&&N.remove();F(),B()}()})),p.$on("$destroy",(function(){D.destroy()}));let v,E,T,C,w,k,b=S(),A=m(),L=Math.min(b,A)/2-100,I=b/2,M=A/2;function R(t){return i[d[t]]}function F(){N=E.append("g").attr("id","legend-group").classed("hidden",!p.showLegend).classed("legend-group",!0)}p.width=function(){return b},p.height=function(){return A};const D=Object(s.a)().attr("class","d3-tip").customPosition((function(){const t=k.getBoundingClientRect(),e=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.scrollLeft||document.body.scrollLeft;return{left:t.left+n+"px",top:t.top-30+e+"px"}})).html((function(t){return t.toolTip})),G=function(t,e){k=e,D.show(t,k)},W=function(){k=null,D.hide()};function B(){const t=l(),e=u();!function(t,e){t.forEach(t=>{const e=_.get(i,t.customText);t.toolTip=t.hostname=e}),e.forEach(t=>{t.toolTip=t.linkTypeText=i[t.linkTypeKey]})}(t,e),N.append("rect").attr("id","legend-background").attr("class","legend-background").attr("fill","#EEEEEE");const n=N.append("text").attr("id","node_state").attr("class","id id-host").attr("x",200).attr("y",24).text(R("node_state")),r=N.append("text").attr("id","link_state").attr("class","id id-host").attr("x",200).attr("y",319).text(R("link_state")),s=N.selectAll("#node-group").data(t),a=o.createNodes(s,25,!0);o.updateNodes(a),a.select(".node.member").on("mouseover",(function(t,e){t.stopPropagation(),G(e,this)})).on("mouseout",W),a.attr("transform",(function(t){const e=Math.floor(t.id/4);return`translate(${35+65*(t.id%4)}, ${59+65*e})`})),N.call((function(t){O=t.node().getBBox().width})),n.attr("x",10+O/2),r.attr("x",10+O/2);const c=O/3,d=N.append("g").attr("id","links-group");d.attr("transform","translate(10, 329)"),e.forEach((t,e)=>{const n=c-5,r=d.append("g").classed("link",!0).classed("legend",!0).attr("transform",()=>`translate(${e*c}, 0)`);r.append("path").classed("link",!0).attr("stroke-dasharray",()=>o.setLinkStyle(t)).attr("stroke",()=>o.setLinkColor(t)).attr("d",()=>`M5,0,${n},0`),r.append("foreignObject").attr("y",10).attr("x",5).attr("width",c-10).attr("height",10).attr("class","label-wrapper").append("xhtml:div").attr("class","id id-host").style("font-size","9px").html(t.linkTypeText),r.on("mouseover",(function(e){e.stopPropagation(),G(t,this)})).on("mouseout",W)}),N.call((function(t){x=t.node().getBBox().height,O=t.node().getBBox().width})),N.select(".legend-background").attr("height",x+50).attr("width",O+20).attr("rx","6"),P()}function P(){const t=A-(x+40+50);o.moveElement(N,0,t)}function Y(){L=Math.min(b,A)/2-100,I=b/2,M=A/2,o.moveElement(T,I,M),T.select(".cluster-zone").attr("r",L)}function H(){Y(),v!==p.clusterModel.hasCluster&&(v=!!p.clusterModel.hasCluster,function(t){let e;o.setCreateClusterZone(t,T,i,y),!t&&y&&(e=()=>{p.$apply((function(){p.showCreateClusterDialog()}))}),T.on("mouseup",e)}(v));const t=_.cloneDeep(p.clusterModel.nodes)||[],e=_.cloneDeep(p.clusterModel.links)||[];!function(t){t.forEach(t=>{if(t.hostname=r.shortenIri(t.endpoint),!_.isEmpty(t.recoveryStatus)){let e="cluster_management.cluster_graphical_view.recovery_state."+t.recoveryStatus.state.toLowerCase();t.recoveryStatus.affectedNodes&&t.recoveryStatus.affectedNodes.length>0&&(e+="_with_affected_node"),t.recoveryStatus.message=c.instant(e,{node:t.recoveryStatus.affectedNodes.join(", ")})}});const e=C.selectAll("#node-group").data(t,t=>t.address),n=o.createNodes(e,50);n.on("click",(t,e)=>{p.childContext.selectNode(e);const n=d3.select(".nodetooltip"),o=$(window).width();t.pageX<o/2?(n.style("left",t.pageX+"px"),n.style("right","")):(n.style("left",""),n.style("right",o-t.pageX+"px")),n.style("top",t.pageY-28+"px")}),o.updateNodes(n),o.positionNodesOnClusterZone(n,I,M,L)}(t),function(t,e){const n=w.selectAll(".link").data(t,t=>t.id);o.createLinks(n),o.updateLinks(n,e)}(e,t)}p.childContext.redraw=H,p.childContext.resize=function(){b=S(),A=m(),E.attr("width",b),E.attr("height",A),H(),P()},p.childContext.toggleLegend=()=>{p.showLegend=!p.showLegend,N.classed("hidden",!p.showLegend)},g(i),function(t){E=o.createClusterSvgElement(h[0]).attr("width",b).attr("height",A),E.call(D),T=o.createClusterZone(E,t),w=E.append("g").attr("id","links-group"),C=E.append("g").attr("id","nodes-group"),F()}(!(!p.clusterModel.nodes||!p.clusterModel.nodes.length)),B(),H()}}}]);const l=function(){const t=[];return t.push({nodeState:r.NodeState.LEADER,customText:"node_state_leader"}),t.push({nodeState:r.NodeState.FOLLOWER,customText:"node_state_follower"}),t.push({nodeState:r.NodeState.CANDIDATE,customText:"node_state_candidate"}),t.push({nodeState:r.NodeState.NO_CLUSTER,customText:"node_state_no_cluster"}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"node_state_out_of_sync"}),t.push({nodeState:r.NodeState.NO_CONNECTION,customText:"node_state_no_connection"}),t.push({nodeState:r.NodeState.READ_ONLY,customText:"node_state_read_only"}),t.push({nodeState:r.NodeState.RESTRICTED,customText:"node_state_restricted"}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.searching_for_node",recoveryStatus:{state:r.RecoveryState.SEARCHING_FOR_NODE}}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.waiting_for_snapshot",recoveryStatus:{state:r.RecoveryState.WAITING_FOR_SNAPSHOT}}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.receiving_snapshot",recoveryStatus:{state:r.RecoveryState.RECEIVING_SNAPSHOT}}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.applying_snapshot",recoveryStatus:{state:r.RecoveryState.APPLYING_SNAPSHOT}}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.building_snapshot",recoveryStatus:{state:r.RecoveryState.BUILDING_SNAPSHOT}}),t.push({nodeState:r.NodeState.OUT_OF_SYNC,customText:"recovery_state.sending_snapshot",recoveryStatus:{state:r.RecoveryState.SENDING_SNAPSHOT}}),t.forEach((t,e)=>t.id=e),t},u=function(){const t=[];return t.push({status:r.LinkState.IN_SYNC,linkTypeKey:"link_state_in_sync"}),t.push({status:r.LinkState.SYNCING,linkTypeKey:"link_state_syncing"}),t.push({status:r.LinkState.OUT_OF_SYNC,linkTypeKey:"link_state_out_of_sync"}),t.forEach((t,e)=>t.id=e),t}},402:function(t,e,n){"use strict";e.a=function(){var t=function(){return"n"},e=function(){return[0,0]},n=function(){return" "},o=u(),r=null,s=null,a=null,c=null;function i(t){var e;r="svg"===(e=(e=t).node()).tagName.toLowerCase()?e:e.ownerSVGElement,s=r.createSVGPoint(),document.body.appendChild(o)}i.show=function(){var o=Array.prototype.slice.call(arguments);o[o.length-1]instanceof SVGElement&&(a=o.pop());var r,s=n.apply(this,o),u=e.apply(this,o),p=t.apply(this,o),h=f(),y=l.length,_=document.documentElement.scrollTop||document.body.scrollTop,g=document.documentElement.scrollLeft||document.body.scrollLeft,S=c.apply(this,o);for(h.html(s).style("opacity",1).style("pointer-events","all");y--;)h.classed(l[y],!1);const m=o.filter(t=>t instanceof Event);return r=d.get(p).apply(this,m),S?Object.keys(S).forEach((function(t){h.style(t,S[t])})):h.classed(p,!0).style("top",r.top+u[0]+_+"px").style("left",r.left+u[1]+g+"px"),i},i.hide=function(){return f().style("opacity",0).style("pointer-events","none"),i},i.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().attr(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(f(),n),i},i.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return f().style(t);var n=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(f(),n),i},i.direction=function(e){return arguments.length?(t=null==e?e:h(e),i):t},i.offset=function(t){return arguments.length?(e=null==t?t:h(t),i):e},i.html=function(t){return arguments.length?(n=null==t?t:h(t),i):n},i.customPosition=function(t){return arguments.length?(c=null==t?t:h(t),i):c},i.destroy=function(){return o&&(f().remove(),o=null),i};var d=new Map(Object.entries({n:function(t){var e=p(t);return{top:e.n.y-o.offsetHeight,left:e.n.x-o.offsetWidth/2}},s:function(t){var e=p(t);return{top:e.s.y,left:e.s.x-o.offsetWidth/2}},e:function(t){var e=p(t);return{top:e.e.y-o.offsetHeight/2,left:e.e.x}},w:function(t){var e=p(t);return{top:e.w.y-o.offsetHeight/2,left:e.w.x-o.offsetWidth}},nw:function(t){var e=p(t);return{top:e.nw.y-o.offsetHeight,left:e.nw.x-o.offsetWidth}},ne:function(t){var e=p(t);return{top:e.ne.y-o.offsetHeight,left:e.ne.x}},sw:function(t){var e=p(t);return{top:e.sw.y,left:e.sw.x-o.offsetWidth}},se:function(t){var e=p(t);return{top:e.se.y,left:e.e.x}}})),l=d.keys();function u(){var t=d3.select(document.createElement("div"));return t.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function f(){return null===o&&(o=u(),document.body.appendChild(o)),d3.select(o)}function p(t){for(var e=a||t.target;void 0===e.getScreenCTM&&"undefined"===e.parentNode;)e=e.parentNode;var n={},o=e.getScreenCTM(),r=e.getBBox(),c=r.width,i=r.height,d=r.x,l=r.y;return s.x=d,s.y=l,n.nw=s.matrixTransform(o),s.x+=c,n.ne=s.matrixTransform(o),s.y+=i,n.se=s.matrixTransform(o),s.x-=c,n.sw=s.matrixTransform(o),s.y-=i/2,n.w=s.matrixTransform(o),s.x+=c,n.e=s.matrixTransform(o),s.x-=c/2,s.y-=i/2,n.n=s.matrixTransform(o),s.y+=i,n.s=s.matrixTransform(o),n}function h(t){return"function"==typeof t?t:function(){return t}}return i}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{231:function(e,t){PluginRegistry.add("guide.step",[{guideBlockName:"execute-sparql-query",getSteps:(e,t)=>{const r=t.GuideUtils,n=t.YasguiComponentDirectiveUtil,o=t.toastr,i=t.$translate,u=t.$interpolate,s=t.$location,l=t.$route;e.mainAction="execute-sparql-query";const a=document.createElement("code"),c=document.createElement("button");c.className="btn btn-sm btn-secondary",c.innerText=i.instant("guide.step_plugin.execute-sparql-query.copy-to-editor.button"),c.setAttribute("ng-click","copyQuery()");const p=[{guideBlockName:"click-main-menu",options:angular.extend({},{menu:"sparql",showIntro:!0},e)}],d={"-1":'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nselect * where { \n\t?s ?p ?o .\n?o rdf:type ""\n} limit 100 '};let S=!1;return e.queries.forEach((y,g)=>{const q=y.query;d[g]=q,a.innerText=q,e.queryAsHtmlCodeElement='<div class="shepherd-code">'+a.outerHTML+c.outerHTML+"</div>",p.push({guideBlockName:"input-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.query-editor.content",url:"/sparql",elementSelector:r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,class:"yasgui-query-editor-guide-dialog",beforeShowPromise:()=>n.getOntotextYasguiElementAsync("#query-editor").then(()=>r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR,3)).then(()=>r.deferredShow(500)()).catch(e=>{throw t.toastr.error(t.$translate.instant("guide.unexpected.error.message")),e}),onNextValidate:()=>n.getOntotextYasguiElementAsync("#query-editor").then(e=>e.getQuery().then(t=>({yasgui:e,queryFromEditor:t}))).then(({yasgui:t,queryFromEditor:n})=>{const s=r.removeWhiteSpaces(n);if(s!==r.removeWhiteSpaces(q)){if("select*where{?s?p?o.}limit100"!==s&&!S)return r.noNextErrorToast(o,i,u,"guide.step_plugin.execute-sparql-query.query-not-same.error",e),!1;t.setQuery(q)}return S=!0,!0}),initPreviousStep:()=>new Promise((e,t)=>{if(0===g)n.setQuery("#query-editor","select * where { \n\t?s ?p ?o .\n} limit 100 \n").then(()=>e());else{"/sparql"!==s.url()&&(s.url("/sparql"),l.reload()),r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR).then(()=>{n.executeSparqlQuery("#query-editor",q).then(()=>{e()}).catch(e=>t(e))})}}),scrollToHandler:r.scrollToTop,extraContent:y.queryExtraContent,onScope:e=>{e.copyQuery=()=>n.setQuery("#query-editor",q).then(()=>{})}},e)}),p.push({guideBlockName:"clickable-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.run-sparql-query.content",url:"/sparql",elementSelector:r.CSS_SELECTORS.SPARQL_RUN_BUTTON_SELECTOR,class:"yasgui-run-button-guide-dialog",onNextClick:e=>n.getOntotextYasguiElementAsync("#query-editor").then(t=>{t.query(),e.next()}),scrollToHandler:r.scrollToTop,canBePaused:!1,initPreviousStep:(e,t)=>new Promise((r,o)=>{const i=e.ShepherdService.getPreviousStepFromHistory(t);i.options.initPreviousStep(e,i.options.id).then(()=>{e.ShepherdService.getCurrentStepId()===t?r():n.executeSparqlQuery("#query-editor",q).then(()=>r()).catch(e=>o(e))}).catch(e=>o(e))})},e)}),p.push({guideBlockName:"read-only-element",options:angular.extend({},{content:"guide.step_plugin.execute-sparql-query.result-explain.content",url:"/sparql",placement:"top",elementSelector:r.CSS_SELECTORS.SPARQL_RESULTS_SELECTOR,class:"yasgui-query-results-guide-dialog",fileName:e.fileName,scrollToHandler:r.scrollToTop,extraContent:y.resultExtraContent,canBePaused:!1,initPreviousStep:(e,t)=>{if("/sparql"!==s.url())return s.url("/sparql"),l.reload(),r.waitFor(r.CSS_SELECTORS.SPARQL_EDITOR_SELECTOR).then(()=>r.deferredShow(500)()).then(()=>n.executeSparqlQuery("#query-editor",q));{const r=e.ShepherdService.getPreviousStepFromHistory(t);return r.options.initPreviousStep(e,r.options.id).then(()=>n.setQuery("#query-editor",q))}}},e)})}),p}}])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{167:function(t,e,i){"use strict";i.r(e);i(7),i(27);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.6.
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{167:function(t,e,i){"use strict";i.r(e);i(7),i(27);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.6.2-RC1">{{\'common.loading\' | translate}}</object>')}))}}}))}}]);
|