jhipster

Add custom view to jhipster app

ぐ巨炮叔叔 提交于 2019-12-05 10:31:34
I would like to add a custom view to jhipster app on index.html I already created the link in navbar.html and added the html file on path src/main/webapp/scripts/app/custom/newView.html <a ui-sref="newView" data-toggle="collapse" data-target=".navbar-collapse.in"> <span class="glyphicon"></span> <span class="hidden-sm">new view</span> </a> When I click on the link it doesn't work. Probably it needs a custom route in angular but I can't figure out how to create it. What else should I do? In addition to the other answer, here is another piece of information. Maybe somebody else will find it

How to drop in-memory h2db between Spring Integration tests?

北城以北 提交于 2019-12-05 10:24:16
I am using Liquibase in my Spring web application. I have a bunch of entities with hundreds of tests for REST APIs in the integration tests for each entity like User, Account, Invoice, License etc. All of my integration tests pass when run by class but a lot of them fail when ran together using gradle test . It is very likely there is data collision between the tests and I am not interested in spending time to fix clean up data as of now. I prefer dropping the DB and context after every class. I figured I could use @DirtiesContext at class and so I annotated by test with it. @RunWith

Setting up bonsai-elasticsearch in Jhipster - Heroku

倖福魔咒の 提交于 2019-12-05 09:02:58
After deploying to heroku my Jhipster app, I want to use cloud elasticsearch (Bonsai) with JHipster. Bonsai provides following env variable: $BONSAI_URL How is this properly added in application-prod.yml? I`ve been reading the docs and trying too set it as cluster-nodes value and as host. But i'm a bit lost. Any tips are more than welcome. application-prod.yml spring: devtools: restart: enabled: false livereload: enabled: false datasource: url: jdbc:mysql://localhost:3306/App?useUnicode=true&characterEncoding=utf8&useSSL=false name: username: root password: hikari: data-source-properties:

JHipster get the current user

限于喜欢 提交于 2019-12-05 08:10:48
问题 I am working on a JHipster application, I have a Study entity which has a many-to-one relationship with User (So one user can have many studies). I am trying to change the user select in the dialog component for creating a new Study to automatically select the current logged in user. I have changed the select so that only the single user should show up as an option for the select, after fixing this issue I would either disable the field or remove it so that study.user is automatically set:

Jhipster 4 How to put entity component (list) on home screen

两盒软妹~` 提交于 2019-12-05 07:07:20
I'm using Jhipster 4 with Angular 2.0 to create application. I'm newbie for all this staff. Let's say I have two entities: Customer and Task with relation one to many. I would like to have list of customers (top 10) on home screen. As next I would like to add on customer detail view list of all tasks which belongs to him. I've updated home.component.ts to add CustomerComponent import { Component, OnInit } from '@angular/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { EventManager, JhiLanguageService } from 'ng-jhipster'; import { Account, LoginModalService, Principal

How to include 3rd party library that uses older import approach to Angular4.x?

怎甘沉沦 提交于 2019-12-05 02:53:15
问题 What is the proper workflow to include the library to angular 4.0 and use it inside a component? My steps: yarn add mathjs Then there should be a way to injects js libraries in one of the build lifecycles so the angular4 component can use it. JHipster utilizes Webpack and Yarn. Then I tried to add to Component (docs): import { mathjs } from "./mathjs"; and var math = require('mathjs'); Those were not working. What am I missing? UPDATE: It seems like mathjs uses older approach suggesting var

Angular 7 : Injected service is undefined

不想你离开。 提交于 2019-12-05 02:37:52
I tried to inject AccountService in the LoginService but it won't ,the accountService is undefined but in the other hand the authServiceProvider is defined . Contrarily it injected perfectly in footerComponent. So why the AccountService is injected perfectly in FooterComponent and it bugs in the LoginService. I do not know where the problem came from . import { Injectable } from '@angular/core'; import { AccountService } from 'app/core/auth/account.service'; import { AuthServerProvider } from 'app/core/auth/auth-jwt.service'; @Injectable({ providedIn: 'root' }) export class LoginService {

Jhipster Ionic Error while creating app : getJhipsterAppConfig is not a function

假如想象 提交于 2019-12-04 22:05:34
I'm trying to start a new Jhipster Ionic but i'm stuck with this error : $yo jhipster-ionic events.js:183 throw er; // Unhandled 'error' event ^ TypeError: this.getJhipsterAppConfig is not a function at module.exports.readConfig (C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\generators\app\index.js:63:47) at Object.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:424:27) at C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules

How to create entity with a collection-type field in JHipster?

醉酒当歌 提交于 2019-12-04 16:04:35
In our project, we work with a domain model Document . A document may have several titles , so with my JPA knowledge I'd model the Document entity like so: @Entity public class Document { private Set<String> titles; // ... getters and setters } How can I have jHipster generate entities with collection attributes (or, synomymously, collection fields)? Depending on jdl document here the collection type for field is not handled yet. I guess you already think of creating an title object and create one-to-many relation with document right? 来源: https://stackoverflow.com/questions/38747009/how-to

JHipster: Filtering entities with criteria - intended Angular client-side approach

雨燕双飞 提交于 2019-12-04 13:45:45
问题 I've recently started using JHipster - thanks to the maintainers for this fantastic project! In the current version of JHipster (4.10.2 at the time of writing), entities can have filtering enabled via the entity sub-generator, or by including filter EntityName and service EntityName with serviceClass to the project's JDL file. This produces a Spring project in which the getAllEntities() method in the EntityNameResource class takes a Criteria argument constructed from the URL GET params. This