generator-jhipster 7.9.0 → 7.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/environment-builder.js +15 -1
- package/cli/jhipster.js +0 -0
- package/generators/app/index.js +12 -1
- package/generators/bootstrap/index.js +33 -1
- package/generators/ci-cd/templates/circle.yml.ejs +3 -13
- package/generators/client/files-angular.js +1 -1
- package/generators/client/files-react.js +5 -2
- package/generators/client/files-vue.js +3 -2
- package/generators/client/templates/angular/jest.conf.js.ejs +6 -3
- package/generators/client/templates/angular/package.json +18 -18
- package/generators/client/templates/angular/package.json.ejs +3 -7
- package/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/admin/health/health.model.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/update/user-management-update.component.ts.ejs +17 -15
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.model.ts.ejs +2 -2
- package/generators/client/templates/angular/src/main/webapp/app/admin/user-management/user-management.route.ts.ejs +4 -4
- package/generators/client/templates/angular/src/main/webapp/app/core/request/request-util.ts.ejs +4 -2
- package/generators/client/templates/angular/src/main/webapp/app/core/util/data-util.service.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/core/util/parse-links.service.ts.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/layouts/navbar/navbar.component.html.ejs +1 -1
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.component.html.ejs +8 -6
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.component.ts.ejs +6 -11
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.model.spec.ts.ejs +227 -25
- package/generators/client/templates/angular/src/main/webapp/app/shared/filter/filter.model.ts.ejs +104 -43
- package/generators/client/templates/angular/src/main/webapp/content/scss/global.scss.ejs +8 -0
- package/generators/client/templates/angular/tsconfig.json.ejs +0 -1
- package/generators/client/templates/angular/tsconfig.spec.json.ejs +2 -3
- package/generators/client/templates/angular/webpack/webpack.microfrontend.js.ejs +0 -3
- package/generators/client/templates/common/package.json +4 -4
- package/generators/client/templates/common/src/main/webapp/swagger-ui/index.html.ejs +1 -1
- package/generators/client/templates/react/jest.conf.js.ejs +2 -2
- package/generators/client/templates/react/package.json +24 -24
- package/generators/client/templates/react/package.json.ejs +3 -7
- package/generators/client/templates/react/src/main/webapp/app/config/store.ts.ejs +0 -6
- package/generators/client/templates/react/src/main/webapp/app/index.tsx.ejs +4 -5
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs +7 -7
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs +6 -6
- package/generators/client/templates/react/src/main/webapp/app/modules/administration/index.tsx.ejs +2 -2
- package/generators/client/templates/react/src/main/webapp/app/shared/layout/menus/admin.tsx.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.spec.ts.ejs +17 -8
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/authentication.ts.ejs +1 -1
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.spec.ts.ejs +176 -19
- package/generators/client/templates/react/src/main/webapp/app/shared/reducers/locale.ts.ejs +46 -13
- package/generators/client/templates/react/webpack/webpack.microfrontend.js.jhi.react.ejs +1 -1
- package/generators/client/templates/vue/package.json +17 -17
- package/generators/client/templates/vue/package.json.ejs +3 -7
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs +2 -1
- package/generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue.ejs +1 -1
- package/generators/client/templates/vue/src/main/webapp/app/main.ts.ejs +2 -2
- package/generators/client/templates/vue/src/main/webapp/app/router/admin.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/e2e/modules/administration/administration.spec.ts.ejs +1 -1
- package/generators/client/templates/vue/src/test/javascript/e2e/page-objects/administration-page.ts.ejs +1 -1
- package/generators/client/templates/vue/src/test/javascript/e2e/page-objects/navbar-page.ts.ejs +2 -2
- package/generators/client/templates/vue/src/test/javascript/jest.conf.js.ejs +5 -6
- package/generators/client/templates/vue/src/test/javascript/spec/app/account/account.service.spec.ts.ejs +4 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/alert/alert.service.spec.ts.ejs +106 -3
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/axios-interceptor.spec.ts.ejs +12 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/config/formatter.spec.ts.ejs +6 -0
- package/generators/client/templates/vue/src/test/javascript/spec/app/shared/sort/sorts.spec.ts.ejs +10 -0
- package/generators/client/templates/vue/webpack/webpack.common.js.ejs +1 -1
- package/generators/client/templates/vue/webpack/webpack.dev.js.ejs +2 -2
- package/generators/common/files.js +5 -4
- package/generators/common/templates/.husky/pre-commit.ejs +0 -0
- package/generators/common/templates/package.json +1 -1
- package/generators/common/templates/sonar-project.properties.ejs +19 -11
- package/generators/cypress/index.js +1 -1
- package/generators/docker-compose/templates/README-DOCKER-COMPOSE.md.ejs +3 -3
- package/generators/docker-compose/templates/docker-compose.yml.ejs +1 -1
- package/generators/docker-compose/templates/realm-config/jhipster-realm.json.ejs +32 -14
- package/generators/entity/index.js +4 -3
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/detail/entity-management-detail.component.html.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.html.ejs +18 -6
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.spec.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/list/entity-management.component.ts.ejs +23 -19
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.spec.ts.ejs +3 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/service/entity.service.ts.ejs +1 -1
- package/generators/entity-client/templates/angular/src/main/webapp/app/entities/update/entity-form.service.ts.ejs +1 -1
- package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/common/delete_template.ejs +7 -3
- package/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs +2 -2
- package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.ejs +15 -5
- package/generators/entity-server/templates/src/main/java/package/domain/Entity.java.jhi.spring_data_persistable.ejs +8 -1
- package/generators/entity-server/templates/src/main/java/package/repository/EntityRepositoryInternalImpl_reactive.java.ejs +5 -0
- package/generators/entity-server/templates/src/main/java/package/service/EntityQueryService.java.ejs +4 -4
- package/generators/entity-server/templates/src/main/java/package/service/EntityService.java.ejs +6 -4
- package/generators/entity-server/templates/src/main/java/package/service/criteria/EntityCriteria.java.ejs +3 -26
- package/generators/entity-server/templates/src/main/java/package/service/dto/EntityDTO.java.ejs +1 -0
- package/generators/entity-server/templates/src/main/java/package/service/impl/EntityServiceImpl.java.ejs +1 -1
- package/generators/entity-server/templates/src/test/java/package/web/rest/EntityResourceIT.java.ejs +33 -28
- package/generators/generate-blueprint/constants.mjs +46 -6
- package/generators/generate-blueprint/esm.mjs +0 -0
- package/generators/generate-blueprint/files.mjs +7 -5
- package/generators/generate-blueprint/generator.mjs +73 -19
- package/generators/generate-blueprint/templates/cli/cli.mjs.ejs +0 -0
- package/generators/generate-blueprint/templates/generators/generator/generator.spec.mjs.ejs +1 -1
- package/generators/generate-blueprint/templates/generators/generator/templates/template-file.ejs +0 -0
- package/generators/generator-base-blueprint.js +23 -1
- package/generators/generator-base-entities.cjs +5 -1
- package/generators/generator-base.js +82 -15
- package/generators/generator-constants.js +17 -23
- package/generators/init/templates/.husky/pre-commit +0 -0
- package/generators/kubernetes/templates/deployment.yml.ejs +1 -1
- package/generators/kubernetes/templates/ingress.yml.ejs +1 -1
- package/generators/kubernetes/templates/istio/gateway.yml.ejs +1 -1
- package/generators/kubernetes/templates/kubectl-apply.sh.ejs +0 -0
- package/generators/kubernetes/templates/kustomize/kustomization.yml.ejs +1 -1
- package/generators/kubernetes/templates/service.yml.ejs +1 -1
- package/generators/kubernetes-knative/templates/istio/gateway.yml.ejs +1 -1
- package/generators/kubernetes-knative/templates/kubectl-apply.sh.ejs +0 -0
- package/generators/kubernetes-knative/templates/service.yml.ejs +3 -3
- package/generators/languages/templates/src/main/webapp/i18n/al/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ar-ly/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/bg/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/bn/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/by/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ca/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/cs/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/da/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/de/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/activate.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/password.json +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/register.json +3 -3
- package/generators/languages/templates/src/main/webapp/i18n/el/tracker.json +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/el/user-management.json +9 -9
- package/generators/languages/templates/src/main/webapp/i18n/en/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/es/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/et/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fa/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/fr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/gl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hu/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/hy/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/in/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/it/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ko/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/mr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/my/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/nl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pa/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pl/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pt-br/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/pt-pt/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ro/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ru/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/si/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sk/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/sv/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ta/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/te/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/th/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/tr/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/ua/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/uz-Latn-uz/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/vi/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/zh-cn/health.json.ejs +1 -1
- package/generators/languages/templates/src/main/webapp/i18n/zh-tw/health.json.ejs +1 -1
- package/generators/maven/templates/mvnw +0 -0
- package/generators/openshift/templates/deployment.yml.ejs +2 -2
- package/generators/server/cleanup-elasticsearch.js +5 -0
- package/generators/server/files.js +17 -8
- package/generators/server/index.js +0 -2
- package/generators/server/templates/build.gradle.ejs +6 -14
- package/generators/server/templates/gradle/profile_dev.gradle.ejs +1 -1
- package/generators/server/templates/gradle/profile_prod.gradle.ejs +1 -1
- package/generators/server/templates/gradle.properties.ejs +6 -4
- package/generators/server/templates/gradlew +0 -0
- package/generators/server/templates/mvnw +0 -0
- package/generators/server/templates/npmw +0 -0
- package/generators/server/templates/npmw.cmd +31 -29
- package/generators/server/templates/package.json.ejs +2 -2
- package/generators/server/templates/pom.xml.ejs +12 -23
- package/generators/server/templates/sql/common/src/test/java/package/config/MsSqlTestContainer.java.ejs +2 -3
- package/generators/server/templates/src/main/docker/app.yml.ejs +7 -1
- package/generators/server/templates/src/main/docker/config/realm-config/jhipster-realm.json.ejs +32 -14
- package/generators/server/templates/src/main/docker/jhipster-control-center.yml.ejs +1 -1
- package/generators/server/templates/src/main/docker/prometheus/prometheus.yml.ejs +1 -1
- package/generators/server/templates/src/main/java/package/Application.java.ejs +11 -4
- package/generators/server/templates/src/main/java/package/config/CRLFLogConverter.java.ejs +57 -0
- package/generators/server/templates/src/main/java/package/config/EurekaWorkaroundConfiguration.java.ejs +49 -0
- package/generators/server/templates/src/main/java/package/config/LoggingConfiguration.java.ejs +4 -4
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration.java.ejs +17 -18
- package/generators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs +13 -5
- package/generators/server/templates/src/main/java/package/domain/AbstractAuditingEntity.java.ejs +5 -6
- package/generators/server/templates/src/main/java/package/domain/User.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/repository/UserRepository.java.ejs +1 -1
- package/generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs +13 -6
- package/generators/server/templates/src/main/java/package/service/dto/AdminUserDTO.java.ejs +3 -1
- package/generators/server/templates/src/main/java/package/service/dto/PasswordChangeDTO.java.ejs +5 -1
- package/generators/server/templates/src/main/java/package/service/dto/UserDTO.java.ejs +3 -1
- package/generators/server/templates/src/main/java/package/web/rest/UserResource.java.ejs +15 -42
- package/generators/server/templates/src/main/java/package/web/rest/errors/BadRequestAlertException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/EmailAlreadyUsedException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/InvalidPasswordException.java.ejs +1 -0
- package/generators/server/templates/src/main/java/package/web/rest/errors/LoginAlreadyUsedException.java.ejs +1 -0
- package/generators/server/templates/src/main/resources/config/application-dev.yml.ejs +1 -1
- package/generators/server/templates/src/main/resources/config/application-prod.yml.ejs +3 -3
- package/generators/server/templates/src/main/resources/config/application.yml.ejs +4 -2
- package/generators/server/templates/src/main/resources/config/liquibase/master.xml.ejs +3 -8
- package/generators/server/templates/src/main/resources/logback-spring.xml.ejs +5 -0
- package/generators/server/templates/src/test/java/package/config/{ElasticsearchReactiveTestConfiguration.java.ejs → ElasticsearchTestConfiguration.java.ejs} +3 -3
- package/generators/server/templates/src/test/java/package/config/ElasticsearchTestContainer.java.ejs +1 -0
- package/generators/server/templates/src/test/java/package/config/JHipsterBlockHoundIntegration.java.ejs +3 -0
- package/generators/server/templates/src/test/java/package/config/TestContainersSpringContextCustomizerFactory.java.ejs +2 -2
- package/generators/sql-constants.js +5 -2
- package/generators/utils.js +43 -3
- package/generators/workspaces/index.js +2 -1
- package/jdl/exporters/jdl-exporter.js +6 -1
- package/jdl/jhipster/application-options.js +2 -1
- package/jdl/jhipster/binary-options.js +2 -2
- package/jdl/jhipster/default-application-options.js +11 -8
- package/jdl/jhipster/entity-options.js +1 -0
- package/jdl/jhipster/search-engine-types.js +1 -0
- package/lib/constants/priorities.cjs +16 -0
- package/lib/constants/priorities.mjs +1 -0
- package/lib/index.js +2 -0
- package/lib/support/base.cjs +2 -1
- package/package.json +7 -6
- package/utils/blueprint.js +10 -0
- package/utils/field.js +9 -9
- package/generators/client/templates/react/src/main/webapp/app/config/translation-middleware.ts.ejs +0 -58
- package/generators/server/templates/.npmrc.ejs +0 -1
|
@@ -69,7 +69,7 @@ module.exports = class extends BaseBlueprintGenerator {
|
|
|
69
69
|
_prompting() {
|
|
70
70
|
return {
|
|
71
71
|
async askForCypressOptions() {
|
|
72
|
-
if (this.options.existingProject || !this.jhipsterConfig.testFrameworks.includes(CYPRESS)) {
|
|
72
|
+
if (this.options.existingProject || !(this.jhipsterConfig.testFrameworks || []).includes(CYPRESS)) {
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
await this.prompt(
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
Launch all your infrastructure by running: `docker-compose up -d`.
|
|
6
6
|
|
|
7
7
|
## Configured Docker services
|
|
8
|
-
<%_ if (
|
|
8
|
+
<%_ if (serviceDiscoveryAny) { _%>
|
|
9
9
|
|
|
10
10
|
### Service registry and configuration server:
|
|
11
11
|
<%_ } _%>
|
|
12
|
-
<%_ if (
|
|
12
|
+
<%_ if (serviceDiscoveryEureka) { _%>
|
|
13
13
|
- [JHipster Registry](http://localhost:8761)
|
|
14
14
|
<%_ } _%>
|
|
15
|
-
<%_ if (
|
|
15
|
+
<%_ if (serviceDiscoveryConsul) { _%>
|
|
16
16
|
- [Consul](http://localhost:8500)
|
|
17
17
|
<%_ } _%>
|
|
18
18
|
|
|
@@ -49,7 +49,7 @@ services:
|
|
|
49
49
|
environment:
|
|
50
50
|
- _JAVA_OPTIONS=-Xmx512m -Xms256m
|
|
51
51
|
<%_ if (usesOauth2) { _%>
|
|
52
|
-
- JHIPSTER_SLEEP=
|
|
52
|
+
- JHIPSTER_SLEEP=80
|
|
53
53
|
<%_ } _%>
|
|
54
54
|
- SPRING_PROFILES_ACTIVE=dev<% if (usesOauth2) { %>,oauth2<% } %>
|
|
55
55
|
- SPRING_SECURITY_USER_PASSWORD=<%= adminPassword %>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "jhipster",
|
|
3
3
|
"realm": "jhipster",
|
|
4
|
+
"displayName": "JHipster",
|
|
4
5
|
"notBefore": 0,
|
|
5
6
|
"defaultSignatureAlgorithm": "RS256",
|
|
6
7
|
"revokeRefreshToken": false,
|
|
@@ -496,15 +497,8 @@
|
|
|
496
497
|
"disableableCredentialTypes": [],
|
|
497
498
|
"requiredActions": [],
|
|
498
499
|
"realmRoles": [
|
|
499
|
-
"
|
|
500
|
-
"uma_authorization"
|
|
500
|
+
"default-roles-jhipster"
|
|
501
501
|
],
|
|
502
|
-
"clientRoles": {
|
|
503
|
-
"account": [
|
|
504
|
-
"view-profile",
|
|
505
|
-
"manage-account"
|
|
506
|
-
]
|
|
507
|
-
},
|
|
508
502
|
"notBefore": 0,
|
|
509
503
|
"groups": []
|
|
510
504
|
}
|
|
@@ -553,7 +547,9 @@
|
|
|
553
547
|
"publicClient": false,
|
|
554
548
|
"frontchannelLogout": false,
|
|
555
549
|
"protocol": "openid-connect",
|
|
556
|
-
"attributes": {
|
|
550
|
+
"attributes": {
|
|
551
|
+
"post.logout.redirect.uris": "+"
|
|
552
|
+
},
|
|
557
553
|
"authenticationFlowBindingOverrides": {},
|
|
558
554
|
"fullScopeAllowed": false,
|
|
559
555
|
"nodeReRegistrationTimeout": 0,
|
|
@@ -596,6 +592,7 @@
|
|
|
596
592
|
"frontchannelLogout": false,
|
|
597
593
|
"protocol": "openid-connect",
|
|
598
594
|
"attributes": {
|
|
595
|
+
"post.logout.redirect.uris": "+",
|
|
599
596
|
"pkce.code.challenge.method": "S256"
|
|
600
597
|
},
|
|
601
598
|
"authenticationFlowBindingOverrides": {},
|
|
@@ -645,7 +642,9 @@
|
|
|
645
642
|
"publicClient": true,
|
|
646
643
|
"frontchannelLogout": false,
|
|
647
644
|
"protocol": "openid-connect",
|
|
648
|
-
"attributes": {
|
|
645
|
+
"attributes": {
|
|
646
|
+
"post.logout.redirect.uris": "+"
|
|
647
|
+
},
|
|
649
648
|
"authenticationFlowBindingOverrides": {},
|
|
650
649
|
"fullScopeAllowed": false,
|
|
651
650
|
"nodeReRegistrationTimeout": 0,
|
|
@@ -683,7 +682,9 @@
|
|
|
683
682
|
"publicClient": false,
|
|
684
683
|
"frontchannelLogout": false,
|
|
685
684
|
"protocol": "openid-connect",
|
|
686
|
-
"attributes": {
|
|
685
|
+
"attributes": {
|
|
686
|
+
"post.logout.redirect.uris": "+"
|
|
687
|
+
},
|
|
687
688
|
"authenticationFlowBindingOverrides": {},
|
|
688
689
|
"fullScopeAllowed": false,
|
|
689
690
|
"nodeReRegistrationTimeout": 0,
|
|
@@ -725,6 +726,7 @@
|
|
|
725
726
|
"saml.force.post.binding": "false",
|
|
726
727
|
"saml.multivalued.roles": "false",
|
|
727
728
|
"saml.encrypt": "false",
|
|
729
|
+
"post.logout.redirect.uris": "+",
|
|
728
730
|
"saml.server.signature": "false",
|
|
729
731
|
"saml.server.signature.keyinfo.ext": "false",
|
|
730
732
|
"exclude.session.state.from.auth.response": "false",
|
|
@@ -833,6 +835,7 @@
|
|
|
833
835
|
"saml.force.post.binding": "false",
|
|
834
836
|
"saml.multivalued.roles": "false",
|
|
835
837
|
"saml.encrypt": "false",
|
|
838
|
+
"post.logout.redirect.uris": "+",
|
|
836
839
|
"saml.server.signature": "false",
|
|
837
840
|
"saml.server.signature.keyinfo.ext": "false",
|
|
838
841
|
"exclude.session.state.from.auth.response": "false",
|
|
@@ -893,6 +896,7 @@
|
|
|
893
896
|
"saml.force.post.binding": "false",
|
|
894
897
|
"saml.multivalued.roles": "false",
|
|
895
898
|
"saml.encrypt": "false",
|
|
899
|
+
"post.logout.redirect.uris": "+",
|
|
896
900
|
"saml.server.signature": "false",
|
|
897
901
|
"saml.server.signature.keyinfo.ext": "false",
|
|
898
902
|
"exclude.session.state.from.auth.response": "false",
|
|
@@ -941,7 +945,9 @@
|
|
|
941
945
|
"publicClient": false,
|
|
942
946
|
"frontchannelLogout": false,
|
|
943
947
|
"protocol": "openid-connect",
|
|
944
|
-
"attributes": {
|
|
948
|
+
"attributes": {
|
|
949
|
+
"post.logout.redirect.uris": "+"
|
|
950
|
+
},
|
|
945
951
|
"authenticationFlowBindingOverrides": {},
|
|
946
952
|
"fullScopeAllowed": false,
|
|
947
953
|
"nodeReRegistrationTimeout": 0,
|
|
@@ -986,6 +992,7 @@
|
|
|
986
992
|
"frontchannelLogout": false,
|
|
987
993
|
"protocol": "openid-connect",
|
|
988
994
|
"attributes": {
|
|
995
|
+
"post.logout.redirect.uris": "+",
|
|
989
996
|
"pkce.code.challenge.method": "S256"
|
|
990
997
|
},
|
|
991
998
|
"authenticationFlowBindingOverrides": {},
|
|
@@ -1059,6 +1066,7 @@
|
|
|
1059
1066
|
"saml.force.post.binding": "false",
|
|
1060
1067
|
"saml.multivalued.roles": "false",
|
|
1061
1068
|
"saml.encrypt": "false",
|
|
1069
|
+
"post.logout.redirect.uris": "+",
|
|
1062
1070
|
"saml.server.signature": "false",
|
|
1063
1071
|
"saml.server.signature.keyinfo.ext": "false",
|
|
1064
1072
|
"exclude.session.state.from.auth.response": "false",
|
|
@@ -1770,6 +1778,14 @@
|
|
|
1770
1778
|
"config": {}
|
|
1771
1779
|
}
|
|
1772
1780
|
],
|
|
1781
|
+
"org.keycloak.userprofile.UserProfileProvider": [
|
|
1782
|
+
{
|
|
1783
|
+
"id": "b05ccf0d-d8ac-4695-bd60-37018f8f94b4",
|
|
1784
|
+
"providerId": "declarative-user-profile",
|
|
1785
|
+
"subComponents": {},
|
|
1786
|
+
"config": {}
|
|
1787
|
+
}
|
|
1788
|
+
],
|
|
1773
1789
|
"org.keycloak.keys.KeyProvider": [
|
|
1774
1790
|
{
|
|
1775
1791
|
"id": "62707fae-58f9-4fc2-89fb-0c5d212dc3dc",
|
|
@@ -2490,9 +2506,11 @@
|
|
|
2490
2506
|
"clientSessionMaxLifespan": "0",
|
|
2491
2507
|
"parRequestUriLifespan": "60",
|
|
2492
2508
|
"clientOfflineSessionIdleTimeout": "0",
|
|
2493
|
-
"cibaInterval": "5"
|
|
2509
|
+
"cibaInterval": "5",
|
|
2510
|
+
"frontendUrl": "",
|
|
2511
|
+
"acr.loa.map": "[]"
|
|
2494
2512
|
},
|
|
2495
|
-
"keycloakVersion": "
|
|
2513
|
+
"keycloakVersion": "19.0.1",
|
|
2496
2514
|
"userManagedAccessAllowed": false,
|
|
2497
2515
|
"clientProfiles": {
|
|
2498
2516
|
"profiles": []
|
|
@@ -855,7 +855,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
|
|
|
855
855
|
*/
|
|
856
856
|
processEagerLoadRelationships() {
|
|
857
857
|
this.context.relationships.forEach(relationship => {
|
|
858
|
-
if (relationship.otherEntity.
|
|
858
|
+
if (!relationship.otherEntity.primaryKey) {
|
|
859
859
|
relationship.bagRelationship = false;
|
|
860
860
|
relationship.relationshipEagerLoad = false;
|
|
861
861
|
return;
|
|
@@ -872,7 +872,7 @@ class EntityGenerator extends BaseBlueprintGenerator {
|
|
|
872
872
|
this.context.relationshipsContainEagerLoad = this.context.relationships.some(relationship => relationship.relationshipEagerLoad);
|
|
873
873
|
this.context.containsBagRelationships = this.context.relationships.some(relationship => relationship.bagRelationship);
|
|
874
874
|
this.context.implementsEagerLoadApis = // Cassandra doesn't provides *WithEagerReationships apis
|
|
875
|
-
![CASSANDRA, COUCHBASE].includes(this.context.databaseType) &&
|
|
875
|
+
![CASSANDRA, COUCHBASE, NEO4J].includes(this.context.databaseType) &&
|
|
876
876
|
// Only sql and mongodb provides *WithEagerReationships apis for imperative implementation
|
|
877
877
|
(this.context.reactive || [SQL, MONGODB].includes(this.context.databaseType)) &&
|
|
878
878
|
this.context.relationshipsContainEagerLoad;
|
|
@@ -1145,7 +1145,8 @@ class EntityGenerator extends BaseBlueprintGenerator {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
_checkPersistableInterfaceRequirement() {
|
|
1148
|
-
this.context.requiresPersistableImplementation =
|
|
1148
|
+
this.context.requiresPersistableImplementation =
|
|
1149
|
+
this.context.requiresPersistableImplementation || this.context.fields.some(field => field.requiresPersistableImplementation);
|
|
1149
1150
|
}
|
|
1150
1151
|
}
|
|
1151
1152
|
|
|
@@ -88,7 +88,7 @@ _%>
|
|
|
88
88
|
</span>
|
|
89
89
|
<%_ } else { _%>
|
|
90
90
|
<div *ngIf="<%= entityInstance + '.' + relationshipFieldName %>">
|
|
91
|
-
<a [routerLink]="['/<%= otherEntityStateName %>', <%= entityInstance + '.' + relationshipFieldName + '.' + relationship.otherEntity.primaryKey.name %>, 'view']">{{ <%= entityInstance %>.<%= relationshipFieldName
|
|
91
|
+
<a [routerLink]="['/<%= otherEntityStateName %>', <%= entityInstance + '.' + relationshipFieldName + '.' + relationship.otherEntity.primaryKey.name %>, 'view']">{{ <%= entityInstance %>.<%= relationshipFieldName %>.<%= otherEntityField %> }}</a>
|
|
92
92
|
</div>
|
|
93
93
|
<%_ } _%>
|
|
94
94
|
<%_ } _%>
|
|
@@ -61,19 +61,26 @@
|
|
|
61
61
|
<%_ } _%>
|
|
62
62
|
|
|
63
63
|
<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>
|
|
64
|
-
<<%= jhiPrefixDashed %>-filter [filters]="filters"
|
|
64
|
+
<<%= jhiPrefixDashed %>-filter [filters]="filters"></<%= jhiPrefixDashed %>-filter>
|
|
65
65
|
<%_ } _%>
|
|
66
66
|
|
|
67
67
|
<div class="alert alert-warning" id="no-result" *ngIf="<%= entityInstancePlural %>?.length === 0">
|
|
68
68
|
<span <%= jhiPrefix %>Translate="<%= i18nKeyPrefix %>.home.notFound"><%- this._getEntityClientTranslation(i18nKeyPrefix + '.home.notFound') %></span>
|
|
69
69
|
</div>
|
|
70
70
|
|
|
71
|
-
<div class="table-responsive" id="entities" *ngIf="<%= entityInstancePlural %> && <%= entityInstancePlural %>.length > 0">
|
|
71
|
+
<div class="table-responsive table-entities" id="entities" *ngIf="<%= entityInstancePlural %> && <%= entityInstancePlural %>.length > 0">
|
|
72
72
|
<table class="table table-striped" aria-describedby="page-heading">
|
|
73
73
|
<thead>
|
|
74
74
|
<tr <%= jhiPrefix %>Sort [(predicate)]="predicate" [(ascending)]="ascending" (sortChange)="navigateToWithComponentValues()">
|
|
75
75
|
<%_ for (const field of fields.filter(field => !field.hidden)) { _%>
|
|
76
|
-
<th scope="col" <%= jhiPrefix %>SortBy="<%= field.fieldName %>"
|
|
76
|
+
<th scope="col" <%= jhiPrefix %>SortBy="<%= field.fieldName %>">
|
|
77
|
+
<div class="d-flex">
|
|
78
|
+
<span <%= jhiPrefix %>Translate="<%= field.fieldTranslationKey %>"><%- this._getEntityClientTranslation(field.fieldTranslationKey) %></span>
|
|
79
|
+
<%_ if (!field.transient) { _%>
|
|
80
|
+
<fa-icon class="p-1" <% if (searchEngine && !field.fieldTypeBoolean && !field.fieldTypeNumeric && !field.fieldTypeTemporal) { %>*ngIf="!currentSearch" <% } %>icon="sort"></fa-icon>
|
|
81
|
+
<%_ } _%>
|
|
82
|
+
</div>
|
|
83
|
+
</th>
|
|
77
84
|
<%_ } _%>
|
|
78
85
|
<%_ for (const relationship of relationships.filter(rel => !rel.otherEntityIsEmbedded)) { _%>
|
|
79
86
|
<%_ if (relationship.relationshipManyToOne
|
|
@@ -81,13 +88,18 @@
|
|
|
81
88
|
|| (relationship.relationshipManyToMany && relationship.ownerSide && paginationNo)) {
|
|
82
89
|
const fieldName = "." + relationship.otherEntityField;
|
|
83
90
|
_%>
|
|
84
|
-
<th scope="col" <%= jhiPrefix %>SortBy="<%= relationship.relationshipName + (fieldName) %>"
|
|
91
|
+
<th scope="col" <%= jhiPrefix %>SortBy="<%= relationship.relationshipName + (fieldName) %>">
|
|
92
|
+
<div class="d-flex">
|
|
93
|
+
<span <%= jhiPrefix %>Translate="<%= `${i18nKeyPrefix}.${relationship.relationshipName}` %>"><%- this._getEntityClientTranslation(i18nKeyPrefix + '.' + relationship.relationshipName) %></span>
|
|
94
|
+
<fa-icon class="p-1" icon="sort"></fa-icon>
|
|
95
|
+
</div>
|
|
96
|
+
</th>
|
|
85
97
|
<%_ } _%>
|
|
86
98
|
<%_ } _%>
|
|
87
99
|
<th scope="col"></th>
|
|
88
100
|
</tr>
|
|
89
101
|
</thead>
|
|
90
|
-
<tbody<% if (paginationInfiniteScroll) { %> infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page >= links['last']" [infiniteScrollDistance]="0"<% } %>>
|
|
102
|
+
<tbody<% if (paginationInfiniteScroll) { %> infinite-scroll (scrolled)="loadPage(page + 1)" [infiniteScrollDisabled]="page - 1 >= links['last']" [infiniteScrollDistance]="0"<% } %>>
|
|
91
103
|
<tr *ngFor="let <%= entityInstance %> of <%= entityInstancePlural %>; trackBy: track<%= primaryKey.nameCapitalized %>" data-cy="entityTable">
|
|
92
104
|
<%_
|
|
93
105
|
const routerLink = ` [routerLink]="['/${ entityPage }', ${entityInstance}.${primaryKey.name}, 'view']"`;
|
|
@@ -146,7 +158,7 @@ _%>
|
|
|
146
158
|
</span>
|
|
147
159
|
<%_ } else { _%>
|
|
148
160
|
<div *ngIf="<%= entityInstance + "." + relationshipFieldName %>">
|
|
149
|
-
<a [routerLink]="['/<%= relationship.otherEntity.entityPage %>', <%= entityInstance %>.<%= relationshipFieldName %>.<%= relationship.otherEntity.primaryKey.name %>, 'view']">{{ <%= entityInstance %>.<%= relationshipFieldName
|
|
161
|
+
<a [routerLink]="['/<%= relationship.otherEntity.entityPage %>', <%= entityInstance %>.<%= relationshipFieldName %>.<%= relationship.otherEntity.primaryKey.name %>, 'view']">{{ <%= entityInstance %>.<%= relationshipFieldName %>.<%= otherEntityField %> }}</a>
|
|
150
162
|
</div>
|
|
151
163
|
<%_ } _%>
|
|
152
164
|
<%_ } _%>
|
|
@@ -166,7 +166,7 @@ describe('<%= entityAngularName %> Management Component', () => {
|
|
|
166
166
|
comp.ngOnInit();
|
|
167
167
|
|
|
168
168
|
// THEN
|
|
169
|
-
expect(service.query).toHaveBeenLastCalledWith(expect.objectContaining({ 'someId.in': 'dc4279ea-cfb9-11ec-9d64-0242ac120002' }));
|
|
169
|
+
expect(service.query).toHaveBeenLastCalledWith(expect.objectContaining({ 'someId.in': ['dc4279ea-cfb9-11ec-9d64-0242ac120002'] }));
|
|
170
170
|
});
|
|
171
171
|
<%_ } _%>
|
|
172
172
|
<%_ } _%>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
const notSortableFieldsAfterSearch = notSortableFieldsAfterSearchArray
|
|
27
27
|
.map(field => `'${field.fieldName}'`)
|
|
28
28
|
.join(', ');
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
const componentName = entityAngularName + 'Component';
|
|
31
31
|
_%>
|
|
32
32
|
import { Component, OnInit } from '@angular/core';
|
|
@@ -34,7 +34,7 @@ import { Component, OnInit } from '@angular/core';
|
|
|
34
34
|
import { HttpHeaders } from '@angular/common/http';
|
|
35
35
|
<%_ } _%>
|
|
36
36
|
import { ActivatedRoute, Data, ParamMap, Router } from '@angular/router';
|
|
37
|
-
import { combineLatest
|
|
37
|
+
import { combineLatest<%_ if (!readOnly) { _%>, filter<%_ } _%>, Observable, switchMap, tap } from 'rxjs';
|
|
38
38
|
<%_ if (!readOnly) { _%>
|
|
39
39
|
import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|
40
40
|
<%_ } _%>
|
|
@@ -43,7 +43,9 @@ import { I<%= entityAngularName %> } from '../<%= entityFileName %>.model';
|
|
|
43
43
|
<%_ if (!paginationNo) { %>
|
|
44
44
|
import {
|
|
45
45
|
ITEMS_PER_PAGE,
|
|
46
|
+
<%_ if (paginationPagination) { _%>
|
|
46
47
|
PAGE_HEADER,
|
|
48
|
+
<%_ } _%>
|
|
47
49
|
<%_ if (paginationPagination) { _%>
|
|
48
50
|
TOTAL_COUNT_RESPONSE_HEADER,
|
|
49
51
|
<%_ } _%>
|
|
@@ -53,7 +55,9 @@ import {
|
|
|
53
55
|
ASC,
|
|
54
56
|
DESC,
|
|
55
57
|
SORT,
|
|
58
|
+
<%_ if (!readOnly) { _%>
|
|
56
59
|
ITEM_DELETED_EVENT,
|
|
60
|
+
<%_ } _%>
|
|
57
61
|
DEFAULT_SORT_DATA
|
|
58
62
|
} from 'app/config/navigation.constants';
|
|
59
63
|
import { EntityArrayResponseType, <%= entityAngularName %>Service } from '../service/<%= entityFileName %>.service';
|
|
@@ -67,7 +71,7 @@ import { DataUtils } from 'app/core/util/data-util.service';
|
|
|
67
71
|
import { ParseLinks } from 'app/core/util/parse-links.service';
|
|
68
72
|
<%_ } _%>
|
|
69
73
|
<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>
|
|
70
|
-
import { FilterOptions, IFilterOptions } from 'app/shared/filter/filter.model';
|
|
74
|
+
import { FilterOptions, IFilterOptions, IFilterOption } from 'app/shared/filter/filter.model';
|
|
71
75
|
<%_ } _%>
|
|
72
76
|
<%_ if (paginationNo) { _%>
|
|
73
77
|
import { SortService } from 'app/shared/sort/sort.service';
|
|
@@ -157,6 +161,9 @@ export class <%= componentName %> implements OnInit {
|
|
|
157
161
|
<%_ } _%>
|
|
158
162
|
ngOnInit(): void {
|
|
159
163
|
this.load();
|
|
164
|
+
<% if (jpaMetamodelFiltering && paginationPagination) { %>
|
|
165
|
+
this.filters.filterChanges.subscribe(filterOptions => this.handleNavigation(1, this.predicate, this.ascending, filterOptions));
|
|
166
|
+
<% } %>
|
|
160
167
|
}
|
|
161
168
|
|
|
162
169
|
<%_ if (fieldsContainBlob) { _%>
|
|
@@ -196,12 +203,12 @@ export class <%= componentName %> implements OnInit {
|
|
|
196
203
|
}
|
|
197
204
|
|
|
198
205
|
navigateToWithComponentValues(): void {
|
|
199
|
-
this.handleNavigation(<% if (!paginationNo) { %>this.page, <% } %>this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>);
|
|
206
|
+
this.handleNavigation(<% if (!paginationNo) { %>this.page, <% } %>this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters.filterOptions<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>);
|
|
200
207
|
}
|
|
201
208
|
|
|
202
209
|
<%_ if (!paginationNo) { _%>
|
|
203
210
|
navigateToPage(page = this.page): void {
|
|
204
|
-
this.handleNavigation(page, this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>);
|
|
211
|
+
this.handleNavigation(page, this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters.filterOptions<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>);
|
|
205
212
|
}
|
|
206
213
|
|
|
207
214
|
<%_ } _%>
|
|
@@ -210,13 +217,13 @@ export class <%= componentName %> implements OnInit {
|
|
|
210
217
|
.pipe(
|
|
211
218
|
tap(([params, data]) => this.fillComponentAttributeFromRoute(params, data)),
|
|
212
219
|
switchMap(() =>
|
|
213
|
-
this.queryBackend(<% if (!paginationNo) { %>this.page, <% } %>this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>)
|
|
220
|
+
this.queryBackend(<% if (!paginationNo) { %>this.page, <% } %>this.predicate, this.ascending<% if (jpaMetamodelFiltering && paginationPagination) { %>, this.filters.filterOptions<% } %><% if (searchEngine) { %>, this.currentSearch<% } %>)
|
|
214
221
|
)
|
|
215
222
|
);
|
|
216
223
|
}
|
|
217
224
|
|
|
218
225
|
protected fillComponentAttributeFromRoute(params: ParamMap, data: Data): void {
|
|
219
|
-
<%_ if (
|
|
226
|
+
<%_ if (paginationPagination) { _%>
|
|
220
227
|
const page = params.get(PAGE_HEADER);
|
|
221
228
|
this.page = +(page ?? 1);
|
|
222
229
|
<%_ } _%>
|
|
@@ -293,7 +300,7 @@ export class <%= componentName %> implements OnInit {
|
|
|
293
300
|
}
|
|
294
301
|
|
|
295
302
|
<%_ } _%>
|
|
296
|
-
protected queryBackend(<% if (!paginationNo) { %>page?: number, <% } %>predicate?: string, ascending?: boolean<% if (jpaMetamodelFiltering && paginationPagination) { %>,
|
|
303
|
+
protected queryBackend(<% if (!paginationNo) { %>page?: number, <% } %>predicate?: string, ascending?: boolean<% if (jpaMetamodelFiltering && paginationPagination) { %>, filterOptions?: IFilterOption[]<% } %><% if (searchEngine) { %>, currentSearch?: string<% } %>): Observable<EntityArrayResponseType> {
|
|
297
304
|
this.isLoading = true;
|
|
298
305
|
<%_ if (!paginationNo) { _%>
|
|
299
306
|
const pageToLoad: number = page ?? 1;
|
|
@@ -312,11 +319,9 @@ export class <%= componentName %> implements OnInit {
|
|
|
312
319
|
sort: this.getSortQueryParam(predicate, ascending),
|
|
313
320
|
};
|
|
314
321
|
<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
});
|
|
319
|
-
}
|
|
322
|
+
filterOptions?.forEach(filterOption => {
|
|
323
|
+
queryObject[filterOption.name] = filterOption.values;
|
|
324
|
+
});
|
|
320
325
|
<%_ } _%>
|
|
321
326
|
<%_ if (searchEngine) { _%>
|
|
322
327
|
if (this.currentSearch && this.currentSearch !== '') {
|
|
@@ -335,7 +340,7 @@ export class <%= componentName %> implements OnInit {
|
|
|
335
340
|
<%_ } _%>
|
|
336
341
|
}
|
|
337
342
|
|
|
338
|
-
protected handleNavigation(<% if (!paginationNo) { %>page = this.page, <% } %>predicate?: string, ascending?: boolean<% if (jpaMetamodelFiltering && paginationPagination) { %>,
|
|
343
|
+
protected handleNavigation(<% if (!paginationNo) { %>page = this.page, <% } %>predicate?: string, ascending?: boolean<% if (jpaMetamodelFiltering && paginationPagination) { %>, filterOptions?: IFilterOption[]<% } %><% if (searchEngine) { %>, currentSearch?: string<% } %>): void {
|
|
339
344
|
const queryParamsObj<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>: any<%_ } _%> = {
|
|
340
345
|
<%_ if (searchEngine) { _%>
|
|
341
346
|
search: currentSearch,
|
|
@@ -346,12 +351,11 @@ export class <%= componentName %> implements OnInit {
|
|
|
346
351
|
<%_ } _%>
|
|
347
352
|
sort: this.getSortQueryParam(predicate, ascending),
|
|
348
353
|
};
|
|
354
|
+
|
|
349
355
|
<%_ if (jpaMetamodelFiltering && paginationPagination) { _%>
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
});
|
|
354
|
-
}
|
|
356
|
+
filterOptions?.forEach(filterOption => {
|
|
357
|
+
queryParamsObj[filterOption.nameAsQueryParam()] = filterOption.values;
|
|
358
|
+
});
|
|
355
359
|
<%_ } _%>
|
|
356
360
|
|
|
357
361
|
this.router.navigate([ './' ], {
|
|
@@ -124,11 +124,13 @@ describe('<%= entityAngularName %> Service', () => {
|
|
|
124
124
|
|
|
125
125
|
<%_ if (!readOnly) { _%>
|
|
126
126
|
it('should delete a <%= entityAngularName %>', () => {
|
|
127
|
+
const expected = true;
|
|
128
|
+
|
|
127
129
|
service.delete(<%- tsKeyId %>).subscribe(resp => expectedResult = resp.ok);
|
|
128
130
|
|
|
129
131
|
const req = httpMock.expectOne({ method: 'DELETE' });
|
|
130
132
|
req.flush({ status: 200 });
|
|
131
|
-
expect(expectedResult);
|
|
133
|
+
expect(expectedResult).toBe(expected);
|
|
132
134
|
});
|
|
133
135
|
<%_ } _%>
|
|
134
136
|
|
|
@@ -67,7 +67,7 @@ export type EntityArrayResponseType = HttpResponse<I<%= entityAngularName %>[]>;
|
|
|
67
67
|
export class <%= entityAngularName %>Service {
|
|
68
68
|
protected resourceUrl = this.applicationConfigService.getEndpointFor('api/<%= entityApiUrl %>'<% if ((applicationTypeGateway || applicationTypeMicroservice) && locals.microserviceName) { %>, '<%= microserviceName.toLowerCase() %>'<% } %>);
|
|
69
69
|
<%_ if (searchEngine) { _%>
|
|
70
|
-
protected resourceSearchUrl = this.applicationConfigService.getEndpointFor('api/_search/<%= entityApiUrl %>'<% if (applicationTypeGateway && locals.microserviceName) { %>, '<%= microserviceName.toLowerCase() %>'<% } %>);
|
|
70
|
+
protected resourceSearchUrl = this.applicationConfigService.getEndpointFor('api/_search/<%= entityApiUrl %>'<% if ((applicationTypeGateway || applicationTypeMicroservice) && locals.microserviceName) { %>, '<%= microserviceName.toLowerCase() %>'<% } %>);
|
|
71
71
|
<%_ } _%>
|
|
72
72
|
|
|
73
73
|
constructor(protected http: HttpClient, protected applicationConfigService: ApplicationConfigService) {}
|
|
@@ -192,7 +192,7 @@ _%>
|
|
|
192
192
|
form.reset({
|
|
193
193
|
...<%= entityInstance %>RawValue,
|
|
194
194
|
<%_ for (const field of fields.filter(field => field.id)) { _%>
|
|
195
|
-
<%= field.fieldName %>: { value: <%= entityInstance %>RawValue.<%= field.fieldName %>, disabled: <% if (field.autoGenerate) { %>true<% } else { %><%= entityInstance %>RawValue.<%= fieldName %> !== null<% } %> },
|
|
195
|
+
<%= field.fieldName %>: { value: <%= entityInstance %>RawValue.<%= field.fieldName %>, disabled: <% if (field.autoGenerate) { %>true<% } else { %><%= entityInstance %>RawValue.<%= field.fieldName %> !== null<% } %> },
|
|
196
196
|
<%_ } _%>
|
|
197
197
|
} as any /* cast to workaround https://github.com/angular/angular/issues/46458 */);
|
|
198
198
|
}
|
package/generators/entity-client/templates/vue/src/main/webapp/app/entities/entity.component.ts.ejs
CHANGED
|
@@ -111,7 +111,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
|
|
|
111
111
|
<%_ if (paginationInfiniteScroll) { _%>
|
|
112
112
|
if ((<any>this.$refs.infiniteLoading)) {
|
|
113
113
|
(<any>this.$refs.infiniteLoading).stateChanger.loaded();
|
|
114
|
-
if (this.links !== {} && this.page > this.links['last']) {
|
|
114
|
+
if (JSON.stringify(this.links) !== JSON.stringify({}) && this.page > this.links['last']) {
|
|
115
115
|
(<any>this.$refs.infiniteLoading).stateChanger.complete();
|
|
116
116
|
}
|
|
117
117
|
}
|
|
@@ -144,7 +144,7 @@ export default class <%= entityAngularName %> extends <% if (fieldsContainBlob |
|
|
|
144
144
|
<%_ if (paginationInfiniteScroll) { _%>
|
|
145
145
|
if ((<any>this.$refs.infiniteLoading)) {
|
|
146
146
|
(<any>this.$refs.infiniteLoading).stateChanger.loaded();
|
|
147
|
-
if (this.links !== {} && this.page > this.links['last']) {
|
|
147
|
+
if (JSON.stringify(this.links) !== JSON.stringify({}) && this.page > this.links['last']) {
|
|
148
148
|
(<any>this.$refs.infiniteLoading).stateChanger.complete();
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -17,9 +17,13 @@
|
|
|
17
17
|
limitations under the License.
|
|
18
18
|
-%>
|
|
19
19
|
<%_ if (reactive) { _%>
|
|
20
|
-
return <%= entityInstance %><%= viaService ? 'Service.delete' : 'Repository.deleteById' %>(id)
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
return <%= entityInstance %><%= viaService ? 'Service.delete' : 'Repository.deleteById' %>(id)
|
|
21
|
+
<%_ if (!viaService && searchEngineElasticsearch) { %>
|
|
22
|
+
.then(<%= entityInstance %>SearchRepository.deleteById(id))
|
|
23
|
+
<%_ } -%>
|
|
24
|
+
<%_ if (!fromResource) { -%>
|
|
25
|
+
;
|
|
26
|
+
<%_ } _%>
|
|
23
27
|
<%_ } else { _%>
|
|
24
28
|
<%= entityInstance %><%= viaService ? 'Service.delete' : 'Repository.deleteById' %>(id);
|
|
25
29
|
<%_ if (!viaService && searchEngineElasticsearch) { _%>
|
package/generators/entity-server/templates/src/main/java/package/common/get_all_template.ejs
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
_%>
|
|
27
27
|
<%_ if (jpaMetamodelFiltering) { _%>
|
|
28
28
|
public ResponseEntity<List<<%= instanceType %>>> getAll<%= entityClassPlural %>(<%= entityClass %>Criteria criteria<% if (!paginationNo) { %>, @org.springdoc.api.annotations.ParameterObject Pageable pageable<% if (reactive) { %>, ServerHttpRequest request<% } %><% } %>) {
|
|
29
|
-
log.debug("REST request to get <%= entityClassPlural %> by criteria: {}", criteria
|
|
29
|
+
log.debug("REST request to get <%= entityClassPlural %> by criteria: {}", criteria);
|
|
30
30
|
<%_ if (paginationNo) { _%>
|
|
31
31
|
List<<%= instanceType %>> entityList = <%= entityInstance %>QueryService.findByCriteria(criteria);
|
|
32
32
|
return ResponseEntity.ok().body(entityList);
|
|
@@ -45,7 +45,7 @@ _%>
|
|
|
45
45
|
*/
|
|
46
46
|
@GetMapping("/<%= entityApiUrl %>/count")
|
|
47
47
|
public ResponseEntity<Long> count<%= entityClassPlural %>(<%= entityClass %>Criteria criteria) {
|
|
48
|
-
log.debug("REST request to count <%= entityClassPlural %> by criteria: {}", criteria
|
|
48
|
+
log.debug("REST request to count <%= entityClassPlural %> by criteria: {}", criteria);
|
|
49
49
|
return ResponseEntity.ok().body(<%= entityInstance %>QueryService.countByCriteria(criteria));
|
|
50
50
|
}
|
|
51
51
|
<%_ } else { _%>
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
importSection: 0,
|
|
23
23
|
staticImportSection: 0,
|
|
24
24
|
annotationSection: 0,
|
|
25
|
+
extendsSection: 1,
|
|
25
26
|
additionalInterfacesSection: 0,
|
|
26
27
|
classStaticFieldsSection: 0,
|
|
27
28
|
classFieldsSection: 0,
|
|
@@ -30,6 +31,8 @@
|
|
|
30
31
|
classAdditionalRelationshipsSection: 0,
|
|
31
32
|
classAdditionalRelationshipsMethodsSection: 0,
|
|
32
33
|
<%_ for (const field of fields) { _%>
|
|
34
|
+
field<%- field.fieldNameCapitalized %>CustomDeclarationSection: 1,
|
|
35
|
+
field<%- field.fieldNameCapitalized %>CustomMethodsSection: 1,
|
|
33
36
|
field<%- field.fieldNameCapitalized %>AnnotationSection: 0,
|
|
34
37
|
<%_ if (field.fieldWithContentType) { _%>
|
|
35
38
|
field<%- field.fieldNameCapitalized %>ContentTypeAnnotationSection: 0,
|
|
@@ -93,7 +96,8 @@ import <%= otherEntity.entityAbsoluteClass %>;
|
|
|
93
96
|
<%_ } _%>
|
|
94
97
|
<%_ } _%>
|
|
95
98
|
<&- fragments.annotationSection() -&>
|
|
96
|
-
|
|
99
|
+
@SuppressWarnings("common-java:DuplicatedBlocks")
|
|
100
|
+
public class <%= persistClass %> <&- fragments.extendsSection() -&>implements Serializable<&- fragments.additionalInterfacesSection() -&> {
|
|
97
101
|
|
|
98
102
|
private static final long serialVersionUID = 1L;
|
|
99
103
|
|
|
@@ -104,7 +108,9 @@ public class <%= persistClass %> implements Serializable<&- fragments.additional
|
|
|
104
108
|
<%_ } _%>
|
|
105
109
|
<&- fragments.classStaticFieldsSection() -&>
|
|
106
110
|
<&- fragments.classFieldsSection() -&>
|
|
107
|
-
<%_ for (const field of fields.filter(field => !field.transient && (embedded || !field.id || !primaryKey.composite))) { _%>
|
|
111
|
+
<%_ for (const field of fields.filter(field => !field.javaInherited && !field.transient && (embedded || !field.id || !primaryKey.composite))) { _%>
|
|
112
|
+
<&- fragments.field<%- field.fieldNameCapitalized %>CustomDeclarationSection() -&>
|
|
113
|
+
<&_ if (!fragments.field<%- field.fieldNameCapitalized %>CustomDeclarationSection()) { -&>
|
|
108
114
|
<%_ if (typeof field.javadoc !== 'undefined') { _%>
|
|
109
115
|
<%- formatAsFieldJavadoc(field.javadoc) %>
|
|
110
116
|
<%_ } _%>
|
|
@@ -119,6 +125,7 @@ public class <%= persistClass %> implements Serializable<&- fragments.additional
|
|
|
119
125
|
private String <%= field.fieldName %>ContentType;
|
|
120
126
|
|
|
121
127
|
<%_ } _%>
|
|
128
|
+
<&_ } -&>
|
|
122
129
|
<%_ } _%>
|
|
123
130
|
<&- fragments.classAdditionalFieldsSection() -&>
|
|
124
131
|
|
|
@@ -170,6 +177,8 @@ for (relationship of relationships.filter(relationship => !relationship.embedded
|
|
|
170
177
|
<&- fragments.classAdditionalRelationshipsSection() -&>
|
|
171
178
|
// jhipster-needle-entity-add-field - JHipster will add fields here
|
|
172
179
|
<%_ for (const field of fields.filter(field => !field.transient && (embedded || !field.id || !primaryKey.composite))) { _%>
|
|
180
|
+
<&- fragments.field<%- field.fieldNameCapitalized %>CustomMethodsSection() -&>
|
|
181
|
+
<&_ if (!fragments.field<%- field.fieldNameCapitalized %>CustomMethodsSection()) { -&>
|
|
173
182
|
|
|
174
183
|
public <%= field.javaFieldType %> get<%= field.fieldInJavaBeanMethod %>() {
|
|
175
184
|
return this.<%= field.fieldName %>;
|
|
@@ -182,12 +191,12 @@ for (relationship of relationships.filter(relationship => !relationship.embedded
|
|
|
182
191
|
}
|
|
183
192
|
<%_ } _%>
|
|
184
193
|
|
|
185
|
-
<&- fragments.field<%- field.fieldNameCapitalized %>CustomSetSection() -&>
|
|
186
|
-
<&_ if (!fragments.field<%- field.fieldNameCapitalized %>CustomSetSection()) { -&>
|
|
194
|
+
<&- fragments.field<%- field.fieldNameCapitalized %>CustomSetSection() -&>
|
|
195
|
+
<&_ if (!fragments.field<%- field.fieldNameCapitalized %>CustomSetSection()) { -&>
|
|
187
196
|
public void set<%= field.fieldInJavaBeanMethod %>(<%= field.javaFieldType %> <%= field.fieldName %>) {
|
|
188
197
|
this.<%= field.fieldName %> = <%= field.fieldName %>;
|
|
189
198
|
}
|
|
190
|
-
<&_ } -&>
|
|
199
|
+
<&_ } -&>
|
|
191
200
|
<%_ if (field.fieldWithContentType) { _%>
|
|
192
201
|
|
|
193
202
|
public String get<%= field.fieldInJavaBeanMethod %>ContentType() {
|
|
@@ -205,6 +214,7 @@ for (relationship of relationships.filter(relationship => !relationship.embedded
|
|
|
205
214
|
this.<%= field.fieldName %>ContentType = <%= field.fieldName %>ContentType;
|
|
206
215
|
}
|
|
207
216
|
<%_ } _%>
|
|
217
|
+
<&_ } -&>
|
|
208
218
|
<%_ } _%>
|
|
209
219
|
|
|
210
220
|
<&- fragments.classAdditionalFieldsMethodsSection('\n\n') -&>
|
|
@@ -22,6 +22,13 @@
|
|
|
22
22
|
-%>
|
|
23
23
|
<&_ if (fragment.importSection) { -&>
|
|
24
24
|
import org.springframework.data.domain.Persistable;
|
|
25
|
+
<%_ if (!relationshipsContainOtherSideIgnore) { _%>
|
|
26
|
+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|
27
|
+
<%_ } _%>
|
|
28
|
+
<&_ } -&>
|
|
29
|
+
|
|
30
|
+
<&_ if (fragment.annotationSection) { -&>
|
|
31
|
+
@JsonIgnoreProperties(value = { "new" })
|
|
25
32
|
<&_ } -&>
|
|
26
33
|
|
|
27
34
|
<&_ if (fragment.additionalInterfacesSection) { -&>
|
|
@@ -51,4 +58,4 @@ import org.springframework.data.domain.Persistable;
|
|
|
51
58
|
this.isPersisted = true;
|
|
52
59
|
return this;
|
|
53
60
|
}
|
|
54
|
-
<&_ } -&>
|
|
61
|
+
<&_ } -&>
|
|
@@ -37,6 +37,7 @@ import java.util.List;
|
|
|
37
37
|
import java.util.Map;
|
|
38
38
|
import java.util.Map.Entry;
|
|
39
39
|
import java.util.Optional;
|
|
40
|
+
import org.apache.commons.lang3.StringUtils;
|
|
40
41
|
import org.springframework.data.domain.Pageable;
|
|
41
42
|
import io.r2dbc.spi.Row;
|
|
42
43
|
import io.r2dbc.spi.RowMetadata;
|
|
@@ -148,7 +149,11 @@ _%>
|
|
|
148
149
|
|
|
149
150
|
@Override
|
|
150
151
|
public Mono<<%= persistClass %>> findById(<%= primaryKey.type %> id) {
|
|
152
|
+
<%_ if (primaryKey.type != 'Long') { _%>
|
|
153
|
+
Comparison whereClause = Conditions.isEqual(entityTable.column("<%= primaryKey.fields[0].columnName %>"), Conditions.just(StringUtils.wrap(id.toString(), "'")));
|
|
154
|
+
<%_ } else { _%>
|
|
151
155
|
Comparison whereClause = Conditions.isEqual(entityTable.column("<%= primaryKey.fields[0].columnName %>"), Conditions.just(id.toString()));
|
|
156
|
+
<%_ }_%>
|
|
152
157
|
return createQuery(null, whereClause).one();
|
|
153
158
|
}
|
|
154
159
|
|