diff --git a/src/lib/stores/git.ts b/src/lib/stores/git.ts
index 5bbd34048..dae770d27 100644
--- a/src/lib/stores/git.ts
+++ b/src/lib/stores/git.ts
@@ -26,6 +26,10 @@ export function deploymentStatusConverter(status: string) {
return 'processing';
case 'building':
return 'pending';
+ case 'waiting':
+ return 'waiting';
+ case 'queued':
+ return 'waiting';
case 'failed':
return 'failed';
}
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/executions/store.ts b/src/routes/(console)/project-[project]/functions/function-[function]/executions/store.ts
index 2758f99ad..a882b2d83 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/executions/store.ts
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/executions/store.ts
@@ -134,6 +134,8 @@ export function logStatusConverter(status: string) {
return 'processing';
case 'waiting':
return 'waiting';
+ case 'queued':
+ return 'waiting';
case 'peding':
return 'pending';
case 'cancelled':
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/table.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/table.svelte
index b16903163..6b24ae0fb 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/table.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/table.svelte
@@ -100,7 +100,9 @@
{:else if column.id === 'buildDuration'}
- {#if ['processing', 'building'].includes(deployment.status)}
+ {#if ['waiting'].includes(deployment.status)}
+ -
+ {:else if ['processing', 'building'].includes(deployment.status)}
{:else}
{formatTimeDetailed(deployment.buildDuration)}
diff --git a/src/routes/(console)/project-[project]/sites/site-[site]/deployments/createGitDeploymentModal.svelte b/src/routes/(console)/project-[project]/sites/site-[site]/deployments/createGitDeploymentModal.svelte
index b30585ca2..9c617b431 100644
--- a/src/routes/(console)/project-[project]/sites/site-[site]/deployments/createGitDeploymentModal.svelte
+++ b/src/routes/(console)/project-[project]/sites/site-[site]/deployments/createGitDeploymentModal.svelte
@@ -4,7 +4,7 @@
import { Repositories } from '$lib/components/git';
import { Dependencies } from '$lib/constants';
import { Link } from '$lib/elements';
- import { Button, InputCheckbox, InputSelect } from '$lib/elements/forms';
+ import { Button, InputCheckbox, InputSelect, InputText } from '$lib/elements/forms';
import { timeFromNow } from '$lib/helpers/date';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
@@ -20,6 +20,7 @@
let hasRepository = !!site?.providerRepositoryId;
let selectedRepository: string = site.providerRepositoryId;
let branch: string = null;
+ let commit: string = null;
let activate = true;
let error = '';
@@ -54,8 +55,6 @@
selectedRepository
);
- console.log(branchList);
-
const sorted = sortBranches(branchList.branches);
branch = sorted[0]?.name ?? null;
@@ -72,12 +71,21 @@
async function createDeployment() {
try {
- await sdk.forProject.sites.createVcsDeployment(
- site.$id,
- VCSDeploymentType.Branch,
- branch,
- activate
- );
+ if (branch) {
+ await sdk.forProject.sites.createVcsDeployment(
+ site.$id,
+ VCSDeploymentType.Branch,
+ branch,
+ activate
+ );
+ } else {
+ await sdk.forProject.sites.createVcsDeployment(
+ site.$id,
+ 'commit',
+ commit,
+ activate
+ );
+ }
show = false;
invalidate(Dependencies.DEPLOYMENTS);
addNotification({
@@ -158,6 +166,12 @@
branch = event.detail.value;
}}
{options} />
+
{#if branch}
{:else if column.id === 'buildDuration'}
- {#if ['processing', 'building'].includes(deployment.status)}
+ {#if ['waiting'].includes(deployment.status)}
+ -
+ {:else if ['processing', 'building'].includes(deployment.status)}
{:else}
{formatTimeDetailed(deployment.buildDuration)}