add length option to template
This commit is contained in:
@@ -159,6 +159,9 @@ export default [
|
||||
"label": "Secret Key Base",
|
||||
"defaultValue": "$$generate_passphrase",
|
||||
"description": "",
|
||||
"details": {
|
||||
"length":64
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "$$config_disable_auth",
|
||||
|
@@ -221,9 +221,11 @@ export async function saveServiceType(request: FastifyRequest<SaveServiceType>,
|
||||
let { id: variableId } = variable;
|
||||
if (variableId.startsWith('$$secret_')) {
|
||||
if (variable.defaultValue === '$$generate_password') {
|
||||
variable.value = generatePassword({});
|
||||
const length = variable?.details['length'] || null
|
||||
variable.value = generatePassword({length});
|
||||
} else if (variable.defaultValue === '$$generate_passphrase') {
|
||||
variable.value = cuid();
|
||||
const length = variable?.details['length'] || null
|
||||
variable.value = generatePassword({length});
|
||||
}
|
||||
}
|
||||
if (variableId.startsWith('$$config_')) {
|
||||
|
@@ -135,7 +135,7 @@
|
||||
<div class="text-xl font-bold tracking-tighter">Container not found / exited.</div>
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="relative w-full"></div>
|
||||
<div class="relative w-full" />
|
||||
<div class="flex justify-start sticky space-x-2 pb-2">
|
||||
<button
|
||||
on:click={followBuild}
|
||||
@@ -176,7 +176,6 @@
|
||||
<p>{log + '\n'}</p>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
Reference in New Issue
Block a user