diff --git a/package-lock.json b/package-lock.json
index 944d0f2e8..3de85d2d0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -6,7 +6,7 @@
"": {
"name": "@appwrite/console",
"dependencies": {
- "@appwrite.io/console": "^0.6.2",
+ "@appwrite.io/console": "npm:khushboo-console@0.0.3",
"@appwrite.io/pink": "0.23.0",
"@appwrite.io/pink-icons": "0.23.0",
"@popperjs/core": "^2.11.8",
@@ -149,9 +149,10 @@
"integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg=="
},
"node_modules/@appwrite.io/console": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.6.2.tgz",
- "integrity": "sha512-3qYknuFwhvTN2GnPB8G1w5DgxfVorGtfj4uuEaXbTmMUmjA8fHaW5VkJriuUxCi6/TpxDxqV/hhEkdoXL+5H4w=="
+ "name": "khushboo-console",
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/khushboo-console/-/khushboo-console-0.0.3.tgz",
+ "integrity": "sha512-9NzonFdptH/UF65ZNg/zmX1fWvONLUvXNIDKWpvjcwNlhlHoAlT2+uQIBxDuAzECTuXlwpszPeHOgUnhgp9fFQ=="
},
"node_modules/@appwrite.io/pink": {
"version": "0.23.0",
diff --git a/src/lib/components/filters/content.svelte b/src/lib/components/filters/content.svelte
index b43bddd85..a887482a1 100644
--- a/src/lib/components/filters/content.svelte
+++ b/src/lib/components/filters/content.svelte
@@ -64,13 +64,6 @@
apply: { applied: number };
}>();
dispatch('apply', { applied: $tags.length });
-
- // $: if (column?.type === 'datetime' && !value) {
- // const today = new Date();
- // console.log(today.toISOString());
- // value = today.toISOString();
- // console.log('value', value);
- // }
@@ -101,10 +94,10 @@
name="value"
bind:tags={arrayValues}
placeholder="Select value"
- options={column?.elements?.map((value) => ({
- label: value,
- value,
- checked: arrayValues.includes(value)
+ options={column?.elements?.map((e) => ({
+ label: e?.label ?? e,
+ value: e?.value ?? e,
+ checked: arrayValues.includes(e?.value ?? e)
}))}>
{:else}
@@ -123,7 +116,10 @@
id="value"
bind:value
placeholder="Select value"
- options={column?.elements?.map((value) => ({ label: value, value }))}
+ options={column?.elements?.map((e) => ({
+ label: e?.label ?? e,
+ value: e?.value ?? e
+ }))}
label="Value"
showLabel={false} />
{:else if column.type === 'integer' || column.type === 'double'}
diff --git a/src/lib/components/filters/store.ts b/src/lib/components/filters/store.ts
index 65e18b369..d1714f05d 100644
--- a/src/lib/components/filters/store.ts
+++ b/src/lib/components/filters/store.ts
@@ -191,7 +191,13 @@ const operatorsDefault = new Map<
ValidOperators.NotEqual,
{
query: Query.notEqual,
- types: [ValidTypes.String, ValidTypes.Integer, ValidTypes.Double, ValidTypes.Boolean]
+ types: [
+ ValidTypes.String,
+ ValidTypes.Integer,
+ ValidTypes.Double,
+ ValidTypes.Boolean,
+ ValidTypes.Enum
+ ]
}
],
[
diff --git a/src/lib/helpers/types.ts b/src/lib/helpers/types.ts
index 45dcb0b92..c725ee4b3 100644
--- a/src/lib/helpers/types.ts
+++ b/src/lib/helpers/types.ts
@@ -38,7 +38,7 @@ export type Column = {
filter?: boolean;
array?: boolean;
format?: string;
- elements?: string[];
+ elements?: string[] | { value: string; label: string }[];
};
export function isValueOfStringEnum
>(
diff --git a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
index d54f3a0cf..82b915ef5 100644
--- a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
+++ b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte
@@ -1,70 +1,101 @@
- {#if $deploymentList?.total}
+ {#if data?.activeDeployment}
{@const activeDeployment = data.activeDeployment}
Active
@@ -218,125 +249,61 @@
{/if}
All
+
+
+
+
+
+
+
+ {#if $tags?.length}
+
+
+
+ {/if}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{#if $deploymentList.total}
-
-
- Deployment ID
- Status
- Source
- Updated
- Build Time
- Size
-
-
-
- {#each $deploymentList.deployments as deployment, index (deployment.$id)}
- {@const status = deployment.status}
-
-
- {deployment.$id}
-
-
- {#if activeDeployment?.$id === deployment?.$id}
-
-
- active
-
- {:else}
-
- {status}
-
- {/if}
-
-
-
-
-
-
-
-
- {#if ['processing', 'building'].includes(deployment.status)}
-
- {:else}
- {calculateTime(deployment.buildTime)}
- {/if}
-
-
-
- {calculateSize(deployment.size)}
-
-
-
-
-
-
- {
- selectedDeployment = deployment;
- showRedeploy = true;
- showDropdown = [];
- }}>
- Redeploy
-
- {#if deployment.status === 'ready' && deployment.$id !== $func.deployment}
- {
- selectedDeployment = deployment;
- showActivate = true;
- showDropdown = [];
- }}>
- Activate
-
- {/if}
-
- Logs
-
- {#if deployment.status === 'processing'}
- {
- selectedDeployment = deployment;
- showDropdown = [];
- showCancel = true;
- }}>
- Cancel
-
- {/if}
- {
- selectedDeployment = deployment;
- showDropdown = [];
- showDelete = true;
- }}>
- Delete
-
-
-
-
-
- {/each}
-
-
+
{:else}
@@ -386,13 +353,6 @@
total={$deploymentList?.total} />
-{#if selectedDeployment}
-
-
-
-
-{/if}
-