Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display time until session will be terminated #1486

Open
MoritzWeber0 opened this issue Apr 3, 2024 · 2 comments
Open

Display time until session will be terminated #1486

MoritzWeber0 opened this issue Apr 3, 2024 · 2 comments

Comments

@MoritzWeber0
Copy link
Member

Users want to see the time left to termination because of inactivity to be able to react e.g. by performing some action in the session to avoid termination.

Originally reported in #621.

@dominik003
Copy link
Collaborator

dominik003 commented May 6, 2024

I had a quick look at this and just wanted to provide some thoughts.

First of all, it seems that we currently do the idletime processing in the backend, i.e. we take the idletime and return a human readable string. For example, for idletime 45 we would return 45 mins ago and for 65 we would return 1.1 hrs ago. This does not seem like a good idea as it reduces the flexibility to handle such data in the frontend and other places. Therefore I would return the idletime as it is or convert it to a proper date format, see my next comment.

To me, the name last_seen suggests that we are returning the datetime when the session was last seen, and idletime would be a much better name for the current meaning. This can also be seen in some stories where a date has been used for this field. I see two options here that we can choose from. We can either keep the name last_seen, but in this case I would transform the idletime into a proper datetime, or I would rename this field to idletime and return the corresponding value directly. In both cases, it might be a good idea to add a custom angular pipe that converts the value to a human-readable format, which is what is currently done in the backend.

Finally, to implement showing the user the time until termination, I see two possibilities. Either we can return something like terminate_at or terminate_in which returns either the termination datetime or the time until termination in minutes, or we have to somehow propagate the maximum session idle time.

@MoritzWeber0
Copy link
Member Author

MoritzWeber0 commented May 6, 2024

First of all, it seems that we currently do the idletime processing in the backend, i.e. we take the idletime and return a human readable string. For example, for idletime 45 we would return 45 mins ago and for 65 we would return 1.1 hrs ago. This does not seem like a good idea as it reduces the flexibility to handle such data in the frontend and other places. Therefore I would return the idletime as it is or convert it to a proper date format, see my next comment.
To me, the name last_seen suggests that we are returning the datetime when the session was last seen, and idletime would be a much better name for the current meaning. This can also be seen in some stories where a date has been used for this field. I see two options here that we can choose from. We can either keep the name last_seen, but in this case I would transform the idletime into a proper datetime, or I would rename this field to idletime and return the corresponding value directly. In both cases, it might be a good idea to add a custom angular pipe that converts the value to a human-readable format, which is what is currently done in the backend.

Agree, we should use a iso formatted string and make it human-readable in the frontend. idletime sounds like a better name.

Finally, to implement showing the user the time until termination, I see two possibilities. Either we can return something like terminate_at or terminate_in which returns either the termination datetime or the time until termination in minutes, or we have to somehow propagate the maximum session idle time.

terminate_in sounds good, I'd say. terminate_at sounds like it's a hard time that will not change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants