export const __webpack_esm_id__=84397;export const __webpack_esm_ids__=[19994,84397];export const __webpack_esm_modules__={84397(e,t,r){function n(e,t,r,n,o,a,i){e.pageTitle=a.instant("cluster_management.cluster_page.edit_page_title"),e.errors=[],e.clusterConfiguration=_.cloneDeep(i.clusterConfiguration),e.loader=!1,e.configFields=[{id:"election-minimum-timeout",name:"electionMinTimeout",label:"cluster_management.cluster_configuration_properties.election_min_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_min_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"election-range-timeout",name:"electionRangeTimeout",label:"cluster_management.cluster_configuration_properties.election_range_timeout",tooltip:"cluster_management.cluster_configuration_properties.election_range_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"heartbeat-interval",name:"heartbeatInterval",label:"cluster_management.cluster_configuration_properties.heartbeat_interval",tooltip:"cluster_management.cluster_configuration_properties.heartbeat_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"message-size",name:"messageSizeKB",label:"cluster_management.cluster_configuration_properties.message_size_kb",tooltip:"cluster_management.cluster_configuration_properties.message_size_kb_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"verification-timeout",name:"verificationTimeout",label:"cluster_management.cluster_configuration_properties.verification_timeout",tooltip:"cluster_management.cluster_configuration_properties.verification_timeout_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"},{id:"transaction-log-max-size",name:"transactionLogMaximumSizeGB",label:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb",tooltip:"cluster_management.cluster_configuration_properties.transaction_log_maximum_size_gb_tooltip",pattern:"-?[1-9][0-9]*(\\.[0-9]+)?",errorMsg:"cluster_management.cluster_page.errors.small_transaction_log_max_size"},{id:"batch-update-interval",name:"batchUpdateInterval",label:"cluster_management.cluster_configuration_properties.batch_update_interval",tooltip:"cluster_management.cluster_configuration_properties.batch_update_interval_tooltip",errorMsg:"cluster_management.cluster_page.errors.only_positive_integers"}],e.updateClusterConfiguration=()=>(e.setLoader(!0,a.instant("cluster_management.cluster_page.updating_cluster_loader")),n.updateClusterConfiguration(e.clusterConfiguration).then(()=>{o.success(a.instant("cluster_management.cluster_page.notifications.update_success")),t.close()}).catch(function(e){s(e.data,e.status)}).finally(()=>e.setLoader(!1))),e.isClusterConfigurationValid=()=>!e.clusterConfigurationForm.$invalid,e.setLoader=(t,n)=>{r.cancel(e.loaderTimeout),t?e.loaderTimeout=r(()=>{e.loader=t,e.loaderMessage=n},300):e.loader=!1},e.ok=()=>{e.isClusterConfigurationValid()?e.updateClusterConfiguration():o.warning(a.instant("cluster_management.cluster_page.notifications.form_invalid"))},e.cancel=()=>{t.dismiss("cancel")},e.onClick=e=>{e.stopPropagation()};const s=(t,r)=>{delete e.preconditionErrors,o.error(a.instant("cluster_management.cluster_page.notifications.update_failed")),e.errors.splice(0),409===r||"string"==typeof t?e.errors.push(t):412===r?e.preconditionErrors=Object.keys(t).map(e=>`${e} - ${t[e]}`):400===r&&e.errors.push(...t)}}r(19994),angular.module("graphdb.framework.clustermanagement.controllers.edit-cluster",[]).controller("EditClusterCtrl",n),n.$inject=["$scope","$uibModalInstance","$timeout","ClusterRestService","toastr","$translate","data"]},19994(){angular.module("graphdb.framework.rest.cluster.service",[]).factory("ClusterRestService",t),t.$inject=["$http"];const e="rest/cluster";function t(t){return{getClusterConfig:function(){return t.get(`${e}/config`)},createCluster:function(r){return t.post(`${e}/httpConfig`,r)},updateClusterConfiguration:function(r){return r.nodes&&delete r.nodes,t.patch(`${e}/config`,r)},deleteCluster:function(r){const n=$.param({force:r});return t.delete(`${e}/config?${n}`)},replaceNodesInCluster:function(r){return t.patch(`${e}/httpConfig`,r)},getClusterStatus:function(){return t.get(`${e}/group/status`)},getNodeStatus:function(){return t.get(`${e}/node/status`)},addCusterTag:function(r){return t.post(`${e}/config/tag`,r)},deleteClusterTag:function(r){return t({method:"DELETE",url:`${e}/config/tag`,data:{tag:r},headers:{"Content-type":"application/json;charset=utf-8"}})},disableSecondaryMode:function(){return t.delete(`${e}/config/secondary-mode`)},enableSecondaryMode:function(r){return t.post(`${e}/config/secondary-mode`,r)}}}}};
//# sourceMappingURL=84397.05fa4f35e029a0f5a151.bundle.js.map