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

feat(api): add rudimentary web control panel #183

Merged
merged 1 commit into from
Oct 25, 2020
Merged

feat(api): add rudimentary web control panel #183

merged 1 commit into from
Oct 25, 2020

Conversation

Doridian
Copy link
Collaborator

@Doridian Doridian commented Sep 21, 2020

Description

Adds a web panel. Need to set WEB_PORT for it to bind. This has no authentication, so don't run this on the public internet without a firewall

@Doridian Doridian requested a review from jef as a code owner September 21, 2020 23:33
@geman220
Copy link
Contributor

I want it, nice work!

admon84
admon84 previously approved these changes Sep 23, 2020
Copy link
Contributor

@admon84 admon84 left a comment

Choose a reason for hiding this comment

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

Great idea!

@jef
Copy link
Owner

jef commented Oct 1, 2020

I'm gonna pull this down today and check it out. Thanks Doridian!

@jef
Copy link
Owner

jef commented Oct 2, 2020

@Doridian it's awesome. I love it. Good for the start of something awesome!

Now I think for an initial release of this, we just need a few changes. I would say that changing anything in the web, should overwrite what is in .env (store, brand, series wise). As of now, changing something in the web UI just appends what's already there. Perhaps intended, but maybe should clear out anything we haven't selected.

Not as necessary, but could be possible with minimal effort?: I'd also suggest making the list not a multi-selectable list, but rather checkboxes. Perhaps more user friendly.


I think this is almost there and this will be an awesome addition.

@Doridian
Copy link
Collaborator Author

Doridian commented Oct 2, 2020

I agree that checkboxes are easier to use, actually. Good idea!

As for updating the .env, I need to find a good way of doing that. Since essentially I need to map the huge JS object back to the variables that created it. Maybe at first just support what the UI supports. (As you might have seen in the code, the "API" supports updating the entire config, not just the fields I surface in the UI).
So at first maybe just update STORES and SHOW_ONLY_* type variables?

@jef
Copy link
Owner

jef commented Oct 2, 2020

So at first maybe just update STORES and SHOW_ONLY_* type variables?

Agreed, I think that's plenty for now.

Also to clarify (which may not be needed); You may not need to manipulate the .env file, just overwrite the maps that read in the .env initial.

Can't wait to see it! Thanks for doing this @Doridian ❤️

@jef
Copy link
Owner

jef commented Oct 10, 2020

You ready for me now @Doridian?

@Doridian
Copy link
Collaborator Author

@jef Any time really. Didn't yet find a way I like for it to persist its config, tho. With the .env config style.

@jef
Copy link
Owner

jef commented Oct 10, 2020

Okay sounds good. I'll pull it down when I get home from vacation and give it a run. From there, we can get this baby merged in!

@jef
Copy link
Owner

jef commented Oct 12, 2020

@Doridian I think I'm gonna pull this in today. I'm going to change the base branch to develop and start working on top of it. Probably release as 2.0.0 and will come along with some name changes I have in mind.

@jef
Copy link
Owner

jef commented Oct 20, 2020

Crap... I really want this in here. I'll pull it down in the near future and get it merged in. This is my top priority.

Thank you @Doridian for the patience on this one.

@jef
Copy link
Owner

jef commented Oct 23, 2020

Okay... Last time, I promise. I won't bring in anything else. Let's resolve these conflicts and iterate on this one. Sorry @Doridian 😞

Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

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

It's going in!!!!

@jef jef changed the title feat(api): Add rudimentary web control panel feat(api): add rudimentary web control panel Oct 25, 2020
@jef jef merged commit 373d1a9 into jef:main Oct 25, 2020
lambia added a commit to lambia/streetmerchant that referenced this pull request Dec 10, 2021
Continued the work started with pull request jef#183
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

Successfully merging this pull request may close these issues.

4 participants