mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Allow users to skip overwriting credential environment variables.
This commit is contained in:
parent
44dcd48a56
commit
055b183f2a
@ -191,19 +191,19 @@ namespace CarCareTracker.Helper
|
||||
{
|
||||
serverConfig.ServerURL = null;
|
||||
}
|
||||
if (!serverConfig.CustomWidgetsEnabled.Value)
|
||||
if (serverConfig.CustomWidgetsEnabled.HasValue && !serverConfig.CustomWidgetsEnabled.Value)
|
||||
{
|
||||
serverConfig.CustomWidgetsEnabled = null;
|
||||
}
|
||||
if (!serverConfig.InvariantAPIEnabled.Value)
|
||||
if (serverConfig.InvariantAPIEnabled.HasValue && !serverConfig.InvariantAPIEnabled.Value)
|
||||
{
|
||||
serverConfig.InvariantAPIEnabled = null;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(serverConfig.SMTPConfig.EmailServer))
|
||||
if (string.IsNullOrWhiteSpace(serverConfig.SMTPConfig?.EmailServer ?? string.Empty))
|
||||
{
|
||||
serverConfig.SMTPConfig = null;
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(serverConfig.OIDCConfig.Name))
|
||||
if (string.IsNullOrWhiteSpace(serverConfig.OIDCConfig?.Name ?? string.Empty))
|
||||
{
|
||||
serverConfig.OIDCConfig = null;
|
||||
}
|
||||
|
||||
@ -44,7 +44,16 @@
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label for="inputPostgres">@translator.Translate(userLanguage, "Postgres Connection")</label>
|
||||
<input type="text" id="inputPostgres" class="form-control" placeholder="@translator.Translate(userLanguage, "Not Configured")" value="@Model.PostgresConnection">
|
||||
<div class="input-group">
|
||||
<input type="text" id="inputPostgres" class="form-control" placeholder="@translator.Translate(userLanguage, "Not Configured")" value="@Model.PostgresConnection">
|
||||
<div class="input-group-text">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="skipPostgres">
|
||||
<label class="form-check-label" for="skipPostgres">@translator.Translate(userLanguage, "Skip")</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<small class="text-body-secondary">@translator.Translate(userLanguage, "Restart Required")</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@ -88,7 +97,13 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="setup-wizard-content" data-page="2" style="display:none;">
|
||||
<span class="display-5">@translator.Translate(userLanguage, "SMTP")</span>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<span class="display-5">@translator.Translate(userLanguage, "SMTP")</span>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" onchange="nextOnSkip(this)" role="switch" id="skipSMTP">
|
||||
<label class="form-check-label" for="skipSMTP">@translator.Translate(userLanguage, "Skip")</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
@ -124,7 +139,13 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="setup-wizard-content" data-page="3" style="display:none;">
|
||||
<span class="display-5">@translator.Translate(userLanguage, "Single Sign On")</span>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<span class="display-5">@translator.Translate(userLanguage, "Single Sign On")</span>
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" onchange="nextOnSkip(this)" role="switch" id="skipOIDC">
|
||||
<label class="form-check-label" for="skipOIDC">@translator.Translate(userLanguage, "Skip")</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -97,6 +97,16 @@ function saveSetup() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
//nullify skipped settings
|
||||
if ($("#skipSMTP").is(":checked")) {
|
||||
setupData["SMTPConfig"] = null;
|
||||
}
|
||||
if ($("#skipOIDC").is(":checked")) {
|
||||
setupData["OIDCConfig"] = null;
|
||||
}
|
||||
if ($("#skipPostgres").is(":checked")) {
|
||||
setupData["PostgresConnection"] = null;
|
||||
}
|
||||
let rootUserOIDC = $("#inputOIDCRootUser");
|
||||
if (rootUserOIDC.length > 0) {
|
||||
setupData["EnableRootUserOIDC"] = $("#inputOIDCRootUser").val();
|
||||
@ -142,4 +152,9 @@ function sendTestEmail() {
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
function nextOnSkip(sender) {
|
||||
if ($(sender).is(":checked")) {
|
||||
nextSetupPage();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user