Skip to content

Commit

Permalink
feat: add credit cost for processed on demand products
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh890 committed Mar 29, 2024
1 parent b3f5eab commit 90386c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<mat-list-item (mouseenter)="isHovered = true" (mouseleave)="isHovered = false">
<!--<ng-container matListIcon *ngIf="canUnzip(product)">-->
<ng-container matListItemIcon *ngIf="false">
<mat-icon *ngIf="!isUnzipLoading && !isOpen" (click)="onLoadUnzippedProduct()"
[matTooltip]="unzipTooltip(isUserLoggedIn, hasAccessToRestrictedData)"
Expand All @@ -15,7 +14,7 @@
<fa-icon icon="spinner" [pulse]="true"></fa-icon>
</div>
</ng-container>
<!--<ng-container matListIcon *ngIf="!canUnzip(product)">-->

<ng-container matListItemIcon>
<mat-icon mat-icon-button disabled></mat-icon>
</ng-container>
Expand Down Expand Up @@ -45,15 +44,14 @@
</span>
</ng-template>



<a *ngIf="isHovered && !product.metadata.job" class="icon-margin">
<app-copy-to-clipboard [value]="product.metadata.productType === 'BURST_XML' ? product.id?.split('-XML')[0] : (
product.metadata.parentID || product.id
)" prompt="{{ 'COPY_FILE_ID' | translate }}">
</app-copy-to-clipboard>
</a>
</div>

<button *ngIf="validHyp3JobTypes.length > 0" [matMenuTriggerFor]="customJobTypes" mat-icon-button matListItemMeta class="hype-icon-button mat-icon-button">
<mat-icon *ngIf="loadingHyp3JobName !== product.name" svgIcon="hyp3"
matTooltip="{{ 'ADD_TO_ON_DEMAND_QUEUE' | translate }}">
Expand Down Expand Up @@ -83,6 +81,10 @@
<b>{{'JOB_SUBMITTED' | translate}}:</b> {{ product.metadata.job.request_time| fullDate }}
</div>

<div *ngIf="product.metadata.job && product.metadata.job.credit_cost" matListItemLine>
<b>{{'CREDIT_COST' | translate}}:</b> {{ product.metadata.job.credit_cost }}
</div>

<div *ngFor="let param of paramsList" matListItemLine>
<b>{{ param.name }}:</b> {{ param.val }}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/models/hyp3.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export interface Hyp3Job {
status_code: Hyp3JobStatusCode;
thumbnail_images: string[];
user_id: string;
credit_cost: number;
}

export interface Hyp3ProductFile {
Expand Down

0 comments on commit 90386c1

Please sign in to comment.