windmill-components 1.430.5 → 1.433.0
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/components/AppConnectInner.svelte +27 -2
- package/package/components/ConfirmButton.svelte +31 -0
- package/package/components/ConfirmButton.svelte.d.ts +20 -0
- package/package/components/DiffEditor.svelte +0 -6
- package/package/components/FlowStatusViewerInner.svelte +8 -4
- package/package/components/InstanceSettings.svelte +20 -1
- package/package/components/Login.svelte +31 -6
- package/package/components/ServiceLogsInner.svelte +365 -337
- package/package/components/apps/components/buttons/AppSchemaForm.svelte +1 -1
- package/package/components/apps/components/display/AppNavbarItem.svelte +1 -1
- package/package/components/apps/components/helpers/RunnableComponent.svelte +2 -2
- package/package/components/apps/components/inputs/AppS3FileInput.svelte +1 -1
- package/package/components/apps/editor/AppEditor.svelte +18 -8
- package/package/components/apps/editor/AppEditor.svelte.d.ts +5 -0
- package/package/components/apps/editor/AppEditorHeader.svelte +58 -58
- package/package/components/apps/editor/AppEditorHeader.svelte.d.ts +2 -0
- package/package/components/apps/editor/AppPreview.svelte +6 -1
- package/package/components/apps/editor/AppReportsDrawer.svelte +3 -613
- package/package/components/apps/editor/AppReportsDrawerInner.svelte +622 -0
- package/package/components/apps/editor/AppReportsDrawerInner.svelte.d.ts +17 -0
- package/package/components/apps/editor/component/components.d.ts +79 -79
- package/package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +1 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +1 -1
- package/package/components/apps/editor/settingsPanel/GridNavbar.svelte +1 -1
- package/package/components/apps/types.d.ts +1 -1
- package/package/components/splitPanes/SplitPanesOrColumnOnMobile.svelte +34 -0
- package/package/components/splitPanes/SplitPanesOrColumnOnMobile.svelte.d.ts +23 -0
- package/package/components/wizards/AppPicker.svelte +4 -4
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +2 -2
- package/package/gen/schemas.gen.js +2 -2
- package/package/gen/services.gen.d.ts +0 -1
- package/package/gen/services.gen.js +0 -2
- package/package/gen/types.gen.d.ts +2 -4
- package/package.json +5 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import IconedResourceType from './IconedResourceType.svelte';
|
|
3
3
|
import { OauthService, ResourceService, VariableService } from '../gen';
|
|
4
4
|
import { emptyString, truncateRev, urlize } from '../utils';
|
|
5
|
-
import { createEventDispatcher } from 'svelte';
|
|
5
|
+
import { createEventDispatcher, onDestroy } from 'svelte';
|
|
6
6
|
import Path from './Path.svelte';
|
|
7
7
|
import { Button, Skeleton } from './common';
|
|
8
8
|
import ApiConnectForm from './ApiConnectForm.svelte';
|
|
@@ -139,8 +139,32 @@ function popupListener(event) {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
window.removeEventListener('message', popupListener);
|
|
142
|
+
processPopupData(data);
|
|
143
|
+
}
|
|
144
|
+
function handleStorageEvent(event) {
|
|
145
|
+
if (event.key === 'oauth-callback') {
|
|
146
|
+
try {
|
|
147
|
+
processPopupData(JSON.parse(event.newValue));
|
|
148
|
+
console.log('OAuth from storage', event.newValue);
|
|
149
|
+
// Clean up
|
|
150
|
+
localStorage.removeItem('oauth-callback');
|
|
151
|
+
window.removeEventListener('storage', handleStorageEvent);
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
console.error('Error processing oauth-callback', e);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
console.log('Storage event', event.key);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
onDestroy(() => {
|
|
162
|
+
window.removeEventListener('message', popupListener);
|
|
163
|
+
window.removeEventListener('storage', handleStorageEvent);
|
|
164
|
+
});
|
|
165
|
+
function processPopupData(data) {
|
|
142
166
|
if (data.type === 'error') {
|
|
143
|
-
sendUserToast(
|
|
167
|
+
sendUserToast(data.error, true);
|
|
144
168
|
step = 2;
|
|
145
169
|
}
|
|
146
170
|
else if (data.type === 'success') {
|
|
@@ -192,6 +216,7 @@ export async function next() {
|
|
|
192
216
|
// window.location.href = url.toString()
|
|
193
217
|
// } else {
|
|
194
218
|
window.addEventListener('message', popupListener);
|
|
219
|
+
window.addEventListener('storage', handleStorageEvent);
|
|
195
220
|
window.open(url.toString(), '_blank', 'popup=true');
|
|
196
221
|
step += 1;
|
|
197
222
|
// dispatch('close')
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script>import { Button } from './common';
|
|
2
|
+
import { Check, X } from 'lucide-svelte';
|
|
3
|
+
import { createEventDispatcher } from 'svelte';
|
|
4
|
+
export let confirmation = 'Are you sure?';
|
|
5
|
+
let firstClick = false;
|
|
6
|
+
const dispatch = createEventDispatcher();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="p-2 flex flex-row w-full gap-2">
|
|
10
|
+
{#if !firstClick}
|
|
11
|
+
<Button
|
|
12
|
+
on:click={() => {
|
|
13
|
+
firstClick = true
|
|
14
|
+
}}><slot /></Button
|
|
15
|
+
>
|
|
16
|
+
{:else}
|
|
17
|
+
{confirmation}
|
|
18
|
+
<Button
|
|
19
|
+
color="red"
|
|
20
|
+
on:click={() => {
|
|
21
|
+
firstClick = false
|
|
22
|
+
dispatch('click')
|
|
23
|
+
}}><Check /></Button
|
|
24
|
+
>
|
|
25
|
+
<Button
|
|
26
|
+
on:click={() => {
|
|
27
|
+
firstClick = false
|
|
28
|
+
}}><X /></Button
|
|
29
|
+
>
|
|
30
|
+
{/if}
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
confirmation?: string | undefined;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
click: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type ConfirmButtonProps = typeof __propDef.props;
|
|
16
|
+
export type ConfirmButtonEvents = typeof __propDef.events;
|
|
17
|
+
export type ConfirmButtonSlots = typeof __propDef.slots;
|
|
18
|
+
export default class ConfirmButton extends SvelteComponent<ConfirmButtonProps, ConfirmButtonEvents, ConfirmButtonSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -42,12 +42,8 @@ async function loadDiffEditor() {
|
|
|
42
42
|
if (defaultOriginal !== undefined &&
|
|
43
43
|
defaultModified !== undefined &&
|
|
44
44
|
defaultLang !== undefined) {
|
|
45
|
-
console.log('SETUP');
|
|
46
45
|
setupModel(defaultLang, defaultOriginal, defaultModified, defaultModifiedLang);
|
|
47
46
|
}
|
|
48
|
-
else {
|
|
49
|
-
console.log('NO SETUP', defaultOriginal, defaultModified, defaultLang);
|
|
50
|
-
}
|
|
51
47
|
}
|
|
52
48
|
export function setupModel(lang, original, modified, modifiedLang) {
|
|
53
49
|
diffEditor?.setModel({
|
|
@@ -62,7 +58,6 @@ export function setupModel(lang, original, modified, modifiedLang) {
|
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
export function setOriginal(code) {
|
|
65
|
-
console.log('setOriginal', code);
|
|
66
61
|
diffEditor?.getModel()?.original?.setValue(code);
|
|
67
62
|
defaultOriginal = code;
|
|
68
63
|
}
|
|
@@ -77,7 +72,6 @@ export function getModified() {
|
|
|
77
72
|
return diffEditor?.getModel()?.modified.getValue() ?? '';
|
|
78
73
|
}
|
|
79
74
|
export function show() {
|
|
80
|
-
console.log('show');
|
|
81
75
|
open = true;
|
|
82
76
|
}
|
|
83
77
|
export function hide() {
|
|
@@ -114,6 +114,7 @@ async function refresh(clearLoop, rootJob) {
|
|
|
114
114
|
return x;
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
+
console.log(rootJob);
|
|
117
118
|
if (subflowParentsGlobalModuleStates.length > 0) {
|
|
118
119
|
subflowParentsGlobalModuleStates?.[subflowParentsGlobalModuleStates?.length - 1]?.update((x) => {
|
|
119
120
|
for (let mod of innerModules ?? []) {
|
|
@@ -146,10 +147,10 @@ async function refresh(clearLoop, rootJob) {
|
|
|
146
147
|
}
|
|
147
148
|
for (let [k, rec] of Object.entries(recursiveRefresh)) {
|
|
148
149
|
if (rootJob != undefined && rootJob != k) {
|
|
149
|
-
|
|
150
|
+
continue;
|
|
150
151
|
}
|
|
151
152
|
await tick();
|
|
152
|
-
await rec(clearLoop,
|
|
153
|
+
await rec(clearLoop, undefined);
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
function updateRecursiveRefresh(jobId) {
|
|
@@ -564,9 +565,12 @@ function innerJobLoaded(jobLoaded, j, clicked, force) {
|
|
|
564
565
|
duration_ms: jobLoaded.duration_ms
|
|
565
566
|
});
|
|
566
567
|
}
|
|
567
|
-
if (jobLoaded.job_kind == 'script' ||
|
|
568
|
+
if (jobLoaded.job_kind == 'script' ||
|
|
569
|
+
jobLoaded.job_kind == 'flowscript' ||
|
|
570
|
+
jobLoaded.job_kind == 'preview') {
|
|
568
571
|
let id = undefined;
|
|
569
|
-
if ((innerModule?.type == 'forloopflow' || innerModule?.type == 'whileloopflow') &&
|
|
572
|
+
if ((innerModule?.type == 'forloopflow' || innerModule?.type == 'whileloopflow') &&
|
|
573
|
+
innerModule.modules.length == 1) {
|
|
570
574
|
id = innerModule?.modules?.[0]?.id;
|
|
571
575
|
}
|
|
572
576
|
if (id) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { settings, settingsKeys } from './instanceSettings';
|
|
2
2
|
import { Button, Skeleton, Tab, TabContent, Tabs } from './common';
|
|
3
|
-
import { SettingService, SettingsService } from '../gen';
|
|
3
|
+
import { IndexSearchService, SettingService, SettingsService } from '../gen';
|
|
4
4
|
import Toggle from './Toggle.svelte';
|
|
5
5
|
import SecondsInput from './common/seconds/SecondsInput.svelte';
|
|
6
6
|
import Tooltip from './Tooltip.svelte';
|
|
@@ -28,6 +28,7 @@ import Popover from './Popover.svelte';
|
|
|
28
28
|
import { base } from '../base';
|
|
29
29
|
import { createEventDispatcher } from 'svelte';
|
|
30
30
|
import { setLicense } from '../enterpriseUtils';
|
|
31
|
+
import ConfirmButton from './ConfirmButton.svelte';
|
|
31
32
|
export let tab = 'Core';
|
|
32
33
|
export let hideTabs = false;
|
|
33
34
|
export let hideSave = false;
|
|
@@ -1066,6 +1067,24 @@ function setupSnowflakeUrls() {
|
|
|
1066
1067
|
bind:value={values[setting.key].refresh_log_index_period}
|
|
1067
1068
|
/>
|
|
1068
1069
|
</div>
|
|
1070
|
+
<h3>Reset Index</h3>
|
|
1071
|
+
This buttons will clear the whole index, and the service will start reindexing from scratch. Full text search might be down during this time.
|
|
1072
|
+
<div>
|
|
1073
|
+
<ConfirmButton
|
|
1074
|
+
on:click={async () => {
|
|
1075
|
+
let r = await IndexSearchService.clearIndex({idxName: "JobIndex"})
|
|
1076
|
+
console.log("asasd")
|
|
1077
|
+
sendUserToast(r)
|
|
1078
|
+
}}>Clear <b>Jobs</b> Index</ConfirmButton
|
|
1079
|
+
>
|
|
1080
|
+
<ConfirmButton
|
|
1081
|
+
on:click={async () => {
|
|
1082
|
+
let r = await IndexSearchService.clearIndex({idxName: "ServiceLogIndex"})
|
|
1083
|
+
console.log("asasd")
|
|
1084
|
+
sendUserToast(r)
|
|
1085
|
+
}}>Clear <b>Service Logs</b> Index</ConfirmButton
|
|
1086
|
+
>
|
|
1087
|
+
</div>
|
|
1069
1088
|
{/if}
|
|
1070
1089
|
</div>
|
|
1071
1090
|
{:else if setting.fieldType == 'smtp_connect'}
|
|
@@ -13,7 +13,7 @@ import { Button, Skeleton } from './common';
|
|
|
13
13
|
import { sendUserToast } from '../toast';
|
|
14
14
|
import { isCloudHosted } from '../cloud';
|
|
15
15
|
import { refreshSuperadmin } from '../refreshUser';
|
|
16
|
-
import { createEventDispatcher, onMount } from 'svelte';
|
|
16
|
+
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
|
17
17
|
export let rd = undefined;
|
|
18
18
|
export let email = undefined;
|
|
19
19
|
export let password = undefined;
|
|
@@ -134,7 +134,7 @@ async function redirectUser() {
|
|
|
134
134
|
}
|
|
135
135
|
async function loadLogins() {
|
|
136
136
|
const allLogins = await OauthService.listOauthLogins();
|
|
137
|
-
logins = allLogins.oauth.map(login => ({
|
|
137
|
+
logins = allLogins.oauth.map((login) => ({
|
|
138
138
|
type: login.type,
|
|
139
139
|
displayName: login.display_name || login.type
|
|
140
140
|
}));
|
|
@@ -163,14 +163,38 @@ function popupListener(event) {
|
|
|
163
163
|
if (event.origin !== window.location.origin) {
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
+
processPopupData(data);
|
|
167
|
+
window.removeEventListener('message', popupListener);
|
|
168
|
+
}
|
|
169
|
+
function processPopupData(data) {
|
|
166
170
|
if (data.type === 'error') {
|
|
167
|
-
sendUserToast(
|
|
171
|
+
sendUserToast(data.error, true);
|
|
168
172
|
}
|
|
169
173
|
else if (data.type === 'success') {
|
|
170
|
-
window.removeEventListener('message', popupListener);
|
|
171
174
|
dispatch('login');
|
|
172
175
|
}
|
|
173
176
|
}
|
|
177
|
+
function handleStorageEvent(event) {
|
|
178
|
+
if (event.key === 'oauth-success') {
|
|
179
|
+
try {
|
|
180
|
+
processPopupData(JSON.parse(event.newValue));
|
|
181
|
+
console.log('oauth-success from storage');
|
|
182
|
+
// Clean up
|
|
183
|
+
localStorage.removeItem('oauth-success');
|
|
184
|
+
window.removeEventListener('storage', handleStorageEvent);
|
|
185
|
+
}
|
|
186
|
+
catch (e) {
|
|
187
|
+
console.error('Could not process oauth-success from storage', e);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
console.log('Storage event', event.key);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
onDestroy(() => {
|
|
195
|
+
window.removeEventListener('message', popupListener);
|
|
196
|
+
window.removeEventListener('storage', handleStorageEvent);
|
|
197
|
+
});
|
|
174
198
|
function storeRedirect(provider) {
|
|
175
199
|
if (rd) {
|
|
176
200
|
try {
|
|
@@ -184,6 +208,7 @@ function storeRedirect(provider) {
|
|
|
184
208
|
if (popup) {
|
|
185
209
|
localStorage.setItem('closeUponLogin', 'true');
|
|
186
210
|
window.addEventListener('message', popupListener);
|
|
211
|
+
window.addEventListener('storage', handleStorageEvent);
|
|
187
212
|
window.open(url, '_blank', 'popup');
|
|
188
213
|
}
|
|
189
214
|
else {
|
|
@@ -202,14 +227,14 @@ $: error && sendUserToast(error, true);
|
|
|
202
227
|
{/each}
|
|
203
228
|
{:else}
|
|
204
229
|
{#each providers as { type, icon }}
|
|
205
|
-
{#if logins?.some(login => login.type === type)}
|
|
230
|
+
{#if logins?.some((login) => login.type === type)}
|
|
206
231
|
<Button
|
|
207
232
|
color="light"
|
|
208
233
|
variant="border"
|
|
209
234
|
startIcon={{ icon, classes: 'h-4' }}
|
|
210
235
|
on:click={() => storeRedirect(type)}
|
|
211
236
|
>
|
|
212
|
-
{logins.find(login => login.type === type)?.displayName}
|
|
237
|
+
{logins.find((login) => login.type === type)?.displayName}
|
|
213
238
|
</Button>
|
|
214
239
|
{/if}
|
|
215
240
|
{/each}
|