graphdb-workbench 3.5.1-TR2 → 3.5.1-TR4
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/{31415.c1d93b653699cefd4e14.bundle.js → 31415.8d180c0aaafea01d84c5.bundle.js} +2 -2
- package/dist/31415.8d180c0aaafea01d84c5.bundle.js.map +1 -0
- package/dist/3395.0a62c93740e681cddba2.bundle.js +2 -0
- package/dist/3395.0a62c93740e681cddba2.bundle.js.map +1 -0
- package/dist/{64709.ee1c17ee7de2cbf4e64f.bundle.js → 64709.9433b8aa61531902cee9.bundle.js} +2 -2
- package/dist/{64709.ee1c17ee7de2cbf4e64f.bundle.js.map → 64709.9433b8aa61531902cee9.bundle.js.map} +1 -1
- package/dist/{65677.2dc4cc317664386a2f5a.bundle.js → 65677.fb750199607b82ff2f52.bundle.js} +2 -2
- package/dist/{65677.2dc4cc317664386a2f5a.bundle.js.map → 65677.fb750199607b82ff2f52.bundle.js.map} +1 -1
- package/dist/73334.b9c87ecb49eff4f5195d.bundle.js +2 -0
- package/dist/{73334.1b0e8bb637fbd1ce73ef.bundle.js.map → 73334.b9c87ecb49eff4f5195d.bundle.js.map} +1 -1
- package/dist/{80933.1020a14ed44c3f0e9faf.bundle.js → 80933.1705b752b9fb200aaf8a.bundle.js} +2 -2
- package/dist/{80933.1020a14ed44c3f0e9faf.bundle.js.map → 80933.1705b752b9fb200aaf8a.bundle.js.map} +1 -1
- package/dist/{82917.9eb3a3582e35b429090a.bundle.js → 82917.5bcc9ce4983bd3504d90.bundle.js} +2 -2
- package/dist/{82917.9eb3a3582e35b429090a.bundle.js.map → 82917.5bcc9ce4983bd3504d90.bundle.js.map} +1 -1
- package/dist/85698.b186c57a2d0edee24110.bundle.js +2 -0
- package/dist/85698.b186c57a2d0edee24110.bundle.js.map +1 -0
- package/dist/{86099.70a92c30b2940c5b5b72.bundle.js → 86099.78a5aa1d9ca2b9a1e45c.bundle.js} +2 -2
- package/dist/{86099.70a92c30b2940c5b5b72.bundle.js.map → 86099.78a5aa1d9ca2b9a1e45c.bundle.js.map} +1 -1
- package/dist/8981.cb785cbc13b19f924ebc.bundle.js +2 -0
- package/dist/8981.cb785cbc13b19f924ebc.bundle.js.map +1 -0
- package/dist/assets/i18n/language-config.json +1 -1
- package/dist/css/cluster-configuration/multi-region.css +1 -1
- package/dist/css/clustermanagement.css +1 -1
- package/dist/css/lib/ontotext-yasgui-web-component.css +1 -1
- package/dist/css/user.css +1 -1
- package/dist/i18n/locale-en.json +2 -0
- package/dist/i18n/locale-fr.json +2 -0
- package/dist/index.html +9 -9
- package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
- package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +11 -7
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.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/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +8 -5
- package/dist/js/angular/security/templates/users.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js → legacyWorkbench.8e74ed3afa48571d1e83.js} +3 -3
- package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js.map → legacyWorkbench.8e74ed3afa48571d1e83.js.map} +1 -1
- package/dist/license-checker.json +19 -32
- package/dist/{main.8dd8af071ff43504a729.js → main.3665e695a5c0d2e9b4c0.js} +3 -3
- package/dist/{main.8dd8af071ff43504a729.js.map → main.3665e695a5c0d2e9b4c0.js.map} +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 +2 -2
- package/dist/pages/connectorsInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/createConnector.html +2 -2
- 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 +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.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/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +11 -11
- package/dist/workbench/license-checker.json +17 -17
- package/dist/workbench/workbench/{166.2aacf63cc15a20ef.js → 166.2447618295f9f57e.js} +1 -1
- package/dist/workbench/workbench/workbenchApp.js +1 -1
- package/package.json +1 -1
- package/dist/31415.c1d93b653699cefd4e14.bundle.js.map +0 -1
- package/dist/3395.d91c0fe998bffd4b4a7a.bundle.js +0 -2
- package/dist/3395.d91c0fe998bffd4b4a7a.bundle.js.map +0 -1
- package/dist/73334.1b0e8bb637fbd1ce73ef.bundle.js +0 -2
- package/dist/85698.3342d281dbe7fe2f3dcb.bundle.js +0 -2
- package/dist/85698.3342d281dbe7fe2f3dcb.bundle.js.map +0 -1
- package/dist/8981.ebd2159613630a2daf7e.bundle.js +0 -2
- package/dist/8981.ebd2159613630a2daf7e.bundle.js.map +0 -1
- /package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js.LICENSE.txt → legacyWorkbench.8e74ed3afa48571d1e83.js.LICENSE.txt} +0 -0
- /package/dist/{main.8dd8af071ff43504a729.js.LICENSE.txt → main.3665e695a5c0d2e9b4c0.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_esm_id__=31415;export const __webpack_esm_ids__=[3686,4552,14267,31415,33931,34e3,58325,80706,85698];export const __webpack_esm_modules__={31415(e,t,r){r(3686),r(34e3),r(85698),angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",a),a.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const n={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function a(e,t,r,a,i){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const t=[];e.CONFIGURATION_TABS=n,e.activeTab=n.PROPERTIES,e.closeClusterConfigurationPanel=()=>{i.hideClusterConfigurationPanel()},e.switchTab=(t,r)=>{e.activeTab=r},e.$on("$destroy",function(){t.forEach(e=>e()),e.closeClusterConfigurationPanel()}),t.push(i.onShowClusterConfigurationPanel(t=>{t||(e.activeTab=n.PROPERTIES)}))}}}},34e3(){function e(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",e),e.$inject=[]},3686(e,t,r){var n=r(14267),a=r(57154);function i(e,t){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const r=(0,a.service)(a.AuthorizationService),i=(0,a.service)(a.AuthenticationService);e.isAdmin=!1,e.showEditConfigurationDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:e.clusterConfiguration})}}).result.finally(function(){e.$emit(n.pw,{force:!0})})},e.showDeleteDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(t=>{e.$emit(n.fe,{force:t})})},e.isAdmin=i.isAuthenticated()&&r.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",i),i.$inject=["$jwtAuth","$uibModal"]},85698(e,t,r){r(4552),r(33931);var n=r(8981),a=r(58325),i=r(57154);const o={minLen:"
|
|
2
|
-
//# sourceMappingURL=31415.
|
|
1
|
+
export const __webpack_esm_id__=31415;export const __webpack_esm_ids__=[3686,4552,14267,31415,33931,34e3,58325,80706,85698];export const __webpack_esm_modules__={31415(e,t,r){r(3686),r(34e3),r(85698),angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",a),a.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const n={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function a(e,t,r,a,i){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const t=[];e.CONFIGURATION_TABS=n,e.activeTab=n.PROPERTIES,e.closeClusterConfigurationPanel=()=>{i.hideClusterConfigurationPanel()},e.switchTab=(t,r)=>{e.activeTab=r},e.$on("$destroy",function(){t.forEach(e=>e()),e.closeClusterConfigurationPanel()}),t.push(i.onShowClusterConfigurationPanel(t=>{t||(e.activeTab=n.PROPERTIES)}))}}}},34e3(){function e(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",e),e.$inject=[]},3686(e,t,r){var n=r(14267),a=r(57154);function i(e,t){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const r=(0,a.service)(a.AuthorizationService),i=(0,a.service)(a.AuthenticationService);e.isAdmin=!1,e.showEditConfigurationDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:e.clusterConfiguration})}}).result.finally(function(){e.$emit(n.pw,{force:!0})})},e.showDeleteDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(t=>{e.$emit(n.fe,{force:t})})},e.isAdmin=i.isAuthenticated()&&r.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",i),i.$inject=["$jwtAuth","$uibModal"]},85698(e,t,r){r(4552),r(33931);var n=r(8981),a=r(58325),i=r(57154);const o={minLen:"1",maxLen:"255"};function s(e,t,r,s,c,l,u){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:e=>{const g=(0,i.service)(i.AuthorizationService),d=(0,i.service)(i.AuthenticationService),m=[];e.topology=void 0,e.TopologyState=a.zB,e.isAdmin=!1,e.addingTag=!1,e.loaderTimeout=void 0,e.secondaryTag=void 0,e.TagLengthConstraints=o,e.loader=!1,e.statusLoader=!1,e.add=()=>{e.addingTag=!0},e.cancel=()=>{e.addingTag=!1},e.createTag=r=>{const n={tag:r};return p(!0),l.addCusterTag(n).then(()=>{s.success(t.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:r}))}).catch(e=>{const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{e.addingTag=!1,p(!1)})},e.deleteTag=e=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:e}),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(p(!0),l.deleteClusterTag(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:e}))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>p(!1))},e.enableSecondaryMode=()=>{e.addingTag=!1;const r={title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};c.openSimpleModal(r).result.then(()=>_()).then(e=>(p(!0),l.enableSecondaryMode(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>p(!1))},e.disableSecondaryMode=()=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(p(!0),l.disableSecondaryMode())).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>p(!1))};const _=()=>{const e={title:t.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:["$scope","$uibModalInstance","config",function(e,t,r){e.rpcAddress="",e.tag="",e.title=r.title,e.onClick=e=>e.stopPropagation(),e.ok=()=>{t.close({primaryNode:e.rpcAddress,tag:e.tag})},e.cancel=()=>{t.dismiss("cancel")}}],size:"lg",warning:!0,backdrop:"static"};return c.openCustomModal(e).result},f=r=>{N(!0),l.getClusterConfig().then(t=>{e.secondaryTag=n.v9.fromJSON(t.data).secondaryTag,(t=>{const r=t.nodes.find(e=>e.nodeState===a.UY.LEADER);e.topology=r?.topologyStatus})(n.kY.fromJSON(r)),e.primaryTags=n.v9.fromJSON(t.data).primaryTags}).catch(e=>{const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>N(!1))},p=(t,r)=>{t?(e.loaderMessage=r,e.loader=!0):e.loader=!1},N=(t,n)=>{r.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=r(()=>{e.statusLoader=t},150)):e.statusLoader=!1};e.$on("$destroy",function(){m.forEach(e=>e())}),e.isAdmin=d.isAuthenticated()&&g.isAdmin(),m.push(e.$watch("clusterModel",function(e,t){e!==t&&f(e)},!0)),m.push(u.onShowClusterConfigurationPanel(t=>{t||(e.addingTag=!1)})),f(e.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",s),s.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},14267(e,t,r){r.d(t,{DP:()=>i,Yn:()=>s,aV:()=>c,fe:()=>a,pw:()=>n,vu:()=>o});const n="updateCluster",a="deleteCluster",i="clickInView",o="nodeSelected",s="createCluster",c="modelUpdated"},4552(){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,r,n){function a(e){const t=/^[\x21-\x7E]*$/.test(e);return n.$setValidity("asciiValidator",t),e}n.$parsers.push(a),n.$formatters.push(a)}}})},33931(){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,r,n){function a(e){const t=r.minLength?parseInt(r.minLength,10):0,a=r.maxLength?parseInt(r.maxLength,10):1/0,i=e&&e.length>=t&&e.length<=a;return n.$setValidity("lengthValidator",i),e}n.$parsers.push(a),n.$formatters.push(a)}}})},58325(e,t,r){r.d(t,{UY:()=>n,gC:()=>i,vQ:()=>a,zB:()=>o});const n={LEADER:"LEADER",FOLLOWER:"FOLLOWER",CANDIDATE:"CANDIDATE",OUT_OF_SYNC:"OUT_OF_SYNC",NO_CONNECTION:"NO_CONNECTION",READ_ONLY:"READ_ONLY",RESTRICTED:"RESTRICTED",NO_CLUSTER:"NO_CLUSTER"},a={SEARCHING_FOR_NODE:"SEARCHING_FOR_NODE",WAITING_FOR_SNAPSHOT:"WAITING_FOR_SNAPSHOT",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT",APPLYING_SNAPSHOT:"APPLYING_SNAPSHOT",BUILDING_SNAPSHOT:"BUILDING_SNAPSHOT",SENDING_SNAPSHOT:"SENDING_SNAPSHOT",RECOVERY_OPERATION_FAILURE_WARNING:"RECOVERY_OPERATION_FAILURE_WARNING"},i={IN_SYNC:"IN_SYNC",OUT_OF_SYNC:"OUT_OF_SYNC",SYNCING:"SYNCING",NO_CONNECTION:"NO_CONNECTION",RECEIVING_SNAPSHOT:"RECEIVING_SNAPSHOT"},o={PRIMARY_NODE:"PRIMARY_NODE",SECONDARY_NODE:"SECONDARY_NODE"}}};
|
|
2
|
+
//# sourceMappingURL=31415.8d180c0aaafea01d84c5.bundle.js.map
|
|
@@ -0,0 +1 @@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AAkBF,GAChCD,CACX,CACAF,EAAQM,SAAS/G,KAAK0G,GACtBD,EAAQO,YAAYhH,KAAK0G,EAC7B,EAER,E,UCZA1I,QAAQC,OAAO,qDAAsD,IAChEC,UAAU,kBAAmB,WAC9B,MAAO,CACHY,SAAU,IACVwH,QAAS,UACTlH,KAAM,SAASJ,EAAOuH,EAASC,EAAOC,GAClC,SAASQ,EAAeN,GACpB,MAAMO,EAAYV,EAAMU,UAAYC,SAASX,EAAMU,UAAW,IAAM,EAC9DE,EAAYZ,EAAMY,UAAYD,SAASX,EAAMY,UAAW,IAAMC,IAC9DT,EAAUD,GAASA,EAAMW,QAAUJ,GAAaP,EAAMW,QAAUF,EAEtE,OADAX,EAAQK,aAAa,kBAAmBF,GACjCD,CACX,CACAF,EAAQM,SAAS/G,KAAKiH,GACtBR,EAAQO,YAAYhH,KAAKiH,EAC7B,EAER,E,4DCvCO,MAAMzB,EAAY,CACrBC,OAAQ,SACR8B,SAAU,WACVC,UAAW,YACXC,YAAa,cACbC,cAAe,gBACfC,UAAW,YACXC,WAAY,aACZC,WAAY,cAGHC,EAAgB,CACzBC,mBAAoB,qBACpBC,qBAAsB,uBACtBC,mBAAoB,qBACpBC,kBAAmB,oBACnBC,kBAAmB,oBACnBC,iBAAkB,mBAClBC,mCAAoC,sCAG3BC,EAAY,CACrBC,QAAS,UACTd,YAAa,cACbe,QAAS,UACTd,cAAe,gBAEfO,mBAAoB,sBAGX7F,EAAgB,CACzBqG,aAAc,eACdC,eAAgB,iB","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/events.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/clustermanagement/states.js"],"sourcesContent":["import 'angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/multi-region.directive';\n\nconst modules = [\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration', modules)\n .directive('clusterConfiguration', ClusterConfiguration);\n\nClusterConfiguration.$inject = ['$jwtAuth', '$uibModal', '$translate', 'toastr', 'ClusterViewContextService'];\n\nconst CONFIGURATION_TABS = {\n PROPERTIES: 'properties',\n NODES: 'nodes',\n MULTI_REGION: 'multi_region'\n};\n\nfunction ClusterConfiguration($jwtAuth, $uibModal, $translate, toastr, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.CONFIGURATION_TABS = CONFIGURATION_TABS;\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n\n // =========================\n // Public functions\n // =========================\n $scope.closeClusterConfigurationPanel = () => {\n ClusterViewContextService.hideClusterConfigurationPanel();\n };\n\n $scope.switchTab = ($event, tab) => {\n $scope.activeTab = tab;\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel((show) => {\n if (!show) {\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n }\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n $scope.closeClusterConfigurationPanel();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n subscribeHandlers();\n };\n init();\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes', modules)\n .directive('clusterNodes', ClusterNodes);\n\nClusterNodes.$inject = [];\n\nfunction ClusterNodes() {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html',\n scope: {\n currentNode: '=',\n clusterModel: '='\n }\n };\n}\n","import {DELETE_CLUSTER, UPDATE_CLUSTER} from \"../../events\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties', modules)\n .directive('clusterProperties', ClusterProperties);\n\nClusterProperties.$inject = ['$jwtAuth', '$uibModal'];\n\nfunction ClusterProperties($jwtAuth, $uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n\n // =========================\n // Public variables\n // =========================\n $scope.isAdmin = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: () => {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n $scope.$emit(UPDATE_CLUSTER, {force: true});\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then((forceDelete) => {\n $scope.$emit(DELETE_CLUSTER, {force: forceDelete});\n });\n };\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n };\n init();\n }\n };\n}\n","import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from '../../../models/clustermanagement/cluster';\nimport {NodeState, TopologyState} from '../../../models/clustermanagement/states';\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator',\n];\n\nconst TagLengthConstraints = {\n minLen: '1',\n maxLen: '255',\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '=',\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n $scope.loader = false;\n $scope.statusLoader = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag,\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true,\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader?.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static',\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag,\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setStatusLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n $scope.primaryTags = ClusterConfiguration.fromJSON(response.data).primaryTags;\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setStatusLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loader = true;\n } else {\n $scope.loader = false;\n }\n };\n\n const setStatusLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.statusLoader = loader;\n }, 150);\n } else {\n $scope.statusLoader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function() {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n },\n };\n}\n","export const UPDATE_CLUSTER = 'updateCluster';\nexport const DELETE_CLUSTER = 'deleteCluster';\n\n/**\n * Event fired from the cluster-graphical-view component up to its parent when user clicks somewhere in the view.\n * The payload is the event target HTMLElement.\n * @type {string}\n */\nexport const CLICK_IN_VIEW = 'clickInView';\n\n/**\n * Event fired from the cluster-graphical-view component up to its parent when user selects a node from the visualization.\n * The payload is the selected node.\n * @type {string}\n */\nexport const NODE_SELECTED = 'nodeSelected';\n\n/**\n * Event fired when the cluster zone visualization is clicked while there is no cluster yet.\n * @type {string}\n */\nexport const CREATE_CLUSTER = 'createCluster';\n\n/**\n * Event fired from the cluster management view component down to the child visualization informing it that the model\n * was updated.\n * @type {string}\n */\nexport const MODEL_UPDATED = 'modelUpdated';\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","export const NodeState = {\n LEADER: 'LEADER',\n FOLLOWER: 'FOLLOWER',\n CANDIDATE: 'CANDIDATE',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n NO_CONNECTION: 'NO_CONNECTION',\n READ_ONLY: 'READ_ONLY',\n RESTRICTED: 'RESTRICTED',\n NO_CLUSTER: 'NO_CLUSTER'\n};\n\nexport const RecoveryState = {\n SEARCHING_FOR_NODE: 'SEARCHING_FOR_NODE',\n WAITING_FOR_SNAPSHOT: 'WAITING_FOR_SNAPSHOT',\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT',\n APPLYING_SNAPSHOT: 'APPLYING_SNAPSHOT',\n BUILDING_SNAPSHOT: 'BUILDING_SNAPSHOT',\n SENDING_SNAPSHOT: 'SENDING_SNAPSHOT',\n RECOVERY_OPERATION_FAILURE_WARNING: 'RECOVERY_OPERATION_FAILURE_WARNING'\n};\n\nexport const LinkState = {\n IN_SYNC: 'IN_SYNC',\n OUT_OF_SYNC: 'OUT_OF_SYNC',\n SYNCING: 'SYNCING',\n NO_CONNECTION: 'NO_CONNECTION',\n // complimentary state, built based on the recovery state of two nodes when one is receiving snapshot to the other\n RECEIVING_SNAPSHOT: 'RECEIVING_SNAPSHOT'\n};\n\nexport const TopologyState = {\n PRIMARY_NODE: 'PRIMARY_NODE',\n SECONDARY_NODE: 'SECONDARY_NODE'\n};\n"],"names":["angular","module","directive","ClusterConfiguration","$inject","CONFIGURATION_TABS","PROPERTIES","NODES","MULTI_REGION","$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService","restrict","templateUrl","scope","currentNode","clusterModel","clusterConfiguration","link","$scope","subscriptions","activeTab","closeClusterConfigurationPanel","hideClusterConfigurationPanel","switchTab","$event","tab","$on","forEach","subscription","push","onShowClusterConfigurationPanel","show","ClusterNodes","ClusterProperties","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","isAdmin","showEditConfigurationDialog","open","controller","size","resolve","data","result","finally","$emit","UPDATE_CLUSTER","force","showDeleteDialog","then","forceDelete","DELETE_CLUSTER","isAuthenticated","TagLengthConstraints","minLen","maxLen","MultiRegion","$timeout","ModalService","ClusterRestService","topology","undefined","TopologyState","addingTag","loaderTimeout","secondaryTag","loader","statusLoader","add","cancel","createTag","tag","payload","setLoader","addCusterTag","success","instant","catch","response","msg","getError","error","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","$uibModalInstance","config","rpcAddress","onClick","ok","close","primaryNode","dismiss","openCustomModal","updateClusterData","setStatusLoader","getClusterConfig","fromJSON","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","primaryTags","loaderMessage","$watch","newValue","oldValue","CLICK_IN_VIEW","NODE_SELECTED","CREATE_CLUSTER","MODEL_UPDATED","require","element","attrs","ngModel","validateAscii","value","isValid","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","length","FOLLOWER","CANDIDATE","OUT_OF_SYNC","NO_CONNECTION","READ_ONLY","RESTRICTED","NO_CLUSTER","RecoveryState","SEARCHING_FOR_NODE","WAITING_FOR_SNAPSHOT","RECEIVING_SNAPSHOT","APPLYING_SNAPSHOT","BUILDING_SNAPSHOT","SENDING_SNAPSHOT","RECOVERY_OPERATION_FAILURE_WARNING","LinkState","IN_SYNC","SYNCING","PRIMARY_NODE","SECONDARY_NODE"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3395;export const __webpack_esm_ids__=[3395,4552,19146,33931,34e3,64073,67262,81417];export const __webpack_esm_modules__={3395(e,t,n){n(22742),n(33136),n(88986),n(96972),n(31415),n(64073),n(75752),n(11014),n(75890),n(67262),n(19146),angular.module("graphdb.framework.clustermanagement",["ngAnimate","toastr","graphdb.framework.clustermanagement.controllers.cluster-management","graphdb.framework.clustermanagement.directives.cluster-graphical-view","graphdb.framework.clustermanagement.directives.cluster-configuration","graphdb.framework.clustermanagement.directives.cluster-nodes-configuration","graphdb.framework.core.directives.validate-url","graphdb.framework.core.directives.validate-duplicate-url"])},31415(e,t,n){n(3686),n(34e3),n(85698),angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration",["graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties","graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes","graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region"]).directive("clusterConfiguration",o),o.$inject=["$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService"];const r={PROPERTIES:"properties",NODES:"nodes",MULTI_REGION:"multi_region"};function o(e,t,n,o,a){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const t=[];e.CONFIGURATION_TABS=r,e.activeTab=r.PROPERTIES,e.closeClusterConfigurationPanel=()=>{a.hideClusterConfigurationPanel()},e.switchTab=(t,n)=>{e.activeTab=n},e.$on("$destroy",function(){t.forEach(e=>e()),e.closeClusterConfigurationPanel()}),t.push(a.onShowClusterConfigurationPanel(t=>{t||(e.activeTab=r.PROPERTIES)}))}}}},34e3(){function e(){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html",scope:{currentNode:"=",clusterModel:"="}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes",[]).directive("clusterNodes",e),e.$inject=[]},3686(e,t,n){var r=n(14267),o=n(57154);function a(e,t){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html",scope:{currentNode:"=",clusterModel:"=",clusterConfiguration:"="},link:e=>{const n=(0,o.service)(o.AuthorizationService),a=(0,o.service)(o.AuthenticationService);e.isAdmin=!1,e.showEditConfigurationDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html",controller:"EditClusterCtrl",size:"lg",resolve:{data:()=>({clusterConfiguration:e.clusterConfiguration})}}).result.finally(function(){e.$emit(r.pw,{force:!0})})},e.showDeleteDialog=()=>{t.open({templateUrl:"js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html",controller:"DeleteClusterCtrl"}).result.then(t=>{e.$emit(r.fe,{force:t})})},e.isAdmin=a.isAuthenticated()&&n.isAdmin()}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties",[]).directive("clusterProperties",a),a.$inject=["$jwtAuth","$uibModal"]},85698(e,t,n){n(4552),n(33931);var r=n(8981),o=n(58325),a=n(57154);const i={minLen:"1",maxLen:"255"};function s(e,t,n,s,c,l,u){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-configuration/multi-region.html",scope:{clusterModel:"=",clusterConfiguration:"="},link:e=>{const d=(0,a.service)(a.AuthorizationService),g=(0,a.service)(a.AuthenticationService),m=[];e.topology=void 0,e.TopologyState=o.zB,e.isAdmin=!1,e.addingTag=!1,e.loaderTimeout=void 0,e.secondaryTag=void 0,e.TagLengthConstraints=i,e.loader=!1,e.statusLoader=!1,e.add=()=>{e.addingTag=!0},e.cancel=()=>{e.addingTag=!1},e.createTag=n=>{const r={tag:n};return h(!0),l.addCusterTag(r).then(()=>{s.success(t.instant("cluster_management.cluster_configuration_multi_region.created_tag",{tag:n}))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.creating"))}).finally(()=>{e.addingTag=!1,h(!1)})},e.deleteTag=e=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.delete",{tag:e}),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.deleteClusterTag(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.deleted_tag",{tag:e}))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.deleting"))}).finally(()=>h(!1))},e.enableSecondaryMode=()=>{e.addingTag=!1;const n={title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning"),warning:!0,backdrop:"static",confirmButtonKey:"common.ok.btn",stopPropagation:!0};c.openSimpleModal(n).result.then(()=>p()).then(e=>(h(!0),l.enableSecondaryMode(e))).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.secondary_enabled"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.secondary"))}).finally(()=>h(!1))},e.disableSecondaryMode=()=>{c.openSimpleModal({title:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode"),message:t.instant("cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning"),warning:!0,backdrop:"static",stopPropagation:!0}).result.then(()=>(h(!0),l.disableSecondaryMode())).then(()=>s.success(t.instant("cluster_management.cluster_configuration_multi_region.disabled_secondary_mode"))).catch(e=>{if("cancel"===e||"escape key press"===e)return;const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>h(!1))};const p=()=>{const e={title:t.instant("cluster_management.cluster_configuration_multi_region.secondary_cluster_settings"),templateUrl:"js/angular/clustermanagement/templates/modal/secondary-mode-modal.html",controller:["$scope","$uibModalInstance","config",function(e,t,n){e.rpcAddress="",e.tag="",e.title=n.title,e.onClick=e=>e.stopPropagation(),e.ok=()=>{t.close({primaryNode:e.rpcAddress,tag:e.tag})},e.cancel=()=>{t.dismiss("cancel")}}],size:"lg",warning:!0,backdrop:"static"};return c.openCustomModal(e).result},f=n=>{_(!0),l.getClusterConfig().then(t=>{e.secondaryTag=r.v9.fromJSON(t.data).secondaryTag,(t=>{const n=t.nodes.find(e=>e.nodeState===o.UY.LEADER);e.topology=n?.topologyStatus})(r.kY.fromJSON(n)),e.primaryTags=r.v9.fromJSON(t.data).primaryTags}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>_(!1))},h=(t,n)=>{t?(e.loaderMessage=n,e.loader=!0):e.loader=!1},_=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.statusLoader=t},150)):e.statusLoader=!1};e.$on("$destroy",function(){m.forEach(e=>e())}),e.isAdmin=g.isAuthenticated()&&d.isAdmin(),m.push(e.$watch("clusterModel",function(e,t){e!==t&&f(e)},!0)),m.push(u.onShowClusterConfigurationPanel(t=>{t||(e.addingTag=!1)})),f(e.clusterModel)}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region",["graphdb.framework.core.directives.ascii-validator","graphdb.framework.core.directives.length-validator"]).directive("multiRegion",s),s.$inject=["$jwtAuth","$translate","$timeout","toastr","ModalService","ClusterRestService","ClusterViewContextService"]},96972(e,t,n){n(38473),n(23236);var r=n(24125),o=n(22723),a=n(14267),i=n(44482),s=n(57154);const c={select:i.select};let l=240;const u={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"};angular.module("graphdb.framework.clustermanagement.directives.cluster-graphical-view",["graphdb.framework.utils.localstorageadapter","graphdb.framework.clustermanagement.directives.cluster-legend"]).directive("clusterGraphicalView",["$window","LocalStorageAdapter","LSKeys","UriUtils","$translate","$jwtAuth","$rootScope","ClusterViewContextService",function(e,t,n,i,g,m,p,f){return{restrict:"E",scope:{clusterModel:"="},link:function(m,h){const _=(0,s.service)(s.AuthorizationService),v=angular.element(e),w=[];let y,C,b,k,S,N=U(),M=P(),E=Math.min(N,M)/2-100,T=N/2,A=M/2;function x(){const e=f.getClusterViewD3Container();N=U(),M=P(),e.attr("width",N),e.attr("height",M),I()}function L(e,t=""){Object.keys(e).forEach(n=>{let r="";t&&(r+=t),r+=`.${n}`;const o=e[n];"string"==typeof o?e[n]=g.instant(`cluster_management.cluster_graphical_view${r}`):"object"==typeof o&&L(o,r)})}function U(){const r="collapsedMenu"===t.get(n.MENU_STATE);return l=r?70:240,Math.max(Math.floor(.95*(e.innerWidth-l)),600)}function P(){return Math.max(.95*(e.innerHeight-250),675)}function V(e){m.$emit(a.DP,e.target)}function I(){E=Math.min(N,M)/2-100,T=N/2,A=M/2,r.cZ(b,T,A),b.select(".cluster-zone").attr("r",E),C!==m.clusterModel.hasCluster&&(C=!!m.clusterModel.hasCluster,function(e){r.Xl(e,b,u,y),!e&&y&&b.on("mouseup",()=>{m.$emit(a.Yn)})}(C));const e=function(){const e=(0,o.cloneDeep)(m.clusterModel.nodes)||[];return e.forEach(e=>{if(e.hostname=i.shortenIri(e.endpoint),!(0,o.isEmpty)(e.recoveryStatus)){let t=`cluster_management.cluster_graphical_view.recovery_state.${e.recoveryStatus.state.toLowerCase()}`;e.recoveryStatus.affectedNodes&&e.recoveryStatus.affectedNodes.length>0&&(t+="_with_affected_node"),e.recoveryStatus.message=g.instant(t,{node:e.recoveryStatus.affectedNodes.join(", ")})}}),e}();!function(e){const t=k.selectAll("#node-group").data(e,e=>e.address),n=r.kI(t,45);n.on("click",(e,t)=>{m.$emit(a.vu,t);const n=c.select(".nodetooltip"),r=$(window).width();e.pageX<r/2?(n.style("left",e.pageX+"px"),n.style("right","")):(n.style("left",""),n.style("right",r-e.pageX+"px")),n.style("top",e.pageY-28+"px")}),r.HF(n),r.ss(n,T,A,E)}(e),function(e,t){const n=S.selectAll(".link").data(e,e=>e.id);r.cy(n),r.$$(n,t),r.Tk(S,e,t)}((0,o.cloneDeep)(m.clusterModel.links)||[],e)}m.width=function(){return N},m.height=function(){return M},m.$on("$destroy",function(){v.unbind("resize",x),v.unbind("mousedown",V),r.Wg(),w.forEach(e=>e())}),y=_.isAdmin(),v.bind("resize",x),v.bind("mousedown",V),w.push(p.$on("$translateChangeSuccess",function(){L(u),r.r_(C,b,u),Object.keys(d).forEach(e=>{c.select(`#${e}`).text(function(e){return u[d[e]]}(e))})})),w.push(m.$on(a.aV,function(){I()})),L(u),function(e){const t=r.J5(h[0]).attr("width",N).attr("height",M);b=r.dB(t,e),S=t.append("g").attr("id","links-group"),k=t.append("g").attr("id","nodes-group"),r.D6(t,r.ZC.BIG),r.D6(t,r.ZC.SMALL),f.updateClusterViewD3Container(t)}(!(!m.clusterModel.nodes||!m.clusterModel.nodes.length)),I()}}}])},64073(e,t,n){var r=n(8981);function o(e,t,n,o,a,i,s){return{restrict:"E",templateUrl:"js/angular/clustermanagement/templates/cluster-nodes-configuration.html",link:n=>{const o=[];n.rowHeights={},n.editedNodeIndex=void 0,n.allSuggestions=[],n.loader=!1,n.errors=[],n.addNewLocation=!1,n.hasCluster=!1,n.addNode=()=>{n.addNewLocation=!0,n.newLocation=new r.aZ,t(function(){const e=document.querySelector("input[name='location']");e&&e.focus()},0)},n.filterSuggestions=e=>{const t=e.endpoint&&e.endpoint.toLowerCase();t?(n.suggestions=n.allSuggestions.filter(e=>e.toLowerCase().includes(t)),n.showDropdown=!0):(n.suggestions=[],n.showDropdown=!1)},n.selectSuggestion=(e,t)=>{e.endpoint=t,n.suggestions=[],n.showDropdown=!1},n.hideSuggestions=()=>{t(()=>{n.showDropdown=!1},200)},n.handleKeydown=function(e,t,r){"Enter"===e.key&&t?(e.preventDefault(),n.saveNode(r)):"Escape"===e.key&&n.cancel()},n.saveNode=e=>{const t=i.getAvailable(!0);var n,o;n=i.findByEndpoint(t,e)||new r.aZ(e),(o=i.getPendingReplace())?i.replace(o,n):i.addLocation(n),a()},n.deleteNode=(t,n)=>{s.openSimpleModal({title:e.instant("location.confirm.detach"),message:e.instant("location.confirm.detach.warning",{uri:n.endpoint}),warning:!0}).result.then(()=>{i.deleteFromCluster(n.item)})},n.replaceNode=(t,r)=>{s.openSimpleModal({title:e.instant("location.change.confirm"),message:e.instant("location.change.confirm.warning"),warning:!0}).result.then(()=>{i.setPendingReplace(r.item),n.editedNodeIndex=t})},n.isClusterConfigurationValid=()=>{const e=void 0===n.editedNodeIndex,t=!1===n.addNewLocation,r=i.hasValidNodesCount(),o=n.form.$valid;return e&&t&&r&&o},n.setLoader=(e,r)=>{t.cancel(n.loaderTimeout),e?n.loaderTimeout=t(()=>{n.loader=e,n.loaderMessage=r},300):n.loader=!1},n.getAdvancedOptionsClass=()=>{const e=document.getElementById("advancedOptions");if(e){const t=e.getAttribute("aria-expanded");if(t&&"true"===t)return"ri-arrow-down-s-line"}return"ri-arrow-right-s-line"},n.cancel=()=>{n.editedNodeIndex=void 0,n.addNewLocation=!1,a(),i.emitUpdateClusterView()},n.restoreNode=e=>{i.restoreNode(e.item)};const a=()=>{i.setPendingReplace(void 0),n.editedNodeIndex=void 0,n.addNewLocation=!1},c=n.$watchGroup(["editedNodeIndex","addNewLocation","clusterConfiguration.electionMinTimeout","clusterConfiguration.electionRangeTimeout","clusterConfiguration.heartbeatInterval","clusterConfiguration.messageSizeKB","clusterConfiguration.verificationTimeout","clusterConfiguration.transactionLogMaximumSizeGB"],(e,t)=>{const r=n.isClusterConfigurationValid();i.updateClusterValidity(r)});o.push(c),o.push(i.onClusterViewChanged(e=>{n.hasCluster=i.hasCluster(),n.viewModel=i.getViewModel(),n.clusterNodesEndpoints=n.viewModel.map(e=>e.endpoint),n.clusterConfiguration=i.getClusterConfiguration(),n.allSuggestions=i.getAvailableNodeEndpoints(),n.canDeleteNode=i.canDeleteNode()})),n.$on("$destroy",()=>{o.forEach(e=>e())})}}}angular.module("graphdb.framework.clustermanagement.directives.cluster-nodes-configuration",[]).directive("clusterNodesConfiguration",o),o.$inject=["$translate","$timeout","productInfo","toastr","RemoteLocationsService","ClusterContextService","ModalService"]},4552(){angular.module("graphdb.framework.core.directives.ascii-validator",[]).directive("asciiValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=/^[\x21-\x7E]*$/.test(e);return r.$setValidity("asciiValidator",t),e}r.$parsers.push(o),r.$formatters.push(o)}}})},33931(){angular.module("graphdb.framework.core.directives.length-validator",[]).directive("lengthValidator",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){function o(e){const t=n.minLength?parseInt(n.minLength,10):0,o=n.maxLength?parseInt(n.maxLength,10):1/0,a=e&&e.length>=t&&e.length<=o;return r.$setValidity("lengthValidator",a),e}r.$parsers.push(o),r.$formatters.push(o)}}})},19146(){angular.module("graphdb.framework.core.directives.validate-duplicate-url",[]).directive("validateDuplicateUrl",function(){return{restrict:"A",require:"ngModel",scope:{excludedUrls:"="},link:function(e,t,n,r){r.$validators.duplicateUrl=function(t,n){return e.excludedUrls&&e.excludedUrls.includes(n)?(r.$setValidity("duplicateUrl",!1),!1):(r.$setValidity("duplicateUrl",!0),!0)}}}})},67262(e,t,n){var r=n(81417);angular.module("graphdb.framework.core.directives.validate-url",[]).directive("validateUrl",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,o){o.$validators.validUrl=function(e,t){if(o.$isEmpty(t))return"false"!==n.allowEmpty;if(!r.r.isValidUrl(t))return!1;if(n.exclude&&!r.r.doesNotContain(t,n.exclude))return!1;if(n.excludeProtocol){const e=n.excludeProtocol.split(",");if(!r.r.doesNotUseProtocol(t,e))return!1}return!0}}}})},81417(e,t,n){n.d(t,{r:()=>a});const r=/^(h|ht|htt|http|https|http:|https:|http:\/|https:\/|http:\/\/|https:\/\/|https?:\/\/[\S]*)$/i,o=/^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\/|ftps:\/|ftp:\/\/|ftps:\/\/[\S]*)$/i;class a{static isValidUrl(e){return r.test(e)||o.test(e)}static doesNotContain(e,t){return!new RegExp(t).test(e)}static doesNotUseProtocol(e,t){return!new RegExp("^("+t.join("|")+")://","i").test(e)}}},11014(e,t,n){var r,o;r=[n(44482)],o=function(e){function t(e,t){return e.each(function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])})}function r(e,t){for(var n in t)e.attr(n,t[n]);return e}return void 0===e&&(e=n(44482)),e.selection.prototype.attrs=function(e){return("function"==typeof e?t:r)(this,e)},e.selection.prototype.moveToFront=function(){return this.each(function(){e.select(this.parentNode.appendChild(this))})},e.selection.prototype.moveToBack=function(){return this.each(function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)})},e}.apply(t,r),void 0===o||(e.exports=o)}};
|
|
2
|
+
//# sourceMappingURL=3395.0a62c93740e681cddba2.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3395.0a62c93740e681cddba2.bundle.js","mappings":"0QAuBAA,QAAQC,OAAO,sCAXC,CACZ,YACA,SACA,qEACA,wEACA,uEACA,6EACA,iDACA,4D,wCCVJD,QACKC,OAAO,uEAPI,CACZ,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ACJ,CAEA,SAASC,EAAYR,EAAWzC,GAC5B,IAAK,IAAIgD,KAAQhD,EAAKyC,EAAUpL,KAAK2L,EAAMhD,EAAIgD,IAC/C,OAAOP,CACX,CAuBA,YAtC8F,IAAP1O,IAC/EA,EAAKsM,EAAQ,QAoBrBtM,EAAG0O,UAAUS,UAAU5C,MAJvB,SAAyBN,GACrB,OAAuB,mBAARA,EAAqBwC,EAAgBS,GAAaJ,KAAM7C,EAC3E,EAIAjM,EAAG0O,UAAUS,UAAUC,YAAc,WACjC,OAAON,KAAKH,KAAK,WACb3O,EAAGC,OAAO6O,KAAKO,WAAWC,YAAYR,MAC1C,EACJ,EAEA9O,EAAG0O,UAAUS,UAAUI,WAAa,WAChC,OAAOT,KAAKH,KAAK,WACb,MAAMa,EAAaV,KAAKO,WAAWG,WAC/BA,GACAV,KAAKO,WAAWI,aAAaX,KAAMU,EAE3C,EACJ,EAEOxP,CACV,sC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-graphical-view.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-nodes-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-duplicate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/url-utils.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/d3.patch.js"],"sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers/cluster-management.controller';\nimport 'angular/clustermanagement/directives/cluster-graphical-view.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive';\nimport 'angular/clustermanagement/directives/cluster-nodes-configuration.directive';\nimport 'angular/core/services/repositories.service';\nimport 'lib/d3.patch.js';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\nimport 'angular/core/directives/validate-url.directive';\nimport 'angular/core/directives/validate-duplicate-url.directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers.cluster-management',\n 'graphdb.framework.clustermanagement.directives.cluster-graphical-view',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration',\n 'graphdb.framework.clustermanagement.directives.cluster-nodes-configuration',\n 'graphdb.framework.core.directives.validate-url',\n 'graphdb.framework.core.directives.validate-duplicate-url'\n];\n\nangular.module('graphdb.framework.clustermanagement', modules);\n","import 'angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/multi-region.directive';\n\nconst modules = [\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration', modules)\n .directive('clusterConfiguration', ClusterConfiguration);\n\nClusterConfiguration.$inject = ['$jwtAuth', '$uibModal', '$translate', 'toastr', 'ClusterViewContextService'];\n\nconst CONFIGURATION_TABS = {\n PROPERTIES: 'properties',\n NODES: 'nodes',\n MULTI_REGION: 'multi_region'\n};\n\nfunction ClusterConfiguration($jwtAuth, $uibModal, $translate, toastr, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.CONFIGURATION_TABS = CONFIGURATION_TABS;\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n\n // =========================\n // Public functions\n // =========================\n $scope.closeClusterConfigurationPanel = () => {\n ClusterViewContextService.hideClusterConfigurationPanel();\n };\n\n $scope.switchTab = ($event, tab) => {\n $scope.activeTab = tab;\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel((show) => {\n if (!show) {\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n }\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n $scope.closeClusterConfigurationPanel();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n subscribeHandlers();\n };\n init();\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes', modules)\n .directive('clusterNodes', ClusterNodes);\n\nClusterNodes.$inject = [];\n\nfunction ClusterNodes() {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html',\n scope: {\n currentNode: '=',\n clusterModel: '='\n }\n };\n}\n","import {DELETE_CLUSTER, UPDATE_CLUSTER} from \"../../events\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties', modules)\n .directive('clusterProperties', ClusterProperties);\n\nClusterProperties.$inject = ['$jwtAuth', '$uibModal'];\n\nfunction ClusterProperties($jwtAuth, $uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n\n // =========================\n // Public variables\n // =========================\n $scope.isAdmin = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: () => {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n $scope.$emit(UPDATE_CLUSTER, {force: true});\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then((forceDelete) => {\n $scope.$emit(DELETE_CLUSTER, {force: forceDelete});\n });\n };\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n };\n init();\n }\n };\n}\n","import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from '../../../models/clustermanagement/cluster';\nimport {NodeState, TopologyState} from '../../../models/clustermanagement/states';\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator',\n];\n\nconst TagLengthConstraints = {\n minLen: '1',\n maxLen: '255',\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '=',\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n $scope.loader = false;\n $scope.statusLoader = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag,\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true,\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true,\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader?.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static',\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag,\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setStatusLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n $scope.primaryTags = ClusterConfiguration.fromJSON(response.data).primaryTags;\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setStatusLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loader = true;\n } else {\n $scope.loader = false;\n }\n };\n\n const setStatusLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.statusLoader = loader;\n }, 150);\n } else {\n $scope.statusLoader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function() {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n },\n };\n}\n","import 'angular/utils/local-storage-adapter';\nimport 'angular/clustermanagement/directives/cluster-legend.directive';\nimport * as CDS from \"../services/cluster-drawing.service\";\nimport {ARROW_CONFIG} from \"../services/cluster-drawing.service\";\nimport {cloneDeep, isEmpty} from \"lodash\";\nimport {CLICK_IN_VIEW, CREATE_CLUSTER, MODEL_UPDATED, NODE_SELECTED} from \"../events\";\nimport {select} from 'd3';\nimport {\n AuthorizationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst d3 = {select};\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\nconst nodeRadius = 45;\n\n// Labels in translation map is dynamically translated and reassigned. It contains defaults\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\",\n recovery_state: {\n searching_for_node: \"Searching for node\",\n waiting_for_snapshot: \"Waiting for snapshot from node\",\n receiving_snapshot: \"Receiving a snapshot from node\",\n applying_snapshot: \"Applying a snapshot\",\n building_snapshot: \"Building a snapshot for node\",\n sending_snapshot: \"Sending a snapshot to node\",\n recovery_operation_failure_warning: \"Node unable to recover. Action required\",\n },\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state',\n};\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives.cluster-graphical-view', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.clustermanagement.directives.cluster-legend',\n]);\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$jwtAuth', '$rootScope', 'ClusterViewContextService',\n function($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $jwtAuth, $rootScope, ClusterViewContextService) {\n return {\n restrict: 'E',\n scope: {\n clusterModel: '=',\n },\n link: function(scope, element) {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n\n const w = angular.element($window);\n const subscriptions = [];\n let hasAccess;\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n // SVG components\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n // =========================\n // Public variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n scope.width = function() {\n return width;\n };\n\n scope.height = function() {\n return height;\n };\n\n // =========================\n // Private functions\n // =========================\n\n function resize() {\n const svg = ClusterViewContextService.getClusterViewD3Container();\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n }\n\n function updateTranslations(translationMapObject, translationAppend = '') {\n Object.keys(translationMapObject).forEach((key) => {\n let compoundKey = '';\n if (translationAppend) {\n compoundKey += translationAppend;\n }\n compoundKey += `.${key}`;\n const value = translationMapObject[key];\n if (typeof value === 'string') {\n translationMapObject[key] = $translate.instant(`cluster_management.cluster_graphical_view${compoundKey}`);\n } else if (typeof value === 'object') {\n updateTranslations(value, compoundKey);\n }\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 675);\n }\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function createClusterZone(hasCluster) {\n const svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n\n CDS.addArrowHead(svg, ARROW_CONFIG.BIG);\n CDS.addArrowHead(svg, ARROW_CONFIG.SMALL);\n\n ClusterViewContextService.updateClusterViewD3Container(svg);\n }\n\n function createNodes(nodes) {\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n const nodesElements = CDS.createNodes(nodeData, nodeRadius);\n nodesElements\n .on('click', (event, d) => {\n scope.$emit(NODE_SELECTED, d);\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (event.pageY - 28) + \"px\");\n });\n CDS.updateNodes(nodesElements);\n CDS.positionNodesOnClusterZone(nodesElements, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n CDS.updateLinkIcons(linksGroup, links, nodes);\n }\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap, hasAccess);\n if (!hasCluster && hasAccess) {\n clusterZone.on('mouseup', () => {\n scope.$emit(CREATE_CLUSTER);\n });\n }\n }\n\n function getNodesModel() {\n const nodes = cloneDeep(scope.clusterModel.nodes) || [];\n nodes.forEach((node) => {\n node.hostname = UriUtils.shortenIri(node.endpoint);\n if (!isEmpty(node.recoveryStatus)) {\n let messageLabelKey = `cluster_management.cluster_graphical_view.recovery_state.${node.recoveryStatus.state.toLowerCase()}`;\n const hasAffectedNodes = node.recoveryStatus.affectedNodes && node.recoveryStatus.affectedNodes.length > 0;\n if (hasAffectedNodes) {\n messageLabelKey += '_with_affected_node';\n }\n node.recoveryStatus.message = $translate.instant(messageLabelKey, {node: node.recoveryStatus.affectedNodes.join(', ')});\n }\n });\n return nodes;\n }\n\n function mousedownHandler(event) {\n scope.$emit(CLICK_IN_VIEW, event.target);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = getNodesModel();\n createNodes(nodes);\n const links = cloneDeep(scope.clusterModel.links) || [];\n drawLinks(links, nodes);\n }\n\n // =========================\n // Events and watchers\n // =========================\n\n const subscribeHandlers = () => {\n w.bind('resize', resize);\n w.bind('mousedown', mousedownHandler);\n\n subscriptions.push($rootScope.$on('$translateChangeSuccess', function() {\n updateTranslations(translationsMap);\n updateLabels();\n }));\n\n subscriptions.push(scope.$on(MODEL_UPDATED, function() {\n plot();\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n scope.$on(\"$destroy\", function() {\n w.unbind('resize', resize);\n w.unbind('mousedown', mousedownHandler);\n CDS.removeEventListeners();\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n hasAccess = authorizationService.isAdmin();\n subscribeHandlers();\n updateTranslations(translationsMap);\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n plot();\n }\n initialize();\n },\n };\n },\n]);\n","import {Location} from \"../../models/clustermanagement/cluster\";\n\nconst modules = [];\nangular.module('graphdb.framework.clustermanagement.directives.cluster-nodes-configuration', modules)\n .directive('clusterNodesConfiguration', ClusterNodesConfigurationComponent);\n\nClusterNodesConfigurationComponent.$inject = ['$translate', '$timeout', 'productInfo', 'toastr', 'RemoteLocationsService', 'ClusterContextService', 'ModalService'];\n\nfunction ClusterNodesConfigurationComponent($translate, $timeout, productInfo, toastr, RemoteLocationsService, ClusterContextService, ModalService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-nodes-configuration.html',\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.rowHeights = {};\n $scope.editedNodeIndex = undefined;\n $scope.allSuggestions = [];\n $scope.loader = false;\n $scope.errors = [];\n $scope.addNewLocation = false;\n $scope.hasCluster = false;\n\n /**\n * Adds a new (empty) node to the list of cluster nodes for editing.\n */\n $scope.addNode = () => {\n $scope.addNewLocation = true;\n $scope.newLocation = new Location();\n // Timeout used because field is added dynamically on \"Add Node\" and needs to render before it can be focused\n $timeout(function() {\n const input = document.querySelector(\"input[name='location']\");\n if (input) {\n input.focus();\n }\n }, 0);\n };\n\n /**\n * Filters suggestions based on user input for node's endpoint.\n * @param {Object} node - The node object with an endpoint property.\n */\n $scope.filterSuggestions = (node) => {\n const query = node.endpoint && node.endpoint.toLowerCase();\n if (query) {\n $scope.suggestions = $scope.allSuggestions.filter((item) => item.toLowerCase().includes(query));\n $scope.showDropdown = true;\n } else {\n $scope.suggestions = [];\n $scope.showDropdown = false;\n }\n };\n\n /**\n * Selects a suggestion from the dropdown and updates the node's endpoint.\n * @param {Object} node - The node object to update.\n * @param {string} suggestion - The selected suggestion for the node's endpoint.\n */\n $scope.selectSuggestion = (node, suggestion) => {\n node.endpoint = suggestion;\n $scope.suggestions = [];\n $scope.showDropdown = false;\n };\n\n /**\n * Hides the suggestions dropdown after a timeout, used after user selection or clicking away.\n */\n $scope.hideSuggestions = () => {\n $timeout(() => {\n $scope.showDropdown = false;\n }, 200);\n };\n\n /**\n * Handles keyboard events for form input fields.\n * Processes Enter key to save the node when form is valid and Escape key to cancel.\n *\n * @param {KeyboardEvent} event - The keyboard event object\n * @param {boolean} formValid - Whether the current form is valid\n * @param {string} endpoint - The endpoint URL to save\n */\n $scope.handleKeydown = function(event, formValid, endpoint) {\n if (event.key === 'Enter' && formValid) {\n event.preventDefault();\n $scope.saveNode(endpoint);\n } else if (event.key === 'Escape') {\n $scope.cancel();\n }\n };\n\n /**\n * Saves a node to the cluster based on the provided endpoint.\n * If the node is found in the cluster deletion list, it is restored.\n * If the node is available in the cluster, it is added.\n * Otherwise, a new location is created and added.\n *\n * @param {string} endpoint - The endpoint of the node to save.\n */\n $scope.saveNode = (endpoint) => {\n const availableList = ClusterContextService.getAvailable(true);\n const node = ClusterContextService.findByEndpoint(availableList, endpoint) || new Location(endpoint);\n const oldNode = ClusterContextService.getPendingReplace();\n\n handleNodeSave(node, oldNode);\n };\n\n /**\n * Deletes a node from the cluster.\n * @param {number} index - The index of the node to delete.\n * @param {ClusterItemViewModel} itemView - The item to delete.\n * @return {void}\n */\n $scope.deleteNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.confirm.detach'),\n message: $translate.instant('location.confirm.detach.warning', {uri: itemView.endpoint}),\n warning: true,\n }).result.then(() => {\n ClusterContextService.deleteFromCluster(itemView.item);\n });\n };\n\n /**\n * Initiates the replacement of a node in the cluster view.\n * @param {number} index - The zero-based index of the node in the cluster view array that is to be replaced.\n * @param {ClusterItemViewModel} itemView - The node object representing the current state of the node to be replaced.\n * @return {void}\n */\n $scope.replaceNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.change.confirm'),\n message: $translate.instant('location.change.confirm.warning'),\n warning: true,\n }).result.then(() => {\n ClusterContextService.setPendingReplace(itemView.item);\n $scope.editedNodeIndex = index;\n });\n };\n\n /**\n * Checks if the current cluster configuration is valid.\n * The configuration is considered valid if there are at least two nodes and no nodes are being edited.\n * @return {boolean} True if the configuration is valid, false otherwise.\n */\n $scope.isClusterConfigurationValid = () => {\n const isNotInEditMode = $scope.editedNodeIndex === undefined;\n const isNotInAddMode = $scope.addNewLocation === false;\n const hasValidNodes = ClusterContextService.hasValidNodesCount();\n const hasValidConfiguration = $scope.form.$valid;\n return isNotInEditMode && isNotInAddMode && hasValidNodes && hasValidConfiguration;\n };\n\n /**\n * Sets the loader state with a message.\n * The loader state is shown with a delay to avoid flickering for short operations.\n * @param {boolean} loader - Whether to show the loader.\n * @param {string} [message] - The message to show with the loader.\n */\n $scope.setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n /**\n * Determines the CSS class for the advanced options button based on its expanded state.\n *\n * @return {string} - Returns 'ri-arrow-down-s-line' if the 'advancedOptions' element is expanded, otherwise 'ri-arrow-right-s-line'.\n */\n $scope.getAdvancedOptionsClass = () => {\n const optionsModule = document.getElementById('advancedOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'ri-arrow-down-s-line';\n }\n }\n return 'ri-arrow-right-s-line';\n };\n\n /**\n * Cancels the current action and resets the form state.\n *\n * @return {void}\n */\n $scope.cancel = () => {\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n resetNodeEditState();\n ClusterContextService.emitUpdateClusterView();\n };\n\n $scope.restoreNode = (node) => {\n ClusterContextService.restoreNode(node.item);\n };\n\n // =========================\n // Private functions\n // =========================\n /**\n * Handles the saving of an existing node in the cluster.\n * @param {Object} node - The node object found in the cluster.\n * @param {Object|null} oldNode - The old node that is being replaced (if any).\n */\n function handleNodeSave(node, oldNode) {\n if (oldNode) {\n ClusterContextService.replace(oldNode, node);\n } else {\n ClusterContextService.addLocation(node);\n }\n resetNodeEditState();\n }\n\n /**\n * Resets the state of the node edit operation.\n */\n const resetNodeEditState = () => {\n ClusterContextService.setPendingReplace(undefined);\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n };\n\n const onClusterViewChanged = (cluster) => {\n $scope.hasCluster = ClusterContextService.hasCluster();\n $scope.viewModel = ClusterContextService.getViewModel();\n $scope.clusterNodesEndpoints = $scope.viewModel.map((node) => node.endpoint);\n $scope.clusterConfiguration = ClusterContextService.getClusterConfiguration();\n $scope.allSuggestions = ClusterContextService.getAvailableNodeEndpoints();\n $scope.canDeleteNode = ClusterContextService.canDeleteNode();\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n /**\n * Removes all listeners and unsubscribes from events when the directive is destroyed.\n */\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n const unwatch = $scope.$watchGroup([\n 'editedNodeIndex',\n 'addNewLocation',\n 'clusterConfiguration.electionMinTimeout',\n 'clusterConfiguration.electionRangeTimeout',\n 'clusterConfiguration.heartbeatInterval',\n 'clusterConfiguration.messageSizeKB',\n 'clusterConfiguration.verificationTimeout',\n 'clusterConfiguration.transactionLogMaximumSizeGB',\n ], (newValues, oldValues) => {\n const isValid = $scope.isClusterConfigurationValid();\n ClusterContextService.updateClusterValidity(isValid);\n });\n\n subscriptions.push(unwatch);\n subscriptions.push(ClusterContextService.onClusterViewChanged(onClusterViewChanged));\n $scope.$on('$destroy', removeAllListeners);\n },\n };\n}\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name validateDuplicateUrl\n * @module graphdb.framework.core.directives.validate-duplicate-url\n * @restrict A\n *\n * @description\n * This directive validates an input field for duplicate URLs. It checks whether the input URL\n * exists within a provided list of excluded or duplicate URLs and marks the input as invalid if a match is found.\n *\n * The directive requires an array of URLs to be passed using the `excluded-urls` attribute.\n * If the input URL is found within this array, a `duplicateUrl` error is added to the form control.\n *\n * This directive works in conjunction with other validators such as `validate-url` for format validation.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL duplicate validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-duplicate-url excluded-urls=\"existingUrls\"/>\n * <div ng-show=\"myForm.urlField.$error.duplicateUrl\">\n * URL already exists.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where duplicate URL validation is required.\n * It will automatically validate the input value against the provided list of excluded URLs.\n *\n * @param {Array} excludedUrls - An array of URLs to check against for duplicates.\n * @returns {boolean} Whether the URL is valid. It returns `true` if the URL is not in the `excludedUrls` array and `false` if it is.\n */\nangular\n .module('graphdb.framework.core.directives.validate-duplicate-url', [])\n .directive('validateDuplicateUrl', validateDuplicateUrl);\n\nfunction validateDuplicateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n excludedUrls: '='\n },\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.duplicateUrl = function (modelValue, viewValue) {\n if (scope.excludedUrls && scope.excludedUrls.includes(viewValue)) {\n ctrl.$setValidity('duplicateUrl', false);\n return false;\n } else {\n ctrl.$setValidity('duplicateUrl', true);\n }\n return true;\n };\n }\n };\n}\n","/**\n * @ngdoc directive\n * @name validateUrl\n * @module graphdb.framework.core.directives.validate-url\n * @restrict A\n *\n * @description\n * This directive validates the URL input field based on a specified pattern.\n * It ensures that the input URL adheres to standard URL formats and provides\n * visual feedback to the user if the URL is invalid.\n *\n * The directive can also be configured to exclude certain substrings or protocols from valid URLs,\n * and to control whether empty input values are considered valid.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-url/>\n * <div ng-show=\"myForm.urlField.$error.validUrl\">\n * Invalid URL format.\n * </div>\n *\n * <!-- URL validation excluding a specific substring -->\n * <input type=\"text\" name=\"urlFieldWithExclusion\" ng-model=\"url\" validate-url exclude=\"/repositories\"/>\n * <div ng-show=\"myForm.urlFieldWithExclusion.$error.validUrl\">\n * Invalid URL format or contains excluded substring.\n * </div>\n *\n * <!-- URL validation excluding a specific protocol -->\n * <input type=\"text\" name=\"urlFieldWithProtocolExclusion\" ng-model=\"url\" validate-url exclude-protocol=\"ftp\"/>\n * <div ng-show=\"myForm.urlFieldWithProtocolExclusion.$error.validUrl\">\n * Invalid URL format or uses an excluded protocol.\n * </div>\n *\n * <!-- URL validation that does not allow empty values -->\n * <input type=\"text\" name=\"urlFieldNoEmpty\" ng-model=\"url\" validate-url allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldNoEmpty.$error.validUrl\">\n * Invalid URL format or empty value not allowed.\n * </div>\n *\n * <!-- URL validation with both substring and protocol exclusions, and empty values not allowed -->\n * <input type=\"text\" name=\"urlFieldFullValidation\" ng-model=\"url\" validate-url exclude=\"/repositories\" exclude-protocol=\"ftp\" allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldFullValidation.$error.validUrl\">\n * Invalid URL format, contains excluded substring, uses an excluded protocol, or empty value not allowed.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where URL validation is required.\n * It will automatically validate the input value.\n *\n * Optional attributes:\n * - `exclude`: A string specifying a substring that must not be present in the URL.\n * - `exclude-protocol`: A comma-separated list of protocols (e.g., `ftp,http`) that must not be used in the URL.\n * - `allow-empty`: A boolean attribute (`true` by default). If set to `false`, empty values are considered invalid.\n */\n\nimport {UrlUtils} from \"../../utils/url-utils\";\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.core.directives.validate-url', modules)\n .directive('validateUrl', validateUrl);\n\nfunction validateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.validUrl = function (modelValue, viewValue) {\n // Check if empty values should be allowed\n if (ctrl.$isEmpty(viewValue)) {\n return attr.allowEmpty !== 'false';\n }\n\n if (!UrlUtils.isValidUrl(viewValue)) {\n return false;\n }\n\n if (attr.exclude && !UrlUtils.doesNotContain(viewValue, attr.exclude)) {\n return false;\n }\n\n if (attr.excludeProtocol) {\n const excludedProtocols = attr.excludeProtocol.split(',');\n if (!UrlUtils.doesNotUseProtocol(viewValue, excludedProtocols)) {\n return false;\n }\n }\n return true;\n };\n }\n };\n}\n","const httpRegex = /^(h|ht|htt|http|https|http:|https:|http:\\/|https:\\/|http:\\/\\/|https:\\/\\/|https?:\\/\\/[\\S]*)$/i;\nconst ftpRegex = /^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\\/|ftps:\\/|ftp:\\/\\/|ftps:\\/\\/[\\S]*)$/i;\n\n\n/**\n * Utilities for URL manipulation, validation, etc.\n */\nexport class UrlUtils {\n /**\n * Validates whether the given string is a valid URL or a partial URL that follows the rules.\n *\n * @param {string} url - The URL string to validate.\n * @return {boolean} True if the URL is valid or a valid partial URL, false otherwise.\n */\n static isValidUrl(url) {\n return httpRegex.test(url) || ftpRegex.test(url);\n }\n\n /**\n * Checks if the URL contains an excluded substring.\n *\n * @param {string} url - The URL string to check.\n * @param {string} exclude - The substring to exclude.\n * @return {boolean} True if the URL does not contain the substring, false if it does.\n */\n static doesNotContain(url, exclude) {\n return !new RegExp(exclude).test(url);\n }\n\n /**\n * Checks if the URL uses an excluded protocol.\n *\n * @param {string} url - The URL string to check.\n * @param {Array<string>} excludedProtocols - The protocols to exclude.\n * @return {boolean} True if the URL does not use the excluded protocols, false if it does.\n */\n static doesNotUseProtocol(url, excludedProtocols) {\n const protocolPattern = new RegExp('^(' + excludedProtocols.join('|') + ')://', 'i');\n return !protocolPattern.test(url);\n }\n}\n","define(['d3'],\n function(d3) {\n (function() {\n\n // Node/CommonJS - require D3\n if (typeof (module) !== 'undefined' && typeof (exports) !== 'undefined' && typeof (d3) == 'undefined') {\n d3 = require('d3');\n }\n })();\n\n function attrsFunction(selection, map) {\n return selection.each(function () {\n var x = map.apply(this, arguments), s = select(this);\n for (var name in x) s.attr(name, x[name]);\n });\n }\n\n function attrsObject(selection, map) {\n for (var name in map) selection.attr(name, map[name]);\n return selection;\n }\n\n function selection_attrs(map) {\n return (typeof map === \"function\" ? attrsFunction : attrsObject)(this, map);\n }\n\n d3.selection.prototype.attrs = selection_attrs\n\n d3.selection.prototype.moveToFront = function () {\n return this.each(function () {\n d3.select(this.parentNode.appendChild(this));\n });\n };\n\n d3.selection.prototype.moveToBack = function () {\n return this.each(function () {\n const firstChild = this.parentNode.firstChild;\n if (firstChild) {\n this.parentNode.insertBefore(this, firstChild);\n }\n });\n };\n\n return d3;\n });\n"],"names":["angular","module","directive","ClusterConfiguration","$inject","CONFIGURATION_TABS","PROPERTIES","NODES","MULTI_REGION","$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService","restrict","templateUrl","scope","currentNode","clusterModel","clusterConfiguration","link","$scope","subscriptions","activeTab","closeClusterConfigurationPanel","hideClusterConfigurationPanel","switchTab","$event","tab","$on","forEach","subscription","push","onShowClusterConfigurationPanel","show","ClusterNodes","ClusterProperties","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","isAdmin","showEditConfigurationDialog","open","controller","size","resolve","data","result","finally","$emit","UPDATE_CLUSTER","force","showDeleteDialog","then","forceDelete","DELETE_CLUSTER","isAuthenticated","TagLengthConstraints","minLen","maxLen","MultiRegion","$timeout","ModalService","ClusterRestService","topology","undefined","TopologyState","addingTag","loaderTimeout","secondaryTag","loader","statusLoader","add","cancel","createTag","tag","payload","setLoader","addCusterTag","success","instant","catch","response","msg","getError","error","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","$uibModalInstance","config","rpcAddress","onClick","ok","close","primaryNode","dismiss","openCustomModal","updateClusterData","setStatusLoader","getClusterConfig","fromJSON","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","primaryTags","loaderMessage","$watch","newValue","oldValue","d3","select","navigationBarWidth","translationsMap","no_cluster_configured","create_cluster_btn","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","recovery_state","searching_for_node","waiting_for_snapshot","receiving_snapshot","applying_snapshot","building_snapshot","sending_snapshot","recovery_operation_failure_warning","idTranslationKeyMap","node_state","link_state","$window","LocalStorageAdapter","LSKeys","UriUtils","$rootScope","element","w","hasAccess","hasCluster","clusterZone","nodesGroup","linksGroup","width","getWindowWidth","height","getWindowHeight","clusterZoneRadius","Math","min","clusterZoneX","clusterZoneY","resize","svg","getClusterViewD3Container","attr","plot","updateTranslations","translationMapObject","translationAppend","Object","keys","key","compoundKey","value","collapsed","get","MENU_STATE","max","floor","innerWidth","innerHeight","mousedownHandler","event","CLICK_IN_VIEW","target","CDS","on","CREATE_CLUSTER","setClusterZoneType","cloneDeep","hostname","shortenIri","endpoint","isEmpty","recoveryStatus","messageLabelKey","state","toLowerCase","affectedNodes","length","join","getNodesModel","nodeData","selectAll","address","nodesElements","d","NODE_SELECTED","tooltip","windowWidth","$","window","pageX","style","pageY","createNodes","links","linksData","id","drawLinks","unbind","bind","elementId","text","getLabelFor","MODEL_UPDATED","append","ARROW_CONFIG","BIG","SMALL","updateClusterViewD3Container","createClusterZone","ClusterNodesConfigurationComponent","productInfo","RemoteLocationsService","ClusterContextService","rowHeights","editedNodeIndex","allSuggestions","errors","addNewLocation","addNode","newLocation","Location","input","document","querySelector","focus","filterSuggestions","query","suggestions","filter","item","includes","showDropdown","selectSuggestion","suggestion","hideSuggestions","handleKeydown","formValid","preventDefault","saveNode","availableList","getAvailable","oldNode","findByEndpoint","getPendingReplace","replace","addLocation","resetNodeEditState","deleteNode","index","itemView","uri","deleteFromCluster","replaceNode","setPendingReplace","isClusterConfigurationValid","isNotInEditMode","isNotInAddMode","hasValidNodes","hasValidNodesCount","hasValidConfiguration","form","$valid","getAdvancedOptionsClass","optionsModule","getElementById","isAriaExpanded","getAttribute","emitUpdateClusterView","restoreNode","unwatch","$watchGroup","newValues","oldValues","isValid","updateClusterValidity","onClusterViewChanged","cluster","viewModel","getViewModel","clusterNodesEndpoints","map","getClusterConfiguration","getAvailableNodeEndpoints","canDeleteNode","removeAllListeners","require","attrs","ngModel","validateAscii","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","excludedUrls","ctrl","$validators","duplicateUrl","modelValue","viewValue","validUrl","$isEmpty","allowEmpty","UrlUtils","isValidUrl","exclude","doesNotContain","excludeProtocol","excludedProtocols","split","doesNotUseProtocol","httpRegex","ftpRegex","url","RegExp","define","attrsFunction","selection","each","x","apply","this","arguments","s","name","attrsObject","prototype","moveToFront","parentNode","appendChild","moveToBack","firstChild","insertBefore"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_esm_id__=64709;export const __webpack_esm_ids__=[64709];export const __webpack_esm_modules__={64709(){function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.5.1-
|
|
2
|
-
//# sourceMappingURL=64709.
|
|
1
|
+
export const __webpack_esm_id__=64709;export const __webpack_esm_ids__=[64709];export const __webpack_esm_modules__={64709(){function t(){return{link:function(t,e,o){t.$watch("file.status",function(){"IMPORTING"!==t.file.status&&"UPLOADING"!==t.file.status||!$(e).has("object").length>0&&$(e).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.5.1-TR4">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
|
|
2
|
+
//# sourceMappingURL=64709.9433b8aa61531902cee9.bundle.js.map
|
package/dist/{64709.ee1c17ee7de2cbf4e64f.bundle.js.map → 64709.9433b8aa61531902cee9.bundle.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"64709.
|
|
1
|
+
{"version":3,"file":"64709.9433b8aa61531902cee9.bundle.js","mappings":"6HASA,SAASA,IACL,MAAO,CACHC,KAAM,SAAUC,EAAOC,EAASC,GAC5BF,EAAMG,OAAO,cAAe,WACE,cAAtBH,EAAMI,KAAKC,QAAgD,cAAtBL,EAAMI,KAAKC,SAC3CC,EAAEL,GAASM,IAAI,UAAUC,OAAS,GACnCF,EAAEL,GAASQ,OAAO,kBAAoBP,EAAKQ,KAAO,aAAeR,EAAKQ,KAAO,6GAGzF,EACJ,EAER,CAnBAC,QACKC,OAAO,gEAHI,IAIXC,UAAU,0BAA2Bf,GAE1CA,EAAwBgB,QAAU,E","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/import/directives/import-progress-indicator.directive.js"],"sourcesContent":["const modules = [];\n\nangular\n .module('graphdb.framework.import.directives.import-progress-indicator', modules)\n .directive('ImportProgressIndicator', ImportProgressIndicator);\n\nImportProgressIndicator.$inject = [];\n\n// importDirectives.directive('filesOntoLoader',\nfunction ImportProgressIndicator() {\n return {\n link: function (scope, element, attr) {\n scope.$watch('file.status', function () {\n if (scope.file.status === 'IMPORTING' || scope.file.status === 'UPLOADING') {\n if (!$(element).has('object').length > 0) {\n $(element).append('<object width=\"' + attr.size + '\" height=\"' + attr.size + '\" data=\"js/angular/templates/loader/ot-loader.svg?v=3.5.1-TR4\">{{\\'common.loading\\' | translate}}</object>');\n }\n }\n });\n }\n };\n}\n"],"names":["ImportProgressIndicator","link","scope","element","attr","$watch","file","status","$","has","length","append","size","angular","module","directive","$inject"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const __webpack_esm_id__=65677;export const __webpack_esm_ids__=[65677];export const __webpack_esm_modules__={65677(t,e,r){var a=r(66886),n=r(9508),o=(r(38473),r(44482));function s(t,e,r,s,c,i,l,d,p,u,f,g,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const f=d(function(){!function(u){var f=1200,y=f/18,x=f/110,m=x/2,v=f/90,b=1.2,k=o.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),w=o.forceSimulation(),E=o.drag().subject(function(t){return t}).on("start",function(t,e){w.stop(),e.fx=t.x,e.fy=t.y,o.select(this).classed("selected",!0)}).on("end",function(t,e){e.fx=null,e.fy=null,o.select(this).classed("selected",!1),C?(w.alpha(.2).restart(),C=!1):w.restart()}).on("drag",function(t,e){C=!0,w.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y}),N=k.append("defs");N.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),o.select("#download-svg").on("mouseover",function(){var t=a.A.Export.getCSSRules("css/domain-range-graph.css?v=3.5.1-TR2");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.A.Export.generateBase64ImageSource("#domain-range svg");o.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})}),function(){var t=f/7,e=205.7142857142857,r=o.select(".legend-container").append("svg").attr("viewBox","0 0 "+t+" "+e).attr("preserveAspectRatio","xMidYMid meet");r.append("rect").attrs({width:t,height:e}).style("fill","rgba(235, 235, 235, 0.9)");var a=16,n=42.66666666666667,s=n+f/90,i=v/1.1,l=(r.append("circle").attrs({class:"legend-class-node",cx:29.333333333333336,cy:30,r:y/4.5}),30+f/370);r.append("text").attrs({x:s,y:l}).style("font-size",i+"px").text("main class node"),r.append("circle").attrs({class:"legend-object-node",cx:29.333333333333336,cy:70,r:8.727272727272727});var d=l+40;r.append("text").attrs({x:s,y:d}).style("font-size",i+"px").text("class node");var p=70+f/45;r.append("circle").attrs({class:"legend-datatype-node",cx:29.333333333333336,cy:p,r:m});var u=d+f/45;r.append("text").attrs({x:s,y:u}).style("font-size",i+"px").text("datatype node");var g=123.33333333333334;r.append("line").attrs({class:"property-arrow",x1:a,y1:g,x2:n,y2:g}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:126.57657657657658}).style("font-size",i+"px").text("explicit property");var h=150;r.append("line").attrs({class:"implicit-property-arrow",x1:a,y1:h,x2:n,y2:h}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:153.24324324324326}).style("font-size",i+"px").text("implicit property");var x=176.66666666666666;r.append("line").attrs({class:"collapsed-property-arrow",x1:a,y1:x,x2:n,y2:x}).style("stroke-width",2).attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)"),r.append("text").attrs({x:s,y:179.9099099099099}).style("font-size",i+"px").text("collapsed property")}();var R=c.search().uri,A=c.search().name;const L=c.search().collapsed;(function(t,e){s.getDomainRangeData(t,e).success(function(t,e,r){u.domainRangeGraphData=t}).error(function(t){p.error("Request for "+A+" failed!")})})(R,L),$(window).on("popstate",function(){i.set(l.DOMAIN_RANGE_WENT_BACK,!0)}),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",function(){angular.isUndefined(u.collapseEdges)||(i.set(l.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(l.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:R,name:A,collapsed:e})}(u.collapseEdges),i.remove(l.DOMAIN_RANGE_WENT_BACK))}),u.$watch("domainRangeGraphData",function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const S=r.nodes,I=r.links;w.nodes(S).force("x",o.forceX(600)).force("y",o.forceY(300)).force("charge",o.forceManyBody().strength(-800)).force("link",o.forceLink(I).distance(f/3.5));var a=k.selectAll(".link").data(I).enter().append("g");function B(t){t.style("stroke",g),t.style("stroke-width",2),t.attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)")}var s,i,l=0;a.each(function(t){if(t.objectPropNodeClassUri!==R)s=a.append("line").attrs({class:"link","marker-end":"url("+c.absUrl()+"#arrow)"}).style("stroke-width",b).each(function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=y;break;case"objectRight":t.targetRadius=x;break;case"datatype":t.targetRadius=m;break;default:t.targetRadius=0}var e=o.select(this);t.targetNodeEdgeCount>1?B(e):t.implicit&&e.style("stroke-dasharray","3, 3")});else{if(angular.isUndefined(i)){var e=y/2;i=o.select(this).append("path").attrs({d:"M 0 0 A "+e+" "+e+" 0 1 1 0 "+e,class:"loop-link",fill:"none","marker-end":"url("+c.absUrl()+"#arrow-loop)"}).style("stroke-width",b)}(l+=t.targetNodeEdgeCount)>1&&B(o.select(".loop-link"))}});var p={};function G(){$.isEmptyObject(p)||(p.text.style("fill","black"),p.background.style("fill","#f0f0f0"))}function W(t,e){G(),p.text=o.select(this),p.background=o.select(this.previousSibling),p.text.style("fill","white"),p.background.style("fill",g),d(function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e}),t.stopPropagation()}$("document").ready(function(){$("#domain-range").bind("click",G)});var N=a.append("text").attr("class",function(t){return t.objectPropNodeClassUri===R?"loop-link-property-name":"property-name"}).attr("dx",function(t){return y/2*("objectLeft"===t.propertyType?1:-1)}).style("text-anchor",function(t){return"objectLeft"===t.propertyType?"end":"start"}).style("font-size",v).text(function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name});N.each(function(t){var r=o.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",W):r.on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")})});var L=a.append("rect").attr("class",function(t){return t.objectPropNodeClassUri!==R?"link-background":"loop-link-background"}).attr("width",function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4}).attr("height",function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2}).attr("transform",function(t){var e=2-y/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"}).on("click",function(t){t.stopPropagation()}),C=k.selectAll(".node").data(S).enter().append("g"),P=C.filter(function(t){return t.objectPropClassUri!==R}).append("circle").each(function(t){var e=o.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:y}).attr("marker-end","url("+c.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:m}):e.attrs({class:"object-prop-node",r:x})}).call(E);function z(e,r,a){u.$apply(function(){t.$broadcast("reloadDomainRangeGraphView",r,a)})}o.selectAll(".object-prop-node").on("dblclick",z),C.filter(function(t){return t.objectPropClassName&&t.objectPropClassUri!==R}).append("text").attr("class",function(t){return t.classPosition+"-class-label"}).style("font-size",v).text(function(t){return t.objectPropClassName}).on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")});var U=C.select("text");k.select(".class-node").each(function(){o.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",function(t){return n.A.Text.calcFontSize(A,y)}).text(A).on("click",function(){e.open("resource?uri="+encodeURIComponent(R),"_blank")})});var j=k.select(".class-node + text"),T=o.select(".class-node"),M=o.selectAll(".loop-link-background"),O=o.selectAll(".loop-link-property-name");if(N=o.selectAll(".property-name"),!angular.isUndefined(i)){var D=[];M.each(function(t,e){o.select(this),D.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})})}function F(t){var e=8*w.alpha();function r(t){var e=t.x+2*y,r=t.y-35.08771929824562;var a=[];M.each(function(n,s){a.push(n),s<h?function(a,n){var o=$.grep(D,function(t){return t.idx==n});n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(o.select(this),s):o.select(this).remove()}),function(t){var e;o.select(".view-more-preds-label").style("font-weight","bold").each(function(r){r.target.allEdges=t,e=this.getComputedTextLength()}).on("click",W),o.select(".view-more-preds-rect").attr("height",e+4)}(a)}s.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.targetX}).attr("y2",function(t){return t.targetY}).each(function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius}),P.each(function(t){"main"!==t.classPosition||angular.isUndefined(i)||(function(t){var e=t.x+64,r=t.y-y/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(D,function(t){return t.idx==r}),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-2.1*y-n;e.attrs({x:o,y:s}).moveToFront()}O.each(function(t,r){var a=o.select(this),n=O.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,o.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())})}(t),r(t)),t.objectPropClassUri!==R&&o.select(this).attr("cx",function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=T.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x}).attr("cy",function(t){return t.y})}),j.attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).moveToFront(),L.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),N.attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),U.attr("x",function(t){return"right"===t.classPosition?t.x+13.09090909090909:t.x-13.09090909090909}).attr("y",function(t){return t.y}).moveToFront()}w.on("tick",F)}});let C=!1}(u)},50);u.$on("$destroy",function(){d.cancel(f)})}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--gw-primary-base)").constant("ONTO_GREEN","var(--gw-tertiary-base)").constant("ONTO_BLUE","var(--gw-secondary-base)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",s),s.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]}};
|
|
2
|
-
//# sourceMappingURL=65677.
|
|
1
|
+
export const __webpack_esm_id__=65677;export const __webpack_esm_ids__=[65677];export const __webpack_esm_modules__={65677(t,e,r){var a=r(66886),n=r(9508),o=(r(38473),r(44482));function s(t,e,r,s,c,i,l,d,p,u,f,g,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const f=d(function(){!function(u){var f=1200,y=f/18,x=f/110,m=x/2,v=f/90,b=1.2,k=o.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),w=o.forceSimulation(),E=o.drag().subject(function(t){return t}).on("start",function(t,e){w.stop(),e.fx=t.x,e.fy=t.y,o.select(this).classed("selected",!0)}).on("end",function(t,e){e.fx=null,e.fy=null,o.select(this).classed("selected",!1),C?(w.alpha(.2).restart(),C=!1):w.restart()}).on("drag",function(t,e){C=!0,w.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y}),N=k.append("defs");N.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),o.select("#download-svg").on("mouseover",function(){var t=a.A.Export.getCSSRules("css/domain-range-graph.css?v=3.5.1-TR4");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.A.Export.generateBase64ImageSource("#domain-range svg");o.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})}),function(){var t=f/7,e=205.7142857142857,r=o.select(".legend-container").append("svg").attr("viewBox","0 0 "+t+" "+e).attr("preserveAspectRatio","xMidYMid meet");r.append("rect").attrs({width:t,height:e}).style("fill","rgba(235, 235, 235, 0.9)");var a=16,n=42.66666666666667,s=n+f/90,i=v/1.1,l=(r.append("circle").attrs({class:"legend-class-node",cx:29.333333333333336,cy:30,r:y/4.5}),30+f/370);r.append("text").attrs({x:s,y:l}).style("font-size",i+"px").text("main class node"),r.append("circle").attrs({class:"legend-object-node",cx:29.333333333333336,cy:70,r:8.727272727272727});var d=l+40;r.append("text").attrs({x:s,y:d}).style("font-size",i+"px").text("class node");var p=70+f/45;r.append("circle").attrs({class:"legend-datatype-node",cx:29.333333333333336,cy:p,r:m});var u=d+f/45;r.append("text").attrs({x:s,y:u}).style("font-size",i+"px").text("datatype node");var g=123.33333333333334;r.append("line").attrs({class:"property-arrow",x1:a,y1:g,x2:n,y2:g}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:126.57657657657658}).style("font-size",i+"px").text("explicit property");var h=150;r.append("line").attrs({class:"implicit-property-arrow",x1:a,y1:h,x2:n,y2:h}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:153.24324324324326}).style("font-size",i+"px").text("implicit property");var x=176.66666666666666;r.append("line").attrs({class:"collapsed-property-arrow",x1:a,y1:x,x2:n,y2:x}).style("stroke-width",2).attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)"),r.append("text").attrs({x:s,y:179.9099099099099}).style("font-size",i+"px").text("collapsed property")}();var R=c.search().uri,A=c.search().name;const L=c.search().collapsed;(function(t,e){s.getDomainRangeData(t,e).success(function(t,e,r){u.domainRangeGraphData=t}).error(function(t){p.error("Request for "+A+" failed!")})})(R,L),$(window).on("popstate",function(){i.set(l.DOMAIN_RANGE_WENT_BACK,!0)}),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",function(){angular.isUndefined(u.collapseEdges)||(i.set(l.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(l.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:R,name:A,collapsed:e})}(u.collapseEdges),i.remove(l.DOMAIN_RANGE_WENT_BACK))}),u.$watch("domainRangeGraphData",function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const S=r.nodes,I=r.links;w.nodes(S).force("x",o.forceX(600)).force("y",o.forceY(300)).force("charge",o.forceManyBody().strength(-800)).force("link",o.forceLink(I).distance(f/3.5));var a=k.selectAll(".link").data(I).enter().append("g");function B(t){t.style("stroke",g),t.style("stroke-width",2),t.attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)")}var s,i,l=0;a.each(function(t){if(t.objectPropNodeClassUri!==R)s=a.append("line").attrs({class:"link","marker-end":"url("+c.absUrl()+"#arrow)"}).style("stroke-width",b).each(function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=y;break;case"objectRight":t.targetRadius=x;break;case"datatype":t.targetRadius=m;break;default:t.targetRadius=0}var e=o.select(this);t.targetNodeEdgeCount>1?B(e):t.implicit&&e.style("stroke-dasharray","3, 3")});else{if(angular.isUndefined(i)){var e=y/2;i=o.select(this).append("path").attrs({d:"M 0 0 A "+e+" "+e+" 0 1 1 0 "+e,class:"loop-link",fill:"none","marker-end":"url("+c.absUrl()+"#arrow-loop)"}).style("stroke-width",b)}(l+=t.targetNodeEdgeCount)>1&&B(o.select(".loop-link"))}});var p={};function G(){$.isEmptyObject(p)||(p.text.style("fill","black"),p.background.style("fill","#f0f0f0"))}function W(t,e){G(),p.text=o.select(this),p.background=o.select(this.previousSibling),p.text.style("fill","white"),p.background.style("fill",g),d(function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e}),t.stopPropagation()}$("document").ready(function(){$("#domain-range").bind("click",G)});var N=a.append("text").attr("class",function(t){return t.objectPropNodeClassUri===R?"loop-link-property-name":"property-name"}).attr("dx",function(t){return y/2*("objectLeft"===t.propertyType?1:-1)}).style("text-anchor",function(t){return"objectLeft"===t.propertyType?"end":"start"}).style("font-size",v).text(function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name});N.each(function(t){var r=o.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",W):r.on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")})});var L=a.append("rect").attr("class",function(t){return t.objectPropNodeClassUri!==R?"link-background":"loop-link-background"}).attr("width",function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4}).attr("height",function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2}).attr("transform",function(t){var e=2-y/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"}).on("click",function(t){t.stopPropagation()}),C=k.selectAll(".node").data(S).enter().append("g"),P=C.filter(function(t){return t.objectPropClassUri!==R}).append("circle").each(function(t){var e=o.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:y}).attr("marker-end","url("+c.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:m}):e.attrs({class:"object-prop-node",r:x})}).call(E);function z(e,r,a){u.$apply(function(){t.$broadcast("reloadDomainRangeGraphView",r,a)})}o.selectAll(".object-prop-node").on("dblclick",z),C.filter(function(t){return t.objectPropClassName&&t.objectPropClassUri!==R}).append("text").attr("class",function(t){return t.classPosition+"-class-label"}).style("font-size",v).text(function(t){return t.objectPropClassName}).on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")});var U=C.select("text");k.select(".class-node").each(function(){o.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",function(t){return n.A.Text.calcFontSize(A,y)}).text(A).on("click",function(){e.open("resource?uri="+encodeURIComponent(R),"_blank")})});var j=k.select(".class-node + text"),T=o.select(".class-node"),M=o.selectAll(".loop-link-background"),O=o.selectAll(".loop-link-property-name");if(N=o.selectAll(".property-name"),!angular.isUndefined(i)){var D=[];M.each(function(t,e){o.select(this),D.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})})}function F(t){var e=8*w.alpha();function r(t){var e=t.x+2*y,r=t.y-35.08771929824562;var a=[];M.each(function(n,s){a.push(n),s<h?function(a,n){var o=$.grep(D,function(t){return t.idx==n});n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(o.select(this),s):o.select(this).remove()}),function(t){var e;o.select(".view-more-preds-label").style("font-weight","bold").each(function(r){r.target.allEdges=t,e=this.getComputedTextLength()}).on("click",W),o.select(".view-more-preds-rect").attr("height",e+4)}(a)}s.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.targetX}).attr("y2",function(t){return t.targetY}).each(function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius}),P.each(function(t){"main"!==t.classPosition||angular.isUndefined(i)||(function(t){var e=t.x+64,r=t.y-y/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(D,function(t){return t.idx==r}),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-2.1*y-n;e.attrs({x:o,y:s}).moveToFront()}O.each(function(t,r){var a=o.select(this),n=O.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,o.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())})}(t),r(t)),t.objectPropClassUri!==R&&o.select(this).attr("cx",function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=T.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x}).attr("cy",function(t){return t.y})}),j.attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).moveToFront(),L.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),N.attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),U.attr("x",function(t){return"right"===t.classPosition?t.x+13.09090909090909:t.x-13.09090909090909}).attr("y",function(t){return t.y}).moveToFront()}w.on("tick",F)}});let C=!1}(u)},50);u.$on("$destroy",function(){d.cancel(f)})}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--gw-primary-base)").constant("ONTO_GREEN","var(--gw-tertiary-base)").constant("ONTO_BLUE","var(--gw-secondary-base)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",s),s.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]}};
|
|
2
|
+
//# sourceMappingURL=65677.fb750199607b82ff2f52.bundle.js.map
|