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

Edit the project settings from the UI #1114

Closed
1 of 2 tasks
lorenzo-cavazzi opened this issue Nov 5, 2020 · 6 comments
Closed
1 of 2 tasks

Edit the project settings from the UI #1114

lorenzo-cavazzi opened this issue Nov 5, 2020 · 6 comments
Assignees
Milestone

Comments

@lorenzo-cavazzi
Copy link
Member

lorenzo-cavazzi commented Nov 5, 2020

Motivation

We are gradually storing more project settings in the .renku/renku.ini file. Since some of them are relevant only for the interactive environments, it would be nice to allow the user to change them directly from the UI.

Proposal

  • Move the clone commands and repository URL to an overview tab. I suggest renaming the Stats tab to Information (or Info) and move the content there. The preview is only a broad reference, some elements should be adjusted better.
    Screenshot_20201105_140914

  • Divide the Settings page into 2 sections (similar to the Cards components used in the preview above), one with Renkulab settings (the current project Tags and Description) (EDIT: use subtabs as suggested in the next post) and a new one with the actual project settings.
    We should show the current settings and allow to edit or add them. Adding should suggest the available parameters (we have a limited set, custom options and custom image) but also allow the user to add new custom fields.
    The best solution would be to have a backend service from renku-core to invoke the renku settings commands. [Preview: to be added]

Progress

  • API Design (sprint-2020-12-04)
  • UI implementation
@ciyer
Copy link
Contributor

ciyer commented Nov 20, 2020

I propose putting this on a subtab of the settings page.

image

Pinned Image

This will let a user select an image either by branch/commit or by providing a URL.

Questions

Would it be possible to override the suggestions and let users specify settings without guidance from the UI?

Edits

  • Added support for the new storage field.

@ciyer ciyer added this to the sprint-2020-12-04 milestone Dec 2, 2020
@lorenzo-cavazzi lorenzo-cavazzi self-assigned this Dec 2, 2020
@lorenzo-cavazzi
Copy link
Member Author

I think the mockup you proposed is on point!
A couple of small variations I would do:

  1. Move the "Pinned image" on top, just after the "Default for new pods" to keep it in line with the Environments page.
  2. Add the possibility to set custom values for know fields (e.g. 16G of RAM, or any other random string) and new fields. When doing that, the value should be underlined in red/yellow with a note saying the value may not by valid in this RenkuLab deployment. We can get the list of available options and values from the GET /notebooks/server_options API.

The cleanest solution requires APIs from renku-core to expose renku-config. Technically, implementing a custom UI solution isn't difficult, but I would avoid doing that to prevent potential discrepancies between UI/renku-python

API structure

Here is a proposal for API: https://app.swaggerhub.com/apis-docs/lorenzo-sdsc/renku-core/0.1.0
It's basically 3 commands to:

  1. get the list of key/value pairs
  2. set a new key or edit an existing one
  3. delete an existing key

Mockup

{TODO} -- The 2 mockups above should be enough for this issue

@ciyer
Copy link
Contributor

ciyer commented Jan 5, 2021

  1. Move the "Pinned image" on top, just after the "Default for new pods" to keep it in line with the Environments page.

I think it makes sense to keep "Pinned image" lower down because we would like to keep it hidden by default. I think this is a feature that is not relevant for many users, and we can keep the UI simpler by initially showing only the more commonly modified settings.

  1. Add the possibility to set custom values for know fields (e.g. 16G of RAM, or any other random string) and new fields. When doing that, the value should be underlined in red/yellow with a note saying the value may not by valid in this RenkuLab deployment. We can get the list of available options and values from the GET /notebooks/server_options API.

That's a nice idea, but it could be down in a follow-up from my perspective. I think the more common case will be to define settings that will be valid for the instance that user is on.

@ciyer
Copy link
Contributor

ciyer commented Jan 5, 2021

API structure

Here is a proposal for API: https://app.swaggerhub.com/apis-docs/lorenzo-sdsc/renku-core/0.1.0
It's basically 3 commands to:

  1. get the list of key/value pairs
  2. set a new key or edit an existing one
  3. delete an existing key

Does it make sense to support setting/editing/deleting a collection of keys at once? With the current design, when the user clicks "Save", the UI might need to make multiple calls to the backend to update the settings.

@lorenzo-cavazzi
Copy link
Member Author

lorenzo-cavazzi commented Jan 5, 2021

Does it make sense to support setting/editing/deleting a collection of keys at once? With the current design, when the user clicks "Save", the UI might need to make multiple calls to the backend to update the settings.

Ah yes, that's a good point! I have updated the APIs: https://app.swaggerhub.com/apis-docs/lorenzo-cavazzi/renku-core/0.1.3

  1. Add the possibility to set custom values for know fields [...]

That's a nice idea, but it could be down in a follow-up from my perspective. I think the more common case will be to define settings that will be valid for the instance that user is on.

If that's still desirable in the longer term, I think it's a limited extra effort to do all at once.
But yeah, we can put this in a follow-up issue.

@ciyer ciyer modified the milestones: sprint-2021-01-29, sprint-2021-02-19, sprint-2021-03-12 Feb 12, 2021
@ciyer ciyer removed this from the sprint-2021-03-12 milestone Apr 1, 2021
@ciyer ciyer added this to the 1.0.0 milestone May 11, 2021
lorenzo-cavazzi added a commit that referenced this issue Jun 9, 2021
* Create new sessions sub-navigation in the settings tab
* Uset the config APIs to get and set project options

fix #1114
lorenzo-cavazzi added a commit that referenced this issue Jun 17, 2021
fix #1114

Co-authored-by: Chandrasekhar Ramakrishnan <[email protected]>
@lorenzo-cavazzi
Copy link
Member Author

Closed by #1386

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

No branches or pull requests

2 participants