mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-04 00:06:39 +00:00
feat: pick how to connect a resource in a wizard, one row per provider (#12418)
* feat: pick how to connect a resource in a wizard, one row per provider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep custom _sandbox type names and drop a stale BYO instance Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the import path on manual entry and unblock Back from an invalid form Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: stepper only for a real choice of method, badges say how a provider connects Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: fetch provider badges only with the list shown, keep scopes on method re-pick Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: drop the one-click setup badge from the provider list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: drop a comment about the removed Others section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: mix custom resource types into the list, first and badged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: read the sign-in badge from list_connects, no request per provider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: badge providers whose admin shares client credentials, render the list once in order Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: word shared client credentials as instance-level, not an admin's Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: update ee-repo-ref to a403f3ce12fd150dd649098e61562eda1e6a4d81 This commit updates the EE repository reference after PR #1004 was merged in windmill-ee-private. Previous ee-repo-ref: d29259b728e6da017caeec86ef6df304d8cace17 New ee-repo-ref: a403f3ce12fd150dd649098e61562eda1e6a4d81 Automated by sync-ee-ref workflow. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: windmill-internal-app[bot] <windmill-internal-app[bot]@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
This commit is contained in:
co-authored by
Claude Opus 5.5
windmill-internal-app[bot]
Ruben Fiszel
parent
c3cb814e9e
commit
2ca87efdb8
@@ -1 +1 @@
|
||||
ab02cdcdd4b936e8f1c905fc70df182d1a58e5bb
|
||||
a403f3ce12fd150dd649098e61562eda1e6a4d81
|
||||
|
||||
@@ -9182,13 +9182,21 @@ paths:
|
||||
type: string
|
||||
supports_client_credentials:
|
||||
type: boolean
|
||||
supports_authorization_code:
|
||||
type: boolean
|
||||
description: The instance entry declares the authorization-code grant, so users can sign in with their own account when has_shared_credentials is also true.
|
||||
has_shared_credentials:
|
||||
type: boolean
|
||||
description: The instance entry holds a client id and secret users can connect with, for sign-in or as a shared service account. Whether client credentials are shared is get_connect's client_credentials_configured.
|
||||
description: The instance entry holds a client id and secret users can connect with, for sign-in or as a shared service account.
|
||||
shares_client_credentials:
|
||||
type: boolean
|
||||
description: Users may connect as the instance entry's own app with its shared client credentials, with no sign-in.
|
||||
required:
|
||||
- name
|
||||
- supports_client_credentials
|
||||
- supports_authorization_code
|
||||
- has_shared_credentials
|
||||
- shares_client_credentials
|
||||
|
||||
/oauth/get_connect/{client}:
|
||||
get:
|
||||
|
||||
@@ -115,7 +115,9 @@ async fn list_logins() -> error::JsonResult<Logins> {
|
||||
struct OAuthConnectListItem {
|
||||
name: String,
|
||||
supports_client_credentials: bool,
|
||||
supports_authorization_code: bool,
|
||||
has_shared_credentials: bool,
|
||||
shares_client_credentials: bool,
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "private"))]
|
||||
|
||||
@@ -74,9 +74,10 @@ pub struct ClientWithScopes {
|
||||
/// persist it on client-credentials accounts.
|
||||
pub token_url: String,
|
||||
/// Whether the instance entry carries shared credentials (non-empty id +
|
||||
/// secret). Providers without them are bring-your-own only — the connect
|
||||
/// dialog lists them under "Others", not "Instance-configured".
|
||||
/// secret). Providers without them are bring-your-own only.
|
||||
pub has_shared_credentials: bool,
|
||||
/// [`OAuthClient::shares_client_credentials`] resolved.
|
||||
pub shares_client_credentials: bool,
|
||||
/// [`OAuthClient::pkce`] resolved; only the login flow reads it.
|
||||
pub pkce: bool,
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
let disabled = $state(false)
|
||||
let isGoogleSignin = $state(false)
|
||||
let manual = $state(true)
|
||||
let actionLabel: string | undefined = $state(undefined)
|
||||
let canGoBack: boolean | undefined = $state(undefined)
|
||||
|
||||
let appConnectInner: AppConnectInner | undefined = $state(undefined)
|
||||
|
||||
@@ -96,6 +98,8 @@
|
||||
bind:isGoogleSignin
|
||||
bind:disabled
|
||||
bind:manual
|
||||
bind:actionLabel
|
||||
bind:canGoBack
|
||||
on:close={drawer?.closeDrawer}
|
||||
on:refresh
|
||||
express={expressOAuthSetup}
|
||||
@@ -105,9 +109,7 @@
|
||||
/>
|
||||
{#snippet actions()}
|
||||
<div class="flex gap-1">
|
||||
<!-- Only when the user came through the type picker: opening the drawer for one
|
||||
resource type skips step 1, so Back would land on a list they never chose from. -->
|
||||
{#if step > 1 && !rtToLoad}
|
||||
{#if canGoBack}
|
||||
<Button variant="default" unifiedSize="md" onClick={() => appConnectInner?.back()}>
|
||||
Back
|
||||
</Button>
|
||||
@@ -121,13 +123,7 @@
|
||||
{disabled}
|
||||
onClick={() => appConnectInner?.next()}
|
||||
>
|
||||
{#if (step == 2 && !manual) || native}
|
||||
Connect
|
||||
{:else if step == 1}
|
||||
Next
|
||||
{:else}
|
||||
Save
|
||||
{/if}
|
||||
{actionLabel ?? 'Next'}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,8 @@
|
||||
let disabled = $state(false)
|
||||
let manual = $state(true)
|
||||
let isGoogleSignin = $state(false)
|
||||
let actionLabel: string | undefined = $state(undefined)
|
||||
let canGoBack: boolean | undefined = $state(undefined)
|
||||
|
||||
let appConnect: AppConnectInner | undefined = $state(undefined)
|
||||
|
||||
@@ -42,7 +44,7 @@
|
||||
{#if !express}
|
||||
<div class="flex flex-row-reverse w-full pb-2 shrink-0">
|
||||
<div class="flex gap-2">
|
||||
{#if step > 2}
|
||||
{#if canGoBack}
|
||||
<Button variant="default" unifiedSize="md" onClick={() => appConnect?.back()}>
|
||||
Back
|
||||
</Button>
|
||||
@@ -52,13 +54,7 @@
|
||||
<GoogleSigninButton {disabled} onClick={() => appConnect?.next()} />
|
||||
{:else}
|
||||
<Button variant="accent" unifiedSize="md" {disabled} onClick={() => appConnect?.next()}>
|
||||
{#if step == 2 && !manual}
|
||||
Connect
|
||||
{:else if step == 1}
|
||||
Next
|
||||
{:else}
|
||||
Save
|
||||
{/if}
|
||||
{actionLabel ?? 'Next'}
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -73,6 +69,8 @@
|
||||
bind:disabled
|
||||
bind:manual
|
||||
bind:isGoogleSignin
|
||||
bind:actionLabel
|
||||
bind:canGoBack
|
||||
on:error
|
||||
on:refresh
|
||||
/>
|
||||
|
||||
@@ -195,8 +195,8 @@
|
||||
)
|
||||
const instanceConnects = $derived(new Set(oauthConnects.current ?? []))
|
||||
/**
|
||||
* Matches what the dialog itself decides (`AppConnectInner.open`: `manual = !inConnects &&
|
||||
* !registryCcCapable()`). An instance client is the usual route, but a provider the
|
||||
* The types worth offering Connect for: an instance OAuth entry, or a provider the
|
||||
* registry marks client-credentials-capable. An instance client is the usual route, but a provider the
|
||||
* registry marks client-credentials-capable is connectable without one, because those
|
||||
* credentials are entered per resource rather than held by a superadmin. Test only the
|
||||
* first half and Connect disappears on the eight such providers, where it would work.
|
||||
|
||||
Reference in New Issue
Block a user