mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Fixed tag search case issue, #3136
This commit is contained in:
		
							parent
							
								
									a75af8aa44
								
							
						
					
					
						commit
						c811fc6f16
					
				
					 2 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -2211,7 +2211,8 @@ function getDevicesThatMatchFilter(nodes, x) {
 | 
				
			||||||
    } else if (tagSearch != null) {
 | 
					    } else if (tagSearch != null) {
 | 
				
			||||||
        // Tag filter
 | 
					        // Tag filter
 | 
				
			||||||
        for (var d in nodes) {
 | 
					        for (var d in nodes) {
 | 
				
			||||||
            if (((nodes[d].tags == null) && (tagSearch == '')) || ((nodes[d].tags != null) && (nodes[d].tags.indexOf(tagSearch) >= 0))) { r.push(nodes[d]); }
 | 
					            if ((nodes[d].tags == null) && (tagSearch == '')) { r.push(d); }
 | 
				
			||||||
 | 
					            else if (nodes[d].tags != null) { for (var j in nodes[d].tags) { if (nodes[d].tags[j].toLowerCase() == tagSearch) { r.push(d); break; } } }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    } else if (agentTagSearch != null) {
 | 
					    } else if (agentTagSearch != null) {
 | 
				
			||||||
        // Agent Tag filter
 | 
					        // Agent Tag filter
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5472,14 +5472,15 @@
 | 
				
			||||||
                for (var d in nodes) { r.push(d); }
 | 
					                for (var d in nodes) { r.push(d); }
 | 
				
			||||||
            } else if (ipSearch != null) {
 | 
					            } else if (ipSearch != null) {
 | 
				
			||||||
                // IP address search
 | 
					                // IP address search
 | 
				
			||||||
                for (var d in nodes) { if ((nodes[d].ip != null) && (nodes[d].ip.indexOf(ipSearch) >= 0)) { r.push(d); } }
 | 
					                for (var d in nodes) { if ((nodes[d].ip != null) && (nodes[d].ip.toLowerCase().indexOf(ipSearch) >= 0)) { r.push(d); } }
 | 
				
			||||||
            } else if (groupSearch != null) {
 | 
					            } else if (groupSearch != null) {
 | 
				
			||||||
                // Group filter
 | 
					                // Group filter
 | 
				
			||||||
                for (var d in nodes) { if (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0) { r.push(d); } }
 | 
					                for (var d in nodes) { if (meshes[nodes[d].meshid].name.toLowerCase().indexOf(groupSearch) >= 0) { r.push(d); } }
 | 
				
			||||||
            } else if (tagSearch != null) {
 | 
					            } else if (tagSearch != null) {
 | 
				
			||||||
                // Tag filter
 | 
					                // Tag filter
 | 
				
			||||||
                for (var d in nodes) {
 | 
					                for (var d in nodes) {
 | 
				
			||||||
                    if (((nodes[d].tags == null) && (tagSearch == '')) || ((nodes[d].tags != null) && (nodes[d].tags.indexOf(tagSearch) >= 0))) { r.push(d); }
 | 
					                    if ((nodes[d].tags == null) && (tagSearch == '')) { r.push(d); }
 | 
				
			||||||
 | 
					                    else if (nodes[d].tags != null) { for (var j in nodes[d].tags) { if (nodes[d].tags[j].toLowerCase() == tagSearch) { r.push(d); break; } }}
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            } else if (agentTagSearch != null) {
 | 
					            } else if (agentTagSearch != null) {
 | 
				
			||||||
                // Agent Tag filter
 | 
					                // Agent Tag filter
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue