Generator-jhipster: Metrics page broken for react Monolith

Created on 8 Apr 2020  路  4Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

/admin/metrics page shows error:
Bildschirmfoto 2020-04-08 um 16 18 34

in console:
Bildschirmfoto 2020-04-08 um 16 19 22

Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)

6.8

JHipster configuration

no jdl imported yet

.yo-rc.json

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "..."
    },
    "jhipsterVersion": "6.8.0",
    "applicationType": "monolith",
    "baseName": "veri",
    "packageName": "...",
    "packageFolder": "...",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": "spring-websocket",
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "prodDatabaseType": "postgresql",
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": true,
    "jwtSecretKey": "...",
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "react",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1586208446028,
    "testFrameworks": ["gatling", "cucumber", "protractor"],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [],
    "enableTranslation": true,
    "nativeLanguage": "de",
    "languages": ["en", "de"],
    "blueprints": [],
    "searchEngine": false
  }
}

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

Browsers and Operating System

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

$$ bug-bounty $$ $100 area react

All 4 comments

I confirm the issue.
Adding a bounty as it's a bug and needed to be fixed for the next release

I'll take a look at this one. :thinking:

I've submitted the PR. This comes form react-jhipster which uses the NumeralJS library. As of 2.0.0, NumeralJS needs that the user loads the locales separately one by one.

I couldn't find an elegant method to dynamically load the locales using typescript. The easier fix is to import all locales.

References: https://github.com/adamwdraper/Numeral-js/issues/548 and https://github.com/adamwdraper/Numeral-js/issues/555.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dronavallisaikrishna picture dronavallisaikrishna  路  3Comments

chegola picture chegola  路  4Comments

SudharakaP picture SudharakaP  路  3Comments

marcelinobadin picture marcelinobadin  路  3Comments

SudharakaP picture SudharakaP  路  3Comments