Skip to content

Commit 7833720

Browse files
committed
Fix model for show messages to ingest
1 parent c328cc8 commit 7833720

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

ui/src/app/components/workflows/workflows-home/workflows-home.component.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,12 @@ <h3 class="modal-title">Upload workflow</h3>
249249
<clr-dg-row *ngFor="let job of ingestionStatus" [clrDgItem]="job">
250250
<clr-dg-cell>{{job.jobName}}</clr-dg-cell>
251251
<clr-dg-cell>{{job.jobType}}</clr-dg-cell>
252-
<clr-dg-cell *ngIf="job?.topic">
253-
<b>Topic:</b> {{job?.topic?.topic}} <br/>
254-
<div *ngIf="job?.topic?.messagesToIngest >= 0"><b>Messages to ingest:</b> {{job?.topic?.messagesToIngest}}</div>
255-
<b *ngIf="job?.topic?.messagesToIngest < 0" [style.color]="'red'">Offset inconsistency detected. Please contact support team!</b>
252+
<clr-dg-cell *ngIf="job?.topicStatus">
253+
<b>Topic:</b> {{job?.topicStatus?.topic}} <br/>
254+
<div *ngIf="job?.topicStatus?.messagesToIngest >= 0"><b>Messages to ingest:</b> {{job?.topicStatus?.messagesToIngest}}</div>
255+
<b *ngIf="job?.topicStatus?.messagesToIngest < 0" [style.color]="'red'">Offset inconsistency detected. Please contact support team!</b>
256256
</clr-dg-cell>
257-
<clr-dg-cell *ngIf="!job?.topic">
257+
<clr-dg-cell *ngIf="!job?.topicStatus">
258258
<b>Not available</b>
259259
</clr-dg-cell>
260260
</clr-dg-row>

ui/src/app/models/ingestionStatus.model.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ export class IngestionStatusModelFactory {
2828
return this.create(
2929
ingestionStatusResponse.jobName,
3030
ingestionStatusResponse.jobType,
31-
ingestionStatusResponse?.topic
31+
ingestionStatusResponse?.topicStatus
3232
? TopicModelFactory.create(
33-
ingestionStatusResponse.topic.topic,
34-
Object.keys(ingestionStatusResponse.topic.messagesToIngest)
35-
.map((key) => ingestionStatusResponse.topic.messagesToIngest[key])
33+
ingestionStatusResponse.topicStatus.topic,
34+
Object.keys(ingestionStatusResponse.topicStatus.messagesToIngest)
35+
.map((key) => ingestionStatusResponse.topicStatus.messagesToIngest[key])
3636
.reduce((acc, cur) => acc + Number(cur), 0),
3737
)
3838
: null,
@@ -54,12 +54,12 @@ export class TopicModelFactory {
5454
export type IngestionStatusResponseModel = {
5555
jobName: string;
5656
jobType: string;
57-
topic?: TopicResponseModel;
57+
topicStatus?: TopicResponseModel;
5858
};
5959

6060
export class IngestionStatusResponseModelFactory {
61-
static create(jobName: string, jobType: string, topic?: TopicResponseModel): IngestionStatusResponseModel {
62-
return { jobName: jobName, jobType: jobType, topic: topic };
61+
static create(jobName: string, jobType: string, topicStatus?: TopicResponseModel): IngestionStatusResponseModel {
62+
return { jobName: jobName, jobType: jobType, topicStatus: topicStatus };
6363
}
6464
}
6565

0 commit comments

Comments
 (0)