1<!DOCTYPE html>
2<!--[if IE 7 ]>    <html class="ie7" lang="en"> <![endif]-->
3<!--[if IE 8 ]>    <html class="ie8" lang="en"> <![endif]-->
4<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"><!--<![endif]-->
5<head>
6  <title>Couchbase Console</title>
7  <link rel="stylesheet" type="text/css" href="css/codemirror.css">
8  <link rel="stylesheet" type="text/css" href="css/screen.css">
9  <link rel="stylesheet" type="text/css" href="css/print.css">
10  <link rel="stylesheet" type="text/css" href="css/jquery-ui.couchbase.css">
11  <link rel="shortcut icon" href="/favicon.ico?v=2">
12  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
13  <meta http-equiv="X-UA-Compatible" content="chrome=1">
14</head>
15<body class="auth nojs">
16  <script>document.body.className = "auth";</script>
17  <div class="io-error-notice-wrapper"><span class="io-error-notice" style="display:none;"></span></div>
18  <div id="container">
19    <div class="outline_tag" id="js_outline_tag"></div>
20    <div class="page-header">
21      <div class="cnt_holder main_holder">
22        <div class="topper_nav">
23          <span id="edit-internal-settings-link" class="when-roadmin-avoid-me" style="display:none;"><a onclick="runInternalSettingsDialog();" class="casper_internal_settings_popup">Edit internal settings</a> <b>&bull;</b></span>
24          <a href="/ui/index.html" target="_self">
25            New UI
26          </a>
27          <b>&bull;</b>
28          <a id="switch_support_docs" href="http://docs.couchbase.com/4.0/" target="cbdocs">Documentation</a>
29          <b>&bull;</b> <a id="switch_support_forums" href="http://www.couchbase.com/communities/" target="cbforums">Support</a>
30          <b>&bull;</b> <a href="javascript:showAbout();">About</a>
31          <i class="sign-out-link"><b>&bull;</b> <a href="javascript:ThePage.signOut();">Sign Out</a></i>
32        </div>
33        <div class="log_wrap">
34          <a href="/index.html"></a>
35        </div>
36        <div class="tab_name ellipsis" id="js_tab_name">
37        </div>
38        <div id="global_progress" class="closed disable_toggle">
39          <i class="toggle">i</i>
40          <ul id="global_progress_container"></ul>
41        </div>
42      </div>
43    </div><!-- .page-header -->
44
45    <div id="headerNav">
46      <div class="contents">
47        <ul>
48          <!--<li class="line"></li>-->
49          <li class="line"><a class="switch_overview" href="#visitSec=overview">Cluster Overview</a></li>
50          <li class="line"><a class="switch_servers switch_groups" href="#visitSec=servers">Server Nodes</a></li>
51          <li class="line"><a class="switch_buckets" href="#visitSec=buckets">Data Buckets</a></li>
52          <li class="line"><a class="switch_views" href="#visitSec=views">Views</a></li>
53          <li class="line"><a class="switch_indexes" href="#visitSec=indexes">Index</a></li>
54          <li class="line"><a class="switch_replications" href="#visitSec=replications">XDCR</a></li>
55          <li class="line"><a class="switch_log" href="#visitSec=log">Log</a></li>
56          <li class="line" id="nav_settings_container"><a href="#visitSec=settings" class="switch_settings">Settings</a></li>
57        </ul>
58        <script id="nav_settings_template" type="text/html">
59        <a href="#visitSec=settings" class="switch_settings">Settings
60        {% if (enabled && newVersion!==false && newVersion!==undefined) { %}
61        <span class="badge notify"><span>!</span></span>
62        {% } %}</a>
63        </script>
64      </div>
65    </div><!-- #headerNav -->
66
67    <div id="mainContainer" class="main_holder">
68      <div id="mainPanel" class="mainPanel">
69
70        <div id="js_overview" class="overview" style="display:none">
71          <h1>Cluster Overview</h1>
72          <div id="notice_container"></div>
73          <div class="shadow_box">
74            <div class="hdr">
75              <span class="staleness-notice">Difficulties communicating with the
76              cluster; displaying cached information!</span>Cluster
77            </div>
78            <div class="section" id="overview_clusters_block">
79              <div class="item ram-item">
80                <div class="label">
81                  <strong>RAM Overview</strong>
82                </div>
83                <div class="line_cnt"></div>
84              </div>
85              <div class="item disk-item">
86                <div class="label">
87                  <strong>Disk Overview</strong>
88                </div>
89                <div class="line_cnt"></div>
90              </div>
91            </div>
92          </div>
93
94          <div class="shadow_box">
95            <div class="hdr">
96              <span class="staleness-notice">Difficulties communicating
97              with the cluster; displaying cached information!</span>
98              Buckets <span>(<span class="buckets-number">??</span> active)</span>
99            </div>
100            <div class="section">
101              <div class="item">
102                <div class="graph_main" style="margin: 0;">
103                  <span class="graph_info_label">Operations per second</span>
104                  <div id="overview_ops_graph" class="graph"></div>
105                </div>
106                <div class="graph_main">
107                  <span class="graph_info_label">Disk fetches per second</span>
108                  <div id="overview_reads_graph" class="graph"></div>
109                </div>
110                <div class="no_stats_marker">
111                  <span class="with_buckets">Waiting for samples...</span>
112                  <span class="without_buckets">No buckets currently defined! Go to <a href="#sec=buckets">Manage Buckets</a> to create some.</span>
113                </div>
114              </div>
115            </div>
116          </div>
117
118          <div class="shadow_box">
119            <div class="hdr">
120              <span class="staleness-notice">Difficulties communicating with
121              the cluster; displaying cached information!</span>Servers
122            </div>
123            <div class="section" id="overview_servers_block">
124              <div class="item ovf">
125                <div class="actservers">
126                  <h3>Active Servers: <span id="active-servers-count">??</span></h3>
127                  <!-- <p>CPU Load Max: <b>98%</b></p> -->
128                  <!-- <p>CPU Load Avg: <b>98%</b></p> -->
129                  <!-- <p>CPU Load Min: <b>98%</b></p> -->
130                  <!-- <a href="#">Monitor All Servers</a> -->
131                </div>
132                <ul>
133                  <li class="fail">
134                    <span class="when-non-zero">
135                      <a href="#visitServersTab=pending">Servers Failed Over: <span class="failed-over-count">??</span></a>
136                      <span class="badge"><span class="failed-over-count">??</span></span>
137                    </span>
138                    <span class="when-zero">Servers Failed Over: 0</span>
139                  </li>
140                  <li class="down">
141                    <span class="when-non-zero">
142                      <a href="#visitServersTab=active">Servers Down: <span class="down-count">??</span></a>
143                      <span class="badge"><span class="down-count">??</span></span>
144                    </span>
145                    <span class="when-zero">Servers Down: 0</span>
146                  </li>
147                  <li class="pending">
148                    <span class="when-non-zero">
149                      <a href="#visitServersTab=pending">Servers Pending Rebalance: <span class="pending-count">??</span></a>
150                      <span class="badge"><span class="pending-count">??</span></span>
151                    </span><span class="when-zero">Servers Pending Rebalance: 0</span>
152                  </li>
153                </ul>
154              </div>
155            </div>
156          </div>
157        </div>
158
159        <div id="js_groups" class="groups when-roadmin-avoid-me" style="display:none">
160          <div class="when-enterprise">
161            <h1>Server Groups</h1>
162            <div class="ellipsis warning_message casper_draggable_server_to" id="js_group_notice"></div>
163            <div class="shadow_box">
164              <div class="header_2">
165                <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
166                <a class="btn_1" href="#visitSec=servers"><span>Server Nodes</span></a>
167                <a id="js_create_group" class="btn_1 casper_groups_create_popup"><span>Create Group</span></a>
168                <a id="js_save_groups_changes" class="btn_1 casper_groups_error"><span>Apply Changes</span></a>
169              </div>
170            <div class="groups_container" id="js_server_group_container"></div>
171            </div>
172            <script id="js_server_group_template" type="text/html">
173              {% if (loading) { %}
174                <div class='spinner' style="height:{%= height %}px;line-height:{%= height %}px;width:100%"><span>Loading...</span></div></div>
175              {% } else { %}
176              {% _.each(groups, function (group, groupIndex) { %}
177                <div class="group_wrapper js_group_wrapper" id="js_group_{%= makeSafeForCSS(group.name) %}_wrapper">
178                    <div class="head" id="js_group_{%= makeSafeForCSS(group.name) %}">
179                      <a class="btn_1 js_edit_group casper_groups_edit_popup"><span>Rename Group</span></a>
180                      <div><h4 class="ellipsis">{%= h(group.name) %}</h4></div>
181                    </div>
182                    <div class="group_servers js_group_servers">
183                     {% _.each(group.nodes, function (server) { %}
184                        <div class="js_draggable draggable casper_draggable_server_from_{%= makeSafeForCSS(group.name) %}">
185                          <span><span>:::</span>{%= V.stripPortHTML(server.hostname, allNodes) %}</span>
186                        </div>
187                      {% }) %}
188                      <div class="group_is_empty">
189                        <span>This group is empty, <a class="js_delete_group casper_groups_remove_popup">click to delete</a>.</span>
190                      </div>
191                    </div>
192                </div>
193              {% }); %}
194              {% } %}
195            </script>
196          </div>
197        </div>
198
199        <div id="js_servers" class="servers" style="display:none">
200          <h1>Servers</h1>
201          <div class="warning_message failover_warning">
202            Fail Over Warning: <span class="warning-text"></span>
203          </div>
204          <div class="warning_message" id="js_rebalance_during_sample_load" style="display:none;color:red;">
205            Warning: Rebalance is not available until data loading is completed!
206          </div>
207          <div id="auto_failover_count_container" class="warning_message" style="display:none;">
208            A server was automatically failed over
209            <a class="auto_failover_count_reset edit_btn when-roadmin-hide-me">
210              <span>Reset Quota</span>
211            </a>
212          </div>
213          <div class="shadow_box">
214            <div class="header_2">
215              <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
216              <a class="btn_1 when-enterprise when-roadmin-avoid-me" href="#visitSec=groups" id="js_server_groups_tab"><span>Server Groups</span></a>
217              <a class="add_button btn_1 when-roadmin-hide-me casper_servers_add_popup"><span>Add Server</span></a>
218              <a class="rebalance_button btn_1 when-roadmin-hide-me"><span>Rebalance</span></a>
219              <a class="stop_rebalance_button btn_1 when-roadmin-hide-me">
220                <span id="js_rebalance_btn_text">Stop Rebalance</span>
221              </a>
222              <a class="stop_recovery_button btn_1 when-roadmin-hide-me"><span>Stop Recovery</span></a>
223              <ul class="tabs">
224                <li class="tab_left"><a>Active Servers</a></li>
225                <li class="tab_right" id="rebalance_tab">
226                  <a class="casper_servers_pending_rebalance_tab">Pending Rebalance</a>
227                  <span class="badge"><span>1</span></span>
228                </li>
229              </ul>
230            </div>
231            <div class="panes">
232              <div>
233                <div id="active_server_list_container" class="servers_list"></div>
234              </div><div>
235                <div id="pending_server_list_container" class="servers_list"></div>
236              </div>
237            </div>
238          </div>
239          <script id="manage_server_list_template" type="text/html">
240          <table class="list" style="width:100%;">
241            <colgroup>
242              <col style="width:19%">
243              <col style="width:9%">
244              <col style='{%= isGroupRaw ? "width: 7%;" : "width: 0px;" %}'>
245              <col style="width:7%">
246              <col style="width:8%">
247              <col style="width:8%">
248              <col style="width:8%">
249              <col style="width:8%">
250              <col style="width:4%">
251              <col style="width:22%">
252            </colgroup>
253            <tbody>
254              <tr>
255                <th class="node_name" style="text-align:left;" data-sortby="hostname">Server Node Name</th>
256                <th></th>
257                <th style='{%= isGroupRaw ? "text-align: center!important;" : "width: 0px;" %}' data-sortby="group">{%= isGroupRaw ? "Group" : " " %}</th>
258                <th data-sortby="services">Services</th>
259                <th>RAM Usage</th>
260                <th>Swap Usage</th>
261                <th>CPU Usage</th>
262                <th>Data/Disk Usage</th>
263                <th style="text-indent:8px;white-space: nowrap;">Items (Active / Replica)</th>
264                <th></th>
265              </tr>
266            <!-- {% if (!rows.length) { %} -->
267              <tr class="server_row rebalance_empty">
268                <td colspan="10">There are no servers pending rebalance.</td>
269              </tr>
270            <!-- {% } %} -->
271            <!-- {% _.each(rows, function (s) { %} -->
272
273            <!-- {% if (s.reAddPossible) { %} -->
274              <tr class="add_back_row when-roadmin-avoid-me">
275                <td colspan="10">{%= V.setData('server', s) %}
276                  <span class="add_back_btn" data-recovery-type="full"><span>Full Recovery</span></span>
277                  <!-- {% if (s.deltaRecoveryPossible) { %} -->
278                  <span class="add_back_btn" data-recovery-type="delta"><span>Delta Recovery</span></span>
279                  <!-- {% } %} -->
280                  <span class="add_b_message">This server is now reachable. Do you want to add it back to the cluster on the next rebalance?</span>
281                </td>
282              </tr>
283            <!-- {% } %} -->
284
285              <tr class="server_row {%= s.nodeClass %}" id="{%= h(s.otpNode.replace('@', '-')) %}">
286
287                <td class="node_name ellipsis">{%= V.setData('server', s) %}
288              <!-- {% if (s.reAddPossible) { %} -->
289                  <a href="#openServer={%= h(s.otpNode) %}" class="casper_open_cluster_{%= makeSafeForCSS(s.otpNode) %}"><ins class="expander closed"></ins></a>
290                  {%= V.stripPortHTML(s.hostname, rows) %}
291              <!-- {% } else { %} -->
292                  <!-- {% if (s.nodeClass.indexOf('server_down') != -1 || !expandingAllowed) { %} -->
293                  {%= h(s.hostname) %}
294                  <!-- {% } else { %} -->
295                  <a href="#openServer={%= h(s.otpNode) %}" title="Show Server Node info"><ins class="expander closed"></ins></a>
296                  <a href="#sec=analytics&statsHostname={%= h(s.hostname) %}" title="View Analytics for {%= h(s.hostname) %}">{%= V.stripPortHTML(s.hostname, rows) %}</a>
297                  <!-- {% } %} -->
298              <!-- {% } %} -->
299                </td>
300
301                <td class="servers_icons {%= s.nodeClass %}">
302                </td>
303                <td><div class="ellipsis" title="{%= s.group %}">{%= h(s.group || "") %}</div></td>
304
305                <td style="text-align: left;">{%= V.formatServices(s.services).join('<br>') %}</td>
306
307                <td class="ram">
308                  <!-- {% if ((s.memoryTotal > 0) && isFinite(s.memoryFree)) { %} -->
309                  <div class="vertical_bar">
310                    <div class="used" style="height:{%= (s.memoryTotal - s.memoryFree) / s.memoryTotal * 100 %}%;top:{%= 105 - ((s.memoryTotal - s.memoryFree) / s.memoryTotal * 100) %}%"></div>
311                  </div>
312                  <div class="wrap">{%= h(truncateTo3Digits((s.memoryTotal - s.memoryFree) / s.memoryTotal * 100)) %}%</div>
313                  <!-- {% } else { %} -->
314                  <div class="not_active">N/A</div>
315                  <!-- {% } %} -->
316                </td>
317
318                <td class="ram">
319                  <!-- {% if (s.systemStats.swap_total > 0 && isFinite(s.systemStats.swap_used)) { %} -->
320                  <div class="vertical_bar">
321                    <div class="used" style="height:{%= s.systemStats.swap_used / s.systemStats.swap_total * 100 %}%;top:{%= 105 - (s.systemStats.swap_used / s.systemStats.swap_total * 100) %}%"></div>
322                  </div>
323                  <div class="wrap"> {%= h(truncateTo3Digits((s.systemStats.swap_used / s.systemStats.swap_total) * 100)) %}%</div>
324                  <!-- {% } else { %} -->
325                  <div class="not_active">N/A</div>
326                  <!-- {% } %} -->
327                </td>
328
329                <td class="ram">
330                  <!-- {% if (isFinite(s.systemStats.cpu_utilization_rate)) { %} -->
331                  <div class="vertical_bar">
332                    <div class="used" style="height:{%= Math.floor(s.systemStats.cpu_utilization_rate * 100) / 100 %}%;top:{%= 105 - (Math.floor(s.systemStats.cpu_utilization_rate * 100) / 100) %}%"></div>
333                  </div>
334                  <div class="wrap">{%= h(truncateTo3Digits(Math.floor(s.systemStats.cpu_utilization_rate * 100) / 100)) %}%</div>
335                  <!-- {% } else { %} -->
336                  <div class="not_active">N/A</div>
337                  <!-- {% } %} -->
338                </td>
339
340                <td class="ram">
341                  {%= (function (dataSize, diskUsage) {
342                         if (dataSize == null || diskUsage == null) {
343                           return "N/A";
344                         }
345                         return V.formatQuantity(dataSize) + " /<br>" + V.formatQuantity(diskUsage);
346                      })(s.couchDataSize, s.couchDiskUsage) %}
347                </td>
348
349                <td class="rep" style="padding-left:0;padding-right:0;">
350                  {%= V.formatQuantity(s.interestingStats.curr_items || 0, 1000, ' ') %}/<br>
351                  {%= V.formatQuantity(s.interestingStats.vb_replica_curr_items || 0, 1000, ' ') %}
352                </td>
353
354                <!-- {% if (s.clusterMembership == 'inactiveAdded') { %} -->
355                <td class="actions with_state_message">
356                  {% if (s.recoveryType === 'none') { %}
357                    <span class="state_message">Pending Add</span>
358                    <a href="#" class="list_button btn_cancel eject_server when-roadmin-avoid-me"><span>Cancel</span></a>
359                  {% } else { %}
360                    <span class="state_message">Pending {%= h(s.recoveryType) %} recovery</span>
361                    <a href="#" class="list_button btn_cancel eject_server when-roadmin-avoid-me"><span>Cancel</span></a>
362                  {% } %}
363                </td>
364                <!-- {% } else if (s.pendingEject) { %} -->
365                <td class="actions with_state_message">
366                  <span class="state_message">Pending Removal</span>
367                  <a href="#" class="list_button btn_cancel remove_from_list when-roadmin-avoid-me"><span>Cancel</span></a>
368                </td>
369                <!-- {% } else { %} -->
370                <td class="actions">
371                  <a class="list_button eject_server when-roadmin-avoid-me casper_servers_remove_popup"><span>Remove</span></a>
372                  <a class="list_button failover_server when-roadmin-avoid-me casper_servers_failover_popup"><span>Fail Over</span></a>
373                  <span class="failed_over_message">Failed Over: Pending Removal</span>
374                </td>
375                <!-- {% } %} -->
376
377              </tr>
378            <!-- {% if (expandingAllowed) { %} -->
379              <tr><td colspan="10" class="settings-placeholder" style="display:none;">{%= ServersSection.renderServerDetails(s) %}</td></tr>
380            <!-- {% } %} -->
381          <!-- {% }); %} -->
382            </tbody>
383          </table>
384          </script>
385
386          <script id="server_details_template" type="text/html">
387          <div class="first gong_rb">
388            <div class="pad">
389              <table class="properties_table">
390                <tr>
391                    <td>Server Name: <span>{%= h(hostname) %}</span></td>
392                    <td>Uptime: <span>{%= h(formatUptime(uptime)) %}</span></td>
393                    <td>OS: <span>{%= h(os) %}</span></td>
394                </tr>
395                <tr>
396                  <td colspan="3">Version: <span>{%= h(DAL.prettyVersion(version, true)) %}</span></td>
397                </tr>
398              </table>
399            </div>
400            <div class="side side_1"></div>
401            <div class="side side_2"></div>
402            <div class="side side_3"></div>
403            <div class="side side_4"></div>
404          </div>
405          <div class="additional_server_info">
406            <!-- {% if (detailedProgress) { %}-->
407              <h3>Rebalance Progress</h3>
408              <div class="rebalance_progress">
409
410                <!-- {% if (detailedProgress.outgoing) { %} -->
411                <div>
412                  <p class="direction">Data being transferred out</p>
413
414                  <p>
415                    <span>Bucket:</span>
416                    {%= detailedProgress.bucket %}
417                    ({%= detailedProgress.bucketNumber %} out of {%= detailedProgress.bucketsCount %})
418                  </p>
419                  <p>
420                    <span>Total number of keys to be transferred:</span>
421                    {%= detailedProgress.outgoing.docsTotal %}
422                  </p>
423                  <p>
424                    <span>Estimated number of keys transferred:</span>
425                    {%= detailedProgress.outgoing.docsTransferred %}
426                  </p>
427                  <p>
428                    <span>
429                      Number of Active# vBuckets and Replica# vBuckets to transfer:
430                    </span>
431                    Active#-{%= detailedProgress.outgoing.activeVBucketsLeft %}
432                    Replica#-{%= detailedProgress.outgoing.replicaVBucketsLeft %}
433                  </p>
434                </div>
435                <!-- {% } %} -->
436
437                <!-- {% if (detailedProgress.ingoing) { %} -->
438                <div>
439                  <p class="direction">Data being transferred in</p>
440                  <p>
441                    <span>Bucket:</span>
442                    {%= detailedProgress.bucket %}
443                    ({%= detailedProgress.bucketNumber %} out of {%= detailedProgress.bucketsCount %})
444                  </p>
445                  <p>
446                    <span>Total number of keys to be transferred:</span>
447                    {%= detailedProgress.ingoing.docsTotal %}
448                  </p>
449                  <p>
450                    <span>Estimated number of keys transferred:</span>
451                    {%= detailedProgress.ingoing.docsTransferred %}
452                  </p>
453                  <p>
454                    <span>
455                      Number of Active# vBuckets and Replica# vBuckets to transfer:
456                    </span>
457                    Active#-{%= detailedProgress.ingoing.activeVBucketsLeft %}
458                    Replica#-{%= detailedProgress.ingoing.replicaVBucketsLeft %}
459                  </p>
460                </div>
461                <!-- {% } %}-->
462
463              </div>
464            <!-- {% } %}-->
465            {%= tmpl("js_warm_up_tmpl")({thisWarmupTasks: thisNodeWarmupTasks}) %}
466
467            <h3>Memory</h3>
468            <div class="info_block">
469              <span class="dynamic_ram">Dynamic RAM:</span>
470              <div class="usage-block">{%= V.thisElement(function (e) {ServersSection.renderUsage(e, obj.storageTotals.ram, true, (_.indexOf(services, 'n1ql') > -1 && services.length === 1)) }) %}</div>
471            </div>
472            <h3>Disk Storage</h3>
473            <div class="info_block">
474              <span class="disk_storage">
475                <span>Disk One: </span>
476                  <!-- {% if (storage.hdd[0].path) { %} -->
477                    <span class="path" title="{%= h(storage.hdd[0].path) %}">data: {%= h(V.ellipsisiseOnLeft(storage.hdd[0].path || "", 25))  %}</span>
478                  <!-- {% } %}-->
479                  <!-- {% if (storage.hdd[0].index_path) { %} -->
480                    <span class="path" title="{%= h(storage.hdd[0].index_path) %}">index: {%= h(V.ellipsisiseOnLeft(storage.hdd[0].index_path || "", 25))  %}</span>
481                  <!-- {% } %}-->
482              </span>
483              <div class="usage-block">{%= V.thisElement(function (e) {ServersSection.renderUsage(e, obj.storageTotals.hdd)}) %}</div>
484            </div>
485          </div><!-- additional_server_info -->
486          </script>
487        </div>
488
489        <div id="js_analytics" class="analytics" style="display:none">
490          <span class="block nav float_right configure_view"></span>
491          <h1>
492            <span class="js_when-normal-stats">DATA BUCKETS: </span><span class="js_when-specific-stats"><em class="js_specific-stat-description"></em> for bucket: </span>
493            <select id="js_analytics_buckets_select"></select>
494            <span class="js_when-normal-stats"> on <select id="js_analytics_servers_select"></select></span>
495          </h1>
496          <div id="js_date_slider_container" class="date_slider_container">
497            <div id="js_date_slider" class="date_slider"></div>
498            <div class="time_mode_wrap">
499              <a id="js_zoom_minute" class="js_click">Minute</a>
500              <a id="js_zoom_hour" class="js_click">Hour</a>
501              <a id="js_zoom_day" class="js_click">Day</a>
502              <a id="js_zoom_week" class="js_click">Week</a>
503              <a id="js_zoom_month" class="js_click">Month</a>
504              <a id="js_zoom_year" class="js_click">Year</a>
505            </div>
506          </div>
507          <div id="current_stat_info">
508            <h3>
509              <span class="i">i</span>
510              <span class="current-graph-name js_current-graph-name"><!-- stat name --></span>
511            </h3>
512            <p class="js_current-graph-desc"><!-- stat description --></p>
513          </div>
514          <div class="shadow_box" style="width:780px;">
515            <div class="section">
516              <div class="header_2">
517                <span class="block nav float_right">
518                  <span id="js_stats-period-container" class="stats-period-container">
519                    <span class="with_samples current">Last <b id="js_stats_visible_period">?</b></span><span class="without_samples current">No samples, yet</span>
520                  </span>
521                  <span class="js_staleness-notice staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
522                </span>
523                General Bucket Analytics
524                <!--<ul class="tabs">
525                  <li class="tab_left"><a id="general_analytics">General</a></li>
526                  <li><a id="view_index_analytics">View &amp; Index</a></li>
527                  <li class="tab_right"><a id="replication_analytics">Replication</a></li>
528                </ul>-->
529              </div>
530              <div class="analytics_graph_main">
531                <h2 class="current-graph-name js_current-graph-name">??</h2>
532                <span class="graph_info_label block right active_node_count"><!-- 3 active nodes --></span>
533                <div id="analytics_main_graph_grid">
534                  <div id="js_analytics_main_graph" class="analytics_main_graph"></div>
535                </div>
536              </div>
537              <script id="js_new_stats_block_template" type="text/html">
538                      {% _.each(blocks, function (blockInfo) { %}
539                      <div id="{%= h(blockInfo.id) %}" class="darker_block js_darker_block {%= blockInfo.extraCSSClasses %}">
540                        {% if (!blockInfo.hideThis) { %}<h3 class="block-expander js_block-expander"><ins></ins>{%= h(blockInfo.blockName) %}</h3>{% } %}
541                        {% if (blockInfo.blockName === 'Query') {%}
542                        <span class="query_notice"><span class="i">i</span> Metrics for Query are not per bucket and will not change if bucket dropdown above is changed</span>
543                        {% } %}
544                        <div class="stats js_stats">
545                        {% if (blockInfo.columns) { %}
546                          <ul class="col_headers">
547                          {% _.each(blockInfo.columns, function (columnName) { %}
548                            <li>{%= h(columnName) %}</li>
549                          {% }); %}
550                          </ul>
551                        {% } %}
552                        {% _.each(blockInfo.stats, function (statInfo) {var name = statInfo.name; var title = statInfo.title; if (statInfo.hidden) {return;} %}
553                          <div id="{%= h(statInfo.id) %}" class="js_analytics-small-graph analytics-small-graph {%= (statInfo.missing ? 'dynamic_dim' : '') %}" data-graph="{%=h(name)%}">
554                            <div class="small_graph_block" id="js_small_graph_block" style="width: 168px; height: 36px;"></div>
555                            <span class="small_graph_label">
556                              <span class="value" id="js_small_graph_value">0</span><span class="label-text"> {%= h(title) %}</span>
557                            </span>
558                            <!-- <input type="checkbox" > -->
559                            <ins class="right-arrow js_right-arrow">
560                              <ul class="js_inner">
561                              </ul>
562                            </ins>
563                            {% if (statInfo.desc) { %}<div class="graph_tooltip"><span>{%= h(statInfo.desc) %}</span></div>{% } %}
564                          </div>
565                        {% }); %}
566                          <div class="clear"></div>
567                        </div>
568                      </div>
569                      {% }); %}
570              </script>
571              <div id="js_stats_container"></div>
572            </div>
573          </div><!-- shadow_box -->
574          <div class="shadow_box" style="width:780px;">
575            <div class="section" id="js_top_keys_block">
576              <h2 class="header_2">
577                TOP KEYS
578              </h2>
579              <p id="js_top_keys_container" class="top_keys_container"></p>
580              <script id="js_top_keys_template" type="text/html">
581                      <table class="lined_tab">
582                        <thead>
583                          <tr>
584                            <th>Key</th>
585                            <th>Ops/Sec</th>
586                          </tr>
587                        </thead>
588                        <tbody>
589                          <!-- {% $.each(rows, function () { %} -->
590                          <tr>
591                            <td style="max-width:600px;word-wrap:break-word">{%= h(this.name) %}</td>
592                            <td>{%= h(Math.round(this.ops * 100.0) / 100.0) %}</td>
593                          </tr>
594                          <!-- {% }); %} -->
595                        </tbody>
596                      </table>
597              </script>
598            </div> <!-- section -->
599          </div> <!-- END shadow box -->
600        </div>
601
602        <div id="js_buckets" class="buckets" style="display:none">
603          <h1>Data Buckets</h1>
604          <div class="shadow_box" id="couchbase_buckets">
605            <div class="js_manage_buckets_top_bar header_2">
606              <h4 style="float:left;line-height:34px;">Couchbase Buckets</h4>
607              <div class="right" style="overflow:hidden;">
608                <a class="btn_1 create-bucket-button when-roadmin-hide-me casper_buckets_new_data_bucket" style="float:right;"><span>Create New Data Bucket</span></a>
609                <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
610              </div>
611            </div>
612            <div id="bucket_list_container"></div>
613          </div>
614
615          <div class="shadow_box" id="memcached_buckets" style="display:none">
616            <div class="js_manage_buckets_top_bar header_2">
617              <h4 style="float:left">Memcached Buckets</h4>
618              <div class="right">
619                <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
620              </div>
621            </div>
622            <div id="memcached_bucket_list_container"></div>
623          </div>
624
625          <script id="bucket_list_template" type="text/html">
626            <table class="list" width="100%">
627              <tr>
628                <th class="bucket_name">Bucket Name</th>
629                <th></th>
630                <th></th>
631                <th></th>
632                <th colspan="2">Data Nodes</th>
633                <th colspan="2">Item Count</th>
634                <th>Ops/sec</th>
635                <th colspan="2" class="disk_fetch">Disk Fetches/sec</th>
636                <th colspan="2" class="hit_ratio">Hit Ratio</th>
637                <th colspan="2">RAM/Quota Usage</th>
638                <th colspan="2">Data/Disk Usage</th>
639                <th></th>
640                <th></th>
641                <th></th>
642                <th class="last"></th>
643              </tr>
644              <!-- {% if (!rows.length) { %} -->
645              <tr><td colspan="19" style="padding:15px">No buckets currently defined! Click "Create New Data Bucket" above to create one.</td></tr>
646              <!-- {% } %} -->
647              <!-- {% $.each(rows, function () { %} -->
648              <tr class="{%= this.bucketTypeName.toLowerCase() %}">
649                <td class="bucket_name ellipsis" colspan="4">
650                  <a class="disable-if-stale bucket" href="#visitBucket={%= h(encodeURIComponent(this.name)) %}" title="Show Bucket info"><span class="expander closed casper_buckets_bucket_details"></span></a>
651                  <a class="disable-if-stale" title="View Analytics for {%= h(this.name) %}" href="#sec=analytics&statsBucket={%= h(encodeURIComponent(this.uri)) %}">{%= h(this.name) %}</a>
652                </td>
653                <td colspan="2">
654                  <span id="{%= h(this.name) %}_health" class="health_graph"></span>
655                  {%= this.nodes.length %}
656                </td>
657                <td colspan="2">{%= h(this.basicStats.itemCount) %}</td>
658                <td>{%= h(Math.round(this.basicStats.opsPerSec)) %}</td>
659                {% if (this.bucketType == 'membase') { %}
660                  <td colspan="2">
661                    {% if (this.basicStats.diskFetches !== undefined) { %}
662                    {%= h(truncateTo3Digits(this.basicStats.diskFetches)) %}
663                    {% } else { %}N/A{% } %}
664                  </td>
665                {% } %}
666                {% if (this.bucketType == 'memcached') { %}
667                  <td colspan="2">{%= h(truncateTo3Digits(this.basicStats.hitRatio * 100)) %}%</td>
668                {% } %}
669                <td colspan="2">{%= V.formatQuantity(this.basicStats.memUsed) %} /<br> {%= V.formatQuantity(this.quota.ram) %}</td>
670                <td colspan="2">
671                  {% if (this.bucketType == 'membase') { %}
672                    {%= V.formatQuantity(this.basicStats.dataUsed) %} /<br> {%= V.formatQuantity(this.basicStats.diskUsed) %}
673                  {% } else { %}N/A{% } %}
674                </td>
675                <td colspan="4" class="last">
676                  {% if (this.bucketType == 'membase') { %}
677                    <a class="list_button disable-if-stale" href="#sec=views&viewsBucket={%= h(this.name) %}"><span>Views</span></a>
678                    <a class="list_button when-roadmin-hide-me" href="#sec=documents&viewsBucket={%= encodeURIComponent(this.name) %}&documentsPageNumber=0"><span>Documents</span></a>{% } %}
679                </td>
680              </tr>
681              <tr>
682                <td colspan="19" class="settings-placeholder">
683                  {%= BucketsSection.renderBucketDetails(this) %}
684                </td>
685              </tr>
686              <!-- {% }); %} -->
687            </table>
688          </script>
689
690
691          <script id="js_warm_up_tmpl" type="text/html">
692            {% if (thisWarmupTasks) { %}
693              <h3>Warmup Progress</h3>
694              <div class="warmup_icon"></div>
695              <div class="warmup_table_wrapper">
696                <table class="warmup_table">
697                  <colgroup>
698                    <col class="bucket_name">
699                    <col>
700                  </colgroup>
701                  <tbody>
702                    {% _.each(thisWarmupTasks, function (task) { %}
703                      <tr>
704                        <td title="{%= h(task.key) %}" class="ellipsis">{%= h(task.key) %}</td>
705                        <td>{%= h(task.status) %}</td>
706                      </tr>
707                    {% }) %}
708                  </tbody>
709                </table>
710              </div>
711              <div class="clear"></div>
712            {% } %}
713          </script>
714
715          <script id="bucket_settings_template" type="text/html">
716            <div class="gong_rb">
717              <div class="pad">
718                <div style="width:800px;float:left;">
719                  <div>
720                    Access Control: <span>{%= (authType == 'none') ? 'Port' : ((name == 'default') ? 'None' : 'Authentication') %}{%= (authType == 'none') ? (': ' + proxyPort) : '' %}</span>
721                  </div>
722                {% if (bucketType == 'membase') { %}
723                  <div>
724                    Replicas: <span>{%= replicaNumber != 0 ? V.count(replicaNumber, 'replica copy') : 'disabled' %}</span>
725                  </div>
726                  <div>
727                    Compaction: <span class="bucket_progress_container" data-name="{%= h(name) %}">
728                    {%= thisBucketCompactionTask ? thisBucketCompactionTask.progress + "% complete" : "Not active" %}
729                    </span>
730                  </div>
731                  <div>
732                    Cache Metadata: <span>{%= evictionPolicy === "valueOnly" ? 'Value Ejection' : 'Full Ejection' %}</span>
733                  </div>
734                  <div>
735                    Disk I/O priority: <span>{%= threadsNumber === 3 ? 'Low' : 'High' %}</span>
736                  </div>
737                {% } %}
738                </div>
739                <div class="last when-roadmin-hide-me">
740                  <a class="inner_btn casper_buckets_edit_bucket_popup" href="#editBucket={%= h(encodeURIComponent(uri)) %}">Edit</a>
741                  {% if (!showCancel && !noCompaction) { %}
742                    <button class="inner_btn compact_btn {%= disableCompact ? 'dynamic_disabled' : ''%}" data-uri="{%= h(controllers.compactAll) %}"><span>Compact</span></button>
743                  {% } else if (!noCompaction) { %}
744                    <button class="inner_btn cancel_compact_btn {%= disableCancel ? 'dynamic_disabled' : ''%}" data-uri="{%= h(thisBucketCompactionTask.cancelURI) %}"><span>Cancel</span></button>
745                  {% } %}
746                </div>
747              </div>
748              <div class="side side_1"></div>
749              <div class="side side_2"></div>
750              <div class="side side_3"></div>
751              <div class="side side_4"></div>
752            </div>
753
754            <div class="additional_server_info bucket_details_info">
755              {%= tmpl("js_warm_up_tmpl")({thisWarmupTasks: thisBucketWarmupTasks}) %}
756
757              <h2>Cache Size</h2>
758              <div class="dynamic_ram">
759                <label class="for-hdd-quota">
760                  <span>Dynamic RAM Quota:</span>
761                  <span>{%= h(V.formatQuantity(ramQuota)) %}</span>
762                  <abbr></abbr>
763                </label>
764              </div>
765              <div class="size-gauge for-ram"></div>
766              {%= V.thisElement(function (e) {BucketsSection.renderRAMDetailsGauge(e, obj);}) %}
767
768            {% if (storageInfoRelevant) { %}
769              <h2>Storage Size</h2>
770              <div class="disk_storage">
771                <label class="for-hdd-quota" style="padding:0;">
772                  <span>Persistence Enabled:</span>
773                  <span>Yes</span><br>
774                  <span>Disk Usage:</span>
775                  <span>{%= h(V.formatQuantity(basicStats.diskUsed)) %}</span><br>
776                  <span>Data Usage:</span>
777                  <span>{%= h(V.formatQuantity(basicStats.dataUsed)) %}</span>
778                  <abbr></abbr>
779                </label>
780              </div>
781              <div class="size-gauge for-hdd"></div>
782              {%= V.thisElement(function (e) {BucketsSection.renderHDDDetailsGauge(e, obj)}) %}
783            {% } %} <!-- storageInfoRelevant -->
784            </div><!-- additional_server_info -->
785          </script>
786        </div>
787
788        <script id="js_select_nodes_list_template" type="text/html">
789          {% _.each(nodes, function (node) { %}
790            <li class="dynamic_{%=node.nodeClass %}">
791              <input type="checkbox"
792                     name="js-selected-nodes"
793                     value="{%= h(node.value) %}"
794                     id="collected_node_list_{%= makeSafeForCSS(node.value) %}"
795                     {%= !node.isUnhealthy ? 'checked="checked"' : ''%}
796                     {%= node.isUnhealthy ? 'disabled="disabled"' : ''%}>
797              <label for="collected_node_list_{%= makeSafeForCSS(node.value) %}">{%= h(node.hostname) %}</label>
798            </li>
799          {% }); %}
800        </script>
801
802        <script id="logs_template" type="text/html">
803          <table class="lined_tab">
804            <colgroup>
805              <col style="width: 55%;">
806              <col style="width: 15%;">
807              <col style="width: 15%;">
808              <col style="width: 15%;">
809            </colgroup>
810            <thead>
811              <tr>
812                <th>Event</th>
813                <th>Module Code</th>
814                <th>Server Node</th>
815                <th>Time</th>
816              </tr>
817            </thead>
818            <tbody>
819              <!-- {% _.each(rows, function (logRow) { %} -->
820              <tr>
821                <td>{%= h(logRow.text).replace(/\n/g, "<br />") %}</td>
822                <td>{%= h(logRow.module) + (new String(1000 + parseInt(logRow.code))).slice(-3)%}</td>
823                <td>{%= h(logRow.node) %}</td>
824                <td class="text_11 nobr">{%=V.formatLogTStamp(logRow.serverTime)%}
825              </tr>
826              <!-- {% }); %} -->
827            </tbody>
828          </table>
829        </script>
830
831        <script id="js_collect_progress_template" type="text/html">
832          <div id="js_collection_status" class="collection_status dynamic_{%= status %}">
833            <span>{%= ('Collection ' + status) + (status === 'running' ? '...' : '.') %}</span>
834          </div>
835          {% if (nodesByStatus.started) { %}
836            <div>
837              <p>In progress:</p>
838              <div class="js_result result">
839                {% _.each(nodesByStatus.started, function (node) { %}
840                  <div>{%= h(node.nodeName) %}</div>
841                {% }); %}
842              </div>
843            </div>
844          {% } %}
845          {% if (nodesByStatus.starting) { %}
846            <div>
847              <p>Pending:</p>
848              <div class="js_result result">
849                {% _.each(nodesByStatus.starting, function (node) { %}
850                  <div>{%= h(node.nodeName) %}</div>
851                {% }); %}
852              </div>
853            </div>
854          {% } %}
855          {% if (nodesByStatus.collected) { %}
856            <div>
857              <p class="green">Logs were successfully collected to the following paths:</p>
858              <div class="js_result result">
859                {% _.each(nodesByStatus.collected, function (node) { %}
860                  <div><strong>{%= h(node.nodeName) %}:</strong>{%= h(node.path) %}</div>
861                {% }); %}
862              </div>
863            </div>
864          {% } %}
865          {% if (nodesByStatus.startedUpload) { %}
866            <div>
867              <p class="green">Logs are being uploaded from this paths:</p>
868              <div class="js_result result">
869                {% _.each(nodesByStatus.startedUpload, function (node) { %}
870                  <div><strong>{%= h(node.nodeName) %}:</strong>{%= h(node.path) %}</div>
871                {% }); %}
872              </div>
873            </div>
874          {% } %}
875          {% if (nodesByStatus.startingUpload) { %}
876            <div>
877              <p class="green">Logs are pending upload from this paths:</p>
878              <div class="js_result result">
879                {% _.each(nodesByStatus.startingUpload, function (node) { %}
880                  <div><strong>{%= h(node.nodeName) %}:</strong>{%= h(node.path) %}</div>
881                {% }); %}
882              </div>
883            </div>
884          {% } %}
885          {% if (nodesByStatus.uploaded) { %}
886            <div>
887              <p class="green">Logs were successfully uploaded to the following URLs:</p>
888              <div class="js_result result">
889                {% _.each(nodesByStatus.uploaded, function (node) { %}
890                  <div><a href="{%= h(node.url) %}" target="_blank">{%= h(node.url) %}</a></div>
891                {% }); %}
892              </div>
893            </div>
894          {% } %}
895          {% if (nodesByStatus.failedUpload) { %}
896            <div>
897              <p class="red">Warning: The following logs were successfully collected but failed to upload. Please manually upload from the following locations:</p>
898              <div class="js_result result">
899                {% _.each(nodesByStatus.failedUpload, function (node) { %}
900                  <div><strong>{%= h(node.nodeName) %}:</strong>{%= h(node.path) %}</div>
901                {% }); %}
902              </div>
903            </div>
904          {% } %}
905          {% if (nodesByStatus.failed) { %}
906            <div>
907              <p class="red">Error: Unable to collect logs from the following nodes:</p>
908              <div class="js_result result">
909                {% _.each(nodesByStatus.failed, function (node) { %}
910                  <div>{%= h(node.nodeName) %}</div>
911                {% }); %}
912              </div>
913            </div>
914          {% } %}
915          {% if (nodesByStatus.cancelled) { %}
916            <div>
917              <p class="red">Cancelled Nodes:</p>
918              <div class="js_result result">
919                {% _.each(nodesByStatus.cancelled, function (node) { %}
920                  <div>{%= h(node.nodeName) %}</div>
921                {% }); %}
922              </div>
923            </div>
924          {% } %}
925          {% if (nodeErrors.length) { %}
926            <div>
927              <p class="red">Node Errors:</p>
928              <div class="js_result result">
929                {% _.each(nodeErrors, function (node) { %}
930                  <div><strong>{%= h(node.nodeName) %}:</strong> {%= h(node.error) %}</div>
931                {% }); %}
932              </div>
933            </div>
934          {% } %}
935        </script>
936
937        <div id="js_logs" class="logs" style="display:none">
938          <!-- Shadow box -->
939          <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
940          <h1>Log</h1>
941          <div class="clear"></div>
942          <div class="shadow_box">
943            <div class="section">
944              <div class="header_2">
945                <ul class="tabs when-roadmin-avoid-me">
946                  <li class="tab_left"><a>Logs</a></li>
947                  <li class="tab_right"><a>Collect Information</a></li>
948                </ul>
949                <a id="js_start_new_info"  class="btn_1"><span>Start New Collection</span></a>
950                <a id="js_cancel_collect_info"  class="btn_1"><span>Stop Collection</span></a>
951                <a id="js_previous_result_btn" class="btn_1"><span>Previous Result</span></a>
952              </div>
953              <div class="panes clearfix">
954                <div id="logs_container"></div>
955                <div id="js_collect_information" class="when-roadmin-avoid-me">
956                  <div class="collect_information_dialog" id="js_collect_info_start_new_view">
957                    <form id="js_collect_info_form">
958                      <div class="content">
959                        <h2>Select Nodes</h2>
960                        <p>Collect logs and diagnostic information from:</p>
961                        <ul class="collect_from">
962                          <li>
963                            <input type="radio" name="from" value="*" id="all_nodes_radio" checked="checked">
964                            <label for="all_nodes_radio">All nodes</label>
965                          </li>
966                          <li>
967                            <input type="radio" name="from" value="" id="selected_nodes_radio">
968                            <label for="selected_nodes_radio">Selected nodes:</label>
969                          </li>
970                          <li>
971                            <ul id="js_select_nodes_list_container" class="selected_nodes"></ul>
972                            <div id="js_nodes_error" class="js_error_container" style="display:block"></div>
973                          </li>
974                        </ul>
975                        <h2>Upload Options</h2>
976                        <div class="for_upload" id="js_upload_conf">
977                          <div id="js_generalCollectInfo_error" class="js_error_container" style="display:block;margin:0 0 10px 0; line-height: 13px;"></div>
978                          <div>
979                            <label for="js_upload_to_cb">Upload to Couchbase:</label>
980                            <input id="js_upload_to_cb" name="upload" value="true" type="checkbox">
981                            <div id="js_upload_error" class="js_error_container"></div>
982                          </div>
983                          <div>
984                            <label for="js_uploadHost_input">Upload to host:</label>
985                            <input id="js_uploadHost_input" name="uploadHost" type="text">
986                            <div id="js_uploadHost_error" class="js_error_container"></div>
987                          </div>
988                          <div>
989                            <label for="js_customer_input">Customer name:</label>
990                            <input id="js_customer_input" name="customer" type="text">
991                            <div id="js_customer_error" class="js_error_container"></div>
992                          </div>
993                          <div>
994                            <label for="js_ticket_input">Ticket Number (optional):</label>
995                            <input id="js_ticket_input" name="ticket" type="text">
996                            <div id="js_ticket_error" class="js_error_container"></div>
997                          </div>
998                        </div>
999                      </div>
1000                      <div class="save_cancel">
1001                        <button class="save_button float_right js_save_button" type="submit">Collect</button>
1002                      </div>
1003                    </form>
1004                  </div>
1005                  <div class="collect_result_dialog collect_information_dialog" id="js_collect_result_view">
1006                    <div class="content" id="js_collect_progress_container">
1007                    </div>
1008                  </div>
1009                  <div class="spinner" id="js_collect_info_spinner" style="height:350px;line-height:350px;width:100%"><span>Loading ...</span></div>
1010                </div>
1011              </div>
1012            </div>
1013          </div>
1014        </div>
1015
1016        <div id="js_settings" class="settings" style="display:none">
1017          <h1>Settings</h1>
1018          <div class="shadow_box">
1019            <div class="section">
1020              <div class="header_2">
1021                <ul class="tabs">
1022                  <li class="tab_left"><a id="settings_cluster">Cluster</a></li>
1023                  <li><a id="settings_update_notifications" class="casper_settings_update_notifications">Update Notifications</a></li>
1024                  <li><a id="settings_auto_failover" class="casper_settings_auto_failover">Auto-Failover</a></li>
1025                  <li><a id="settings_alerts" class="casper_settings_alerts">Alerts</a></li>
1026                  <li><a id="settings_compaction" class="casper_settings_compaction">Auto-Compaction</a></li>
1027                  <li class="when-enterprise only-when-40 only-when_ldap_enabled"><a id="ldap_setup">LDAP Auth Setup</a></li>
1028                  <li class="when-roadmin-avoid-me"><a id="account_management" class="casper_settings_account_management">Account Management</a></li>
1029                  <li class="when-enterprise only-when-40"><a id="audit">Audit</a></li>
1030                  <li class="tab_right"><a id="settings_sample_buckets" class="casper_settings_sample_buckets">Sample Buckets</a></li>
1031                </ul>
1032              </div>
1033              <div class="panes clearfix">
1034                <div id="js_cluster_settings_container" class="cluster_settings_container">
1035                  <form id="js_cluster_public_settings_form" class="cluster_settings_form">
1036                    <div class="js_cluster_settings_fields">
1037                      <h2>
1038                        Configure Cluster
1039                      </h2>
1040                      <div class="sub_section">
1041                        <label>Cluster Name:</label>
1042                        <input type="text" name="clusterName" maxlength="256">
1043                        <span>(0 — 256 chars)</span>
1044                      </div>
1045                      <div class="certificate_section when-enterprise">
1046                        <h3>Certificate:</h3>
1047                        <div class="sub_section">
1048                          <p>
1049                            Self-signed SSL certificate is deployed across the cluster on each nodes.
1050                          </p>
1051                          <p>
1052                            <a id="js_show_hide_cert_area">Show</a> certificate.
1053                          </p>
1054                          <div class="about-cert-area_wrapper" id="js_about-cert-area_wrapper">
1055                            <textarea id="js-about-cert-area" readonly="readonly"></textarea>
1056                            <div></div>
1057                            <div onclick="regenerateCertificate();" class="edit_btn when-roadmin-avoid-me">Regenerate</div>
1058                            <span style="color:red;display:inline;margin-left:5px;font-size:11px;">* Clicking 'Regenerate' will immediately generate new certificate for the cluster</span>
1059                          </div>
1060                        </div>
1061                      </div>
1062                      <h2>Cluster RAM Quota</h2>
1063                      <div class="sub_section cluster_quota_settings" id="js_cluster_quota_settings">
1064                      </div>
1065                    </div>
1066                    <h2 class="only-when-40">Index Settings</h2>
1067                    <div class="sub_section index_settings_section js_index_settings_section only-when-40">
1068                      <div class="row">
1069                        <label for="index_settings_thread">Indexer Threads:</label>
1070                        <input type="number" name="indexerThreads" id="index_settings_thread">
1071                        <a class="tooltip text_11 casper_settings_software_update_tooltip"><span>What's this?</span>
1072                          <span class="tooltip_msg text_11" style="width:310px;"><span>
1073                            Number of dedicated threads the indexer uses. On multi-core machines increasing this number will increase the indexer's CPU utilization. Defaults to 4.
1074                          </span></span>
1075                        </a>
1076                        <span class="error-container err-indexerThreads"></span>
1077                      </div>
1078                      <div class="row">
1079                        <label for="in_memory_snapshot">In Memory Snapshot Interval:</label>
1080                        <input type="number" name="memorySnapshotInterval" id="in_memory_snapshot">
1081                        <span>(ms)</span>
1082                        <a class="tooltip text_11 casper_settings_software_update_tooltip"><span>What's this?</span>
1083                          <span class="tooltip_msg text_11" style="width:310px;"><span>
1084                            Specifies the frequency of in-memory snapshots. This determines
1085                            the earliest possibility of a scan seeing a given KV mutation.
1086                          </span></span>
1087                        </a>
1088                        <span class="error-container err-memorySnapshotInterval"></span>
1089                      </div>
1090                      <div class="row">
1091                        <label for="in_memory_snapshot">Stable Snapshot Interval:</label>
1092                        <input type="number" name="stableSnapshotInterval" id="in_memory_snapshot">
1093                        <span>(ms)</span>
1094                        <a class="tooltip text_11 casper_settings_software_update_tooltip"><span>What's this?</span>
1095                          <span class="tooltip_msg text_11" style="width:310px;"><span>
1096                            Specifies the frequency of persisted snapshots for recovery.
1097                          </span></span>
1098                        </a>
1099                        <span class="error-container err-stableSnapshotInterval"></span>
1100                      </div>
1101                      <div class="row">
1102                        <label for="in_memory_snapshot">Max Rollback Points:</label>
1103                        <input type="number" name="maxRollbackPoints" id="in_memory_snapshot">
1104                        <a class="tooltip text_11 casper_settings_software_update_tooltip"><span>What's this?</span>
1105                          <span class="tooltip_msg text_11" style="width:310px;"><span>
1106                            The maximum number of committed rollback points.
1107                          </span></span>
1108                        </a>
1109                        <span class="error-container err-maxRollbackPoints"></span>
1110                      </div>
1111                      <div class="row">
1112                        <label for="indexer_log_level">Indexer Log Level:</label>
1113                        <select name="logLevel" id="indexer_log_level">
1114                          <option value="silent">Silent</option>
1115                          <option value="fatal">Fatal</option>
1116                          <option value="error">Error</option>
1117                          <option value="warn">Warn</option>
1118                          <option value="info">Info</option>
1119                          <option value="verbose">Verbose</option>
1120                          <option value="timing">Timing</option>
1121                          <option value="debug">Debug</option>
1122                          <option value="trace">Trace</option>
1123                        </select>
1124                        <span class="error-container err-logLevel"></span>
1125                      </div>
1126                    </div>
1127                    <div class="save_cancel when-roadmin-hide-me">
1128                      <button class="save_button float_right" type="submit">
1129                        Save
1130                      </button>
1131                    </div>
1132                  </form>
1133                </div>
1134                <div id="notifications_container" class="notifications-updates"><div class='spinner' style="height:350px;line-height:350px;width:100%"><span>Loading...</span></div></div>
1135                <div id="auto_failover_container" class="auto_failover"><div class='spinner' style="height:350px;line-height:350px;width:100%"><span>Loading...</span></div></div>
1136                <div id="email_alerts_container" class="email_alerts"><div class='spinner' style="height:350px;line-height:350px;width:100%"><span>Loading...</span></div></div>
1137                <div id="compaction_container"><form>
1138                  <div class="auto_compaction persistent-only">
1139                    <h2>Auto-Compaction</h2>
1140                    <div class="sub_section">
1141                      <p>Auto-Compaction settings trigger the compaction process. The process compacts databases and their respective view indexes when the following conditions are met.</p>
1142                    </div>
1143                    <h3>Database Fragmentation</h3>
1144                    <div class="sub_section" id="js_database_fragmentation_settings"></div>
1145                    <h3 class="only-when-40">Index Fragmentation</h3>
1146                    <div class="sub_section only-when-40" id="js_index_fragmentation_settings"></div>
1147                    <h3>View Fragmentation</h3>
1148                    <div class="sub_section" id="js_view_fragmentation_settings"></div>
1149                    <h3>Time Interval</h3>
1150                    <div class="sub_section">
1151                      <div class="row">
1152                        <input type="checkbox" id="f5962927-16af-4eb6-802c-86fe6c3a238d" class="check-for-allowedTimePeriod"/>
1153                        <label for="f5962927-16af-4eb6-802c-86fe6c3a238d">Set the time interval for when compaction is allowed to run</label>
1154                      </div>
1155                      <div class="row">
1156                        Start Time:
1157                        <input id="8a786bbb-e9df-46d4-8733-2993ae0c2b95" name="allowedTimePeriod[fromHour]" type="number" min="0" max="23" placeholder="HH" />:<input name="allowedTimePeriod[fromMinute]" type="number" min="0" max="59" placeholder="MM" />
1158                        End Time: <input name="allowedTimePeriod[toHour]" type="number" min="0" max="23" placeholder="HH" />:<input name="allowedTimePeriod[toMinute]" type="number" min="0" max="59" placeholder="MM" />
1159                        <div class="error-container err-allowedTimePeriod"></div>
1160                        <div class="error-container err-allowedTimePeriod-fromHour-"></div>
1161                        <div class="error-container err-allowedTimePeriod-fromMinute-"></div>
1162                        <div class="error-container err-allowedTimePeriod-toHour-"></div>
1163                        <div class="error-container err-allowedTimePeriod-toMinute-"></div>
1164                      </div>
1165                      <div class="row">
1166                        <input type="hidden" name="allowedTimePeriod[abortOutside]" value="false" />
1167                        <input id="302bc9f8-0a98-4963-85a4-5670ab8f1c25" type="checkbox" name="allowedTimePeriod[abortOutside]" value="true" />
1168                        <label for="302bc9f8-0a98-4963-85a4-5670ab8f1c25">Abort compaction if run time exceeds the set time interval</label>
1169                        <div class="error-container err-allowedTimePeriod-abortOutside-"></div>
1170                      </div>
1171                      <div class="row">
1172                        <input type="hidden" name="parallelDBAndViewCompaction" value="false" />
1173                        <input id="f6fb6488-c05a-4baa-88f7-27032da6600b" type="checkbox" name="parallelDBAndViewCompaction" value="true" />
1174                        <label for="f6fb6488-c05a-4baa-88f7-27032da6600b">Compact Bucket and Views Index in parallel</label>
1175                        <div class="error-container err-parallelDBAndViewCompaction"></div>
1176                      </div>
1177                    </div>
1178                    <h3>Metadata Purge Interval</h3>
1179                    <div class="sub_section">
1180                      <div class="row">
1181                        <label for="fc68aaf1-9519-4eeb-ba28-3daa042aae22">Set the frequency of metadata purge interval:</label>
1182                        <input id="fc68aaf1-9519-4eeb-ba28-3daa042aae22" name="purgeInterval" style="width: 2.5em;">
1183                        <span>Range 0.04 (1 H) - 60days</span>
1184                        <a class="text_11 tooltip"><span>What's this?</span>
1185                          <span class="tooltip_msg"><span>
1186                              Metadata Purge Interval. Allowed range is 0.04 - 60 where 0.04 = 1h, 0.5 = 12h. Set how frequently a node will purge metadata on deleted items. If set too high, may significantly delay the node from reclaiming disk space. If set too low, may cause data inconsistencies in XDCR or Views.
1187                          </span></span>
1188                        </a>
1189                        <div class="error-container err-purgeInterval" style="display: inline; padding-left: 0;"></div>
1190                      </div>
1191                    </div>
1192                  </div> <!-- .auto_compaction -->
1193                  <div class="save_cancel when-roadmin-hide-me">
1194                    <button class="save_button float_right" type="submit">
1195                      Save
1196                    </button>
1197                  </div>
1198                </form></div>
1199                <div id="js_ldap_setup_container" class="ldap_setup_container only-when-40 when-enterprise only-when_ldap_enabled">
1200                  <h2>LDAP Auth</h2>
1201                  <div class="sub_section">
1202                    <p>Integrate with a directory server such as Active Directory or LDAP using the LDAP protocol. Users in LDAP can be mapped to Full-Admin / Read-Only Admin in Couchbase.</p>
1203                  </div>
1204                  <div style="float:left;">
1205                    <h3>Setup</h3>
1206                    <form id="js_ldap_setup_form" autocomplete="off">
1207                      <div class="sub_section" style="margin-right:0;">
1208                        <label><span>Enable:</span><input type="checkbox" name="enabled" value="true" id="js_ldap_enabled"></label>
1209                        <label class="textarea_label"><span>Read-Only Admins:</span><textarea name="roAdmins"></textarea>
1210                          <a class="text_11 tooltip" style="vertical-align: top;"><span>What's this?</span>
1211                            <span class="tooltip_msg"><span>
1212                                UIDs must be in ASCII and must be new line separated.
1213                            </span></span>
1214                          </a></label>
1215                        <label class="textarea_label"><span>Full Admins:</span><textarea name="admins"></textarea>
1216                          <a class="text_11 tooltip" style="vertical-align: top;"><span>What's this?</span>
1217                            <span class="tooltip_msg"><span>
1218                                UIDs must be in ASCII and must be new line separated.
1219                            </span></span>
1220                          </a></label>
1221                        <label style="display: inline-block;"><span>Default:</span></label>
1222                        <span class="radio_set">
1223                          <label><input type="radio" value="roAdmins" name="deftype"><span>Read-only</span></label>
1224                          <label><input type="radio" value="admins" name="deftype"><span>Full Admin</span></label>
1225                          <label><input type="radio" value="none" name="deftype"><span>None</span></label>
1226                        </span>
1227                      </div>
1228                    </form>
1229                  </div>
1230                  <div style="overflow: hidden">
1231                    <h3>Test</h3>
1232                    <form id="js_ldap_validate_form" autocomplete="off">
1233                      <div class="sub_section">
1234                        <label><span>Username:</span><input type="text" name="user" autocomplete="off" style="width: 150px;"></label>
1235                        <label><span>Password:</span><input type="password" name="password" autocomplete="off" style="width: 150px;"></label>
1236                        <button class="edit_btn" id="js_ldap_validate_form_submit">Validate</button>
1237                        <p id="js_ldap_validate_form_result"></p>
1238                      </div>
1239                    </form>
1240                  </div>
1241                  <div class="save_cancel when-roadmin-hide-me">
1242                    <button class="save_button float_right" id="js_ldap_setup_form_submit">Save</button>
1243                  </div>
1244                </div>
1245                <div class="account_management_container when-roadmin-avoid-me">
1246                  <h2>Read-Only User</h2>
1247                  <div class="sub_section">
1248                    <p>This user will have read-only access and
1249                        cannot make any changes to the system. The user
1250                        can only view existing servers, buckets, views
1251                        and monitor stats.</p>
1252                  </div>
1253                  <form id="js_account_management_form" class="account_management_form" autocomplete="off">
1254                    <div class="sub_section">
1255                      <label>
1256                        <span>Username:</span><input type="text" name="username" maxlength="24" autocomplete="off">
1257                        <i class="errors js_error_username"></i>
1258                      </label>
1259                      <label>
1260                        <span>Password:</span><input type="password" name="password" autocomplete="off">
1261                        <i class="errors js_error_password"></i>
1262                      </label>
1263                      <label>
1264                        <span>Verify Password:</span><input type="password" name="verifyPassword" autocomplete="off">
1265                        <i class="errors js_error_verifyPassword casper_create_roadmin_with_errors"></i>
1266                      </label>
1267                    </div>
1268                    <div class="save_cancel when-roadmin-hide-me">
1269                        <button class="save_button float_right casper_settings_create_accaunt" type="submit">Create</button>
1270                    </div>
1271                  </form>
1272                  <div id="js_account_delete" class="account_delete sub_section">
1273                    <p id="js_user_created">User: <span class="js_roadmin_name" style="color:#222;"></span> created successfully.</p>
1274                    <p id="js_user_exists"><span class="js_roadmin_name" style="color:#222;"></span> is existing user</p>
1275                    <div>
1276                      <span class="list_button casper_settings_account_reset_popup" id="js_reset_acc_btn">
1277                        <span>Reset Read-Only user Password</span>
1278                      </span>
1279                      <span class="list_button casper_settings_account_delete_popup" id="js_delete_acc_btn">
1280                        <span>Delete Read-Only User</span>
1281                      </span>
1282                    </div>
1283                  </div>
1284                </div>
1285                <div class="audit_container when-enterprise only-when-40" id="js_audit_setup_container">
1286                  <h2>Audit Configuration</h2>
1287                  <p class="sub_section">Auditing keeps track of important admin events occurring in Couchbase. Keeping track and persisting these events is essential for any secured environment and provides evidence for suspicious/malicious activity in Couchbase.</p>
1288                  <form id="js_audit_setup_form">
1289                    <div class="sub_section" style="margin-right:0;">
1290                      <i class="err-_ error-container"></i>
1291                      <div class="row">
1292                        <label><span>Enable:</span><input type="checkbox" name="auditdEnabled" value="true" id="js_audit_enabled"></label>
1293                      </div>
1294                      <div class="row">
1295                        <label><span>Target log directory:</span><input name="logPath" class="archive_path_field" id="js_archive_path_field">
1296                        </label><i class="err-logPath error-container"></i>
1297                      </div>
1298                      <div class="row">
1299                        <label><span>Log rotation time interval:</span><input name="rotateInterval" type="number" id="js_rotate_interval" style="width:67px;"></label>
1300                        <select name="rotateIntervalUnit" style="width:75px;">
1301                          <option value="minutes">Minutes</option>
1302                          <option value="hours">Hours</option>
1303                          <option value="days">Days</option>
1304                        </select>
1305                        <i class="err-rotateInterval error-container"></i>
1306                      </div>
1307                    </div>
1308                    <div class="save_cancel when-roadmin-hide-me">
1309                      <button class="save_button float_right" id="js_audit_setup_form_submit">Save</button>
1310                    </div>
1311                  </form>
1312                </div>
1313                <div id="sample_buckets_container"><form id="sample_buckets_form">
1314                  <h2>Sample Buckets</h2>
1315                  <div class="sub_section">
1316                    <p id="sample_buckets_quota_warning" class="warning_message">
1317                      Your cluster does not have enough RAM quota available to create
1318                      the selected sample data buckets. Please free at least
1319                      <span id="sampleQuotaRequired"></span>MB of RAM Quota per node.
1320                    </p>
1321                    <p id="sample_buckets_rebalance_warning" class="warning_message">
1322                      Can not load samples during rebalance.
1323                    </p>
1324                    <p id="sample_buckets_maximum_warning" class="warning_message">
1325                      Maximum number of buckets has been reached. For optimal performance,
1326                      no more than
1327                      <span id="maxBucketCount"></span> buckets are allowed.
1328                    </p>
1329                    <p>Sample buckets contain example data and Couchbase views. You can provision one or more sample buckets to help you discover the power of Couchbase Server.</p>
1330                  </div>
1331                  <h3>Installed Samples</h3>
1332                  <div class="sub_section">
1333                    <ul id="installed_samples"></ul>
1334                  </div>
1335                  <h3>Available Samples</h3>
1336                  <div class="sub_section">
1337                    <ul id="available_samples" class="casper_settings_sample_warnign"></ul>
1338                  </div>
1339                  <div class="save_cancel when-roadmin-hide-me">
1340                  <button class="save_button float_right" type="submit"
1341                          id="sample_buckets_settings_btn">
1342                    Create
1343                  </button>
1344                 </div>
1345                </form></div>
1346              </div>
1347            </div>
1348          </div>
1349
1350          <script id="notifications_template" type="text/html">
1351            <h2>Update Notifications</h2>
1352            <div class="sub_section">
1353              <p>You are running version {%= h(version) %}.</p>
1354              {% if (enabled===true) { %}
1355                {% if (newVersion===undefined) { %}
1356                <p class="warning"><strong>Warning</strong> – There
1357                  was a problem with retreiving the update information.</p>
1358                {% } else if (newVersion===false) { %}
1359                <p>No updates available.</p>
1360                {% } else { %}
1361                <p>A new version ({%= h(newVersion) %}) is available:</p>
1362                <ul>
1363                  <li>
1364                    <a href="{%= h(links.release) %}">Release notes</a>
1365                  </li>
1366                  <li>
1367                    <a href="{%= h(links.download) %}">Download</a>
1368                    the new version
1369                  </li>
1370                </ul>
1371                  {% if (info!='') { %}
1372                  <p>{%= h(info) %}</p>
1373                  {% } %}
1374                {% } %}
1375              {% } %}
1376              <label class="for-enable-replicas">
1377                {% if (enabled===true) { %}
1378                <input type="checkbox" id="notification-updates" checked="checked">
1379                {% } else { %}
1380                <input type="checkbox" id="notification-updates">
1381                {% } %}
1382                <span>Enable software update notifications.</span>
1383                <a class="tooltip text_11 casper_settings_software_update_tooltip"><span>What's this?</span>
1384                  <span class="tooltip_msg text_11" style="width:310px;"><span>
1385                    Enabling software update notifications allows notification in
1386                    the Couchbase web console when a new version of Couchbase Server
1387                    is available. Configuration information transferred in the
1388                    update check is anonymous and does not include any stored
1389                    key-value data.
1390                  </span></span>
1391                </a>
1392              </label>
1393            </div>
1394            <div class="save_cancel when-roadmin-hide-me">
1395              <button class="save_button float_right" type="button"
1396                      disabled="disabled">
1397                Save
1398              </button>
1399            </div>
1400          </script>
1401          <script id="auto_failover_template" type="text/html">
1402            <h2>Auto-Failover</h2>
1403            <div class="sub_section">
1404              <label class="for-enable-replicas casper_settings_auto_failover_enabled"
1405                     for="auto_failover_enabled">
1406                <input type="checkbox" id="auto_failover_enabled">
1407                <span>Enable auto-failover</span>
1408              </label>
1409              <p>
1410                <label for="auto_failover_timeout">
1411                  <span>Timeout: </span>
1412                </label>
1413                <input type="text" id="auto_failover_timeout" value="{%= timeout %}" disabled="disabled" />
1414                <span class="error-container err-timeout"></span>
1415                <a class="text_11 tooltip casper_settings_auto_failover_timeout_tooltip"><span>What's this?</span>
1416                  <span class="tooltip_msg"><span>
1417                      How long (in seconds) a node must be considered down before it gets auto-failed-over.
1418                  </span></span>
1419                </a>
1420              </p>
1421              {% if (count > 0) { %}
1422              <div class="count_reset">
1423                A server was automatically failed over
1424                <a class="auto_failover_count_reset edit_btn when-roadmin-hide-me">
1425                  <span>Reset Quota</span>
1426                </a>
1427              </div>
1428              {% } %}
1429            </div>
1430            <div class="save_cancel when-roadmin-hide-me">
1431              <button class="save_button float_right" type="button"
1432                      disabled="disabled">
1433                Save
1434              </button>
1435            </div>
1436          </script>
1437          <script id="email_alerts_template" type="text/html">
1438            <h2>Email Alerts</h2>
1439            <div class="sub_section">
1440              <label class="for-enable-replicas">
1441                <input type="checkbox" id="email_alerts_enabled" class="casper_settings_alerts_errors">
1442                <span>Enable email alerts</span>
1443              </label>
1444            </div>
1445            <h3>Email Server Settings</h3>
1446            <div class="sub_section fields">
1447              <div class="row">
1448                <label for="email_alerts_host">Host:</label>
1449                <input type="text" id="email_alerts_host" value="{%= h(emailServer.host) %}" disabled="disabled">
1450                <label for="email_alerts_port" style="text-align: right;">Port:</label>
1451                <input type="text" id="email_alerts_port" value="{%= h(emailServer.port) %}" disabled="disabled">
1452                <div class="error-container err-email_port"></div>
1453              </div>
1454              <div class="row">
1455                <label for="email_alerts_user">Username:</label>
1456                <input type="text" id="email_alerts_user" value="{%= h(emailServer.user) %}" disabled="disabled">
1457              </div>
1458              <div class="row">
1459                <label for="email_alerts_pass">Password:</label>
1460                <input type="password" style="width: 150px;" id="email_alerts_pass" value="{%= h(emailServer.pass) %}" disabled="disabled">
1461              </div>
1462              <div class="row">
1463                <label for="email_alerts_encrypt">Require TLS:</label>
1464                <input type="checkbox" id="email_alerts_encrypt"
1465                       {% if (emailServer.encrypt) { %}
1466                       checked="checked"
1467                       {% } %}
1468                      >
1469              </div>
1470            </div>
1471            <h3>Email Settings</h3>
1472            <div class="sub_section fields">
1473              <div class="row">
1474                <label for="email_alerts_sender">Sender email:</label>
1475                <input type="text" id="email_alerts_sender" value="{%= h(sender) %}" disabled="disabled">
1476                <div class="error-container err-sender"></div>
1477              </div>
1478              <div class="row">
1479                <label for="email_alerts_sender" style="vertical-align:top;">Recipients:</label>
1480                <textarea id="email_alerts_recipients" disabled="disabled">{%= h(recipients) %}</textarea>
1481                <span style="vertical-align:top;margin:0 5px;line-height:24px">separate addresses with comma "," or spaces " "</span>
1482                <div class="error-container err-recipients"></div>
1483                <div class="when-roadmin-avoid-me"><button class="edit_btn" id="test_email">Test Mail</button> <span>using the settings above</span></div>
1484              </div>
1485            </div>
1486            <h3>Available Alerts</h3>
1487            <div class="sub_section checkboxes" id="email_alerts_alerts">
1488              {% for (var i=0; i<alerts.length; i++) { %}
1489              <label for="email_alerts_alerts_{%= h(alerts[i].label) %}">
1490                <input type="checkbox"
1491                       id="email_alerts_alerts_{%= h(alerts[i].value) %}"
1492                       value="{%= h(alerts[i].value) %}"
1493                       {% if (alerts[i].enabled) { %}
1494                       checked="checked"
1495                       {% } %}
1496                       />
1497                <span>{%= h(alerts[i].label) %}</span>
1498              </label>
1499              {% } %}
1500            </div>
1501            <div class="save_cancel when-roadmin-hide-me">
1502              <button class="save_button float_right" type="button"
1503                      disabled="disabled">
1504                Save
1505              </button>
1506            </div>
1507          </script>
1508        </div>
1509
1510        <div id="js_views" class="views" style="display:none">
1511          <div class="only-when-non-kv-node">
1512            Views are not supported on this server node as it does not have a Data service. You may access views functionality on any Data service node in the cluster, such as: <a id="js_healthy_kv_node_link" target="_blank"></a>
1513          </div>
1514          <div class="only-when-kv-node">
1515          <h1 style="clear:both;overflow:hidden">
1516            <span style="float:left"><select id="views_bucket_select"></select> &gt; <a href="#visitSec=views">Views</a>
1517              <span class="when-inside-view">
1518                &gt; <select id="views_view_select"></select>
1519              </span>
1520            </span>
1521          </h1>
1522          <div class="shadow_box" id="views_list">
1523            <div class="header_2">
1524              <ul class="tabs switcher">
1525                <li class="tab_left">
1526                  <a>Development Views</a>
1527                </li>
1528                <li class="tab_right">
1529                  <a class="casper_views_prod_tab">Production Views</a>
1530                  <span class="badge notify"><span id="prod_view_count">??</span></span>
1531                </li>
1532              </ul>
1533              <div class="create_view">
1534                <a class="btn_1 btn_create when-in-dev when-roadmin-hide-me casper_views_create_view_popup" style="float: right"><span>Create Development View</span></a>
1535                <a class="btn_1 btn_create_spatial when-in-dev when-roadmin-hide-me casper_views_create_view_popup" style="float: right; margin-right: 5px;"><span>Create Development Spatial View</span></a>
1536                <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
1537              </div>
1538            </div>
1539            <div class="panes">
1540              <div>
1541                <div id="development_views_list_container" class="views_list"></div>
1542              </div>
1543              <div>
1544                <div id="production_views_list_container" class="views_list"></div>
1545              </div>
1546            </div>
1547          </div>
1548
1549          <script id="views_list_template" type="text/html">
1550            <table class="list">
1551            <thead>
1552              <tr>
1553                <th>Name</th>
1554                <th>Language</th>
1555                <th>Status</th>
1556                <th><div style="display:none">Disk Size</div></th>
1557                <th colspan=2 class="last"></th>
1558              </tr>
1559            </thead>
1560            <tbody>
1561            <!-- {% if (loading) { %} -->
1562            <tr>
1563                <td colspan="6" class='spinner' style="height:400px"><span>Loading...</span></td>
1564            </tr>
1565            <!-- {% } else { %} -->
1566            <!-- {% if (!bucketName) { %} -->
1567              <tr>
1568                <td colspan="6" class="empty">
1569                  <span>
1570                    No buckets currently defined! Go to
1571                    <a href="#sec=buckets">Data Buckets</a>
1572                    to create some.
1573                  </span>
1574                </td>
1575              </tr>
1576            <!-- {% } else if (rows.ddocsAreInFactMissing) { %} -->
1577              <tr><td colspan="6" class="empty">
1578                <span style="line-height:23px">This node doesn't host current bucket yet, so for list of design docs, please, visit different node's UI</span>
1579              </td></tr>
1580            <!-- {% } else if (!rows.length) { %} -->
1581              <tr><td colspan="6" class="empty">
1582                <span class="when-in-dev" style="line-height:23px">There are currently no Design Documents in Development. <span class="when-roadmin-avoid-me">Click "Create Development View" above to create one.</span></span>
1583                <span class="when-in-prod" style="line-height:23px">There are no Design Documents currently published. <span class="when-roadmin-avoid-me">Please visit "Development Views" to create one.</span></span>
1584              </td></tr>
1585            <!-- {% } else { %} -->
1586            <!-- {% _.each(rows, function (ddoc) {  %} -->
1587              <tr>
1588                <td class="design_doc_name ellipsis">
1589                  {%= h(ddoc.meta.id) %}
1590                </td>
1591                <td class="langv">{%= h(ddoc.language || "javascript") %}</td>
1592                <td>
1593                  <!-- {% if (ddoc.progress) {  %} -->
1594                  <div class="indexer_progress">
1595                    <div class="usage_smallest">
1596                      <div class="used" style="width: {%= h(ddoc.progress) %}%"></div>
1597                    </div>
1598                    <span class="ddoc_message">{%= (ddoc.taskType == 'indexer') ? "Indexing" : "Compacting" %} {%= h(ddoc.progress) %}%</span>
1599                  </div>
1600                  <!-- {% } %} -->
1601                </td>
1602                <td colspan="3" class="when-roadmin-hide-me">
1603                  <a class="list_button when-in-prod casper_views_copy_to_dev" href="#copyDDoc={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Copy to Dev</span></a>
1604                  <!--{% if (!(ddoc.json.spatial && ddoc.json.views && !_.isEmpty(ddoc.json.spatial) && !_.isEmpty(ddoc.json.views))) { %}-->
1605                  <a class="list_button when-in-dev {%= ddoc.isEmpty ? 'dynamic_disabled' : ''%}" href="#publishDDoc={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Publish</span></a>
1606                  <!-- {% } %} -->
1607                  <!--{% if (ddoc.json.views && !_.isEmpty(ddoc.json.views) &&  (!ddoc.json.spatial || _.isEmpty(ddoc.json.spatial)) ) { %}-->
1608                  <a class="list_button when-in-dev casper_views_add_view_popup" href="#addView={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Add View</span></a>
1609                  <!-- {% } %} -->
1610                  <!--{% if (ddoc.json.spatial && !_.isEmpty(ddoc.json.spatial) &&  (!ddoc.json.views || _.isEmpty(ddoc.json.views)) ) { %}-->
1611                    <a class="list_button when-in-dev casper_views_add_spatial_popup" href="#addSpatial={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Add Spatial View</span></a>
1612                  <!-- {% } %} -->
1613                  <!--{% if (!ddoc.json.spatial && !ddoc.json.views || _.isEmpty(ddoc.json.spatial) && _.isEmpty(ddoc.json.views)) { %}-->
1614                    <a class="list_button when-in-dev casper_views_add_view_popup" href="#addView={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Add View</span></a>
1615                    <a class="list_button when-in-dev casper_views_add_spatial_popup" href="#addSpatial={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Add Spatial View</span></a>
1616                  <!-- {% } %} -->
1617                  <a class="list_button casper_views_delete_popup" href="#deleteDDoc={%=h(encodeURIComponent(ddoc.meta.id))%}"><span>Delete</span></a>
1618                  <button class="list_button {%= ViewsSection.maybeDisabledCompactButtonAttr(ddoc)%} {%= ddoc.isEmpty ? 'dynamic_disabled' : ''%}" onclick="ViewsSection.compactDDoc({%= h(JSON.stringify(ddoc.meta.id)) %}, this);"><span>Compact</span></button>
1619                  <!--{% if (ddoc.json.spatial && ddoc.json.views && !_.isEmpty(ddoc.json.spatial) && !_.isEmpty(ddoc.json.views)) { %}-->
1620                    <div class="warning" style="overflow: hidden; margin-top:4px;">No new views can be added to this document. Delete either mapreduce or spatial views first.</div>
1621                  <!-- {% } %} -->
1622                </td>
1623              </tr>
1624              <!-- {% if (_.size(ddoc.json.viewInfos) < 1 && _.size(ddoc.json.spatialInfos) < 1) { %} -->
1625              <tr><td colspan="5" style="padding:15px;line-height:23px;">No views defined!<span class="when-in-dev"> Click "Create Development View" above to create one.</span></td></tr>
1626              <!-- {% } else { if (_.size(ddoc.json.viewInfos) > 0) { %} -->
1627              <!-- {% _.each(ddoc.json.viewInfos, function (viewInfo) { %} -->
1628              <tr>
1629                <td class="view_name ellipsis" colspan="5">
1630                  <a class="casper_views_view_tab" style="display:block;line-height:33px;" href="{%=h(viewInfo.viewLink)%}">{%= h(viewInfo.name) %}</a>
1631                </td>
1632                <td>
1633                  <a class="list_button btn_remove when-roadmin-avoid-me" href="{%=h(viewInfo.removeLink)%}"><span>Delete</span></a>
1634                  <a class="list_button btn_edit" href="{%=h(viewInfo.viewLink)%}"><span>{%= ddoc.canEditDoc ? 'Edit' : 'Show' %}</span></a>
1635                </td>
1636              </tr>
1637              <!-- {% }); %} -->
1638              <!-- {% } if (_.size(ddoc.json.spatialInfos) > 0) { %} -->
1639              <!-- {% _.each(ddoc.json.spatialInfos, function (spatialInfo) { %} -->
1640              <tr>
1641                <td class="view_name ellipsis" colspan="5">
1642                  <a href="{%=h(spatialInfo.viewLink)%}">[Spatial] {%= h(spatialInfo.name) %}</a>
1643                </td>
1644                <td>
1645                  <a class="list_button btn_remove when-roadmin-avoid-me" href="{%=h(spatialInfo.removeLink)%}"><span>Delete</span></a>
1646                  <a class="list_button btn_edit" href="{%=h(spatialInfo.viewLink)%}"><span>{%= ddoc.canEditDoc ? 'Edit' : 'Show' %}</span></a>
1647                </td>
1648              </tr>
1649              <!-- {% }); %} -->
1650              <!-- {% } } %} -->
1651            <!-- {% }); %} -->
1652            <!-- {% } %} -->
1653          <!-- {% } %} -->
1654            </tbody>
1655            </table>
1656          </script>
1657
1658          <div id="view_details" style="display:none;">
1659            <div id="no_sample_docs" class="shadow_box when-roadmin-avoid-me" style="display:none">
1660              <h3 class="block-expander js_block-expander" style="padding:15px">Bucket is currently empty.</h3>
1661            </div>
1662            <div id="sample_docs" class="shadow_box darker_block js_darker_block when-roadmin-avoid-me">
1663               <h3 class="block-expander js_block-expander"><ins></ins><span class="view_head docs_title" style="text-transform:none;">SAMPLE DOCUMENT</span>
1664                <span class="buttons">
1665                  <a class="btn_1" id="preview_random_doc">
1666                    <span>Preview a Random Document</span>
1667                  </a>
1668                  <a class="btn_1" id="edit_sample_doc" href="#">
1669                    <span>Edit Document</span>
1670                  </a>
1671                </span>
1672                <span class="ellipsis documents_notice" style="display: block;"></span>
1673               </h3>
1674              <div id="sample_documents_container" class="sample_documents stats"></div>
1675            </div>
1676
1677            <script id="sample_documents_template" type="text/html">
1678            <!-- {% if (loading) { %} -->
1679              <div class="spinner" style="height:100px;line-height:100px;"><span>loading...</span></div>
1680            <!-- {% } else { %} -->
1681              <!-- {% if (data) { %} -->
1682                <pre class="json">{%= $.futon.formatJSON(data.json, {html:true}) %}</pre>
1683                <pre class="meta">{%= $.futon.formatJSON(data.meta, {html:true}) %}</pre>
1684              <!-- {% } else { %} -->
1685                <pre style="text-align:center;">A document with that ID does not exist</pre>
1686              <!-- {% } %} -->
1687            <!-- {% } %} -->
1688            </script>
1689
1690            <div class="shadow_box viewcode" id="viewcode" style="display:none;">
1691              <div class="darker_block js_darker_block">
1692                <h3 class="js_block-expander block-expander"><ins></ins><span class="view_head">View Code</span>
1693                  <span class="buttons when-roadmin-hide-me">
1694                    <a id="save_view_as" class="btn_1 casper_views_save_view_as_popup"><span>Save As...</span></a>
1695                    <a id="just_save_view" class="btn_1"><span>Save</span></a>
1696                  </span>
1697                  <span id="view_code_errors" class="ellipsis" style="display: block;"></span>
1698                </h3>
1699                <div class="stats">
1700                  <table class="list"><tbody><tr>
1701                    <td class="code map" style="width: 654px;">
1702                      <label for="viewcode_map">Map</label>
1703                      <textarea spellcheck="false" cols="20" rows="11" class="map" id="viewcode_map"></textarea>
1704                    </td>
1705                    <td class="splitter grippie"></td>
1706                    <td class="code reduce">
1707                      <label for="viewcode_reduce">Reduce<span class="when-in-dev"> (<span id="built_in_reducers">built in: <a>_count</a>, <a>_sum</a>, <a>_stats</a></span>)</span></label>
1708                      <textarea placeholder="(optional)" spellcheck="false" cols="20" rows="11" class="reduce" id="viewcode_reduce"></textarea>
1709                    </td>
1710                  </tr></tbody></table>
1711                </div>
1712              </div>
1713            </div>
1714
1715            <div class="shadow_box viewcode" id="spatialcode" style="display:none;">
1716              <div class="darker_block js_darker_block">
1717                <h3 class="js_block-expander block-expander"><ins></ins><span class="view_head">Spatial Code</span>
1718                  <span class="buttons">
1719                    <a id="save_spatial_as" class="btn_1"><span>Save As...</span></a>
1720                    <a id="just_save_spatial" class="btn_1"><span>Save</span></a>
1721                  </span>
1722                  <span id="spatial_code_errors" class="ellipsis" style="display: block;"></span>
1723                </h3>
1724                <div class="stats">
1725                  <table class="list"><tbody><tr>
1726                    <td class="code map" style="width: 654px;">
1727                      <label for="spatialcode_fun">Spatial</label>
1728                      <textarea spellcheck="false" cols="20" rows="11" class="map" id="spatialcode_fun"></textarea>
1729                    </td>
1730                  </tr></tbody></table>
1731                </div>
1732              </div>
1733            </div>
1734
1735            <script id="filter_template" type="text/html">
1736               <h2>{%= h(title) %}</h2>
1737              <div class="filters_container">
1738                <div class="filters_btn"></div>
1739                <div class="filters_popup">
1740                <form>
1741                  <div class="key">
1742                      <!--{% if (items.conflict) {%}--><div>
1743                        <label for="{%= prefix %}_filter_conflicts">conflicts</label>
1744                        <input id="{%= prefix %}_filter_conflicts" name="conflicts" type="checkbox">
1745                      </div><!--{% }%}-->
1746                      <!--{% if (items.bbox) {%}--><div>
1747                        <label for="{%= prefix %}_filter_bbox">bbox</label>
1748                        <input id="{%= prefix %}_filter_bbox" name="bbox" type="text">
1749                      </div><!--{% }%}-->
1750                      <!--{% if (items.startRange) {%}--><div>
1751                        <label for="{%= prefix %}_filter_start_range">start_range</label>
1752                        <input id="{%= prefix %}_filter_start_range" name="start_range" type="text">
1753                      </div><!--{% }%}-->
1754                      <!--{% if (items.endRange) {%}--><div>
1755                        <label for="{%= prefix %}_filter_end_range">end_range</label>
1756                        <input id="{%= prefix %}_filter_end_range" name="end_range" type="text">
1757                      </div><!--{% }%}-->
1758                      <!--{% if (items.descending) {%}--><div>
1759                        <label for="{%= prefix %}_filter_descending">descending</label>
1760                        <input id="{%= prefix %}_filter_descending" name="descending" type="checkbox">
1761                      </div><!--{% }%}-->
1762                      <!--{% if (items.startkey) {%}--><div>
1763                        <label for="{%= prefix %}_filter_startkey">startkey</label>
1764                        <input id="{%= prefix %}_filter_startkey" name="startkey" type="text">
1765                      </div><!--{% }%}-->
1766                      <!--{% if (items.endkey) {%}--><div>
1767                        <label for="{%= prefix %}_filter_endkey">endkey</label>
1768                        <input id="{%= prefix %}_filter_endkey" name="endkey" type="text">
1769                      </div><!--{% }%}-->
1770                      <!--{% if (items.startkeyDocid) {%}--><div>
1771                        <label for="{%= prefix %}_filter_startkey_docid">startkey_docid</label>
1772                        <input id="{%= prefix %}_filter_startkey_docid" name="startkey_docid" type="text">
1773                      </div><!--{% }%}-->
1774                      <!--{% if (items.endkeyDocid) {%}--><div>
1775                        <label for="{%= prefix %}_filter_endkey_docid">endkey_docid</label>
1776                        <input id="{%= prefix %}_filter_endkey_docid" name="endkey_docid" type="text">
1777                      </div><!--{% }%}-->
1778                      <!--{% if (items.group) {%}--><div>
1779                        <label for="{%= prefix %}_filter_group">group</label>
1780                        <input id="{%= prefix %}_filter_group" name="group" type="checkbox">
1781                      </div><!--{% }%}-->
1782                      <!--{% if (items.groupLevel) {%}--><div>
1783                        <label for="{%= prefix %}_filter_group_level">group_level</label>
1784                        <input id="{%= prefix %}_filter_group_level" name="group_level" type="text">
1785                      </div><!--{% }%}-->
1786                      <!--{% if (items.inclusiveEnd) {%}--><div>
1787                        <label for="{%= prefix %}_filter_inclusive_end">inclusive_end</label>
1788                        <input id="{%= prefix %}_filter_inclusive_end" name="inclusive_end" type="checkbox" data-send-false="true">
1789                      </div><!--{% }%}-->
1790                      <!--{% if (items.key) {%}--><div>
1791                        <label for="{%= prefix %}_filter_key">key</label>
1792                        <input id="{%= prefix %}_filter_key" name="key" type="text">
1793                      </div><!--{% }%}-->
1794                      <!--{% if (items.keys) {%}--><div>
1795                        <label for="{%= prefix %}_filter_keys">keys</label>
1796                        <input id="{%= prefix %}_filter_keys" name="keys" type="text">
1797                      </div><!--{% }%}-->
1798                      <!--{% if (items.reduce) {%}--><div>
1799                        <label for="{%= prefix %}_filter_reduce">reduce</label>
1800                        <div style="display: inline-block">
1801                          <select id="{%= prefix %}_filter_reduce" name="reduce" class="selectBox" multiple="multiple">
1802                            <option value="true">true</option>
1803                            <option value="false">false</option>
1804                            <option value="none" selected="selected">none</option>
1805                          </select>
1806                        </div>
1807                      </div><!--{% }%}-->
1808                      <!--{% if (items.stale) {%}--><div>
1809                        <label for="{%= prefix %}_filter_stale">stale</label>
1810                          <div style="display: inline-block">
1811                            <select id="{%= prefix %}_filter_stale" name="stale" class="selectBox" multiple="multiple">
1812                              <option value="false" selected="selected">false</option>
1813                              <option value="update_after">update_after</option>
1814                              <option value="ok">ok</option>
1815                            </select>
1816                          </div>
1817                        </div><!--{% }%}-->
1818                      <!--{% if (items.connectionTimeout) {%}--><div>
1819                        <label for="{%= prefix %}_filter_connection_timeout">connection_timeout</label>
1820                        <input id="{%= prefix %}_filter_connection_timeout" name="connection_timeout" type="text" placeholder="milliseconds">
1821                      </div><!--{% }%}-->
1822                    </div>
1823                    <div class="btn_wrap">
1824                      <button type="submit" class="list_button"><span>Close</span></button>
1825                      <button type="reset" class="list_button"><span>Reset</span></button>
1826                    </div>
1827                </div>
1828                <form>
1829              </div>
1830              <a href="#" target="_blank" class="filters_url"></a>
1831
1832            </script>
1833
1834            <div id="view_results_block" class="results_block" style="display:none;">
1835              <div id="view_filter_container" class="filter_container"></div>
1836              <a id="view_run_button" class="run_button btn_1 bt_marg"><span>Show Results</span></a>
1837              <span class="ic_prev_next">
1838                <a class="arr_prev"></a>
1839                <a class="arr_next"></a>
1840              </span> <!--/ic_prev_next-->
1841              <div class="clr"></div>
1842              <!--/filter result-->
1843              <div class="shadow_box">
1844                <ul class="tabs dev-subset-switcher when-in-dev">
1845                  <li class="tab_left"><a class="subset_dev">Development Time Subset</a></li>
1846                  <li class="tab_right"><a class="subset_prod">Full Cluster Data Set</a></li>
1847                </ul>
1848                <div id="view_results_spinner" class="spinner" style="height:100px;line-height:100px;display:none;"><span>Loading...</span></div>
1849                <div id="view_results_container" class="content c_result"></div>
1850              </div>
1851              <script id="view_results_template" type="text/html">
1852              <table class="list align_text" style="width:100%">
1853                <!-- {% if (errors) { %} -->
1854                  <tr>
1855                      <th class="keycol">Errors</th>
1856                      <th></th>
1857                  </tr>
1858                  <tbody class="list_errors">
1859                  <!-- {% _.each(errors, function (r) { %} -->
1860                    <tr>
1861                        <td {%= !r.showBtn ? 'colspan="2"' : "" %}>
1862                          <div><span class="label">from:</span> <span>{%= r.from %}</span></div>
1863                          <div><span class="label">reason:</span> <span>{%= r.reason %} {%= r.explain ? "(" + r.explain + ")" : "" %}</span></div>
1864                        </td>
1865                        <!-- {% if (r.showBtn) { %} -->
1866                        <td>
1867                          <a class="list_button buttontn_remove" onclick="ViewsSection.viewResultsURLCell.runView();"><span>
1868                            Run Query Again
1869                          </span></a>
1870                        </td>
1871                        <!-- {% } %} -->
1872                    </tr>
1873                  <!-- {% }); %} -->
1874                  </tbody>
1875                <!-- {% } %} -->
1876                <!-- {% if (!errors || rows.length) { %} -->
1877                <tr>
1878                    <th class="keycol">Key</th>
1879                    <th>Value</th>
1880                </tr>
1881                <!-- {% } %} -->
1882              <!-- {% if (!rows.lackOfValue) { %} -->
1883                <!-- {% if (rows.length) { %}
1884                <!-- {% _.each(rows, function (r) { %} -->
1885                  <tbody>
1886                  <tr>
1887                      <td class="keycol">
1888                          <div class="key ellipsis" title="{%= h(JSON.stringify(r.key)) %}">{%= h(JSON.stringify(r.key)) %}</div>
1889                          {% if (h(r.id) !== "undefined") { %}
1890                            <a class="id ellipsis sample-document-link" data-sample-doc-id="{%= h(r.id) %}" href="#">{%= h(r.id) %}</a>
1891                          {% } else { %}
1892                            <div class="id ellipsis">{%= h(r.id) %}</div>
1893                          {% } %}
1894                      </td>
1895                      <td class="ellipsis">{%= $.futon.formatJSON(r.value, {html:true}) %}</td>
1896                  </tr>
1897                  </tbody>
1898                <!-- {% }); %} -->
1899                <!-- {% } else { %} -->
1900                  <!--{% if (!errors) { %} -->
1901                    <tr>
1902                        <td colspan="2" style="text-align:center">The results of this view is empty.</td>
1903                    </tr>
1904                  <!-- {% } %} -->
1905                <!-- {% } %} -->
1906              <!-- {% } else { %} -->
1907                <tbody>
1908                <tr><td colspan="2" style="text-align:center">To see the results of this view, click "Show Results" above.</td></tr>
1909                </tbody>
1910              <!-- {% } %} -->
1911              </table>
1912                </script>
1913            </div>
1914
1915            <div id="spatial_results_block" class="results_block" style="display:none;">
1916              <div id="spatial_filter_container" class="filter_container"></div>
1917              <a id="spatial_run_button" class="run_button btn_1 bt_marg"><span>Show Results</span></a>
1918              <span class="ic_prev_next">
1919                <a class="arr_prev"></a>
1920                <a class="arr_next"></a>
1921              </span> <!--/ic_prev_next-->
1922              <div class="clr"></div>
1923              <!--/filter result-->
1924              <div class="shadow_box">
1925                <ul class="tabs dev-subset-switcher when-in-dev">
1926                  <li class="tab_left"><a class="subset_dev">Development Time Subset</a></li>
1927                  <li class="tab_right"><a class="subset_prod">Full Cluster Data Set</a></li>
1928                </ul>
1929                <div id="spatial_results_spinner" class="spinner" style="height:100px;line-height:100px;display:none;"><span>Loading...</span></div>
1930                <div id="spatial_results_container" class="content c_result"></div>
1931              </div>
1932              <script id="spatial_results_template" type="text/html">
1933              <table class="list align_text" style="width:100%">
1934                <tr>
1935                    <th class="keycol">Key</th>
1936                    <th class="keycol">Geometry</th>
1937                    <th>Value</th>
1938                </tr>
1939              <!-- {% if (!rows.lackOfValue) { %} -->
1940                <!-- {% _.each(rows, function (r) { %} -->
1941                <tbody>
1942                <tr>
1943                    <td class="keycol">
1944                        <div class="key">{%= h(JSON.stringify(r.key)) %}</div>
1945                        {% if (h(r.id) !== "undefined") { %}
1946                          <a class="id ellipsis sample-document-link" data-sample-doc-id="{%= h(r.id) %}" href="#">{%= h(r.id) %}</a>
1947                        {% } else { %}
1948                          <div class="id ellipsis">{%= h(r.id) %}</div>
1949                        {% } %}
1950                    </td>
1951                    <td>{%= h(JSON.stringify(r.geometry)) %}</td>
1952                    <td>{%= $.futon.formatJSON(r.value, {html:true}) %}</td>
1953                </tr>
1954                </tbody>
1955                <!-- {% }); %} -->
1956              <!-- {% } else { %} -->
1957                <tbody>
1958                <tr><td colspan="3" style="text-align:center">To see the results of this view, click "Show Results" above.</td></tr>
1959                </tbody>
1960              <!-- {% } %} -->
1961              </table>
1962                </script>
1963            </div>
1964
1965          </div>
1966        </div>
1967        </div>
1968
1969        <script id="js_indexes_list_template" type="text/html">
1970          <table class="list align_text" style="width:100%">
1971            <thead>
1972              <tr>
1973                <th data-sortby="bucket" style="width: 200px;">Bucket</th>
1974                <th data-sortby="hosts" style="width: 350px;">Node</th>
1975                <th data-sortby="index" style="width: 200px;">Index Name</th>
1976                <th data-sortby="status">Status</th>
1977                <th data-sortby="progress" style="width: 150px;">Initial Build Progress</th>
1978              </tr>
1979            </thead>
1980            <tbody>
1981              {% if (rows.length) { %}
1982                {% _.each(rows, function (row) { %}
1983                  <tr class="row">
1984                    <td class="ellipsis with_expander_button" title="{%= h(row.bucket) %}">
1985                      <a href="#openIndex={%= h(row.id) %}"><ins class="expander closed"></ins></a>
1986                      <span>{%= h(row.bucket) %}</span>
1987                    </td>
1988                    <td class="ellipsis" title="{%= h(row.hosts[0]) %}">{%= h(row.hosts[0]) %}</td>
1989                    <td class="ellipsis" title="{%= h(row.index) %}">{%= h(row.index) %}</td>
1990                    <td class="ellipsis" title="{%= h(row.status) %}">{%= h(row.status) %}</td>
1991                    <td class="ellipsis" title="{%= h(row.progress) %}">
1992                      {%= (row.progress !== undefined) ? h(row.progress + "%") : "" %}
1993                    </td>
1994                  </tr>
1995                  <tr>
1996                    <td colspan="5" class="details-placeholder" style="display:none;">
1997                      {%= IndexesSection.renderIndexDetails(row) %}
1998                    </td>
1999                  </tr>
2000                {% }); %}
2001              {% } else { %}
2002                <tr><td colspan="5" style="text-align: center;">There are no indexes currently.</td></tr>
2003              {% } %}
2004            </tbody>
2005          </table>
2006        </script>
2007        <script id="index_details_template" type="text/html">
2008          <div class="gong_rb">
2009          <table class="properties_table">
2010            <tbody>
2011              <tr>
2012                  <td>Definition: <span>{%= definition %}</span></td>
2013              </tr>
2014            </tbody>
2015          </table>
2016          </div>
2017        </script>
2018
2019        <script id="js_index_warnings_template" type="text/html">
2020          {% _.each(warnings, function (message) { %}
2021            <div class="warning_message">
2022              Warning: {%= h(message) %}
2023            </div>
2024          {% }); %}
2025        </script>
2026
2027        <div id="js_indexes" class="indexes" style="display:none">
2028          <div id="js_index_warnings_container"></div>
2029          <div class="shadow_box">
2030            <div class="header_2">
2031              <h4 style="float:left;line-height:34px;">Indexes</h4>
2032              <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
2033            </div>
2034            <div>
2035              <div id="js_indexes_list_container" class="servers_list indexes_list_container"></div>
2036            </div>
2037          </div>
2038        </div>
2039
2040        <div id="js_replications" class="replications" style="display:none">
2041          <h1>Replications</h1>
2042          <!-- Clusters -->
2043          <div id="cluster_references" class="shadow_box">
2044            <div class="darker_block js_darker_block" style="font-size:13px;">
2045              <h3 class="js_block-expander block-expander">
2046                <ins></ins><span class="view_head">Remote Clusters</span>
2047                <span class="buttons">
2048                  <a class="btn_1 when-roadmin-hide-me" id="create_cluster_reference">
2049                    <span>Create Cluster Reference</span>
2050                  </a>
2051                </span>
2052              </h3>
2053
2054              <div class="stats" id="cluster_reference_list_container">
2055              </div>
2056              <script id="cluster_reference_list_template" type="text/html">
2057              <table class="list casper_remout_cluster_container" style="width:100%">
2058                <tr>
2059                  <th>Name</th>
2060                  <th>IP/hostname</th>
2061                  <th></th>
2062                </tr>
2063                <!-- {% if (rows.length > 0) { %} -->
2064                <!-- {% _.each(rows, function (r) { %} -->
2065                <tr data-name="{%= h(r.name) %}">
2066                  <td>{%= h(r.name) %}</td>
2067                  <td><a href="{%= window.location.protocol +'//'+ h(r.hostname) + '/index.html#sec=analytics&amp;statsHostname=' + h(encodeURIComponent(r.hostname)) %}" target="blank">{%= h(r.hostname) %}</a></td>
2068                  <td>
2069                    <a class="list_button delete-button when-roadmin-avoid-me"><span>Delete</span></a>
2070                    <a class="list_button edit-button when-roadmin-avoid-me"><span>Edit</span></a>
2071                  </td>
2072                </tr>
2073                <!-- {% }); %} -->
2074                <!-- {% } else { %} -->
2075                <tr><td colspan="3" style="text-align:center">No cluster references defined. <span class="when-roadmin-avoid-me">Please create one.</span></td></tr>
2076                <!-- {% } %} -->
2077              </table>
2078              </script>
2079            </div>
2080          </div>
2081
2082          <!-- Ongoing Replications -->
2083          <div id="ongoing_replications" class="shadow_box">
2084            <div class="darker_block" style="font-size:13px;">
2085              <h3>
2086                <span class="view_head" style="padding-left: 0">Ongoing Replications</span>
2087                <span class="buttons">
2088                  <a class="btn_1 when-roadmin-hide-me" id="create_replication">
2089                    <span>Create Replication</span>
2090                  </a>
2091                </span>
2092              </h3>
2093
2094              <div class="stats ongoing_replications_list" id="ongoing_replications_list_container">
2095              </div>
2096              <script id="ongoing_replications_list_template" type="text/html">
2097              <table class="list" style="width:100%">
2098              <colgroup>
2099                <col class="bucket">
2100                <col class="protocol">
2101                <col class="from">
2102                <col class="to">
2103                <col class="filter when-enterprise">
2104                <col class="status">
2105                <col class="when">
2106              </colgroup>
2107              <tbody>
2108                <tr>
2109                  <th>Bucket</th>
2110                  <th>Protocol</th>
2111                  <th>From</th>
2112                  <th>To</th>
2113                  <th class="when-enterprise">Filtered</th>
2114                  <th>Status</th>
2115                  <th>When</th>
2116                  <th></th>
2117                </tr>
2118                <!-- {% if (rows.length > 0) { %} -->
2119                <!-- {% _.each(rows, function (r) { %} -->
2120                <tr class="row">
2121                  <td>{%= h(r.bucket) %}</td>
2122                  <td>{%= h(r.protocol) %}</td>
2123                  <td style="color:#777">this cluster</td>
2124                  <td>{%= h(r.to) %}</td>
2125                  <td class="when-enterprise">
2126                    {% if (r.filterExpression) { %}
2127                      <a class="tooltip text_11"><span>Yes</span>
2128                        <span class="tooltip_msg break-word" style="width:200px;"><span>
2129                          {%= r.filterExpression %}
2130                        </span></span>
2131                      </a>
2132                    {% } else { %}
2133                      No
2134                    {% } %}
2135                  </td>
2136                  <td class="replication_status_cell">
2137                    <span>{%= V.formatReplicationStatus(r) %}</span>
2138                  </td>
2139                  <td>{%= h(r.when) %}</td>
2140                  <td>
2141                    <a class="list_button when-roadmin-avoid-me" href="#deleteReplication={%=h(encodeURIComponent(r.cancelURI))%}"><span>Delete</span></a>
2142                    <span class="list_button when-roadmin-avoid-me js_per_xdcr_settings"><span>Edit</span></span>
2143                  </td>
2144                </tr>
2145                <!-- {% }); %} -->
2146                <!-- {% } else { %} -->
2147                <tr><td colspan="9" style="text-align:center">There are no
2148                replications currently in progress.</td></tr>
2149                <!-- {% } %} -->
2150              </tbody>
2151              </table>
2152              </script>
2153            </div>
2154          </div>
2155        </div>
2156
2157        <div id="js_documents" class="documents" style="display:none">
2158          <div class="doc_header">
2159            <div class="wrap">
2160              <select id="docs_buckets_select"></select> &gt; <a id="bread_crump_doc">Documents</a>
2161            </div>
2162            <div class="items_per_list_wrap">
2163                <select>
2164                  <option value="5">5</option>
2165                  <option value="10">10</option>
2166                  <option value="20">20</option>
2167                  <option value="50">50</option>
2168                  <option value="100">100</option>
2169                </select>
2170            </div>
2171            <div class="ic_prev_next">
2172              <a class="arr_prev dynamic_disabled"></a>
2173              <a class="arr_next dynamic_disabled"></a>
2174            </div>
2175            <div class="docs_info">
2176              Current page: <span class="docs_crnt_pg">1</span>
2177            </div>
2178          </div>
2179
2180          <div id="documents_details" style="display:none;" class="documents_details">
2181            <div class="warning_message documents_notice"></div>
2182            <div class="shadow_box">
2183              <div class="header_2 servers_header">
2184                <div class="docs_title ellipsis"></div>
2185                <div class="editing_ctrls when-roadmin-hide-me">
2186                  <a class="btn_1 dynamic_disabled" id="doc_delete"><span>Delete</span></a>
2187                  <a class="btn_1 dynamic_disabled" id="doc_saveas"><span>Save As...</span></a>
2188                  <a class="btn_1 btn_save dynamic_disabled" id="doc_save"><span>Save</span></a>
2189                  <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
2190                </div>
2191              </div>
2192              <textarea id="json_doc" spellcheck="false" cols="20" rows="11"></textarea>
2193            </div>
2194          </div>
2195
2196          <div id="documents_list">
2197            <div class="warning_message documents_notice"></div>
2198            <div class="shadow_box">
2199              <div class="header_2 servers_header">
2200                <div class="docs_title"></div>
2201                <div class="editing_ctrls">
2202                  <form id="search_doc" action="#">
2203                    <input type="text" id="docs_lookup_doc_by_id"
2204                           placeholder="Document ID" disabled >
2205                    <button type="submit" class="btn_1 dynamic_disabled" id="docs_lookup_doc_by_id_btn">
2206                      <span>Lookup Id</span>
2207                    </button>
2208                  </form>
2209                  <a class="btn_1 btn_create dynamic_disabled when-roadmin-avoid-me"><span>Create Document</span></a>
2210                  <span class="staleness-notice">Difficulties communicating with the cluster; displaying cached information!</span>
2211                </div>
2212              </div>
2213
2214              <div id="documents_list_container">Documents</div>
2215              <div class="ic_prev_next bottom">
2216                <a class="arr_prev dynamic_disabled"></a>
2217                <a class="arr_next dynamic_disabled"></a>
2218              </div>
2219              <script id="documents_list_template" type="text/html">
2220                <table class="list" style="width:100%">
2221                  <thead>
2222                    <tr>
2223                      <th class="keycol">ID</th>
2224                      <th>&#160;</th>
2225                      <th>Сontent</th>
2226                      <th>&#160;</th>
2227                      <th>&#160;</th>
2228                      <th>&#160;</th>
2229                      <th>&#160;</th>
2230                      <th>&#160;</th>
2231                      <th>&#160;</th>
2232                      <th>&#160;</th>
2233                    </tr>
2234                  </thead>
2235                  <tbody>
2236                  <!-- {% if (loading) { %} -->
2237                      <tr>
2238                        <td colspan="10" class='spinner'><span>Loading...</span></td>
2239                      </tr>
2240                  <!-- {% } else if (rows.length > 0) { %} -->
2241                  <!-- {% _.each(rows, function (r) { %} -->
2242                      <tr class="align_text">
2243                          <td class="key ellipsis" colspan="2">
2244                            <a href="#sec=documents&viewsBucket={%= encodeURIComponent(bucketName) %}&documentsPageNumber={%= pageNumber %}&docId={%= encodeURIComponent(r.id) %}">{%= h(r.id) %}</a>
2245                          </td>
2246                          <td class="ellipsis" colspan="5">{%= $.futon.formatJSON(r.doc.json || r.doc.base64, {html:true}) %}</td>
2247                          <td colspan="3">
2248                            <button class="list_button delete_btn when-roadmin-avoid-me" data-id="{%= h(r.id) %}"><span>Delete</span></button>
2249                            <a href="#sec=documents&viewsBucket={%= encodeURIComponent(bucketName) %}&documentsPageNumber={%= pageNumber %}&docId={%= encodeURIComponent(r.id) %}" class="list_button btn_edit"><span>Edit Document</span></a></td>
2250                      </tr>
2251                  <!-- {% }); %} -->
2252                <!-- {% } else { %} -->
2253                  <tr>
2254                    <td colspan="10" class="empty_docs">There are currently no documents in this bucket{%= searchCriteria ? ' corresponding to the search criteria' : '.' %}</td>
2255                  </tr>
2256                <!-- {% } %} -->
2257                </tbody>
2258                </table>
2259              </script>
2260            </div>
2261          </div>
2262        </div>
2263
2264        <div id="js_coming" class="coming" style="display:none">
2265          <h1>UI error encountered. This content does not exist yet.</h1>
2266        </div>
2267      </div>
2268    </div>
2269    <!-- mainContainer -->
2270
2271    <div class="page-footer">
2272      <div class="main_holder">
2273        <h1>Copyright &copy; 2016 <a href="http://couchbase.com" target="_blank">Couchbase, Inc.</a> All rights reserved.</h1>
2274      </div>
2275    </div>
2276  </div>
2277  <!-- #container -->
2278
2279<!-- dialogs -->
2280<div class="dialog internal_settings_dialog really" id="internal_settings_dialog">
2281  <form>
2282    <fieldset>
2283      <input type="hidden" name="indexAwareRebalanceDisabled" value="false">
2284      <input type="hidden" name="rebalanceIndexWaitingDisabled" value="false">
2285      <input type="hidden" name="rebalanceIndexPausingDisabled" value="false">
2286      <input type="hidden" name="rebalanceIgnoreViewCompactions" value="false">
2287      <input type="hidden" name="indexAutoFailoverDisabled" value="false">
2288      <input type="hidden" name="certUseSha1" value="false">
2289      <label><span class="cursor_helper" title="When not disabled makes sure indexes are always up-to-date during rebalance">Disable view-index aware rebalance</span><input type="checkbox" name="indexAwareRebalanceDisabled" value="true"></label>
2290      <label><span class="cursor_helper" title="Whether index aware rebalance waiting for index up-to-dateness should be disabled. Makes rebalance faster">Disable view-index waiting during rebalance</span><input type="checkbox" name="rebalanceIndexWaitingDisabled" value="true"></label>
2291      <label><span class="cursor_helper" title="That's too complex to explain">Disable view-index pausing during rebalance</span><input type="checkbox" name="rebalanceIndexPausingDisabled" value="true"></label>
2292      <label><span>Don't compact views during rebalance</span><input type="checkbox" name="rebalanceIgnoreViewCompactions" value="true"></label>
2293      <label><span>Do not failover Index service automatically.</span><input type="checkbox" name="indexAutoFailoverDisabled" value="true"></label>
2294      <label><span>Max in-/out-going backfills per node<br> during rebalance</span><input maxlength="5" style="width:1.5em;" name="rebalanceMovesPerNode"></label>
2295      <label><span>VBucket moves per node<br>before forced view compaction</span><input maxlength="5" style="width:1.5em;" name="rebalanceMovesBeforeCompaction"></label>
2296      <label><span>Max parallel main view-index tasks per node</span><input maxlength="5" style="width:1.5em;" name="maxParallelIndexers"></label>
2297      <label><span>Max parallel replica view-index tasks per node</span><input maxlength="5" style="width:1.5em;" name="maxParallelReplicaIndexers"></label>
2298      <label><span>Maximum Bucket Count</span><input maxlength="3" style="width:1.5em;" name="maxBucketCount"></label>
2299      <label class="when-goxdcr-disabled"><span>XDCR Max Replications per Bucket</span><input maxlength="5" style="width:1.5em;" name="xdcrMaxConcurrentReps"></label>
2300      <label class="when-goxdcr-enabled"><span>XDCR Source Nozzles per Node</span><input maxlength="5" style="width:1.5em;" name="xdcrSourceNozzlePerNode"></label>
2301      <label class="when-goxdcr-enabled"><span>XDCR Target Nozzles per Node</span><input maxlength="5" style="width:1.5em;" name="xdcrTargetNozzlePerNode"></label>
2302      <label><span>XDCR Checkpoint Interval</span><input maxlength="5" style="width:2.5em;" name="xdcrCheckpointInterval"></label>
2303      <label><span>XDCR Batch Count</span><input maxlength="5" style="width:2.5em;" name="xdcrWorkerBatchSize"></label>
2304      <label><span>XDCR Batch Size (kB)</span><input maxlength="6" style="width:2.5em;" name="xdcrDocBatchSizeKb"></label>
2305      <label><span>XDCR Failure Retry Interval</span><input maxlength="3" style="width:1.5em;" name="xdcrFailureRestartInterval"></label>
2306      <label class="when-goxdcr-enabled"><span>XDCR Statistics Collection Interval (ms)</span><input maxlength="5" style="width:1.5em;" name="xdcrStatsInterval"></label>
2307      <label class="when-goxdcr-enabled"><span>XDCR Logging Level</span>
2308      <select name="xdcrLogLevel">
2309          <option value="Info">Info</option>
2310          <option value="Debug">Debug</option>
2311          <option value="Trace">Trace</option>
2312          <option value="Error">Error</option>
2313        </select>
2314        </label>
2315      <label><span>XDCR Optimistic Replication Threshold</span><input maxlength="6" style="width:2.5em;" name="xdcrOptimisticReplicationThreshold"></label>
2316
2317      <label><span>Simultaneous REST requests limit</span><input maxlength="6" style="width:2.5em;" name="restRequestLimit"></label>
2318      <label><span>Simultaneous CAPI requests limit</span><input maxlength="6" style="width:2.5em;" name="capiRequestLimit"></label>
2319      <label><span>Drop requests after this much memory is used (MiB)</span><input maxlength="6" style="width:2.5em;" name="dropRequestMemoryThresholdMiB"></label>
2320      <label><span>GOTRACEBACK</span><input style="width:2.5em;" name="gotraceback"></label>
2321      <label class="when-goxdcr-disabled"><span>XDCR anticipatory delay (ms)</span><input maxlength="6" style="width:2.5em;" name="xdcrAnticipatoryDelay"></label>
2322      <label><span class="cursor_helper" title="When enabled forces sha1 signature algorithm during ssl certificates generation">Use sha1 in ssl certificates</span><input type="checkbox" name="certUseSha1" value="true"></label>
2323    </fieldset>
2324    <div class="save_cancel">
2325      <button class="save_button float_right" type="submit">Save</button>
2326      <a class="close casper_internal_settings_close">Cancel</a>
2327    </div>
2328  </form>
2329</div>
2330
2331<div class="dialog bucket_details" id="bucket_details_dialog">
2332  <h1>
2333    <span class="when-editing">Configure Bucket</span>
2334    <span class="when-creating">Create Bucket</span>
2335  </h1>
2336  <form>
2337    <div class="clearfix">
2338      <h2>Bucket Settings</h2>
2339      <div class="bucket-icon sub_section">
2340        <div>
2341          <label for="bucket_details_bucket_name_input">Bucket Name:</label>
2342          <input disabled name="name" value="Bucket Name" id="bucket_details_bucket_name_input">
2343          <span class="error-container err-name"></span>
2344        </div>
2345        <div>
2346          <label>Bucket Type:</label>
2347          <div class="with_radiogroup">
2348            <div>
2349              <input type="radio" name="bucketType" value="membase" id="bucket_type_membase">
2350              <label for="bucket_type_membase">Couchbase</label>
2351            </div>
2352            <div>
2353              <input type="radio" name="bucketType" value="memcached" id="bucket_type_memcached">
2354              <label for="bucket_type_memcached">Memcached</label>
2355            </div>
2356          </div>
2357        </div>
2358      </div>
2359
2360      <h2>Memory Size</h2>
2361      <div class="sub_section" style="margin-right: 0;">
2362        <div class="for-ram-quota">
2363          <div class="size-gauge for-ram">
2364            <div class="top-right">Cluster quota (0 MB)</div>
2365            <div class="usage">
2366              <div style="width:100%;background-color:#E1E2E3"></div>
2367            </div>
2368            <table style="width:100%;">
2369              <tbody>
2370                <tr><td style="text-align:left;color:#1878a2;">Other Buckets (0 B)</td><td style="text-align:center;color:#409f05;">This Bucket (0 MB)</td><td style="text-align:right;color:#444245;">Free (0 MB)</td></tr>
2371              </tbody>
2372            </table>
2373          </div>
2374          <div class="gauge-label">
2375            <label for="ram_quota_mb">Per Node RAM Quota:</label>
2376            <input name="ramQuotaMB" type="text" value="30" id="ram_quota_mb">
2377            <abbr>MB</abbr>
2378          </div>
2379        </div>
2380        <div class="error-container err-ramQuotaMB"></div>
2381        <p class="memcached-summary when-non-persistent"></p>
2382        <div class="cache_metadata_block persistent-only">
2383          <label>Cache Metadata:</label>
2384          <div class="with_radiogroup">
2385            <div>
2386              <input type="radio" name="evictionPolicy" value="valueOnly" id="cache_metadata_retain_new" checked="checked">
2387              <label for="cache_metadata_retain_new">Value Ejection</label>
2388            </div>
2389            <div>
2390              <input type="radio" name="evictionPolicy" value="fullEviction" id="cache_metadata_non_retain_new">
2391              <label for="cache_metadata_non_retain_new">Full Ejection</label>
2392            </div>
2393          </div>
2394          <a class="tooltip text_11"><span>What's this?</span>
2395            <span class="tooltip_msg" style="width:350px;"><span>
2396              Value Ejection - During ejection, only the value will be ejected (key and metadata will remain in memory).
2397              Full Ejection - During ejection, everything (including key, metadata and value) will be ejected.
2398              Value Ejection needs more system memory but provides the best performance. Full Ejection reduces memory overhead requirement.
2399            </span></span>
2400          </a>
2401        </div>
2402      </div>
2403
2404      <h2>Access Control</h2>
2405      <div class="sub_section">
2406        <div>
2407          <input id="js_bucket_details_sasl_selected" type="radio" name="authType" value="sasl" checked>
2408          <div class="with_radiogroup">
2409            <label for="js_bucket_details_sasl_selected">
2410              <span class="when-default">Standard port (TCP port 11211. ASCII protocol or Binary auth-less)</span>
2411              <span class="when-not-default">Standard port (TCP port 11211. Needs SASL auth.)</span>
2412            </label>
2413            <div class="when-not-default">
2414              <label for="js_bucket_details_sasl_password">Enter password:</label>
2415              <input type="password" name="saslPassword" id="js_bucket_details_sasl_password" disabled value="">
2416              <div class="error-container err-saslPassword"></div>
2417            </div>
2418          </div>
2419        </div>
2420        <div>
2421          <input type="radio" name="authType" value="none" id="js_bucket_details_auth_type">
2422          <div class="with_radiogroup">
2423            <label for="js_bucket_details_auth_type">Dedicated port (supports ASCII protocol and is auth-less)</label>
2424            <div>
2425              <label for="js_bucket_details_proxy_port">Protocol Port:</label>
2426              <input id="js_bucket_details_proxy_port" name="proxyPort" style="width:50px">
2427              <span class="error-container err-proxyPort"></span>
2428            </div>
2429          </div>
2430        </div>
2431      </div>
2432
2433      <div class="persistent-only">
2434        <h2>Replicas</h2>
2435        <div class="sub_section replicas_settigns">
2436          <input type="checkbox" checked id="for-enable-replicas" class="js_for-enable-replicas">
2437          <label for="for-enable-replicas">Enable</label>
2438          <input class="hidden-replica-number" type="hidden" name="replicaNumber" value="0" disabled>
2439          <div class="for-replica-number">
2440            <select name="replicaNumber" id="label_for-replica-number">
2441              <option value="1">1</option><option value="2">2</option><option value="3">3</option>
2442            </select>
2443            <label for="label_for-replica-number">Number of replica (backup) copies</label>
2444          </div>
2445          <div class="error-container err-replicaNumber"></div>
2446          <div></div>
2447          <input type="hidden" name="replicaIndex" value="0">
2448          <input type="checkbox" name="replicaIndex" value="1" id="label_replica_index_flag">
2449          <label for="label_replica_index_flag">View index replicas</label>
2450        </div>
2451      </div><!-- .persistent-only -->
2452
2453      <div class="persistent-only bucket-io-priority">
2454        <h2>Disk I/O Optimization</h2>
2455        <div class="sub_section">
2456          <label>Set the bucket disk I/O priority:</label>
2457          <div class="with_radiogroup">
2458            <div>
2459              <input type="radio" name="threadsNumber" value="3" checked="checked" id="low_threads_number">
2460              <label for="low_threads_number">Low (default)</label>
2461            </div>
2462            <div>
2463              <input type="radio" name="threadsNumber" value="8" id="hight_threads_number">
2464              <label for="hight_threads_number">High</label>
2465            </div>
2466          </div>
2467          <a class="tooltip text_11"><span>What's this?</span>
2468            <span class="tooltip_msg" style="width:200px;"><span>
2469                This is an advanced setting for Disk I/O optimization which allows tasks to be handled based on priority.
2470            </span></span>
2471          </a>
2472        </div>
2473      </div> <!-- .persistent-only -->
2474
2475    <div class="bucket_details_auto_compaction persistent-only" id="js_bucket_auto_compaction_settings">
2476      <h2>Auto-Compaction</h2>
2477      <div class="sub_section">
2478        <p>Auto-Compaction settings trigger the compaction process. The process compacts databases and their respective view indexes when the following conditions are met.</p>
2479
2480        <ul>
2481          <li><input type="hidden" name="autoCompactionDefined" value="false" />
2482            <label><input type="checkbox" name="autoCompactionDefined" value="true" /> Override the default auto-compaction settings?</label>
2483          </li>
2484        </ul><ul class="autocompaction-settings">
2485          <li><h4>Database Fragmentation</h4></li>
2486          <li id="js_database_fragmentation_bucket_settings" class="database"></li>
2487          <li><h4>View Fragmentation</h4></li>
2488          <li id="js_view_fragmentation_bucket_settings" class="view">
2489          <li><h4>Time Interval</h4></li>
2490          <li class="period">
2491            <span class="toggle">
2492              <input type="checkbox" id="period_check" class="check-for-allowedTimePeriod"/> <label for="period_check">Set the time interval for when compaction is allowed to run</label>
2493            </span><br>
2494            <span class="input_wrapper">
2495              Start Time:
2496              <input id="2cbc1fe9-d580-4126-9c7e-777fe7adf233" name="allowedTimePeriod[fromHour]" type="number" min="0" max="23" placeholder="HH" />:<input name="allowedTimePeriod[fromMinute]" type="number" min="0" max="59" placeholder="MM" />
2497              End Time: <input name="allowedTimePeriod[toHour]" type="number" min="0" max="23" placeholder="HH" />:<input name="allowedTimePeriod[toMinute]" type="number" min="0" max="59" placeholder="MM" />
2498            </span>
2499            <div class="error-container err-allowedTimePeriod"></div>
2500            <div class="error-container err-allowedTimePeriod-fromHour-"></div>
2501            <div class="error-container err-allowedTimePeriod-fromMinute-"></div>
2502            <div class="error-container err-allowedTimePeriod-toHour-"></div>
2503            <div class="error-container err-allowedTimePeriod-toMinute-"></div>
2504            <div>
2505              <input type="hidden" name="allowedTimePeriod[abortOutside]" value="false" />
2506              <input id="66fdfb02-6c6f-453e-9ae3-fa011ecd42c0" type="checkbox" name="allowedTimePeriod[abortOutside]" value="true" />
2507              <label for="66fdfb02-6c6f-453e-9ae3-fa011ecd42c0">Abort compaction if run time exceeds the set time interval</label>
2508              <div class="error-container err-allowedTimePeriod-abortOutside-"></div>
2509            </div>
2510          </li>
2511          <li>
2512            <input type="hidden" name="parallelDBAndViewCompaction" value="false" />
2513            <input id="089ccca1-8688-41f9-a126-71a871b2ecf6" type="checkbox" name="parallelDBAndViewCompaction" value="true" />
2514            <label for="089ccca1-8688-41f9-a126-71a871b2ecf6">Process Database and View compaction in parallel</label>
2515            <div class="error-container err-parallelDBAndViewCompaction"></div>
2516          </li>
2517          <li><h4>Metadata Purge Interval</h4></li>
2518          <li>
2519            <label for="c80016fb-f7dc-4035-a45e-ac692ae2a790">Set the frequency of metadata purge interval:</label>
2520            <input id="c80016fb-f7dc-4035-a45e-ac692ae2a790" name="purgeInterval" style="width:2.5em;">
2521            <span>Range 0.04 (1 H) - 60days</span>
2522            <div class="error-container err-purgeInterval" style="display: inline; padding-left: 0; float: none;"></div>
2523          </li>
2524        </ul>
2525      </div>
2526    </div> <!-- .auto_compaction -->
2527
2528      <h2>Flush</h2>
2529      <div class="sub_section">
2530        <input type="hidden" name="flushEnabled" value="0">
2531        <input type="checkbox" class="for-enable-flush" id="for-enable-flush-new" name="flushEnabled" value="1">
2532        <label for="for-enable-flush-new">Enable</label>
2533        <a class="tooltip text_11" style="margin-left:30px;"><span>What's this?</span>
2534          <span class="tooltip_msg" style="width:218px;"><span>
2535            When flushed, items in memcached buckets are flagged for removal and subsequently removed; items in couchbase buckets are immediately removed. This does not affect the item count immediately.
2536          </span></span>
2537        </a>
2538      </div>
2539    </div>
2540
2541    <div class="save_cancel">
2542      <button class="save_button float_right when-roadmin-hide-me" type="submit">
2543        <span class="when-editing">Save</span>
2544        <span class="when-creating">Create</span>
2545      </button>
2546      <span class="when-editing when-roadmin-hide-me">
2547        <button class="delete_button">Delete</button>
2548        <button class="flush_button">Flush</button>
2549      </span>
2550      <a class="close">Cancel</a>
2551    </div>
2552  </form>
2553</div>
2554
2555<div class="dialog" id="bucket_flush_dialog" title="Flushing">
2556  <form>
2557    <div class="clearfix">
2558      <div class="err">
2559        <p>Flushing this bucket will result in complete data loss for this bucket. <br/>Are you sure you want to flush it?</p>
2560      </div>
2561    </div>
2562    <div class="save_cancel clearfix">
2563      <button onClick="BucketsSection.flushCurrentBucket();" type="button" class="flush_button float_right">Flush</button>
2564      <a class="close">Cancel</a>
2565    </div>
2566  </form>
2567</div>
2568
2569<div class="dialog" id="bucket_change_warning_dialog" title="Warning">
2570  <form>
2571    <div class="clearfix">
2572      <div class="err">
2573        <p class="js-text"></p>
2574      </div>
2575    </div>
2576    <div class="save_cancel clearfix">
2577      <button type="button" class="save_button float_right">Continue</button>
2578      <a class="close">Cancel</a>
2579    </div>
2580  </form>
2581</div>
2582
2583<div class="dialog" id="bucket_remove_dialog" title="Removing">
2584  <form>
2585    <div class="clearfix">
2586      <div class="err">
2587        <p>Removing this bucket will result in complete data loss for this bucket. <br/>Are you sure you want to remove it?</p>
2588      </div>
2589    </div>
2590    <div class="save_cancel clearfix">
2591      <button onClick="BucketsSection.removeCurrentBucket();" type="button" class="delete_button float_right">Delete</button>
2592      <a class="close">Cancel</a>
2593    </div>
2594  </form>
2595</div>
2596
2597<div class="dialog" id="js_roadmin_remove_dialog" title="Removing">
2598  <form>
2599    <div class="clearfix">
2600      <div class="err">
2601        <p>Are you sure you want to remove <span class="js_roadmin_name"></span>?</p>
2602      </div>
2603    </div>
2604    <div class="save_cancel clearfix">
2605      <button type="button" class="delete_button float_right js_delete_button casper_settings_roadmin_remove_click">Delete</button>
2606      <a class="close">Cancel</a>
2607    </div>
2608  </form>
2609</div>
2610
2611<div class="dialog" id="js_roadmin_reset_dialog" title="Reset Password">
2612  <form id="js_reset_roadmin_form" class="reset_roadmin_form">
2613    <div class="inner_wrap">
2614      <i class="errors js_error_password"></i>
2615      <label for="new_roa_pass" style="width:auto">New Password:</label>
2616      <input type="password" name="password" id="new_roa_pass">
2617    </div>
2618    <div class="save_cancel clearfix">
2619      <button type="submit" class="save_button float_right">Create</button>
2620      <a class="close casper_roadmin_reset_dialog_cancel">Cancel</a>
2621    </div>
2622  </form>
2623</div>
2624
2625<div class="xdcr_advaced_settings dialog" id="js_per_xdcr_settings_dialog" title="Advanced Settings">
2626  <form>
2627    <div>
2628      <div class="when-goxdcr-disabled">
2629        <label for="per_max_concurrent_reps">XDCR Max Replications per Bucket:</label>
2630        <input type="text" id="per_max_concurrent_reps" name="maxConcurrentReps">
2631        <i class="error js_error js_maxConcurrentReps"></i>
2632      </div>
2633      <div class="when-goxdcr-disabled">
2634        <label for="per_worker_processes_setting">XDCR workers per Replication:</label>
2635        <input type="text" id="per_worker_processes_setting" name="workerProcesses">
2636        <i class="error js_error js_workerProcesses"></i>
2637      </div>
2638      <div class="when-goxdcr-enabled">
2639        <label for="per_source_nozzle_per_node">XDCR Source Nozzles per Node:</label>
2640        <input type="text" id="per_source_nozzle_per_node" name="sourceNozzlePerNode">
2641        <i class="error js_error js_sourceNozzlePerNode"></i>
2642      </div>
2643      <div class="when-goxdcr-enabled">
2644        <label for="rep_target_nozzle_per_node">XDCR Target Nozzles per Node:</label>
2645        <input type="text" id="rep_target_nozzle_per_node" name="targetNozzlePerNode">
2646        <i class="error js_error js_targetNozzlePerNode"></i>
2647      </div>
2648      <div>
2649        <label for="per_checkpoint_interval">XDCR Checkpoint Interval:</label>
2650        <input type="text" id="per_checkpoint_interval" name="checkpointInterval">
2651        <i class="error js_error js_checkpointInterval"></i>
2652      </div>
2653      <div>
2654        <label for="per_worker_batch_size">XDCR Batch Count:</label>
2655        <input type="text" id="per_worker_batch_size" name="workerBatchSize">
2656        <i class="error js_error js_workerBatchSize"></i>
2657      </div>
2658      <div>
2659        <label for="per_doc_batch_size_kb">XDCR Batch Size (kB):</label>
2660        <input type="text" id="per_doc_batch_size_kb" name="docBatchSizeKb">
2661        <i class="error js_error js_docBatchSizeKb"></i>
2662      </div>
2663      <div>
2664        <label for="per_failure_restart_interval">XDCR Failure Retry Interval:</label>
2665        <input type="text" id="per_failure_restart_interval" name="failureRestartInterval">
2666        <i class="error js_error js_failureRestartInterval"></i>
2667      </div>
2668      <div>
2669        <label for="per_optimistic_replication_threshold">XDCR Optimistic Replication Threshold:</label>
2670        <input type="text" id="per_optimistic_replication_threshold" name="optimisticReplicationThreshold">
2671        <i class="error js_error js_optimisticReplicationThreshold"></i>
2672      </div>
2673      <div class="when-goxdcr-enabled">
2674        <label for="per_statistics_collection_interval">XDCR Statistics Collection Interval (ms):</label>
2675        <input type="text" id="per_statistics_collection_interval" name="statsInterval">
2676        <i class="error js_error js_statsInterval"></i>
2677      </div>
2678      <div class="when-goxdcr-enabled">
2679        <label for="per_logging_level">XDCR Logging Level:</label>
2680        <select name="logLevel" id="per_logging_level">
2681          <option value="Info">Info</option>
2682          <option value="Debug">Debug</option>
2683          <option value="Trace">Trace</option>
2684          <option value="Error">Error</option>
2685        </select>
2686        <i class="error js_error js_logLevel"></i>
2687      </div>
2688    </div>
2689    <div class="save_cancel clearfix">
2690      <button type="submit" class="save_button float_right">Save</button>
2691      <a class="close">Cancel</a>
2692    </div>
2693  </form>
2694</div>
2695
2696<!-- Create Document -->
2697<div class="dialog join_cluster" id="create_document_dialog" title="Create Document" style="width:400px">
2698  <span class="warning pat_10" style="display:none;"></span>
2699  <form>
2700    <fieldset style="padding-top:10px">
2701      <ul>
2702        <li>
2703          <label for="new_doc_id" style="width:auto">Document ID:</label>
2704          <input type="text" name="id" id="new_doc_id" />
2705        </li>
2706      </ul>
2707    </fieldset>
2708    <div class="save_cancel clearfix">
2709      <button type="submit" class="save_button float_right">Create</button>
2710      <a class="close">Cancel</a>
2711    </div>
2712  </form>
2713</div>
2714<!-- END Create Document -->
2715<!-- END Save Document as -->
2716<div class="dialog join_cluster" id="save_documentas_dialog" title="Save Document As" style="width:400px">
2717  <form>
2718    <fieldset style="padding-top:10px">
2719      <ul>
2720        <li>
2721          <label for="new_doc_id" style="width:auto">Document ID:</label>
2722          <input type="text" name="id" id="saveas_id" />
2723        </li>
2724      </ul>
2725    </fieldset>
2726    <div class="save_cancel clearfix">
2727      <button type="submit" class="save_button float_right">Save As</button>
2728      <a class="close">Cancel</a>
2729    </div>
2730  </form>
2731</div>
2732<!-- END Save Document as -->
2733
2734<div class="dialog" id="js_add_group_dialog" style="width: 331px;" title="Create Group">
2735  <form id="js_add_group_form" class="add_group_form">
2736    <div class="inner_wrap">
2737      <i class="warning js_error_group"></i>
2738      <label for="js_new_group_filed" style="width:auto">Group Name:</label>
2739      <input type="text" name="group" id="js_new_group_filed">
2740    </div>
2741    <div class="save_cancel clearfix">
2742      <button type="submit" class="save_button float_right">Create</button>
2743      <a class="close casper_close_add_group_dialog">Cancel</a>
2744    </div>
2745  </form>
2746</div>
2747
2748<div class="dialog casper_remove_group_dialog" id="js_remove_group_dialog" title="Removing Server Group">
2749  <form>
2750    <div class="clearfix">
2751      <div class="err">
2752        <p>Are you sure you want to remove the Server group?</p>
2753      </div>
2754    </div>
2755    <div class="save_cancel clearfix">
2756      <button type="button" class="delete_button float_right js_delete_button">Delete</button>
2757      <a class="close casper_close_remove_group_dialog">Cancel</a>
2758    </div>
2759  </form>
2760</div>
2761
2762<div class="dialog" id="js_edit_group_dialog" style="width: 331px;" title="Edit Group">
2763  <form id="js_edit_group_form" class="add_group_form">
2764    <div class="inner_wrap">
2765      <i class="warning js_error_group"></i>
2766      <label for="js_edit_group_filed" style="width:auto">Group Name:</label>
2767      <input type="text" name="group" id="js_edit_group_filed">
2768    </div>
2769    <div class="save_cancel clearfix">
2770      <button type="submit" class="save_button float_right">Save</button>
2771      <a class="close casper_close_edit_group_dialog">Cancel</a>
2772    </div>
2773  </form>
2774</div>
2775
2776<div class="dialog memory_quota_dialog" id="js_memory_quota_dialog" style="width: 475px;" title="Set RAM Quota">
2777  <form class="cluster_quota_settings">
2778    <p style="margin: 20px;">As this is the first server node provisioned with an index service, please review and set the per-server index RAM quota. This is one time only: when you add further index server nodes, we will not ask you to review this value again.</p>
2779    <div style="margin: 20px;" id="js_add_node_memory_quota_holder">
2780    </div>
2781    <div class="save_cancel clearfix">
2782      <button type="submit" class="save_button float_right">Set Quota</button>
2783    </div>
2784  </form>
2785</div>
2786
2787
2788<div class="dialog join_cluster join_cluster_dialog" id="join_cluster_dialog" title="Add Server">
2789  <!-- Join cluster -->
2790  <p class="warning pat_10" style="padding-right: 20px;" id="join_cluster_dialog_errors_container"></p>
2791  <p class="warning pat_10" style="padding: 0 20px;">
2792    <strong>Warning</strong> – Adding a server to this cluster means all data on that server will be removed.
2793  </p>
2794  <script id="join_cluster_dialog_errors_template" type="text/html">
2795    <!-- {% _.each(rows, function (e) { %} -->
2796    <strong>Attention</strong> - {%= h(e) %}<br>
2797    <!-- {% }); %} -->
2798  </script>
2799  <form>
2800    <fieldset>
2801      <ul>
2802        <li>
2803          <label class="label" for="add-server-hostname">Server IP Address*:</label>
2804          <input type="text" class="inp" name="hostname" id="add-server-hostname" />
2805          <a class="text_11 tooltip"><span>What's this?</span>
2806            <span class="tooltip_msg"><span>
2807              This is the hostname or IP address of a server node that you wish to add.
2808            </span></span>
2809          </a>
2810        </li>
2811        <li class="when-groups">
2812          <label class="label" for="js_servers_group_select">Server Group:</label>
2813          <select id="js_servers_group_select" class="server_group_select" style="width:157px;" name="group"></select>
2814        </li>
2815      </ul>
2816    </fieldset>
2817    <fieldset>
2818      <legend>Security <a class="text_11 tooltip"><span>What's this?</span>
2819        <span class="tooltip_msg"><span>
2820          Enter the username and password for the node you want to add to this cluster.
2821        </span></span></a>
2822      </legend>
2823      <ul>
2824        <li>
2825          <label class="label" for="user_inp">Username:</label>
2826          <input type="text" class="inp" name="user" id="user_inp" />
2827        </li>
2828        <li>
2829          <label class="label" for="password_inp">Password:</label>
2830          <input type="password" class="inp" name="password" id="password_inp" />
2831        </li>
2832      </ul>
2833    </fieldset>
2834    <fieldset class="only-when-40">
2835      <legend>Services</legend>
2836      <ul class="join_cluster_dialog_services">
2837        <li>
2838          <input type="checkbox" class="inp" name="services" value="kv" id="add_servers_data_checkbox" />
2839          <label class="label" for="add_servers_data_checkbox" style="text-align: left; width: 45px;">Data</label>
2840
2841          <input type="checkbox" class="inp" name="services" value="index" id="add_servers_index_checkbox" />
2842          <label class="label" for="add_servers_index_checkbox" style="text-align: left; width: 45px;">Index</label>
2843
2844          <input type="checkbox" class="inp" name="services" value="n1ql" id="add_servers_n1ql_checkbox" />
2845          <label class="label" for="add_servers_n1ql_checkbox" style="text-align: left; width: 45px;">Query</label>
2846
2847          <input type="checkbox" class="inp" name="services" value="fts" id="add_servers_fts_checkbox" />
2848          <label class="label" for="add_servers_fts_checkbox" style="text-align: left; width: 45px;">Full Text</label>
2849
2850          <a class="tooltip text_11"><span>What's this?</span>
2851            <span class="tooltip_msg" style="width:350px;"><span>
2852              Each service represents a unique workload. Please check the service you want to enable on this node.
2853            </span></span>
2854          </a>
2855        </li>
2856      </ul>
2857    </fieldset>
2858    <div class="save_cancel clearfix">
2859      <button type="submit" class="save_button float_right">Add Server</button>
2860      <a class="casper_close_join_cluster_dialog close">Cancel</a>
2861    </div>
2862  </form>
2863  <!-- END join cluster -->
2864</div>
2865
2866
2867<div class="dialog" id="js_cancel_collection_confirmation_dialog" title="Confirm Log Collection Stop">
2868  <div class="content">
2869    <div class="pas_20">
2870      <div class="warning pat_20">
2871        <strong>Warning</strong> - Are you sure you want to stop log collection?
2872      </div>
2873    </div>
2874    <div class="right save_cancel pas_20 footer_bg">
2875      <button type="submit" class="save_button float_right">Stop</button>
2876      <a class="close cancel_button float_right">Cancel</a>
2877    </div>
2878  </div>
2879</div>
2880
2881<script id="eject_confirmation_dialog_template" type="text/html">
2882  <p>Warning! Removing this node will:</p>
2883  <ul style="margin:15px;">
2884  {% if (isThereIndex) { %}
2885    <li>Remove indexes from the cluster and may cause queries to fail</li>
2886  {% } %}
2887  {% if (isLastIndex) { %}
2888    <li>Remove the last index node from the cluster so new indexes can’t be created</li>
2889  {% } %}
2890  {% if (isLastQuery) { %}
2891    <li>Remove the last query node from the cluster so queries can’t be run</li>
2892  {% } %}
2893  {% if (isLastFullText) { %}
2894    <li>Remove the last full text node from the cluster so full text indexes can’t be created</li>
2895  {% } %}
2896  {% if (isKv) { %}
2897    <li>Reduce cache capacity across all data buckets</li>
2898  {% } %}
2899  </ul>
2900  <p>Are you sure you want to remove this server?</p>
2901</script>
2902
2903
2904<!--  eject confirmation dialog -->
2905<div class="dialog" id="eject_confirmation_dialog" title="Confirm Server Removal" style="width: 600px;">
2906  <div class="content">
2907    <div class="pas_20">
2908      <div class="warning pat_20" id="eject_confirmation_dialog_container"></div>
2909    </div>
2910    <div class="right save_cancel pas_20 footer_bg">
2911      <button type="submit" class="save_button float_right">Remove</button>
2912      <a class="close casper_close_eject_confirmation_dialog float_right">Cancel</a>
2913    </div>
2914  </div>
2915</div>
2916<!-- END eject confirmation dialog -->
2917
2918<!-- failover confirmation dialog -->
2919<div class="dialog" id="failover_confirmation_dialog" title="Confirm Node Fail Over">
2920  <div class="lbox">
2921    <div class="content">
2922      <div class="pas_20">
2923        <div class="failover_warning pat_20 warning_up_backfill">
2924          <h2>Fail Over Options</h2>
2925          <label><input type="radio" name="failOver" value="startGracefulFailover"> <span>Graceful Fail Over (default).</span></label>
2926          <label><input type="radio" name="failOver" value="failOver"> <span>Hard Fail Over - If you use hard failover option on a functioning node it may result in data loss. This is because failover will immediately remove the node from the cluster and any data that has not yet been replicated to other nodes may be permanently lost if it had not been persisted to disk.</span></label>
2927          <div class="warning js_gracefull_failover_message" style="margin-bottom: 15px;">
2928            <strong>Attention</strong> – Graceful fail over option is not available either because node is unreachable or replica vbucket cannot be activated gracefully.
2929          </div>
2930          <div class="warning js_warning" style="margin-top: 15px;">
2931            <strong>Attention</strong> – A significant amount of data stored on this node
2932              does not yet have replica (backup) copies! Failing over the node now will
2933              irrecoverably lose that data when the incomplete replica is
2934              activated and this node is removed from the cluster. It is
2935              recommended to select "Remove Server" and rebalance to
2936              safely remove the node without any data loss.
2937            <label><input type="checkbox" name="confirmation"> Please confirm Failover.</label>
2938          </div>
2939        </div>
2940        <div class="failover_warning pat_20 warning_up_no_backfill">
2941          <h2>Fail Over Options</h2>
2942          <label><input type="radio" name="failOver" value="startGracefulFailover"> <span>Graceful Fail Over (default).</span></label>
2943          <label><input type="radio" name="failOver" value="failOver"> <span>Hard Fail Over - If you use hard failover option on a functioning node it may result in data loss. This is because failover will immediately remove the node from the cluster and any data that has not yet been replicated to other nodes may be permanently lost if it had not been persisted to disk.</span></label>
2944          <div class="warning js_gracefull_failover_message" style="margin-bottom: 15px;">
2945            Attention – Graceful fail over option is not available either because node is unreachable or replica vbucket cannot be activated gracefully.
2946          </div>
2947          <div class="warning js_warning" style="margin-top: 15px;">
2948            <strong>Warning</strong> – Failing over the node will remove it from the cluster and activate a replica.
2949            Operations currently in flight and not yet replicated, will be lost. Rebalancing will be required
2950            to add the node back into the cluster. Consider using "Remove from Cluster" and rebalancing instead of Failover,
2951            to avoid any loss of data. Please confirm Failover.
2952          </div>
2953        </div>
2954        <div class="failover_warning pat_20 warning_down_backfill">
2955          <input type="radio" name="failOver" value="failOver" style="display:none">
2956          <div class="warning">
2957            <strong>Attention</strong> – There are not replica (backup) copies of all data
2958            on this node! Failing over the node now will irrecoverably
2959            lose that data when the incomplete replica is activated and
2960            this node is removed from the cluster. If the node might
2961            come back online, it is recommended to wait.
2962            Check this box if you want to failover the node, despite the resulting data loss
2963            <label><input type="checkbox" name="confirmation"> Please confirm Failover.</label>
2964          </div>
2965        </div>
2966        <div class="failover_warning pat_20 warning_down_no_backfill">
2967          <input type="radio" name="failOver" value="failOver" style="display:none">
2968          <div class="warning">
2969            <strong>Warning</strong> – Failing over the node will remove it from the cluster and activate a replica.
2970            Operations not replicated before the node became unresponsive, will be lost.
2971            Rebalancing will be required to add the node back into the cluster. Please confirm Failover.
2972          </div>
2973        </div>
2974        <div class="failover_warning pat_20 warning_dataless">
2975          <input type="radio" name="failOver" value="failOver" style="display:none">
2976          <div class="warning">
2977            <strong>Note</strong> – Failing over this node (which has no data) will remove it from the cluster.
2978            Rebalancing will be required to add the node back into the cluster. Please confirm Failover.
2979          </div>
2980        </div>
2981      </div>
2982      <div class="right save_cancel">
2983        <button type="submit" class="save_button float_right">Fail Over</button>
2984          <a class="close casper_close_failover_confirmation_dialog cancel_button float_right">Cancel</a>
2985      </div>
2986    </div>
2987  </div>
2988</div>
2989<!-- END failover confirmation dialog -->
2990<!-- Stop rebalance confirmation dialog -->
2991<div class="dialog" id="stop_rebalance_confirmation_dialog"
2992     title="Confirm Rebalance Stop">
2993  <div class="lbox type_2">
2994    <div class="content">
2995      <div class="pas_20">
2996        <div class="warning pat_20">
2997          <strong>Warning</strong> – Stopping rebalance is unsafe at this
2998          moment since cluster may be in a partitioned state. Continue only if
2999          you're perfectly sure that this is not the case.
3000        </div>
3001        <div class="right save_cancel">
3002          <button type="submit"
3003                  class="save_button float_right">Stop</button>
3004          <a class="close cancel_button float_right">Cancel</a>
3005        </div>
3006      </div>
3007    </div>
3008  </div>
3009</div>
3010<!-- END stop rebalance confirmation dialog -->
3011<!-- Leave cluster -->
3012<div class="dialog" id="generic_dialog">
3013  <div class="lbox">
3014    <div class="center">
3015      <div class="pad">
3016        <div class="pas_20">
3017          <div class="pat_10">
3018            <p class="dialog-text">Really eject this node from cluster?</p>
3019          </div>
3020        </div>
3021      </div>
3022    </div>
3023  </div>
3024</div>
3025<!-- END Leave cluster -->
3026<!--  delete designdoc confirmation dialog -->
3027<div class="dialog" id="delete_designdoc_confirmation_dialog" title="Delete Design Document">
3028  <div class="lbox">
3029    <div class="content">
3030      <div class="pas_20">
3031        <div class="warning pat_20">
3032          <strong>Warning</strong> – The views contained in this Design Document will no longer be accessible. Are you sure you want to remove this Design Document?
3033        </div>
3034      </div>
3035      <div class="right save_cancel pas_20 footer_bg">
3036        <button type="submit" class="save_button float_right">Delete</button>
3037        <a class="close float_right">Cancel</a>
3038      </div>
3039    </div>
3040  </div>
3041</div>
3042<!-- END delete designdoc confirmation dialog -->
3043<!--  delete designdoc confirmation dialog -->
3044<div class="dialog" id="delete_document_confirmation_dialog" title="Delete Document">
3045  <div class="lbox">
3046    <div class="content">
3047      <div class="pas_20">
3048        <div class="warning pat_20">
3049          <div class="error"></div>
3050          <strong>Warning</strong> – Are you sure you want to remove this Document?
3051        </div>
3052      </div>
3053      <div class="right save_cancel pas_20 footer_bg">
3054        <button type="submit" class="save_button float_right">Delete</button>
3055        <a class="close float_right">Cancel</a>
3056      </div>
3057    </div>
3058  </div>
3059</div>
3060<!-- END delete designdoc confirmation dialog -->
3061<!-- copy design doc dialog -->
3062<div class="dialog view_document_dialog" id="copy_designdoc_dialog" title="Copy Design Document" style="width:30em">
3063  <form>
3064    <div class="clearfix">
3065      <label for="copy_ddoc_ddoc_name" class="bolder">Document Name:</label>
3066      <div style="width:20em; margin: 8px 0; padding: 0 5px; border: 1px solid #CCD3D7;background-color:white;font-size:13px;line-height:normal;">
3067      <table style="margin:0;padding:0;border:0;width:260px;">
3068        <tr><td><label for="copy_ddoc_ddoc_name" style="line-height:inherit;">_design/dev_</label></td>
3069        <td style="width:2000px;"><input id="copy_ddoc_ddoc_name" name="ddoc_name" style="width:100%;border:0;padding:0;font-family:inherit;color:inherit;"></td></tr>
3070      </table></div>
3071       <p><strong>NOTE:</strong> Development Mode (_design/dev_) provides the opportunity to edit and test
3072       your map/reduce views against a subset of data&mdash;without overloading the cluster.</p>
3073    </div>
3074    <div class="save_cancel">
3075      <button class="save_button float_right" type="submit">Copy</button>
3076      <a class="close">Cancel</a>
3077    </div>
3078  </form>
3079</div>
3080<!-- END copy design doc -->
3081<!-- copy view dialog -->
3082<div class="dialog view_document_dialog" id="copy_view_dialog" title="Copy View" style="width:30em">
3083  <span class="warning pat_10" style="display:none;"></span>
3084  <form>
3085    <div class="clearfix" style="padding-top:15px">
3086       <label class="bolder">Design Document Name:</label>
3087       <div style="width:20em; margin: 8px 0; padding: 0 5px; border: 1px solid #CCD3D7;background-color:white;font-size:13px;line-height:normal;">
3088       <table style="margin:0;padding:0;border:0;width:260px;">
3089         <tr><td><label for="copy_view_ddoc_name" style="line-height:inherit;">_design/dev_</label></td>
3090         <td style="width:2000px;"><input id="copy_view_ddoc_name" name="designdoc_name" style="width:100%;border:0;padding:0;font-family:inherit;color:inherit;" /></td></tr>
3091       </table></div>
3092       <label class="bolder">View Name:</label>
3093       <input name="view_name" class="view_name" value="??" />
3094    </div>
3095    <div class="save_cancel">
3096      <button class="save_button float_right" type="submit">Save</button>
3097      <a class="close">Cancel</a>
3098    </div>
3099  </form>
3100</div>
3101<!-- END copy view dialog -->
3102<!-- </div> --> <!-- #container -->
3103<!-- About -->
3104<div class="dialog" id="about_server_dialog">
3105  <div class="lbox">
3106    <div class="config-top">
3107      <h1>About Couchbase Server</h1>
3108    </div>
3109    <div class="center">
3110      <p class="dialog-text" id="about_versions"></p>
3111      <p class="dialog-text" style="margin-bottom:25px;">Cluster State ID: <span id="cluster_state_id"></span></p>
3112    </div>
3113    <div class="config-bottom">
3114      <button name="close" value="Close" class="submit close direction-button" id="about-close" type="submit">Close</button>
3115
3116    </div>
3117  </div>
3118</div>
3119<!-- END about -->
3120
3121<!-- Create Cluster Reference -->
3122<div class="dialog join_cluster" id="create_cluster_reference_dialog" title="Create Cluster Reference" style="width:500px">
3123  <div class="warning pat_10" id="create_cluster_reference_dialog_errors_container"></div>
3124  <script id="create_cluster_reference_dialog_errors_template" type="text/html">
3125    <!-- {% _.each(rows, function (e) { %} -->
3126    <strong>Attention</strong> - {%= h(e) %}<br>
3127    <!-- {% }); %} -->
3128  </script>
3129  <form>
3130    <fieldset>
3131      <ul>
3132       <li><label for="cluster_reference_name">Cluster Name:</label>
3133         <input name="name" id="cluster_reference_name" type="text" /></li>
3134       <li><label for="cluster_reference_hostname">IP/hostname:</label>
3135         <input name="hostname" id="cluster_reference_hostname" type="text" />
3136         <a class="text_11 tooltip"><span>What's this?</span>
3137           <span class="tooltip_msg"><span>
3138             This is the hostname or IP address of a node in the cluster you want
3139             to add.
3140           </span></span>
3141         </a>
3142        </li>
3143       </ul>
3144     </fieldset>
3145     <fieldset>
3146     <legend>Security
3147       <a class="text_11 tooltip"><span>What's this?</span>
3148         <span class="tooltip_msg"><span>
3149           These are the login credentials for the remote cluster.
3150         </span></span>
3151       </a>
3152     </legend>
3153     <ul>
3154       <li><label>Username:</label>
3155         <input name="username" type="text" /></li>
3156       <li><label>Password:</label>
3157         <input name="password" type="password" /></li>
3158       <li class="when-enterprise only-when-25"><label for="demand_encryption_flag-2">Enable Encryption</label>
3159        <input name="demandEncryption" id="demand_encryption_flag-2" type="checkbox" style="vertical-align: middle;">
3160        <a class="text_11 tooltip"><span>What's this?</span>
3161           <span class="tooltip_msg" style="width:250px"><span>
3162             If checked, XDCR data encryption occurs using SSL. Obtain the SSL certificate from the remote cluster (Settings &gt; Cluster) and paste below.
3163           </span></span>
3164         </a></li>
3165     </ul>
3166     <textarea id="ssh_key_area-2" name="certificate" style="font-size:10px;width:100%;margin:0;padding:0;min-height:20em;"></textarea>
3167    </fieldset>
3168    <div class="save_cancel">
3169      <button class="save_button float_right" type="submit">Save</button>
3170      <a class="close">Cancel</a>
3171    </div>
3172  </form>
3173</div>
3174<!-- END Create Cluster Reference -->
3175
3176<!-- Create Replication -->
3177<div class="dialog join_cluster create_replication_dialog" id="create_replication_dialog" title="Create Replication" style="width:600px">
3178  <form>
3179    <fieldset>
3180      <span class="error error-container err-_" style="margin: 10px 0;"></span>
3181      <fieldset style="float:left;width:230px;">
3182        <legend>Replicate changes from:</legend>
3183        <ul>
3184          <li><label style="text-align:left;margin-left:15px;width:51px;">Cluster:</label>
3185            <span style="font-size: 0.7em;font-weight: bold;margin-left: 0.2em;">this cluster</span>
3186          </li>
3187          <li><label for="replication_from_bucket" style="text-align:left;margin-left:15px;width:51px;">Bucket:</label>
3188            <select name="fromBucket" id="replication_from_bucket" style="width: 154px;"></select>
3189            <span class="error error-container err-fromBucket" style="margin: 10px 0;text-align: right;"></span>
3190          </li>
3191          <li class="advanced_filtering when-goxdcr-enabled when-enterprise">
3192            <label for="js_xdcr_advaced_filtering_btn">Enable Advanced filtering:</label>
3193            <input id="js_xdcr_advaced_filtering_btn" type="checkbox">
3194          </li>
3195        </ul>
3196      </fieldset>
3197      <fieldset style="float:left;width:250px;">
3198        <legend>To:</legend>
3199        <ul>
3200          <li><label for="replication_to_cluster">Cluster:</label>
3201            <select name="toCluster" id="replication_to_cluster" style="width: 154px;">
3202              <option>remote cluster list</option>
3203            </select>
3204            <span class="error error-container err-toCluster" style="margin: 10px 0;text-align: right;"></span>
3205          </li>
3206          <li><label for="replication_to_bucket">Bucket:</label>
3207            <input name="toBucket" id="replication_to_bucket" type="text" />
3208            <span class="error error-container err-toBucket" style="margin: 10px 0;text-align: right;"></span>
3209            <!-- TODO: this needs to become a select box like the one above -->
3210          </li>
3211        </ul>
3212      </fieldset>
3213      <fieldset class="xdcr_advaced_filtering xdcr_advaced_settings when-goxdcr-enabled when-enterprise" id="js_xdcr_advaced_filtering" style="clear:both;">
3214        <div id="js_xdcr_advaced_filtering_container" class="xdcr_advaced_filtering_container" style="display:none;">
3215          <div>
3216            <label for="js_filter_expression" class="filter_expression_label">Filter Expression:</label>
3217            <a class="tooltip text_11" style="line-height:20px;"><span>What's this?</span>
3218              <span class="tooltip_msg" style="width:222px;"><span>
3219                The filter expression is a regular expression against which the keys of documents are tested. If the key matches the document will be replicated; otherwise the document won’t be replicated. You may test your filter expression against a number of sample candidate keys in the provided text boxes.
3220              </span></span>
3221            </a>
3222            <div style="position: relative;">
3223              <pre id="js_filter_expression" class="test_key_result filter_expression" contenteditable="true" spellcheck="false" name="filterExpression"></pre>
3224            </div>
3225            <i class="error js_error js_filterExpression" style="display: block;clear:both;margin-top:10px;margin-left:15px;"></i>
3226          </div>
3227          <div class="js_test_keys test_keys">
3228            <label for="xdcr_advaced_settings_type">Test Key:</label>
3229            <div class="js_test_key_wrapper test_key_wrapper">
3230              <pre class="js_test_key_result test_key_result" contenteditable="true" spellcheck="false"></pre>
3231              <div id="js_match_indicator" class="match_indicator">
3232                <span class="no_match">No Match</span>
3233                <span class="loading">...</span>
3234                <span class="match">Match</span>
3235              </div>
3236            </div>
3237          </div>
3238        </div>
3239      </fieldset>
3240      <fieldset class="xdcr_advaced_settings" id="js_xdcr_advaced_settings" style="clear:both;">
3241        <legend id="js_xdcr_advaced_settings_btn">Advanced settings:</legend>
3242        <div id="js_xdcr_advaced_settings_container" class="xdcr_advaced_settings_container">
3243          <div>
3244            <label for="xdcr_advaced_settings_type">XDCR Protocol:</label>
3245            <select id="xdcr_advaced_settings_type" name="type">
3246              <option value="capi">Version 1</option>
3247              <option value="xmem" selected="selected">Version 2</option>
3248            </select>
3249          </div>
3250          <div class="when-goxdcr-disabled">
3251            <label for="max_concurrent_reps">XDCR Max Replications per Bucket:</label>
3252            <input type="text" id="max_concurrent_reps" name="maxConcurrentReps">
3253            <i class="error js_error js_maxConcurrentReps"></i>
3254          </div>
3255          <div class="when-goxdcr-disabled">
3256            <label for="worker_processes_setting">XDCR workers per Replication:</label>
3257            <input type="text" id="worker_processes_setting" name="workerProcesses">
3258            <i class="error js_error js_workerProcesses"></i>
3259          </div>
3260          <div class="when-goxdcr-enabled">
3261            <label for="source_nozzle_per_node">XDCR Source Nozzles per Node:</label>
3262            <input type="text" id="source_nozzle_per_node" name="sourceNozzlePerNode">
3263            <i class="error js_error js_sourceNozzlePerNode"></i>
3264          </div>
3265          <div class="when-goxdcr-enabled">
3266            <label for="target_nozzle_per_node">XDCR Target Nozzles per Node:</label>
3267            <input type="text" id="target_nozzle_per_node" name="targetNozzlePerNode">
3268            <i class="error js_error js_targetNozzlePerNode"></i>
3269          </div>
3270          <div>
3271            <label for="checkpoint_interval">XDCR Checkpoint Interval:</label>
3272            <input type="text" id="checkpoint_interval" name="checkpointInterval">
3273            <i class="error js_error js_checkpointInterval"></i>
3274          </div>
3275          <div>
3276            <label for="worker_batch_size">XDCR Batch Count:</label>
3277            <input type="text" id="worker_batch_size" name="workerBatchSize">
3278            <i class="error js_error js_workerBatchSize"></i>
3279          </div>
3280          <div>
3281            <label for="doc_batch_size_kb">XDCR Batch Size (kB):</label>
3282            <input type="text" id="doc_batch_size_kb" name="docBatchSizeKb">
3283            <i class="error js_error js_docBatchSizeKb"></i>
3284          </div>
3285          <div>
3286            <label for="failure_restart_interval">XDCR Failure Retry Interval:</label>
3287            <input type="text" id="failure_restart_interval" name="failureRestartInterval">
3288            <i class="error js_error js_failureRestartInterval"></i>
3289          </div>
3290          <div>
3291            <label for="optimistic_replication_threshold">XDCR Optimistic Replication Threshold:</label>
3292            <input type="text" id="optimistic_replication_threshold" name="optimisticReplicationThreshold">
3293            <i class="error js_error js_optimisticReplicationThreshold"></i>
3294          </div>
3295          <div class="when-goxdcr-enabled">
3296            <label for="statistics_collection_interval">XDCR Statistics Collection Interval (ms):</label>
3297            <input type="text" id="statistics_collection_interval" name="statsInterval">
3298            <i class="error js_error js_statsInterval"></i>
3299          </div>
3300          <div class="when-goxdcr-enabled">
3301            <label for="logging_level">XDCR Logging Level:</label>
3302            <select name="logLevel" id="logging_level">
3303              <option value="Info">Info</option>
3304              <option value="Debug">Debug</option>
3305              <option value="Trace">Trace</option>
3306              <option value="Error">Error</option>
3307            </select>
3308            <i class="error js_error js_logLevel"></i>
3309          </div>
3310        </div>
3311      </fieldset>
3312    </fieldset><input type="hidden" name="replicationType" value="continuous" />
3313    <div class="save_cancel">
3314      <button class="save_button float_right replicate-button" type="submit" style="margin-left:12px;">Replicate</button>
3315      <a class="close">Cancel</a>
3316    </div>
3317  </form>
3318</div>
3319<!-- END Create Replication -->
3320
3321<div class="auth_block" id="auth_dialog">
3322  <div class="page-header">
3323    <div class="cnt_holder main_holder">
3324      <div class="topper_nav">
3325          <a href="javascript:showAbout();">About</a>
3326          <i class="sign-out-link" style="display:none"><b>&bull;</b> <a href="javascript:ThePage.signOut();">Sign Out</a></i>
3327      </div>
3328    </div>
3329  </div>
3330  <div class="pad">
3331    <div class="alert_red" id="auth_failed_message" style="display:none;">
3332      <div class="al_text">
3333        Login failed. Try again.
3334      </div>
3335    </div>
3336    <form id="login_form" class="form block" autocomplete="off">
3337      <fieldset>
3338        <ul>
3339          <li>
3340            <label for="login_inp">Username:</label>
3341            <input type="text" name="login" id="login_inp" class="inp" autocomplete="off" />
3342          </li>
3343          <li>
3344            <label for="password2_inp">Password:</label>
3345            <input type="password" name="password" id="password2_inp" class="inp" autocomplete="off" />
3346          </li>
3347        </ul>
3348        <input type="submit" value="Sign In" class="submit" />
3349      </fieldset>
3350
3351      <div class="spinner">
3352        <noscript style="color:#1F292E;text-shadow: 0px 1px 0px #a6b1b3;line-height: 2em;padding:5% 10%;display:block;">
3353        Your browser does not support JavaScript, or it is currently disabled. This application requires a browser with JavaScript enabled. Please, see the documentation for details.
3354        </noscript>
3355        <span>Loading...</span>
3356      </div>
3357    </form>
3358  </div>
3359</div>
3360
3361<script id="js_fragmentation_settings_template" type="text/html">
3362  <p>Set the {%= name %} fragmentation level to determine the point when compaction is triggered.</p>
3363  <p class="row">
3364    {% if (name !== 'index') { %}
3365    <input type="checkbox" class="check-for-{%= name %}FragmentationThresholdPercentage">
3366    {% } %}
3367    <input type="number" name="{%= name %}FragmentationThreshold[percentage]"> %
3368    <span class="error-container err-{%= name %}FragmentationThreshold-percentage-"></span>
3369  </p>
3370  {% if (name !== 'index') { %}
3371  <p class="row">
3372    <input type="checkbox" class="check-for-{%= name %}FragmentationThresholdSize">
3373    <input type="number"  name="{%= name %}FragmentationThreshold[size]" class="size"> MB
3374    <span class="error-container err-{%= name %}FragmentationThreshold-size-"></span>
3375  </p>
3376  {% } %}
3377</script>
3378
3379<!-- END auth_block -->
3380<div class="init_block" id="init_block">
3381
3382  <div class="pad" id="init_welcome_dialog">
3383    <div class="pad-header">
3384      <img class="logo" src="images/couchbase_2.0.2.png" alt="Couchbase logo">
3385    </div>
3386    <form id="init_welcome_form" class="clearfix">
3387      <div class="version" style="display:none;"><span class="couchbase-version"></span></div>
3388      <button tabindex="1" class="setup focusme next">Setup</button>
3389    </form>
3390    <div class="welcome-footer">
3391      Copyright &copy; 2016 Couchbase, Inc. All Rights Reserved
3392      <a href="http://www.couchbase.com/contact" id="welcome-footer-contact" target="_blank">Contact</a> <a href="javascript:showAbout();">About</a>
3393    </div>
3394  </div>
3395  <!-- END welcome_block -->
3396  <div class="pad" id="init_cluster_dialog">
3397    <div class="config-top">
3398      <h1>Configure Server</h1>
3399      <h2>Step <span class="current-step">1</span> of 5</h2>
3400    </div>
3401    <h2 class="question">Configure Disk Storage</h2>
3402    <div class="disk_setup_block">
3403      <form>
3404        <input type="submit" style="width:0px; height: 0px; display: none;">
3405
3406        <div>
3407          <label for="setup_db_path_input">Databases Path:</label>
3408          <input type="text" name="db_path"
3409                 id="setup_db_path_input" />
3410          <br class="clear" />
3411        </div>
3412
3413        <div>
3414          <label>Free:</label>
3415          <span style="margin-left:5px; line-height: 25px;"
3416                class="total-db-size">---</span>
3417        </div>
3418
3419        <div>
3420          <label for="setup_index_path_input">Indexes Path:</label>
3421          <input type="text" name="index_path"
3422                 id="setup_index_path_input" />
3423          <br class="clear" />
3424        </div>
3425
3426      <div>
3427        <label>Free:</label>
3428        <span style="margin-left:5px; line-height: 25px;"
3429              class="total-index-size">---</span>
3430      </div>
3431      </form>
3432      <div class="warning init_cluster_dialog_errors_container" style="display:none;"></div>
3433      <p class="when-enterprise">
3434        Hint: if you use this server in a production environment, use different file systems for databases and indexes.
3435      </p>
3436    </div>
3437
3438    <h2 class="question">Configure Server Hostname</h2>
3439    <div class="hostname_setup_block">
3440      <div>
3441        <form>
3442          <input type="submit" style="width:0px; height: 0px; display: none;">
3443
3444          <div>
3445            <label for="setup_hostname">Hostname:</label>
3446            <input type="text" name="hostname" id="setup_hostname" />
3447            <br class="clear" />
3448          </div>
3449
3450        </form>
3451      </div>
3452      <div class="warning pat_10"
3453           id="init_cluster_dialog_hostname_errors_container"
3454           style="display:none;"></div>
3455    </div>
3456
3457    <h2 class="question">Join Cluster / Start new Cluster</h2>
3458    <p class="pad_10">
3459    If you want to add this server to an existing Couchbase Cluster, select "Join a
3460    cluster now".
3461    Alternatively, you may create a new Couchbase Cluster by selecting "Start a new
3462    cluster".
3463    </p><p class="pad_10">
3464    If you start a new cluster the "Per Server RAM Quota" you set below will define
3465    the amount of RAM each server provides to the Couchbase Cluster. This value will
3466    be inherited by all servers subsequently joining the cluster, so please set
3467    appropriately.
3468    </p>
3469    <form id="init_cluster_form" class="form block init_cluster_form"><input type="submit" style="width:0px; height: 0px; border: 0; padding: 0 0; margin: 0 0;display:none;">
3470      <div>
3471         <h3><label>
3472            <input type="radio" name="join_cluster" id="no-join-cluster" checked />
3473            Start a new cluster.
3474         </label></h3>
3475         <div class="start_new_cluster_block js_start_new_cluster_block">
3476            <div class="warning pat_10" id="init_cluster_dialog_memory_errors_container"></div>
3477            <div class="warning pat_10" id="init_cluster_service_errors_container"></div>
3478            <div id="js_start_new_cluster_memory_quoata_cont"></div>
3479         </div>
3480      </div>
3481      <div>
3482        <h3><label>
3483          <input type="radio" name="join_cluster" id="join-cluster" />
3484          Join a cluster now.
3485        </label></h3>
3486        <div class="login-credentials js_login-credentials">
3487          <p class="warning pat_10 join_cluster_dialog_errors_container"></p>
3488          <div>
3489            <label for="clusterMemberHostIp">IP Address:</label>
3490            <input type="text" class="inp" name="hostname" id="clusterMemberHostIp" value="" />
3491            <br class="clear" />
3492          </div>
3493          <div>
3494            <label for="join_user_input">Username:</label>
3495            <input type="text" class="inp" name="user" id="join_user_input" value="Administrator" />
3496            <br class="clear" />
3497          </div>
3498          <div>
3499            <label for="join_password_input">Password:</label>
3500            <input type="password" class="inp" name="password" id="join_password_input" />
3501            <br class="clear" />
3502          </div>
3503          <div>
3504            <label>Services:</label>
3505            <div  class="wizard_services js_wizard_services">
3506              <input type="checkbox" class="inp" name="services" value="kv" id="wizard_join_servers_data_checkbox" checked/>
3507              <label class="label" for="wizard_join_servers_data_checkbox">Data</label>
3508
3509              <input type="checkbox" class="inp" name="services" value="index" id="wizard_join_setup_index_checkbox" checked/>
3510              <label class="label" for="wizard_join_setup_index_checkbox">Index</label>
3511
3512              <input type="checkbox" class="inp" name="services" value="n1ql" id="wizard_join_setup_n1ql_checkbox" checked/>
3513              <label class="label" for="wizard_join_setup_n1ql_checkbox">Query</label>
3514
3515              <input type="checkbox" class="inp" name="services" value="fts" id="wizard_join_setup_fts_checkbox" checked/>
3516              <label class="label" for="wizard_join_setup_fts_checkbox">Full Text</label>
3517            </div>
3518            <a class="tooltip text_11"><span>What's this?</span>
3519              <span class="tooltip_msg" style="width:350px;"><span>
3520                Each service represents a unique workload. Please check the service you want to enable on this node.
3521              </span></span>
3522            </a>
3523          </div>
3524       </div>
3525      </div>
3526    </form>
3527    <div class="config-bottom">
3528      <button name="next" value="Next" class="submit next direction-button" id="step-2-next" type="submit">Next</button>
3529    </div>
3530    </div>
3531  <!-- END init_cluster_block -->
3532
3533  <div class="pad bucket_details" id="init_bucket_dialog">
3534    <div class="config-top">
3535      <h1>Create Default Bucket</h1>
3536      <h2>Step <i class="current-step">3</i> of 5</h2>
3537    </div>
3538    <form>
3539    <div class="clearfix">
3540      <h2>Bucket Settings</h2>
3541      <div class="bucket-icon sub_section">
3542        <div>
3543          <label>Bucket Name:</label>
3544          <strong>default</strong>
3545        </div>
3546        <div>
3547          <label>Bucket Type:</label>
3548          <div class="with_radiogroup">
3549            <div>
3550              <input type="radio" name="bucketType" value="membase" id="bucket_type_membase_init">
3551              <label for="bucket_type_membase_init">Couchbase</label>
3552            </div>
3553            <div>
3554              <input type="radio" name="bucketType" value="memcached" id="bucket_type_memcached_init">
3555              <label for="bucket_type_memcached_init">Memcached</label>
3556            </div>
3557          </div>
3558        </div>
3559      </div>
3560
3561      <h2>Memory Size</h2>
3562      <div class="sub_section" style="margin-right: 0;">
3563        <div class="for-ram-quota">
3564          <div class="size-gauge for-ram">
3565            <div class="top-right">Cluster quota (0 MB)</div>
3566            <div class="usage">
3567              <div style="width:100%;background-color:#E1E2E3"></div>
3568            </div>
3569            <table style="width:100%;">
3570              <tbody>
3571                <tr><td style="text-align:left;color:#1878a2;">Other Buckets (0 B)</td><td style="text-align:center;color:#409f05;">This Bucket (0 MB)</td><td style="text-align:right;color:#444245;">Free (0 MB)</td></tr>
3572              </tbody>
3573            </table>
3574          </div>
3575          <div class="gauge-label">
3576            <label for="ram_quota_mb_init">Per Node RAM Quota:</label>
3577            <input name="ramQuotaMB" class="focusme" type="text" value="30" id="ram_quota_mb_init">
3578            <abbr>MB</abbr>
3579          </div>
3580        </div>
3581        <div class="error-container err-ramQuotaMB"></div>
3582        <p class="memcached-summary when-non-persistent"></p>
3583        <div class="cache_metadata_block persistent-only">
3584          <label>Cache Metadata:</label>
3585          <div class="with_radiogroup">
3586            <div>
3587              <input type="radio" name="evictionPolicy" value="valueOnly" id="cache_metadata_retain-init" checked="checked">
3588              <label for="cache_metadata_retain-init">Value Ejection</label>
3589            </div>
3590            <div>
3591              <input type="radio" name="evictionPolicy" value="fullEviction" id="cache_metadata_non_retain-init">
3592              <label for="cache_metadata_non_retain-init">Full Ejection</label>
3593            </div>
3594          </div>
3595          <a class="tooltip text_11"><span>What's this?</span>
3596            <span class="tooltip_msg" style="width:350px;"><span>
3597              Value Ejection - During ejection, only the value will be ejected (key and metadata will remain in memory).
3598              Full Ejection - During ejection, everything (including key, metadata and value) will be ejected.
3599              Value Ejection needs more system memory but provides the best performance. Full Ejection reduces memory overhead requirement.
3600            </span></span>
3601          </a>
3602        </div>
3603      </div>
3604
3605      <div class="persistent-only">
3606        <h2>Replicas</h2>
3607        <div class="sub_section replicas_settigns">
3608          <input type="checkbox" checked id="for-enable-replicas-init" class="js_for-enable-replicas">
3609          <label for="for-enable-replicas-init">Enable</label>
3610          <input class="hidden-replica-number" type="hidden" name="replicaNumber" value="0" disabled>
3611          <div class="for-replica-number">
3612            <select name="replicaNumber">
3613              <option value="1">1</option><option value="2">2</option><option value="3">3</option>
3614            </select>
3615            <label>Number of replica (backup) copies</label>
3616          </div>
3617          <div class="error-container err-replicaNumber"></div>
3618          <div></div>
3619          <input type="hidden" name="replicaIndex" value="0">
3620          <input type="checkbox" name="replicaIndex" value="1" id="label_replica_index_flag-init">
3621          <label for="label_replica_index_flag-init">View index replicas</label>
3622        </div>
3623      </div><!-- .persistent-only -->
3624
3625      <div class="persistent-only bucket-io-priority">
3626        <h2>Disk I/O Optimization</h2>
3627        <div class="sub_section">
3628          <label>Set the bucket disk I/O priority:</label>
3629          <div class="with_radiogroup">
3630            <div>
3631              <input type="radio" name="threadsNumber" value="3" checked="checked" id="low_threads_number_init">
3632              <label for="low_threads_number_init">Low (default)</label>
3633            </div>
3634            <div>
3635              <input type="radio" name="threadsNumber" value="8" id="hight_threads_number_init">
3636              <label for="hight_threads_number_init">High</label>
3637            </div>
3638          </div>
3639          <a class="tooltip text_11"><span>What's this?</span>
3640            <span class="tooltip_msg" style="width:200px;"><span>
3641                This is an advanced setting for Disk I/O optimization which allows tasks to be handled based on priority.
3642            </span></span>
3643          </a>
3644        </div>
3645      </div> <!-- .persistent-only -->
3646
3647      <h2>Flush</h2>
3648      <div class="sub_section">
3649        <input type="checkbox" class="for-enable-flush" id="for-enable-flush-init" name="flushEnabled" value="1">
3650        <label for="for-enable-flush-init">Enable</label>
3651        <a class="tooltip text_11"><span>What's this?</span>
3652          <span class="tooltip_msg" style="width:218px;"><span>
3653            When flushed, items in memcached buckets are flagged for removal and subsequently removed; items in couchbase buckets are immediately removed. This does not affect the item count immediately.
3654          </span></span>
3655        </a>
3656      </div>
3657    </div>
3658
3659    <div class="config-bottom">
3660    <button name="finish" class="submit finish direction-button" type="submit">Next</button>
3661    <button name="back" class="submit back direction-button" id="step-init-bucket-back" type="button">Back</button>
3662    </div></form>
3663  </div>
3664  <!-- END init_bucket_block -->
3665
3666  <div class="pad" id="init_setting_memory_quota_dialog"><form>
3667    <div class="config-top">
3668      <h1>Set RAM Quota</h1>
3669      <h2>Step <span class="current-step">5</span> of 5</h2>
3670    </div>
3671    <h2 class="question">Set RAM Quota</h2>
3672    <p class="pad_10" style="margin:20px 85px;">
3673      As this is the first server node provisioned with an index service, please review and set the per-server index RAM quota. This is one time only: when you add further index server nodes, we will not ask you to review this value again.
3674    </p>
3675    <div id="js_join_wizard_cluster_quota" class="cluster_quota_settings pad_10"></div>
3676    <div class="config-bottom">
3677      <button name="next" value="Next" class="submit next direction-button" type="submit">Set Quota</button>
3678    </div>
3679  </form></div>
3680
3681  <div class="pad" id="init_update_notifications_dialog"><form>
3682    <div class="config-top">
3683      <h1>Notifications</h1>
3684      <h2>Step <span class="current-step">4</span> of 5</h2>
3685    </div>
3686    <h2 class="question">Update Notifications</h2>
3687    <p class="pad_10">
3688      <label for="init-notifications-updates-enabled">
3689        <input type="checkbox" id="init-notifications-updates-enabled" checked="checked">
3690        <span>Enable software update notifications</span>
3691      </label>
3692      <a class="tooltip text_11"><span>What's this?</span>
3693        <span class="tooltip_msg" style="width:300px;"><span>
3694            Enabling software update notifications allows notification in the Couchbase web console when a new version of Couchbase Server is available. Configuration information transferred in the update check is anonymous and does not include any stored key-value data.
3695        </span></span>
3696      </a>
3697    </p>
3698    <div class="when-community">
3699      <h2 class="question">Community Updates</h2>
3700      <p class="pad_10">Please provide your email address to join the community and receive news on coming events.</p>
3701    </div>
3702    <div class="when-enterprise">
3703      <h2 class="question">Product Registration</h2>
3704      <p class="pad_10 clearfix">Register your Enterprise Edition of Couchbase Server below.</p>
3705    </div>
3706    <div class="pad_10 warn" id="update_notifications_errors_container"></div>
3707    <script type="text/html" id="update_notifications_errors_template">
3708      <ul>
3709      <!-- {% _.each(rows, function (errorMsg) { %} -->
3710        <li>{%= h(errorMsg) %}</li>
3711      <!-- {% }); %} -->
3712      </ul>
3713    </script>
3714    <div class="subscribe_fields">
3715      <p class="pad_10">
3716        <label for="init-join-community-email">
3717          <span class="field-label">Email:</span>
3718          <input id="init-join-community-email" class="focusme">
3719          <span class="error-container err-name"></span>
3720        </label>
3721      </p>
3722      <p class="pad_10">
3723        <label for="init-join-community-firstname">
3724          <span class="field-label">First name:</span>
3725          <input id="init-join-community-firstname">
3726          <span class="error-container err-firstname"></span>
3727        </label>
3728      </p>
3729      <p class="pad_10">
3730        <label for="init-join-community-lastname">
3731          <span class="field-label">Last name:</span>
3732          <input id="init-join-community-lastname">
3733          <span class="when-required" style="color:red;">*</span>
3734          <span class="error-container err-lastname"></span>
3735        </label>
3736      </p>
3737      <p class="pad_10">
3738        <label for="init-join-community-company">
3739          <span class="field-label">Company:</span>
3740          <input id="init-join-community-company">
3741          <span class="error-container err-company"></span>
3742        </label>
3743      </p>
3744      <p class="when-enterprise pad_10">
3745        <label for="init-join-terms"><input type="checkbox" id="init-join-terms">
3746          <span>I agree to the <a href="http://www.couchbase.com/agreement/free-license" target="_blank">terms and conditions</a> associated with this product. <span style="color:red">*</span></span>
3747        </label>
3748      </p>
3749    </div>
3750    <div class="config-bottom">
3751      <button name="next" value="Next" class="submit next direction-button" id="step-3-next" type="submit">Next</button>
3752      <button name="back" value="Back" class="submit back direction-button" id="step-3-back" type="button">Back</button>
3753    </div>
3754  </form></div>
3755  <!-- END init_update_notifications-->
3756  <div class="pad" id="init_sample_buckets_dialog"><form>
3757    <div class="config-top">
3758      <h1>Sample Buckets</h1>
3759      <h2>Step <span class="current-step">2</span> of 5</h2>
3760    </div>
3761    <h2 class="question">Sample Data and Views</h2>
3762    <p class="pad_10">
3763      Sample buckets contain example data and Couchbase views. You can provision one or more sample buckets to help you discover the power of Couchbase Server. Sample buckets can be removed later from the bucket edit panel.
3764    </p>
3765    <h3>Available Samples</h3>
3766    <ul id="setup_available_samples"></ul>
3767    <div class="config-bottom">
3768      <button name="next" value="Next" class="submit next direction-button" id="step-4-next" type="submit">Next</button>
3769      <button name="back" value="Back" class="submit back direction-button" id="step-4-back" type="button">Back</button>
3770    </div>
3771  </form></div>
3772  <!-- END init_sample_buckets_dialog -->
3773  <div class="pad" id="init_secure_dialog">
3774   <div class="config-top">
3775      <h1>Configure Server</h1>
3776      <h2>Step <span class="current-step">5</span> of 5</h2>
3777    </div>
3778    <div class="alert_red" id="init_secure_failed_message" style="display:none;">
3779      <div class="al_text">
3780        Could not secure the server because of bad input.
3781      </div>
3782    </div>
3783    <h2 class="question">Secure this Server</h2>
3784    <p class="pad_10">
3785      Please create an administrator account for this Server. If you want to join other
3786      servers to this one to form a cluster, you will need to use these administrator
3787      credentials in the "join cluster" process.
3788    </p>
3789    <div class="warn pad_10">
3790        <ul></ul>
3791      </div>
3792    <form id="init_secure_form" class="form block" action="/settings/web" autocomplete="off">
3793      <input type="text" name="port"
3794            style="display:none;" value="SAME"/>
3795      <div class="username-input">
3796        <label for="secure-username">Username:</label>
3797        <input type="text" name="username" class="inp" value="Administrator" id="secure-username" maxlength="24" />
3798      </div>
3799      <div class="password-input">
3800        <label for="secure-password">Password:</label>
3801        <input type="password" name="password" class="inp focusme" id="secure-password" autocomplete="off" />
3802      </div>
3803      <div class="password-input-verify">
3804        <label for="secure-password">Verify Password:</label>
3805        <input type="password" name="password" class="inp" id="secure-password-verify" autocomplete="off" />
3806      </div>
3807      <!--button type="submit" style="display:none;"></button-->
3808    <div class="config-bottom">
3809      <button name="finish" value="Finish" class="submit finish direction-button" id="step-5-finish" type="submit">Next</button>
3810      <button name="back" value="Back" class="submit back direction-button" id="step-5-back" type="button">Back</button>
3811    </div>
3812    </form>
3813  </div>
3814  <!-- END init_secure_block -->
3815</div>
3816<!-- END init_block -->
3817<script id="notice_template" type="text/html">
3818<div class="shadow_box notice">
3819    <h2 class="header_2">Couchbase Server Message<span style="float: right; color: black; font-size: 13px;">click to dismiss</span></h2>
3820    <div class="pad_10 success_msg">
3821      <p class="info_text">{%= h(text) %}</p>
3822    </div>
3823</div>
3824</script>
3825<script id="noticeErr_template" type="text/html">
3826<div class="shadow_box notice">
3827    <h2 class="header_2">Couchbase Server Alert<span style="float: right; color: black; font-size: 13px;">click to dismiss</span></h2>
3828    <div class="pad_10 error_msg">
3829      <p class="info_text">{%= h(text) %}</p>
3830    </div>
3831</div>
3832</script>
3833<script type="text/html" id="js_memory_quota_settings_widget_template">
3834  <div class="error-container err-_"></div>
3835  {% if (totalMemorySize) { %}
3836  <div class="row">
3837    <label>RAM Available: </label>
3838    <span class="ram-total-size">{%= h(totalMemorySize) %} MB</span>
3839  </div>
3840  {% } %}
3841  {% if (isServicesControllsAvailable) { %}
3842    <div class="row">
3843      <label>Services:</label>
3844      <div class="wizard_services">
3845        <input type="checkbox" class="js_service_flag" name="services" value="kv" id="{%= prefix %}_kv_checkbox" checked disabled />
3846        <label class="label" for="{%= prefix %}_kv_checkbox">Data</label>
3847        <input type="checkbox" class="js_service_flag" name="services" value="index" id="{%= prefix %}_index_checkbox" checked />
3848        <label class="label" for="{%= prefix %}_index_checkbox">Index</label>
3849        <input type="checkbox" class="js_service_flag" name="services" value="n1ql" id="{%= prefix %}_n1ql_checkbox" checked />
3850        <label class="label" for="{%= prefix %}_n1ql_checkbox">Query</label>
3851        <input type="checkbox" class="js_service_flag" name="services" value="fts" id="{%= prefix %}_fts_checkbox" checked />
3852        <label class="label" for="{%= prefix %}_fts_checkbox">Full Text</label>
3853      </div>
3854      <a class="tooltip text_11"><span>What&#39;s this?</span>
3855        <span class="tooltip_msg" style="width:350px;"><span>
3856          Each service represents a unique workload. Please check the service you want to enable on this node.
3857        </span></span>
3858      </a>
3859    </div>
3860  {% } %}
3861  {% if (showKVMemoryQuota) { %}
3862  <div class="memory-quota row">
3863    <label for="{%= prefix %}_kv_ram_quota">Data RAM Quota:</label>
3864    <input type="number" class="focusme js_ram_quota" id="{%= prefix %}_kv_ram_quota" name="memoryQuota" value="{%= h(memoryQuota) %}" {%= roAdmin ? "disabled" : "" %} />
3865    <span>MB (min {%= minMemorySize %} MB)</span>
3866    <a class="tooltip text_11"><span>What&#39;s this?</span>
3867      <span class="tooltip_msg" style="width:150px;"><span>
3868        Main memory allocation amount for data service per node.
3869      </span></span>
3870    </a>
3871    <span class="error-container err-memoryQuota"></span>
3872  </div>
3873  {% } %}
3874  {% if (showIndexMemoryQuota) { %}
3875  <div class="memory-quota row">
3876    <label for="{%= prefix %}_index_ram_quota">Index RAM Quota:</label>
3877    <input type="number" class="js_ram_quota" id="{%= prefix %}_index_ram_quota" name="indexMemoryQuota" value="{%= h(indexMemoryQuota) %}" {%= roAdmin ? "disabled" : "" %} />
3878    <span>MB (min 256 MB)</span>
3879    <a class="tooltip text_11"><span>What&#39;s this?</span>
3880      <span class="tooltip_msg" style="width:150px;"><span>
3881        Main memory allocation amount for index service per node.
3882      </span></span>
3883    </a>
3884    <span class="error-container err-indexMemoryQuota"></span>
3885  </div>
3886  {% } %}
3887  {% if (maxMemorySize) { %}
3888  <div class="row">
3889    <label>Total Per Server:</label>
3890    <span><span class="js_per_server_total"></span> MB (must be less than <span class="js_max_ram_size">{%= h(maxMemorySize + 1) %}</span> MB) </span>
3891  </div>
3892  {% } %}
3893</script>
3894
3895<!--[if IE]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
3896<script src="js/bugsnag.js" data-apikey="01000110010000010100101101000101" data-endpoint="....."></script>
3897<script src="js/jquery.js"></script>
3898<script src="js/bugsnag-override.js"></script>
3899<script>
3900$(function() {
3901  if ($.browser.mozilla) {
3902    $('body').addClass('firefox');
3903  }
3904});
3905</script>
3906<script src="js/jquery-ui.custom.js"></script>
3907<script src="js/jquery.flot.js"></script>
3908<script src="js/jquery.sparkline.js"></script>
3909<script type="text/javascript" src="js/jquery.selectBox.js"></script>
3910<script src="js/jquery.ba-bbq.js"></script>
3911<script src="js/jquery.ba-outside-events.js"></script>
3912<!--[if lt IE 9]>
3913<script>
3914$(window).bind('template:rendered', function () {
3915  $('table.lined_tab').each(function () {
3916    $(this).find('tr:has(td):odd').addClass('highlight');
3917  });
3918});
3919</script>
3920<![endif]-->
3921<script src="js/underscore.js"></script>
3922<script src="js/tools.tabs.js"></script>
3923<script src="js/jquery.cookie.js"></script>
3924<script src="js/futon.format.js"></script>
3925<script src="js/codemirror/codemirror.js"></script>
3926<script src="js/codemirror/javascript.js"></script>
3927<script src="js/misc.js"></script>
3928<script src="js/base64.js"></script>
3929<script src="js/jst.js"></script>
3930<script src="js/cells.js"></script>
3931<script src="js/app-ui-misc.js"></script>
3932<script src="js/app-misc.js"></script>
3933<script src="js/core-data.js"></script>
3934<script src="js/analytics.js"></script>
3935<script src="js/logs.js"></script>
3936<script src="js/groups.js"></script>
3937<script src="js/servers.js"></script>
3938<script src="js/settings.js"></script>
3939<script src="js/buckets.js"></script>
3940<script src="js/filter.js"></script>
3941<script src="js/views.js"></script>
3942<script src="js/indexes.js"></script>
3943<script src="js/replications.js"></script>
3944<script src="js/documents.js"></script>
3945<script src="js/overview.js"></script>
3946<script src="js/all-images.js"></script>
3947<script src="js/global_progress.js"></script>
3948<script src="js/app.js"></script>
3949</body>
3950</html>
3951