diff --git a/frontend/src/lib/components/ArgInfo.svelte b/frontend/src/lib/components/ArgInfo.svelte index 3026ef001f..a7128d682a 100644 --- a/frontend/src/lib/components/ArgInfo.svelte +++ b/frontend/src/lib/components/ArgInfo.svelte @@ -43,8 +43,8 @@ }}>{value} {:else if typeof value !== 'object'} - {truncate(JSON.stringify(value), 40)} - {#if JSON.stringify(value).length > 40} + {truncate(JSON.stringify(value), 100)} + {#if JSON.stringify(value).length > 100}
diff --git a/frontend/src/routes/flows/get/[...path].svelte b/frontend/src/routes/flows/get/[...path].svelte index 1adc45494f..478834d59c 100644 --- a/frontend/src/routes/flows/get/[...path].svelte +++ b/frontend/src/routes/flows/get/[...path].svelte @@ -101,185 +101,183 @@ -
- + +{#if flow} + + + + + + + + + + + + + + +{/if} + + {#if flow} - - - - - - - - - - - - - - - {/if} - - - {#if flow} -

- {defaultIfEmptyString(flow.summary, flow.path)} -

- {#if !emptyString(flow.summary)} -

{flow.path}

- {/if} +

+ {defaultIfEmptyString(flow.summary, flow.path)} +

+ {#if !emptyString(flow.summary)} +

{flow.path}

{/if} - + {/if} + -
- - {#if flow} -

Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by} - - Webhook -

+ + {#if flow} +

Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by} + + Webhook +

+ + {#if flow.archived} + + {/if} +
+ +
+
+ + +

WebhookTo trigger this script with a webhook, do a POST request to the endpoint below. Flows + are not public and can only be run by users with at least view rights on them. You will + need to pass a bearer token to authentify as a user. You can either pass it as a Bearer + token or as query arg `?token=XXX`. See docs

+
+ + {#if schedule} +
+

Primary Schedule
+ {schedule.schedule} + { + if (can_write) { + setScheduleEnabled(path, e.detail) + } else { + sendUserToast('not enough permission', true) + } + }} + /> + +

+
+ +
+
+ +
{/if} -
- -
-
- - -

WebhookTo trigger this script with a webhook, do a POST request to the endpoint below. Flows - are not public and can only be run by users with at least view rights on them. You - will need to pass a bearer token to authentify as a user. You can either pass it as a - Bearer token or as query arg `?token=XXX`. See docs

- - {#if schedule} -
-

Primary Schedule
- {schedule.schedule} - { - if (can_write) { - setScheduleEnabled(path, e.detail) - } else { - sendUserToast('not enough permission', true) - } - }} - /> - -

-
- -
-
- -
-
- {/if} -
- {/if} -
- -
+
+ {/if} +
+ diff --git a/frontend/src/routes/scripts/get/[...hash].svelte b/frontend/src/routes/scripts/get/[...hash].svelte index 532368535e..7d825f8c98 100644 --- a/frontend/src/routes/scripts/get/[...hash].svelte +++ b/frontend/src/routes/scripts/get/[...hash].svelte @@ -135,312 +135,307 @@ -
- {#if script} - - - { - script?.hash && archiveScript(script.hash) - }, - disabled: script.archived || !can_write +{#if script} + + + { + script?.hash && archiveScript(script.hash) }, - { - displayName: 'Delete', - icon: faTrash, - type: 'delete', - action: () => { - script?.hash && deleteScript(script.hash) - }, - disabled: script.deleted || !($userStore?.is_admin ?? false) - } - ]}>delete... + disabled: script.archived || !can_write + }, + { + displayName: 'Delete', + icon: faTrash, + type: 'delete', + action: () => { + script?.hash && deleteScript(script.hash) + }, + disabled: script.deleted || !($userStore?.is_admin ?? false) + } + ]}>delete... + + + + + + + + {#if !topHash} - - - - - - - {#if !topHash} - - {/if} - - - - {/if} - - - {#if script} -
-
-
-

- {defaultIfEmptyString(script.summary, script.path)} -

- {#if !emptyString(script.summary)} -

{script.path}

- {/if} - -
- - {#if script} - Edited {displayDaysAgo(script.created_at || '')} by {script.created_by || - 'unknown'} - {/if} - - - {truncateHash(script?.hash ?? '')} - - - Webhooks - - {#if script?.is_template} - Template - {/if} - {#if script && script.kind !== 'script'} - - {script?.kind} - - {/if} - {#if deploymentInProgress} - - Deployment in progress - - {/if} - -
-
-
-
- {/if} - - - -
- - - {#if script} -
-
-

Description

- -
- -
-
-
-

Versions

- - {#if script} -
-

Current

-
- {script?.hash} -
-

Previous

- {#if script?.parent_hashes?.length} -
    - {#each script.parent_hashes as hash} -
  • - {hash} -
  • - {/each} -
- {:else} -

There are no previous versions

- {/if} -
- {/if} -
-
- - {#if script.lock_error_logs || topHash || script.archived || script.deleted} -
- {#if script.lock_error_logs} - - {/if} - {#if topHash} - - This hash is not HEAD (latest non-archived version at this path) : - Go to the HEAD of this path - - {/if} - {#if script.archived && !topHash} - This version was archived - {/if} - {#if script.deleted} - - {/if} -
- {/if} {/if} - -
-

- Arguments JSON schema - - The jsonschema defines the constraints that the payload must respect to be compatible - with the input parameters of this script. The UI form is generated automatically from - the script jsonschema. See - jsonschema documentation - -

- - {#if script} -
- -
- {/if} -
+ + + +{/if} + + + {#if script} +
-

Code

- - {#if script} - - {/if} +
+

+ {defaultIfEmptyString(script.summary, script.path)} +

+ {#if !emptyString(script.summary)} +

{script.path}

+ {/if} + +
+ + {#if script} + Edited {displayDaysAgo(script.created_at || '')} by {script.created_by || 'unknown'} + {/if} + + + {truncateHash(script?.hash ?? '')} + + + Webhooks + + {#if script?.is_template} + Template + {/if} + {#if script && script.kind !== 'script'} + + {script?.kind} + + {/if} + {#if deploymentInProgress} + + Deployment in progress + + {/if} + +
+
+ {/if} + + + +
+ -

WebhooksTo trigger this script with a webhook, do a POST request to the endpoints below. Scripts - are not public and can only be run by users with at least view rights on them. You will need - to pass a bearer token to authentify as a user. You can either pass it as a Bearer token or - as query arg `?token=XXX`. See docs

- {#if script} -
- - UUID - Result - - {#each Object.keys(webhooks) as key} - -
    - {#each Object.keys(webhooks[key]) as type} - {@const url = webhooks[key][type]} -
  • - { - e.preventDefault() - copyToClipboard(url) - }} - href={$page.url.protocol + '//' + url} - class="whitespace-nowrap text-ellipsis overflow-hidden mr-1" - > - {url} - - - - - - {type} - +
    +
    +

    Description

    + +
    + +
    +
    +
    +

    Versions

    + + {#if script} +
    +

    Current

    +
    + {script?.hash} +
    +

    Previous

    + {#if script?.parent_hashes?.length} +
      + {#each script.parent_hashes as hash} +
    • + {hash}
    • {/each}
    -
    - -
    - - {/each} - - + {:else} +

    There are no previous versions

    + {/if} +
    + {/if} +
    + + {#if script.lock_error_logs || topHash || script.archived || script.deleted} +
    + {#if script.lock_error_logs} + + {/if} + {#if topHash} + + This hash is not HEAD (latest non-archived version at this path) : + Go to the HEAD of this path + + {/if} + {#if script.archived && !topHash} + This version was archived + {/if} + {#if script.deleted} + + {/if} +
    + {/if} {/if} -
    -

    Dependencies lock file

    - + +
    +

    + Arguments JSON schema + + The jsonschema defines the constraints that the payload must respect to be compatible with + the input parameters of this script. The UI form is generated automatically from the + script jsonschema. See + jsonschema documentation + +

    + {#if script} - {#if script?.lock} -
    {script.lock}
    - {:else} -

    There is no lock file for this script

    - {/if} +
    + +
    {/if}
    - -
    +
    +

    Code

    + + {#if script} + + {/if} +
    +
+ +

WebhooksTo trigger this script with a webhook, do a POST request to the endpoints below. Scripts are + not public and can only be run by users with at least view rights on them. You will need to + pass a bearer token to authentify as a user. You can either pass it as a Bearer token or as + query arg `?token=XXX`. See docs

+ + {#if script} +
+ + UUID + Result + + {#each Object.keys(webhooks) as key} + + +
+ +
+
+ {/each} +
+
+
+ {/if} +
+

Dependencies lock file

+ + {#if script} + {#if script?.lock} +
{script.lock}
+ {:else} +

There is no lock file for this script

+ {/if} + {/if} +
+