mirror of
				https://gitee.com/BDWare/router-frontend
				synced 2025-11-03 22:32:17 +00:00 
			
		
		
		
	fix(router-frontend): fix bugs in front-end
fix the bug in nodeslistman.js that causes long names of offline nodes are shown
This commit is contained in:
		
							parent
							
								
									2fb58a9c27
								
							
						
					
					
						commit
						d4c82f5724
					
				@ -322,10 +322,12 @@ var onListNodes = function (obj) {
 | 
				
			|||||||
                    "render": function (data, type, row, meta) {
 | 
					                    "render": function (data, type, row, meta) {
 | 
				
			||||||
                        const firstBg = data.indexOf(">");
 | 
					                        const firstBg = data.indexOf(">");
 | 
				
			||||||
                        const secondSl = data.substring(1).indexOf("<");
 | 
					                        const secondSl = data.substring(1).indexOf("<");
 | 
				
			||||||
                        const aTag = data.substring(0, firstBg + 1)
 | 
					                        const aTag = firstBg === -1 ? "" : data.substring(0, firstBg + 1);
 | 
				
			||||||
                        const aTagTail = data.substring(secondSl + 1)
 | 
					                        const aTagTail = secondSl === -1 ? "" : data.substring(secondSl + 1);
 | 
				
			||||||
                        const name = data.substring(firstBg + 1, secondSl + 1)
 | 
					                        const name = firstBg === -1 || secondSl === -1 ?
 | 
				
			||||||
                        let html = name.length > 15 ?
 | 
					                            data :
 | 
				
			||||||
 | 
					                            data.substring(firstBg + 1, secondSl + 1);
 | 
				
			||||||
 | 
					                        const html = name.length > 15 ?
 | 
				
			||||||
                            `<span title='${name}'>${name.substring(0, 15)}  ...</span>` :
 | 
					                            `<span title='${name}'>${name.substring(0, 15)}  ...</span>` :
 | 
				
			||||||
                            name;
 | 
					                            name;
 | 
				
			||||||
                        return aTag + html + aTagTail;
 | 
					                        return aTag + html + aTagTail;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user