23-12-2022
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
@using ECM.JobRunner.Common.JobRunnerReference;
|
||||
@using ECM.JobRunner.Web.Data;
|
||||
@inject ImportProfileService Import;
|
||||
@inject HelperService Jobs;
|
||||
@inject WcfService Service;
|
||||
|
||||
@if (profile == null)
|
||||
@@ -144,9 +143,10 @@ else
|
||||
</label>
|
||||
<select class="form-select" aria-label="Job type selection" id="jobType" @bind="profile.SubfolderDateFormat">
|
||||
<option selected value="">Keine Unterordner</option>
|
||||
<option value="YYYY">YYYY (@DateTime.Now.ToString("yyyy"))</option>
|
||||
<option value="YYYY-MM">YYYY-MM (@DateTime.Now.ToString("yyyy-MM"))</option>
|
||||
<option value="YYYY-MM-DD">YYYY-MM-DD (@DateTime.Now.ToString("yyyy-MM-dd"))</option>
|
||||
@foreach (var dateString in GetSubdirectoryDateStrings())
|
||||
{
|
||||
<option value=@dateString.formatString>@dateString.prettyName (@dateString.exampleValue)</option>
|
||||
}
|
||||
</select>
|
||||
<div id="cronHelp" class="form-text">Der Windream Objekttyp, dem das Profil zugeordnet wird. Bestimmt u.a., welche Indexe zur Verfügung stehen.</div>
|
||||
</div>
|
||||
@@ -195,6 +195,24 @@ else
|
||||
return ProfileId == Constants.ENTITY_ID_NEW ? "profiles/import" : $"profiles/import/{ProfileId}";
|
||||
}
|
||||
|
||||
private List<SubdirectoryDateString> GetSubdirectoryDateStrings()
|
||||
{
|
||||
return new()
|
||||
{
|
||||
new() {prettyName = $"YYYY", exampleValue = $"{DateTime.Now:yyyy}", formatString = "yyyy" },
|
||||
new() {prettyName = $"YYYY\\MM", exampleValue = $"{DateTime.Now:yyyy\\\\MM}", formatString = "yyyy\\MM" },
|
||||
new() {prettyName = $"YYYY\\MM\\DD", exampleValue = $"{DateTime.Now:yyyy\\\\MM\\\\dd}", formatString = "yyyy\\MM\\dd" }
|
||||
};
|
||||
}
|
||||
|
||||
private class SubdirectoryDateString
|
||||
{
|
||||
public string? prettyName;
|
||||
public string? exampleValue;
|
||||
public string? formatString;
|
||||
}
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
jobTypes = await Service.GetJobTypes();
|
||||
|
||||
Reference in New Issue
Block a user