|
27 | 27 | {{ if not .EnrollExpired }}
|
28 | 28 | <div class="card-header-action mr-3">
|
29 | 29 | <button id="enroll_expire" class="btn btn-sm btn-block btn-danger"
|
30 |
| - data-toggle="tooltip" data-placement="bottom" title="Expire" onclick="expireEnrollLink();"> |
| 30 | + data-tooltip="true" data-placement="bottom" title="Expire" onclick="expireEnrollLink();"> |
31 | 31 | <i class="far fa-times-circle"></i>
|
32 | 32 | </button>
|
33 | 33 | </div>
|
34 | 34 | {{ end }}
|
35 | 35 | {{ if .EnrollExpired }}
|
36 | 36 | <div class="card-header-action mr-3">
|
37 | 37 | <button id="enroll_extend" class="btn btn-sm btn-block btn-success"
|
38 |
| - data-toggle="tooltip" data-placement="bottom" title="Extend 24 hours" onclick="extendEnrollLink();"> |
| 38 | + data-tooltip="true" data-placement="bottom" title="Extend 24 hours" onclick="extendEnrollLink();"> |
39 | 39 | <i class="far fa-clock"></i>
|
40 | 40 | </button>
|
41 | 41 | </div>
|
|
67 | 67 |
|
68 | 68 | </div>
|
69 | 69 |
|
| 70 | + <hr> |
| 71 | + |
70 | 72 | <div class="row mb-4">
|
71 | 73 | <div class="col-md-12">
|
72 | 74 | Run this command in Windows to quickly add nodes in the environment {{ .EnvName }}. It will install osquery in the system:
|
|
98 | 100 | {{ if not .RemoveExpired }}
|
99 | 101 | <div class="card-header-action mr-3">
|
100 | 102 | <button id="remove_expire" class="btn btn-sm btn-block btn-danger"
|
101 |
| - data-toggle="tooltip" data-placement="bottom" title="Expire" onclick="expireRemoveLink();"> |
| 103 | + data-tooltip="true" data-placement="bottom" title="Expire" onclick="expireRemoveLink();"> |
102 | 104 | <i class="far fa-times-circle"></i>
|
103 | 105 | </button>
|
104 | 106 | </div>
|
105 | 107 | {{ end }}
|
106 | 108 | {{ if .RemoveExpired }}
|
107 | 109 | <div class="card-header-action mr-3">
|
108 | 110 | <button id="remove_extend" class="btn btn-sm btn-block btn-success"
|
109 |
| - data-toggle="tooltip" data-placement="bottom" title="Extend 24 hours" onclick="extendRemoveLink();"> |
| 111 | + data-tooltip="true" data-placement="bottom" title="Extend 24 hours" onclick="extendRemoveLink();"> |
110 | 112 | <i class="far fa-clock"></i>
|
111 | 113 | </button>
|
112 | 114 | </div>
|
|
136 | 138 | </div>
|
137 | 139 | </div>
|
138 | 140 |
|
| 141 | + <hr> |
| 142 | + |
139 | 143 | <div class="row mb-4">
|
140 | 144 | <div class="col-md-12">
|
141 | 145 | Run this command in Windows to quickly <span style="color:red;">remove</span> nodes in the environment {{ .EnvName }}. It will NOT remove osquery from the system:
|
|
157 | 161 | </div>
|
158 | 162 | </div>
|
159 | 163 |
|
| 164 | + <div class="card mt-2"> |
| 165 | + <div class="card-header"> |
| 166 | + <i class="fas fa-key"></i> Values to manually enroll nodes for environment <b>{{ .EnvName }}</b> |
| 167 | + <div class="card-header-actions"> |
| 168 | + |
| 169 | + <div class="row"> |
| 170 | + <div class="card-header-action mr-3"> |
| 171 | + <button id="show_values" class="btn btn-sm btn-block btn-info" |
| 172 | + data-placement="bottom" title="Show values" data-tooltip="true" |
| 173 | + data-toggle="collapse" data-target=".manual-values"> |
| 174 | + <i class="far fa-eye"></i> |
| 175 | + </button> |
| 176 | + </div> |
| 177 | + </div> |
| 178 | + |
| 179 | + </div> |
| 180 | + </div> |
| 181 | + <div class="card-body collapse manual-values"> |
| 182 | + |
| 183 | + <div class="row mb-4"> |
| 184 | + <div class="col-md-12"> |
| 185 | + Enrollment secret: |
| 186 | + </div> |
| 187 | + </div> |
| 188 | + <div class="row mb-4"> |
| 189 | + <div class="col-md-12"> |
| 190 | + <button id="button-clipboard-values" class="btn-sm btn-clipboard mr-2" data-clipboard-action="copy" data-clipboard-target="#enroll-secret"> |
| 191 | + Copy |
| 192 | + </button> |
| 193 | + <div class="highlight"> |
| 194 | + <code id="enroll-secret"> |
| 195 | + {{ .Secret }} |
| 196 | + </code> |
| 197 | + </div> |
| 198 | + </div> |
| 199 | + </div> |
| 200 | + |
| 201 | + <hr> |
| 202 | + |
| 203 | + <div class="row mb-4"> |
| 204 | + <div class="col-md-12"> |
| 205 | + Enrollment flags for osquery: |
| 206 | + </div> |
| 207 | + </div> |
| 208 | + <div class="row mb-4"> |
| 209 | + <div class="col-md-12"> |
| 210 | + <button id="button-clipboard-values" class="btn-sm btn-clipboard mr-2" data-clipboard-action="copy" data-clipboard-target="#enroll-flags"> |
| 211 | + Copy |
| 212 | + </button> |
| 213 | + <div class="highlight"> |
| 214 | + <pre id="enroll-flags">{{ .Flags }}</pre> |
| 215 | + </div> |
| 216 | + </div> |
| 217 | + </div> |
| 218 | + <div class="row mb-4"> |
| 219 | + <div class="col-md-12"> |
| 220 | + <b>Note:</b> Secret and certificate path need to be changed. |
| 221 | + </div> |
| 222 | + </div> |
| 223 | + |
| 224 | + <hr> |
| 225 | + |
| 226 | + <div class="row mb-4"> |
| 227 | + <div class="col-md-12"> |
| 228 | + Enrollment certificate: |
| 229 | + </div> |
| 230 | + </div> |
| 231 | + <div class="row mb-4"> |
| 232 | + <div class="col-md-12"> |
| 233 | + <button id="button-clipboard-values" class="btn-sm btn-clipboard mr-2" data-clipboard-action="copy" data-clipboard-target="#enroll-cert"> |
| 234 | + Copy |
| 235 | + </button> |
| 236 | + <div class="highlight"> |
| 237 | + <pre id="enroll-cert">{{ .Certificate }}</pre> |
| 238 | + </div> |
| 239 | + </div> |
| 240 | + </div> |
| 241 | + |
| 242 | + </div> |
| 243 | + </div> |
| 244 | + |
160 | 245 | {{ template "page-modals" . }}
|
161 | 246 |
|
162 | 247 | </div>
|
|
181 | 266 | $('code').each(function(i, block) {
|
182 | 267 | hljs.highlightBlock(block);
|
183 | 268 | });
|
| 269 | + $('pre').each(function(i, block) { |
| 270 | + hljs.highlightBlock(block); |
| 271 | + }); |
184 | 272 |
|
185 | 273 | // Enable all tooltips
|
186 |
| - $('[data-toggle="tooltip"]').tooltip({trigger : 'hover'}); |
| 274 | + $('[data-tooltip="true"]').tooltip({trigger : 'hover'}); |
187 | 275 |
|
188 | 276 | // Clipboard.js initialization
|
189 | 277 | var clipboard_sh = new ClipboardJS('#button-clipboard-sh');
|
|
218 | 306 | console.error('Action:', e.action);
|
219 | 307 | console.error('Trigger:', e.trigger);
|
220 | 308 | });
|
| 309 | + var clipboard_values = new ClipboardJS('#button-clipboard-values'); |
| 310 | + clipboard_values.on('success', function(e) { |
| 311 | + console.info('Action:', e.action); |
| 312 | + console.info('Text:', e.text); |
| 313 | + console.info('Trigger:', e.trigger); |
| 314 | + $(e.trigger).text('Copied!'); |
| 315 | + e.clearSelection(); |
| 316 | + setTimeout(function() { |
| 317 | + $(e.trigger).text('Copy'); |
| 318 | + }, 2500); |
| 319 | + }); |
| 320 | + clipboard_values.on('error', function(e) { |
| 321 | + $(e.trigger).text('Error'); |
| 322 | + console.error('Action:', e.action); |
| 323 | + console.error('Trigger:', e.trigger); |
| 324 | + }); |
221 | 325 |
|
222 | 326 | // Refresh sidebar stats
|
223 | 327 | beginStats();
|
|
0 commit comments