Skip to content

Commit f9e76f9

Browse files
committed
Hided cache dir when using SSH Slurm
1 parent c1c7a9e commit f9e76f9

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

src/lib/components/v2/admin/UserEditor.svelte

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,25 @@
517517
<span class="invalid-feedback">{$settingsValidationErrors['slurm_user']}</span>
518518
</div>
519519
</div>
520+
<div class="row mb-3 has-validation">
521+
<label for="cacheDir" class="col-sm-3 col-form-label text-end">
522+
<strong>Cache dir</strong>
523+
</label>
524+
<div class="col-sm-9">
525+
<input
526+
type="text"
527+
class="form-control"
528+
id="cacheDir"
529+
bind:value={settings.cache_dir}
530+
class:is-invalid={settingsFormSubmitted && $settingsValidationErrors['cache_dir']}
531+
/>
532+
<div class="form-text">
533+
Absolute path to a user-owned folder that will be used as a cache for job-related
534+
files
535+
</div>
536+
<span class="invalid-feedback">{$settingsValidationErrors['cache_dir']}</span>
537+
</div>
538+
</div>
520539
{:else if runnerBackend === 'slurm_ssh'}
521540
<div class="row mb-3 has-validation">
522541
<label for="sshHost" class="col-sm-3 col-form-label text-end">
@@ -652,24 +671,6 @@
652671
</div>
653672
</div>
654673
</div>
655-
<div class="row mb-3 has-validation">
656-
<label for="cacheDir" class="col-sm-3 col-form-label text-end">
657-
<strong>Cache dir</strong>
658-
</label>
659-
<div class="col-sm-9">
660-
<input
661-
type="text"
662-
class="form-control"
663-
id="cacheDir"
664-
bind:value={settings.cache_dir}
665-
class:is-invalid={settingsFormSubmitted && $settingsValidationErrors['cache_dir']}
666-
/>
667-
<div class="form-text">
668-
Absolute path to a user-owned folder that will be used as a cache for job-related files
669-
</div>
670-
<span class="invalid-feedback">{$settingsValidationErrors['cache_dir']}</span>
671-
</div>
672-
</div>
673674
<div class="row mb-3">
674675
<div class="col-sm-9 offset-sm-3">
675676
<StandardDismissableAlert message={settingsUpdatedMessage} />

src/lib/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ export type User = {
122122
}
123123

124124
export type UserSettings = {
125-
cache_dir: string | null
126125
slurm_accounts: string[]
127126
// Slurm
128127
slurm_user: string | null
128+
cache_dir: string | null
129129
// Slurm SSH
130130
ssh_host: string | null
131131
ssh_username: string | null

src/routes/v2/admin/users/[userId]/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
<th>SLURM user</th>
8585
<td>{settings.slurm_user || '-'}</td>
8686
</tr>
87+
<tr>
88+
<th>Cache dir</th>
89+
<td>{settings.cache_dir || '-'}</td>
90+
</tr>
8791
{/if}
8892
{#if runnerBackend === 'slurm_ssh'}
8993
<tr>
@@ -121,10 +125,6 @@
121125
{/if}
122126
</td>
123127
</tr>
124-
<tr>
125-
<th>Cache dir</th>
126-
<td>{settings.cache_dir || '-'}</td>
127-
</tr>
128128
{/if}
129129
</tbody>
130130
</table>

0 commit comments

Comments
 (0)