jhipster / generator-jhipster-entity-audit

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

Entity Audit generator only seems to work with classic Angular.js #76

Closed alanktwong closed 7 years ago

alanktwong commented 7 years ago

I am using jhipster 4.6.2 with new Angular.

Everything on the Spring Boot side appears to work: i.e. the EntityAuditEventRepository, the EntityAuditEvent, EntityAuditResource, etc.

This generator generated code for classic Angular that used Javascript instead of Typescript. As you probably know classic Angular.js has a very different architecture than the new Angular which uses Typescript.

So

  1. If this generator is supposed to work with new Angular, is there an option to generate a new Angular UI instead of the classic Angular.js module?
  2. If this generator is not supposed to work with new Angular, is there an alternative generator expected? Or can you document the user flow so that it is possible for to refactor the old Angular.js code to the new Angular UI.
deepu105 commented 7 years ago

I cant help you without further information.

The latest version of the module should work with angular. provide the output of jhipster info and version of the module you are using

alanktwong commented 7 years ago

Here is an "anonymized" output of jhipster info

Executing jhipster:info
Options:
Welcome to the JHipster Information Sub-Generator

##### **JHipster Version(s)**

serta-redemption@0.0.0 /Users/awong/projects/sertasimmons/src/serta-redemption
├── generator-jhipster@4.6.2
├─┬ generator-jhipster-angular-datatables@1.3.10
│ └── generator-jhipster@3.12.2
├─┬ generator-jhipster-angular-ui@0.0.2
│ └── generator-jhipster@2.25.0
├─┬ generator-jhipster-entity-audit-and-delete@2.2.2
│ └── generator-jhipster@3.12.2
└─┬ generator-jhipster-google-analytics@0.0.1
  └── generator-jhipster@2.25.0

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**

<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "org.awong.whatever",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.6.2",
    "baseName": "serta_redemption",
    "packageName": "org.awong.whatever",
    "packageFolder": "org/awong/whatever",
    "serverPort": "8080",
    "authenticationType": "oauth2",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "gradle",
    "enableSocialSignIn": false,
    "clientFramework": "angularX",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [
      "gatling",
      "cucumber",
      "protractor"
    ],
    "jhiPrefix": "jhi",
    "otherModules": [
      {
        "name": "generator-jhipster-docker",
        "version": "2.2.0"
      },
      {
        "name": "generator-jhipster-ci",
        "version": "1.0.0"
      },
      {
        "name": "generator-jhipster-swagger2markup",
        "version": "1.2.0"
      },
      {
        "name": "generator-jhipster-ff4j",
        "version": "1.6.6"
      },
      {
        "name": "generator-jhipster-swagger-cli",
        "version": "2.0.5"
      },
      {
        "name": "generator-jhipster-angular-datatables",
        "version": "1.3.10"
      },
      {
        "name": "generator-jhipster-entity-audit",
        "version": "2.5.0"
      },
      {
        "name": "generator-jhipster-hatch-entitlements",
        "version": "0.0.7"
      },
      {
        "name": "generator-jhipster-entity-audit-and-delete",
        "version": "2.2.2"
      },
      {
        "name": "generator-jhipster-spring-social-connectors",
        "version": "0.0.1"
      },
      {
        "name": "generator-jhipster-angular-ui",
        "version": "0.0.2"
      },
      {
        "name": "generator-jhipster-google-analytics",
        "version": "0.0.1"
      }
    ],
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "es"
    ]
  },
  "generator-jhipster-entity-audit": {
    "auditFramework": "custom"
  }
}
</pre>
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>
entity Country (country) {
  isocode String,
  name String,
  activated Boolean required
}

</pre>
</details>

##### **Environment and Tools**

java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

git version 2.11.0

node: v6.9.2

npm: 3.10.9

bower: 1.8.0

gulp:
[12:13:54] CLI version 1.4.0
[12:13:54] Local version 3.9.1

yeoman: 2.0.0

