mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 00:03:08 +00:00
69fc8a98ae
* use melt menu in sidebar * stop keyboard navigation for disabled items * use melt menu for FavoriteMenu and WorkspaceMenu * fix popover placement for menuButton * use melt menu for operator menu * fix notification * fix operator menu * Use melt menu in FlowJobsMenu * use melt menu for AppMenu * clean code * clean code * add use clickOutside option to Menu * use pointerdown_outside * use pointerdown_outside # Conflicts: # frontend/src/lib/components/meltComponents/Menu.svelte * use pointerdown in menus * add max-h to app dropdown menu * keep more open in operator menu * add a MenuItem component * clean * nit * nit * clean code * put conditionalMelt as utility function * remove unused Portal * Add debounce effect in operator menu * fix component jumping due to z-index * format pages * migrate dropdown to melt * migrate toggle to melt * migrate popup to melt popover * fix missing toggle item * feat: remove `pip` fallback option for python and ansible (#5186) * refactor!: Remove `pip` fallback option for python and ansible BREAKING CHANGE: pip was deprecated since 1.425.0 (2024-11-15) * fix errors in main.rs * fix tests * remove nsjail for pip * fix imports * fix compilation error * reinforce melt types * fix racing condition issue in closing operator menu * nit * fix id conflix with melt element * nit * clean code * use melt dropdown instead of menubar * prevent modal from closing on click outside button in menu * Apply automatic changes * fix nit * nit * close dropdown when opening a new one * replace MenuV2 with melt Menu (1/4) (#5214) * use melt menu in sidebar * stop keyboard navigation for disabled items * use melt menu for FavoriteMenu and WorkspaceMenu * fix popover placement for menuButton * use melt menu for operator menu * fix notification * fix operator menu * Use melt menu in FlowJobsMenu * use melt menu for AppMenu * clean code * clean code * add use clickOutside option to Menu * use pointerdown_outside * use pointerdown_outside # Conflicts: # frontend/src/lib/components/meltComponents/Menu.svelte * use pointerdown in menus * add max-h to app dropdown menu * keep more open in operator menu * add a MenuItem component * clean * nit * nit * clean code * put conditionalMelt as utility function * remove unused Portal * Add debounce effect in operator menu * fix component jumping due to z-index * feat: remove `pip` fallback option for python and ansible (#5186) * refactor!: Remove `pip` fallback option for python and ansible BREAKING CHANGE: pip was deprecated since 1.425.0 (2024-11-15) * fix errors in main.rs * fix tests * remove nsjail for pip * fix imports * fix compilation error * reinforce melt types * fix racing condition issue in closing operator menu * nit * fix id conflix with melt element * nit * prevent modal from closing on click outside button in menu --------- Co-authored-by: pyranota <92104930+pyranota@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev> # Conflicts: # frontend/src/lib/components/meltComponents/MenuItem.svelte # frontend/src/lib/utils.ts * clean * fix z index and render * fix initialize of dropdownmenu after melt migration * feat: add support for | None and Optional in python (#5361) * feat: add support for | None and Optional in python * update python parser package * add local rooting for MenuItem * fix z index * clean * nit * nit * clean code * nit * nit * clean code * reinforce melt types * wip * reiforce instance select types for toggleButton * nit * fix double event * fix selectedTable toggle * fix sqs toggleButton * fix potential issue with binding in toggleGroup * Update frontend/src/routes/(root)/(logged)/runs/[...path]/+page.svelte Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: pyranota <92104930+pyranota@users.noreply.github.com> Co-authored-by: Ruben Fiszel <ruben@windmill.dev> Co-authored-by: HugoCasa <hugo@casademont.ch> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
114 lines
4.0 KiB
Svelte
114 lines
4.0 KiB
Svelte
<script lang="ts">
|
|
import CollapseLink from './CollapseLink.svelte'
|
|
import IconedResourceType from './IconedResourceType.svelte'
|
|
import Toggle from './Toggle.svelte'
|
|
import Tooltip from './Tooltip.svelte'
|
|
import ToggleButton from './common/toggleButton-v2/ToggleButton.svelte'
|
|
import ToggleButtonGroup from './common/toggleButton-v2/ToggleButtonGroup.svelte'
|
|
|
|
export let value: any
|
|
|
|
$: enabled = value != undefined
|
|
|
|
$: changeDomain(value?.['domain'], value?.['custom'])
|
|
|
|
function changeDomain(domain, custom) {
|
|
if (value) {
|
|
let baseUrl = custom ? `https://${domain}` : `https://${domain}.okta.com`
|
|
value = {
|
|
...value,
|
|
login_config: {
|
|
auth_url: `${baseUrl}/oauth2/v1/authorize`,
|
|
token_url: `${baseUrl}/oauth2/v1/token`,
|
|
userinfo_url: `${baseUrl}/oauth2/v1/userinfo`,
|
|
scopes: ['openid', 'profile', 'email']
|
|
},
|
|
connect_config: {
|
|
auth_url: `${baseUrl}/oauth2/v1/authorize`,
|
|
token_url: `${baseUrl}/oauth2/v1/token`,
|
|
scopes: ['openid', 'profile', 'email']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="flex flex-col gap-1">
|
|
<!-- svelte-ignore a11y-label-has-associated-control -->
|
|
<label class="text-sm font-medium text-primary flex gap-4 items-center"
|
|
><div class="w-[120px]"><IconedResourceType name="okta" after={true} /></div><Toggle
|
|
checked={enabled}
|
|
on:change={(e) => {
|
|
if (e.detail) {
|
|
value = { id: '', secret: '', domain: '', custom: false }
|
|
} else {
|
|
value = undefined
|
|
}
|
|
}}
|
|
/></label
|
|
>
|
|
{#if enabled}
|
|
<div class="p-2 rounded border">
|
|
<label class="block pb-2">
|
|
<div class="flex gap-2 items-end">
|
|
<div>
|
|
<ToggleButtonGroup
|
|
selected={value['custom'] ? 'custom' : 'org'}
|
|
on:selected={({ detail }) => {
|
|
value['custom'] = detail === 'custom'
|
|
}}
|
|
let:item
|
|
>
|
|
<ToggleButton value="org" label={'Org'} {item} />
|
|
<ToggleButton value="custom" label="Custom" {item} />
|
|
</ToggleButtonGroup>
|
|
</div>
|
|
<div class="grow">
|
|
<span class="text-primary font-semibold text-sm"
|
|
>{#if value['custom']}Custom ({'https://<domain>'}){:else}
|
|
Org ({'https://<your org>.okta.com'}){/if}</span
|
|
>
|
|
<input type="text" placeholder="yourorg" bind:value={value['domain']} />
|
|
</div>
|
|
</div>
|
|
</label>
|
|
<label class="block pb-2">
|
|
<span class="text-primary font-semibold text-sm">Custom Name</span>
|
|
<input type="text" placeholder="Custom Name" bind:value={value['display_name']} />
|
|
</label>
|
|
<label class="block pb-2">
|
|
<span class="text-primary font-semibold text-sm"
|
|
>Client Id <Tooltip
|
|
>Client credential from the client ID section of the okta service configuration</Tooltip
|
|
></span
|
|
>
|
|
<input type="text" placeholder="Client Id" bind:value={value['id']} />
|
|
</label>
|
|
<label class="block pb-2">
|
|
<span class="text-primary font-semibold text-sm"
|
|
>Client Secret <Tooltip
|
|
>from the CLIENT SECRETS section of the okta service configuration</Tooltip
|
|
></span
|
|
>
|
|
<input type="text" placeholder="Client Secret" bind:value={value['secret']} />
|
|
</label>
|
|
<CollapseLink text="Instructions">
|
|
<div class="text-sm text-secondary border p-2">
|
|
From your Admin page, setup windmill using the service flow <br />Create a new app
|
|
integration <br />a. For "sign-in method" select "OIDC - Open ID Connect" <br />
|
|
b. For "application type" select "Web Appliction" <br />
|
|
Select all of the following options for Grant type of "Client acting on behalf of a user":
|
|
<br /> Authorization Code Refresh Token Implicit (hybrid) <br />
|
|
Allow ID Token with implicit grant type <br />
|
|
Allow Access Token with implicit grant type <br />
|
|
For Refresh Token, select "Rotate token after every use" <br />
|
|
Under "LOGIN", set the following: <br />"Sign-in redirect URIs"
|
|
`BASE_URL/user/login_callback/okta`<br />
|
|
"Sign-out redirect URIs" `BASE_URL/auth/logout` <br />"Login initiated by" App Only <br />
|
|
"Initiate login URI" `BASE_URL/user/login`
|
|
</div>
|
|
</CollapseLink>
|
|
</div>
|
|
{/if}
|
|
</div>
|