1<!--
2     Copyright 2020-Present Couchbase, Inc.
3
4     Use of this software is governed by the Business Source License included
5     in the file licenses/BSL-Couchbase.txt.  As of the Change Date specified
6     in that file, in accordance with the Business Source License, use of this
7     software will be governed by the Apache License, Version 2.0, included in
8     the file licenses/APL2.txt.
9-->
10
11<div [formGroup]="group">
12  <div class="formrow">
13    <div class="row">
14      <label for="setup_hostname">Host Name / IP Address</label>
15      <small class="text-smaller">Fully-qualified domain name</small>
16    </div>
17    <input
18       type="text"
19       autocorrect="off"
20       spellcheck="false"
21       autocapitalize="off"
22       name="hostname"
23       id="setup_hostname"
24       [mnFocus]="focusFieldSubject"
25       mnName="hostname"
26       formControlName="hostname">
27    <div
28       class="error error-form"
29       [hidden]="!(postNodeInitHttp.error | async)?.errors?.hostname">
30      {{(postNodeInitHttp.error | async)?.errors?.hostname}}
31    </div>
32    <div
33       class="error error-form"
34       [hidden]="!(postClusterInitHttp.error | async)?.errors?.hostname">
35      {{(postClusterInitHttp.error | async)?.errors?.hostname}}
36    </div>
37  </div>
38
39  <div
40     formGroupName="hostConfig"
41     *ngIf="isHostCfgEnabled && (isEnterprise | async)">
42    <div class="formrow">
43      <input
44         type="checkbox"
45         id="for-node-encryption"
46         formControlName="nodeEncryption">
47      <label for="for-node-encryption" class="margin-right-quarter">
48        enable node-to-node encryption
49      </label>
50      <span
51         class="fa-stack icon-info"
52         ngbTooltip="Network traffic between the individual nodes of a
53         Couchbase Server cluster can be encrypted, in order to optimize
54         cluster internal security."
55         placement="right">
56        <span class="icon fa-circle-thin fa-stack-2x"></span>
57        <span class="icon fa-info fa-stack-1x"></span>
58      </span>
59      <div
60         class="error error-form"
61         [hidden]="!(postClusterInitHttp.error | async)?.errors?.nodeEncryption">
62        {{(postClusterInitHttp.error | async)?.errors.nodeEncryption}}
63      </div>
64    </div>
65
66    <label class="inline margin-right-quarter">IP Family Preference</label>
67    <span
68       class="fa-stack icon-info"
69       ngbTooltip="Selecting IPv4 or IPv6 will instruct services in the cluster to listen on those
70                   addresses, though as a convenience some services will also listen on the other address family.
71                   Selecting &quot;IPv4/IPv6-only&quot; will instruct services to ONLY listen on the selected addresses."
72       placement="right">
73      <span class="icon fa-circle-thin fa-stack-2x"></span>
74      <span class="icon fa-info fa-stack-1x"></span>
75    </span>
76
77    <div class="formrow">
78      <div class="form-inline">
79        <input
80           type="radio"
81           formControlName="addressFamilyUI"
82           value="inet"
83           id="for-use-ipv4">
84        <label for="for-use-ipv4">
85          IPv4
86        </label>
87        <input
88           type="radio"
89           formControlName="addressFamilyUI"
90           value="inet6"
91           id="for-use-ipv6">
92        <label for="for-use-ipv6">
93          IPv6
94        </label>
95        <input
96           type="radio"
97           formControlName="addressFamilyUI"
98           value="inetOnly"
99           id="for-use-ipv4-only">
100        <label for="for-use-ipv4-only">
101          IPv4-only
102        </label>
103        <input
104           type="radio"
105           formControlName="addressFamilyUI"
106           value="inet6Only"
107           id="for-use-ipv6-only">
108        <label for="for-use-ipv6-only">
109          IPv6-only
110        </label>
111      </div>
112      <div
113         class="error error-form"
114         *ngIf="getAddressFamilyUI().hasError('ipvOnly')">
115        Can't set IPv{{getAddressFamilyUI().errors?.ipvOnly.value}}-only from an IPv{{getAddressFamilyUI().errors?.ipvOnly.kind}} address; please access this server via an IPv{{getAddressFamilyUI().errors?.ipvOnly.value}} address
116      </div>
117      <div
118         class="error error-form"
119         *ngIf="getAddressFamilyUI().warnings?.ipvOnly">
120        You have selected IPv{{getAddressFamilyUI().warnings?.ipvOnly.value}}-only. If the domain name with which you have accessed this server is only available under IPv{{getAddressFamilyUI().warnings?.ipvOnly.value}} you will not be able to complete initialization
121      </div>
122      <div
123         class="error error-form"
124         [hidden]="!(postClusterInitHttp.error | async)?.errors?.afamily">
125        {{(postClusterInitHttp.error | async)?.errors.afamily}}
126      </div>
127      <div
128         class="error error-form"
129         [hidden]="!(postClusterInitHttp.error | async)?.errors?.afamilyOnly">
130        {{(postClusterInitHttp.error | async)?.errors.afamilyOnly}}
131      </div>
132    </div>
133  </div>
134</div>
135