+
+
Copy
Download
-
+ {#if showOutputs}
+
-
+
+
-
-
-
-
-
-
-
-
- {selectedOutputFormat?.name} (Read-only)
-
-
- {#if outputFormats}
-
- {/if}
-
+ {#if selectedOutputFormat?.compile}
+
+ {/if}
+ {/if}
-
+
+
+ {#if showOutputs}
+
+
+
+ {selectedOutputFormat?.name} (Read-only)
+
+
+ {#if outputFormats}
+
+
+
+
+ {/if}
+
+
+
+
+
+
+
+
+
+ {/if}
@@ -526,6 +542,7 @@
node={selectedNode}
{channelDictionary}
{commandDictionary}
+ {commandInfoMapper}
{editorSequenceView}
{parameterDictionaries}
/>
diff --git a/src/components/sequencing/SequenceForm.svelte b/src/components/sequencing/SequenceForm.svelte
index 1a24331475..c682ec547e 100644
--- a/src/components/sequencing/SequenceForm.svelte
+++ b/src/components/sequencing/SequenceForm.svelte
@@ -6,7 +6,6 @@
import { base } from '$app/paths';
import type { ParameterDictionary } from '@nasa-jpl/aerie-ampcs';
import { SearchParameters } from '../../enums/searchParameters';
- import { outputFormat } from '../../stores/sequence-adaptation';
import {
parameterDictionaries as parameterDictionariesStore,
parcelToParameterDictionaries,
@@ -102,7 +101,7 @@
}
});
- const [output, parsedChannelDictionary, ...parsedParameterDictionaries] = await Promise.all([
+ const [fileNameAndContents, parsedChannelDictionary, ...parsedParameterDictionaries] = await Promise.all([
parseOutputFromFile(e.currentTarget.files),
parcel?.channel_dictionary_id
? effects.getParsedAmpcsChannelDictionary(parcel?.channel_dictionary_id, user)
@@ -112,9 +111,11 @@
}),
]);
- if (output !== null) {
+ if (fileNameAndContents !== null) {
+ sequenceName = fileNameAndContents.name;
+
const sequence = await toInputFormat(
- output,
+ fileNameAndContents.contents,
parsedParameterDictionaries.filter((pd): pd is ParameterDictionary => pd !== null),
parsedChannelDictionary,
);
@@ -146,13 +147,15 @@
}
}
- async function parseOutputFromFile(files: FileList | null | undefined): Promise
{
+ async function parseOutputFromFile(
+ files: FileList | null | undefined,
+ ): Promise<{ contents: string; name: string } | null> {
if (files) {
const file = files.item(0);
if (file) {
try {
- return await file.text();
+ return { contents: await file.text(), name: file.name };
} catch (e) {
const errorMessage = (e as Error).message;
logError(errorMessage);
@@ -184,9 +187,9 @@
const newSequenceId = await effects.createUserSequence(newSequence, user);
if (newSequenceId !== null) {
- goto(
- `${base}/sequencing/edit/${newSequenceId}${'?' + SearchParameters.WORKSPACE_ID + '=' + getSearchParameterNumber(SearchParameters.WORKSPACE_ID) ?? ''}`,
- );
+ const newSequenceUrl = `${base}/sequencing/edit/${newSequenceId}`;
+ const workspaceId = getSearchParameterNumber(SearchParameters.WORKSPACE_ID);
+ goto(newSequenceUrl + (workspaceId !== null ? `?${SearchParameters.WORKSPACE_ID}=${workspaceId}` : ''));
}
} else if (mode === 'edit' && sequenceId !== null) {
const updatedSequence: Partial = {
@@ -220,10 +223,11 @@
@@ -296,7 +300,7 @@
{/if}
{#if !!commandNode}
- {#if commandNode.name === 'Command'}
+ {#if commandInfoMapper.nodeTypeHasArguments(commandNode)}
{#if !!commandDef}