diff --git a/backend/.sqlx/query-0aa47e68f9e21115d96a8a1117e95f800c8bfb9bd6872a657c7e7131a21563c8.json b/backend/.sqlx/query-0aa47e68f9e21115d96a8a1117e95f800c8bfb9bd6872a657c7e7131a21563c8.json
new file mode 100644
index 0000000000..fe02b79503
--- /dev/null
+++ b/backend/.sqlx/query-0aa47e68f9e21115d96a8a1117e95f800c8bfb9bd6872a657c7e7131a21563c8.json
@@ -0,0 +1,20 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT 1 FROM password WHERE email = 'admin@windmill.dev' AND password_hash = '$argon2id$v=19$m=4096,t=3,p=1$oLJo/lPn/gezXCuFOEyaNw$i0T2tCkw3xUFsrBIKZwr8jVNHlIfoxQe+HfDnLtd12I'",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "?column?",
+ "type_info": "Int4"
+ }
+ ],
+ "parameters": {
+ "Left": []
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "0aa47e68f9e21115d96a8a1117e95f800c8bfb9bd6872a657c7e7131a21563c8"
+}
diff --git a/backend/.sqlx/query-3d60b4f2cbedb61affeff94fd77b7c86493c30a4d3d648d0660a3281824156b9.json b/backend/.sqlx/query-3d60b4f2cbedb61affeff94fd77b7c86493c30a4d3d648d0660a3281824156b9.json
new file mode 100644
index 0000000000..4c17792a7b
--- /dev/null
+++ b/backend/.sqlx/query-3d60b4f2cbedb61affeff94fd77b7c86493c30a4d3d648d0660a3281824156b9.json
@@ -0,0 +1,20 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT COUNT(*) FROM global_settings WHERE name = 'base_url'",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "count",
+ "type_info": "Int8"
+ }
+ ],
+ "parameters": {
+ "Left": []
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "3d60b4f2cbedb61affeff94fd77b7c86493c30a4d3d648d0660a3281824156b9"
+}
diff --git a/backend/.sqlx/query-74d5757014fc7a6818ae857bfdda9f6317cf2b9e0a78cbad80ebdc935d3246fd.json b/backend/.sqlx/query-74d5757014fc7a6818ae857bfdda9f6317cf2b9e0a78cbad80ebdc935d3246fd.json
new file mode 100644
index 0000000000..0501df6cfe
--- /dev/null
+++ b/backend/.sqlx/query-74d5757014fc7a6818ae857bfdda9f6317cf2b9e0a78cbad80ebdc935d3246fd.json
@@ -0,0 +1,20 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT 1 FROM password LIMIT 2",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "?column?",
+ "type_info": "Int4"
+ }
+ ],
+ "parameters": {
+ "Left": []
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "74d5757014fc7a6818ae857bfdda9f6317cf2b9e0a78cbad80ebdc935d3246fd"
+}
diff --git a/backend/src/main.rs b/backend/src/main.rs
index 52001a4e0e..608e1870ec 100644
--- a/backend/src/main.rs
+++ b/backend/src/main.rs
@@ -371,6 +371,7 @@ async fn windmill_main() -> anyhow::Result<()> {
// migration code to avoid break
windmill_api::migrate_db(&db).await?;
}
+
let (killpill_tx, mut killpill_rx) = tokio::sync::broadcast::channel::<()>(2);
let mut monitor_killpill_rx = killpill_tx.subscribe();
let server_killpill_rx = killpill_tx.subscribe();
diff --git a/backend/windmill-api/src/static_assets.rs b/backend/windmill-api/src/static_assets.rs
index ff21119e47..aa9870907e 100644
--- a/backend/windmill-api/src/static_assets.rs
+++ b/backend/windmill-api/src/static_assets.rs
@@ -40,6 +40,7 @@ fn serve_path(path: &str) -> Response
{
if path.starts_with("api/") {
return Response::builder().status(404).body(Body::empty()).unwrap();
}
+
match Asset::get(path) {
Some(content) => {
let body = Body::from(content.data);
diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs
index 96ed624612..b794504bf7 100644
--- a/backend/windmill-worker/src/worker.rs
+++ b/backend/windmill-worker/src/worker.rs
@@ -41,6 +41,9 @@ use std::{
time::Duration,
};
+#[cfg(feature = "benchmark")]
+use std::sync::atomic::AtomicUsize;
+
use uuid::Uuid;
use windmill_common::{
diff --git a/frontend/src/lib/components/CenteredModal.svelte b/frontend/src/lib/components/CenteredModal.svelte
index 2be4e896fd..3548a20a8f 100644
--- a/frontend/src/lib/components/CenteredModal.svelte
+++ b/frontend/src/lib/components/CenteredModal.svelte
@@ -7,6 +7,7 @@
export let subtitle: string | undefined = undefined
export let title = 'Windmill'
export let disableLogo = false
+ export let large = false
setLicense()
@@ -23,7 +24,9 @@
{/if}
diff --git a/frontend/src/lib/components/InstanceSettings.svelte b/frontend/src/lib/components/InstanceSettings.svelte
index 60f4ab4eea..18d1f6f203 100644
--- a/frontend/src/lib/components/InstanceSettings.svelte
+++ b/frontend/src/lib/components/InstanceSettings.svelte
@@ -1,7 +1,7 @@
@@ -249,6 +286,7 @@
+
{#each Object.keys(settings) as category}
{#if category == 'SMTP'}
@@ -285,8 +323,7 @@
size="xs">Send usage
{/if}
- {/if}
- {#if category == 'SSO/OAuth'}
+ {:else if category == 'SSO/OAuth'}
SSO
@@ -477,7 +514,7 @@
{#each settings[category] as setting}
- {#if !setting.cloudonly || isCloudHosted()}
+ {#if (!setting.cloudonly || isCloudHosted()) && showSetting(setting.key, values)}
{#if setting.ee_only != undefined && !$enterpriseLicense}
@@ -494,7 +531,9 @@
{/if}
{#if values}
{@const hasError = setting.isValid && !setting.isValid(values[setting.key])}
- {#if setting.fieldType == 'text'}
+ {#if loading}
+
+ {:else if setting.fieldType == 'text'}
-
License key expired on {expiration}
{:else}
-
Invalid license key format
+
Invalid license key format
{/if}
{/if}
@@ -617,13 +658,12 @@
{/if}
{#if licenseKeyChanged && !$enterpriseLicense}
-
-
-
- Refresh page after setting and saving license key to unlock all
- features
-
-
+ {#if version.startsWith('CE')}
+
License key is set but image used is the Community Edition {version}.
+ Switch image to EE.
+ {/if}
{/if}
{#if valid || expiration}
@@ -810,7 +850,7 @@
{/if}
{#if hasError}
-
+
{setting.error ?? ''}
{/if}
diff --git a/frontend/src/lib/components/Login.svelte b/frontend/src/lib/components/Login.svelte
index 6714d52b0f..7b5699b93f 100644
--- a/frontend/src/lib/components/Login.svelte
+++ b/frontend/src/lib/components/Login.svelte
@@ -22,6 +22,7 @@
export let password: string | undefined = undefined
export let error: string | undefined = undefined
export let popup: boolean = false
+ export let firstTime: boolean = false
const providers = [
{
@@ -75,6 +76,11 @@
return
}
+ if (firstTime) {
+ goto('/user/first-time')
+ return
+ }
+
// Once logged in, we can fetch the workspaces
$usersWorkspaceStore = await WorkspaceService.listUserWorkspaces()
// trigger a reload of the user
@@ -88,13 +94,6 @@
}
async function redirectUser() {
- const firstTimeCookie =
- document.cookie.match('(^|;)\\s*first_time\\s*=\\s*([^;]+)')?.pop() || '0'
- if (Number(firstTimeCookie) > 0 && email === 'admin@windmill.dev') {
- goto('/user/first-time')
- return
- }
-
if (rd?.startsWith('http')) {
window.location.href = rd
return
@@ -177,6 +176,7 @@
dispatch('login')
}
}
+
function storeRedirect(provider: string) {
if (rd) {
try {
@@ -263,6 +263,11 @@
{#if showPassword}
+ {#if firstTime}
+
First time login: admin@windmill.dev / changeme
+ {/if}
{#if isCloudHosted()}
diff --git a/frontend/src/lib/components/instanceSettings.ts b/frontend/src/lib/components/instanceSettings.ts
index b743eee033..21ee3cb098 100644
--- a/frontend/src/lib/components/instanceSettings.ts
+++ b/frontend/src/lib/components/instanceSettings.ts
@@ -91,8 +91,7 @@ export const settings: Record = {
description: 'Whether we should consider the reported usage of this instance as non-prod',
key: 'dev_instance',
fieldType: 'boolean',
- storage: 'setting',
- ee_only: 'This is only relevant for EE'
+ storage: 'setting'
},
{
label: 'Retention period in secs',
diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte
index c07e7e74c0..d6c4950ece 100644
--- a/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/user/(user)/instance_settings/+page.svelte
@@ -3,17 +3,20 @@
import CenteredModal from '$lib/components/CenteredModal.svelte'
import InstanceSettings from '$lib/components/InstanceSettings.svelte'
import { Button } from '$lib/components/common'
+
+ let saved = false
-
-
+
+ (saved = true)} />
You can change these settings later in the instance settings but finishing setup will leave this
page.
Finish Setup {!saved ? '(save settings at least once)' : ''}
diff --git a/frontend/src/routes/(root)/(logged)/user/(user)/login/+page.svelte b/frontend/src/routes/(root)/(logged)/user/(user)/login/+page.svelte
index 210e228dc1..a443df6b96 100644
--- a/frontend/src/routes/(root)/(logged)/user/(user)/login/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/user/(user)/login/+page.svelte
@@ -19,15 +19,9 @@
const rd = $page.url.searchParams.get('rd') ?? undefined
let showPassword = false
+ let firstTime = false
async function redirectUser() {
- const firstTimeCookie =
- document.cookie.match('(^|;)\\s*first_time\\s*=\\s*([^;]+)')?.pop() || '0'
- if (Number(firstTimeCookie) > 0 && email === 'admin@windmill.dev') {
- goto('/user/first-time')
- return
- }
-
if (rd?.startsWith('http')) {
window.location.href = rd
return
@@ -81,9 +75,14 @@
redirectUser()
}
+ async function checkFirstTimeSetup() {
+ firstTime = await (await fetch('/api/auth/is_first_time_setup')).json()
+ }
+
try {
setLicense()
redirectIfNecessary()
+ checkFirstTimeSetup()
} catch {
clearStores()
}
@@ -113,6 +112,6 @@
-
+