mirror of
https://github.com/DerDavidBohl/dirigent-spring.git
synced 2026-04-28 12:39:40 -05:00
Added stop in frontend
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@ build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
/deployments/
|
||||
/config/
|
||||
backend/deployments/
|
||||
backend/config/
|
||||
|
||||
### Config Files ###
|
||||
backend/src/main/resources/application-local.properties
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<button (click)="startDeployment(element)" mat-menu-item>
|
||||
Start
|
||||
</button>
|
||||
<button mat-menu-item>
|
||||
<button (click)="stopDeployment(element)" mat-menu-item>
|
||||
Stop
|
||||
</button>
|
||||
</mat-menu>
|
||||
@@ -35,7 +35,7 @@
|
||||
<ng-container matColumnDef="state">
|
||||
<th *matHeaderCellDef mat-header-cell> State</th>
|
||||
<td *matCellDef="let element" mat-cell>
|
||||
<mat-chip>{{ element.state }}</mat-chip>
|
||||
<mat-chip class="bg-red-500">{{ element.state }}</mat-chip>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import {interval} from 'rxjs';
|
||||
|
||||
],
|
||||
templateUrl: './overview.component.html',
|
||||
styleUrl: './overview.component.css'
|
||||
styleUrl: './overview.component.css',
|
||||
})
|
||||
export class OverviewComponent {
|
||||
dataSource: Array<DeploymentState> = [];
|
||||
@@ -72,4 +72,10 @@ export class OverviewComponent {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
stopDeployment(element: DeploymentState) {
|
||||
|
||||
this.apiService.stopDeployment(element).subscribe(() => this.apiService.updateDeploymentStates());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user