|
85 | 85 | <!-- Topbar Navbar -->
|
86 | 86 | <ul class="navbar-nav ml-auto">
|
87 | 87 |
|
88 |
| - <li class="nav-item"> |
89 |
| - <a class="nav-link" href="#" data-toggle="modal" data-target="#clientCertModal"> |
90 |
| - <span class="mr-2 d-none d-lg-inline text-primary"> |
91 |
| - Client Certificate |
92 |
| - </span> |
93 |
| - </a> |
94 |
| - </li> |
95 |
| - |
96 |
| - <li class="nav-item"> |
97 |
| - <a class="nav-link" href="#" data-toggle="modal" data-target="#addLxdModal"> |
98 |
| - <span class="mr-2 d-none d-lg-inline text-primary"> |
99 |
| - Add Remote Host |
100 |
| - </span> |
101 |
| - </a> |
102 |
| - </li> |
103 |
| - |
104 | 88 | <div class="topbar-divider d-none d-sm-block"></div>
|
105 | 89 |
|
106 | 90 | <!-- Nav Item - User Information -->
|
|
135 | 119 |
|
136 | 120 | <!-- Page Heading -->
|
137 | 121 | <div class="d-sm-flex align-items-center justify-content-between mb-4">
|
138 |
| - <h1 class="h3 mb-0 text-gray-800">Remote Host Configuration</h1> |
| 122 | + <h1 class="h3 mb-0 text-gray-800">Remote LXD Hosts</h1> |
139 | 123 | </div>
|
140 | 124 |
|
141 | 125 |
|
142 | 126 | <div class="row">
|
143 | 127 | <div class="col-12">
|
144 | 128 | <!-- LXD Host List -->
|
145 |
| - |
146 |
| - <p><i class="fas fa-question-circle fa-fw"></i> Before adding a remote host, first copy the client <a href="#" data-toggle="modal" data-target="#clientCertModal">certificate</a> |
147 |
| - information and paste it into a new file on your remote LXD server such as <strong><em>lxdware.crt</em></strong>. |
148 |
| - Then import the certificate on your remote LXD server by running the command: <code>lxc config trust add lxdware.crt</code>. |
149 |
| - For LXD hosts that are not part of a cluster, use the <code>lxc config set core.https_address [::]</code> command |
150 |
| - to listen for incoming connections.</p> |
151 | 129 |
|
152 | 130 | <div class="card shadow mb-4">
|
153 | 131 | <!-- Card Header - Dropdown -->
|
154 | 132 | <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
|
155 |
| - <h6 class="m-0 font-weight-bold text-primary">LXD Remote Hosts</h6> |
| 133 | + <h6 class="m-0 font-weight-bold text-primary">LXD Hosts</h6> |
156 | 134 | <div class="dropdown no-arrow">
|
157 |
| - <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
158 |
| - <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i> |
159 |
| - </a> |
160 |
| - <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink"> |
161 |
| - <div class="dropdown-header">Options:</div> |
162 |
| - <a class="dropdown-item" href="#" data-toggle="modal" data-target="#clientCertModal">Client Certificate</a> |
163 |
| - <a class="dropdown-item" href="#" data-toggle="modal" data-target="#addLxdModal">Add Remote Host</a> |
164 |
| - </div> |
| 135 | + <a class="dropdown-toggle mr-3" href="#" data-toggle="modal" data-target="#clientCertModal"> |
| 136 | + View Certificate</a> |
| 137 | + <a class="dropdown-toggle mr-3" href="#" data-toggle="modal" data-target="#addLxdModal"> |
| 138 | + Add Host</a> |
| 139 | + <a class="dropdown-toggle mr-2" href="#" data-toggle="modal" data-target="#helpModal" title="Help" aria-hidden="true"> |
| 140 | + <i class="fas fa-question-circle fa-sm fa-fw"></i></a> |
165 | 141 | </div>
|
166 | 142 | </div>
|
167 | 143 | <!-- Card Body -->
|
@@ -209,12 +185,40 @@ <h6 class="m-0 font-weight-bold text-primary">LXD Remote Hosts</h6>
|
209 | 185 | <i class="fas fa-angle-up"></i>
|
210 | 186 | </a>
|
211 | 187 |
|
| 188 | + <!-- Help Modal--> |
| 189 | + <div class="modal fade" id="helpModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> |
| 190 | + <div class="modal-dialog modal-lg" role="document"> |
| 191 | + <div class="modal-content"> |
| 192 | + <div class="modal-header"> |
| 193 | + <h5 class="modal-title" id="exampleModalLabel">Instructions</h5> |
| 194 | + <button class="close" type="button" data-dismiss="modal" aria-label="Close"> |
| 195 | + <span aria-hidden="true">×</span> |
| 196 | + </button> |
| 197 | + </div> |
| 198 | + <div class="modal-body"> |
| 199 | + <div class="row"> |
| 200 | + <div class="col-12"> |
| 201 | + <p>Before adding a remote host, first copy the client <a href="#" data-toggle="modal" data-target="#clientCertModal">certificate</a> |
| 202 | + and paste it into a new file on your remote LXD server such as <strong><em>lxdware.crt</em></strong>.</p> |
| 203 | + <p>Import the certificate on your remote LXD server by running the command: <code>lxc config trust add lxdware.crt</code></p> |
| 204 | + <p>For LXD hosts that are not part of a cluster, use the <code>lxc config set core.https_address [::]</code> |
| 205 | + command to listen for incoming connections.</p> |
| 206 | + </div> |
| 207 | + </div> |
| 208 | + </div> |
| 209 | + <div class="modal-footer"> |
| 210 | + <button class="btn btn-secondary" type="button" data-dismiss="modal">Dismiss</button> |
| 211 | + </div> |
| 212 | + </div> |
| 213 | + </div> |
| 214 | + </div> |
| 215 | + |
212 | 216 | <!-- Client Cert Modal-->
|
213 | 217 | <div class="modal fade" id="clientCertModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
214 | 218 | <div class="modal-dialog modal-lg" role="document">
|
215 | 219 | <div class="modal-content">
|
216 | 220 | <div class="modal-header">
|
217 |
| - <h5 class="modal-title" id="exampleModalLabel">LXD Client Cert</h5> |
| 221 | + <h5 class="modal-title" id="exampleModalLabel">LXD Client Certificate</h5> |
218 | 222 | <button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
219 | 223 | <span aria-hidden="true">×</span>
|
220 | 224 | </button>
|
@@ -351,10 +355,7 @@ <h5 class="modal-title" id="exampleModalLabel">About LXDWARE Dashboard</h5>
|
351 | 355 | }
|
352 | 356 |
|
353 | 357 | function reloadPageContent() {
|
354 |
| - $('#lxdListTable').DataTable().ajax.reload(); |
355 |
| - |
356 |
| - //Set the page content to reload again in 5 more seconds |
357 |
| - setTimeout(() => { reloadPageContent(); }, 5000); |
| 358 | + $('#lxdListTable').DataTable().ajax.reload(null, false); |
358 | 359 | }
|
359 | 360 |
|
360 | 361 | function loadPageContent(){
|
@@ -387,8 +388,9 @@ <h5 class="modal-title" id="exampleModalLabel">About LXDWARE Dashboard</h5>
|
387 | 388 | $("#clientCert").html(data);
|
388 | 389 | });
|
389 | 390 |
|
390 |
| - //Set the page content to reload once in 5 seconds |
391 |
| - setTimeout(() => { reloadPageContent(); }, 5000); |
| 391 | + //Set the page content to reload in 5 seconds |
| 392 | + setInterval(() => { reloadPageContent(); }, 5000); |
| 393 | + |
392 | 394 | }
|
393 | 395 |
|
394 | 396 | function addRemote(){
|
|
0 commit comments