pygmy icon indicating copy to clipboard operation
pygmy copied to clipboard

Adding Expiration Minutes to Dashboard

Open lukaalba opened this issue 7 years ago • 4 comments
trafficstars

There is only a column whether a link is expired or not and I think it is useful to see additionally, what value was set during the creation of the short link.

lukaalba avatar Nov 09 '18 13:11 lukaalba

Coverage Status

Coverage remained the same at 54.973% when pulling 1a5003808bc9920171d519d5e83dbcb3d1ad69b5 on lukaalba:add_expire into 81e1de010c9501efa1c024a2d70fa3c8da13ab52 on amitt001:master.

coveralls avatar Nov 09 '18 13:11 coveralls

@lukaalba Good idea and thanks for the PR.

I think it would be more informative to a user if there is an exact timestamp link expired. Would you like to modify your pr to show 'Expire At'?

Expire at can be calculated by adding created_at + timedelat(expire_after).

amitt001 avatar Nov 10 '18 15:11 amitt001

@amitt001 great idea, but I'm new to Python and Django. Can you tell me which file(s) I need to edit?

lukaalba avatar Nov 16 '18 09:11 lukaalba

@lukaalba apologies for the late reply. It's this file https://github.com/amitt001/pygmy/blob/master/pygmyui/templates/pygmy/dashboard.html#L15 You already get all the data required for calculating that value

You can reference this file as this contains keys that are returned https://github.com/amitt001/pygmy/blob/master/pygmy/model/link.py#L18

amitt001 avatar Dec 06 '18 23:12 amitt001