Add deprecwated arning

This commit is contained in:
Matej Bačo
2025-01-09 12:44:28 +00:00
parent c209e72f53
commit b8ea2ab7a5
6 changed files with 29 additions and 10 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
PUBLIC_APPWRITE_ENDPOINT=https://localhost/v1
PUBLIC_APPWRITE_ENDPOINT=http://localhost/v1
PUBLIC_CONSOLE_MODE=self-hosted
PUBLIC_STRIPE_KEY=
PUBLIC_GROWTH_ENDPOINT=
+1 -1
View File
@@ -19,7 +19,7 @@
"e2e:ui": "playwright test tests/e2e --ui"
},
"dependencies": {
"@appwrite.io/console": "1.4.4",
"@appwrite.io/console": "https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197",
"@appwrite.io/pink": "0.25.0",
"@appwrite.io/pink-icons": "0.25.0",
"@popperjs/core": "^2.11.8",
+8 -7
View File
@@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@appwrite.io/console':
specifier: 1.4.4
version: 1.4.4
specifier: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197
version: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197
'@appwrite.io/pink':
specifier: 0.25.0
version: 0.25.0
@@ -95,7 +95,7 @@ importers:
version: 6.6.3
'@testing-library/svelte':
specifier: ^5.2.4
version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0))
version: 5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0)
'@testing-library/user-event':
specifier: ^14.5.2
version: 14.5.2(@testing-library/dom@10.4.0)
@@ -199,8 +199,9 @@ packages:
'@analytics/type-utils@0.6.2':
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
'@appwrite.io/console@1.4.4':
resolution: {integrity: sha512-0B7PEHJIi0eS8+WQOs7RNwY+j3gffMTz6DKyvZAEJbe4550UnmTn4i8pxmyaiEVbhlqIVZ+QD8jVrjXqtkPK6Q==}
'@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197':
resolution: {tarball: https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197}
version: 1.2.1
'@appwrite.io/pink-icons@0.25.0':
resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==}
@@ -3834,7 +3835,7 @@ snapshots:
'@analytics/type-utils@0.6.2': {}
'@appwrite.io/console@1.4.4': {}
'@appwrite.io/console@https://pkg.pr.new/appwrite/appwrite/@appwrite.io/console@9197': {}
'@appwrite.io/pink-icons@0.25.0': {}
@@ -5075,7 +5076,7 @@ snapshots:
lodash: 4.17.21
redent: 3.0.0
'@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0(@types/node@22.9.0)(@vitest/ui@1.6.0)(jsdom@22.1.0)(sass@1.81.0))':
'@testing-library/svelte@5.2.4(svelte@4.2.19)(vite@5.4.11(@types/node@22.9.0)(sass@1.81.0))(vitest@1.6.0)':
dependencies:
'@testing-library/dom': 10.4.0
svelte: 4.2.19
@@ -25,6 +25,7 @@
async function loadRuntimes() {
const options = (await $runtimesList).runtimes
.filter(runtime => !runtime.deprecated)
.map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
@@ -17,6 +17,7 @@
import { isCloud } from '$lib/system';
import { organization } from '$lib/stores/organization';
import SpecificationsTooltip from '$lib/wizards/functions/components/specificationsTooltip.svelte';
import Alert from '$lib/components/alert.svelte';
const functionId = $page.params.function;
let runtime: string = null;
@@ -25,12 +26,20 @@
let options = [];
let specificationOptions = [];
let isDeprecated: boolean = null;
onMount(async () => {
runtime ??= $func.runtime;
specification ??= $func.specification;
let runtimes = await $runtimesList;
let allowedSpecifications = (await $specificationsList).specifications;
isDeprecated = runtimes.runtimes.find((r) => r.$id === runtime)?.deprecated ?? false;
if(!isDeprecated) {
runtimes.runtimes = runtimes.runtimes.filter(runtime => !runtime.deprecated);
}
options = runtimes.runtimes.map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
@@ -102,6 +111,14 @@
{options}
required
hideRequired />
{#if isDeprecated}
<Alert type="warning">
<span slot="title">Your runtime is deprecated</span>
<p>
Please upgrade to newer versio of the runtime, because on April 1st 2024, builds for deprecated runtimes will be disabled.
</p>
</Alert>
{/if}
<InputSelect
label="CPU and memory"
id="size"
@@ -12,7 +12,7 @@
let options = [];
onMount(async () => {
options = (await $runtimesList).runtimes.map((runtime) => ({
options = (await $runtimesList).runtimes.filter(runtime => !runtime.deprecated).map((runtime) => ({
label: `${runtime.name} - ${runtime.version}`,
value: runtime.$id
}));