diff options
author | pengbo | 2017-11-12 04:52:00 +0000 |
---|---|---|
committer | pengbo | 2017-11-12 04:52:00 +0000 |
commit | 36e90d65c218e9ee3ce9061784305c7c9d287e6c (patch) | |
tree | 02b5c4f99581f2330808b9ff67cc9290c0b00e96 /js | |
parent | 694502da1929a643875c661fe34b278e6efaa142 (diff) |
Fix support for Pgpool-II 3.7.
Added parameters are:
- failover_when_quorum_exists
- failover_require_consensus
- enable_multiple_failover_requests_from_node
- health_check_period0
- health_check_timeout0
- health_check_user0
- health_check_password0
- health_check_database0
- health_check_max_retries0
- health_check_retry_delay0
- connect_timeout0
Deleted parameters are:
- debug_level
Diffstat (limited to 'js')
-rw-r--r-- | js/pgconfig.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/js/pgconfig.js b/js/pgconfig.js index 218ce6c..4a19edc 100644 --- a/js/pgconfig.js +++ b/js/pgconfig.js @@ -42,12 +42,21 @@ $(window).load(function() $('#add_backends_node').click(function() { var next_node_num = $('[id^=tb_backends_node_]').length; + var pgpool_ver = $('#pgpool_ver').val(); + addBackendForm(next_node_num); - addPerNodeHealthCheck(next_node_num); + + /* Only show per node health check form when pgpool version >= 3.7.*/ + if (pgpool_ver >= 3.7) { + addPerNodeHealthCheck(next_node_num); + } }); /* Click "add" button to add per node health_check. */ - $('[id^=add_per_node_health_check_]').on({'click': addPerNodeHealthCheckForm}); + $('[id^=add_per_node_health_check_]').click(function() + { + addPerNodeHealthCheckForm($(this)); + }); /* ========================================================================= */ /* Click "delete" button */ @@ -161,11 +170,11 @@ function addPerNodeHealthCheck(next_node_num) /* * Add per node health check form by using "add" button of health check table. */ -var addPerNodeHealthCheckForm = function() +function addPerNodeHealthCheckForm(obj) { - var node_num = $(this).parents('tbody').attr('id').split('_')[4]; + var node_num = obj.parents('tbody').attr('id').split('_')[4]; - $(this).parents('tbody').find('tr').show(); + obj.parents('tbody').find('tr').show(); $('#tr_hc_node_num_' + node_num).nextAll('tr').find('input').val(''); } |