mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
chore: hide runtime specifications select for oss
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { CustomId } from '$lib/components';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { InputText, InputSelect, FormList } from '$lib/elements/forms';
|
||||
import { FormList, InputSelect, InputText } from '$lib/elements/forms';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { onMount } from 'svelte';
|
||||
import { createFunction } from '../store';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { runtimesList } from '$lib/stores/runtimes';
|
||||
import { specificationsList } from '$lib/stores/specifications';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { onMount } from 'svelte';
|
||||
import SpecificationsTooltip from '../components/specificationsTooltip.svelte';
|
||||
import { createFunction } from '../store';
|
||||
|
||||
let showCustomId = false;
|
||||
|
||||
@@ -53,17 +53,19 @@
|
||||
{options}
|
||||
required />
|
||||
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Select specification"
|
||||
required
|
||||
disabled={specificationOptions.length < 1}
|
||||
options={specificationOptions}
|
||||
popover={isCloud && $organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
bind:value={$createFunction.specification} />
|
||||
{#if isCloud}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Select specification"
|
||||
required
|
||||
disabled={specificationOptions.length < 1}
|
||||
options={specificationOptions}
|
||||
popover={isCloud && $organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
bind:value={$createFunction.specification} />
|
||||
{/if}
|
||||
|
||||
{#if !showCustomId}
|
||||
<div>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { CustomId } from '$lib/components';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { FormList, InputSelect, InputText } from '$lib/elements/forms';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { runtimesList } from '$lib/stores/runtimes';
|
||||
import { specificationsList } from '$lib/stores/specifications';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { isCloud } from '$lib/system';
|
||||
import SpecificationsTooltip from '../components/specificationsTooltip.svelte';
|
||||
import { template, templateConfig } from '../store';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { isCloud } from '$lib/system';
|
||||
|
||||
let showCustomId = false;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
throw new Error('Please select a runtime.');
|
||||
}
|
||||
|
||||
if (!$templateConfig.specification) {
|
||||
if (isCloud && !$templateConfig.specification) {
|
||||
throw new Error('Please select a specification.');
|
||||
}
|
||||
}
|
||||
@@ -86,28 +86,30 @@
|
||||
{options}
|
||||
bind:value={$templateConfig.runtime} />
|
||||
{/await}
|
||||
{#await loadSpecifications()}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Loading specifications..."
|
||||
required
|
||||
disabled
|
||||
options={[]}
|
||||
value={null} />
|
||||
{:then specificationOptions}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Select specification"
|
||||
required
|
||||
disabled={specificationOptions.length < 1}
|
||||
options={specificationOptions}
|
||||
popover={isCloud && $organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
bind:value={$templateConfig.specification} />
|
||||
{/await}
|
||||
{#if isCloud}
|
||||
{#await loadSpecifications()}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Loading specifications..."
|
||||
required
|
||||
disabled
|
||||
options={[]}
|
||||
value={null} />
|
||||
{:then specificationOptions}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="specification"
|
||||
placeholder="Select specification"
|
||||
required
|
||||
disabled={specificationOptions.length < 1}
|
||||
options={specificationOptions}
|
||||
popover={$organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
bind:value={$templateConfig.specification} />
|
||||
{/await}
|
||||
{/if}
|
||||
</FormList>
|
||||
|
||||
<FormList class="u-margin-block-start-24">
|
||||
|
||||
+21
-19
@@ -5,18 +5,18 @@
|
||||
import { CardGrid, Heading } from '$lib/components';
|
||||
import { BillingPlan, Dependencies } from '$lib/constants';
|
||||
import { Button, Form, FormList } from '$lib/elements/forms';
|
||||
import InputSelect from '$lib/elements/forms/inputSelect.svelte';
|
||||
import { isValueOfStringEnum } from '$lib/helpers/types';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { runtimesList } from '$lib/stores/runtimes';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { specificationsList } from '$lib/stores/specifications';
|
||||
import { isCloud } from '$lib/system';
|
||||
import SpecificationsTooltip from '$lib/wizards/functions/components/specificationsTooltip.svelte';
|
||||
import { Runtime } from '@appwrite.io/console';
|
||||
import { onMount } from 'svelte';
|
||||
import { func } from '../store';
|
||||
import InputSelect from '$lib/elements/forms/inputSelect.svelte';
|
||||
import { specificationsList } from '$lib/stores/specifications';
|
||||
import { runtimesList } from '$lib/stores/runtimes';
|
||||
import { isValueOfStringEnum } from '$lib/helpers/types';
|
||||
import { Runtime } from '@appwrite.io/console';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import SpecificationsTooltip from '$lib/wizards/functions/components/specificationsTooltip.svelte';
|
||||
|
||||
const functionId = $page.params.function;
|
||||
let runtime: string = null;
|
||||
@@ -102,17 +102,19 @@
|
||||
{options}
|
||||
required
|
||||
hideRequired />
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="size"
|
||||
placeholder="Select runtime specification"
|
||||
bind:value={specification}
|
||||
options={specificationOptions}
|
||||
popover={isCloud && $organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
required
|
||||
hideRequired />
|
||||
{#if isCloud}
|
||||
<InputSelect
|
||||
label="CPU and memory"
|
||||
id="size"
|
||||
placeholder="Select runtime specification"
|
||||
bind:value={specification}
|
||||
options={specificationOptions}
|
||||
popover={$organization?.billingPlan === BillingPlan.FREE
|
||||
? SpecificationsTooltip
|
||||
: null}
|
||||
required
|
||||
hideRequired />
|
||||
{/if}
|
||||
</FormList>
|
||||
</svelte:fragment>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user