Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions apps/customer-portal/backend/modules/entity/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,18 @@ public type DeployedProduct record {|
ReferenceTableItem? deployment;
# Product information
ReferenceTableItem? product;
# Product version
ReferenceTableItem? version;
# Cores allocated for the product
int? cores;
# TPS allocated for the product
int? tps;
# Release date of the product
string? releasedOn;
# End of life date of the product
string? endOfLifeOn;
# Update level of the product
string? updateLevel;
json...;
|};

Expand Down
12 changes: 12 additions & 0 deletions apps/customer-portal/backend/modules/types/types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,18 @@ public type DeployedProduct record {|
ReferenceItem? product;
# Deployment
ReferenceItem? deployment;
# Product version
ReferenceItem? version;
# Cores allocated for the product
int? cores;
# TPS allocated for the product
int? tps;
# Release date of the product
string? releasedOn;
# End of life date of the product
string? endOfLifeOn;
# Update level of the product
string? updateLevel;
|};

# Payload for creating a comment.
Expand Down
9 changes: 8 additions & 1 deletion apps/customer-portal/backend/utils.bal
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,20 @@ public isolated function mapDeployedProducts(entity:DeployedProductsResponse res
return from entity:DeployedProduct product in response.deployedProducts
let entity:ReferenceTableItem? associatedProduct = product.product
let entity:ReferenceTableItem? deployment = product.deployment
let entity:ReferenceTableItem? version = product.version
select {
id: product.id,
createdOn: product.createdOn,
updatedOn: product.updatedOn,
description: product.description,
cores: product.cores,
tps: product.tps,
releasedOn: product.releasedOn,
endOfLifeOn: product.endOfLifeOn,
updateLevel: product.updateLevel,
product: associatedProduct != () ? {id: associatedProduct.id, label: associatedProduct.name} : (),
deployment: deployment != () ? {id: deployment.id, label: deployment.name} : ()
deployment: deployment != () ? {id: deployment.id, label: deployment.name} : (),
version: version != () ? {id: version.id, label: version.name} : ()
};
}

Expand Down