summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYugo Nagata2013-07-17 07:52:24 +0000
committerYugo Nagata2013-07-17 07:52:24 +0000
commit2b8f0a2f5b8089c957cb3bb002f850c9fcaaf67d (patch)
treea4e2cccb5bdc074cc6fd79065d6600e5b5769b11
parentc01e4c7bdc28dbbaaef8a085c676c21be1320110 (diff)
Replace variable name PgpoolIsActive to PgpoolIsRunning
This was a confusable name in watchdog context.
-rw-r--r--innerNodeServerStatus.php6
-rw-r--r--lang/en.lang.php2
-rw-r--r--nodeServerStatus.php4
-rw-r--r--nodeStatus.php6
-rw-r--r--status.php18
-rw-r--r--templates/elements/.status_js.tpl.swpbin0 -> 16384 bytes
-rw-r--r--templates/elements/.status_nodeinfo.tpl.swpbin0 -> 16384 bytes
-rw-r--r--templates/elements/.status_options.tpl.swpbin0 -> 16384 bytes
-rw-r--r--templates/elements/.status_pgsql_buttons.tpl.swpbin0 -> 12288 bytes
-rw-r--r--templates/elements/status_options.tpl2
-rw-r--r--templates/elements/status_pgsql_buttons.tpl2
-rw-r--r--templates/elements/status_pgsql_options.tpl4
-rw-r--r--templates/elements/status_stop_option.tpl2
-rw-r--r--templates/innerNodeServerStatus.tpl2
-rw-r--r--templates/nodeServerStatus.tpl2
-rw-r--r--templates/status.tpl8
16 files changed, 29 insertions, 29 deletions
diff --git a/innerNodeServerStatus.php b/innerNodeServerStatus.php
index f42db35..a35bf4f 100644
--- a/innerNodeServerStatus.php
+++ b/innerNodeServerStatus.php
@@ -46,14 +46,14 @@ if (isset($params['backend_hostname'])) {
$backendHostPort = array();
}
-$is_pgpool_active = DoesPgpoolPidExist();
+$is_pgpool_running = DoesPgpoolPidExist();
$nodeInfo = array();
foreach($backendHostName as $num => $hostname) {
$nodeInfo[$num]['hostname'] = $backendHostName[$num];
$nodeInfo[$num]['port'] = $backendPort[$num];
$nodeInfo[$num]['is_active'] = NodeActive($num);
- if ($is_pgpool_active) {
+ if ($is_pgpool_running) {
$result = getNodeInfo($num);
$nodeInfo[$num]['status'] = $result['status'];
}
@@ -63,7 +63,7 @@ foreach($backendHostName as $num => $hostname) {
$nodeNum = (isset($_GET['num'])) ? $_GET['num'] : NULL;
// Set vars
-$tpl->assign('pgpoolIsActive', $is_pgpool_active);
+$tpl->assign('pgpoolIsRunning', $is_pgpool_running);
$tpl->assign('nodeServerStatus', $nodeInfo);
$tpl->assign('nodeCount', count($nodeInfo));
$tpl->assign('nodeNum', $nodeNum);
diff --git a/lang/en.lang.php b/lang/en.lang.php
index b3c694f..f10528b 100644
--- a/lang/en.lang.php
+++ b/lang/en.lang.php
@@ -332,7 +332,7 @@ $message = array(
'strStopPgpool' => 'Stop pgpool',
'strStopPgsql' => 'Stop',
'strStopPgsqlOption' => 'Stop PostgreSQL Option',
- 'strStoppingNow' => 'Not active',
+ 'strStoppingNow' => 'Not Running',
'strStreamingRepMode' => 'Streaming Replication mode',
'strSummary' => 'Summary',
'strSystemDb' => 'Partitioning Rule',
diff --git a/nodeServerStatus.php b/nodeServerStatus.php
index 0f41113..2fa29ec 100644
--- a/nodeServerStatus.php
+++ b/nodeServerStatus.php
@@ -39,6 +39,6 @@ if (!isset($_SESSION[SESSION_LOGIN_USER])) {
$tpl->assign('help', basename( __FILE__, '.php'));
// Display
-$is_pgpool_active = DoesPgpoolPidExist();
-$tpl->assign('pgpoolIsActive', $is_pgpool_active);
+$is_pgpool_running = DoesPgpoolPidExist();
+$tpl->assign('pgpoolIsRunning', $is_pgpool_running);
$tpl->display('nodeServerStatus.tpl');
diff --git a/nodeStatus.php b/nodeStatus.php
index c675f5e..e79fed8 100644
--- a/nodeStatus.php
+++ b/nodeStatus.php
@@ -46,8 +46,8 @@ $backends_in_conf = $configValue['backend_hostname'];
// Get nodes' status
$nodeCount = NULL;
-$is_pgpool_active = DoesPgpoolPidExist();
-if ($is_pgpool_active) {
+$is_pgpool_running = DoesPgpoolPidExist();
+if ($is_pgpool_running) {
$nodeCount = getNodeCount();
}
$has_not_loaded_node = FALSE;
@@ -126,7 +126,7 @@ $tpl->assign('parallelMode', $isParallelMode);
$tpl->assign('msgStopPgpool', $message['msgStopPgpool']);
$tpl->assign('nodeCount', $nodeCount);
$tpl->assign('has_not_loaded_node', $has_not_loaded_node);
-$tpl->assign('pgpoolIsActive', $is_pgpool_active);
+$tpl->assign('pgpoolIsRunning', $is_pgpool_running);
// Set params
$configValue = readConfigParams('recovery_1st_stage');
diff --git a/status.php b/status.php
index e8122b6..17f7d48 100644
--- a/status.php
+++ b/status.php
@@ -36,7 +36,7 @@ if (!isset($_SESSION[SESSION_LOGIN_USER])) {
exit();
}
-$is_pgpool_active = DoesPgpoolPidExist();
+$is_pgpool_running = DoesPgpoolPidExist();
// Do action
$nodeNumber = (isset($_POST['nodeNumber'])) ? $_POST['nodeNumber'] : -1;
@@ -46,7 +46,7 @@ $viewPHP = _doAction($action, $nodeNumber);
// Set vars
setNodeInfoFromConf();
$tpl->assign('action', $action);
-$tpl->assign('pgpoolIsActive', $is_pgpool_active);
+$tpl->assign('pgpoolIsRunning', $is_pgpool_running);
$tpl->assign('viewPHP', $viewPHP);
$tpl->assign('help', basename( __FILE__, '.php'));
$tpl->assign('pgpoolConf', _PGPOOL2_CONFIG_FILE);
@@ -61,7 +61,7 @@ $tpl->assign('login_user', $_SESSION[SESSION_LOGIN_USER]);
$tpl->assign('is_superuser', isSuperUser($_SESSION[SESSION_LOGIN_USER]));
// Set params
-$configValue = readConfigParams('use_watchdog');
+$configValue = readConfigParams();
$tpl->assign('params', $configValue);
// Set pgpool command option
@@ -199,9 +199,9 @@ function _doAction($action, $nodeNumber)
function setNodeInfoFromConf()
{
global $tpl;
- global $is_pgpool_active;
+ global $is_pgpool_running;
- if (!$is_pgpool_active) {
+ if (!$is_pgpool_running) {
$nodeInfo = array();
$configValue = readConfigParams(array('backend_hostname', 'backend_port'));
@@ -401,7 +401,7 @@ function _execPcp($pcp_command, $nodeNumber, $errorCode)
/** Add a new backend and reload conf */
function _addNewBackend()
{
- global $is_pgpool_active;
+ global $is_pgpool_running;
global $_POST;
// Check
@@ -437,7 +437,7 @@ function _addNewBackend()
// Reload pgpool
$result = TRUE;
- if (isset($_POST['reload_ok']) && $is_pgpool_active) {
+ if (isset($_POST['reload_ok']) && $is_pgpool_running) {
$result = execPcp('PCP_RELOAD_PGPOOL', NO_ARGS);
}
@@ -447,7 +447,7 @@ function _addNewBackend()
/** Remove a backend and reload conf */
function _removeBackend()
{
- global $is_pgpool_active;
+ global $is_pgpool_running;
global $_POST;
if (!isset($_POST['nodeNumber'])) { return FALSE; }
@@ -502,7 +502,7 @@ function _removeBackend()
// Reload pgpool
$result = TRUE;
- if ($is_pgpool_active) {
+ if ($is_pgpool_running) {
$result = execPcp('PCP_RELOAD_PGPOOL', NO_ARGS);
}
return $result;
diff --git a/templates/elements/.status_js.tpl.swp b/templates/elements/.status_js.tpl.swp
new file mode 100644
index 0000000..d0b92b6
--- /dev/null
+++ b/templates/elements/.status_js.tpl.swp
Binary files differ
diff --git a/templates/elements/.status_nodeinfo.tpl.swp b/templates/elements/.status_nodeinfo.tpl.swp
new file mode 100644
index 0000000..91ae4d7
--- /dev/null
+++ b/templates/elements/.status_nodeinfo.tpl.swp
Binary files differ
diff --git a/templates/elements/.status_options.tpl.swp b/templates/elements/.status_options.tpl.swp
new file mode 100644
index 0000000..d098658
--- /dev/null
+++ b/templates/elements/.status_options.tpl.swp
Binary files differ
diff --git a/templates/elements/.status_pgsql_buttons.tpl.swp b/templates/elements/.status_pgsql_buttons.tpl.swp
new file mode 100644
index 0000000..f0919ba
--- /dev/null
+++ b/templates/elements/.status_pgsql_buttons.tpl.swp
Binary files differ
diff --git a/templates/elements/status_options.tpl b/templates/elements/status_options.tpl
index 3eade1d..3dae499 100644
--- a/templates/elements/status_options.tpl
+++ b/templates/elements/status_options.tpl
@@ -2,7 +2,7 @@
{* Start Options *}
{* --------------------------------------------------------------------- *}
-{if $pgpoolIsActive == false}
+{if $pgpoolIsRunning == false}
<h3>{$message.strStartOption|escape}</h3>
<form action="status.php" name="startPgpoolForm" method="post">
diff --git a/templates/elements/status_pgsql_buttons.tpl b/templates/elements/status_pgsql_buttons.tpl
index 431e7bf..4f23e02 100644
--- a/templates/elements/status_pgsql_buttons.tpl
+++ b/templates/elements/status_pgsql_buttons.tpl
@@ -11,5 +11,5 @@
value="{$message.strReloadPgsql|escape}">
|
<input type="button" onClick="sendCommand('removeBackend', {$node_num}, '{$message.msgRemoveBackend|escape}')"
- {if $pgpoolIsActive && $nodeInfo.$node_num.is_active}disabled{/if}
+ {if $pgpoolIsRunning && $nodeInfo.$node_num.is_active}disabled{/if}
value="{$message.strRemoveBackend|escape}">
diff --git a/templates/elements/status_pgsql_options.tpl b/templates/elements/status_pgsql_options.tpl
index ca4532a..771def4 100644
--- a/templates/elements/status_pgsql_options.tpl
+++ b/templates/elements/status_pgsql_options.tpl
@@ -5,7 +5,7 @@
onSubmit="return execStopPgsql()" />
<table>
<thead>
- <tr><th colspan="2">{$message.strCmdM|escape}(-m)</th></tr>
+ <tr><th colspan="2">{$message.strCmdM|escape} (-m)</th></tr>
</thead>
<tbody>
{include file="elements/status_stop_option.tpl"}
@@ -29,7 +29,7 @@
onSubmit="return execRestartPgsql()" />
<table>
<thead>
- <tr><th colspan="2">{$message.strCmdM|escape}(-m)</th></tr>
+ <tr><th colspan="2">{$message.strCmdM|escape} (-m)</th></tr>
</thead>
<tbody>
{include file="elements/status_stop_option.tpl"}
diff --git a/templates/elements/status_stop_option.tpl b/templates/elements/status_stop_option.tpl
index 513f56b..47674eb 100644
--- a/templates/elements/status_stop_option.tpl
+++ b/templates/elements/status_stop_option.tpl
@@ -1,4 +1,4 @@
-<tr><td>{$message.strCmdM|escape}(-m)</td><td>
+<tr><td>{$message.strCmdM|escape} (-m)</td><td>
<select name="stop_mode">
{if $m == 's'}
<option value="s" selected="selected">smart</option>
diff --git a/templates/innerNodeServerStatus.tpl b/templates/innerNodeServerStatus.tpl
index 4834b83..8556345 100644
--- a/templates/innerNodeServerStatus.tpl
+++ b/templates/innerNodeServerStatus.tpl
@@ -25,7 +25,7 @@
<td class="input">{$nodeServerStatus.$node_num.hostname|escape}</td>
<td class="input">{$nodeServerStatus.$node_num.port|escape}</td>
<td>
- {if $pgpoolIsActive}
+ {if $pgpoolIsRunning}
{if $nodeServerStatus.$node_num.status == $smarty.const.NODE_ACTIVE_NO_CONNECT}
{$message.strNodeStatus1|escape}
{elseif $nodeServerStatus.$node_num.status == $smarty.const.NODE_ACTIVE_CONNECTED}
diff --git a/templates/nodeServerStatus.tpl b/templates/nodeServerStatus.tpl
index e20643d..3639290 100644
--- a/templates/nodeServerStatus.tpl
+++ b/templates/nodeServerStatus.tpl
@@ -85,7 +85,7 @@ function showDetail(num)
<div id="help"><a href="help.php?help={$help|escape}"><img src="images/question.gif" alt="help"/>{$message.strHelp|escape}</a></div>
<h2>{$message.strNodeStatus|escape}
-{if $pgpoolIsActive == false}[{$message.strStoppingNow}]{/if}
+{if $pgpoolIsRunning == false}[{$message.strStoppingNow}]{/if}
</h2>
<div id="status">{$message.strPleaseWait|escape}</div>
<p>
diff --git a/templates/status.tpl b/templates/status.tpl
index 2051345..b25f5cf 100644
--- a/templates/status.tpl
+++ b/templates/status.tpl
@@ -67,7 +67,7 @@
{/if}
{/if}
- {if $pgpoolIsActive == true}
+ {if $pgpoolIsRunning == true}
<p>
<input type="button" name="command" onClick="changeView('summary')"
{if $action == 'summary'}class="command_active"{/if}
@@ -141,7 +141,7 @@
{/if}
{* ---------------------------------------------------------------------- *}
- {* Form to add a new backend *}
+ {* Form to add a new backend (Initially invisible) *}
{* ---------------------------------------------------------------------- *}
<div id="addBackendDiv" style="visibility: hidden; position: absolute;">
@@ -175,7 +175,7 @@
</div>
{* --------------------------------------------------------------------- *}
- {* Form of options to stop/restart PostgreSQL *}
+ {* Form of options to stop/restart PostgreSQL (Initially invisible) *}
{* --------------------------------------------------------------------- *}
{include file="elements/status_pgsql_options.tpl"}
@@ -185,7 +185,7 @@
{* --------------------------------------------------------------------- *}
<h2>{$message.strPgpool|escape}
- {if !$pgpoolIsActive}[ {$message.strStoppingNow|escape} ]{/if}
+ {if !$pgpoolIsRunning}[ {$message.strStoppingNow|escape} ]{/if}
</h2>
{include file="elements/status_options.tpl"}