Skip to content
Snippets Groups Projects
Commit f2a18fab authored by Lukasz Lopatowski's avatar Lukasz Lopatowski
Browse files

Merge branch 'add-api-to-scaling-support' into 'develop'

fixed scale up/down

See merge request !210
parents de1c7cd3 c3b6b2f4
Branches
Tags v1.2.3
2 merge requests!258Develop,!210fixed scale up/down
...@@ -657,6 +657,7 @@ export class AppInstanceComponent implements OnInit, OnDestroy { ...@@ -657,6 +657,7 @@ export class AppInstanceComponent implements OnInit, OnDestroy {
}) })
} }
public confirmScaleDown(): void { public confirmScaleDown(): void {
this.confirmationService.confirm({ this.confirmationService.confirm({
message: this.translate.instant('APP_INSTANCES.CONFIRM_SCALEDOWN.MESSAGE'), message: this.translate.instant('APP_INSTANCES.CONFIRM_SCALEDOWN.MESSAGE'),
...@@ -671,7 +672,9 @@ export class AppInstanceComponent implements OnInit, OnDestroy { ...@@ -671,7 +672,9 @@ export class AppInstanceComponent implements OnInit, OnDestroy {
} }
public scaleDown(): void { public scaleDown(): void {
this.appInstanceService.scaleDown(this.appInstanceId).subscribe( this.appInstanceService.scaleDown(
this.getDeploymentId()
).subscribe(
{ {
next: () => { next: () => {
console.log('Scaled down'); console.log('Scaled down');
...@@ -684,7 +687,9 @@ export class AppInstanceComponent implements OnInit, OnDestroy { ...@@ -684,7 +687,9 @@ export class AppInstanceComponent implements OnInit, OnDestroy {
} }
public scaleUp(): void { public scaleUp(): void {
this.appInstanceService.scaleUp(this.appInstanceId).subscribe( this.appInstanceService.scaleUp(
this.getDeploymentId()
).subscribe(
{ {
next: () => { next: () => {
console.log('Scaled up'); console.log('Scaled up');
...@@ -696,4 +701,8 @@ export class AppInstanceComponent implements OnInit, OnDestroy { ...@@ -696,4 +701,8 @@ export class AppInstanceComponent implements OnInit, OnDestroy {
) )
} }
private getDeploymentId(): number {
return this.appInstance.application.application.appDeploymentSpec.id
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment