Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

UI: Project-level Config Variables #1915

Merged
merged 30 commits into from
Sep 7, 2021
Merged

UI: Project-level Config Variables #1915

merged 30 commits into from
Sep 7, 2021

Conversation

gregone
Copy link
Contributor

@gregone gregone commented Jul 22, 2021

Fixes #1512

This PR adds Config Variables management to the project settings screen.

The list view displays both static and dynamic variables, with the latter in an abridged form, but only static variables are editable.

Editable attributes:

  • key
  • value
  • internal
  • use key as file path

Variables can also be edited from the UI.

Screen.Recording.2021-09-03.at.13.20.29.mov

@github-actions github-actions bot added the ui label Jul 22, 2021
@gregone gregone force-pushed the ui-config-variables branch from 8304b96 to ae4de76 Compare August 2, 2021 16:19
@gregone gregone force-pushed the ui-config-variables branch from ae4de76 to 8a369ff Compare August 4, 2021 11:50
@gregone gregone force-pushed the ui-config-variables branch from 8a369ff to 2540fd9 Compare August 5, 2021 12:11
@gregone gregone force-pushed the ui-config-variables branch from 2540fd9 to 745d0cd Compare August 5, 2021 16:02
@gregone gregone force-pushed the ui-config-variables branch from 745d0cd to 0bf4aea Compare August 5, 2021 16:57
@gregone gregone force-pushed the ui-config-variables branch from e452342 to 9a43a61 Compare August 9, 2021 15:05
@gregone gregone force-pushed the ui-config-variables branch from 9a43a61 to b6a5261 Compare August 9, 2021 15:32
@gregone gregone force-pushed the ui-config-variables branch from 6c469ae to 0afe062 Compare August 9, 2021 18:11
@gregone gregone force-pushed the ui-config-variables branch from 0afe062 to e3d5d59 Compare August 9, 2021 18:19
@gregone gregone force-pushed the ui-config-variables branch from e3d5d59 to ebaccdb Compare August 12, 2021 12:40
@gregone gregone force-pushed the ui-config-variables branch from ebaccdb to 9987f6e Compare August 13, 2021 15:05
@gregone
Copy link
Contributor Author

gregone commented Sep 6, 2021

Note for other reviewers: dynamic config vars aren’t added to the database until the first time they’re used in a deployment operation. I tried simply adding the config var to my waypoint.hcl, running waypoint init, and checking the UI and was surprised to find it didn’t work. If you subsequently run a waypoint up, then you’ll see it:

CleanShot 2021-09-03 at 17 37 01@2x

So this is because config syncing run on deploy (and after editing variables)

@gregone gregone requested a review from jgwhite September 6, 2021 14:23
super.setupController(controller, model, transition);
let project = this.modelFor('workspace.projects.project');

controller.project = project;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to do this without set, given controller.project isn’t a @tracked property? I would guess it’s OK but I’m not 100% sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question 🤔. I'll verify and update tomorrow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looked into it: it's fine and the route updates the controller properly every time. The only concern would be if we were interacting with this controller from outside the route, but we're not.

Copy link
Contributor

@jgwhite jgwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great 🎉

I left one tiny comment which I think we should fix but it’s not worth holding up the PR for.

Update return value
@gregone gregone force-pushed the ui-config-variables branch from a1779d1 to b3c1ef8 Compare September 7, 2021 09:43
@gregone gregone merged commit cf53aa7 into main Sep 7, 2021
@gregone gregone deleted the ui-config-variables branch September 7, 2021 10:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config Variables in the browser UI
3 participants