windmill-components 1.665.1 → 1.677.1
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/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +2 -0
- package/dist/sharedUtils/base.d.ts +1 -0
- package/dist/sharedUtils/cloud.d.ts +1 -0
- package/dist/sharedUtils/common.d.ts +111 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +5 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +13 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +11 -0
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +95 -0
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +6 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +33 -0
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +10 -0
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +5371 -0
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +3 -0
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +7 -0
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +3 -0
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +14 -0
- package/dist/sharedUtils/components/apps/inputType.d.ts +178 -0
- package/dist/sharedUtils/components/apps/rx.d.ts +29 -0
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +21 -0
- package/dist/sharedUtils/components/apps/types.d.ts +274 -0
- package/dist/sharedUtils/components/assets/lib.d.ts +25 -0
- package/dist/sharedUtils/components/common/alert/model.d.ts +2 -0
- package/dist/sharedUtils/components/common/badge/model.d.ts +8 -0
- package/dist/sharedUtils/components/common/button/model.d.ts +45 -0
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +1 -0
- package/dist/sharedUtils/components/common/index.d.ts +24 -0
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +21 -0
- package/dist/sharedUtils/components/dbTypes.d.ts +14 -0
- package/dist/sharedUtils/components/diff_drawer.d.ts +26 -0
- package/dist/sharedUtils/components/ducklake.d.ts +1 -0
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +7 -0
- package/dist/sharedUtils/components/icons/index.d.ts +101 -0
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +1 -0
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +10 -0
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +15 -0
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +4 -0
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +11 -0
- package/dist/sharedUtils/components/triggers/kafka/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +8 -0
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +32 -0
- package/dist/sharedUtils/components/triggers/utils.d.ts +80 -0
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +2 -0
- package/dist/sharedUtils/components/triggers.d.ts +20 -0
- package/dist/sharedUtils/gen/core/ApiError.d.ts +10 -0
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +13 -0
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +7 -0
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +26 -0
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +27 -0
- package/dist/sharedUtils/gen/core/request.d.ts +29 -0
- package/dist/sharedUtils/gen/index.d.ts +6 -0
- package/dist/sharedUtils/gen/schemas.gen.d.ts +7036 -0
- package/dist/sharedUtils/gen/services.gen.d.ts +6047 -0
- package/dist/sharedUtils/gen/types.gen.d.ts +21881 -0
- package/dist/sharedUtils/history.svelte.d.ts +9 -0
- package/dist/sharedUtils/hub.d.ts +49 -0
- package/dist/sharedUtils/jsr.json +6 -0
- package/dist/sharedUtils/lib.d.ts +5 -0
- package/dist/sharedUtils/lib.es.js +1588 -0
- package/dist/sharedUtils/package.json +12 -0
- package/dist/sharedUtils/schema.d.ts +3 -0
- package/dist/sharedUtils/stores.d.ts +97 -0
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +80 -0
- package/dist/sharedUtils/toast.d.ts +8 -0
- package/dist/sharedUtils/utils.d.ts +265 -0
- package/package/components/AddUser.svelte +67 -34
- package/package/components/AppConnectInner.svelte +9 -1
- package/package/components/ArgInfo.svelte +9 -1
- package/package/components/ArgInput.svelte +21 -1
- package/package/components/CompareWorkspaces.svelte +11 -2
- package/package/components/DedicatedWorkersSelector.svelte +262 -247
- package/package/components/DefaultTagsInner.svelte +40 -2
- package/package/components/DeployWorkspace.svelte +13 -0
- package/package/components/DiffEditor.svelte +44 -1
- package/package/components/EditableSchemaForm.svelte +5 -2
- package/package/components/EditableSchemaForm.svelte.d.ts +1 -0
- package/package/components/Editor.svelte +5 -1
- package/package/components/EditorBar.svelte +12 -3
- package/package/components/FilterSearchbar.svelte +26 -2
- package/package/components/FlowBuilder.svelte +6 -3
- package/package/components/FlowGraphDiffViewer.svelte +16 -17
- package/package/components/FlowGraphViewer.svelte +20 -6
- package/package/components/FlowGraphViewer.svelte.d.ts +2 -0
- package/package/components/FlowGraphViewerStep.svelte +14 -32
- package/package/components/FlowMetadata.svelte +4 -1
- package/package/components/FlowPreviewContent.svelte +2 -0
- package/package/components/FlowStatusWaitingForEvents.svelte +25 -4
- package/package/components/HighlightCode.svelte +3 -0
- package/package/components/InstanceSetting.svelte +9 -25
- package/package/components/InstanceSettings.svelte +16 -0
- package/package/components/LabelsInput.svelte +149 -0
- package/package/components/LabelsInput.svelte.d.ts +8 -0
- package/package/components/Login.svelte +6 -1
- package/package/components/ObjectStoreConfigSettings.svelte +273 -1
- package/package/components/OktaSetting.svelte +6 -5
- package/package/components/Password.svelte +74 -20
- package/package/components/Password.svelte.d.ts +1 -0
- package/package/components/PasswordArgInput.svelte +2 -2
- package/package/components/PasswordArgInput.svelte.d.ts +1 -0
- package/package/components/Path.svelte +8 -10
- package/package/components/PathNameAutocomplete.svelte +308 -0
- package/package/components/PathNameAutocomplete.svelte.d.ts +27 -0
- package/package/components/PowerShellCommonParams.svelte +84 -0
- package/package/components/PowerShellCommonParams.svelte.d.ts +6 -0
- package/package/components/Range.svelte +8 -3
- package/package/components/ResourceEditor.svelte +6 -2
- package/package/components/RunForm.svelte +71 -7
- package/package/components/RunForm.svelte.d.ts +2 -1
- package/package/components/ScriptBuilder.svelte +7 -3
- package/package/components/ScriptEditor.svelte +221 -187
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/ScriptSchema.svelte +1 -1
- package/package/components/StringTypeNarrowing.svelte +1 -1
- package/package/components/StringTypeNarrowing.svelte.d.ts +1 -1
- package/package/components/SummaryPathDisplay.svelte +32 -10
- package/package/components/SummaryPathDisplay.svelte.d.ts +2 -1
- package/package/components/VariableEditor.svelte +9 -2
- package/package/components/WorkerGroup.svelte +47 -2
- package/package/components/apps/editor/DeploymentHistory.svelte +112 -13
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +135 -35
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte.d.ts +3 -1
- package/package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +11 -35
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.d.ts +10 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.js +14 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.test.d.ts +1 -0
- package/package/components/apps/editor/settingsPanel/mainInput/runnableSelectorUtils.test.js +34 -0
- package/package/components/assets/AssetButtons.svelte +21 -25
- package/package/components/assets/AssetsUsageDrawer.svelte +7 -9
- package/package/components/common/fileUpload/FileUpload.svelte +6 -2
- package/package/components/common/languageIcons/LanguageIcon.svelte +3 -0
- package/package/components/common/table/AppRow.svelte +18 -0
- package/package/components/common/table/FlowRow.svelte +18 -0
- package/package/components/common/table/ScriptRow.svelte +18 -0
- package/package/components/copilot/chat/AIChatManager.svelte.js +3 -3
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.js +3 -3
- package/package/components/custom_ui.d.ts +2 -0
- package/package/components/details/DetailPageHeader.svelte +2 -2
- package/package/components/details/DetailPageHeader.svelte.d.ts +2 -1
- package/package/components/flows/agentToolUtils.d.ts +5 -0
- package/package/components/flows/agentToolUtils.js +49 -0
- package/package/components/flows/agentToolUtils.test.d.ts +1 -0
- package/package/components/flows/agentToolUtils.test.js +55 -0
- package/package/components/flows/content/FlowInput.svelte +2 -0
- package/package/components/flows/content/FlowInputsQuick.svelte +1 -1
- package/package/components/flows/content/FlowLoop.svelte +5 -12
- package/package/components/flows/content/FlowModuleScript.svelte +5 -3
- package/package/components/flows/content/FlowPathViewer.svelte +2 -2
- package/package/components/flows/content/FlowPathViewer.svelte.d.ts +1 -0
- package/package/components/flows/content/FlowSettings.svelte +2 -0
- package/package/components/flows/content/FlowWhileLoop.svelte +5 -12
- package/package/components/flows/flowInfers.js +8 -3
- package/package/components/flows/flowStore.svelte.d.ts +1 -1
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +49 -9
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +5 -3
- package/package/components/flows/scheduleUtils.js +2 -1
- package/package/components/graph/FlowGraphV2.svelte +13 -1
- package/package/components/graph/WacDiagram.svelte +96 -0
- package/package/components/graph/WacDiagram.svelte.d.ts +7 -0
- package/package/components/graph/noteEditor.svelte.d.ts +1 -1
- package/package/components/graph/noteEditor.svelte.js +12 -1
- package/package/components/graph/noteUtils.svelte.d.ts +1 -1
- package/package/components/graph/noteUtils.svelte.js +9 -2
- package/package/components/graph/renderers/edges/WacEdge.svelte +41 -0
- package/package/components/graph/renderers/edges/WacEdge.svelte.d.ts +4 -0
- package/package/components/graph/renderers/nodes/WacControlNode.svelte +51 -0
- package/package/components/graph/renderers/nodes/WacControlNode.svelte.d.ts +9 -0
- package/package/components/graph/renderers/nodes/WacStepNode.svelte +35 -0
- package/package/components/graph/renderers/nodes/WacStepNode.svelte.d.ts +9 -0
- package/package/components/graph/wacDagLayout.d.ts +10 -0
- package/package/components/graph/wacDagLayout.js +120 -0
- package/package/components/graph/wacToFlow.js +1 -1
- package/package/components/home/ItemsList.svelte +28 -4
- package/package/components/icons/RIcon.svelte +32 -0
- package/package/components/icons/RIcon.svelte.d.ts +7 -0
- package/package/components/instanceSettings/DbHealth.svelte +723 -0
- package/package/components/instanceSettings/DbHealth.svelte.d.ts +3 -0
- package/package/components/instanceSettings/SecretBackendConfig.svelte +343 -304
- package/package/components/instanceSettings/SmtpSettings.svelte +8 -0
- package/package/components/instanceSettings.js +14 -5
- package/package/components/mcp/McpScopeSelector.svelte +82 -16
- package/package/components/moveRenameManager.d.ts +1 -0
- package/package/components/moveRenameManager.js +7 -4
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +14 -1
- package/package/components/raw_apps/rawAppPolicy.js +3 -2
- package/package/components/raw_apps/utils.test.d.ts +1 -0
- package/package/components/raw_apps/utils.test.js +38 -0
- package/package/components/resources/resourcesFilter.d.ts +15 -2
- package/package/components/resources/resourcesFilter.js +11 -2
- package/package/components/runs/JobDetailFieldConfig.js +5 -3
- package/package/components/runs/JobDetailHeader.svelte +5 -2
- package/package/components/runs/JobRunsPreview.svelte +1 -0
- package/package/components/runs/RunBadges.svelte +7 -4
- package/package/components/runs/RunRow.svelte +7 -7
- package/package/components/schedules/schedulesFilter.d.ts +15 -2
- package/package/components/schedules/schedulesFilter.js +11 -2
- package/package/components/schema/EditableSchemaWrapper.svelte +6 -8
- package/package/components/schema/PropertyEditor.svelte +22 -1
- package/package/components/schema/PropertyEditor.svelte.d.ts +1 -0
- package/package/components/schema/editable_schema_wrapper.d.ts +1 -0
- package/package/components/secretArgUtils.d.ts +7 -0
- package/package/components/secretArgUtils.js +45 -0
- package/package/components/settings/WorkspaceUserSettings.svelte +359 -286
- package/package/components/sidebar/OperatorMenu.svelte +215 -197
- package/package/components/triggers/CaptureWrapper.svelte +1 -1
- package/package/components/triggers/TriggerFilters.svelte +17 -5
- package/package/components/triggers/TriggerFilters.svelte.d.ts +2 -1
- package/package/components/triggers/kafka/KafkaCapture.svelte +6 -2
- package/package/components/triggers/kafka/KafkaCapture.svelte.d.ts +1 -1
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +5 -1
- package/package/components/triggers/kafka/utils.js +1 -0
- package/package/components/triggers/mqtt/MqttEditorConfigSection.svelte.d.ts +1 -1
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +6 -0
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +87 -1
- package/package/components/triggers/websocket/utils.js +2 -0
- package/package/components/variables/variablesFilter.d.ts +15 -2
- package/package/components/variables/variablesFilter.js +11 -2
- package/package/components/worker_group.js +1 -0
- package/package/components/workspaceSettings/DucklakeSettings.svelte +33 -41
- package/package/consts.d.ts +1 -0
- package/package/consts.js +1 -0
- package/package/editorLangUtils.d.ts +1 -1
- package/package/editorLangUtils.js +2 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +346 -4
- package/package/gen/schemas.gen.js +347 -5
- package/package/gen/services.gen.d.ts +163 -1
- package/package/gen/services.gen.js +323 -17
- package/package/gen/types.gen.d.ts +671 -5
- package/package/hubPaths.json +6 -3
- package/package/infer.d.ts +55 -0
- package/package/infer.js +131 -0
- package/package/infer.svelte.js +2 -0
- package/package/mcpEndpointTools.js +213 -22
- package/package/script_helpers.d.ts +3 -0
- package/package/script_helpers.js +26 -0
- package/package/scripts.d.ts +2 -1
- package/package/scripts.js +15 -3
- package/package/stores.d.ts +2 -0
- package/package/system_prompts/prompts.d.ts +6 -5
- package/package/system_prompts/prompts.js +188 -29
- package/package/user.js +5 -1
- package/package/utils.js +21 -0
- package/package/utils_deployable.d.ts +11 -0
- package/package/utils_workspace_deploy.js +36 -8
- package/package.json +5 -4
|
@@ -133,6 +133,14 @@ async function testSmtpSettings() {
|
|
|
133
133
|
}}
|
|
134
134
|
options={{ right: 'Disable TLS' }}
|
|
135
135
|
/>
|
|
136
|
+
|
|
137
|
+
<Toggle
|
|
138
|
+
id="smtp_clicktracking_off"
|
|
139
|
+
{disabled}
|
|
140
|
+
bind:checked={$values['smtp_settings'].smtp_clicktracking_off}
|
|
141
|
+
size="xs"
|
|
142
|
+
options={{ right: 'Disable click tracking on links' }}
|
|
143
|
+
/>
|
|
136
144
|
</div>
|
|
137
145
|
|
|
138
146
|
<!-- Test Email -->
|
|
@@ -213,7 +213,7 @@ export const settings = {
|
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
label: 'Delete logs from s3 periodically',
|
|
216
|
-
description: 'Job and service logs are periodically deleted from disk. When this setting is on, they
|
|
216
|
+
description: 'Job and service logs are periodically deleted from disk when they expire. When this setting is on, they are also deleted from object storage. Defaults to on when object storage is configured; turn off to keep logs in object storage indefinitely.',
|
|
217
217
|
key: 'monitor_logs_on_s3',
|
|
218
218
|
fieldType: 'boolean',
|
|
219
219
|
storage: 'setting',
|
|
@@ -291,6 +291,7 @@ export const settings = {
|
|
|
291
291
|
}
|
|
292
292
|
],
|
|
293
293
|
'Auth/OAuth/SAML': [],
|
|
294
|
+
'DB Health': [],
|
|
294
295
|
Registries: [
|
|
295
296
|
{
|
|
296
297
|
label: 'Instance Python Version',
|
|
@@ -583,11 +584,11 @@ export const settings = {
|
|
|
583
584
|
'Secret Storage': [
|
|
584
585
|
{
|
|
585
586
|
label: 'Backend type',
|
|
586
|
-
description: 'By default, secrets are encrypted and stored in the database. Enterprise Edition supports HashiCorp Vault as
|
|
587
|
+
description: 'By default, secrets are encrypted and stored in the database. Enterprise Edition supports HashiCorp Vault, Azure Key Vault, and AWS Secrets Manager as external secret backends.',
|
|
587
588
|
key: 'secret_backend',
|
|
588
589
|
fieldType: 'secret_backend',
|
|
589
590
|
storage: 'setting',
|
|
590
|
-
ee_only: 'HashiCorp Vault
|
|
591
|
+
ee_only: 'HashiCorp Vault, Azure Key Vault, and AWS Secrets Manager integrations are Enterprise Edition features'
|
|
591
592
|
}
|
|
592
593
|
],
|
|
593
594
|
'GitHub App': [
|
|
@@ -725,6 +726,12 @@ export const instanceSettingsNavigationGroups = [
|
|
|
725
726
|
aiId: 'instance-settings-indexer',
|
|
726
727
|
aiDescription: 'Instance indexer settings',
|
|
727
728
|
isEE: true
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
id: 'db_health',
|
|
732
|
+
label: 'DB Health',
|
|
733
|
+
aiId: 'instance-settings-db-health',
|
|
734
|
+
aiDescription: 'Database health diagnostics and performance insights'
|
|
728
735
|
}
|
|
729
736
|
]
|
|
730
737
|
},
|
|
@@ -795,7 +802,8 @@ export const tabToCategoryMap = {
|
|
|
795
802
|
jobs: 'Jobs',
|
|
796
803
|
private_hub: 'Private Hub',
|
|
797
804
|
github_enterprise_app: 'GitHub App',
|
|
798
|
-
websocket: 'WebSocket'
|
|
805
|
+
websocket: 'WebSocket',
|
|
806
|
+
db_health: 'DB Health'
|
|
799
807
|
};
|
|
800
808
|
export const tabToAuthSubTab = {
|
|
801
809
|
sso: 'sso',
|
|
@@ -825,7 +833,8 @@ export const categoryToTabMap = {
|
|
|
825
833
|
Jobs: 'jobs',
|
|
826
834
|
'Private Hub': 'private_hub',
|
|
827
835
|
'GitHub App': 'github_enterprise_app',
|
|
828
|
-
WebSocket: 'websocket'
|
|
836
|
+
WebSocket: 'websocket',
|
|
837
|
+
'DB Health': 'db_health'
|
|
829
838
|
};
|
|
830
839
|
/**
|
|
831
840
|
* Extract the label portion from a uFuzzy marked/highlighted string.
|
|
@@ -4,15 +4,17 @@ import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelt
|
|
|
4
4
|
import Popover from '../Popover.svelte';
|
|
5
5
|
import MultiSelect from '../select/MultiSelect.svelte';
|
|
6
6
|
import { safeSelectItems } from '../select/utils.svelte';
|
|
7
|
-
import FolderPicker from '../FolderPicker.svelte';
|
|
8
7
|
import TextInput from '../text_input/TextInput.svelte';
|
|
9
|
-
import { FlowService, IntegrationService, ScriptService } from '../../gen';
|
|
8
|
+
import { FlowService, FolderService, IntegrationService, ScriptService } from '../../gen';
|
|
10
9
|
import { mcpEndpointTools } from '../../mcpEndpointTools';
|
|
11
10
|
import InfoIcon from 'lucide-svelte/icons/info';
|
|
12
11
|
import { SvelteMap } from 'svelte/reactivity';
|
|
13
12
|
let { workspaceId, scope = $bindable() } = $props();
|
|
14
13
|
let selectedMode = $state('favorites');
|
|
15
|
-
let
|
|
14
|
+
let selectedFolders = $state([]);
|
|
15
|
+
let allFolders = $state([]);
|
|
16
|
+
let loadingFolders = $state(false);
|
|
17
|
+
let folderNamesCache = new Map();
|
|
16
18
|
let selectedScripts = $state([]);
|
|
17
19
|
let selectedFlows = $state([]);
|
|
18
20
|
let selectedEndpoints = $state([]);
|
|
@@ -56,8 +58,10 @@ $effect(() => {
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
else if (selectedMode === 'folder') {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
+
const folderPaths = selectedFolders.map((f) => `f/${f}/*`).join(',');
|
|
62
|
+
if (selectedFolders.length > 0) {
|
|
63
|
+
scopeParts = [`mcp:scripts:${folderPaths}`, `mcp:flows:${folderPaths}`, `mcp:endpoints:*`];
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
else {
|
|
63
67
|
scopeParts = [`mcp:${selectedMode}`];
|
|
@@ -74,12 +78,34 @@ $effect(() => {
|
|
|
74
78
|
customFlowPatterns = '';
|
|
75
79
|
}
|
|
76
80
|
});
|
|
77
|
-
// Clear
|
|
81
|
+
// Clear folders when not in folder mode, load folder names when entering folder mode
|
|
78
82
|
$effect(() => {
|
|
79
|
-
if (selectedMode
|
|
80
|
-
|
|
83
|
+
if (selectedMode === 'folder' && workspaceId) {
|
|
84
|
+
loadFolderNames(workspaceId);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
selectedFolders = [];
|
|
81
88
|
}
|
|
82
89
|
});
|
|
90
|
+
async function loadFolderNames(workspace) {
|
|
91
|
+
if (folderNamesCache.has(workspace)) {
|
|
92
|
+
allFolders = folderNamesCache.get(workspace);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
try {
|
|
96
|
+
loadingFolders = true;
|
|
97
|
+
const excludedFolders = ['app_groups', 'app_custom', 'app_themes'];
|
|
98
|
+
const names = (await FolderService.listFolderNames({ workspace })).filter((x) => !excludedFolders.includes(x));
|
|
99
|
+
folderNamesCache.set(workspace, names);
|
|
100
|
+
allFolders = names;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
allFolders = [];
|
|
104
|
+
}
|
|
105
|
+
finally {
|
|
106
|
+
loadingFolders = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
83
109
|
// Load hub apps on mount
|
|
84
110
|
async function getAllApps() {
|
|
85
111
|
if (allApps.length > 0)
|
|
@@ -161,10 +187,42 @@ async function loadAllScriptsAndFlows(workspace) {
|
|
|
161
187
|
// Load runnables based on mode
|
|
162
188
|
$effect(() => {
|
|
163
189
|
if (workspaceId) {
|
|
164
|
-
|
|
165
|
-
|
|
190
|
+
if (selectedMode === 'folder') {
|
|
191
|
+
if (selectedFolders.length > 0) {
|
|
192
|
+
loadRunnablesForFolders(workspaceId, selectedFolders);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
includedRunnables = [];
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
getScriptsAndFlows(selectedMode === 'favorites', workspaceId, undefined);
|
|
200
|
+
}
|
|
166
201
|
}
|
|
167
202
|
});
|
|
203
|
+
async function getCachedRunnables(workspace, folder) {
|
|
204
|
+
const cacheKey = `${workspace}-false-${folder}`;
|
|
205
|
+
if (runnablesCache.has(cacheKey)) {
|
|
206
|
+
return runnablesCache.get(cacheKey) || [];
|
|
207
|
+
}
|
|
208
|
+
const [scripts, flows] = await Promise.all([
|
|
209
|
+
getScripts(false, workspace, folder),
|
|
210
|
+
getFlows(false, workspace, folder)
|
|
211
|
+
]);
|
|
212
|
+
const combined = [...scripts, ...flows];
|
|
213
|
+
runnablesCache.set(cacheKey, combined);
|
|
214
|
+
return combined;
|
|
215
|
+
}
|
|
216
|
+
async function loadRunnablesForFolders(workspace, folders) {
|
|
217
|
+
try {
|
|
218
|
+
loadingRunnables = true;
|
|
219
|
+
const results = await Promise.all(folders.map((f) => getCachedRunnables(workspace, f)));
|
|
220
|
+
includedRunnables = [...new Set(results.flat())];
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
loadingRunnables = false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
168
226
|
// Load all scripts/flows for custom mode
|
|
169
227
|
$effect(() => {
|
|
170
228
|
if (selectedMode === 'custom' && workspaceId) {
|
|
@@ -175,7 +233,7 @@ const warning = $derived(selectedMode === 'all'
|
|
|
175
233
|
? 'Create your first scripts or flows to make them available via MCP.'
|
|
176
234
|
: selectedMode === 'favorites'
|
|
177
235
|
? `You do not have any favorite scripts or flows. You can favorite some scripts and flows to include them, or change the scope to "All scripts/flows" to include all your scripts and flows.`
|
|
178
|
-
: `You do not have any scripts or flows in the selected folder.`);
|
|
236
|
+
: `You do not have any scripts or flows in the selected folder(s).`);
|
|
179
237
|
function selectAllScripts() {
|
|
180
238
|
selectedScripts = [...allScripts];
|
|
181
239
|
}
|
|
@@ -216,8 +274,8 @@ function clearAllEndpoints() {
|
|
|
216
274
|
<ToggleButton
|
|
217
275
|
{item}
|
|
218
276
|
value="folder"
|
|
219
|
-
label="
|
|
220
|
-
tooltip="Make all scripts and flows in the selected
|
|
277
|
+
label="Folders"
|
|
278
|
+
tooltip="Make all scripts and flows in the selected folders available as tools"
|
|
221
279
|
/>
|
|
222
280
|
<ToggleButton
|
|
223
281
|
{item}
|
|
@@ -231,8 +289,16 @@ function clearAllEndpoints() {
|
|
|
231
289
|
|
|
232
290
|
{#if selectedMode === 'folder'}
|
|
233
291
|
<div>
|
|
234
|
-
<span class="block mb-1 text-emphasis text-xs font-semibold">Select
|
|
235
|
-
|
|
292
|
+
<span class="block mb-1 text-emphasis text-xs font-semibold">Select Folders</span>
|
|
293
|
+
{#if loadingFolders}
|
|
294
|
+
<div class="text-xs text-primary">Loading folders...</div>
|
|
295
|
+
{:else}
|
|
296
|
+
<MultiSelect
|
|
297
|
+
items={safeSelectItems(allFolders)}
|
|
298
|
+
placeholder="Select folders"
|
|
299
|
+
bind:value={selectedFolders}
|
|
300
|
+
/>
|
|
301
|
+
{/if}
|
|
236
302
|
</div>
|
|
237
303
|
{/if}
|
|
238
304
|
|
|
@@ -353,7 +419,7 @@ function clearAllEndpoints() {
|
|
|
353
419
|
</div>
|
|
354
420
|
</div>
|
|
355
421
|
{/if}
|
|
356
|
-
{:else if selectedMode !== 'folder' ||
|
|
422
|
+
{:else if selectedMode !== 'folder' || selectedFolders.length > 0}
|
|
357
423
|
{#if loadingRunnables}
|
|
358
424
|
<div class="flex flex-col gap-2">
|
|
359
425
|
<span class="block text-xs text-primary"
|
|
@@ -15,7 +15,7 @@ export async function checkFlowOnBehalfOf(workspace, path) {
|
|
|
15
15
|
* reasons — the backend will redeploy the flow on behalf of the current user.
|
|
16
16
|
*/
|
|
17
17
|
export async function updateItemPathAndSummary(opts) {
|
|
18
|
-
const { workspace, kind, initialPath, newPath, newSummary } = opts;
|
|
18
|
+
const { workspace, kind, initialPath, newPath, newSummary, labels } = opts;
|
|
19
19
|
if (kind === 'flow') {
|
|
20
20
|
const flow = await FlowService.getFlowByPath({ workspace, path: initialPath });
|
|
21
21
|
await FlowService.updateFlow({
|
|
@@ -30,7 +30,8 @@ export async function updateItemPathAndSummary(opts) {
|
|
|
30
30
|
tag: flow.tag,
|
|
31
31
|
dedicated_worker: flow.dedicated_worker,
|
|
32
32
|
ws_error_handler_muted: flow.ws_error_handler_muted,
|
|
33
|
-
visible_to_runner_only: flow.visible_to_runner_only
|
|
33
|
+
visible_to_runner_only: flow.visible_to_runner_only,
|
|
34
|
+
labels
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
}
|
|
@@ -44,7 +45,8 @@ export async function updateItemPathAndSummary(opts) {
|
|
|
44
45
|
description: script.description ?? '',
|
|
45
46
|
lock: script.lock,
|
|
46
47
|
parent_hash: script.hash,
|
|
47
|
-
path: newPath
|
|
48
|
+
path: newPath,
|
|
49
|
+
labels
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
}
|
|
@@ -54,7 +56,8 @@ export async function updateItemPathAndSummary(opts) {
|
|
|
54
56
|
path: initialPath,
|
|
55
57
|
requestBody: {
|
|
56
58
|
path: newPath !== initialPath ? newPath : undefined,
|
|
57
|
-
summary: newSummary
|
|
59
|
+
summary: newSummary,
|
|
60
|
+
labels
|
|
58
61
|
}
|
|
59
62
|
});
|
|
60
63
|
}
|
|
@@ -17,6 +17,8 @@ import LogViewer from '../LogViewer.svelte';
|
|
|
17
17
|
import DisplayResult from '../DisplayResult.svelte';
|
|
18
18
|
import RunButton from '../RunButton.svelte';
|
|
19
19
|
import { userStore, workspaceStore } from '../../stores';
|
|
20
|
+
import { isHubFlowPath } from '../../utils';
|
|
21
|
+
import { sendUserToast } from '../../toast';
|
|
20
22
|
let { runnable = $bindable(), id, appPath, onSelectionChange } = $props();
|
|
21
23
|
const dispatch = createEventDispatcher();
|
|
22
24
|
async function fork(nrunnable) {
|
|
@@ -34,6 +36,7 @@ function onPick(o) {
|
|
|
34
36
|
}
|
|
35
37
|
let selectedTab = $state('test');
|
|
36
38
|
let args = $state({});
|
|
39
|
+
let hubFlowPreview = $state(undefined);
|
|
37
40
|
function getSchema(runnable) {
|
|
38
41
|
if (isRunnableByPath(runnable)) {
|
|
39
42
|
return runnable.schema;
|
|
@@ -112,7 +115,16 @@ async function testPreview() {
|
|
|
112
115
|
else if (isRunnableByPath(runnable)) {
|
|
113
116
|
if (jobLoader && isRunnableByPath(runnable)) {
|
|
114
117
|
if (runnable.runType == 'flow') {
|
|
115
|
-
|
|
118
|
+
if (isHubFlowPath(runnable.path)) {
|
|
119
|
+
if (!hubFlowPreview) {
|
|
120
|
+
sendUserToast('Hub flow preview is still loading', true);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
await jobLoader.runFlowPreview(args, hubFlowPreview, undefined, runnable.path);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
await jobLoader.runFlowByPath(runnable.path, args);
|
|
127
|
+
}
|
|
116
128
|
}
|
|
117
129
|
else if (runnable.runType == 'script' || runnable.runType == 'hubscript') {
|
|
118
130
|
await jobLoader.runScriptByPath(runnable.path, args);
|
|
@@ -154,6 +166,7 @@ $effect(() => {
|
|
|
154
166
|
rawApps
|
|
155
167
|
bind:runnable
|
|
156
168
|
bind:fields={runnable.fields}
|
|
169
|
+
bind:hubFlowPreview
|
|
157
170
|
on:fork={(e) => fork(e.detail)}
|
|
158
171
|
on:delete
|
|
159
172
|
{id}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { collectStaticFields, hash } from '../apps/editor/commonAppUtils';
|
|
2
2
|
import { isRunnableByName, isRunnableByPath } from '../apps/inputType';
|
|
3
3
|
export async function updateRawAppPolicy(runnables, currentPolicy) {
|
|
4
|
-
const
|
|
4
|
+
const entries = (await Promise.all(Object.entries(runnables).map(async ([id, runnable]) => {
|
|
5
5
|
return await processRunnable(id, runnable, runnable?.fields ?? {});
|
|
6
|
-
}))));
|
|
6
|
+
}))).filter((entry) => entry != null);
|
|
7
|
+
const triggerables_v2 = Object.fromEntries(entries);
|
|
7
8
|
return {
|
|
8
9
|
...currentPolicy,
|
|
9
10
|
triggerables_v2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { genWmillTs } from './utils';
|
|
3
|
+
const flowSchema = {
|
|
4
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
5
|
+
type: 'object',
|
|
6
|
+
required: ['string_input'],
|
|
7
|
+
properties: {
|
|
8
|
+
string_input: {
|
|
9
|
+
type: 'string',
|
|
10
|
+
default: ''
|
|
11
|
+
},
|
|
12
|
+
count: {
|
|
13
|
+
type: 'integer'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
describe('genWmillTs', () => {
|
|
18
|
+
it('generates the correct flow args type for path runnables', () => {
|
|
19
|
+
const runnables = {
|
|
20
|
+
myflow: {
|
|
21
|
+
type: 'path',
|
|
22
|
+
runType: 'flow',
|
|
23
|
+
path: 'u/dev/my_flow',
|
|
24
|
+
name: 'My flow',
|
|
25
|
+
schema: flowSchema,
|
|
26
|
+
fields: {
|
|
27
|
+
count: {
|
|
28
|
+
type: 'static',
|
|
29
|
+
value: 1,
|
|
30
|
+
fieldType: 'number'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const dts = genWmillTs(runnables);
|
|
36
|
+
expect(dts).toContain('myflow: (args: { string_input: string }) => Promise<any>;');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Boxes, FileCode, FileText, FolderIcon, Braces, Users } from 'lucide-svelte';
|
|
2
|
-
export declare function buildResourcesFilterSchema({ paths, resourceTypes, owners, showUserFoldersFilter, userFoldersLabel }: {
|
|
1
|
+
import { Boxes, FileCode, FileText, FolderIcon, Braces, Users, Tag } from 'lucide-svelte';
|
|
2
|
+
export declare function buildResourcesFilterSchema({ paths, resourceTypes, owners, labels, showUserFoldersFilter, userFoldersLabel }: {
|
|
3
3
|
paths: string[];
|
|
4
4
|
resourceTypes: string[];
|
|
5
5
|
owners: string[];
|
|
6
|
+
labels?: string[];
|
|
6
7
|
showUserFoldersFilter?: boolean;
|
|
7
8
|
userFoldersLabel?: string;
|
|
8
9
|
}): {
|
|
@@ -71,4 +72,16 @@ export declare function buildResourcesFilterSchema({ paths, resourceTypes, owner
|
|
|
71
72
|
icon: typeof Braces;
|
|
72
73
|
description: string;
|
|
73
74
|
};
|
|
75
|
+
label: {
|
|
76
|
+
type: "oneof";
|
|
77
|
+
options: {
|
|
78
|
+
label: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}[];
|
|
81
|
+
allowNegative: false;
|
|
82
|
+
allowMultiple: true;
|
|
83
|
+
label: string;
|
|
84
|
+
icon: typeof Tag;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
74
87
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Boxes, FileCode, FileText, FolderIcon, Braces, Users } from 'lucide-svelte';
|
|
2
|
-
export function buildResourcesFilterSchema({ paths, resourceTypes, owners, showUserFoldersFilter, userFoldersLabel }) {
|
|
1
|
+
import { Boxes, FileCode, FileText, FolderIcon, Braces, Users, Tag } from 'lucide-svelte';
|
|
2
|
+
export function buildResourcesFilterSchema({ paths, resourceTypes, owners, labels, showUserFoldersFilter, userFoldersLabel }) {
|
|
3
3
|
return {
|
|
4
4
|
_default_: {
|
|
5
5
|
type: 'string',
|
|
@@ -51,6 +51,15 @@ export function buildResourcesFilterSchema({ paths, resourceTypes, owners, showU
|
|
|
51
51
|
icon: Braces,
|
|
52
52
|
description: 'Filter by JSON subset match (e.g., {"bucket": "my-bucket"})'
|
|
53
53
|
},
|
|
54
|
+
label: {
|
|
55
|
+
type: 'oneof',
|
|
56
|
+
options: (labels ?? []).map((s) => ({ label: s, value: s })),
|
|
57
|
+
allowNegative: false,
|
|
58
|
+
allowMultiple: true,
|
|
59
|
+
label: 'Label',
|
|
60
|
+
icon: Tag,
|
|
61
|
+
description: 'Filter by label (comma-separated for multiple)'
|
|
62
|
+
},
|
|
54
63
|
...(showUserFoldersFilter
|
|
55
64
|
? {
|
|
56
65
|
user_folders_only: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { triggerIconMap } from '../triggers/utils';
|
|
2
2
|
import { formatMemory } from '../../utils';
|
|
3
|
+
import { flowPathToHref } from '../../scripts';
|
|
3
4
|
import { Calendar, Bot } from 'lucide-svelte';
|
|
4
5
|
import BarsStaggered from '../icons/BarsStaggered.svelte';
|
|
5
6
|
/**
|
|
@@ -166,12 +167,13 @@ export const fieldConfigs = {
|
|
|
166
167
|
field: 'script_path',
|
|
167
168
|
label: 'Path',
|
|
168
169
|
getValue: (job) => job.script_path || null,
|
|
169
|
-
getHref: (job,
|
|
170
|
+
getHref: (job, _workspaceId) => {
|
|
170
171
|
if (!job.script_path)
|
|
171
172
|
return null;
|
|
172
|
-
const stem = job.job_kind === 'script' ? 'scripts' : 'flows';
|
|
173
173
|
const isScript = job.job_kind === 'script';
|
|
174
|
-
return
|
|
174
|
+
return isScript
|
|
175
|
+
? `/scripts/get/${job.script_hash}`
|
|
176
|
+
: flowPathToHref(job.script_path);
|
|
175
177
|
}
|
|
176
178
|
},
|
|
177
179
|
worker: {
|
|
@@ -13,6 +13,7 @@ import WorkerHostname from '../WorkerHostname.svelte';
|
|
|
13
13
|
import Button from '../common/button/Button.svelte';
|
|
14
14
|
import DropdownV2 from '../DropdownV2.svelte';
|
|
15
15
|
import { getRelevantFields, getTriggerInfo } from './JobDetailFieldConfig';
|
|
16
|
+
import { flowPathToHref } from '../../scripts';
|
|
16
17
|
import { slide } from 'svelte/transition';
|
|
17
18
|
import { twMerge } from 'tailwind-merge';
|
|
18
19
|
let { job, scheduleEditor, displayPersistentScriptDefinition = false, openPersistentScriptDrawer, concurrencyKey, compact = false, extraCompact = false, onFilterByConcurrencyKey, onFilterByWorker, showScriptHashInBadges = false } = $props();
|
|
@@ -351,10 +352,12 @@ function getJobKindDisplayName(job) {
|
|
|
351
352
|
<div class="flex flex-col gap-1 flex-1 min-w-0">
|
|
352
353
|
<!-- Title row -->
|
|
353
354
|
<div class="min-w-0 grow">
|
|
354
|
-
{#if job.script_path && (job.job_kind === 'script' || job.job_kind === 'flow' || job.job_kind === 'singlestepflow')}
|
|
355
|
+
{#if job.script_path && (job.job_kind === 'script' || job.job_kind === 'flow' || job.job_kind === 'singlestepflow' || job.job_kind === 'flowpreview')}
|
|
355
356
|
{@const stem = job.job_kind === 'script' ? 'scripts' : 'flows'}
|
|
356
357
|
{@const isScript = job.job_kind === 'script'}
|
|
357
|
-
{@const viewHref =
|
|
358
|
+
{@const viewHref = isScript
|
|
359
|
+
? `${base}/${stem}/get/${job?.script_hash}`
|
|
360
|
+
: flowPathToHref(job?.script_path ?? '')}
|
|
358
361
|
<a
|
|
359
362
|
href={viewHref}
|
|
360
363
|
class="text-emphasis {compact
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">import Tooltip from '../meltComponents/Tooltip.svelte';
|
|
2
2
|
import PreprocessedArgsDisplay from './PreprocessedArgsDisplay.svelte';
|
|
3
|
-
import { truncateHash } from '../../utils';
|
|
3
|
+
import { getJobKindDisplayLabel, truncateHash } from '../../utils';
|
|
4
4
|
import { base } from '../../base';
|
|
5
5
|
import { truncateRev } from '../../utils';
|
|
6
6
|
import { workspaceStore } from '../../stores';
|
|
7
7
|
import Badge from '../common/badge/Badge.svelte';
|
|
8
8
|
import Button from '../common/button/Button.svelte';
|
|
9
|
-
import { ListFilter } from 'lucide-svelte';
|
|
9
|
+
import { ListFilter, Tag } from 'lucide-svelte';
|
|
10
10
|
let { job, displayPersistentScriptDefinition, openPersistentScriptDrawer, concurrencyKey, showScriptHash = true, onFilterByConcurrencyKey, large = false } = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
@@ -25,7 +25,8 @@ let { job, displayPersistentScriptDefinition, openPersistentScriptDrawer, concur
|
|
|
25
25
|
{/if}
|
|
26
26
|
{#if job && 'job_kind' in job}
|
|
27
27
|
<div>
|
|
28
|
-
<Badge color="gray" {large}>
|
|
28
|
+
<Badge color="gray" {large}>Kind: {getJobKindDisplayLabel(job.job_kind, job.script_path)}</Badge
|
|
29
|
+
>
|
|
29
30
|
</div>
|
|
30
31
|
{/if}
|
|
31
32
|
{#if job && job.flow_status && job.job_kind === 'script'}
|
|
@@ -62,7 +63,9 @@ let { job, displayPersistentScriptDefinition, openPersistentScriptDrawer, concur
|
|
|
62
63
|
{#if job?.['labels'] && Array.isArray(job?.['labels']) && job?.['labels'].length > 0}
|
|
63
64
|
{#each job?.['labels'] as label}
|
|
64
65
|
<div>
|
|
65
|
-
<Badge {large}
|
|
66
|
+
<Badge color="blue" {large} title="Label: {label}"
|
|
67
|
+
><Tag size={10} class="inline -mt-px" />{label}</Badge
|
|
68
|
+
>
|
|
66
69
|
</div>
|
|
67
70
|
{/each}
|
|
68
71
|
{/if}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">import { base } from '../../base';
|
|
2
2
|
import { goto } from '../../navigation';
|
|
3
|
-
import { displayDate, truncateHash, truncateRev, isScriptPreview, msToReadableTime, isFlowPreview, getJobKindIcon } from '../../utils';
|
|
3
|
+
import { displayDate, truncateHash, truncateRev, isScriptPreview, msToReadableTime, isFlowPreview, getJobKindDisplayLabel, getJobKindIcon } from '../../utils';
|
|
4
4
|
import { Button } from '../common';
|
|
5
5
|
import ScheduleEditor from '../triggers/schedules/ScheduleEditor.svelte';
|
|
6
6
|
import JobStatusIcon from './JobStatusIcon.svelte';
|
|
@@ -119,12 +119,12 @@ let isJobRecent = $state(true);
|
|
|
119
119
|
{/if}
|
|
120
120
|
<JobKindIcon size={14} />
|
|
121
121
|
</div>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
{#snippet text()}
|
|
123
|
+
<span>
|
|
124
|
+
{#if job && job.job_kind}
|
|
125
|
+
{getJobKindDisplayLabel(job.job_kind, job.script_path)}
|
|
126
|
+
{/if}
|
|
127
|
+
{#if job && job.is_flow_step && job.parent_job}
|
|
128
128
|
<br /> Step of flow
|
|
129
129
|
<a href={`${base}/run/${job.parent_job}?workspace=${job.workspace_id}`}>
|
|
130
130
|
{truncateRev(job.parent_job, 10)}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { FileCode, FileText, Clock, Braces, Users } from 'lucide-svelte';
|
|
2
|
-
export declare function buildSchedulesFilterSchema({ paths, scriptPaths, showUserFoldersFilter, userFoldersLabel }: {
|
|
1
|
+
import { FileCode, FileText, Clock, Braces, Tag, Users } from 'lucide-svelte';
|
|
2
|
+
export declare function buildSchedulesFilterSchema({ paths, scriptPaths, labels, showUserFoldersFilter, userFoldersLabel }: {
|
|
3
3
|
paths: string[];
|
|
4
4
|
scriptPaths: string[];
|
|
5
|
+
labels?: string[];
|
|
5
6
|
showUserFoldersFilter?: boolean;
|
|
6
7
|
userFoldersLabel?: string;
|
|
7
8
|
}): {
|
|
@@ -66,4 +67,16 @@ export declare function buildSchedulesFilterSchema({ paths, scriptPaths, showUse
|
|
|
66
67
|
icon: typeof Braces;
|
|
67
68
|
description: string;
|
|
68
69
|
};
|
|
70
|
+
label: {
|
|
71
|
+
type: "oneof";
|
|
72
|
+
options: {
|
|
73
|
+
label: string;
|
|
74
|
+
value: string;
|
|
75
|
+
}[];
|
|
76
|
+
allowNegative: false;
|
|
77
|
+
allowMultiple: true;
|
|
78
|
+
label: string;
|
|
79
|
+
icon: typeof Tag;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
69
82
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FileCode, FileText, Clock, Braces, Users } from 'lucide-svelte';
|
|
2
|
-
export function buildSchedulesFilterSchema({ paths, scriptPaths, showUserFoldersFilter, userFoldersLabel }) {
|
|
1
|
+
import { FileCode, FileText, Clock, Braces, Tag, Users } from 'lucide-svelte';
|
|
2
|
+
export function buildSchedulesFilterSchema({ paths, scriptPaths, labels, showUserFoldersFilter, userFoldersLabel }) {
|
|
3
3
|
return {
|
|
4
4
|
_default_: {
|
|
5
5
|
type: 'string',
|
|
@@ -50,6 +50,15 @@ export function buildSchedulesFilterSchema({ paths, scriptPaths, showUserFolders
|
|
|
50
50
|
icon: Braces,
|
|
51
51
|
description: 'Filter by JSON args subset match (e.g., {"param": "value"})'
|
|
52
52
|
},
|
|
53
|
+
label: {
|
|
54
|
+
type: 'oneof',
|
|
55
|
+
options: (labels ?? []).map((s) => ({ label: s, value: s })),
|
|
56
|
+
allowNegative: false,
|
|
57
|
+
allowMultiple: true,
|
|
58
|
+
label: 'Label',
|
|
59
|
+
icon: Tag,
|
|
60
|
+
description: 'Filter by label (comma-separated for multiple)'
|
|
61
|
+
},
|
|
53
62
|
...(showUserFoldersFilter
|
|
54
63
|
? {
|
|
55
64
|
user_folders_only: {
|
|
@@ -8,7 +8,7 @@ import Select from '../select/Select.svelte';
|
|
|
8
8
|
import { safeSelectItems } from '../select/utils.svelte';
|
|
9
9
|
import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte';
|
|
10
10
|
import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte';
|
|
11
|
-
let { schema = $bindable(), uiOnly = false, noPreview = false, fullHeight = true, formatExtension = $bindable(undefined), isFileset = $bindable(undefined), customUi } = $props();
|
|
11
|
+
let { schema = $bindable(), uiOnly = false, noPreview = false, fullHeight = true, formatExtension = $bindable(undefined), isFileset = $bindable(undefined), showSensitiveToggle = false, customUi } = $props();
|
|
12
12
|
let resourceMode = $state('schema');
|
|
13
13
|
let addPropertyComponent = $state(undefined);
|
|
14
14
|
let editableSchemaForm = $state(undefined);
|
|
@@ -95,6 +95,7 @@ let suggestedFileExtensions = $state([
|
|
|
95
95
|
bind:this={editableSchemaForm}
|
|
96
96
|
bind:schema
|
|
97
97
|
isFlowInput
|
|
98
|
+
{showSensitiveToggle}
|
|
98
99
|
on:delete={(e) => {
|
|
99
100
|
addPropertyComponent?.handleDeleteArgument([e.detail])
|
|
100
101
|
}}
|
|
@@ -144,9 +145,9 @@ let suggestedFileExtensions = $state([
|
|
|
144
145
|
</Alert>
|
|
145
146
|
{:else if formatExtension && formatExtension !== ''}
|
|
146
147
|
<Alert title={`Example: my_file.${formatExtension}`} type="info">
|
|
147
|
-
The <span class="font-bold font-mono"> .{formatExtension} </span> extension will be used to
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
The <span class="font-bold font-mono"> .{formatExtension} </span> extension will be used to infer
|
|
149
|
+
the format when displaying the content and this is also how the resource will appear when pulling
|
|
150
|
+
via the CLI.
|
|
150
151
|
</Alert>
|
|
151
152
|
<div></div>
|
|
152
153
|
{/if}
|
|
@@ -157,10 +158,7 @@ let suggestedFileExtensions = $state([
|
|
|
157
158
|
path and contains text content. In the CLI, filesets are stored as directories.
|
|
158
159
|
</Alert>
|
|
159
160
|
{/if}
|
|
160
|
-
<ToggleButtonGroup
|
|
161
|
-
selected={resourceMode}
|
|
162
|
-
onSelected={(mode) => switchResourceMode(mode)}
|
|
163
|
-
>
|
|
161
|
+
<ToggleButtonGroup selected={resourceMode} onSelected={(mode) => switchResourceMode(mode)}>
|
|
164
162
|
{#snippet children({ item })}
|
|
165
163
|
<ToggleButton value="schema" label="JSON" {item} size="sm" />
|
|
166
164
|
<ToggleButton value="file" label="File" {item} size="sm" />
|