Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,19 @@
import { sdk } from '$lib/stores/sdk';
import { func } from '../store';
import InputSelect from '$lib/elements/forms/inputSelect.svelte';
import { specificationsList } from '$lib/stores/specifications';
import { isValueOfStringEnum } from '$lib/helpers/types';
import { Runtime, type Models } from '@appwrite.io/console';
import { Layout, Typography } from '@appwrite.io/pink-svelte';
import Link from '$lib/elements/link.svelte';

const functionId = page.params.function;
export let runtimesList: Models.RuntimeList;
let { runtime, entrypoint, specification } = $func;
let { runtime, entrypoint } = $func;

const options = runtimesList.runtimes.map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
}));
const specificationOptions = $specificationsList.specifications.map((size) => ({
label:
`${size.cpus} CPU, ${size.memory} MB RAM` +
(!size.enabled ? ` (Upgrade to use this)` : ''),
value: size.slug
}));

async function updateRuntime() {
try {
Expand Down Expand Up @@ -99,12 +92,6 @@
required
placeholder="Enter entrypoint"
bind:value={entrypoint} />
<InputSelect
label="CPU and memory"
id="size"
placeholder="Select runtime specification"
bind:value={specification}
options={specificationOptions} />
</Layout.Stack>
</svelte:fragment>

Expand Down