SwissDataScienceCenter / renku-ui

The web frontend of the Renku platform
https://renkulab.io
Apache License 2.0
13 stars 6 forks source link

feat: set custom culling times in admin page #3113

Closed Panaetius closed 3 months ago

Panaetius commented 4 months ago

This allows setting custom idle and hibernation times for culling of sessions.

image

/deploy renku=release-0.52.x renku-data-services=main renku-notebooks=custom-culling-times

RenkuBot commented 4 months ago

You can access the deployment of this PR at https://renku-ci-ui-3113.dev.renku.ch

lorenzo-cavazzi commented 3 months ago

Thank you for the reviews!

@ciyer JSON file updated. I also added a test for that duration function as discussed offline. @leafty Thank you for mentioning it! I changed the icon

lorenzo-cavazzi commented 3 months ago

@leafty the function toFullHumanDuration was implemented cause we needed a way to show durations that was both accurate enough (can't show just the most relevant unit) and compact enough to fit in the space (5 days 3 hours 27 minutes is much longer than 5d 3h 27m and 5d, 3h, 27m turned out to be confusing for some users).

I don't disagree about some of the longer units like months and years being a non-optimal choice cause they aren't precise -- while weeks are a well-defined duration but possibly less intuitive/immediate than days. I don't think it's too critical here since it's unlikely admins will be interested in setting months-long durations, but I'll bring this up with the build team with the intention of fixing it.

leafty commented 3 months ago

@leafty the function toFullHumanDuration was implemented cause we needed a way to show durations that was both accurate enough (can't show just the most relevant unit) and compact enough to fit in the space (5 days 3 hours 27 minutes is much longer than 5d 3h 27m and 5d, 3h, 27m turned out to be confusing for some users).

I don't disagree about some of the longer units like months and years being a non-optimal choice cause they aren't precise -- while weeks are a well-defined duration but possibly less intuitive/immediate than days. I don't think it's too critical here since it's unlikely admins will be interested in setting months-long durations, but I'll bring this up with the build team with the intention of fixing it.

From your comment, I do not see why we can't keep it to "days","hours","minutes","seconds" as the units. The function should be updated to reflect this.

lorenzo-cavazzi commented 3 months ago

From your comment, I do not see why we can't keep it to "days","hours","minutes","seconds" as the units. The function should be updated to reflect this.

Sure, that's my intention! I just want to bring this up with the build team since there was a short discussion on this topic and I don't want to change things last minute without warning

lorenzo-cavazzi commented 3 months ago

@leafty Switched to using days as the default longest duration for toFullHumanDuration e7cf4ed705ecccaf5cb830817eafb2eb39ed45de

RenkuBot commented 3 months ago

Tearing down the temporary RenkuLab deplyoment for this PR.