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

Generate admin ui according to the flag value #12738

Merged

Conversation

avdev4j
Copy link
Contributor

@avdev4j avdev4j commented Oct 13, 2020

Add a --with-admin-ui flag to generate the admin ui pages. By default, those pages are not generated and the user should use the JHipster Control Center application.

EDIT: add prompt instead

#12167
#12090

  • Angular
  • React
  • Vue
  • i18n
  • JDL

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mraible
Copy link
Contributor

mraible commented Oct 13, 2020

Does this mean we're going to require two apps to run one app (if you want to administer the one app)?

@avdev4j
Copy link
Contributor Author

avdev4j commented Oct 13, 2020

Does this mean we're going to require two apps to run one app (if you want to administer the one app)?

Unless we use the flag I have added ;).

Copy link
Contributor

@MarlonLuan MarlonLuan left a comment

Choose a reason for hiding this comment

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

Typo

@pascalgrimaud
Copy link
Member

I'm not totally in favor of this, for now.
I'd prefer to have no-admin-ui flag instead.

The reason is the JHipster Control Center is not finished yet today, and we don't have official lead on this. So it can become a dead project, if it's not well maintained.

@avdev4j
Copy link
Contributor Author

avdev4j commented Oct 14, 2020

I'm not totally in favor of this, for now.
I'd prefer to have no-admin-ui flag instead.

This was my main issue yesterday, Maybe we should add a question, something like (Would like to administrate your application with the JHipster Control Center?(the admin ui will be not generated) y/N".

Because if we add a flag like no-admin-ui I'm sure that nobody will use it :D?

With this question we will be able to add the JHCC Docker compose configuration only when the answer is "yes".

WDYT?

@avdev4j avdev4j changed the title 12090 generate admin ui according to flag Generate admin ui according to the flag value Oct 14, 2020
@PierreBesson
Copy link
Contributor

PierreBesson commented Oct 14, 2020

I would say let's generate the jhcc docker compose all the time so people can try it out in any case... As for if the admin UI should be generated by default or not, I think it would be better to actually do a vote about it on the mailing list.

@avdev4j avdev4j force-pushed the 12090-generate-admin-ui-according-to-flag branch 2 times, most recently from 910ba3d to 3acc93d Compare October 21, 2020 19:08
@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Oct 24, 2020
@avdev4j avdev4j mentioned this pull request Oct 27, 2020
5 tasks
@avdev4j avdev4j force-pushed the 12090-generate-admin-ui-according-to-flag branch 2 times, most recently from ac6ddd7 to 659d9e5 Compare October 27, 2020 23:09
@pascalgrimaud
Copy link
Member

It needs to be discussed, when admin ui is not choosen, should we keep swagger or not ?
I'd say:

  • with admin ui: like today
  • without admin ui: user-management + swagger

Swagger is so important, and it would not required too much maintenance !

@avdev4j
Copy link
Contributor Author

avdev4j commented Oct 28, 2020

after all, I think you're right @pascalgrimaud it's not a big effort to keep that so let's revert this changes.

@avdev4j avdev4j force-pushed the 12090-generate-admin-ui-according-to-flag branch from 26f9adf to 1563578 Compare November 2, 2020 20:22
@avdev4j avdev4j marked this pull request as ready for review November 8, 2020 22:57
Copy link
Member

@MathieuAA MathieuAA left a comment

Choose a reason for hiding this comment

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

I've quickly reviewed the JDL part.
I'll do a more thorough review for this.

@avdev4j avdev4j force-pushed the 12090-generate-admin-ui-according-to-flag branch from 3d7492a to 3dd77d1 Compare November 9, 2020 21:30
@avdev4j
Copy link
Contributor Author

avdev4j commented Nov 9, 2020

@MathieuAA I have tested many things and finally did not find the better way, except if we move to async functions.

Less code, easier to read and ofc less "PROMPT" ;).

I have added a commit, about that, in this PR but we can split into two different ones.

This is related to this PR: #12812

What do you think @mshima @sendilkumarn ?

@avdev4j avdev4j force-pushed the 12090-generate-admin-ui-according-to-flag branch from 8f09ef3 to 5f855ee Compare November 9, 2020 23:24
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

LGTM.

2 non-blocker considerations:

  • I would prefer --admin-ui instead of --with-admin-ui.
  • httpsGet should be extracted into a util function instead of a generator-private member. Not the scope of this PR.

@MathieuAA
Copy link
Member

That's a much better solution @avdev4j :)

@avdev4j
Copy link
Contributor Author

avdev4j commented Nov 10, 2020

  • I would prefer --admin-ui instead of --with-admin-ui.

--with-admin-ui no longer exist because we move to a prompt instead of a flag.

  • httpsGet should be extracted into a util function instead of a generator-private member. Not the scope of this PR.

Not scope in this PR but let rework the function to easily extract it in the future.

@mshima finally done, I think we can easily move the bootswatch functions to the prompt file to a lib.

@pascalgrimaud pascalgrimaud merged commit c1279fa into jhipster:main Nov 10, 2020
@pascalgrimaud
Copy link
Member

congrats for your hard work @avdev4j !

@pascalgrimaud
Copy link
Member

lot of work done to achieve this, so increasing the bounty, it's well deserved

@pascalgrimaud pascalgrimaud added $200 https://www.jhipster.tech/bug-bounties/ and removed $100 https://www.jhipster.tech/bug-bounties/ labels Nov 10, 2020
@avdev4j
Copy link
Contributor Author

avdev4j commented Nov 11, 2020

@pascalgrimaud
Copy link
Member

@avdev4j : approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $200 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants