mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-01-26 03:19:06 +01:00
Feat: Add by-user setting for paging type
- Solves Add User-Configuration for Infinite Scroll #262
This commit is contained in:
parent
f80123c85d
commit
136460567c
@ -275,7 +275,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Row cols={3} class="p-2 g-2">
|
||||
<Row cols={4} class="p-2 g-2">
|
||||
<!-- LINE WIDTH -->
|
||||
<Col
|
||||
><Card class="h-100">
|
||||
@ -422,6 +422,60 @@
|
||||
</form>
|
||||
</Card></Col
|
||||
>
|
||||
|
||||
<!-- PAGING -->
|
||||
<Col
|
||||
><Card class="h-100">
|
||||
<form
|
||||
id="paging-form"
|
||||
method="post"
|
||||
action="/api/configuration/"
|
||||
class="card-body"
|
||||
on:submit|preventDefault={() =>
|
||||
handleSettingSubmit("#paging-form", "pag")}
|
||||
>
|
||||
<!-- Svelte 'class' directive only on DOMs directly, normal 'class="xxx"' does not work, so style-array it is. -->
|
||||
<CardTitle
|
||||
style="margin-bottom: 1em; display: flex; align-items: center;"
|
||||
>
|
||||
<div>Paging Type</div>
|
||||
{#if displayMessage && message.target == "pag"}<div
|
||||
style="margin-left: auto; font-size: 0.9em;"
|
||||
>
|
||||
<code style="color: {message.color};" out:fade
|
||||
>Update: {message.msg}</code
|
||||
>
|
||||
</div>{/if}
|
||||
</CardTitle>
|
||||
<input type="hidden" name="key" value="job_list_usePaging" />
|
||||
<div class="mb-3">
|
||||
<div>
|
||||
{#if config.job_list_usePaging}
|
||||
<input type="radio" id="true" name="value" value="true" checked />
|
||||
{:else}
|
||||
<input type="radio" id="true" name="value" value="true" />
|
||||
{/if}
|
||||
<label for="true">Paging with selectable count of jobs.</label>
|
||||
</div>
|
||||
<div>
|
||||
{#if config.job_list_usePaging}
|
||||
<input type="radio" id="false" name="value" value="false" />
|
||||
{:else}
|
||||
<input
|
||||
type="radio"
|
||||
id="false"
|
||||
name="value"
|
||||
value="false"
|
||||
checked
|
||||
/>
|
||||
{/if}
|
||||
<label for="false">Continuous scroll iteratively adding 10 jobs.</label>
|
||||
</div>
|
||||
</div>
|
||||
<Button color="primary" type="submit">Submit</Button>
|
||||
</form>
|
||||
</Card></Col
|
||||
>
|
||||
</Row>
|
||||
|
||||
<Row cols={1} class="p-2 g-2">
|
||||
|
Loading…
Reference in New Issue
Block a user