Generator-jhipster: Request to fix Entities empty dropdown

Created on 1 Mar 2017  路  12Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

I am so happy to explore jhipster for the first time after heard about angular2 support added in Jhipster 4

I followed https://jhipster.github.io/video-tutorial/ , however the Entities drop down shows empty

bug-entities-dropdown-01
This shows that i made some mistake in setting up the projects

Motivation for or Use Case

First time users like me , will not be surprised about the usability issue!

Suggest a Fix

it will be nice if we show some helpful text like this

bug-entities-dropdown

JHipster Version(s)
[email protected] X:\opensource12\jhipster\vidhyapp\myapp
+-- UNMET PEER DEPENDENCY @angular/[email protected]
+-- UNMET PEER DEPENDENCY @angular/[email protected]
`-- [email protected]

JHipster configuration, a .yo-rc.json file generated in the root folder
{
  "generator-jhipster": {
    "jhipsterVersion": "4.0.6",
    "baseName": "blog",
    "packageName": "com.labkit.jhipster",
    "packageFolder": "com/labkit/jhipster",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "jwtSecretKey": "ae9d4e2f915f1e14f8d449d6a42175f3b36ff3d0",
    "clientFramework": "angular2",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling",
      "protractor"
    ],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "es",
      "ca",
      "ta",
      "en"
    ]
  }
}

Entity configuration(s) entityName.json files generated in the .jhipster directory

ls: no such file or directory: .jhipster/*.json

Browsers and Operating System

Firefox
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

git version 2.9.2.windows.1

node: v6.10.0

npm: 3.10.5

gulp:
[15:28:08] CLI version 1.2.2

yeoman: 1.8.5

yarn: 0.21.3

[x] Checking this box is mandatory (this is just to show you read everything)

area

All 12 comments

Indeed I saw this but I don't know how we could implement this properly as we can't really check if there are any entities... Maybe in the Navbar Component we can check the number of elements in the dropdown and if this is equal to 0 set a boolean to true then display "No entity available" ?

Indeed, +1 for the idea - we could even add a tip or link to the documentation on creating entities.
Then, @wmarques is right, it's a bit complex to implement!!

Or we can modify the initial template to have this in the entity menu :

No entity available

And every time, when the entity generator is executed, we just cut out everything between this 2 markers

@gzsombor yep that seems more proper than my solution, I don't really like checking to DOM just for this..

It's a good idea, but I'm not sure if we should implement it.
In a real project, the user will always rename or remove this menu, he will never let it empty like this.
So it is just esthetic for demo... so is it worth it ?

Not worth it I think.

I really like the idea, and in fact I wanted to do it myself, but I'm giving up:

  • most people on the team seem to be against the idea
  • indeed, it's quite complex to achieve: I forgot we also need to add translations for this, and that's really, really annoying. If we want to be "clean" we should also delete the translations...

But that makes me realize our home page could be improved, I'll have a look at it.

My entities's folder contains files and still the entities menu is empty. Why could that be?

The problem had something to do with the browser's cache. After deleting this cache, entities were appeared again!.

@SauronShepherd this is an old issue, and has nothing to do with your problem. You're probably not running yarn start I guess.

I've imported entities from jdl file in gateway. Entities generated and working but cannot see them in dropdown after npm start, npm run start, ./build.sh and ./mnv.
Any other workaround for this please?

@QauseenMZ this is an old issue, please don't comment it. If you have found a problem, please open a new issue with required details.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Steven-Garcia picture Steven-Garcia  路  3Comments

marcelinobadin picture marcelinobadin  路  3Comments

tomj0101 picture tomj0101  路  3Comments

kaidohallik picture kaidohallik  路  3Comments

edvjacek picture edvjacek  路  3Comments