Skip to content

Commit f308546

Browse files
Delete Instance functionality broke during merging. Resolved
1 parent eed7fc5 commit f308546

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

client/src/app/api/model/instance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface Instance {
3939
/**
4040
* State of the instance
4141
*/
42-
state?: StateEnum;
42+
instanceState?: StateEnum;
4343
labels?: Array<string>;
4444
}
4545

client/src/app/dashboard/table-all/table-all.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@ export class TableAllComponent implements OnInit {
6666
});
6767

6868
dialogRef.afterClosed().subscribe(result => {
69-
console.log('delete state', instance.state);
70-
if (result === 'Confirm' && instance.state === 'Running') {
69+
console.log('delete state', instance.instanceState);
70+
if (result === 'Confirm' && instance.instanceState === 'Running') {
7171
console.log('alert working');
7272
alert('Please Stop the Instance before you try to delete');
7373
console.log('data', this.dataSource.data);
7474

7575
} else {
76-
this.apiService.deleteInstance(id).subscribe((result: number) => {
77-
console.log('result', result);
76+
this.apiService.deleteInstance(id).subscribe((deleteResult: number) => {
77+
console.log('result', deleteResult);
7878
}, err => {
7979
console.log('error delete Instance');
8080
});
@@ -110,7 +110,7 @@ export class TableAllComponent implements OnInit {
110110
host: result.host,
111111
portNumber: result.portNumber,
112112
name: dialogResult.name,
113-
state: result.state,
113+
instanceState: result.instanceState,
114114
componentType: instance.componentType
115115
});
116116
this.table.renderRows();

0 commit comments

Comments
 (0)