Generator-jhipster: Can't fetch profile info in React client

Created on 25 Apr 2018  路  7Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

7050 Removed an endpoint that was providing the client some profile information.

Motivation for or Use Case

Profile aren't working anymore with React.

Reproduce the error

Create any kind of React application.

Related issues

None.

Suggest a Fix

Just call the new endpoint. We might need to add some more data in the new endpoint or make the client interpolate some translation keys to get the ribbon right.

JHipster Version(s)

Current master.

Most helpful comment

It will get easier once @jdubois will do a release of the lib :smiley:.

All 7 comments

Oh with @PierreBesson, we thought it wasn't implement yet for React

It was not ! It's just that the trainees are working too fast !
@agaspardcilia You should now get profile data from the /info endpoint. Make sure that you upgrade the jhipster lib and you should be able to test it.
Otherwise I can do it.

Yeah, the PR (#7468) was around since a while due to Devoxx and got approved a day ago. I'm not really surprised no one saw it apart for Deepu and me. :grin:

@PierreBesson Are you sure it's working ?
The only thing answered by http://localhost:8080/management/info is:

{
  "display-ribbon-on-profiles" : "dev"
}

Isn't that endpoint supposed to return something like:

{
  "display-ribbon-on-profiles" : "dev",
  "git" : {
    "commit" : {
      "id" : {
        "abbrev" : "92e2d29",
        "describe" : "92e2d29-dirty"
      }
    },
    "branch" : "master"
  },
  "build" : {
    "version" : "0.0.1-SNAPSHOT",
    "artifact" : "sb-2-t-2",
    "name" : "Sb 2 T 2",
    "group" : "com.mycompany.myapp",
    "time" : "2018-01-26T16:59:48Z"
  },
  "active-profiles" : [ "swagger", "dev" ]
}

?
The ribbon is not being displayed in Angular too.

@agaspardcilia Please update your JHipster lib to the latest master and make sur that your pom is using it.
Also to have build/git information, you need to do a prod build.

Oh right, I forgot about that. Thank you.

It will get easier once @jdubois will do a release of the lib :smiley:.

Was this page helpful?
0 / 5 - 0 ratings