<table id="main">
  <tr id="cluster_title_row" {{bind-attr style=Pcs.manage_page}}><td id="page_header" colspan=3 style="vertical-align:middle;">
      <table id="manage_cluster_commands"><tr>
	  <td>
	    MANAGE CLUSTERS
	  </td>
	  </td>
	  <td>
	      <a href="#" class="x sprites"></a>
	    <div class="link">
	      <a id="manage_remove_cluster" href="#" onclick="verify_remove_clusters();">Remove</a>
	    </div>
	  </td>
	  <td>
	    <a href="#" class="plus sprites"></a>
	    <div class="link">
	      <a id="manage_add_cluster" href="#" onclick="add_existing_dialog();">Add Existing</a>
	    </div>
	  </td>
	  <td>
	    <a href="#" class="x sprites"></a>
	    <div class="link">
	      <a id="manage_destroy_cluster" href="#" onclick="clusterDestroy.dialog.create();">Destroy</a>
	    </div>
	  </td>
	  <td>
	    <a href="#" class="plus sprites"></a>
	    <div class="link">
	      <a id="manage_create_cluster" href="#" onclick="clusterSetup.dialog.create();">Create New</a>
	    </div>
	  </td>
	</tr>
      </table>
    </td>
  </tr>
  <tr id="cluster_header_row" {{bind-attr style="Pcs.manage_page"}}>
    <td class="borderbottom" colspan=3>
    </td>
  </tr>
  <tr id="cluster_list_row" {{bind-attr style="Pcs.manage_page"}}>
    <td id="cluster_list" class="node_list" style="width:350px;">
      <%= erb :_cluster_list %>
    </td>
    <td id="node_info" colspan=2>
      <div id="node_info_header">
	<div id="node_info_header_title">INFORMATION ABOUT CLUSTERS</div>
      </div>
      <div id="node_sub_info">
        {{#if Pcs.clusterController.cur_cluster}}
        <div {{bind-attr id=Pcs.clusterController.cur_cluster.div_id}}>
          <table>
            <tr>
              <td style="text-align:right">
                <b>Cluster:</b>&nbsp;
              </td>
              <td>
                {{#if Pcs.clusterController.cur_cluster.forbidden}}
                  {{Pcs.clusterController.cur_cluster.name}}
                {{else}}
                  <a {{bind-attr href=Pcs.clusterController.cur_cluster.url_link}}>{{Pcs.clusterController.cur_cluster.name}}</a> {{{Pcs.clusterController.cur_cluster.quorum_show}}}
                {{/if}}
              </td>
            </tr>
            {{#if Pcs.clusterController.cur_cluster.error_list}}
              <tr><td style="text-align:right"><b>Errors:</b>&nbsp;</td><td></td></tr>
            {{/if}}
            {{#each Pcs.clusterController.cur_cluster.error_list}}
              <tr><td></td><td style="color: red;">{{{message}}}</td></tr>
            {{/each}}
            {{#if Pcs.clusterController.cur_cluster.warning_list}}
              <tr><td style="text-align:right"><b>Warnings:</b>&nbsp;</td><td></td></tr>
            {{/if}}
            {{#each Pcs.clusterController.cur_cluster.warning_list}}
              <tr><td></td><td style="color: orange;">{{{message}}}</td></tr>
            {{/each}}
          </table><br>
          {{#unless Pcs.clusterController.cur_cluster.forbidden}}
          <table style="clear:left;float:left" class="nodes_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'nodes');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Nodes ({{Pcs.clusterController.cur_cluster.nodes.length}} | {{#if Pcs.clusterController.cur_cluster.nodes_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.nodes_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_nodes}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 150px;">NODE</th>
                    <th style="width: 100px;">STATUS</th>
                    <th style="width: 70px;">QUORUM</th>
                  </tr>
                  {{#each node in Pcs.clusterController.cur_cluster.nodes}}
                  <tr {{bind-attr title=node.tooltip}} {{bind-attr class=node.status_class}}>
                    <td><a {{bind-attr href=node.url_link}}>{{node.name}}</a></td>
                    <td {{bind-attr style=node.status_style}}>{{{node.status_icon}}}{{node.status}}</td>
                    <td>{{{node.quorum_show}}}</td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          {{#unless Pcs.clusterController.cur_cluster.status_unknown}}
          <table style="clear:left;float:left" class="resources_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'resources');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Resources ({{Pcs.clusterController.cur_cluster.resource_list.length}} | {{#if Pcs.clusterController.cur_cluster.resources_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.resources_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_resources}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 170px;">RESOURCE</th>
                    <th style="width: 150px;">STATUS</th>
                  </tr>
                  {{#each r in Pcs.clusterController.cur_cluster.resource_list}}
                  <tr {{bind-attr title=r.tooltip}} {{bind-attr class=r.status_class}}>
                    <td><a {{bind-attr href=r.url_link}}>{{r.id}}</a></td>
                    <td {{bind-attr style=r.status_style}}>
                      {{{r.status_icon}}}{{r.status}}
                      {{#if r.is_unmanaged}}
                        (unmanaged)
                      {{/if}}
                    </td>
                  </tr>
                  {{else}}
                  <tr>
                    <td>No resources</td>
                    <td></td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          <table style="clear:left;float:left" class="fence_list">
            <tr>
              <td class="datatable_header hover-pointer" onclick="show_hide_dashboard(this, 'fence');">
                <span style="display: none;" class="downarrow sprites"></span>
                <span style="" class="rightarrow sprites"></span>
                Fence-devices ({{Pcs.clusterController.cur_cluster.fence_list.length}} | {{#if Pcs.clusterController.cur_cluster.fence_failed}}<span style="color: red">issues: {{Pcs.clusterController.cur_cluster.fence_failed}}{{else}}<span style="color: green;">OK{{/if}}</span>)
              <span style="font-size: 10px;">(displaying {{#if Pcs.clusterController.show_all_fence}}all{{else}}only issues{{/if}})</span>
              </td>
            </tr>
            <tr>
              <td>
                <table class="datatable">
                  <tr>
                    <th style="width: 170px;">FENCE-DEVICE</th>
                    <th style="width: 150px;">STATUS</th>
                  </tr>
                  {{#each f in Pcs.clusterController.cur_cluster.fence_list}}
                  <tr {{bind-attr title=f.tooltip}} {{bind-attr class=f.status_class_fence}}>
                    <td><a {{bind-attr href=f.url_link}}>{{f.id}}</a></td>
                    <td {{bind-attr style=f.status_style}}>{{{f.status_icon}}}{{f.status}}</td>
                  </tr>
                  {{else}}
                  <tr>
                    <td>No fence devices</td>
                    <td></td>
                  </tr>
                  {{/each}}
                </table>
              </td>
            </tr>
          </table>
          {{/unless}}
          {{/unless}}
        </div>
        {{else}}
        <div id="no_cluster_selected">Select a cluster to view more detailed cluster information</div>
        {{/if}}
      </div>
    </td>
  </tr>
</table>
<%= erb :_dialogs %>
<div id="add_existing_cluster" style="display: none;">
  <form id="add_existing_cluster_form" action="/manage/existingcluster" method="post">
    <br>
    Enter the name of a node in a cluster that you would like to manage:
    <br>
    <br>
    <table class="err_msg_table" style="width: 100%">
      <tr><td align=center style="color: red" colspan=2"><span id="unable_to_connect_error_msg_ae" style="display:none;">Unable to contact node.<br>Please make sure pcsd is started.<br/></span>
        <span id="add_existing_cluster_error_msg" style="display:none;">
        </span>
      </td></tr>
    </table>
    <table>
      <tr><td align=right>Node Name:</td><td><input size="50" name="node-name" type="text"></td></tr>
    </table>
  </form>
</div>

<!-- CLUSTER SETUP HELP TEXTS - START -->

<!-- transport types -->
<% transport_type_knet = "
This is the default transport. It allows configuring traffic encryption and
compression as well as using multiple addresses (links) for nodes.
"%>

<% transport_type_udp = "
This transport is limited to one address per node. It does not support traffic
encryption nor compression.
"%>
<!-- udp options -->
<% udp_netmtu = "
This specifies the network maximum transmit unit. To set this value beyond
1500, the regular frame MTU, requires ethernet devices that support large, or
also called jumbo, frames. If any device in the network doesn't support large
frames, the protocol will not operate properly. The hosts must also have their
mtu size set from 1500 to whatever frame size is specified here.
<br/><br/>

Please note while some NICs or switches claim large frame support, they support
9000 MTU as the maximum frame size including the IP header. Setting the netmtu
and host MTUs to 9000 will cause totem to use the full 9000 bytes of the frame.
Then Linux will add a 18 byte header moving the full frame size to 9018. As
a result some hardware will not operate properly with this size of data. A
netmtu of 8982 seems to work for the few large frame devices that have been
tested. Some manufacturers claim large frame support when in fact they support
frame sizes of 4500 bytes.
<br/><br/>

When sending multicast traffic, if the network frequently reconfigures, chances
are that some device in the network doesn't support large frames.
<br/><br/>

Choose hardware carefully if intending to use large frame support.
<br/><br/>

The default is 1500.
"%>

<!-- udp link options -->
<% udp_bindnetaddr = "
This specifies the network address the corosync executive should bind to when
using udp.
<br/><br/>

For example, if the local interface is 192.168.5.92 with netmask 255.255.255.0,
you should set bindnetaddr to 192.168.5.0. If the local interface is
192.168.5.92 with netmask 255.255.255.192, set bindnetaddr to 192.168.5.64, and
so forth.
<br/><br/>

This may also be an IPV6 address, in which case IPV6 networking will be used.
In this case, the exact address must be specified and there is no automatic
selection of the network interface within a specific subnet as with IPv4.
"%>

<% udp_broadcast = "
If this is enable, the broadcast address will be used for communication. If
this option is enabled, Multicast address should not be set.
"%>

<% udp_mcastaddr = "
This is the multicast address used by corosync executive. The default should
work for most networks, but the network administrator should be queried about a
multicast address to use. Avoid 224.x.x.x because this is a 'config' multicast
address.
<br/><br/>

This may also be an IPV6 multicast address, in which case IPV6 networking will
be used.
"%>

<% udp_mcastport = "
This specifies the UDP port number. It is possible to use the same multicast
address on a network with the corosync services configured for different UDP
ports. Please note corosync uses two UDP ports: Multicast Port (for mcast
receives) and Multicast Port - 1 (for mcast sends). If you have multiple
clusters on the same network using the same Multicast Address please configure
the Multicast Ports with a gap.
"%>

<% udp_ttl = "
This specifies the Time To Live (TTL). If you run your cluster on a routed
network then the default of '1' will be too small. This option provides a way to
increase this up to 255. The valid range is 0..255.
"%>

<!-- knet options -->
<% knet_pmtud_interval = "
How often the knet PMTUd runs to look for network MTU changes. Value in
seconds.
<br/><br/>
Default: 60
"%>

<% knet_link_mode = "
This specifies the knet mode.
<br/><br/>

passive: The active link with the lowest priority will be used. If one or more
links share the same priority the one with the lowest link ID will be used.
<br/><br/>

active: All active links will be used simultaneously to send traffic, link
priority is ignored.
<br/><br/>

round-robin: Each packet will be sent to the next active link in order.
<br/><br/>

If only one interface directive is specified, passive is automatically chosen.
"%>


<!-- knet link options -->
<% knet_link_priority = "
Specifies the priority for the link when knet is used in 'passive' mode.
"%>

<% knet_ping_interval = "
Specifies the interval between knet link pings.
Ping Interval and Ping Timeout are a pair, if one is specified the other should
be too, otherwise one will be calculated from the token timeout and one will be
taken from the config file.
<br/><br/>

Default: Token Timeout / (Pong Count * 2)
"%>

<% knet_ping_precision = "
How many values of latency are used to calculate the average link latency.
<br/><br/>

Default: 2048 samples
"%>

<% knet_ping_timeout = "
If no ping is received within this time, the knet link is declared dead.
Ping Interval and Ping Timeout are a pair, if one is specified the other should
be too, otherwise one will be calculated from the token timeout and one will be
taken from the config file.
<br/><br/>

Default: Token Timeout / (Pong Count * 2)
"%>

<% knet_pong_count = "
How many valid ping/pongs before a link is marked UP.
<br/><br/>

Default: 5
"%>

<% knet_transport = "
Which IP transport knet should use.
<br/><br/>

Default: udp
"%>

<% knet_mcastport = "
Port number to be used for communication. The default remains
the old one of 5405 + linknumber, but you can override it per link here.
"%>


<!-- knet compression options -->
<% knet_compression_model = "
The (optional) type of compression used by knet. The values available depend on
the build and also available libraries. Typically zlib and lz4 will be
available but bzip2 and others could also be allowed.
<br/><br/>

Default: none
"%>

<% knet_compression_threshold = "
Tells knet to NOT compress any packets that are smaller than the value
indicated. Set to 0 to reset to the default. Set to 1 to compress everything.
<br/><br/>

Default: 100 bytes
"%>

<% knet_compression_level = "
Many compression libraries allow tuning of compression parameters. For example 0
or 1 ... 9 are commonly used to determine the level of compression. This
value is passed unmodified to the compression library so it is recommended to
consult the library's documentation for more detailed information.
"%>

<!-- knet crypto options -->
<% knet_crypto_model = "
This specifies which cryptographic library should be used by knet.
<br/><br/>

Default: nss
"%>

<% knet_crypto_hash = "
This specifies which HMAC authentication should be used to authenticate all
messages.
<br/><br/>

Default: sha256
"%>

<% knet_crypto_cipher = "
This specifies which cipher should be used to encrypt all messages. Enabling
Cipher requires also enabling of Hash.
<br/><br/>

Default: aes256
"%>

<!-- totem options -->
<% totem_consensus = "
This timeout specifies in milliseconds how long to wait for consensus to be
achieved before starting a new round of membership configuration. The minimum
value for consensus must be 1.2 * token. This value will be automatically
calculated at 1.2 * token if the user doesn't specify a consensus value.
<br/><br/>

For two node clusters, a consensus larger than the join timeout but less than
token is safe. For three node or larger clusters, consensus should be larger
than token. There is an increasing risk of odd membership changes, which still
guarantee virtual synchrony, as node count grows if consensus is less than
token.
<br/><br/>

The default is 1200 milliseconds.
"%>

<% totem_downcheck = "
This timeout specifies in milliseconds how long to wait before checking that a
network interface is back up  after  it has been downed.
<br/><br/>

The default is 1000 milliseconds.
"%>

<% totem_fail_recv_const = "
This  constant specifies how many rotations of the token without receiving any
of the messages when messages should be received may occur before a new
configuration is formed.
<br/><br/>

The default is 2500 failures to receive a message.
"%>

<% totem_heartbeat_failures_allowed = "
[HeartBeating  mechanism]  Configures  the  optional HeartBeating mechanism for
faster failure detection. Keep in mind that engaging this mechanism in lossy
networks could cause faulty loss declaration as the mechanism relies on the
network for heartbeating.
<br/><br/>

So as a rule of thumb use this mechanism if you require improved failure in low
to medium utilized networks.
<br/><br/>

This constant specifies the number of heartbeat failures the system should
tolerate before declaring heartbeat failure e.g 3. Also if this value is not set
or is 0 then the heartbeat mechanism is not engaged in the system and token
rotation is the method of failure detection
<br/><br/>

The default is 0 (disabled).
"%>

<% totem_hold = "
This timeout specifies in milliseconds how long the token should be held by the
representative when  the  protocol  is under low utilization. It is not
recommended to alter this value without guidance from the corosync community.
<br/><br/>

The default is 180 milliseconds.
"%>

<% totem_join = "
This timeout specifies in milliseconds how long to wait for join messages in the
membership protocol.
<br/><br/>

The default is 50 milliseconds.
"%>

<% totem_max_messages = "
This constant specifies the maximum number of messages that may be sent by one
processor on receipt of the token. The max_messages parameter is limited to
256000 / netmtu to prevent overflow of the kernel transmit buffers.
<br/><br/>

The default is 17 messages.
"%>

<% totem_max_network_delay = "
[HeartBeating mechanism] This constant specifies in milliseconds the
approximate delay that your network takes to transport one packet from one
machine to another. This value is to be set by system engineers and please
don't change if not sure as this effects the failure detection mechanism using
heartbeat.
<br/><br/>

The default is 50 milliseconds
"%>

<% totem_merge = "
This timeout specifies in milliseconds how long to wait before checking for a
partition when no multicast traffic is being sent. If multicast traffic is
being sent, the merge detection happens automatically as a function of the
protocol.
<br/><br/>

The default is 200 milliseconds.
"%>

<% totem_miss_count_const = "
This constant defines the maximum number of times on receipt of a token a
message is checked for retransmission before a retransmission occurs. This
parameter is useful to modify for switches that delay multicast packets
compared to unicast packets. The default setting works well for nearly all
modern switches.
<br/><br/>

The default is 5 messages.
"%>

<% totem_send_join = "
This timeout specifies in milliseconds an upper range between 0 and send_join to
wait before sending a join message. For configurations with less than 32 nodes,
this parameter is not necessary. For larger rings, this parameter is necessary
to ensure the NIC is not overflowed with join messages on formation of a new
ring. A reasonable value for large rings (128 nodes) would be 80msec. Other
timer values must also change if this value is changed. Seek advice from the
corosync mailing list if trying to run larger configurations.
<br/><br/>

The default is 0 milliseconds.
"%>

<% totem_seqno_unchanged_const = "
This constant specifies how many rotations of the token without any multicast
traffic should occur before the hold timer is started.
<br/><br/>

The default is 30 rotations.
"%>

<% totem_token = "
This timeout is used directly or as a base for real token timeout calculation
(explained in token_coefficient section). Token timeout specifies in
milliseconds until a token loss is declared after not receiving a token. This is
the time spent detecting a failure of a processor in the current configuration.
Reforming a new configuration takes about 50 milliseconds in addition to this
timeout.
<br/><br/>

For real token timeout used by totem it's possible to read cmap value of
runtime.config.token key.
<br/><br/>

The default is 1000 milliseconds.
"%>

<% totem_token_coefficient = "
This value is used only when nodelist section is specified and contains at least
3 nodes. If so, real token timeout is then computed as token + (number_of_nodes
- 2) * token_coefficient. This allows cluster to scale without manually changing
token timeout every time new node is added. This value can be set to 0 resulting
in effective removal of this feature.
<br/><br/>

The default is 650 milliseconds.
"%>

<% totem_token_retransmit = "
This timeout specifies in milliseconds after how long before receiving a token
the token is retransmitted. This will be automatically calculated if token is
modified. It is not recommended to alter this value without guidance from the
corosync community.
<br/><br/>

The default is 238 milliseconds
"%>

<% totem_token_retransmits_before_loss_const = "
This value identifies how many token retransmits should be attempted before
forming a new configuration. If this value is set, retransmit and hold will be
automatically calculated from retransmits_before_loss and token.
<br/><br/>

The default is 4 retransmissions.
"%>

<% totem_window_size = "
This constant specifies the maximum number of messages that may be sent on one
token rotation. If all processors perform equally well, this value could be
large (300), which would introduce higher latency from origination to delivery
for very large rings. To reduce latency in large rings(16+), the defaults are a
safe compromise. If 1 or more slow processor(s) are present among fast
processors, window_size should be no larger than 256000 / netmtu to avoid
overflow of the kernel receive buffers. The user is notified of this by the
display of a retransmit list in the notification logs. There is no loss of data,
but performance is reduced when these errors occur.
<br/><br/>

The default is 50 messages.
"%>


<!-- quorum options -->
<% quorum_auto_tie_breaker = "
Enables Auto Tie Breaker (ATB) feature (default: off).
<br/><br/>

The general behaviour of votequorum allows a simultaneous node failure up to 50%
- 1 node, assuming each node has 1 vote.
<br/><br/>

When ATB is enabled, the cluster can suffer up to 50% of the nodes failing at
the same time, in a deterministic fashion. The cluster partition, or the set of
nodes that are still in contact with the node that has the lowest nodeid will
remain quorate. The other nodes will be inquorate.
"%>

<% quorum_last_man_standing = "
Enables Last Man Standing (LMS) feature (default: off).
<br/><br/>

The general behaviour of votequorum is to set Expected Votes and Quorum at
startup and use those values during the whole lifetime of the cluster.
<br/><br/>

Using for example an 8 node cluster where each node has 1 vote, Expected Votes
is set to 8 and Quorum to 5. This condition allows a total failure of 3 nodes.
If a 4th node fails, the cluster becomes inquorate and it will stop providing
services.
<br/><br/>

Enabling LMS allows the cluster to dynamically recalculate Expected Votes and
Quorum under specific circumstances. It is essential to enable WFA when using
LMS in High Availability clusters.
<br/><br/>

Using the above 8 node cluster example, with LMS enabled the cluster can retain
quorum and continue operating by losing, in a cascade fashion, up to 6 nodes
with only 2 remaining active.
"%>

<% quorum_last_man_standing_window = "
Tunes Last Man Standing Window (default: 10000 ms)
<br/><br/>

The window of time between when a node (or group of nodes die) and quorum is
recalculated if the Last Man Standing option is enabled.
"%>

<% quorum_wait_for_all = "
Enables Wait For All (WFA) feature (default: off).
<br/><br/>

The general behaviour of votequorum is to switch a cluster from inquorate to
quorate as soon as possible. For example, in an 8 node cluster, where every node
has 1 vote, Expected Votes is set to 8 and Quorum is (50% + 1) 5. As soon as 5
(or more) nodes are visible to each other, the partition of 5 (or more) becomes
quorate and can start operating.
<br/><br/>

When WFA is enabled, the cluster will be quorate for the first time only after
all nodes have been visible at least once at the same time.
<br/><br/>

This feature has the advantage of avoiding some startup race conditions, with
the cost that all nodes need to be up at the same time at least once before the
cluster can operate.
<br/><br/>

A common startup race condition based on the above example is that as soon as 5
nodes become quorate, with the other 3 still offline, the remaining 3 nodes will
be fenced.
<br/><br/>

It is very useful when combined with Last Man Standing.
"%>


<!-- CLUSTER SETUP HELP TEXTS - END -->

<div id="csetup" style="display: none;">
  <form class="step cluster-name-nodes">

    <p>
    Cluster Name: <input type="text" name="clustername"></input>
    </p>
    <fieldset>
      <legend>Nodes</legend>
      <p>
      Enter the names of the nodes you would like to use to create a cluster.
      </p>
      <table>
        <tr>
          <td>Node 1:</td>
          <td><input type="text" name="node[]"/></td>
        </tr>
        <tr>
          <td>Node 2:</td>
          <td><input type="text" name="node[]"/></td>
        </tr>
        <tr>
          <td>Node 3:</td>
          <td><input type="text" name="node[]"/></td>
        </tr>
        <tr>
          <td></td>
          <td
            class="action-link add-nodes"
            onclick="clusterSetup.dialog.addNode();"
            >
            More nodes...
          </td>
        </tr>
      </table>
    </fieldset>
  </form>

  <div class="step cluster-settings">
    <ul>
      <li><a href="#csetup-transport">Transport</a></li>
      <li><a href="#csetup-quorum">Quorum</a></li>
      <li><a href="#csetup-totem">Totem</a></li>
    </ul>

    <div id="csetup-transport">
      <fieldset class="transport-types">
        <legend>Select transport type</legend>
        <div title="<%= h(transport_type_knet) %>">
          <input type="radio"
            name="transport"
            id="csetup-transport-knet"
            onchange="clusterSetup.transportType.adaptToCurrent()"
          />
          <label for="csetup-transport-knet">knet</label>
        </div>
        <div title="<%= h(transport_type_udp) %>">
          <input type="radio"
            name="transport"
            id="csetup-transport-udp"
            onchange="clusterSetup.transportType.adaptToCurrent()"
          />
          <label for="csetup-transport-udp">udp</label>
        </div>
        <div title="<%= h(transport_type_udp) %>">
          <input type="radio"
            name="transport"
            id="csetup-transport-udpu"
            onchange="clusterSetup.transportType.adaptToCurrent()"
          />
          <label for="csetup-transport-udpu">udpu</label>
        </div>
      </fieldset>

      <div class="csetup-transport-sections">
        <ol>
          <li>
            <a href="#csetup-transport-netmaps">Addresses and Links</a>
          </li>
          <li><a href="#csetup-transport-options">Options</a></li>
        </ol>

        <div id="csetup-transport-netmaps">
          <div class="action-link add-link">Add link...</div>
          <!--
            For each transport type (knet, udp, udpu)
            the snippet transport-links-setting is put here (in js code).
          -->
        </div>

        <div id="csetup-transport-options">
          <fieldset class="options-container">
            <legend>Transport options</legend>
          </fieldset>

          <fieldset class="compression-options">
            <legend>Compression options</legend>
            <table class="key-value knet-only">
              <tr title="<%= h(knet_compression_model) %>">
                <td>Model:</td>
                <td><input type="text" name="model" /></td>
              </tr>
              <tr title="<%= h(knet_compression_threshold) %>">
                <td>Threshold:</td>
                <td><input type="text" name="threshold" /> bytes</td>
              </tr>
              <tr title="<%= h(knet_compression_level) %>">
                <td>Level:</td>
                <td><input type="text" name="level" /></td>
              </tr>
            </table>
            <p class="without-knet">
            Compression is supported only with knet.
            </p>
          </fieldset>

          <fieldset class="crypto-options">
            <legend>Crypto options</legend>
            <table class="key-value knet-only">
              <tr title="<%= h(knet_crypto_model) %>">
                <td>Model:</td>
                <td>
                  <select name="model">
                    <option value="">(Default)</option>
                    <option value="nss">nss</option>
                    <option value="openssl">openssl</option>
                  </select>
                </td>
              </tr>
              <tr title="<%= h(knet_crypto_hash) %>">
                <td>Hash:</td>
                <td>
                  <select name="hash">
                    <option value="">(Default)</option>
                    <option value="none">none</option>
                    <option value="md5">md5</option>
                    <option value="sha1">sha1</option>
                    <option value="sha256">sha256</option>
                    <option value="sha384">sha384</option>
                    <option value="sha512">sha512</option>
                  </select>
                </td>
              </tr>
              <tr title="<%= h(knet_crypto_cipher) %>">
                <td>Cipher:</td>
                <td>
                  <select name="cipher">
                    <option value="">(Default)</option>
                    <option value="none">none</option>
                    <option value="3des">3des</option>
                    <option value="aes128">aes128</option>
                    <option value="aes192">aes192</option>
                    <option value="aes256">aes256</option>
                  </select>
                </td>
              </tr>
            </table>
            <p class="without-knet">
            Encryption is supported only with knet.
            </p>
          </fieldset>
        </div>
      </div>
    </div>
    <div id="csetup-totem">
      <table class="key-value">
        <tr title="<%= h(totem_consensus) %>">
          <td>Consensus Timeout:</td>
          <td><input type="text" name="consensus" /> ms</td>
        </tr>

        <tr title="<%= h(totem_downcheck) %>">
          <td>Downcheck Timeout:</td>
          <td><input type="text" name="downcheck" /> ms</td>
        </tr>

        <tr title="<%= h(totem_fail_recv_const) %>">
          <td>Fail Receive Constant:</td>
          <td><input type="text" name="fail_recv_const" /></td>
        </tr>

        <tr title="<%= h(totem_heartbeat_failures_allowed) %>">
          <td>Heartbeat Failures Allowed:</td>
          <td><input type="text" name="heartbeat_failures_allowed" /></td>
        </tr>

        <tr title="<%= h(totem_hold) %>">
          <td>Hold Timeout:</td>
          <td><input type="text" name="hold" /> ms</td>
        </tr>

        <tr title="<%= h(totem_join) %>">
          <td>Join Timeout:</td>
          <td><input type="text" name="join" /> ms</td>
        </tr>

        <tr title="<%= h(totem_max_messages) %>">
          <td>Max Messages:</td>
          <td><input type="text" name="max_messages" /></td>
        </tr>

        <tr title="<%= h(totem_max_network_delay) %>">
          <td>Max Network Delay:</td>
          <td><input type="text" name="max_network_delay" /> ms</td>
        </tr>

        <tr title="<%= h(totem_merge) %>">
          <td>Merge Timeout:</td>
          <td><input type="text" name="merge" /> ms</td>
        </tr>

        <tr title="<%= h(totem_miss_count_const) %>">
          <td>Miss Count Constant:</td>
          <td><input type="text" name="miss_count_const" /></td>
        </tr>

        <tr title="<%= h(totem_send_join) %>">
          <td>Send Join Timeout:</td>
          <td><input type="text" name="send_join" /> ms</td>
        </tr>

        <tr title="<%= h(totem_seqno_unchanged_const) %>">
          <td>Seqno Unchanged Constant:</td>
          <td><input type="text" name="seqno_unchanged_const" /></td>
        </tr>

        <tr title="<%= h(totem_token) %>">
          <td>Token Timeout:</td>
          <td><input type="text" name="token" /> ms</td>
        </tr>

        <tr title="<%= h(totem_token_coefficient) %>">
          <td>Token Coefficient:</td>
          <td><input type="text" name="token_coefficient" /></td>
        </tr>

        <tr title="<%= h(totem_token_retransmit) %>">
          <td>Token Retransmit Timeout:</td>
          <td><input type="text" name="token_retransmit" /> ms</td>
        </tr>

        <tr title="<%= h(totem_token_retransmits_before_loss_const) %>">
          <td>Token Retransmits Before Loss Constant:</td>
          <td>
            <input type="text" name="token_retransmits_before_loss_const" />
          </td>
        </tr>

        <tr title="<%= h(totem_window_size) %>">
          <td>Window Size:</td>
          <td><input type="text" name="window_size" /></td>
        </tr>

      </table>
    </div>
    <div id="csetup-quorum">
      <table class="key-value">
      <tr title="<%= h(quorum_auto_tie_breaker) %>">
        <td>Auto Tie Breaker:</td>
        <td>
          <select name="auto_tie_breaker">
            <option value="">(Default)</option>
            <option value="on">on</option>
            <option value="off">off</option>
          </select>
        </td>
      </tr>
      <tr title="<%= h(quorum_last_man_standing) %>">
        <td>Last Man Standing:</td>
        <td>
          <select name="last_man_standing">
            <option value="">(Default)</option>
            <option value="on">on</option>
            <option value="off">off</option>
          </select>
        </td>
      </tr>
      <tr title="<%= h(quorum_last_man_standing_window) %>">
        <td>Last Man Standing Window:</td>
        <td><input type="text" name="last_man_standing_window" /> ms</td>
      </tr>
      <tr title="<%= h(quorum_wait_for_all) %>">
        <td>Wait for All:</td>
        <td>
          <select name="wait_for_all">
            <option value="">(Default)</option>
            <option value="on">on</option>
            <option value="off">off</option>
          </select>
        </td>
      </tr>

      </table>
    </div>
  </div>

  <form class="step cluster-start">
    <p> Cluster has been successfully created. </p>
    <p>
      <input type="checkbox"
        id="cluster-setup-start"
        name="auto_start"
        value="1"
        checked
      />
      <label for="cluster-setup-start">Start the Cluster</label>
    </p>
  </form>

  <table class="msg-box" style="width:100%"><tr><td/></tr></table>
</div>

<table data-snippet="transport-links-setting" class="type-netmap">
  <tr>
    <td><ul class="link-container"></ul></td>
    <td class="link-detail-list"></td>
  </tr>
</table>

<table data-snippet="transport-options-knet" class="options key-value">
  <tr>
    <td>IP Version: </td>
    <td>
      <select data-name="ip_version">
        <option value="">(Default)</option>
        <option value="ipv4">IPv4</option>
        <option value="ipv6">IPv6</option>
        <option value="ipv4-6">IPv4 if available, IPv6 otherwise</option>
        <option value="ipv6-4">IPv6 if available, IPv4 otherwise</option>
      </select>
    </td>
  </tr>
  <tr title="<%= h(knet_pmtud_interval) %>">
    <td>PMTUd Interval: </td>
    <td><input type="text" data-name="knet_pmtud_interval"/> s</td>
  </tr>
  <tr title="<%= h(knet_link_mode) %>">
    <td>Link Mode: </td>
    <td>
      <select data-name="link_mode">
        <option value="">(Default)</option>
        <option value="passive">passive</option>
        <option value="active">active</option>
        <option value="rr">round-robin</option>
      </select>
    </td>
  </tr>
</table>

<table data-snippet="transport-options-udp" class="options">
  <tr>
    <td>IP Version: </td>
    <td>
      <select data-name="ip_version">
        <option value="">(Default)</option>
        <option value="ipv4">IPv4</option>
        <option value="ipv6">IPv6</option>
        <option value="ipv4-6">IPv4 if available, IPv6 otherwise</option>
        <option value="ipv6-4">IPv6 if available, IPv4 otherwise</option>
      </select>
    </td>
  </tr>
  <tr title="<%= h(udp_netmtu) %>">
    <td>Net MTU: </td>
    <td><input type="text" data-name="netmtu"/></td>
  </tr>
</table>

<li data-snippet="transport-link" class="transport-link">
  <span class="link-label">
    <span class="x sprites delete"></span>
    <span class="label">Link</span> <span class="link-nr"></span>
  </span>
</li>

<div data-snippet="transport-link-detail" class="detail">
  <fieldset class="addresses">
    <legend>Addresses</legend>
    <table class="transport-addresses key-value"></table>
  </fieldset>

  <fieldset class="options">
    <legend>Options</legend>
  </fieldset>
</div>

<table data-snippet="transport-addr">
  <tr>
    <td class="node-name"></td>
    <td class="node-addr"><input type="text" class="address"/></td>
  </tr>
</table>

<table
  data-snippet="transport-link-options-knet"
  class="transport-link-options-knet key-value"
>
  <tr title="<%= h(knet_link_priority) %>">
    <td>Link Priority:</td>
    <td><input type="text" data-name="link_priority" /></td>
  </tr>
  <tr title="<%= h(knet_mcastport) %>">
    <td>Port:</td>
    <td><input type="text" data-name="mcastport" /></td>
  </tr>
  <tr title="<%= h(knet_ping_interval) %>">
    <td>Ping Interval:</td>
    <td><input type="text" data-name="ping_interval" /> ms</td>
  </tr>
  <tr title="<%= h(knet_ping_precision) %>">
    <td>Ping Precision:</td>
    <td><input type="text" data-name="ping_precision" /></td>
  </tr>
  <tr title="<%= h(knet_ping_timeout) %>">
    <td>Ping Timeout:</td>
    <td><input type="text" data-name="ping_timeout" /> ms</td>
  </tr>
  <tr title="<%= h(knet_pong_count) %>">
    <td>Pong Count:</td>
    <td><input type="text" data-name="pong_count" /></td>
  </tr>
  <tr title="<%= h(knet_transport) %>">
    <td>Transport:</td>
    <td>
      <select data-name="transport">
        <option value="">(Default)</option>
        <option value="udp">udp</option>
        <option value="sctp">sctp</option>
      </select>
    </td>
  </tr>
</table>

<table data-snippet="transport-link-options-udp">
  <tr title="<%= h(udp_bindnetaddr) %>">
    <td>Bindnetaddr:</td>
    <td><input type="text" data-name="bindnetaddr" /></td>
  </tr>
  <tr title="<%= h(udp_broadcast) %>">
    <td>Broadcast:</td>
    <td>
      <select data-name="broadcast">
        <option value="">(Default)</option>
        <option value="yes">yes</option>
        <option value="no">no</option>
      </select>
    </td>
  </tr>
  <tr title="<%= h(udp_mcastaddr) %>">
    <td>Multicast Address:</td>
    <td><input type="text" data-name="mcastaddr" /></td>
  </tr>
  <tr title="<%= h(udp_mcastport) %>">
    <td>Multicast Port:</td>
    <td><input type="text" data-name="mcastport" /></td>
  </tr>
  <tr title="<%= h(udp_ttl) %>">
    <td>TTL:</td>
    <td><input type="text" data-name="ttl" /></td>
  </tr>
</table>
