-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include Input for Schedules on Create/Edit and show Input on View #1869
Merged
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
748ad32
WIP: add payloads to schedule
Alex-Tideman dbfc386
Merge branch 'main' into schedules-ui-improvements
Alex-Tideman 58c037d
WIP: encode payloads from schedules
Alex-Tideman 4ccdd2c
Decode payloads, show Input. Need to get confirmation on whether inpu…
Alex-Tideman 3c6820e
Pass settings
Alex-Tideman 4480c56
Remove console.log
Alex-Tideman b383b22
Add input to edit
Alex-Tideman b7f639e
Merge branch 'main' into schedules-ui-improvements
Alex-Tideman 24827af
Merge branch 'main' into schedules-ui-improvements
Alex-Tideman 091ead6
Sent all payloads to base64 encoded, support array of payloads, test …
Alex-Tideman 4fdf0e3
Encode single payload for schedule input
Alex-Tideman b0f854b
Fix merge conflicts
Alex-Tideman 2817560
Refactor out encoding payloads to its own function, set error if enco…
Alex-Tideman ef9387e
Add error text color for schedule payload error, fix InputAndResults …
Alex-Tideman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<script lang="ts"> | ||
import CodeBlock from '$lib/holocene/code-block.svelte'; | ||
import { translate } from '$lib/i18n/translate'; | ||
import type { Payloads } from '$lib/types'; | ||
import { | ||
parseWithBigInt, | ||
stringifyWithBigInt, | ||
} from '$lib/utilities/parse-with-big-int'; | ||
|
||
import PayloadDecoder from '../event/payload-decoder.svelte'; | ||
|
||
export let input: string; | ||
export let payloads: Payloads; | ||
|
||
const handleInputChange = (event: CustomEvent<string>) => { | ||
input = event.detail; | ||
}; | ||
</script> | ||
|
||
<div class="flex flex-col gap-4"> | ||
<label for="schedule-input">{translate('workflows.input')}</label> | ||
<PayloadDecoder value={payloads} let:decodedValue key="payloads"> | ||
{@const singlePayload = | ||
Alex-Tideman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
decodedValue && parseWithBigInt(decodedValue)?.[0] | ||
? stringifyWithBigInt(parseWithBigInt(decodedValue)[0]) | ||
: ''} | ||
{#key decodedValue} | ||
<CodeBlock | ||
id="schedule-input" | ||
class="max-h-80 overflow-y-scroll overscroll-contain" | ||
content={singlePayload} | ||
on:change={handleInputChange} | ||
editable | ||
copyable={false} | ||
/> | ||
{/key} | ||
</PayloadDecoder> | ||
<span class="font-secondary text-xs font-light italic"> | ||
{translate('workflows.signal-payload-input-label-hint')} | ||
</span> | ||
</div> | ||
|
||
<style lang="postcss"> | ||
.error { | ||
Alex-Tideman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@apply border-2 border-red-500; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script lang="ts"> | ||
import Panel from '$lib/components/panel.svelte'; | ||
import { translate } from '$lib/i18n/translate'; | ||
import type { Payloads } from '$lib/types'; | ||
import { stringifyWithBigInt } from '$lib/utilities/parse-with-big-int'; | ||
|
||
import InputAndResults from '../workflow/input-and-results.svelte'; | ||
|
||
export let input: Payloads; | ||
</script> | ||
|
||
<Panel> | ||
<InputAndResults | ||
title={translate('schedules.schedule-input')} | ||
content={stringifyWithBigInt(input)} | ||
/> | ||
</Panel> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be talked into pulling this utility out.