mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-02-04 15:25:17 +01:00
add function syntax to sveltestrap onclick events and others
- fixes event_handler_invalid svelte warning and blockage
This commit is contained in:
parent
2b23003556
commit
aaafde4a7c
@ -114,13 +114,13 @@
|
|||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
type="button"
|
type="button"
|
||||||
id="add-project-button"
|
id="add-project-button"
|
||||||
on:click|preventDefault={handleAddProject}>Add</button
|
on:click|preventDefault={() => handleAddProject}>Add</button
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-danger"
|
class="btn btn-danger"
|
||||||
type="button"
|
type="button"
|
||||||
id="remove-project-button"
|
id="remove-project-button"
|
||||||
on:click|preventDefault={handleRemoveProject}>Remove</button
|
on:click|preventDefault={() => handleRemoveProject}>Remove</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -119,13 +119,13 @@
|
|||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
type="button"
|
type="button"
|
||||||
id="add-role-button"
|
id="add-role-button"
|
||||||
on:click|preventDefault={handleAddRole}>Add</button
|
on:click|preventDefault={() => handleAddRole}>Add</button
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-danger"
|
class="btn btn-danger"
|
||||||
type="button"
|
type="button"
|
||||||
id="remove-role-button"
|
id="remove-role-button"
|
||||||
on:click|preventDefault={handleRemoveRole}>Remove</button
|
on:click|preventDefault={() =>handleRemoveRole}>Remove</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
type="button"
|
type="button"
|
||||||
id="edit-notice-button"
|
id="edit-notice-button"
|
||||||
on:click|preventDefault={handleEditNotice}>Edit Notice</button
|
on:click|preventDefault={() => handleEditNotice}>Edit Notice</button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<p>
|
<p>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="scramble-names-checkbox"
|
id="scramble-names-checkbox"
|
||||||
style="margin-right: 1em;"
|
style="margin-right: 1em;"
|
||||||
on:click={handleScramble}
|
on:click={() => handleScramble}
|
||||||
bind:checked={scrambled}
|
bind:checked={scrambled}
|
||||||
/>
|
/>
|
||||||
Active?
|
Active?
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
<Button
|
<Button
|
||||||
color="secondary"
|
color="secondary"
|
||||||
size="sm"
|
size="sm"
|
||||||
on:click={reloadUserList}
|
on:click={() => reloadUserList}
|
||||||
style="float: right;">Reload</Button
|
style="float: right;">Reload</Button
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
<td
|
<td
|
||||||
><button
|
><button
|
||||||
class="btn btn-danger del-user"
|
class="btn btn-danger del-user"
|
||||||
on:click={deleteUser(user.username)}>Delete</button
|
on:click={() => deleteUser(user.username)}>Delete</button
|
||||||
></td
|
></td
|
||||||
>
|
>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<td><code>{user?.roles ? user.roles.join(", ") : "No Roles"}</code></td>
|
<td><code>{user?.roles ? user.roles.join(", ") : "No Roles"}</code></td>
|
||||||
<td>
|
<td>
|
||||||
{#if !jwt}
|
{#if !jwt}
|
||||||
<Button color="success" on:click={getUserJwt(user.username)}
|
<Button color="success" on:click={() => getUserJwt(user.username)}
|
||||||
>Gen. JWT</Button
|
>Gen. JWT</Button
|
||||||
>
|
>
|
||||||
{:else}
|
{:else}
|
||||||
|
@ -137,7 +137,7 @@
|
|||||||
<CardBody>
|
<CardBody>
|
||||||
<CardTitle>Generate JWT</CardTitle>
|
<CardTitle>Generate JWT</CardTitle>
|
||||||
{#if jwt}
|
{#if jwt}
|
||||||
<Button color="secondary" on:click={clipJwt()}>
|
<Button color="secondary" on:click={() => clipJwt()}>
|
||||||
Copy JWT to Clipboard
|
Copy JWT to Clipboard
|
||||||
</Button>
|
</Button>
|
||||||
<p class="mt-2">
|
<p class="mt-2">
|
||||||
@ -149,7 +149,7 @@
|
|||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<Button color="success" on:click={getUserJwt(username)}>
|
<Button color="success" on:click={() => getUserJwt(username)}>
|
||||||
Generate JWT for '{username}'
|
Generate JWT for '{username}'
|
||||||
</Button>
|
</Button>
|
||||||
<p class="mt-2">
|
<p class="mt-2">
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
placeholder={presetProject ? `Find ${mode} in ${scrambleNames ? scramble(presetProject) : presetProject} ...` : `Find ${mode} ...`}
|
placeholder={presetProject ? `Find ${mode} in ${scrambleNames ? scramble(presetProject) : presetProject} ...` : `Find ${mode} ...`}
|
||||||
/>
|
/>
|
||||||
{#if presetProject}
|
{#if presetProject}
|
||||||
<Button title="Reset Project" on:click={resetProject}
|
<Button title="Reset Project" on:click={() => resetProject}
|
||||||
><Icon name="arrow-counterclockwise" /></Button
|
><Icon name="arrow-counterclockwise" /></Button
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
<a href="/monitoring/job/{job.id}" target="_blank">{job.jobId}</a>
|
<a href="/monitoring/job/{job.id}" target="_blank">{job.jobId}</a>
|
||||||
({job.cluster})
|
({job.cluster})
|
||||||
</span>
|
</span>
|
||||||
<Button id={`${job.cluster}-${job.jobId}-clipboard`} outline color="secondary" size="sm" on:click={clipJobId(job.jobId)} >
|
<Button id={`${job.cluster}-${job.jobId}-clipboard`} outline color="secondary" size="sm" on:click={() => clipJobId(job.jobId)} >
|
||||||
{#if displayCheck}
|
{#if displayCheck}
|
||||||
<Icon name="clipboard2-check-fill"/>
|
<Icon name="clipboard2-check-fill"/>
|
||||||
{:else}
|
{:else}
|
||||||
|
@ -29,13 +29,13 @@
|
|||||||
<div class="cc-pagination-right">
|
<div class="cc-pagination-right">
|
||||||
{#if !backButtonDisabled}
|
{#if !backButtonDisabled}
|
||||||
<button aria-label="page-reset" class="reset nav" type="button"
|
<button aria-label="page-reset" class="reset nav" type="button"
|
||||||
on:click|preventDefault="{reset}"></button>
|
on:click|preventDefault={() => reset}></button>
|
||||||
<button aria-label="page-back" class="left nav" type="button"
|
<button aria-label="page-back" class="left nav" type="button"
|
||||||
on:click|preventDefault="{() => { page -= 1; }}"></button>
|
on:click|preventDefault={() => { page -= 1; }}></button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if !nextButtonDisabled}
|
{#if !nextButtonDisabled}
|
||||||
<button aria-label="page-up" class="right nav" type="button"
|
<button aria-label="page-up" class="right nav" type="button"
|
||||||
on:click|preventDefault="{() => { page += 1; }}"></button>
|
on:click|preventDefault={() => { page += 1; }}></button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
</ListGroup>
|
</ListGroup>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" on:click={closeAndApply}>Close & Apply</Button>
|
<Button color="primary" on:click={() => closeAndApply}>Close & Apply</Button>
|
||||||
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Close</Button>
|
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Close</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
</ListGroup>
|
</ListGroup>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<Button color="primary" on:click={closeAndApply}>Close & Apply</Button>
|
<Button color="primary" on:click={() => closeAndApply}>Close & Apply</Button>
|
||||||
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Cancel</Button>
|
<Button color="secondary" on:click={() => (isOpen = !isOpen)}>Cancel</Button>
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
Loading…
Reference in New Issue
Block a user