From d110c02cbb106c501898df29aa335b81b3ff146a Mon Sep 17 00:00:00 2001 From: JosephVolosin Date: Wed, 29 Jan 2025 14:38:31 -0500 Subject: [PATCH] Fix formatting --- .../external-events/ExternalEventForm.svelte | 2 +- .../ExternalSourceManager.svelte | 9 +- .../ExternalTypeManager.svelte | 522 +++++++++--------- 3 files changed, 277 insertions(+), 256 deletions(-) diff --git a/src/components/external-events/ExternalEventForm.svelte b/src/components/external-events/ExternalEventForm.svelte index efe36a84f8..790ca447c3 100644 --- a/src/components/external-events/ExternalEventForm.svelte +++ b/src/components/external-events/ExternalEventForm.svelte @@ -116,7 +116,7 @@ requiredAttributes, undefined, undefined, - true + true, )} /> diff --git a/src/components/external-source/ExternalSourceManager.svelte b/src/components/external-source/ExternalSourceManager.svelte index 7a989a8198..ab33e1862f 100644 --- a/src/components/external-source/ExternalSourceManager.svelte +++ b/src/components/external-source/ExternalSourceManager.svelte @@ -704,7 +704,14 @@ diff --git a/src/components/external-source/ExternalTypeManager.svelte b/src/components/external-source/ExternalTypeManager.svelte index e989a2cdba..6a269aaa92 100644 --- a/src/components/external-source/ExternalTypeManager.svelte +++ b/src/components/external-source/ExternalTypeManager.svelte @@ -262,7 +262,7 @@ return actionsDiv; }, cellRendererParams: { - deleteDerivationGroup + deleteDerivationGroup, } as CellRendererParams, headerName: '', resizable: true, @@ -520,260 +520,206 @@ - - - {#if selectedDerivationGroup === undefined && selectedExternalSourceType === undefined && selectedExternalEventType === undefined} - Upload Type Definition - {:else if selectedDerivationGroup !== undefined} - - Sources in '{selectedDerivationGroup.name}' - - - {:else if selectedExternalSourceType !== undefined} - - '{selectedExternalSourceType.name}' Details - - - {:else if selectedExternalEventType !== undefined} - - '{selectedExternalEventType.name}' Details - - - {/if} - - - {#if selectedDerivationGroup === undefined && selectedExternalSourceType === undefined && selectedExternalEventType === undefined} -
-
- - -
- {#if file !== undefined} - - {#if parsedExternalSourceEventTypeSchema !== undefined} -
-
- -
- Source & Event Type Attribute Schema Parsed -
- {:else} - -
Source & Event Type Attribute Schema Could Not Be Parsed
- {/if} - {/if} + + + {#if selectedDerivationGroup === undefined && selectedExternalSourceType === undefined && selectedExternalEventType === undefined} + Upload Type Definition + {:else if selectedDerivationGroup !== undefined} + + Sources in '{selectedDerivationGroup.name}' + + + {:else if selectedExternalSourceType !== undefined} + + '{selectedExternalSourceType.name}' Details + + + {:else if selectedExternalEventType !== undefined} + + '{selectedExternalEventType.name}' Details + + + {/if} + + + {#if selectedDerivationGroup === undefined && selectedExternalSourceType === undefined && selectedExternalEventType === undefined} +
+
+ + +
+ {#if file !== undefined} + {#if parsedExternalSourceEventTypeSchema !== undefined} -
-
The following External Source Type(s) will be created
- {#if parsedExternalSourceEventTypeSchema.source_types} -
    - {#each Object.keys(parsedExternalSourceEventTypeSchema.source_types) as newSourceTypeName} -
  • {newSourceTypeName}
  • - {/each} -
- {/if} -
The following External Event Type(s) will be created
- {#if parsedExternalSourceEventTypeSchema.event_types} -
    - {#each Object.keys(parsedExternalSourceEventTypeSchema.event_types) as newEventTypeName} -
  • {newEventTypeName}
  • - {/each} -
- {/if} +
+
+ +
+ Source & Event Type Attribute Schema Parsed
+ {:else} + +
Source & Event Type Attribute Schema Could Not Be Parsed
{/if} -
- {#each uploadResponseErrors as currentError} - - {/each} - + {/if} + {#if parsedExternalSourceEventTypeSchema !== undefined} +
+
The following External Source Type(s) will be created
+ {#if parsedExternalSourceEventTypeSchema.source_types} +
    + {#each Object.keys(parsedExternalSourceEventTypeSchema.source_types) as newSourceTypeName} +
  • {newSourceTypeName}
  • + {/each} +
+ {/if} +
The following External Event Type(s) will be created
+ {#if parsedExternalSourceEventTypeSchema.event_types} +
    + {#each Object.keys(parsedExternalSourceEventTypeSchema.event_types) as newEventTypeName} +
  • {newEventTypeName}
  • + {/each} +
+ {/if}
+ {/if} +
+ {#each uploadResponseErrors as currentError} + + {/each} +
- {:else if selectedDerivationGroup !== undefined} - {#if selectedDerivationGroupSources.length > 0} - {#each selectedDerivationGroupSources as source} - - - -

- {selectedDerivationGroup.sources.get(source.key)?.event_counts} events -

-
-
-
Key:
- {source.key} -
+
+ {:else if selectedDerivationGroup !== undefined} + {#if selectedDerivationGroupSources.length > 0} + {#each selectedDerivationGroupSources as source} + + + +

+ {selectedDerivationGroup.sources.get(source.key)?.event_counts} events +

+
+
+
Key:
+ {source.key} +
-
-
Source Type:
- {source.source_type_name} -
+
+
Source Type:
+ {source.source_type_name} +
-
-
Start Time:
- {source.start_time} -
+
+
Start Time:
+ {source.start_time} +
-
-
End Time:
- {source.end_time} -
+
+
End Time:
+ {source.end_time} +
-
-
Valid At:
- {source.valid_at} -
+
+
Valid At:
+ {source.valid_at} +
-
-
Created At:
- {source.created_at} -
-
- {/each} - {:else} -

No sources in this group.

- {/if} - {:else if selectedExternalSourceType !== undefined} - {#if selectedExternalSourceTypeDerivationGroups.length > 0} - {#each selectedExternalSourceTypeDerivationGroups as associatedDerivationGroup} - - - -

- {associatedDerivationGroup.derived_event_total} events -

-
-
-
Name:
- {associatedDerivationGroup.name} -
+
+
Created At:
+ {source.created_at} +
+
+ {/each} + {:else} +

No sources in this group.

+ {/if} + {:else if selectedExternalSourceType !== undefined} + {#if selectedExternalSourceTypeDerivationGroups.length > 0} + {#each selectedExternalSourceTypeDerivationGroups as associatedDerivationGroup} + + + +

+ {associatedDerivationGroup.derived_event_total} events +

+
+
+
Name:
+ {associatedDerivationGroup.name} +
- - {#each associatedDerivationGroup.sources as source} - {source[0]} - {/each} - + + {#each associatedDerivationGroup.sources as source} + {source[0]} + {/each} - {/each} +
+ {/each} + {:else} +

No sources associated with this External Source Type.

+ {/if} + + {#if Object.keys(selectedExternalSourceTypeParametersMap).length === 0} +
No Attributes Defined
{:else} -

No sources associated with this External Source Type.

- {/if} - - {#if Object.keys(selectedExternalSourceTypeParametersMap).length === 0} -
No Attributes Defined
- {:else} - {#each Object.entries(selectedExternalSourceType.attribute_schema) as attribute} - {#if attribute[0] !== 'properties'} -
-
{attribute[0]}
- {#if Array.isArray(attribute[1])} -
    - {#each attribute[1] as attributeValue} -
  • {attributeValue}
  • - {/each} -
- {:else} -
{attribute[1]}
- {/if} -
- {/if} - {/each} - {/if} -
- - {#if Object.keys(selectedExternalSourceTypeParametersMap).length === 0} -
No Attributes Found
- {:else} -
- -
- {/if} -
- {:else if selectedExternalEventType !== undefined} - - {#if selectedExternalEventTypeSources.length > 0} - {#each selectedExternalEventTypeSources as associatedSource} -
  • {associatedSource}
  • - {/each} - {:else} - {`No External Sources using ${selectedExternalEventType.name}`} - {/if} -
    - - {#each Object.entries(selectedExternalEventType.attribute_schema) as attribute} + {#each Object.entries(selectedExternalSourceType.attribute_schema) as attribute} {#if attribute[0] !== 'properties'}
    {attribute[0]}
    @@ -789,24 +735,92 @@
    {/if} {/each} -
    - + {/if} + + + {#if Object.keys(selectedExternalSourceTypeParametersMap).length === 0} +
    No Attributes Found
    + {:else}
    -
    - {/if} - - - + {/if} +
    + {:else if selectedExternalEventType !== undefined} + + {#if selectedExternalEventTypeSources.length > 0} + {#each selectedExternalEventTypeSources as associatedSource} +
  • {associatedSource}
  • + {/each} + {:else} + {`No External Sources using ${selectedExternalEventType.name}`} + {/if} +
    + + {#each Object.entries(selectedExternalEventType.attribute_schema) as attribute} + {#if attribute[0] !== 'properties'} +
    +
    {attribute[0]}
    + {#if Array.isArray(attribute[1])} +
      + {#each attribute[1] as attributeValue} +
    • {attributeValue}
    • + {/each} +
    + {:else} +
    {attribute[1]}
    + {/if} +
    + {/if} + {/each} +
    + +
    + +
    +
    + {/if} + + +