diff --git a/package.json b/package.json index ac318b2ad..c42352555 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.4.4", + "version": "2.4.5", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev", diff --git a/src/lib/api.ts b/src/lib/api.ts index 2e9271a6c..ab145a2f7 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1,11 +1,9 @@ -// TODO: Make this functions generic - async function send({ method, path, data = {}, headers, - timeout = 30000 + timeout = 120000 }): Promise> { const controller = new AbortController(); const id = setTimeout(() => controller.abort(), timeout); @@ -53,7 +51,7 @@ async function send({ export function get( path: string, - headers: Record + headers?: Record ): Promise> { return send({ method: 'GET', path, headers }); } @@ -61,7 +59,7 @@ export function get( export function del( path: string, data: Record, - headers: Record + headers?: Record ): Promise> { return send({ method: 'DELETE', path, data, headers }); } @@ -77,7 +75,7 @@ export function post( export function put( path: string, data: Record, - headers: Record + headers?: Record ): Promise> { return send({ method: 'PUT', path, data, headers }); } diff --git a/src/lib/haproxy/configuration.ts b/src/lib/haproxy/configuration.ts index 8a967befd..f0bd2bb08 100644 --- a/src/lib/haproxy/configuration.ts +++ b/src/lib/haproxy/configuration.ts @@ -20,10 +20,10 @@ global defaults mode http log global - timeout http-request 60s + timeout http-request 120s timeout connect 10s - timeout client 60s - timeout server 60s + timeout client 120s + timeout server 120s userlist haproxy-dataplaneapi user admin insecure-password "\${HAPROXY_PASSWORD}" diff --git a/src/routes/iam/index.svelte b/src/routes/iam/index.svelte index 8c33d5a38..1ebfaac60 100644 --- a/src/routes/iam/index.svelte +++ b/src/routes/iam/index.svelte @@ -32,6 +32,7 @@ export let account; export let accounts; + export let invitations; if (accounts.length === 0) { accounts.push(account); } @@ -74,12 +75,51 @@ return errorNotification(error); } } + async function acceptInvitation(id, teamId) { + try { + await post(`/iam/team/${teamId}/invitation/accept.json`, { id }); + return window.location.reload(); + } catch ({ error }) { + return errorNotification(error); + } + } + async function revokeInvitation(id, teamId) { + try { + await post(`/iam/team/${teamId}/invitation/revoke.json`, { id }); + return window.location.reload(); + } catch ({ error }) { + return errorNotification(error); + } + }
Identity and Access Management
+{#if invitations.length > 0} +
+
Pending invitations
+
+ {#each invitations as invitation} +
+
+ Invited to {invitation.teamName} with + {invitation.permission} permission. +
+ + +
+ {/each} +
+
+{/if}
{#if $session.teamId === '0' && accounts.length > 0}
Accounts