Search by notes
This commit is contained in:
		
							parent
							
								
									986404236a
								
							
						
					
					
						commit
						914a8708cb
					
				|  | @ -38,6 +38,11 @@ function renderClientList(data) { | ||||||
|             subnetRangesString = obj.Client.subnet_ranges.join(',') |             subnetRangesString = obj.Client.subnet_ranges.join(',') | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         let additionalNotesHtml = ""; | ||||||
|  |         if (obj.Client.additional_notes && obj.Client.additional_notes.length > 0) { | ||||||
|  |             additionalNotesHtml = `<span class="info-box-text" style="display: none"><i class="fas fa-additional_notes"></i>${obj.Client.additional_notes}</span>` | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         // render client html content
 |         // render client html content
 | ||||||
|         let html = `<div class="col-sm-6 col-md-6 col-lg-4" id="client_${obj.Client.id}">
 |         let html = `<div class="col-sm-6 col-md-6 col-lg-4" id="client_${obj.Client.id}">
 | ||||||
|                         <div class="info-box"> |                         <div class="info-box"> | ||||||
|  | @ -81,6 +86,7 @@ function renderClientList(data) { | ||||||
|                                 <span class="info-box-text" style="display: none"><i class="fas fa-key"></i> ${obj.Client.public_key}</span> |                                 <span class="info-box-text" style="display: none"><i class="fas fa-key"></i> ${obj.Client.public_key}</span> | ||||||
|                                 <span class="info-box-text" style="display: none"><i class="fas fa-subnetrange"></i>${subnetRangesString}</span> |                                 <span class="info-box-text" style="display: none"><i class="fas fa-subnetrange"></i>${subnetRangesString}</span> | ||||||
|                                 ${telegramHtml} |                                 ${telegramHtml} | ||||||
|  |                                 ${additionalNotesHtml} | ||||||
|                                 <span class="info-box-text"><i class="fas fa-envelope"></i> ${obj.Client.email}</span> |                                 <span class="info-box-text"><i class="fas fa-envelope"></i> ${obj.Client.email}</span> | ||||||
|                                 <span class="info-box-text"><i class="fas fa-clock"></i> |                                 <span class="info-box-text"><i class="fas fa-clock"></i> | ||||||
|                                     ${prettyDateTime(obj.Client.created_at)}</span> |                                     ${prettyDateTime(obj.Client.created_at)}</span> | ||||||
|  |  | ||||||
|  | @ -429,6 +429,11 @@ Wireguard Clients | ||||||
|                     $(this).closest('.col-lg-4').show(); |                     $(this).closest('.col-lg-4').show(); | ||||||
|                 } |                 } | ||||||
|             }) |             }) | ||||||
|  |             $(".fa-additional_notes").each(function () { | ||||||
|  |                 if ($(this).parent().text().trim().indexOf(query.trim()) != -1) { | ||||||
|  |                     $(this).closest('.col-lg-4').show(); | ||||||
|  |                 } | ||||||
|  |             }) | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
|         $("#status-selector").on('change', function () { |         $("#status-selector").on('change', function () { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue