jhipster / generator-jhipster-entity-audit

JHipster module to enable entity audit and audit log page
Apache License 2.0
136 stars 77 forks source link

Audit info isn't available #198

Closed caginbektas closed 1 year ago

caginbektas commented 1 year ago

Hello,

I've just implemented the entity-audit as described in the readme. It created/updated files. I made a clean install and started the jhipster app. However I could not find the audit data anywhere. I am afraid I am missing something but I have no idea. Here I am sharing the output of the jhipster info command.

Thanks!

bash: non: command not found bash: _: command not found

The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit https://support.apple.com/kb/HT208050. Air:ekran hizir$ jhipster info INFO! Switching to JHipster installed locally in current project's node repository (node_modules) INFO! No custom sharedOptions found within blueprint: generator-jhipster-entity-audit at /Users/hizir/Projects/jhipster/ekran/node_modules/generator-jhipster-entity-audit INFO! No custom commands found within blueprint: generator-jhipster-entity-audit at /Users/hizir/Projects/jhipster/ekran/node_modules/generator-jhipster-entity-audit (node:55605) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./lib/util/" in the "exports" field module resolution of the package at /Users/hizir/Projects/jhipster/ekran/node_modules/yeoman-environment/package.json. Update this package.json to use a subpath pattern like "./lib/util/*". (Use node --trace-deprecation ... to show where the warning was created)

    ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
    ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
    ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝

██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║ ╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗ ╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝ https://www.jhipster.tech Welcome to JHipster v7.9.3

Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
ekran@0.0.1-SNAPSHOT /Users/hizir/Projects/jhipster/ekran
├─┬ generator-jhipster-entity-audit@4.0.0
│ └── generator-jhipster@7.9.3 deduped
└── generator-jhipster@7.9.3
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "ekran",
    "blueprints": [
      {
        "name": "generator-jhipster-entity-audit",
        "version": "4.0.0"
      }
    ],
    "buildTool": "maven",
    "cacheProvider": "no",
    "clientFramework": "react",
    "clientPackageManager": "npm",
    "clientTheme": "flatly",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1675603307890,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 9060,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": ["Shipment", "ShipmentProduct"],
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "languages": ["tr", "cs", "en"],
    "lastLiquibaseTimestamp": 1676843626000,
    "messageBroker": false,
    "microfrontend": false,
    "microfrontends": [],
    "nativeLanguage": "tr",
    "otherModules": [
      {
        "name": "generator-jhipster-entity-audit",
        "version": "4.0.0"
      }
    ],
    "packageName": "com.app",
    "pages": [],
    "prodDatabaseType": "mysql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": [],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": ["cucumber"],
    "websocket": false,
    "withAdminUi": true
  },
  "generator-jhipster-entity-audit": {
    "auditFramework": "custom",
    "auditPage": true,
    "entityAuditEventChangelogDate": "20230219215346"
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity Shipment {
  detail String
  createdBy String
  createdDate Instant
  lastModifiedBy String
  lastModifiedDate Instant
}
entity ShipmentProduct {
  detail String
  price BigDecimal
  createdBy String
  createdDate Instant
  lastModifiedBy String
  lastModifiedDate Instant
}

relationship OneToMany {
  Shipment{shipmentProducts} to ShipmentProduct{shipment}
}

dto Shipment, ShipmentProduct with mapstruct
paginate Shipment with pagination
service Shipment, ShipmentProduct with serviceImpl
Environment and Tools

openjdk version "19.0.2" 2023-01-17 OpenJDK Runtime Environment Homebrew (build 19.0.2) OpenJDK 64-Bit Server VM Homebrew (build 19.0.2, mixed mode, sharing)

git version 2.37.1 (Apple Git-137.1)

node: v16.15.0

npm: 8.5.5

No change to package.json was detected. No package manager install will be executed. Congratulations, JHipster execution is complete! Sponsored with ❤️ by @oktadev.

caginbektas commented 1 year ago

After the following edits, it works

I am not sure if that was expected or I missed something, but it works that way after building and starting the project.

mshima commented 1 year ago

You need to post what command you use to generate the application.

caginbektas commented 1 year ago

For blueprint, jhipster-entity-audit, for initing the app god knows it was long ago