Skip to content

Commit

Permalink
Merge pull request #2889 from PrefectHQ/dylan/bugfix/stop-displaying-…
Browse files Browse the repository at this point in the history
…empty-sla

Bugfix: stop displaying SLA header if no SLAs
  • Loading branch information
dylanbhughes authored Jan 14, 2025
2 parents 9a2a9b7 + e49289f commit 5f3a172
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/DeploymentDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</template>
</p-key-value>

<p-key-value v-if="slas" class="deployment-details__slas" label="Service Level Agreements">
<p-key-value v-if="slas && slas.length > 0" class="deployment-details__slas" label="Service Level Agreements">
<template #value>
<DeploymentServiceLevelAgreementCard v-for="sla in slas" :key="sla.id" class="deployment-details__sla-cards" :service-level-agreement="sla" />
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DeploymentServiceLevelAgreementCard.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<p-card class="deployment-service-level-agreement-card">
<p-list-item class="deployment-service-level-agreement-card">
<p-key-value class="deployment-service-level-agreement-card__item" label="Name" :value="serviceLevelAgreement.name" />
<p-key-value class="deployment-service-level-agreement-card__item" label="Type" :value="serviceLevelAgreement.getSlaType()" />
<p-key-value class="deployment-service-level-agreement-card__item" label="Severity" :value="uppercase(serviceLevelAgreement.severity)" />
<p-key-value v-if="serviceLevelAgreement.description" class="deployment-service-level-agreement-card__item" label="Description" :value="serviceLevelAgreement.description" />
<p-key-value class="deployment-service-level-agreement-card__item" label="Duration" :value="secondsToString(serviceLevelAgreement.durationInSeconds())" />
</p-card>
</p-list-item>
</template>


Expand Down

0 comments on commit 5f3a172

Please sign in to comment.