summaryrefslogtreecommitdiff
path: root/templates/innerNodeServerStatus.tpl
blob: 8556345dc1fba94449391c7b3c7ac306c5c617cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$message.strNodeStatus|escape}</title>
<link href="screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
{if $nodeCount > 0}
<table>
  <thead>
  <tr>
    <th></th>
    <th><label>{$message.strIPaddress|escape}</label></th>
    <th><label>{$message.strPort|escape}</label></th>
    <th colspan="2"><label>{$message.strStatus|escape}</label></th>
    <th></th>
  </thead>
  <tbody>
  {$i = 0}
  {foreach from=$nodeServerStatus key=node_num item=v}
    {$i = $i + 1}
    <tr class="{if $i % 2 == 0}even{else}odd{/if}">
    <td class="input">node {$node_num}</td>
    <td class="input">{$nodeServerStatus.$node_num.hostname|escape}</td>
    <td class="input">{$nodeServerStatus.$node_num.port|escape}</td>
    <td>
    {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}
          {$message.strNodeStatus2|escape}
        {elseif $nodeServerStatus.$node_num.status == $smarty.const.NODE_DOWN}
          {$message.strNodeStatus3|escape}
        {/if}
    {/if}
    </td>
    {if $nodeServerStatus.$node_num.is_active}
        <td class="input">
        postgres: {$message.strUp|escape}
        </td>
        <td>
        <input type="button" name="detail" value="{$message.strSystemCatalog|escape}"
               {if $smarty.section.num.index == $nodeNum}class="active_command"{/if}
               onclick="showDetail({$node_num})" /></td>
    {else}
        <td class="input">
        postgres: {$message.strDown|escape}
        </td>
        <td>
        <input type="button" name="detail" value="{$message.strSystemCatalog|escape}" disabled /></td>
        </td>
    {/if}
  {/foreach}
  </tbody>
</table>
{else}
    {$message.strNoNode|escape}
{/if}
</body>
</html>