pull/2672/head
TidusJar 6 years ago
parent 806cf7c0ff
commit 9d2fc81a0c

@ -4,7 +4,7 @@ export interface IFailedRequestsViewModel {
title: string;
releaseYear: Date;
requestId: number;
requestType: RequestType;
type: RequestType;
dts: Date;
error: string;
retryCount: number;

@ -15,4 +15,7 @@ export class RequestRetryService extends ServiceHelpers {
public getFailedRequests(): Observable<IFailedRequestsViewModel[]> {
return this.http.get<IFailedRequestsViewModel[]>(this.url, {headers: this.headers});
}
public deleteFailedRequest(failedId: number): Observable<IFailedRequestsViewModel[]> {
return this.http.delete<IFailedRequestsViewModel[]>(`${this.url}/${failedId}`, {headers: this.headers});
}
}

@ -9,7 +9,6 @@
<td>Type</td>
<td>Retry Count</td>
<td>Error Description</td>
<td>Retry</td>
<td>Delete</td>
</tr>
</thead>
@ -21,8 +20,7 @@
<td>{{RequestType[v.type] | humanize}}</td>
<td class="vcenter">{{v.retryCount}}</td>
<td class="vcenter"> <i [pTooltip]="v.error" class="fa fa-info-circle"></i></td>
<td class="vcenter"><button></button></td>
<td class="vcenter"><button></button></td>
<td class="vcenter"><button class="btn btn-primary" (click)="remove(v.failedId)">Remove</button></td>
</tr>
</tbody>
</table>

@ -15,4 +15,8 @@ export class FailedRequestsComponent implements OnInit {
public ngOnInit() {
this.retry.getFailedRequests().subscribe(x => this.vm = x);
}
public remove(failedId: number) {
this.retry.deleteFailedRequest(failedId).subscribe();
}
}

Loading…
Cancel
Save