mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
!wip
This commit is contained in:
parent
806cf7c0ff
commit
9d2fc81a0c
4 changed files with 9 additions and 4 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue