windmill-components 1.377.8 → 1.379.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package/ata/apis.d.ts +1 -0
- package/package/ata/apis.js +5 -3
- package/package/ata/index.d.ts +1 -1
- package/package/ata/index.js +2 -1
- package/package/components/DateInput.svelte +30 -3
- package/package/components/DisplayResult.svelte +19 -10
- package/package/components/DisplayResult.svelte.d.ts +1 -0
- package/package/components/FlowStatusViewer.svelte +2 -0
- package/package/components/FlowStatusViewer.svelte.d.ts +1 -0
- package/package/components/FlowStatusViewerInner.svelte +13 -10
- package/package/components/FlowStatusViewerInner.svelte.d.ts +1 -0
- package/package/components/FlowViewer.svelte.d.ts +1 -1
- package/package/components/InstanceSettings.svelte +1 -0
- package/package/components/LightweightArgInput.svelte +13 -6
- package/package/components/LightweightSchemaForm.svelte +4 -1
- package/package/components/LightweightSchemaForm.svelte.d.ts +1 -0
- package/package/components/LogViewer.svelte +0 -3
- package/package/components/Login.svelte +68 -80
- package/package/components/Login.svelte.d.ts +0 -2
- package/package/components/ModulePreview.svelte +1 -1
- package/package/components/ObjectStoreConfigSettings.svelte +2 -2
- package/package/components/Password.svelte +1 -1
- package/package/components/Portal.svelte +2 -2
- package/package/components/apps/components/GroupWrapper.svelte +3 -2
- package/package/components/apps/components/GroupWrapper.svelte.d.ts +2 -1
- package/package/components/apps/components/buttons/AppSchemaForm.svelte +16 -13
- package/package/components/apps/components/display/AppJobIdLogComponent.svelte +1 -1
- package/package/components/apps/components/display/AppRecomputeAll.svelte +2 -2
- package/package/components/apps/components/display/table/AppCell.svelte +5 -1
- package/package/components/apps/components/display/table/AppTableFooter.svelte +4 -1
- package/package/components/apps/components/helpers/InputValue.svelte +4 -3
- package/package/components/apps/components/helpers/RunnableComponent.svelte +4 -3
- package/package/components/apps/components/helpers/eval.d.ts +2 -1
- package/package/components/apps/components/helpers/eval.js +45 -14
- package/package/components/apps/components/inputs/AppTextInput.svelte +1 -0
- package/package/components/apps/components/layout/AppContainer.svelte +13 -3
- package/package/components/apps/editor/AppEditor.svelte +4 -7
- package/package/components/apps/editor/AppEditorHeader.svelte +22 -16
- package/package/components/apps/editor/AppPreview.svelte +8 -20
- package/package/components/apps/editor/AppPreview.svelte.d.ts +3 -1
- package/package/components/apps/editor/DeploymentHistory.svelte +1 -1
- package/package/components/apps/editor/RunnableJobPanel.svelte +8 -8
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +2 -2
- package/package/components/apps/editor/settingsPanel/ComponentInputTypeEditor.svelte +5 -1
- package/package/components/apps/editor/settingsPanel/GridGroup.svelte +13 -1
- package/package/components/apps/types.d.ts +7 -2
- package/package/components/apps/utils.js +30 -3
- package/package/components/common/drawer/Drawer.svelte +1 -1
- package/package/components/common/table/AppRow.svelte +2 -1
- package/package/components/common/table/FlowRow.svelte +2 -1
- package/package/components/common/table/RawAppRow.svelte +1 -1
- package/package/components/common/table/ScriptRow.svelte +2 -1
- package/package/components/flows/previousResults.js +1 -0
- package/package/components/jobs/JobPreview.svelte +1 -1
- package/package/components/propertyPicker/PropPicker.svelte +2 -1
- package/package/components/runs/JobLoader.svelte +19 -7
- package/package/components/runs/JobLoader.svelte.d.ts +2 -1
- package/package/components/runs/JobPreview.svelte +2 -2
- package/package/components/runs/QueuePopover.svelte +1 -1
- package/package/components/runs/RunRow.svelte +14 -7
- package/package/components/runs/RunRow.svelte.d.ts +1 -0
- package/package/components/runs/RunsFilter.svelte +78 -15
- package/package/components/runs/RunsFilter.svelte.d.ts +3 -2
- package/package/components/runs/RunsQueue.svelte +23 -11
- package/package/components/runs/RunsQueue.svelte.d.ts +5 -1
- package/package/components/runs/RunsTable.svelte +65 -63
- package/package/components/runs/RunsTable.svelte.d.ts +1 -0
- package/package/components/scriptEditor/LogPanel.svelte +1 -1
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/services.gen.d.ts +8 -3
- package/package/gen/services.gen.js +16 -4
- package/package/gen/types.gen.d.ts +22 -0
- package/package/refreshUser.d.ts +1 -1
- package/package/refreshUser.js +3 -2
- package/package/utils.d.ts +1 -4
- package/package/utils.js +0 -19
- package/package/utils_deployable.d.ts +5 -0
- package/package/utils_deployable.js +19 -0
- package/package.json +2 -9
- package/package/components/AppEmbed.svelte +0 -154
- package/package/components/AppEmbed.svelte.d.ts +0 -21
package/package/ata/apis.d.ts
CHANGED
package/package/ata/apis.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// https://github.com/jsdelivr/data.jsdelivr.com
|
|
2
|
+
import pLimit from 'p-limit';
|
|
2
3
|
export const getNPMVersionsForModule = (moduleName, resLimit) => {
|
|
3
4
|
const url = `https://data.jsdelivr.com/v1/package/npm/${moduleName}`;
|
|
4
5
|
return api(url, resLimit, {
|
|
@@ -27,7 +28,7 @@ export const getFiletreeForModuleWithVersion = async (moduleName, version, raw,
|
|
|
27
28
|
export const getDTSFileForModuleWithVersion = async (moduleName, version, file) => {
|
|
28
29
|
// file comes with a prefix /
|
|
29
30
|
const url = `https://cdn.jsdelivr.net/npm/${moduleName}@${version}${file}`;
|
|
30
|
-
const res = await fetch(url);
|
|
31
|
+
const res = await limit(() => fetch(url));
|
|
31
32
|
if (res.ok) {
|
|
32
33
|
return res.text();
|
|
33
34
|
}
|
|
@@ -38,12 +39,13 @@ export const getDTSFileForModuleWithVersion = async (moduleName, version, file)
|
|
|
38
39
|
export function isOverlimit(resLimit) {
|
|
39
40
|
return resLimit.usage > 5000000;
|
|
40
41
|
}
|
|
42
|
+
export const limit = pLimit(6);
|
|
41
43
|
function api(url, resLimit, init) {
|
|
42
44
|
if (isOverlimit(resLimit)) {
|
|
43
45
|
console.warn(`Exceeded limit of types downloaded for the needs of the assistant fetching: ${url}, ${resLimit.usage}`);
|
|
44
46
|
return new Promise(() => new Error('Exceeded limit of 100MB of data downloaded.'));
|
|
45
47
|
}
|
|
46
|
-
return fetch(url, init).then((res) => {
|
|
48
|
+
return limit(() => fetch(url, init).then((res) => {
|
|
47
49
|
if (res.ok) {
|
|
48
50
|
return res.text().then((text) => {
|
|
49
51
|
resLimit.usage += text.length;
|
|
@@ -54,5 +56,5 @@ function api(url, resLimit, init) {
|
|
|
54
56
|
else {
|
|
55
57
|
return new Error('OK');
|
|
56
58
|
}
|
|
57
|
-
});
|
|
59
|
+
}));
|
|
58
60
|
}
|
package/package/ata/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare const setupTypeAcquisition: (config: ATABootstrapConfig) => (init
|
|
|
36
36
|
/** The bulk load of the work in getting the filetree based on how people think about npm names and versions */
|
|
37
37
|
export declare const getFileTreeForModuleWithTag: (moduleName: string, tag: string | undefined, raw: string, resLimit: ResLimit) => Promise<{
|
|
38
38
|
moduleName: string;
|
|
39
|
-
version: string;
|
|
39
|
+
version: string;
|
|
40
40
|
raw: string;
|
|
41
41
|
default: string;
|
|
42
42
|
files: {
|
package/package/ata/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getDTSFileForModuleWithVersion, getFiletreeForModuleWithVersion, getNPMVersionForModuleReference, getNPMVersionsForModule, isOverlimit } from './apis';
|
|
1
|
+
import { getDTSFileForModuleWithVersion, getFiletreeForModuleWithVersion, getNPMVersionForModuleReference, getNPMVersionsForModule, isOverlimit, limit } from './apis';
|
|
2
2
|
import { isRelativePath, mapModuleNameToModule } from './edgeCases';
|
|
3
3
|
/**
|
|
4
4
|
* The function which starts up type acquisition,
|
|
@@ -12,6 +12,7 @@ import { isRelativePath, mapModuleNameToModule } from './edgeCases';
|
|
|
12
12
|
export const setupTypeAcquisition = (config) => {
|
|
13
13
|
const moduleMap = new Map();
|
|
14
14
|
const fsMap = new Map();
|
|
15
|
+
limit.clearQueue();
|
|
15
16
|
let estimatedToDownload = 0;
|
|
16
17
|
let estimatedDownloaded = 0;
|
|
17
18
|
let resLimit = { usage: 0 };
|
|
@@ -1,16 +1,43 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import { format, isValid } from 'date-fns';
|
|
2
|
+
import { format, isValid, parse } from 'date-fns';
|
|
3
|
+
import { sendUserToast } from '../toast';
|
|
3
4
|
export let value = undefined;
|
|
4
5
|
export let autofocus = false;
|
|
5
6
|
export let minDate = undefined;
|
|
6
7
|
export let maxDate = undefined;
|
|
7
8
|
export let dateFormat = 'dd-MM-yyyy';
|
|
8
|
-
let date =
|
|
9
|
+
let date = computeDate(value);
|
|
9
10
|
const dispatch = createEventDispatcher();
|
|
11
|
+
const defaultDateFormat = 'dd-MM-yyyy';
|
|
12
|
+
const defaultHtmlDateFormat = 'yyyy-MM-dd';
|
|
13
|
+
function computeDate(value) {
|
|
14
|
+
if (dateFormat === undefined) {
|
|
15
|
+
dateFormat = defaultDateFormat;
|
|
16
|
+
}
|
|
17
|
+
if (value && value.length > 0) {
|
|
18
|
+
try {
|
|
19
|
+
let date = parse(value, dateFormat, new Date());
|
|
20
|
+
if (date.toString() === 'Invalid Date') {
|
|
21
|
+
console.debug('falling back to default html date format');
|
|
22
|
+
date = parse(value, defaultHtmlDateFormat, new Date());
|
|
23
|
+
}
|
|
24
|
+
const res = format(date, defaultHtmlDateFormat);
|
|
25
|
+
return res;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
sendUserToast(`Failed to parse date: ${value} with format ${dateFormat} and ${defaultHtmlDateFormat}`, true);
|
|
29
|
+
console.error(`Failed to parse date: ${value}`, error);
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
10
37
|
function updateValue(newDate) {
|
|
11
38
|
if (newDate && isValid(new Date(newDate))) {
|
|
12
39
|
if (dateFormat === undefined) {
|
|
13
|
-
dateFormat =
|
|
40
|
+
dateFormat = defaultDateFormat;
|
|
14
41
|
}
|
|
15
42
|
try {
|
|
16
43
|
let dateFromValue = newDate ? new Date(newDate + 'T00:00:00') : undefined;
|
|
@@ -31,6 +31,7 @@ export let hideAsJson = false;
|
|
|
31
31
|
export let noControls = false;
|
|
32
32
|
export let drawerOpen = false;
|
|
33
33
|
export let nodeId = undefined;
|
|
34
|
+
export let language = undefined;
|
|
34
35
|
const IMG_MAX_SIZE = 10000000;
|
|
35
36
|
const TABLE_MAX_SIZE = 5000000;
|
|
36
37
|
const DISPLAY_MAX_SIZE = 100000;
|
|
@@ -296,17 +297,14 @@ let seeS3PreviewFileFromList = '';
|
|
|
296
297
|
/>
|
|
297
298
|
{/each}</div
|
|
298
299
|
>
|
|
299
|
-
{:else}
|
|
300
|
-
<div
|
|
300
|
+
{:else}<div
|
|
301
301
|
class="inline-highlight relative grow {['plain', 'markdown'].includes(resultKind ?? '')
|
|
302
302
|
? ''
|
|
303
303
|
: 'min-h-[200px]'}"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
{#if !hideAsJson && !['json', 's3object'].includes(resultKind ?? '') && typeof result === 'object'}
|
|
309
|
-
<ToggleButtonGroup
|
|
304
|
+
>{#if result != undefined && length != undefined && largeObject != undefined}<div
|
|
305
|
+
class="flex justify-between items-center w-full"
|
|
306
|
+
><div class="text-tertiary text-sm">
|
|
307
|
+
{#if !hideAsJson && !['json', 's3object'].includes(resultKind ?? '') && typeof result === 'object'}<ToggleButtonGroup
|
|
310
308
|
class="h-6"
|
|
311
309
|
selected={forceJson ? 'json' : resultKind?.startsWith('table-') ? 'table' : 'pretty'}
|
|
312
310
|
on:selected={(ev) => {
|
|
@@ -456,13 +454,24 @@ let seeS3PreviewFileFromList = '';
|
|
|
456
454
|
</div>
|
|
457
455
|
{:else if !forceJson && resultKind == 'error' && result?.error}
|
|
458
456
|
<div class="flex flex-col items-start">
|
|
459
|
-
<span class="text-red-500 font-semibold text-
|
|
457
|
+
<span class="text-red-500 pt-2 font-semibold !text-xs whitespace-pre-wrap"
|
|
460
458
|
>{#if result.error.name || result.error.message}{result.error.name}: {result.error
|
|
461
459
|
.message}{:else}{JSON.stringify(result.error, null, 4)}{/if}</span
|
|
462
460
|
>
|
|
463
|
-
<pre class="text-
|
|
461
|
+
<pre class="text-xs pt-2 whitespace-pre-wrap text-primary"
|
|
462
|
+
>{result.error.stack ?? ''}</pre
|
|
463
|
+
>
|
|
464
464
|
<slot />
|
|
465
465
|
</div>
|
|
466
|
+
{#if language == 'bun'}
|
|
467
|
+
<div class="pt-20" />
|
|
468
|
+
<Alert size="xs" type="info" title="Seeing an odd error?">
|
|
469
|
+
Bun script are bundled for performance reasons. If you see an odd error that doesn't
|
|
470
|
+
appear when testing (which doesn't use bundling), try putting <code>//nobundling</code
|
|
471
|
+
> at the top of your script to disable bundling and feel free to mention it to the Windmill's
|
|
472
|
+
team.
|
|
473
|
+
</Alert>
|
|
474
|
+
{/if}
|
|
466
475
|
{:else if !forceJson && resultKind == 'approval'}<div class="flex flex-col gap-3 mt-2 mx-4">
|
|
467
476
|
<Button
|
|
468
477
|
color="green"
|
|
@@ -7,6 +7,7 @@ export let jobId;
|
|
|
7
7
|
export let workspaceId = undefined;
|
|
8
8
|
export let flowStateStore = writable({});
|
|
9
9
|
export let selectedJobStep = undefined;
|
|
10
|
+
export let hideFlowResult = false;
|
|
10
11
|
export let isOwner = false;
|
|
11
12
|
export let wideResults = false;
|
|
12
13
|
let lastJobId = jobId;
|
|
@@ -33,6 +34,7 @@ $: jobId && updateJobId();
|
|
|
33
34
|
</script>
|
|
34
35
|
|
|
35
36
|
<FlowStatusViewerInner
|
|
37
|
+
{hideFlowResult}
|
|
36
38
|
on:jobsLoaded={({ detail }) => {
|
|
37
39
|
let { job } = detail
|
|
38
40
|
if (job.script_path != lastScriptPath && job.script_path) {
|
|
@@ -7,6 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
workspaceId?: string | undefined;
|
|
8
8
|
flowStateStore?: Writable<FlowState> | undefined;
|
|
9
9
|
selectedJobStep?: string | undefined;
|
|
10
|
+
hideFlowResult?: boolean | undefined;
|
|
10
11
|
isOwner?: boolean | undefined;
|
|
11
12
|
wideResults?: boolean | undefined;
|
|
12
13
|
};
|
|
@@ -36,6 +36,7 @@ export let globalRefreshes = {};
|
|
|
36
36
|
export let childFlow = false;
|
|
37
37
|
export let reducedPolling = false;
|
|
38
38
|
export let wideResults = false;
|
|
39
|
+
export let hideFlowResult = false;
|
|
39
40
|
let jobResults = flowJobIds?.flowJobs?.map((x, id) => `iter #${id + 1} not loaded by frontend yet`) ?? [];
|
|
40
41
|
let retry_selected = '';
|
|
41
42
|
let timeout;
|
|
@@ -515,16 +516,18 @@ let storedListJobs = {};
|
|
|
515
516
|
<Loader2 class="animate-spin" />
|
|
516
517
|
</div>
|
|
517
518
|
{:else if `result` in job}
|
|
518
|
-
|
|
519
|
-
<
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
519
|
+
{#if !hideFlowResult}
|
|
520
|
+
<div class="w-full h-full">
|
|
521
|
+
<FlowJobResult
|
|
522
|
+
workspaceId={job?.workspace_id}
|
|
523
|
+
jobId={job?.id}
|
|
524
|
+
loading={job['running'] == true}
|
|
525
|
+
result={job.result}
|
|
526
|
+
logs={job.logs}
|
|
527
|
+
durationStates={localDurationStatuses}
|
|
528
|
+
/>
|
|
529
|
+
</div>
|
|
530
|
+
{/if}
|
|
528
531
|
{:else if job.flow_status?.modules?.[job?.flow_status?.step]?.type === 'WaitingForEvents'}
|
|
529
532
|
<FlowStatusWaitingForEvents {workspaceId} {job} {isOwner} />
|
|
530
533
|
{:else if $suspendStatus && Object.keys($suspendStatus).length > 0}
|
|
@@ -25,6 +25,7 @@ declare const __propDef: {
|
|
|
25
25
|
childFlow?: boolean | undefined;
|
|
26
26
|
reducedPolling?: boolean | undefined;
|
|
27
27
|
wideResults?: boolean | undefined;
|
|
28
|
+
hideFlowResult?: boolean | undefined;
|
|
28
29
|
job?: Job | undefined;
|
|
29
30
|
refresh?: ((root: boolean, loopJob: {
|
|
30
31
|
index: number;
|
|
@@ -11,7 +11,7 @@ declare const __propDef: {
|
|
|
11
11
|
initialOpen?: number | undefined;
|
|
12
12
|
noSide?: boolean | undefined;
|
|
13
13
|
noGraph?: boolean | undefined;
|
|
14
|
-
tab?: "schema" | "
|
|
14
|
+
tab?: "schema" | "ui" | "raw" | undefined;
|
|
15
15
|
noSummary?: boolean | undefined;
|
|
16
16
|
};
|
|
17
17
|
events: {
|
|
@@ -158,9 +158,14 @@ function testRegex(pattern, value) {
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
let prevDefaultValue = undefined;
|
|
161
|
+
let defaultChange = 0;
|
|
161
162
|
async function changeDefaultValue(inputCat, defaultValue) {
|
|
162
|
-
if (value == null ||
|
|
163
|
+
if (value == null ||
|
|
164
|
+
value == undefined ||
|
|
165
|
+
deepEqual(value, prevDefaultValue) ||
|
|
166
|
+
(prevDefaultValue != undefined && !deepEqual(defaultValue, prevDefaultValue))) {
|
|
163
167
|
value = defaultValue;
|
|
168
|
+
defaultChange += 1;
|
|
164
169
|
}
|
|
165
170
|
prevDefaultValue = structuredClone(defaultValue);
|
|
166
171
|
if (value == null || value == undefined) {
|
|
@@ -472,11 +477,13 @@ function addItemByItemsType() {
|
|
|
472
477
|
{/each}
|
|
473
478
|
</select>
|
|
474
479
|
{:else if inputCat == 'date'}
|
|
475
|
-
{#
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
+
{#key defaultChange}
|
|
481
|
+
{#if format === 'date'}
|
|
482
|
+
<DateInput bind:value dateFormat={extra['dateFormat']} />
|
|
483
|
+
{:else}
|
|
484
|
+
<DateTimeInput useDropdown bind:value />
|
|
485
|
+
{/if}
|
|
486
|
+
{/key}
|
|
480
487
|
{:else if inputCat == 'base64'}
|
|
481
488
|
<div class="flex flex-col my-6 w-full">
|
|
482
489
|
<input
|
|
@@ -55,7 +55,10 @@ function reorder() {
|
|
|
55
55
|
}
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
|
-
<div
|
|
58
|
+
<div
|
|
59
|
+
class={twMerge('w-full flex flex-col px-0.5 pb-2', largeGap ? 'gap-8' : 'gap-2')}
|
|
60
|
+
on:pointerdown
|
|
61
|
+
>
|
|
59
62
|
{#each keys as argName (argName)}
|
|
60
63
|
{#if typeof args == 'object' && schema?.properties[argName] && args}
|
|
61
64
|
<LightweightArgInput
|
|
@@ -78,9 +78,6 @@ function truncateContent(jobContent, loadedFromObjectStore, limit) {
|
|
|
78
78
|
}
|
|
79
79
|
return content;
|
|
80
80
|
}
|
|
81
|
-
$: if (content != undefined && isLoading) {
|
|
82
|
-
isLoading = false;
|
|
83
|
-
}
|
|
84
81
|
$: truncatedContent && scrollToBottom();
|
|
85
82
|
$: html = ansi_up.ansi_to_html(downloadStartUrl && prefixIndex != undefined
|
|
86
83
|
? truncatedContent.substring(truncatedContent.substring(1).indexOf('\n') + 2, truncatedContent.length)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import { goto } from '../navigation';
|
|
2
|
+
import Github from './icons/brands/Github.svelte';
|
|
2
3
|
import Gitlab from './icons/brands/Gitlab.svelte';
|
|
3
4
|
import Google from './icons/brands/Google.svelte';
|
|
4
5
|
import Microsoft from './icons/brands/Microsoft.svelte';
|
|
5
6
|
import Okta from './icons/brands/Okta.svelte';
|
|
6
7
|
import { OauthService, UserService, WorkspaceService } from '../gen';
|
|
7
|
-
import { usersWorkspaceStore, workspaceStore, userStore
|
|
8
|
+
import { usersWorkspaceStore, workspaceStore, userStore } from '../stores';
|
|
8
9
|
import { classNames, emptyString, parseQueryParams } from '../utils';
|
|
9
10
|
import { base } from '../base';
|
|
10
11
|
import { getUserExt } from '../user';
|
|
@@ -18,8 +19,6 @@ export let email = undefined;
|
|
|
18
19
|
export let password = undefined;
|
|
19
20
|
export let error = undefined;
|
|
20
21
|
export let popup = false;
|
|
21
|
-
export let loginPasswordRequireEEOnPublicApps = false;
|
|
22
|
-
export let gotoFn = undefined;
|
|
23
22
|
const providers = [
|
|
24
23
|
{
|
|
25
24
|
type: 'github',
|
|
@@ -74,18 +73,13 @@ async function login() {
|
|
|
74
73
|
$userStore = await getUserExt($workspaceStore);
|
|
75
74
|
}
|
|
76
75
|
// Finally, we check whether the user is a superadmin
|
|
77
|
-
refreshSuperadmin(
|
|
78
|
-
|
|
79
|
-
redirectUser();
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
dispatch('login');
|
|
83
|
-
}
|
|
76
|
+
refreshSuperadmin();
|
|
77
|
+
redirectUser();
|
|
84
78
|
}
|
|
85
79
|
async function redirectUser() {
|
|
86
80
|
const firstTimeCookie = document.cookie.match('(^|;)\\s*first_time\\s*=\\s*([^;]+)')?.pop() || '0';
|
|
87
81
|
if (Number(firstTimeCookie) > 0 && email === 'admin@windmill.dev') {
|
|
88
|
-
|
|
82
|
+
goto('/user/first-time');
|
|
89
83
|
return;
|
|
90
84
|
}
|
|
91
85
|
if (rd?.startsWith('http')) {
|
|
@@ -93,13 +87,13 @@ async function redirectUser() {
|
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
95
89
|
if ($workspaceStore) {
|
|
96
|
-
|
|
90
|
+
goto(rd ?? '/');
|
|
97
91
|
}
|
|
98
92
|
else {
|
|
99
93
|
let workspaceTarget = parseQueryParams(rd ?? undefined)['workspace'];
|
|
100
94
|
if (rd && workspaceTarget) {
|
|
101
95
|
$workspaceStore = workspaceTarget;
|
|
102
|
-
|
|
96
|
+
goto(rd);
|
|
103
97
|
return;
|
|
104
98
|
}
|
|
105
99
|
if (!$usersWorkspaceStore) {
|
|
@@ -117,24 +111,24 @@ async function redirectUser() {
|
|
|
117
111
|
workspace: $workspaceStore
|
|
118
112
|
});
|
|
119
113
|
if (!emptyString(defaultApp.default_app_path)) {
|
|
120
|
-
|
|
114
|
+
goto(`/apps/get/${defaultApp.default_app_path}`);
|
|
121
115
|
}
|
|
122
116
|
else {
|
|
123
|
-
|
|
117
|
+
goto(rd ?? '/');
|
|
124
118
|
}
|
|
125
119
|
}
|
|
126
120
|
else {
|
|
127
|
-
|
|
121
|
+
goto(rd ?? '/');
|
|
128
122
|
}
|
|
129
123
|
}
|
|
130
124
|
else if (rd?.startsWith('/user/workspaces')) {
|
|
131
|
-
|
|
125
|
+
goto(rd);
|
|
132
126
|
}
|
|
133
127
|
else if (rd == '/#user-settings') {
|
|
134
|
-
|
|
128
|
+
goto(`/user/workspaces#user-settings`);
|
|
135
129
|
}
|
|
136
130
|
else {
|
|
137
|
-
|
|
131
|
+
goto(`/user/workspaces${rd ? `?rd=${encodeURIComponent(rd)}` : ''}`);
|
|
138
132
|
}
|
|
139
133
|
}
|
|
140
134
|
}
|
|
@@ -252,74 +246,68 @@ $: error && sendUserToast(error, true);
|
|
|
252
246
|
{/if}
|
|
253
247
|
|
|
254
248
|
{#if showPassword}
|
|
255
|
-
|
|
256
|
-
<
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
{/if}
|
|
249
|
+
<div>
|
|
250
|
+
<div class="space-y-6">
|
|
251
|
+
{#if isCloudHosted()}
|
|
252
|
+
<p class="text-xs text-tertiary italic pb-6">
|
|
253
|
+
To get credentials without the OAuth providers above, send an email at
|
|
254
|
+
contact@windmill.dev
|
|
255
|
+
</p>
|
|
256
|
+
{/if}
|
|
257
|
+
<div>
|
|
258
|
+
<label for="email" class="block text-sm font-medium leading-6 text-primary">
|
|
259
|
+
Email
|
|
260
|
+
</label>
|
|
268
261
|
<div>
|
|
269
|
-
<
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
id="email"
|
|
277
|
-
autocomplete="email"
|
|
278
|
-
class="block w-full rounded-md border-0 py-1.5 text-primary shadow-sm ring-1 ring-inset placeholder:text-secondary focus:ring-2 focus:ring-inset focus:ring-frost-600 sm:text-sm sm:leading-6"
|
|
279
|
-
/>
|
|
280
|
-
</div>
|
|
262
|
+
<input
|
|
263
|
+
type="email"
|
|
264
|
+
bind:value={email}
|
|
265
|
+
id="email"
|
|
266
|
+
autocomplete="email"
|
|
267
|
+
class="block w-full rounded-md border-0 py-1.5 text-primary shadow-sm ring-1 ring-inset placeholder:text-secondary focus:ring-2 focus:ring-inset focus:ring-frost-600 sm:text-sm sm:leading-6"
|
|
268
|
+
/>
|
|
281
269
|
</div>
|
|
270
|
+
</div>
|
|
282
271
|
|
|
272
|
+
<div>
|
|
273
|
+
<label for="password" class="block text-sm font-medium leading-6 text-primary">
|
|
274
|
+
Password
|
|
275
|
+
</label>
|
|
283
276
|
<div>
|
|
284
|
-
<
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
type="password"
|
|
293
|
-
autocomplete="current-password"
|
|
294
|
-
class="block w-full rounded-md border-0 py-1.5 text-shadow shadow-sm ring-1 ring-inset placeholder:text-secondary focus:ring-2 focus:ring-inset focus:ring-frost-600 sm:text-sm sm:leading-6"
|
|
295
|
-
/>
|
|
296
|
-
</div>
|
|
277
|
+
<input
|
|
278
|
+
on:keyup={handleKeyUp}
|
|
279
|
+
bind:value={password}
|
|
280
|
+
id="password"
|
|
281
|
+
type="password"
|
|
282
|
+
autocomplete="current-password"
|
|
283
|
+
class="block w-full rounded-md border-0 py-1.5 text-shadow shadow-sm ring-1 ring-inset placeholder:text-secondary focus:ring-2 focus:ring-inset focus:ring-frost-600 sm:text-sm sm:leading-6"
|
|
284
|
+
/>
|
|
297
285
|
</div>
|
|
286
|
+
</div>
|
|
298
287
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
</div>
|
|
288
|
+
<div class="pt-2">
|
|
289
|
+
<button
|
|
290
|
+
on:click={login}
|
|
291
|
+
disabled={!email || !password}
|
|
292
|
+
class="flex w-full justify-center rounded-md bg-frost-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-frost-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-frost-600"
|
|
293
|
+
>
|
|
294
|
+
Sign in
|
|
295
|
+
</button>
|
|
308
296
|
</div>
|
|
309
297
|
</div>
|
|
310
|
-
{/if}
|
|
311
|
-
{/if}
|
|
312
298
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
299
|
+
{#if isCloudHosted()}
|
|
300
|
+
<p class="text-2xs text-tertiary italic mt-10 text-center">
|
|
301
|
+
By logging in, you agree to our
|
|
302
|
+
<a href="https://windmill.dev/terms_of_service" target="_blank" rel="noreferrer">
|
|
303
|
+
Terms of Service
|
|
304
|
+
</a>
|
|
305
|
+
and
|
|
306
|
+
<a href="https://windmill.dev/privacy_policy" target="_blank" rel="noreferrer">
|
|
307
|
+
Privacy Policy
|
|
308
|
+
</a>
|
|
309
|
+
</p>
|
|
310
|
+
{/if}
|
|
311
|
+
</div>
|
|
324
312
|
{/if}
|
|
325
313
|
</div>
|
|
@@ -6,8 +6,6 @@ declare const __propDef: {
|
|
|
6
6
|
password?: string | undefined;
|
|
7
7
|
error?: string | undefined;
|
|
8
8
|
popup?: boolean | undefined;
|
|
9
|
-
loginPasswordRequireEEOnPublicApps?: boolean | undefined;
|
|
10
|
-
gotoFn?: ((path: string, opt?: Record<string, any> | undefined) => void) | undefined;
|
|
11
9
|
};
|
|
12
10
|
events: {
|
|
13
11
|
login: CustomEvent<any>;
|
|
@@ -108,7 +108,7 @@ let forceJson = false;
|
|
|
108
108
|
duration={testJob?.['duration_ms']}
|
|
109
109
|
mem={testJob?.['mem_peak']}
|
|
110
110
|
content={testJob?.logs}
|
|
111
|
-
isLoading={testIsLoading}
|
|
111
|
+
isLoading={testIsLoading && testJob?.['running'] == false}
|
|
112
112
|
tag={testJob?.tag}
|
|
113
113
|
/>
|
|
114
114
|
</Pane>
|
|
@@ -125,7 +125,7 @@ async function testConnection() {
|
|
|
125
125
|
<span class="text-tertiary text-2xs"
|
|
126
126
|
>If left empty, will be derived automatically from $AWS_SECRET_KEY, pod or ec2 profile</span
|
|
127
127
|
>
|
|
128
|
-
<input type="password" bind:value={bucket_config.secret_key} />
|
|
128
|
+
<input type="password" autocomplete="new-password" bind:value={bucket_config.secret_key} />
|
|
129
129
|
</label>
|
|
130
130
|
<label class="block pb-2">
|
|
131
131
|
<span class="text-primary font-semibold text-sm">Endpoint</span>
|
|
@@ -151,7 +151,7 @@ async function testConnection() {
|
|
|
151
151
|
</label>
|
|
152
152
|
<label class="block pb-2">
|
|
153
153
|
<span class="text-primary font-semibold text-sm">Access Key</span>
|
|
154
|
-
<input type="password" bind:value={bucket_config.accessKey} />
|
|
154
|
+
<input type="password" autocomplete="new-password" bind:value={bucket_config.accessKey} />
|
|
155
155
|
</label>
|
|
156
156
|
<label class="block pb-2">
|
|
157
157
|
<span class="text-primary font-semibold text-sm"
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}. Allowed types: string (CSS selector) or HTMLElement.`
|
|
30
30
|
)
|
|
31
31
|
}
|
|
32
|
-
targetEl.appendChild(el)
|
|
33
|
-
el.hidden = false
|
|
34
32
|
if (!el.classList.contains('windmill-app')) {
|
|
35
33
|
el.classList.add('windmill-app')
|
|
36
34
|
}
|
|
35
|
+
targetEl.appendChild(el)
|
|
36
|
+
el.hidden = false
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function destroy() {
|
|
@@ -2,7 +2,8 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import type { Writable } from 'svelte/store';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
|
|
5
|
+
context: Writable<Record<string, any>>;
|
|
6
|
+
id: string;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
8
9
|
[evt: string]: CustomEvent<any>;
|