Skip to content

Commit

Permalink
Merge pull request #4967 from FlowFuse/be-explicit-with-expired-license
Browse files Browse the repository at this point in the history
Show "Expired" for expired licenses
  • Loading branch information
hardillb authored Jan 3, 2025
2 parents 19a0a08 + 488215d commit b9795ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/pages/admin/Overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<template v-if="license">
<tr><td class="w-40 font-medium">Organisation</td><td>{{ license.organisation }}</td></tr>
<tr><td class="w-40 font-medium">Tier</td><td>{{ license.tier }}</td></tr>
<tr><td>Expires</td><td>{{ license.expires }}<br><span class="text-xs">{{ license.expiresAt }}</span></td></tr>
<tr><td>{{ expired ? 'Expired' : 'Expires' }}</td><td>{{ license.expires }}<br><span class="text-xs">{{ license.expiresAt }}</span></td></tr>
</template>
<tr>
<td class="w-40">Users</td>
Expand Down Expand Up @@ -112,13 +112,15 @@ export default {
return {
license: {},
stats: {},
settings: {}
settings: {},
expired: false
}
},
async mounted () {
try {
this.stats = await adminApi.getStats()
this.license = await adminApi.getLicenseDetails()
this.expired = this.license?.expiresAt && (Date.parse(this.license.expiresAt) - Date.now()) < 0
} catch (err) {
if (err.response?.status === 403 || !err.response) {
this.$router.push('/')
Expand Down

0 comments on commit b9795ee

Please sign in to comment.