yarn: 0.27.5

Docker version 17.06.2-ce, build cec0b72

docker-compose version 1.14.0, build c7bdf9e

Execution complete

I'll attach shortly an anonymized copy of our package.json

alanktwong commented 7 years ago

Here is our package.json. As you can see we're using Angular 4.2.6

{
  "name": "our-jhipster",
  "version": "0.0.0",
  "description": "Description for our-jhipster",
  "private": true,
  "license": "UNLICENSED",
  "cacheDirectories": [
    "node_modules"
  ],
  "dependencies": {
    "@angular/common": "4.2.6",
    "@angular/compiler": "4.2.6",
    "@angular/core": "4.2.6",
    "@angular/forms": "4.2.6",
    "@angular/http": "4.2.6",
    "@angular/platform-browser": "4.2.6",
    "@angular/platform-browser-dynamic": "4.2.6",
    "@angular/router": "4.2.6",
    "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.28",
    "bootstrap": "4.0.0-alpha.6",
    "core-js": "2.4.1",
    "font-awesome": "4.7.0",
    "jquery": "3.2.1",
    "ng-jhipster": "0.2.7",
    "ng2-webstorage": "1.8.0",
    "ngx-cookie": "1.0.0",
    "ngx-infinite-scroll": "0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.4.2",
    "swagger-ui": "2.2.10",
    "tether": "1.4.0",
    "zone.js": "0.8.13"
  },
  "devDependencies": {
    "@angular/cli": "1.2.0",
    "@angular/compiler-cli": "4.2.6",
    "@types/jasmine": "2.5.53",
    "@types/node": "8.0.13",
    "@types/selenium-webdriver": "3.0.4",
    "angular2-template-loader": "0.6.2",
    "awesome-typescript-loader": "3.2.1",
    "babel-core": "^6.4.0",
    "babel-preset-es2015": "^6.3.13",
    "babel-register": "^6.5.2",
    "browser-sync": "2.18.12",
    "browser-sync-webpack-plugin": "1.2.0",
    "codelyzer": "3.1.2",
    "copy-webpack-plugin": "4.0.1",
    "css-loader": "0.28.4",
    "del": "^2.2.0",
    "exports-loader": "0.6.4",
    "extract-text-webpack-plugin": "3.0.0",
    "fancybox": "^3.0.0",
    "file-loader": "0.11.2",
    "generator-jhipster": "4.6.2",
    "generator-jhipster-angular-datatables": "1.3.10",
    "generator-jhipster-angular-ui": "0.0.2",
    "generator-jhipster-ci": "1.0.0",
    "generator-jhipster-docker": "2.2.0",
    "generator-jhipster-entity-audit": "2.5.0",
    "generator-jhipster-entity-audit-and-delete": "2.2.2",
    "generator-jhipster-ff4j": "1.6.6",
    "generator-jhipster-google-analytics": "0.0.1",
    "generator-jhipster-hatch-entitlements": "0.0.7",
    "generator-jhipster-spring-social-connectors": "0.0.1",
    "generator-jhipster-swagger-cli": "2.0.5",
    "generator-jhipster-swagger2markup": "1.2.0",
    "gulp": "^3.9.0",
    "gulp-autoprefixer": "^3.0.1",
    "gulp-babel": "^6.1.1",
    "gulp-cache": "^0.4.2",
    "gulp-clean": "^0.3.2",
    "gulp-cssnano": "^2.0.0",
    "gulp-eslint": "^3.0.0",
    "gulp-filter": "^4.0.0",
    "gulp-htmlmin": "^3.0.0",
    "gulp-if": "^2.0.2",
    "gulp-imagemin": "^3.0.1",
    "gulp-load-plugins": "^1.2.4",
    "gulp-plumber": "^1.0.1",
    "gulp-sass": "^3.0.0",
    "gulp-size": "^2.1.0",
    "gulp-sourcemaps": "^2.2.0",
    "gulp-uglify": "^2.0.0",
    "gulp-useref": "^3.0.0",
    "gulp-util": "^3.0.8",
    "html-loader": "0.4.5",
    "html-webpack-plugin": "2.29.0",
    "jasmine-core": "2.6.4",
    "jasmine-reporters": "2.2.1",
    "karma": "1.7.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-coverage": "1.1.1",
    "karma-intl-shim": "1.0.3",
    "karma-jasmine": "1.1.0",
    "karma-junit-reporter": "1.2.0",
    "karma-notify-reporter": "1.0.1",
    "karma-phantomjs-launcher": "1.0.4",
    "karma-remap-istanbul": "0.6.0",
    "karma-sourcemap-loader": "0.3.7",
    "karma-webpack": "2.0.4",
    "main-bower-files": "^2.5.0",
    "merge-jsons-webpack-plugin": "1.0.8",
    "minimist": "^1.2.0",
    "ngc-webpack": "3.0.0",
    "node-sass": "4.5.3",
    "phantomjs-prebuilt": "2.1.14",
    "postcss-loader": "2.0.6",
    "protractor": "5.1.2",
    "protractor-jasmine2-screenshot-reporter": "0.4.0",
    "proxy-middleware": "0.15.0",
    "rimraf": "2.6.1",
    "run-sequence": "^1.2.2",
    "sass-loader": "6.0.6",
    "sourcemap-istanbul-instrumenter-loader": "0.2.0",
    "string-replace-webpack-plugin": "0.1.3",
    "style-loader": "0.18.2",
    "to-string-loader": "1.1.5",
    "ts-node": "3.2.0",
    "tslint": "5.5.0",
    "tslint-loader": "3.5.3",
    "typescript": "2.4.1",
    "vinyl": "^1.2.0",
    "vinyl-file": "^2.0.0",
    "vinyl-fs": "^2.4.4",
    "vinyl-sourcemaps-apply": "^0.2.1",
    "web-app-manifest-loader": "0.1.1",
    "webpack": "3.3.0",
    "webpack-dev-server": "2.5.1",
    "webpack-merge": "4.1.0",
    "webpack-notifier": "1.5.0",
    "webpack-visualizer-plugin": "0.1.11",
    "wiredep": "^4.0.0",
    "write-file-webpack-plugin": "4.1.0"
  },
  "engines": {
    "node": ">=6.9.0"
  },
  "eslintConfig": {
    "env": {
      "es6": true,
      "node": true,
      "browser": true
    },
    "rules": {
      "quotes": [
        2,
        "single"
      ]
    }
  },
  "scripts": {
    "lint": "tslint --type-check --project './tsconfig.json' -e 'node_modules/**'",
    "lint:fix": "yarn run lint -- --fix",
    "ngc": "ngc -p tsconfig-aot.json",
    "cleanup": "rimraf build/{aot,www}",
    "clean-www": "rimraf build//www/app/{src,build/}",
    "start": "yarn run webpack:dev",
    "webpack:dev": "yarn run webpack-dev-server -- --config webpack/webpack.dev.js --progress --inline --hot --profile --port=9060",
    "webpack:build:main": "yarn run webpack -- --config webpack/webpack.dev.js --progress --profile",
    "webpack:build": "yarn run cleanup && yarn run webpack:build:main",
    "webpack:prod:main": "yarn run webpack -- --config webpack/webpack.prod.js --progress --profile",
    "webpack:prod": "yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www",
    "webpack:test": "yarn run test",
    "webpack-dev-server": "node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js",
    "webpack": "node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js",
    "test": "karma start src/test/javascript/karma.conf.js",
    "test:watch": "yarn test -- --watch",
    "e2e": "protractor src/test/javascript/protractor.conf.js",
    "postinstall": "webdriver-manager update && node node_modules/phantomjs-prebuilt/install.js"
  }
}
deepu105 commented 7 years ago

you are using entity audit v2.5 it doesn't support angular2+ you need to upgrade to latest version of entity audit module