From eaa74d55825ac0ae4dc5b5374fd0e8ea5c88e487 Mon Sep 17 00:00:00 2001 From: HugoCasa Date: Wed, 29 Jan 2025 18:09:47 +0100 Subject: [PATCH] team plan >80% included usage warning (#5163) --- ...0128154615_team_last_warning_sent.down.sql | 1 + ...250128154615_team_last_warning_sent.up.sql | 1 + .../components/settings/PremiumInfo.svelte | 8 +-- .../(logged)/workspace_settings/+page.svelte | 66 +++++++++++++------ 4 files changed, 51 insertions(+), 25 deletions(-) create mode 100644 backend/migrations/20250128154615_team_last_warning_sent.down.sql create mode 100644 backend/migrations/20250128154615_team_last_warning_sent.up.sql diff --git a/backend/migrations/20250128154615_team_last_warning_sent.down.sql b/backend/migrations/20250128154615_team_last_warning_sent.down.sql new file mode 100644 index 0000000000..76e5671782 --- /dev/null +++ b/backend/migrations/20250128154615_team_last_warning_sent.down.sql @@ -0,0 +1 @@ +ALTER TABLE cloud_workspace_settings DROP COLUMN last_warning_sent; \ No newline at end of file diff --git a/backend/migrations/20250128154615_team_last_warning_sent.up.sql b/backend/migrations/20250128154615_team_last_warning_sent.up.sql new file mode 100644 index 0000000000..8b5cbd1c8b --- /dev/null +++ b/backend/migrations/20250128154615_team_last_warning_sent.up.sql @@ -0,0 +1 @@ +ALTER TABLE cloud_workspace_settings ADD COLUMN last_warning_sent TIMESTAMP NULL; \ No newline at end of file diff --git a/frontend/src/lib/components/settings/PremiumInfo.svelte b/frontend/src/lib/components/settings/PremiumInfo.svelte index 9ca62aa589..55d755cf4b 100644 --- a/frontend/src/lib/components/settings/PremiumInfo.svelte +++ b/frontend/src/lib/components/settings/PremiumInfo.svelte @@ -268,10 +268,10 @@ /> {/if} -

An email notification will be sent to {premiumInfo.owner} if the specified threshold amount - is reached during a given month.

+

+ An email notification will be sent to {premiumInfo.owner} if the specified threshold amount + is exceeded during a given month. +

{/if}
diff --git a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte index cfa105bbb1..5c5e8827ff 100644 --- a/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/workspace_settings/+page.svelte @@ -397,7 +397,7 @@ webhook = settings.webhook aiResourceInitialPath = settings.ai_resource?.path aiResourceInitialProvider = settings.ai_resource?.provider - selected = aiResourceInitialProvider as AiProviderTypes ?? 'openai' + selected = (aiResourceInitialProvider as AiProviderTypes) ?? 'openai' errorHandlerItemKind = settings.error_handler?.split('/')[0] as 'flow' | 'script' errorHandlerScriptPath = (settings.error_handler ?? '').split('/').slice(1).join('/') errorHandlerInitialScriptPath = errorHandlerScriptPath @@ -616,6 +616,14 @@ window.location.reload() }, 3000) } + + function updateFromSearchTab(searchTab: string | null) { + if (searchTab && searchTab !== tab) { + tab = searchTab as typeof tab + } + } + + $: updateFromSearchTab($page.url.searchParams.get('tab')) @@ -699,7 +707,8 @@ Link this Workspace to another Staging / Prod Workspace
- Connecting this workspace with another staging/production workspace enables web-based deployment to that workspace. + Connecting this workspace with another staging/production workspace enables web-based + deployment to that workspace. @@ -842,12 +851,11 @@ {#if $superadmin}

- When deleting the workspace, it will be archived for a short period of time and then permanently deleted. + When deleting the workspace, it will be archived for a short period of time and then + permanently deleted.

{:else} -

- Only instance superadmins can delete a workspace. -

+

Only instance superadmins can delete a workspace.

{/if} {#if $workspaceStore === 'admins' || $workspaceStore === 'starter'}

@@ -894,7 +902,9 @@

Workspace Webhook
- + Connect your Windmill workspace to an external service to sync or get notified about any change. @@ -925,7 +935,9 @@
Workspace Error Handler
- + Define a script or flow to be executed automatically in case of error in the workspace.
@@ -996,7 +1008,8 @@
Workspace Critical Alerts
- Critical alerts within the scope of a workspace are sent to the workspace admins through a UI notification. + Critical alerts within the scope of a workspace are sent to the workspace admins through + a UI notification.
@@ -1735,10 +1754,15 @@ git push
Workspace Secret Encryption
- When updating the encryption key of a workspace, all secrets will be re-encrypted with the new key and the previous key will be replaced by the new one. + When updating the encryption key of a workspace, all secrets will be re-encrypted with + the new key and the previous key will be replaced by the new one. - - If you're manually updating the key to match another workspace key from another Windmill instance, make sure not to use the 'SECRET_SALT' environment variable or, if you're using it, make sure it the salt matches across both instances. + + If you're manually updating the key to match another workspace key from another Windmill + instance, make sure not to use the 'SECRET_SALT' environment variable or, if you're + using it, make sure it the salt matches across both instances.