comparison mod_client_management/mod_client_management.lua @ 5600:c799b460f9f0

mod_client_management: Make ID column dynamically sized Its width can vary more than expected (because it can contain resources)
author Kim Alvefur <zash@zash.se>
date Fri, 14 Jul 2023 16:20:54 +0200
parents da69496180e7
children 1571c280aaef
comparison
equal deleted inserted replaced
5599:da69496180e7 5600:c799b460f9f0
436 if not clients or #clients == 0 then 436 if not clients or #clients == 0 then
437 return true, "No clients associated with this account"; 437 return true, "No clients associated with this account";
438 end 438 end
439 439
440 local colspec = { 440 local colspec = {
441 { title = "ID"; key = "id"; width = math.max(#"client/", #"grant/") + #id.short() }; 441 { title = "ID"; key = "id"; width = "1p" };
442 { 442 {
443 title = "Software"; 443 title = "Software";
444 key = "user_agent"; 444 key = "user_agent";
445 width = "1p"; 445 width = "1p";
446 mapper = user_agent_tostring; 446 mapper = user_agent_tostring;