mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #674 from appwrite/fix-logs-message-pro-users
fix: show upgrade cta only to free users
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
import { tierToPlan, type PlanServices } from '$lib/stores/billing';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
|
||||
export let logs: Models.LogList;
|
||||
export let offset = 0;
|
||||
@@ -50,8 +51,10 @@
|
||||
Logs are retained in rolling {hoursToDays(limit)} intervals with the
|
||||
{tierToPlan($organization.billingPlan).name}
|
||||
plan.
|
||||
<button class="link" type="button" on:click|preventDefault={upgradeMethod}
|
||||
>Upgrade</button> to increase your log retention for a longer period.
|
||||
{#if $organization?.billingPlan === 'tier-0'}
|
||||
<Button link on:click={upgradeMethod}>Upgrade</Button> to increase your log
|
||||
retention for a longer period.
|
||||
{/if}
|
||||
</p>
|
||||
</svelte:fragment>
|
||||
{#each logs.logs as log}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
import { getServiceLimit, tierToPlan } from '$lib/stores/billing';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { app } from '$lib/stores/app';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
|
||||
let selectedRequest = 'parameters';
|
||||
let selectedResponse = 'logs';
|
||||
@@ -310,13 +311,14 @@
|
||||
<Alert>
|
||||
Logs are retained in rolling {hoursToDays(limit)} intervals
|
||||
with the {tier} plan.
|
||||
<button
|
||||
class="link"
|
||||
type="button"
|
||||
on:click|preventDefault={() =>
|
||||
wizard.start(ChangeOrganizationTierCloud)}
|
||||
>Upgrade</button> to increase your log retention for
|
||||
a longer period.
|
||||
{#if $organization.billingPlan === 'tier-0'}
|
||||
<Button
|
||||
link
|
||||
on:click={() =>
|
||||
wizard.start(ChangeOrganizationTierCloud)}
|
||||
>Upgrade</Button> to increase your log retention
|
||||
for a longer period.
|
||||
{/if}
|
||||
</Alert>
|
||||
{/if}
|
||||
<Code withCopy noMargin code={execution.logs} language="sh" />
|
||||
|
||||
@@ -40,9 +40,7 @@
|
||||
import DeploymentCreatedBy from './deploymentCreatedBy.svelte';
|
||||
import DeploymentDomains from './deploymentDomains.svelte';
|
||||
import { GRACE_PERIOD_OVERRIDE, isCloud } from '$lib/system';
|
||||
import { readOnly, tierToPlan } from '$lib/stores/billing';
|
||||
import { hoursToDays } from '$lib/helpers/date';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { readOnly } from '$lib/stores/billing';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -215,19 +213,7 @@
|
||||
<TableCellHead width={80}>Size</TableCellHead>
|
||||
<TableCellHead width={40} />
|
||||
</TableHeader>
|
||||
<TableBody service="logs" total={isCloud ? Infinity : 0}>
|
||||
<svelte:fragment slot="limit" let:limit let:upgradeMethod>
|
||||
<p class="text">
|
||||
Logs are retained in rolling {hoursToDays(limit)} intervals with the
|
||||
{tierToPlan($organization.billingPlan).name}
|
||||
plan.
|
||||
<button
|
||||
class="link"
|
||||
type="button"
|
||||
on:click|preventDefault={upgradeMethod}>Upgrade</button> to increase
|
||||
your log retention for a longer period.
|
||||
</p>
|
||||
</svelte:fragment>
|
||||
<TableBody>
|
||||
{#each $deploymentList.deployments as deployment, index (deployment.$id)}
|
||||
{@const status = deployment.status}
|
||||
<TableRow>
|
||||
|
||||
Reference in New Issue
Block a user