graphdb-workbench 3.5.1-TR2 → 3.5.1-TR3

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.
Files changed (96) hide show
  1. package/dist/{31415.c1d93b653699cefd4e14.bundle.js → 31415.aba4cdda066690a2769d.bundle.js} +2 -2
  2. package/dist/{31415.c1d93b653699cefd4e14.bundle.js.map → 31415.aba4cdda066690a2769d.bundle.js.map} +1 -1
  3. package/dist/3395.ded80bae10361d1d4573.bundle.js +2 -0
  4. package/dist/3395.ded80bae10361d1d4573.bundle.js.map +1 -0
  5. package/dist/{64709.ee1c17ee7de2cbf4e64f.bundle.js → 64709.d6d3d413c90077b5d0cc.bundle.js} +2 -2
  6. package/dist/{64709.ee1c17ee7de2cbf4e64f.bundle.js.map → 64709.d6d3d413c90077b5d0cc.bundle.js.map} +1 -1
  7. package/dist/{65677.2dc4cc317664386a2f5a.bundle.js → 65677.0e8ab27737300e991c60.bundle.js} +2 -2
  8. package/dist/{65677.2dc4cc317664386a2f5a.bundle.js.map → 65677.0e8ab27737300e991c60.bundle.js.map} +1 -1
  9. package/dist/{80933.1020a14ed44c3f0e9faf.bundle.js → 80933.bd439bb6f5fad66637ac.bundle.js} +2 -2
  10. package/dist/{80933.1020a14ed44c3f0e9faf.bundle.js.map → 80933.bd439bb6f5fad66637ac.bundle.js.map} +1 -1
  11. package/dist/{82917.9eb3a3582e35b429090a.bundle.js → 82917.c97f7cec0372ff2f6fdd.bundle.js} +2 -2
  12. package/dist/{82917.9eb3a3582e35b429090a.bundle.js.map → 82917.c97f7cec0372ff2f6fdd.bundle.js.map} +1 -1
  13. package/dist/{85698.3342d281dbe7fe2f3dcb.bundle.js → 85698.ee9962969a310107ccf8.bundle.js} +2 -2
  14. package/dist/{85698.3342d281dbe7fe2f3dcb.bundle.js.map → 85698.ee9962969a310107ccf8.bundle.js.map} +1 -1
  15. package/dist/{86099.70a92c30b2940c5b5b72.bundle.js → 86099.ab3779d6538a6648b2b7.bundle.js} +2 -2
  16. package/dist/{86099.70a92c30b2940c5b5b72.bundle.js.map → 86099.ab3779d6538a6648b2b7.bundle.js.map} +1 -1
  17. package/dist/assets/i18n/language-config.json +1 -1
  18. package/dist/css/cluster-configuration/multi-region.css +1 -1
  19. package/dist/css/user.css +1 -1
  20. package/dist/i18n/locale-en.json +2 -0
  21. package/dist/i18n/locale-fr.json +2 -0
  22. package/dist/index.html +8 -8
  23. package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
  24. package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +6 -2
  25. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  26. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  27. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  28. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  29. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  30. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  31. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
  32. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  33. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  34. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  35. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  36. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  37. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  38. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  39. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  40. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  41. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  42. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  43. package/dist/js/angular/security/templates/user.html +8 -5
  44. package/dist/js/angular/security/templates/users.html +1 -1
  45. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  46. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  47. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  48. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  49. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  50. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  51. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  52. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  53. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  54. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  55. package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js → legacyWorkbench.cdb2fb6bc573f9a9b49d.js} +3 -3
  56. package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js.map → legacyWorkbench.cdb2fb6bc573f9a9b49d.js.map} +1 -1
  57. package/dist/pages/aclmanagement.html +1 -1
  58. package/dist/pages/autocomplete.html +1 -1
  59. package/dist/pages/choose-repository-type.html +1 -1
  60. package/dist/pages/cluster-management/clusterInfo.html +2 -2
  61. package/dist/pages/connectorsInfo.html +3 -3
  62. package/dist/pages/create-index.html +1 -1
  63. package/dist/pages/createConnector.html +2 -2
  64. package/dist/pages/dependencies.html +1 -1
  65. package/dist/pages/domainRangeInfo.html +2 -2
  66. package/dist/pages/edit.html +1 -1
  67. package/dist/pages/explore.html +1 -1
  68. package/dist/pages/export.html +1 -1
  69. package/dist/pages/find.html +1 -1
  70. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  71. package/dist/pages/graphs-visualizations.html +7 -7
  72. package/dist/pages/guides.html +1 -1
  73. package/dist/pages/home.html +1 -1
  74. package/dist/pages/import.html +2 -2
  75. package/dist/pages/jdbc-create.html +1 -1
  76. package/dist/pages/jdbc.html +1 -1
  77. package/dist/pages/monitor/backup-and-restore.html +1 -1
  78. package/dist/pages/monitor/queries.html +1 -1
  79. package/dist/pages/monitor/resources.html +1 -1
  80. package/dist/pages/namespaces.html +2 -2
  81. package/dist/pages/plugins.html +1 -1
  82. package/dist/pages/rdfClassHierarchyInfo.html +7 -7
  83. package/dist/pages/rdfrank.html +2 -2
  84. package/dist/pages/repositories.html +1 -1
  85. package/dist/pages/repository.html +1 -1
  86. package/dist/pages/similarity-indexes.html +1 -1
  87. package/dist/pages/sparql-editor.html +1 -1
  88. package/dist/pages/sparql-template-create.html +1 -1
  89. package/dist/pages/sparql-templates.html +1 -1
  90. package/dist/pages/ux-test1.html +2 -2
  91. package/dist/pages/webapi.html +2 -2
  92. package/dist/res/swagger5/index.html +11 -11
  93. package/package.json +1 -1
  94. package/dist/3395.d91c0fe998bffd4b4a7a.bundle.js +0 -2
  95. package/dist/3395.d91c0fe998bffd4b4a7a.bundle.js.map +0 -1
  96. /package/dist/{legacyWorkbench.a2fa07a08b20056d81d3.js.LICENSE.txt → legacyWorkbench.cdb2fb6bc573f9a9b49d.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:"3",maxLen:"255"};function s(e,t,r,s,l,c,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),c.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=>{l.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),c.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};l.openSimpleModal(r).result.then(()=>_()).then(e=>(p(!0),c.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=()=>{l.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),c.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 l.openCustomModal(e).result},f=r=>{N(!0),c.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))}).catch(e=>{const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>N(!1))},p=(t,n)=>{r.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=r(()=>{e.loader=t},150)):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:()=>l,fe:()=>a,pw:()=>n,vu:()=>o});const n="updateCluster",a="deleteCluster",i="clickInView",o="nodeSelected",s="createCluster",l="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.c1d93b653699cefd4e14.bundle.js.map
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:"3",maxLen:"255"};function s(e,t,r,s,l,c,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),c.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=>{l.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),c.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};l.openSimpleModal(r).result.then(()=>_()).then(e=>(p(!0),c.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=()=>{l.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),c.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 l.openCustomModal(e).result},f=r=>{N(!0),c.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))}).catch(e=>{const r=getError(e);s.error(r,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>N(!1))},p=(t,n)=>{r.cancel(e.loaderTimeout),t?(e.loaderMessage=n,e.loaderTimeout=r(()=>{e.loader=t},150)):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:()=>l,fe:()=>a,pw:()=>n,vu:()=>o});const n="updateCluster",a="deleteCluster",i="clickInView",o="nodeSelected",s="createCluster",l="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.aba4cdda066690a2769d.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"31415.c1d93b653699cefd4e14.bundle.js","mappings":"wMAUAA,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAAqB,CACvBC,WAAY,aACZC,MAAO,QACPC,aAAc,gBAGlB,SAASL,EAAqBM,EAAUC,EAAWC,EAAYC,EAAQC,G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AMU,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,SAAS9G,KAAKgH,GACtBR,EAAQO,YAAY/G,KAAKgH,EAC7B,EAER,E,4DCvCO,MAAMxB,EAAY,CACrBC,OAAQ,SACR6B,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,sBAGX5F,EAAgB,CACzBoG,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: '3',\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 }).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 $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\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","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":""}
1
+ {"version":3,"file":"31415.aba4cdda066690a2769d.bundle.js","mappings":"wMAUAA,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAA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SAASJ,EAAOsH,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,SAAS9G,KAAKgH,GACtBR,EAAQO,YAAY/G,KAAKgH,EAC7B,EAER,E,4DCvCO,MAAMxB,EAAY,CACrBC,OAAQ,SACR6B,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,sBAGX5F,EAAgB,CACzBoG,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: '3',\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 }).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 $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\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","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:"3",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))}).catch(e=>{const n=getError(e);s.error(n,t.instant("cluster_management.cluster_configuration_multi_region.error.disabling"))}).finally(()=>_(!1))},h=(t,r)=>{n.cancel(e.loaderTimeout),t?(e.loaderMessage=r,e.loaderTimeout=n(()=>{e.loader=t},150)):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.ded80bae10361d1d4573.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3395.ded80bae10361d1d4573.bundle.js","mappings":"0QAuBAA,QAAQC,OAAO,sCAXC,CACZ,YACA,SACA,qEACA,wEACA,uEACA,6EACA,iDACA,4D,wCCVJD,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAAqB,CACvBC,WAAY,aACZC,MAAO,QACPC,aAAc,gBAGlB,SAASL,EAAqBM,EAAUC,EAAWC,EAAYC,EAAQC,GACnE,MAAO,CACHC,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vB,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: '3',\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 }).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 $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\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","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-TR2">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
2
- //# sourceMappingURL=64709.ee1c17ee7de2cbf4e64f.bundle.js.map
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-TR3">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",t),t.$inject=[]}};
2
+ //# sourceMappingURL=64709.d6d3d413c90077b5d0cc.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"64709.ee1c17ee7de2cbf4e64f.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-TR2\">{{\\'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
+ {"version":3,"file":"64709.d6d3d413c90077b5d0cc.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-TR3\">{{\\'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":""}