Skip to content

Commit

Permalink
Merge pull request #404 from jhipster/consul-default
Browse files Browse the repository at this point in the history
Consul as default
  • Loading branch information
pascalgrimaud authored Aug 19, 2023
2 parents ef04e13 + f1c4abc commit acaf4f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
15 changes: 5 additions & 10 deletions src/main/webapp/app/home/generator/generator.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,20 @@ <h4>Server side options</h4>
<div *ngIf="packageName.errors" class="alert alert-danger">The package name you have provided is not a valid Java package name.</div>
</div>
<div class="form-group">
<label for="serverPort">On which port would like your server to run? It should be unique to avoid
port
conflicts.</label>
<label for="serverPort">On which port would like your server to run? It should be unique to avoid port conflicts.</label>
<input type="number" class="form-control" id="serverPort" [(ngModel)]="model.serverPort"
name="serverPort" #serverPort="ngModel"
required>
</div>
<div class="form-group" *ngIf="!config.hideServiceDiscoveryType">
<label for="serviceDiscoveryType">Do you want to use the JHipster Registry to configure, monitor and
scale your application?</label>
<div class="form-group" *ngIf="!config.hideServiceDiscoveryType" [hidden]="model.applicationType === 'monolith'">
<label for="serviceDiscoveryType">Do you want to use the Consul as a service registry?</label>
<select id="serviceDiscoveryType" [(ngModel)]="model.serviceDiscoveryType"
name="serviceDiscoveryType"
class="form-control"
#serviceDiscoveryType="ngModel" (change)="changeServiceDiscoveryType()">
<option value="consul">Yes</option>
<option value="false">No</option>
<option value="eureka">Yes</option>
<option value="consul" [hidden]="model.applicationType === 'monolith'">No, use Consul as an alternative solution (uses Spring Cloud
Consul)
</option>
<option value="eureka">Use JHipster Registry (deprecated) instead</option>
</select>
</div>
<div class="form-group" *ngIf="!config.hideAuthenticationType">
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/home/generator/generator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class GeneratorComponent implements OnInit {
}
// service discovery
if (this.model.applicationType === 'gateway' || this.model.applicationType === 'microservice') {
this.model.serviceDiscoveryType = 'eureka';
this.model.serviceDiscoveryType = 'consul';
}
// database
if (this.model.databaseType === 'no') {
Expand Down

0 comments on commit acaf4f1

Please sign in to comment.