puppetboard icon indicating copy to clipboard operation
puppetboard copied to clipboard

Sorting IP adresses and uptime in tables

Open emlun007 opened this issue 8 years ago • 13 comments
trafficstars

I have added code in tables.js that will sort the IP adresses in inventory table. Right now, the function does not work properly, most likely because I don't use the right name of the variable with IP Adresses

emlun007 avatar Nov 07 '17 08:11 emlun007

Coverage Status

Coverage remained the same at 81.76% when pulling 663d996d13b7e2fca45848e1a11b2a8b0d7b34f3 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Nov 07 '17 08:11 coveralls

Coverage Status

Coverage remained the same at 81.76% when pulling 2a76ab0b9a7d2af8a6c9067621ddb09a84857d46 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Nov 23 '17 11:11 coveralls

Coverage Status

Coverage remained the same at 81.76% when pulling e2f37be89796c3aadc61811af74ead7a326ad1f1 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 13:12 coveralls

Coverage Status

Coverage remained the same at 81.76% when pulling f005be35b52a82f340ccdafe773b4e6d6a427277 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 13:12 coveralls

Coverage Status

Coverage remained the same at 81.76% when pulling f713a09a78745c5266077839e08efa8257b8b858 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 13:12 coveralls

Update: Now the ip sorter finally works 😃

All you have to do is to write column number in _macros.html which is set to 2nd column by default:

{ type: 'ip-address', targets: 1 }

emlun007 avatar Dec 21 '17 13:12 emlun007

Coverage Status

Coverage remained the same at 81.76% when pulling 06349e9e53818b2c3d755aeddfe48b377fc52042 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 13:12 coveralls

I'm testing this now.

Everything seems to be working. On the Inventory page IP X.X.0.10 is now considered greater than X.X.0.2 for sorting.

Good work @emlun007

kirkins avatar Dec 21 '17 14:12 kirkins

Coverage Status

Coverage remained the same at 81.76% when pulling 6e5305572653a297bee88f735deba8e602313f29 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 15:12 coveralls

Coverage Status

Coverage remained the same at 81.76% when pulling 2fe362ad20b0fdfe619f31a9551a5bc9dec63b07 on emlun007:patch-1 into d456d19bb4125bdb570c4d7f037edc84f100517d on voxpupuli:master.

coveralls avatar Dec 21 '17 15:12 coveralls

@kirkins , I have added code for sorting uptime (xxx days) and memory (xxx GiB). The code parses strings to integer (9.99 GiB = 9) and checks in the result is NaN. If the sourse is NaN (e.g. ip address), the original data is shown, if the source is not NaN, it is parsed to integer

emlun007 avatar Dec 21 '17 15:12 emlun007

Can this be merged, including @vchepkov 's changes? :-)

larsnaesbye avatar Oct 31 '19 21:10 larsnaesbye

Sadly, it cannot be merged. This branch has merge conflicts. You can checkout the branch, resolve the conflicts and submit it as a new PR. I'm happy to review and merge it afterwards.

bastelfreak avatar Oct 31 '19 21:10 bastelfreak