Adding
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
@@ -0,0 +1,330 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015/2017 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# Visual Studio 2017 auto generated files
|
||||
Generated\ Files/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
# StyleCop
|
||||
StyleCopReport.xml
|
||||
|
||||
# Files built by Visual Studio
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.iobj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.ipdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Visual Studio Trace Files
|
||||
*.e2e
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# AxoCover is a Code Coverage Tool
|
||||
.axoCover/*
|
||||
!.axoCover/settings.json
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/[Pp]ackages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/[Pp]ackages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/[Pp]ackages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Including strong name files can present a security risk
|
||||
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||
#*.snk
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
ServiceFabricBackup/
|
||||
*.rptproj.bak
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
*.rptproj.rsuser
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# OpenCover UI analysis results
|
||||
OpenCover/
|
||||
|
||||
# Azure Stream Analytics local run output
|
||||
ASALocalRun/
|
||||
|
||||
# MSBuild Binary and Structured Log
|
||||
*.binlog
|
||||
|
||||
# NVidia Nsight GPU debugger configuration file
|
||||
*.nvuser
|
||||
|
||||
# MFractors (Xamarin productivity tool) working folder
|
||||
.mfractor/
|
||||
@@ -0,0 +1,36 @@
|
||||
# .NET Core SDK
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS aspnetcore-build
|
||||
|
||||
# Copy Projects
|
||||
COPY LCU.WebApps.Internal.DispatcherManager/LCU.WebApps.Internal.DispatcherManager.csproj ./source/LCU.WebApps.Internal.DispatcherManager/
|
||||
|
||||
# Install Credential Provider and set env variables to enable Nuget restore with auth
|
||||
ARG PAT=bh2lq3jibktw67b2wdbqyfln7cd3je6lk52kijntpj43v6kimpgq
|
||||
RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh
|
||||
#RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
|
||||
ENV NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED=true
|
||||
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS="{\"endpointCredentials\": [{\"endpoint\":\"https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/nuget/v3/index.json\", \"password\":\"${PAT}\"}]}"
|
||||
|
||||
# .NET Core Restore, use auth'd feed
|
||||
RUN dotnet restore -s "https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/nuget/v3/index.json" -s "https://api.nuget.org/v3/index.json" ./source/LCU.WebApps.Internal.DispatcherManager/LCU.WebApps.Internal.DispatcherManager.csproj
|
||||
|
||||
# Copy All Files
|
||||
COPY . ./source/
|
||||
|
||||
# .NET Core Publish
|
||||
FROM aspnetcore-build AS publish
|
||||
RUN dotnet publish ./source/LCU.WebApps.Internal.DispatcherManager/LCU.WebApps.Internal.DispatcherManager.csproj -c Release -o /dist
|
||||
|
||||
# ASP.NET Core
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.20
|
||||
RUN apk add --no-cache icu-libs && apk add --no-cache tzdata;
|
||||
WORKDIR /app
|
||||
COPY --from=publish /dist .
|
||||
|
||||
# ENVIRONMENT VALUES
|
||||
ENV TZ=America/Chicago
|
||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||
ENV ASPNETCORE_FORWARDEDHEADERS_ENABLED=true
|
||||
|
||||
ENTRYPOINT ["dotnet", "LCU.WebApps.Internal.DispatcherManager.dll"]
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LCU.WebApps.Internal.DispatcherManager", "LCU.WebApps.Internal.DispatcherManager\LCU.WebApps.Internal.DispatcherManager.csproj", "{E6C8E078-B341-406E-B835-6733481BFACF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E6C8E078-B341-406E-B835-6733481BFACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E6C8E078-B341-406E-B835-6733481BFACF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E6C8E078-B341-406E-B835-6733481BFACF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E6C8E078-B341-406E-B835-6733481BFACF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {52C37430-1E89-47B3-8D54-8F0836A59C8D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<CascadingAuthenticationState>
|
||||
<CascadingBlazoredModal DisableBackgroundCancel="true">
|
||||
<Router AppAssembly="@typeof(Program).Assembly">
|
||||
<Found Context="routeData">
|
||||
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p>Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
</CascadingBlazoredModal>
|
||||
</CascadingAuthenticationState>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
|
||||
public class AppConfiguration
|
||||
{
|
||||
public string AppName { get; set; }
|
||||
public string SeqUrl { get; set; }
|
||||
public string SeqApiKey { get; set; }
|
||||
public string[] CorsAllowedOrigins { get; set; }
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
|
||||
public class DispatcherApiConfiguration
|
||||
{
|
||||
public string Url { get; set; }
|
||||
public string JobControllerEndpoint { get; set; }
|
||||
public string GetFilteredJobsEndpoint { get; set; }
|
||||
public string TagControllerEndpoint { get; set; }
|
||||
public string GetAllCleanUpJobSettingEndpoint { get; set; }
|
||||
public string ExecutionMessageControllerEndpoint { get; set; }
|
||||
public string GetJobTagsByTagIdEndpoint { get; set; }
|
||||
public string RunJobNowEndpoint { get; set; }
|
||||
public string DeactivateJobEndpoint { get; set; }
|
||||
public string RescheduleJobEndpoint { get; set; }
|
||||
public string QueueExecutionControllerEndpoint { get; set; }
|
||||
public string QueueCompletionControllerEndpoint { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string JobControllerEndpointUrl => Url + JobControllerEndpoint;
|
||||
[NotMapped]
|
||||
public string GetFilteredJobsEndpointUrl => Url + GetFilteredJobsEndpoint;
|
||||
[NotMapped]
|
||||
public string TagControllerEndpointUrl => Url + TagControllerEndpoint;
|
||||
[NotMapped]
|
||||
public string GetAllCleanUpJobSettingEndpointUrl => Url + GetAllCleanUpJobSettingEndpoint;
|
||||
[NotMapped]
|
||||
public string ExecutionMessageControllerEndpointUrl => Url + ExecutionMessageControllerEndpoint;
|
||||
[NotMapped]
|
||||
public string GetJobTagsByTagIdEndpointUrl => Url + GetJobTagsByTagIdEndpoint;
|
||||
[NotMapped]
|
||||
public string RunJobNowEndpointUrl => Url + RunJobNowEndpoint;
|
||||
[NotMapped]
|
||||
public string DeactivateJobEndpointUrl => Url + DeactivateJobEndpoint;
|
||||
[NotMapped]
|
||||
public string RescheduleJobEndpointUrl => Url + RescheduleJobEndpoint;
|
||||
[NotMapped]
|
||||
public string QueueExecutionControllerEndpointUrl => Url + QueueExecutionControllerEndpoint;
|
||||
[NotMapped]
|
||||
public string QueueCompletionControllerEndpointUrl => Url + QueueCompletionControllerEndpoint;
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models.NameSettings;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Helpers;
|
||||
|
||||
public static class DynamicNameHelper
|
||||
{
|
||||
public static DynamicNameSetting AddDynamicNameSetting(this DynamicNameSetting? current, bool addDate, bool addRegex)
|
||||
{
|
||||
var dynamicNameSetting = current ?? new DynamicNameSetting();
|
||||
dynamicNameSetting.DateFormatSettings = addDate ? current?.DateFormatSettings ?? new List<DateFormatSetting>() : null;
|
||||
dynamicNameSetting.RegexSettings = addRegex ? current?.RegexSettings ?? new List<RegexSetting>() : null;
|
||||
|
||||
return dynamicNameSetting;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Blazored.Toast.Services;
|
||||
using LCU.Library.Internal.DispatcherModels.Enums;
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Helpers;
|
||||
|
||||
public class GridHelpers
|
||||
{
|
||||
IToastService _toastService;
|
||||
public event Action OnChange;
|
||||
private void NotifyStateChanged() => OnChange?.Invoke();
|
||||
public GridHelpers(IToastService toastService)
|
||||
{
|
||||
_toastService = toastService;
|
||||
}
|
||||
|
||||
public string NullableDateStringDisplay(DateTime? date)
|
||||
{
|
||||
return (date == null ? "-" : date.ToString());
|
||||
}
|
||||
|
||||
public string EmptyNullStringDisplay(string value)
|
||||
{
|
||||
return string.IsNullOrEmpty(value) ? "-" : value;
|
||||
}
|
||||
public string CollapsedIcon(bool collapsed)
|
||||
{
|
||||
return collapsed ? "oi-caret-bottom" : "oi-caret-left";
|
||||
}
|
||||
|
||||
public string CollapsedMessageIcon(bool collapsed, bool workItemIdClicked)
|
||||
{
|
||||
if (!workItemIdClicked)
|
||||
{
|
||||
return "oi-caret-bottom";
|
||||
}
|
||||
return collapsed ? "oi-caret-bottom" : "oi-caret-left";
|
||||
}
|
||||
|
||||
public string CollapsedTitle(bool collapsed)
|
||||
{
|
||||
return collapsed ? "Open" : "Close";
|
||||
}
|
||||
|
||||
public void ToggleCollapsed(ref bool isCollapsed)
|
||||
{
|
||||
isCollapsed = !isCollapsed;
|
||||
NotifyStateChanged();
|
||||
}
|
||||
|
||||
public string FindJobStatusIcon(JobStatus status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case JobStatus.Inactive:
|
||||
return "oi-ban inactive-icon";
|
||||
case JobStatus.Failed:
|
||||
return "oi-warning error-icon";
|
||||
case JobStatus.ReadyToSchedule:
|
||||
return "oi-calendar processing-icon";
|
||||
case JobStatus.PendingToRun:
|
||||
return "oi-timer success-icon";
|
||||
case JobStatus.Processing:
|
||||
return "oi-loop-circular processing-icon";
|
||||
case JobStatus.DeterminingOperation:
|
||||
return "oi-signpost processing-icon";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public string FindStatusIcon(StatusType status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case StatusType.Inactive:
|
||||
return "oi-ban inactive-icon";
|
||||
case StatusType.Failed:
|
||||
return "oi-warning error-icon";
|
||||
case StatusType.Completed:
|
||||
return "oi-circle-check success-icon";
|
||||
case StatusType.Pending:
|
||||
return "oi-timer success-icon";
|
||||
case StatusType.Processing:
|
||||
return "oi-loop-circular processing-icon";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateResponse(bool result, string successMessage, string errorMessage)
|
||||
{
|
||||
if (result)
|
||||
{
|
||||
_toastService.ShowSuccess(successMessage);
|
||||
NotifyStateChanged();
|
||||
}
|
||||
else
|
||||
{
|
||||
_toastService.ShowError(errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Helpers
|
||||
{
|
||||
public class IEHelpers
|
||||
{
|
||||
private IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
public IEHelpers(IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
public bool IsIE()
|
||||
{
|
||||
string userAgent = _httpContextAccessor.HttpContext.Request.Headers["User-Agent"];
|
||||
return userAgent.Contains("MSIE") || userAgent.Contains("Trident");
|
||||
}
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Rendering;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Helpers
|
||||
{
|
||||
public class InputDateTime<TValue> : InputDate<TValue>
|
||||
{
|
||||
private const string DateFormat = "yyyy-MM-ddTHH:mm:ss";
|
||||
|
||||
protected override void BuildRenderTree(RenderTreeBuilder builder)
|
||||
{
|
||||
builder.OpenElement(0, "input");
|
||||
builder.AddMultipleAttributes(1, AdditionalAttributes);
|
||||
builder.AddAttribute(2, "type", "datetime-local");
|
||||
builder.AddAttribute(3, "class", CssClass);
|
||||
builder.AddAttribute(4, "value", BindConverter.FormatValue(CurrentValueAsString));
|
||||
builder.AddAttribute(5, "onchange", EventCallback.Factory.CreateBinder<string>(this, __value => CurrentValueAsString = __value, CurrentValueAsString));
|
||||
builder.CloseElement();
|
||||
}
|
||||
|
||||
protected override string FormatValueAsString(TValue value)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case DateTime dateTimeValue:
|
||||
return BindConverter.FormatValue(dateTimeValue, DateFormat, CultureInfo.InvariantCulture);
|
||||
case DateTimeOffset dateTimeOffsetValue:
|
||||
return BindConverter.FormatValue(dateTimeOffsetValue, DateFormat, CultureInfo.InvariantCulture);
|
||||
default:
|
||||
return string.Empty; // Handles null for Nullable<DateTime>, etc.
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool TryParseValueFromString(string value, out TValue result, out string validationErrorMessage)
|
||||
{
|
||||
// Unwrap nullable types. We don't have to deal with receiving empty values for nullable
|
||||
// types here, because the underlying InputBase already covers that.
|
||||
var targetType = Nullable.GetUnderlyingType(typeof(TValue)) ?? typeof(TValue);
|
||||
|
||||
bool success;
|
||||
if (targetType == typeof(DateTime))
|
||||
{
|
||||
success = TryParseDateTime(value, out result);
|
||||
}
|
||||
else if (targetType == typeof(DateTimeOffset))
|
||||
{
|
||||
success = TryParseDateTimeOffset(value, out result);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new InvalidOperationException($"The type '{targetType}' is not a supported date type.");
|
||||
}
|
||||
|
||||
if (success)
|
||||
{
|
||||
validationErrorMessage = null;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
validationErrorMessage = string.Format(ParsingErrorMessage, FieldIdentifier.FieldName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool TryParseDateTime(string value, out TValue result)
|
||||
{
|
||||
var success = BindConverter.TryConvertToDateTime(value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue);
|
||||
if (success)
|
||||
{
|
||||
result = (TValue)(object)parsedValue;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static bool TryParseDateTimeOffset(string value, out TValue result)
|
||||
{
|
||||
var success = BindConverter.TryConvertToDateTimeOffset(value, CultureInfo.InvariantCulture, DateFormat, out var parsedValue);
|
||||
if (success)
|
||||
{
|
||||
result = (TValue)(object)parsedValue;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Serilog;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Helpers
|
||||
{
|
||||
public class ServiceHelpers
|
||||
{
|
||||
private IConfiguration _config;
|
||||
private AuthenticationStateProvider _authenticationStateProvider;
|
||||
|
||||
public ServiceHelpers(IConfiguration config, AuthenticationStateProvider authenticationStateProvider)
|
||||
{
|
||||
_config = config;
|
||||
_authenticationStateProvider = authenticationStateProvider;
|
||||
}
|
||||
|
||||
public string GetConrollerApiUrl(string apiUrl, string controller)
|
||||
{
|
||||
return _config.GetValue<string>(apiUrl) + _config.GetValue<string>(controller);
|
||||
}
|
||||
|
||||
public string GetUserName()
|
||||
{
|
||||
var authState = _authenticationStateProvider.GetAuthenticationStateAsync().Result;
|
||||
|
||||
if (authState == null || authState.User == null ||
|
||||
authState.User.Identity == null || authState.User.Identity.Name == null)
|
||||
{
|
||||
Log.Error("Could not get user identity by AuthenticationState");
|
||||
return "";
|
||||
}
|
||||
|
||||
var userName = authState.User.Identity.Name;
|
||||
return userName.Substring(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Version>1.1.0</Version>
|
||||
<Description>1.1.0 - Some refactoring and Added Notifications Email Request as an option.</Description>
|
||||
<PackageReleaseNotes>1.1.0 - Some refactoring and Added Notifications Email Request as an option.</PackageReleaseNotes>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.FluentValidation" Version="2.1.0" />
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.4.0" />
|
||||
<PackageReference Include="Blazored.Modal" Version="7.1.0" />
|
||||
<PackageReference Include="Blazored.Toast" Version="3.2.2" />
|
||||
<PackageReference Include="Blazored.Typeahead" Version="4.7.0" />
|
||||
<PackageReference Include="LCU.Api.Internal.DispatcherSharedLib" Version="5.7.21" />
|
||||
<PackageReference Include="LCU.Library.Internal.DispatcherModels" Version="1.20.14" />
|
||||
<PackageReference Include="LCU.Library.Internal.LcuEvaluationComponents" Version="1.0.2" />
|
||||
<PackageReference Include="LCU.Library.Internal.LcuHttpClient" Version="2.0.1" />
|
||||
<PackageReference Include="LCU.Library.Internal.Logging" Version="2.2.0" />
|
||||
<PackageReference Include="LCU.Library.Internal.RazorComponents" Version="3.0.3" />
|
||||
<PackageReference Include="LCU.Library.Internal.Security" Version="1.2.0" />
|
||||
<PackageReference Include="LCU.Library.Internal.RepoApiModels" Version="1.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Identity.Web" Version="2.12.4" />
|
||||
<PackageReference Include="Microsoft.Identity.Web.UI" Version="1.16.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\favicon.ico">
|
||||
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Constants;
|
||||
|
||||
public static class PolicyConstants
|
||||
{
|
||||
public static readonly List<string> Policies = new()
|
||||
{
|
||||
DispatcherAdminPolicy,
|
||||
DispatcherManagerPolicy,
|
||||
};
|
||||
|
||||
public const string DispatcherAdminPolicy = "DispatcherAdminPolicy";
|
||||
public const string DispatcherManagerPolicy = "DispatcherManagerPolicy";
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class CopyFileRequestValidator : AbstractValidator<CopyFileRequest>
|
||||
{
|
||||
public CopyFileRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source file name.");
|
||||
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.RegexSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A regex tag is missing in the source file name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class CreateDirectoryRequestValidator : AbstractValidator<CreateDirectoryRequest>
|
||||
{
|
||||
public CreateDirectoryRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.NameSetting.DateFormatSettings.
|
||||
Any(dfs => f.DirectoryName.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source file name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.DialerApiModels.Requests.CreateVoAppsCampaign;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class CreateVoAppsCampaignRequestValidator : AbstractValidator<CreateVoAppsCampaignRequest>
|
||||
{
|
||||
public CreateVoAppsCampaignRequestValidator()
|
||||
{
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Monday).NotNull().WithMessage("The Monday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Tuesday).NotNull().WithMessage("The Tuesday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Wednesday).NotNull().WithMessage("The Wednesday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Thursday).NotNull().WithMessage("The Thursday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Friday).NotNull().WithMessage("The Friday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Saturday).NotNull().WithMessage("The Saturday Message Id field is required.");
|
||||
RuleFor(f => f.VoAppsMessageIdSchedule.Sunday).NotNull().WithMessage("The Sunday Message Id field is required.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class DeleteEmptyDirectoryRequestValidator : AbstractValidator<DeleteEmptyDirectoryRequest>
|
||||
{
|
||||
public DeleteEmptyDirectoryRequestValidator()
|
||||
{
|
||||
RuleFor(f => f.SubDirectoryPath).NotNull().WithMessage("The Sub Directory Path is required");
|
||||
RuleFor(f => f.DynamicDirectoryName).NotNull().WithMessage("The Dynamic Directory Name is required");
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class DeleteFileRequestValidator : AbstractValidator<DeleteFileRequest>
|
||||
{
|
||||
public DeleteFileRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source file name.");
|
||||
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.RegexSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A regex tag is missing in the source file name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.NotificationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class EmailRequestValidator : AbstractValidator<EmailRequest>
|
||||
{
|
||||
|
||||
public EmailRequestValidator()
|
||||
{
|
||||
RuleFor(e => e.Recipient).NotNull().WithMessage("Recipients are required");
|
||||
RuleFor(e => e.Recipient).Must(rs => rs.Any()).WithMessage("Recipients are required");
|
||||
RuleFor(e => e.Recipient).Must(rs => !rs.Any(r => string.IsNullOrEmpty(r))).WithMessage("Recipient must not be empty.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
using System.Linq;
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class ExtractIndexFileDataRequestValidator : AbstractValidator<ExtractIndexFileDataRequest>
|
||||
{
|
||||
public ExtractIndexFileDataRequestValidator()
|
||||
{
|
||||
RuleSet("ExtractIndexFileDataRequest", () =>
|
||||
{
|
||||
RuleFor(t => t.IndexFileName).NotEmpty().WithMessage("Index File Name is required");
|
||||
RuleFor(t => t.IndexFilePath).NotEmpty().WithMessage("Index File Path is required");
|
||||
RuleFor(t => t.DestinationIndexFileName).NotEmpty().WithMessage("Destination File Name is required");
|
||||
RuleFor(t => t.DestinationFilePath).NotEmpty().WithMessage("Destination File Path is required");
|
||||
RuleFor(t => t.IndexesToExtract).NotEmpty().When(x => !x.ExtractAllIndexes).WithMessage("Indexes To Extract cannot be empty");
|
||||
RuleFor(t => t.IndexesToExtract).Must(x => x?.Count <= 30).When(x => x.IndexesToExtract is not null).WithMessage("Indexes To Extract must be less than 30");
|
||||
RuleFor(t => t.IndexesToExtract).Must(x => !x.Any(y => y < 0)).When(x => x.IndexesToExtract is not null).WithMessage("Indexes To Extract cannot be less than zero");
|
||||
RuleFor(t => t.IndexesToExtract).Must(x => !x.Any(y => y >= 30)).When(x => x.IndexesToExtract is not null).WithMessage("Indexes To Extract must be less than 30");
|
||||
RuleFor(t => t.DelimiterType).NotNull().WithMessage("Delimiter Type is required");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Requests;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class ImportCreditCardSalesRequestValidator : AbstractValidator<ImportCreditCardSalesRequest>
|
||||
{
|
||||
public ImportCreditCardSalesRequestValidator()
|
||||
{
|
||||
RuleFor(f => f.DynamicFileName).NotNull().WithMessage("The Dynamic File Name is required");
|
||||
RuleFor(f => f.FilePath).NotNull().WithMessage("The File Path is required");
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.IncentiveApiModels.Requests;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class ImportIndirectVehicleSalesRequestValidator : AbstractValidator<ImportIndirectVehicleSalesRequest>
|
||||
{
|
||||
public ImportIndirectVehicleSalesRequestValidator()
|
||||
{
|
||||
RuleFor(f => f.IndirectDynamicFileName).NotNull().WithMessage("The Indirect File Name is required");
|
||||
RuleFor(f => f.DirectDynamicFileName).NotNull().WithMessage("The Direct File Name is required");
|
||||
RuleFor(f => f.FilePath).NotNull().WithMessage("The File Path is required");
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileUpdaterModels.Models.Requests;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class IndexFieldMapperValidator : AbstractValidator<IndexFieldMapperRequest>
|
||||
{
|
||||
public IndexFieldMapperValidator()
|
||||
{
|
||||
RuleFor(f => f.IndexFileDirectory).NotNull().WithMessage("The Index File Directory is required");
|
||||
RuleFor(f => f.DynamicFileName).NotNull().WithMessage("The Dynamic File Name is required");
|
||||
RuleFor(f => f.IndexFieldIndexNumber).NotNull().WithMessage("The Index Field Index Number is required");
|
||||
RuleFor(f => f.IndexFieldMappingHeadId).NotNull().WithMessage("The Index Field Mapping Head Id is required");
|
||||
RuleFor(f => f.IndexFieldAddLocation).NotNull().WithMessage("The Index Field Add Location is required");
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.MomBotModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators;
|
||||
|
||||
public class MomBotRequestValidator : AbstractValidator<MomBotRequest>
|
||||
{
|
||||
public MomBotRequestValidator()
|
||||
{
|
||||
RuleFor(m => m.Application).NotNull().When(f => !f.IsExternalUrl).WithMessage("Application Info Required");
|
||||
RuleFor(m => m.Description).NotNull().When(f => !f.IsExternalUrl).WithMessage("Description Info Required");
|
||||
RuleFor(m => m.Resource).NotNull().When(f => !f.IsExternalUrl).WithMessage("Resource Info Required");
|
||||
RuleFor(m => m.ConnectionInfo.Environment).NotNull().When(f => !f.IsExternalUrl).WithMessage("Environment Info Required");
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class MoveFileRequestValidator : AbstractValidator<MoveFileRequest>
|
||||
{
|
||||
public MoveFileRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source file name.");
|
||||
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.FileNameSetting.RegexSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A regex tag is missing in the source file name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class RenameDirectoryRequestValidator : AbstractValidator<RenameDirectoryRequest>
|
||||
{
|
||||
public RenameDirectoryRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.SourceDirectoryNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.SourceDirectoryName.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source directory name.");
|
||||
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.NewDirectoryNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.NewDirectoryName.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the new directory name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models;
|
||||
using System.Linq;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class RenameFileRequestValidator : AbstractValidator<RenameFileRequest>
|
||||
{
|
||||
public RenameFileRequestValidator()
|
||||
{
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.SourceNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.SourceFile.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the source file name.");
|
||||
|
||||
RuleFor(f => f).
|
||||
Must(f => !f.NewNameSetting.DateFormatSettings.
|
||||
Any(dfs => f.NewFilename.
|
||||
IndexOf(dfs.Tag) < 0)).
|
||||
WithMessage("A dateformat tag is missing in the new file name.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class TagNameRequestValidator : AbstractValidator<Tag>
|
||||
{
|
||||
public TagNameRequestValidator()
|
||||
{
|
||||
RuleFor(t => t.TagName).NotEmpty().WithMessage("Tag Name is required");
|
||||
RuleFor(t => t.TagName).MaximumLength(300).WithMessage("Requesting Application Max Length is 300");
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using LCU.Library.Internal.FileOperationsModels.Models.Requests;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models.Validators
|
||||
{
|
||||
public class ValidateFileSizeInRangeValidator : AbstractValidator<ValidateFileSizeInRangeRequest>
|
||||
{
|
||||
public ValidateFileSizeInRangeValidator()
|
||||
{
|
||||
RuleSet("ValidateFileSizeInRangeRequest", () =>
|
||||
{
|
||||
RuleFor(t => t).Must(x => x.EndFileSizeRange > x.StartFileSizeRange).WithMessage("Range maximum must be greater than the range minimum");
|
||||
RuleFor(t => t.FileSizeType).NotNull().WithMessage("File Size Type is required");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using LCU.Library.Internal.DispatcherModels.Models;
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Models;
|
||||
|
||||
public class WorkItemComponent
|
||||
{
|
||||
public WorkItemComponent(int key, string type, object item)
|
||||
{
|
||||
Key = key;
|
||||
Type = type;
|
||||
Item = item;
|
||||
IsCollapsed = false;
|
||||
IsValid = true;
|
||||
}
|
||||
public int Key { get; set; }
|
||||
public WorkItemDetails WorkItemDetails { get; set; }
|
||||
public int WorkItemId { get; set; }
|
||||
public string Type { get; set; }
|
||||
public object Item { get; set; }
|
||||
public EditContext EditContext { get; set; }
|
||||
public EditContext WorkItemDetailsEditContext { get; set; }
|
||||
public bool IsCollapsed { get; set; }
|
||||
public bool IsValid { get; set; }
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
@page "/Admin"
|
||||
@attribute [Authorize(PolicyConstants.DispatcherAdminPolicy)]
|
||||
|
||||
<AuthorizeView Policy="@PolicyConstants.DispatcherAdminPolicy">
|
||||
<TagAdminComponent />
|
||||
</AuthorizeView>
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
@page "/CreateJob"
|
||||
@inject IToastService toastService;
|
||||
@inject IModalService Modal;
|
||||
@inject JobStateService JobStateService;
|
||||
@implements IDisposable;
|
||||
@inject IJSRuntime JSRuntime;
|
||||
@attribute [Authorize(PolicyConstants.DispatcherAdminPolicy)]
|
||||
|
||||
<AuthorizeView Policy="@PolicyConstants.DispatcherAdminPolicy">
|
||||
<EditCreateJobContainer JobStateService="JobStateService">
|
||||
<button type="button" class="btn btn-success button-addition" @onclick="(() => ProcessForm())">
|
||||
<span class="oi oi-data-transfer-download"></span> Create Job
|
||||
</button>
|
||||
</EditCreateJobContainer>
|
||||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
private readonly LoadingModal _loading = new();
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
JobStateService.OnChange += StateHasChanged;
|
||||
}
|
||||
|
||||
protected override void OnAfterRender(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
}
|
||||
|
||||
private void Clear()
|
||||
{
|
||||
JobStateService.Reset();
|
||||
JobStateService.Scheduled = false;
|
||||
JobStateService.ActionTypeSelected = "";
|
||||
JobStateService.JobDetails.NextRunTime = null;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
JobStateService.OnChange -= StateHasChanged;
|
||||
}
|
||||
|
||||
private async Task ProcessForm()
|
||||
{
|
||||
_loading.Show(Modal);
|
||||
await Task.Delay(1);
|
||||
if (JobStateService.ValidateWorkItems())
|
||||
{
|
||||
var result = await JobStateService.SendJob();
|
||||
|
||||
if (result)
|
||||
{
|
||||
Clear();
|
||||
toastService.ShowSuccess("Successfully submitted your job.");
|
||||
}
|
||||
else
|
||||
{
|
||||
toastService.ShowError("There was an issue sending your job. Please try again.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
StateHasChanged();
|
||||
toastService.ShowError("A work item has invalid field(s). Please check your work items.");
|
||||
}
|
||||
|
||||
_loading.Close();
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
@page "/EditJob"
|
||||
@inject IModalService Modal;
|
||||
@inject IToastService toastService;
|
||||
@inject JobStateService JobStateService;
|
||||
@inject JobService JobService;
|
||||
@inject NavigationManager navigationManager;
|
||||
@inject GridHelpers GridHelpers;
|
||||
@inject IJSRuntime JsRuntime;
|
||||
@attribute [Authorize(PolicyConstants.DispatcherAdminPolicy)];
|
||||
|
||||
<AuthorizeView Policy="@PolicyConstants.DispatcherAdminPolicy">
|
||||
<EditCreateJobContainer JobStateService="JobStateService">
|
||||
<button type="button" class="btn btn-success button-addition" @onclick="(() => ProcessForm())">
|
||||
<span class="oi oi-data-transfer-download"></span> Update Job
|
||||
</button>
|
||||
<AuthorizeView Context="DeleteJobContext" Policy="@PolicyConstants.DispatcherAdminPolicy">
|
||||
<button type="button" class="btn btn-danger button-addition" @onclick="(() => RemoveJob())">
|
||||
<span class="oi oi-x"></span> Delete Job
|
||||
</button>
|
||||
</AuthorizeView>
|
||||
</EditCreateJobContainer>
|
||||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string JobParameter { get; set; }
|
||||
private Job Job { get; set; }
|
||||
private readonly LoadingModal _loading = new();
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
JobStateService.OnChange += StateHasChanged;
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
JobStateService.OnChange += StateHasChanged;
|
||||
JobStateService.MapJobToJobState();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
JobStateService.OnChange -= StateHasChanged;
|
||||
}
|
||||
|
||||
private async Task ProcessForm()
|
||||
{
|
||||
_loading.Show(Modal);
|
||||
await Task.Delay(1);
|
||||
if (JobStateService.ValidateWorkItems())
|
||||
{
|
||||
var result = await JobStateService.SendJob();
|
||||
var successMessage = "Successfully submitted your job to be updated.";
|
||||
var errorMessage = "There was an issue sending your job to be updated. Please try again.";
|
||||
GridHelpers.UpdateResponse(result, successMessage, errorMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
toastService.ShowError("A work item has invalid field(s). Please check your work items.");
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
_loading.Close();
|
||||
}
|
||||
|
||||
private async Task RemoveJob()
|
||||
{
|
||||
bool confirmed = await JsRuntime.InvokeAsync<bool>("confirm", "Are you sure?");
|
||||
|
||||
if (!confirmed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var result = await JobService.DeleteJob(JobStateService.JobDetails.JobId);
|
||||
|
||||
if (result)
|
||||
{
|
||||
toastService.ShowSuccess("Successfully deleted Job.");
|
||||
navigationManager.NavigateTo($"/");
|
||||
}
|
||||
else
|
||||
{
|
||||
toastService.ShowError("There was an issue deleting the Job.");
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
@page "/error"
|
||||
|
||||
|
||||
<h1 class="text-danger">Error.</h1>
|
||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
<p>
|
||||
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
@page "/"
|
||||
@inject IModalService Modal;
|
||||
@inject IToastService toastService;
|
||||
@inject JobService _jobService;
|
||||
@inject TagService _tagService;
|
||||
@inject FilterService _filterService;
|
||||
@attribute [Authorize(PolicyConstants.DispatcherAdminPolicy)]
|
||||
|
||||
<AuthorizeView Policy="@PolicyConstants.DispatcherAdminPolicy">
|
||||
<FilterContainer JobFilter="@jobFilter" Tags="@tags"
|
||||
FilterChanged="@((filter) => FilterChange(filter))" />
|
||||
<CardDisplay CenterCard="false">
|
||||
<div>
|
||||
<div class="container max-width-container">
|
||||
<JobPagingComponent JobFilter="@jobFilter" PagedResponse="@pagedResponse"
|
||||
FilterChanged="@((filter) => FilterChange(filter))" RefreshData="Refresh"/>
|
||||
</div>
|
||||
<div class="container max-width-container">
|
||||
@foreach (var job in jobs)
|
||||
{
|
||||
<JobContainer @key="job.JobId" Job="job" RefreshData="Refresh"> </JobContainer>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</CardDisplay>
|
||||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
private List<Job> jobs = new List<Job>();
|
||||
private List<Tag> tags = new List<Tag>();
|
||||
private PagedResponse<Job> pagedResponse { get; set; } = new PagedResponse<Job>();
|
||||
private Filter jobFilter { get; set; } = new Filter();
|
||||
private readonly LoadingModal _loading = new();
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
jobFilter = new Filter();
|
||||
pagedResponse = new PagedResponse<Job>();
|
||||
await FilterChange(jobFilter);
|
||||
await Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task FilterChange(Filter filter)
|
||||
{
|
||||
var filterCache = await _filterService.GetFilterItemAsync();
|
||||
if (filterCache != null)
|
||||
{
|
||||
jobFilter = await CheckDeletedTagsForCache(filterCache);
|
||||
}
|
||||
else
|
||||
{
|
||||
jobFilter = filter;
|
||||
}
|
||||
await Refresh();
|
||||
}
|
||||
|
||||
private async Task Refresh()
|
||||
{
|
||||
_loading.Show(Modal);
|
||||
await Task.Delay(1000);
|
||||
pagedResponse = await _jobService.GetFilteredJobs(jobFilter);
|
||||
|
||||
if (pagedResponse.Items is null)
|
||||
{
|
||||
toastService.ShowWarning("There were no Job's found.");
|
||||
jobs = new List<Job>();
|
||||
}
|
||||
else
|
||||
{
|
||||
jobs = pagedResponse.Items.ToList();
|
||||
}
|
||||
|
||||
tags = await _tagService.GetTags();
|
||||
StateHasChanged();
|
||||
_loading.Close();
|
||||
}
|
||||
|
||||
private async Task<Filter> CheckDeletedTagsForCache(Filter filter)
|
||||
{
|
||||
if (filter.TagIdFilters != null && filter.TagIdFilters.Any())
|
||||
{
|
||||
tags = await _tagService.GetTags();
|
||||
|
||||
var tagIds = tags.Select(x => x.TagId).ToList();
|
||||
var tagsMissing = filter.TagIdFilters.Where(cacheTags => !tagIds.Contains(cacheTags)).ToList();
|
||||
|
||||
if (tagsMissing.Any())
|
||||
{
|
||||
var validTags = filter.TagIdFilters.Where(cacheTags => tagIds.Contains(cacheTags)).ToList();
|
||||
filter.TagIdFilters = new List<int>(validTags);
|
||||
await _filterService.SetFilter(filter);
|
||||
toastService.ShowWarning("One or more of your cached tag(s) no longer exists.");
|
||||
}
|
||||
}
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
@page "/"
|
||||
@using LCU.Library.Internal.RazorComponents.LayoutComponents
|
||||
@namespace LCU.WebApps.Internal.DispatcherManager.Pages
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dispatcher Manager</title>
|
||||
<base href="~/" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
|
||||
<link href="css/site.css" rel="stylesheet" />
|
||||
<link href="_content/LCU.Library.Internal.RazorComponents/styles.css" rel="stylesheet" />
|
||||
<link href="_content/LCU.Library.Internal.LCUEvaluationComponents/evaluation-builder.css" rel="stylesheet" />
|
||||
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />
|
||||
<link href="_content/Blazored.Typeahead/blazored-typeahead.css" rel="stylesheet" />
|
||||
<component type="typeof(LCUHeader)" render-mode="ServerPrerendered"/>
|
||||
</head>
|
||||
<body>
|
||||
<app>
|
||||
<component type="typeof(App)" render-mode="ServerPrerendered" />
|
||||
</app>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
<environment include="Staging,Production">
|
||||
An error has occurred. This application may no longer respond until reloaded.
|
||||
</environment>
|
||||
<environment include="Development">
|
||||
An unhandled exception has occurred. See browser dev tools for details.
|
||||
</environment>
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
|
||||
@* *******Required in order to use in IE 11.*******
|
||||
https://docs.microsoft.com/en-us/aspnet/core/blazor/supported-platforms?view=aspnetcore-3.1
|
||||
https://github.com/Daddoon/Blazor.Polyfill/tree/master/Publish/Blazor.Polyfill.Publish
|
||||
*@
|
||||
@if (Request.Headers.TryGetValue("User-Agent", out var userAgents) &&
|
||||
(userAgents.FirstOrDefault() is string userAgent) &&
|
||||
System.Text.RegularExpressions.Regex.IsMatch(userAgent, @"MSIE \d|Trident.*rv:"))
|
||||
{
|
||||
<script src="js/blazor.polyfill.min.js"></script>
|
||||
}
|
||||
|
||||
<script src="_framework/blazor.server.js"></script>
|
||||
<script src="_content/Blazored.Typeahead/blazored-typeahead.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
|
||||
using Blazored.LocalStorage;
|
||||
using Blazored.Modal;
|
||||
using Blazored.Toast;
|
||||
using LCU.Api.Internal.DispatcherSharedLib;
|
||||
using LCU.Library.Internal.Configuration;
|
||||
using LCU.Library.Internal.LcuHttpClient;
|
||||
using LCU.Library.Internal.Logging.Models;
|
||||
using LCU.Library.Internal.Logging;
|
||||
using LCU.Library.Internal.Security;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Helpers;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Identity.Web;
|
||||
using Microsoft.Identity.Web.UI;
|
||||
using Serilog;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
|
||||
var appBuilder = BuildBuilder(args);
|
||||
BuildServicesAndConfigurations(appBuilder);
|
||||
BuildAppAndRun(appBuilder);
|
||||
|
||||
|
||||
WebApplicationBuilder BuildBuilder(string[] args)
|
||||
{
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Configuration.AddJsonFile("/app/config/environment-appsettings/appsettings.json", optional: true, reloadOnChange: true);
|
||||
builder.Configuration.AddJsonFile("/app/config/mapped-appsettings/primary.json", optional: true, reloadOnChange: true);
|
||||
builder.Configuration.AddJsonFile("/vault/secrets/dispatcher-manager-seq-api-key.json", optional: true, reloadOnChange: true);
|
||||
builder.Configuration.AddJsonFile("/vault/secrets/dispatcher-manager-client-secret.json", optional: true, reloadOnChange: true);
|
||||
builder.Configuration.AddJsonFile("/vault/secrets/dispatcher-manager-client-id.json", optional: true, reloadOnChange: true);
|
||||
builder.Host.UseSerilog();
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
void BuildServicesAndConfigurations(WebApplicationBuilder builder)
|
||||
{
|
||||
var services = builder.Services;
|
||||
var configuration = builder.Configuration;
|
||||
|
||||
services.AddRazorPages();
|
||||
services.AddAzureAdGroupPolicyServices(configuration.GetSection("AzureAd"),
|
||||
configuration.GetSection("Security"));
|
||||
|
||||
services.AddControllersWithViews().AddMicrosoftIdentityUI();
|
||||
services.AddServerSideBlazor().AddMicrosoftIdentityConsentHandler();
|
||||
services.AddBlazoredModal();
|
||||
|
||||
var appConfiguration = configuration.Bind<AppConfiguration>(services, "Primary");
|
||||
var loggerConfiguration = new LoggingConfiguration(appConfiguration.AppName,
|
||||
appConfiguration.SeqApiKey,
|
||||
appConfiguration.SeqUrl);
|
||||
var lcuLogging = new LcuLogging(loggerConfiguration);
|
||||
lcuLogging.UseLcuLogging();
|
||||
|
||||
LcuConfigureServicesAddons(services);
|
||||
}
|
||||
|
||||
void LcuConfigureServicesAddons(IServiceCollection services)
|
||||
{
|
||||
DispatcherApiConfiguration dispatcherApiConfiguration = new DispatcherApiConfiguration();
|
||||
appBuilder.Configuration.GetSection("DispatcherApiConfiguration").Bind(dispatcherApiConfiguration);
|
||||
services.AddSingleton(dispatcherApiConfiguration);
|
||||
|
||||
services.AddHttpClient();
|
||||
services.AddLCUHttpServices();
|
||||
services.AddHttpContextAccessor();
|
||||
|
||||
//Added Components
|
||||
services.AddBlazoredToast();
|
||||
services.AddBlazoredLocalStorage();
|
||||
|
||||
//Services
|
||||
services.AddScoped<ServiceHelpers>();
|
||||
services.AddScoped<IEHelpers>();
|
||||
services.AddScoped<GridHelpers>();
|
||||
services.AddScoped<FilterService>();
|
||||
services.AddScoped<JobService>();
|
||||
services.AddScoped<JobTagService>();
|
||||
services.AddScoped<TagService>();
|
||||
services.AddScoped<JobStateService>();
|
||||
services.AddScoped<QueueService>();
|
||||
services.AddScoped<ExecutionMessageService>();
|
||||
services.AddScoped<CleanUpJobSettingService>();
|
||||
services.AddDispatcherServices(appBuilder.Configuration);
|
||||
}
|
||||
|
||||
void BuildAppAndRun(WebApplicationBuilder builder)
|
||||
{
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Error");
|
||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.MapControllers();
|
||||
app.MapBlazorHub();
|
||||
app.MapFallbackToPage("/_Host");
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
app.Run();
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class CleanUpJobSettingService
|
||||
{
|
||||
private readonly DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IGetRequest _getRequest;
|
||||
|
||||
public CleanUpJobSettingService(IGetRequest getRequest,
|
||||
DispatcherApiConfiguration dispatcherApiConfiguration)
|
||||
{
|
||||
_getRequest = getRequest;
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
}
|
||||
|
||||
public async Task<List<CleanUpJobSetting>> GetAllCleanUpJobSettings()
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _getRequest.AsyncWithNewton<List<CleanUpJobSetting>>(_dispatcherApiConfiguration.GetAllCleanUpJobSettingEndpointUrl);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error getting CleanUpJobSettings.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.Library.Internal.Security.Service;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class ExecutionMessageService
|
||||
{
|
||||
private readonly DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IAzureAdAuthorizationService _azureAdAuthorizationService;
|
||||
private readonly IPostRequest _postRequest;
|
||||
|
||||
public ExecutionMessageService(IAzureAdAuthorizationService azureAdAuthorizationService,
|
||||
DispatcherApiConfiguration dispatcherApiConfiguration,
|
||||
IPostRequest postRequest)
|
||||
{
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
_azureAdAuthorizationService = azureAdAuthorizationService;
|
||||
_postRequest = postRequest;
|
||||
}
|
||||
|
||||
public async Task<bool> SaveExecutionMessages(List<ExecutionMessage> executionMessages)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.ExecutionMessageControllerEndpointUrl + "?request=" + executionMessages;
|
||||
|
||||
await _postRequest.Async<List<ExecutionMessage>>(new Uri(url), executionMessages);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error saving execution messaging.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> SaveExecutionMessages(int workItemExecutionId, string ExecutionMessageType)
|
||||
{
|
||||
var messageList = BuildWorkItemExecutionMessages(workItemExecutionId, ExecutionMessageType);
|
||||
return await SaveExecutionMessages(messageList);
|
||||
}
|
||||
|
||||
public async Task<bool> SaveExecutionMessages(Job job, string ExecutionMessageType)
|
||||
{
|
||||
var workItemExecution = job.WorkItems.FirstOrDefault((WorkItem workItem) => workItem.CurrentWorkItemExecution != null);
|
||||
|
||||
//if there is not a current work item execution do not write a message
|
||||
if (workItemExecution?.CurrentWorkItemExecution == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var messageList = BuildWorkItemExecutionMessages(workItemExecution.CurrentWorkItemExecution.WorkItemExecutionId, ExecutionMessageType);
|
||||
return await SaveExecutionMessages(messageList);
|
||||
}
|
||||
|
||||
private List<ExecutionMessage> BuildWorkItemExecutionMessages(int workItemExecutionId, string ExecutionMessageType)
|
||||
{
|
||||
var messageList = new List<ExecutionMessage>()
|
||||
{
|
||||
new ExecutionMessage(workItemExecutionId, ExecutionMessageType)
|
||||
{
|
||||
User = _azureAdAuthorizationService.GetUserName(),
|
||||
MessageDate = DateTime.Now,
|
||||
}
|
||||
};
|
||||
return messageList;
|
||||
}
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Blazored.LocalStorage;
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.DispatcherModels.Enums;
|
||||
using LCU.Library.Internal.DispatcherModels.Models;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class FilterService
|
||||
{
|
||||
private readonly ILocalStorageService _localStorageService;
|
||||
private const string StorageItemName = "JobFilter";
|
||||
|
||||
public FilterService(ILocalStorageService localStorageService)
|
||||
{
|
||||
_localStorageService = localStorageService;
|
||||
}
|
||||
|
||||
public async Task<Filter> GetFilterItemAsync()
|
||||
{
|
||||
return await _localStorageService.GetItemAsync<Filter>(StorageItemName);
|
||||
}
|
||||
|
||||
public async Task SetFilter(Filter jobFilter)
|
||||
{
|
||||
await _localStorageService.SetItemAsync(StorageItemName, jobFilter);
|
||||
}
|
||||
|
||||
public Filter AddTagFiltering(Filter filter, IList<Tag> tags)
|
||||
{
|
||||
if (tags == null || !tags.Any())
|
||||
{
|
||||
filter.TagIdFilters = null;
|
||||
return filter;
|
||||
}
|
||||
|
||||
filter.TagIdFilters = new List<int>();
|
||||
List<int> tagIds = tags.Select(Tag => Tag.TagId).ToList();
|
||||
filter.TagIdFilters.AddRange(tagIds);
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
public Filter AddStatusFiltering(Filter filter, IList<JobStatus> statuses)
|
||||
{
|
||||
if (statuses == null || !statuses.Any())
|
||||
{
|
||||
filter.StatusFilters = null;
|
||||
return filter;
|
||||
}
|
||||
|
||||
var statusFilterList = new List<StatusFilter>();
|
||||
foreach (var type in statuses)
|
||||
{
|
||||
var status = new StatusFilter()
|
||||
{
|
||||
JobStatus = type,
|
||||
IsEnabled = true
|
||||
};
|
||||
statusFilterList.Add(status);
|
||||
};
|
||||
|
||||
filter.StatusFilters = statusFilterList;
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
public List<JobStatus> AddDefaultStatusFiltering(Filter filter)
|
||||
{
|
||||
if (filter == null || filter.StatusFilters == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var statusTypeList = new List<JobStatus>();
|
||||
foreach (var type in filter.StatusFilters)
|
||||
{
|
||||
statusTypeList.Add(type.JobStatus);
|
||||
};
|
||||
|
||||
return statusTypeList;
|
||||
}
|
||||
|
||||
public List<Tag> AddDefaultTags(List<Tag> tags, Filter filter)
|
||||
{
|
||||
if (filter == null || filter.TagIdFilters == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var tagList = new List<Tag>();
|
||||
foreach (var tagId in filter.TagIdFilters)
|
||||
{
|
||||
var tagName = tags.Where(t => t.TagId == tagId).FirstOrDefault();
|
||||
tagList.Add(tagName);
|
||||
};
|
||||
|
||||
return tagList;
|
||||
}
|
||||
}
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.DispatcherModels.Models;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class JobService
|
||||
{
|
||||
private readonly DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IPostRequest _postRequest;
|
||||
private readonly IGetRequest _getRequest;
|
||||
private readonly IPutRequest _putRequest;
|
||||
private readonly IDeleteRequest _deleteRequest;
|
||||
|
||||
public JobService(DispatcherApiConfiguration dispatcherApiConfiguration,
|
||||
IPostRequest postRequest,
|
||||
IGetRequest getRequest,
|
||||
IPutRequest putRequest,
|
||||
IDeleteRequest deleteRequest)
|
||||
{
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
_postRequest = postRequest;
|
||||
_getRequest = getRequest;
|
||||
_putRequest = putRequest;
|
||||
_deleteRequest = deleteRequest;
|
||||
}
|
||||
|
||||
public async Task<PagedResponse<Job>> GetFilteredJobs(Filter filter)
|
||||
{
|
||||
var jobs = new PagedResponse<Job>();
|
||||
try
|
||||
{
|
||||
jobs = await _postRequest.AsyncWithNewton<Filter, PagedResponse<Job>>(new Uri(_dispatcherApiConfiguration.GetFilteredJobsEndpointUrl), filter);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error getting jobs.");
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
public async Task<List<Job>> GetJobs()
|
||||
{
|
||||
var jobs = new List<Job>();
|
||||
try
|
||||
{
|
||||
jobs = await _getRequest.AsyncWithNewton<List<Job>>(_dispatcherApiConfiguration.JobControllerEndpointUrl);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error getting jobs.");
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
public async Task<Job> RunJobNow(Job job)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _putRequest.AsyncWithNewton<Job, Job>(_dispatcherApiConfiguration.RunJobNowEndpointUrl, job);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error Setting Job to Now.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<Job> DeactivateJob(Job job)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _putRequest.AsyncWithNewton<Job, Job>(_dispatcherApiConfiguration.DeactivateJobEndpointUrl, job);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error Deactivating Job.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<Job> RescheduleJob(Job job)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await _putRequest.AsyncWithNewton<Job, Job>(_dispatcherApiConfiguration.RescheduleJobEndpointUrl, job);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error Rescheduling Job.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public async Task<bool> DeleteJob(int jobId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.JobControllerEndpointUrl + "?jobId=" + jobId;
|
||||
|
||||
await _deleteRequest.Async(url);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Error deleting job.");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using Serilog;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Helpers;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Models;
|
||||
using LCU.Library.Internal.DispatcherModels.Models;
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.DispatcherModels.Enums;
|
||||
using LCU.Api.Internal.DispatcherSharedLib.BuilderServices;
|
||||
using System.Threading.Tasks;
|
||||
using LCU.Library.Internal.Security.Service;
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class JobStateService
|
||||
{
|
||||
private readonly IRequestBuilderService _requestBuilderService;
|
||||
private readonly IAzureAdAuthorizationService AzureAdAuthorizationService;
|
||||
private const string DispatcherManager = "Dispatcher Manager";
|
||||
private int KeyCount;
|
||||
public event Action OnChange;
|
||||
public JobDetails JobDetails { get; set; }
|
||||
public bool Scheduled { get; set; }
|
||||
public bool SkipHolidays { get; set; }
|
||||
public string ActionTypeSelected { get; set; }
|
||||
public IList<Tag> TagSelectedList { get; set; }
|
||||
public List<WorkItemComponent> WorkItemComponents { get; set; }
|
||||
public Job EditingJob { get; set; }
|
||||
|
||||
public JobStateService(IRequestBuilderService requestBuilderService,
|
||||
IAzureAdAuthorizationService azureAdAuthorizationService)
|
||||
{
|
||||
WorkItemComponents = new List<WorkItemComponent>();
|
||||
JobDetails = new JobDetails();
|
||||
KeyCount = 0;
|
||||
ActionTypeSelected = "";
|
||||
Scheduled = false;
|
||||
EditingJob = null;
|
||||
_requestBuilderService = requestBuilderService;
|
||||
AzureAdAuthorizationService = azureAdAuthorizationService;
|
||||
}
|
||||
|
||||
private void NotifyStateChanged() => OnChange?.Invoke();
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
JobDetails = new JobDetails
|
||||
{
|
||||
ErrorRecipients = new List<string>()
|
||||
};
|
||||
WorkItemComponents = new List<WorkItemComponent>();
|
||||
TagSelectedList = new List<Tag>();
|
||||
ActionTypeSelected = "";
|
||||
Scheduled = false;
|
||||
SkipHolidays = false;
|
||||
KeyCount = 0;
|
||||
EditingJob = null;
|
||||
NotifyStateChanged();
|
||||
}
|
||||
|
||||
public void MapJobToJobState()
|
||||
{
|
||||
if (EditingJob == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
MapEditingJobToJobDetails();
|
||||
|
||||
foreach (var workItem in EditingJob.WorkItems.OrderBy(wi => wi.Order))
|
||||
{
|
||||
AddExistingWorkItem(workItem);
|
||||
}
|
||||
|
||||
ActionTypeSelected = "";
|
||||
Scheduled = !string.IsNullOrEmpty(JobDetails.CronSchedule);
|
||||
SkipHolidays = JobDetails.SkipHolidays;
|
||||
NotifyStateChanged();
|
||||
}
|
||||
|
||||
public void MapEditingJobToJobDetails()
|
||||
{
|
||||
JobDetails.JobId = EditingJob.JobId;
|
||||
JobDetails.Name = EditingJob.Name;
|
||||
JobDetails.RequestingApplication = EditingJob.RequestingApplication;
|
||||
JobDetails.Description = EditingJob.Description;
|
||||
JobDetails.CronSchedule = EditingJob.CronSchedule;
|
||||
JobDetails.NextRunTime = EditingJob.NextRunTime;
|
||||
JobDetails.SkipHolidays = EditingJob.SkipHolidays;
|
||||
JobDetails.CreatedBy = EditingJob.CreatedBy;
|
||||
JobDetails.CreatedAt = EditingJob.CreatedAt;
|
||||
JobDetails.ModifiedBy = EditingJob.ModifiedBy;
|
||||
JobDetails.ModifiedDate = EditingJob.ModifiedDate;
|
||||
JobDetails.ErrorRecipients = EditingJob.JobErrorRecipients.Select(jer => jer.Recipient).ToList();
|
||||
JobDetails.JobTags = EditingJob.JobTags.ToList();
|
||||
}
|
||||
|
||||
public void AddExistingWorkItem(WorkItem workItem)
|
||||
{
|
||||
ActionTypeSelected = Enum.GetName(typeof(ActionType), workItem.ActionType);
|
||||
var request = JsonConvert.DeserializeObject(workItem.SerializedPayload,
|
||||
_requestBuilderService.GetDispatcherTypeByString(ActionTypeSelected));
|
||||
|
||||
var workItemComponent = new WorkItemComponent(KeyCount, ActionTypeSelected, request)
|
||||
{
|
||||
WorkItemDetails = new WorkItemDetails()
|
||||
};
|
||||
workItemComponent.WorkItemDetails.WorkItemId = workItem.WorkItemId;
|
||||
workItemComponent.WorkItemDetails.Name = workItem.Name;
|
||||
workItemComponent.WorkItemDetails.Description = workItem.Description;
|
||||
workItemComponent.WorkItemDetails.CancelJobOnFailure = workItem.CancelJobOnFailure;
|
||||
workItemComponent.WorkItemDetails.CancelJobLimit = workItem.CancelJobLimit;
|
||||
WorkItemComponents.Add(workItemComponent);
|
||||
KeyCount++;
|
||||
}
|
||||
|
||||
public void Add()
|
||||
{
|
||||
var type = _requestBuilderService.GetDispatcherTypeByString(ActionTypeSelected);
|
||||
var request = Activator.CreateInstance(type);
|
||||
AddWorkItemState(request);
|
||||
}
|
||||
|
||||
private void AddWorkItemState(object item)
|
||||
{
|
||||
var workItemComponent = new WorkItemComponent(KeyCount, ActionTypeSelected, item)
|
||||
{
|
||||
WorkItemDetails = new WorkItemDetails()
|
||||
};
|
||||
WorkItemComponents.Add(workItemComponent);
|
||||
KeyCount++;
|
||||
NotifyStateChanged();
|
||||
}
|
||||
|
||||
private List<JobTag> BuildJobTags()
|
||||
{
|
||||
var jobTagList = new List<JobTag>();
|
||||
foreach (var tag in TagSelectedList)
|
||||
{
|
||||
var jobTag = new JobTag
|
||||
{
|
||||
Tag = null,
|
||||
TagId = tag.TagId,
|
||||
JobId = JobDetails.JobId
|
||||
};
|
||||
jobTagList.Add(jobTag);
|
||||
}
|
||||
return jobTagList;
|
||||
}
|
||||
|
||||
public void Remove(WorkItemComponent toRemove)
|
||||
{
|
||||
WorkItemComponents.Remove(toRemove);
|
||||
NotifyStateChanged();
|
||||
}
|
||||
|
||||
public int GetIndex(WorkItemComponent item)
|
||||
{
|
||||
return WorkItemComponents.FindIndex(a => a == item);
|
||||
}
|
||||
|
||||
public bool ValidateWorkItems()
|
||||
{
|
||||
bool itemsAreValid = WorkItemComponents.Any();
|
||||
foreach (var component in WorkItemComponents)
|
||||
{
|
||||
component.IsValid = component.EditContext.Validate() && component.WorkItemDetailsEditContext.Validate();
|
||||
if (!component.IsValid)
|
||||
{
|
||||
itemsAreValid = component.IsValid;
|
||||
component.IsCollapsed = false;
|
||||
}
|
||||
}
|
||||
|
||||
return itemsAreValid;
|
||||
}
|
||||
|
||||
public async Task<bool> SendJob()
|
||||
{
|
||||
try
|
||||
{
|
||||
UpdateJobDetails();
|
||||
_requestBuilderService.CreateJob(JobDetails);
|
||||
|
||||
foreach (var component in WorkItemComponents)
|
||||
{
|
||||
AddWorkitem(component);
|
||||
}
|
||||
|
||||
//bool result = Task.Run(() => _requestBuilderService.SendDispatcherRequest()).Result;
|
||||
bool result = await _requestBuilderService.SendDispatcherRequest();
|
||||
|
||||
return result;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error(ex, "Failure sending job to dispatcher.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateJobDetails()
|
||||
{
|
||||
if (Scheduled)
|
||||
{
|
||||
JobDetails.NextRunTime = null;
|
||||
}
|
||||
|
||||
var isNewJob = EditingJob == null;
|
||||
JobDetails.RequestingApplication = isNewJob ? DispatcherManager : EditingJob.RequestingApplication;
|
||||
JobDetails.CreatedBy = isNewJob ? AzureAdAuthorizationService.GetUserName() : EditingJob.CreatedBy;
|
||||
JobDetails.CreatedAt = isNewJob ? DateTime.Now : EditingJob.CreatedAt;
|
||||
JobDetails.ModifiedBy = isNewJob ? JobDetails.ModifiedBy : AzureAdAuthorizationService.GetUserName();
|
||||
JobDetails.ModifiedDate = isNewJob ? JobDetails.ModifiedDate : DateTime.Now;
|
||||
JobDetails.SkipHolidays = isNewJob ? JobDetails.SkipHolidays : SkipHolidays;
|
||||
JobDetails.JobTags = BuildJobTags();
|
||||
}
|
||||
|
||||
public void AddWorkitem(WorkItemComponent component)
|
||||
{
|
||||
component.WorkItemDetails.Name = string.IsNullOrEmpty(component.WorkItemDetails.Name) ? component.Type : component.WorkItemDetails.Name;
|
||||
component.WorkItemDetails.JobId = EditingJob == null ? 0 : EditingJob.JobId;
|
||||
component.WorkItemDetails.Order = GetIndex(component);
|
||||
_requestBuilderService.AddWorkItem(component.Item, component.WorkItemDetails, component.Type);
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class JobTagService
|
||||
{
|
||||
private readonly DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IGetRequest _getRequest;
|
||||
|
||||
public JobTagService(DispatcherApiConfiguration dispatcherApiConfiguration,
|
||||
IGetRequest getRequest)
|
||||
{
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
_getRequest = getRequest;
|
||||
}
|
||||
|
||||
public async Task<List<JobTag>> GetJobTagsByTagId(int tagId)
|
||||
{
|
||||
List<JobTag> tags = new List<JobTag>();
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.GetJobTagsByTagIdEndpointUrl + "?tagId=" + tagId;
|
||||
|
||||
return await _getRequest.AsyncWithNewton<List<JobTag>>(url);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error getting job tags.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.DispatcherModels.Models;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class QueueService
|
||||
{
|
||||
DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IPostRequest _postRequest;
|
||||
|
||||
public QueueService(DispatcherApiConfiguration dispatcherApiConfiguration,
|
||||
IPostRequest postRequest)
|
||||
{
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
_postRequest = postRequest;
|
||||
}
|
||||
|
||||
public async Task<bool> QueueRetryExecution(WorkItemExecution workItemExecution)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _postRequest.Async<WorkItemExecution>(new Uri(_dispatcherApiConfiguration.QueueExecutionControllerEndpointUrl), workItemExecution);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error Queueing Work Item Execution.");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public async Task<bool> QueueCompletion(int workItemId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var dispatcherReturnResponse = new DispatcherReturnResponse()
|
||||
{
|
||||
WorkItemId = workItemId
|
||||
};
|
||||
|
||||
await _postRequest.Async<DispatcherReturnResponse>(new Uri(_dispatcherApiConfiguration.QueueCompletionControllerEndpointUrl), dispatcherReturnResponse);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error Queueing Work Item.");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
using LCU.Library.Internal.DispatcherModels.Entities;
|
||||
using LCU.Library.Internal.LcuHttpClient.HttpRequest;
|
||||
using LCU.WebApps.Internal.DispatcherManager.Configurations;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LCU.WebApps.Internal.DispatcherManager.Services;
|
||||
|
||||
public class TagService
|
||||
{
|
||||
private readonly DispatcherApiConfiguration _dispatcherApiConfiguration;
|
||||
private readonly IGetRequest _getRequest;
|
||||
private readonly IPostRequest _postRequest;
|
||||
private readonly IPutRequest _putRequest;
|
||||
private readonly IDeleteRequest _deleteRequest;
|
||||
|
||||
public TagService(DispatcherApiConfiguration dispatcherApiConfiguration,
|
||||
IGetRequest getRequest,
|
||||
IPostRequest postRequest,
|
||||
IPutRequest putRequest,
|
||||
IDeleteRequest deleteRequest)
|
||||
{
|
||||
_dispatcherApiConfiguration = dispatcherApiConfiguration;
|
||||
_getRequest = getRequest;
|
||||
_postRequest = postRequest;
|
||||
_putRequest = putRequest;
|
||||
_deleteRequest = deleteRequest;
|
||||
}
|
||||
|
||||
public async Task<List<Tag>> GetTags()
|
||||
{
|
||||
List<Tag> tags = new List<Tag>();
|
||||
try
|
||||
{
|
||||
tags = await _getRequest.AsyncWithNewton<List<Tag>>(_dispatcherApiConfiguration.TagControllerEndpointUrl);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error getting tags.");
|
||||
}
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
public async Task DeleteTag(int tagId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.TagControllerEndpointUrl + "?tagId=" + tagId;
|
||||
|
||||
await _deleteRequest.Async(url);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error deleting tag.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SaveTag(Tag tag)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.TagControllerEndpointUrl + "?request=" + tag;
|
||||
|
||||
var result = await _postRequest.Async<Tag, Tag>(new Uri(url), tag);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error saving tag.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task UpdateTag(Tag tag)
|
||||
{
|
||||
try
|
||||
{
|
||||
var url = _dispatcherApiConfiguration.TagControllerEndpointUrl + "?request=" + tag;
|
||||
|
||||
await _putRequest.Async<Tag>(new Uri(url), tag, null);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
Log.Error(exception, "Error updating tag.");
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
@using System.Text.RegularExpressions
|
||||
@inject GridHelpers GridHelpers;
|
||||
|
||||
<DynamicNameInput Label="@InputLabel"
|
||||
HintLabel="@HintLabel"
|
||||
Name="@Name"
|
||||
IsCollapsed="IsCollapsed"
|
||||
NameChanged="InputChanged"
|
||||
CollapsedChanged="OpenFileNameOptions">
|
||||
</DynamicNameInput>
|
||||
|
||||
@if (!IsCollapsed)
|
||||
{
|
||||
<TabControl>
|
||||
@if (CanUseDateSettings)
|
||||
{
|
||||
<TabPage Text="Date Settings">
|
||||
<DynamicNameOptionsHeader PreviewFileName="@PreviewFileName"
|
||||
DaysFromToday="@DynamicNameSetting.DaysFromToday"
|
||||
DaysChanged="DaysFromTodayChanged">
|
||||
</DynamicNameOptionsHeader>
|
||||
|
||||
<DynamicNameButtonOptions OptionClicked="AddDateSettings"></DynamicNameButtonOptions>
|
||||
|
||||
@for (int i = 0; i < DynamicNameSetting.DateFormatSettings.Count; i++)
|
||||
{
|
||||
var iCopy = i;
|
||||
<DynamicNameTagSetting Index="iCopy"
|
||||
Tag="@DynamicNameSetting.DateFormatSettings[iCopy].Tag"
|
||||
SettingsType="Date Format"
|
||||
Setting="@DynamicNameSetting.DateFormatSettings[iCopy].DateFormat"
|
||||
BorderCss="@TagBorder(DynamicNameSetting.DateFormatSettings[iCopy].Tag)"
|
||||
TagChanged="RemoveDateSettingTag">
|
||||
</DynamicNameTagSetting>
|
||||
}
|
||||
</TabPage>
|
||||
}
|
||||
|
||||
@if (CanUseRegexSettings)
|
||||
{
|
||||
<TabPage Text="Regex Settings">
|
||||
<DynamicNameRegexHeader PreviewFileName="@PreviewFileName"
|
||||
RegexTagId="@RegexTagId"
|
||||
RegexTag="@RegexTag"
|
||||
NewRegex="@NewRegex"
|
||||
AddRegexSettings="AddRegexSettings">
|
||||
</DynamicNameRegexHeader>
|
||||
|
||||
@for (int i = 0; i < DynamicNameSetting.RegexSettings.Count; i++)
|
||||
{
|
||||
var iCopy = i;
|
||||
|
||||
<DynamicNameTagSetting Index="iCopy"
|
||||
Tag="@DynamicNameSetting.RegexSettings[iCopy].Tag"
|
||||
SettingsType="Regex"
|
||||
Setting="@DynamicNameSetting.RegexSettings[iCopy].Regex"
|
||||
BorderCss="@TagBorder(DynamicNameSetting.RegexSettings[iCopy].Tag)"
|
||||
TagChanged="RemoveRegexTag">
|
||||
</DynamicNameTagSetting>
|
||||
}
|
||||
</TabPage>
|
||||
}
|
||||
</TabControl>
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string InputLabel { get; set; }
|
||||
[Parameter]
|
||||
public string HintLabel { get; set; }
|
||||
[Parameter]
|
||||
public string Name { get; set; }
|
||||
[Parameter]
|
||||
public DynamicNameSetting DynamicNameSetting { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<string> NameChanged { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<DynamicNameSetting> NameSettingChanged { get; set; }
|
||||
private bool IsCollapsed = true;
|
||||
private string PreviewFileName = "";
|
||||
private int TagId = 0;
|
||||
private string NewRegex = "";
|
||||
private int RegexTagId = 0;
|
||||
private string RegexTag = "";
|
||||
private bool CanUseDateSettings = false;
|
||||
private bool CanUseRegexSettings = false;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
CanUseDateSettings = DynamicNameSetting.DateFormatSettings != null;
|
||||
CanUseRegexSettings = DynamicNameSetting.RegexSettings != null;
|
||||
BuildPreview();
|
||||
SetTags();
|
||||
}
|
||||
|
||||
private void SetTags()
|
||||
{
|
||||
RegexTag = "{Regex" + RegexTagId + "}";
|
||||
RegexTagId = DynamicNameSetting.RegexSettings != null ? DynamicNameSetting.RegexSettings.Count : 0;
|
||||
TagId = DynamicNameSetting.DateFormatSettings != null ? DynamicNameSetting.DateFormatSettings.Count : 0;
|
||||
}
|
||||
|
||||
private void ChangesOccured()
|
||||
{
|
||||
NameChanged.InvokeAsync(Name);
|
||||
NameSettingChanged.InvokeAsync(DynamicNameSetting);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void OpenFileNameOptions()
|
||||
{
|
||||
IsCollapsed = !IsCollapsed;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void InputChanged(string value)
|
||||
{
|
||||
Name = value;
|
||||
BuildPreview();
|
||||
ChangesOccured();
|
||||
}
|
||||
|
||||
private void DaysFromTodayChanged(int value)
|
||||
{
|
||||
DynamicNameSetting.DaysFromToday = (int)value;
|
||||
BuildPreview();
|
||||
}
|
||||
|
||||
private bool TagIsMissing(string tag)
|
||||
{
|
||||
return Name == null || Name.IndexOf(tag) < 0;
|
||||
}
|
||||
|
||||
private string TagBorder(string tag)
|
||||
{
|
||||
bool showRed = TagIsMissing(tag);
|
||||
return showRed ? "red-boarder" : "";
|
||||
}
|
||||
|
||||
private void AddDateSettings(string option)
|
||||
{
|
||||
var newDateFormat = new DateFormatSetting();
|
||||
newDateFormat.Tag = "{" + option + TagId + "}";
|
||||
TagId++;
|
||||
newDateFormat.DateFormat = option;
|
||||
DynamicNameSetting.DateFormatSettings.Add(newDateFormat);
|
||||
|
||||
BuildName(newDateFormat.Tag);
|
||||
ChangesOccured();
|
||||
}
|
||||
|
||||
private void RemoveDateSettingTag(string tag)
|
||||
{
|
||||
var toRemove = DynamicNameSetting.DateFormatSettings.Where(d => d.Tag == tag).FirstOrDefault();
|
||||
DynamicNameSetting.DateFormatSettings.Remove(toRemove);
|
||||
|
||||
RemoveTagFromName(tag);
|
||||
BuildPreview();
|
||||
|
||||
TagId = DynamicNameSetting.DateFormatSettings.Count == 0 ? 0 : TagId - 1;
|
||||
|
||||
UpdateDateTags();
|
||||
ChangesOccured();
|
||||
}
|
||||
|
||||
private void UpdateDateTags()
|
||||
{
|
||||
for (int i = 0; i < DynamicNameSetting.DateFormatSettings.Count; i++)
|
||||
{
|
||||
string oldTag = DynamicNameSetting.DateFormatSettings[i].Tag;
|
||||
DynamicNameSetting.DateFormatSettings[i].Tag = Regex.Replace(oldTag, @"\d", i.ToString());
|
||||
Name = Regex.Replace(Name, oldTag, DynamicNameSetting.DateFormatSettings[i].Tag);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddRegexSettings(string newRegexText)
|
||||
{
|
||||
var newRegex = new RegexSetting();
|
||||
NewRegex = newRegexText;
|
||||
|
||||
newRegex.Tag = "{Regex" + RegexTagId + "}";
|
||||
RegexTagId++;
|
||||
newRegex.Regex = NewRegex;
|
||||
|
||||
DynamicNameSetting.RegexSettings.Add(newRegex);
|
||||
BuildName(newRegex.Tag);
|
||||
NewRegex = "";
|
||||
ChangesOccured();
|
||||
}
|
||||
|
||||
private void RemoveRegexTag(string tag)
|
||||
{
|
||||
var toRemove = DynamicNameSetting.RegexSettings.Where(d => d.Tag == tag).FirstOrDefault();
|
||||
DynamicNameSetting.RegexSettings.Remove(toRemove);
|
||||
|
||||
RemoveTagFromName(tag);
|
||||
BuildPreview();
|
||||
|
||||
RegexTagId = DynamicNameSetting.RegexSettings.Count == 0 ? 0 : RegexTagId - 1;
|
||||
|
||||
UpdateRegexTags(tag);
|
||||
ChangesOccured();
|
||||
}
|
||||
|
||||
private void UpdateRegexTags(string tag)
|
||||
{
|
||||
for (int i = 0; i < DynamicNameSetting.RegexSettings.Count; i++)
|
||||
{
|
||||
string oldTag = DynamicNameSetting.RegexSettings[i].Tag;
|
||||
DynamicNameSetting.RegexSettings[i].Tag = Regex.Replace(tag, @"\d", i.ToString());
|
||||
Name = Regex.Replace(Name, oldTag, DynamicNameSetting.RegexSettings[i].Tag);
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveTagFromName(string tag)
|
||||
{
|
||||
var indexOfTag = Name.IndexOf(tag);
|
||||
if (indexOfTag >= 0)
|
||||
{
|
||||
Name = Name.Remove(indexOfTag, tag.Length);
|
||||
}
|
||||
}
|
||||
|
||||
private void BuildName(string tag)
|
||||
{
|
||||
Name = String.Concat(Name, tag);
|
||||
BuildPreview();
|
||||
}
|
||||
|
||||
private void BuildPreview()
|
||||
{
|
||||
bool tagsAreMissing = (CanUseDateSettings && DynamicNameSetting.DateFormatSettings.Any(dfs => TagIsMissing(dfs.Tag))) ||
|
||||
(CanUseRegexSettings && DynamicNameSetting.RegexSettings.Any(rs => TagIsMissing(rs.Tag)));
|
||||
|
||||
if (tagsAreMissing || string.IsNullOrEmpty(Name))
|
||||
{
|
||||
PreviewFileName = "N/A";
|
||||
return;
|
||||
}
|
||||
|
||||
var fileName = CanUseDateSettings ?
|
||||
DynamicNameBuilder.BuildDynamicName(Name, DynamicNameSetting) :
|
||||
Name;
|
||||
PreviewFileName = CanUseRegexSettings ?
|
||||
RegexNameHandler.BuildRegexName(fileName, DynamicNameSetting).ToString() :
|
||||
fileName;
|
||||
}
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
Options
|
||||
</div>
|
||||
<div class="max-width-container">
|
||||
<div class="button-group-inner-container" role="group">
|
||||
<div class="btn-group">
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("dd"))"
|
||||
title="Day of month two digits">
|
||||
<span>dd</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("MM"))"
|
||||
title="Month two digits">
|
||||
<span>MM</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("yyyy"))"
|
||||
title="Year four digits">
|
||||
<span>yyyy</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("yyy"))"
|
||||
title="Year at least three digits">
|
||||
<span>yyy</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("yy"))"
|
||||
title="Year two digits">
|
||||
<span>yy</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("HH"))"
|
||||
title="Hour two digits">
|
||||
<span>HH</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("mm"))"
|
||||
title="Minute two digits">
|
||||
<span>mm</span>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="btn btn-outline-info"
|
||||
@onclick="@(() => OptionClicked.InvokeAsync("ss"))"
|
||||
title="Seconds two digits">
|
||||
<span>ss</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public EventCallback<string> OptionClicked { get; set; }
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
<div class="form-group form-row">
|
||||
<label for="SourceFileDiv" class="col-sm-6 col-form-label"> @Label </label>
|
||||
@if (!string.IsNullOrEmpty(HintLabel))
|
||||
{
|
||||
<span class="form-input-info"><i class="oi oi-info"></i> @HintLabel</span>
|
||||
}
|
||||
<div class="form-inline flex-grow-1" id="SourceFileDiv">
|
||||
<InputText class="form-control flex-grow-1" id="SourceFile" placeholder="@Placeholder" Value="@Name" ValueChanged="InputChanged" ValueExpression="() => Name" />
|
||||
<button type="button" class="btn btn-secondary file-custom-collapse-button" @onclick="(() => CollapsedChanged.InvokeAsync(IsCollapsed))">
|
||||
<span class="oi @CollapsedIcon()"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string Label { get; set; }
|
||||
[Parameter]
|
||||
public string HintLabel { get; set; }
|
||||
[Parameter]
|
||||
public string Name { get; set; }
|
||||
[Parameter]
|
||||
public bool IsCollapsed { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<string> NameChanged { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<bool> CollapsedChanged { get; set; }
|
||||
public string Placeholder;
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Placeholder = $"Enter {Label}";
|
||||
}
|
||||
|
||||
private void InputChanged(string fileName)
|
||||
{
|
||||
NameChanged.InvokeAsync(fileName);
|
||||
}
|
||||
|
||||
public string CollapsedIcon()
|
||||
{
|
||||
return IsCollapsed ? "oi-caret-bottom" : "oi-caret-left";
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
@inject GridHelpers GridHelpers;
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
Preview
|
||||
</div>
|
||||
<div>
|
||||
@GridHelpers.EmptyNullStringDisplay(PreviewFileName)
|
||||
</div>
|
||||
</div>
|
||||
<div class="col small-container-125">
|
||||
<div class="grid-col-tag">
|
||||
Days From Today
|
||||
</div>
|
||||
<div>
|
||||
<InputNumber class="form-control"
|
||||
id="DaysFromToday"
|
||||
Value="@DaysFromToday"
|
||||
ValueChanged="((int val) => DaysChanged.InvokeAsync(val))"
|
||||
ValueExpression="() => DaysFromToday" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string PreviewFileName { get; set; }
|
||||
[Parameter]
|
||||
public int DaysFromToday { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<int> DaysChanged { get; set; }
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
@inject GridHelpers GridHelpers;
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
Preview
|
||||
</div>
|
||||
<div>
|
||||
@GridHelpers.EmptyNullStringDisplay(PreviewFileName)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row grid-bottom-border tag-settings-Row">
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
Tag
|
||||
</div>
|
||||
<div id="@($"Tag{RegexTagId}")">@RegexTag</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
New Regex
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-inline">
|
||||
<InputText class="form-control regex-textinput" id="New Regex" placeholder="New Regex" @bind-Value="@NewRegex" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="button"
|
||||
class="btn btn-success regex-action-button"
|
||||
@onclick="@(() => Add())">
|
||||
<span class="oi oi-plus"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public string PreviewFileName { get; set; }
|
||||
[Parameter]
|
||||
public int RegexTagId { get; set; }
|
||||
[Parameter]
|
||||
public string RegexTag { get; set; }
|
||||
[Parameter]
|
||||
public string NewRegex { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<string> AddRegexSettings { get; set; }
|
||||
|
||||
private void Add()
|
||||
{
|
||||
AddRegexSettings.InvokeAsync(NewRegex);
|
||||
}
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<div class="row grid-bottom-border tag-settings-Row @BorderCss">
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
Tag
|
||||
</div>
|
||||
<div id="@($"{Tag}-{Index}")">@Tag</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="grid-col-tag">
|
||||
@SettingsType
|
||||
</div>
|
||||
<div id="@($"{Tag}-Format-{Index}")">@Setting</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="grid-col-tag"></div>
|
||||
<button class="btn btn-danger mb-2" @onclick="@(() => TagChanged.InvokeAsync(Tag))">x</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public int Index { get; set; }
|
||||
[Parameter]
|
||||
public string Tag { get; set; }
|
||||
[Parameter]
|
||||
public string SettingsType { get; set; }
|
||||
[Parameter]
|
||||
public string Setting { get; set; }
|
||||
[Parameter]
|
||||
public string BorderCss { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<string> TagChanged { get; set; }
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="Action" class="col-sm-6 col-form-label">Select Protocol</label>
|
||||
<InputSelect class="form-control" id="ProtocolType" @bind-Value="Request.Protocol">
|
||||
<option></option>
|
||||
@foreach (var protocolType in Enum.GetValues(typeof(ProtocolType)))
|
||||
{
|
||||
<option Value="@Enum.GetName(typeof(ProtocolType), protocolType)">@Enum.GetName(typeof(ProtocolType), protocolType)</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="HostName" class="col-sm-6 col-form-label">Host Name</label>
|
||||
<InputText class="form-control" id="HostName" placeholder="Enter Host Name" @bind-Value="Request.HostName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="PortNumber" class="col-sm-6 col-form-label">Port Number</label>
|
||||
<InputNumber class="form-control" id="PortNumber" placeholder="Enter Port Number" @bind-Value="Request.PortNumber" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="UserName" class="col-sm-6 col-form-label">UserName</label>
|
||||
<InputText class="form-control" id="UserName" placeholder="Enter UserName" @bind-Value="Request.UserName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Password" class="col-sm-6 col-form-label">Password</label>
|
||||
<InputText class="form-control" id="Password" placeholder="Enter Password" @bind-Value="Request.Password" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SshHostKeyFingerprint" class="col-sm-6 col-form-label">Ssh Host Key Fingerprint</label>
|
||||
<InputText class="form-control" id="SshHostKeyFingerprint" placeholder="Enter Ssh Host Key Fingerprint" @bind-Value="Request.SshHostKeyFingerprint" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SshKeyFilePath" class="col-sm-6 col-form-label">Ssh Key File Path</label>
|
||||
<InputText class="form-control" id="SshKeyFilePath" placeholder="Enter Ssh Key File Path" @bind-Value="Request.SshKeyFilePath" />
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public SessionInformation Request { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (SessionInformation)Request;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<EditForm EditContext="WorkItemComponent.WorkItemDetailsEditContext">
|
||||
<div class="form-group form-row">
|
||||
<label for="WorkItemName" class="col-sm-6 col-form-label">Name</label>
|
||||
<InputText class="form-control" id="JobName" placeholder="Enter Name" @bind-Value="WorkItemComponent.WorkItemDetails.Name" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="WorkItemDescription" class="col-sm-6 col-form-label">Description</label>
|
||||
<InputText class="form-control" id="JobDescription" placeholder="Enter Description" @bind-Value="WorkItemComponent.WorkItemDetails.Description" />
|
||||
</div>
|
||||
|
||||
<div class=row>
|
||||
<div class=col-6>
|
||||
<div class="form-group form-row">
|
||||
<label for="CancelJobOnFailure" class="col-sm-11 col-form-label">Cancel Job On Failure</label>
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="btn-group" role="group" aria-label="CancelJobOnFailure">
|
||||
<button type="button" class="btn @(WorkItemComponent.WorkItemDetails.CancelJobOnFailure ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeCancelJobOnFailure())">No</button>
|
||||
<button type="button" class="btn @(WorkItemComponent.WorkItemDetails.CancelJobOnFailure ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeCancelJobOnFailure())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=col-6>
|
||||
@if (WorkItemComponent.WorkItemDetails.CancelJobOnFailure)
|
||||
{
|
||||
<div class="form-group form-row">
|
||||
<label for="CancelJobLimit" class="col-sm-11 col-form-label">Cancel Job Limit</label>
|
||||
<div class="col-md-6">
|
||||
<InputNumber class="form-control" type id="CancelJobLimit" @bind-Value="WorkItemComponent.WorkItemDetails.CancelJobLimit" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<FluentValidationValidator />
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
</EditForm>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public int cancelJobLimit { get; set; }
|
||||
|
||||
public void ChangeCancelJobOnFailure()
|
||||
{
|
||||
WorkItemComponent.WorkItemDetails.CancelJobOnFailure = !WorkItemComponent.WorkItemDetails.CancelJobOnFailure;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
@switch (WorkItemComponent.Type)
|
||||
{
|
||||
case nameof(ActionType.MoveFile):
|
||||
<MoveFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ModifyFile):
|
||||
<ModifyFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.CopyFile):
|
||||
<CopyFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DeleteFile):
|
||||
<DeleteFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.RenameFile):
|
||||
<RenameFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ZipDirectory):
|
||||
<ZipDirectory WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.CreateDirectory):
|
||||
<CreateDirectory WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.RenameDirectory):
|
||||
<RenameDirectory WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.Email):
|
||||
<Email WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.UnzipFile):
|
||||
<UnzipFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.CoreArchiveRequest):
|
||||
<ArchiveApplicationsRequest WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.EncryptFileData):
|
||||
<EncryptFileData WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DecryptFileData):
|
||||
<DecryptFileData WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.SftpUploadFile):
|
||||
<SftpUploadFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.SftpDownloadFile):
|
||||
<SftpDownloadFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DocumentIngestor):
|
||||
<DocumentIngestor WorkItemComponent="@WorkItemComponent" Title="Document Ingestor" />
|
||||
break;
|
||||
case nameof(ActionType.DocumentBatchIngestion):
|
||||
<DocumentBatchIngestion WorkItemComponent="@WorkItemComponent" Title="Document Batch Ingestion" />
|
||||
break;
|
||||
case nameof(ActionType.DocumentRetentionCleanupRequest):
|
||||
<DocumentRetentionCleanup WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.UnzipPasswordProtectedFile):
|
||||
<UnzipPasswordProtectedFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.IngestorPdfPartitioner):
|
||||
<IngestorPdfPartitioner WorkItemComponent="@WorkItemComponent" Title="Ingestor Pdf Partitioner" />
|
||||
break;
|
||||
case nameof(ActionType.MemberDocumentNotification):
|
||||
<MemberDocumentNotification WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.RemoteDepositCaptureXmlFile):
|
||||
<RemoteDepositCaptureXmlFile WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DeleteDirectory):
|
||||
<DeleteDirectory WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DataCleanUp):
|
||||
<DataCleanUp WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.AtmPersonCheckHolds):
|
||||
<AtmPersonCheckHolds WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.HistoricalDocumentIngestor):
|
||||
<DocumentIngestor WorkItemComponent="@WorkItemComponent" Title="Historical Document Ingestor" />
|
||||
break;
|
||||
case nameof(ActionType.HistoricalDocumentBatchIngestion):
|
||||
<DocumentBatchIngestion WorkItemComponent="@WorkItemComponent" Title="Historical Document Batch Ingestion" />
|
||||
break;
|
||||
case nameof(ActionType.HistoricalIngestorPdfPartitioner):
|
||||
<IngestorPdfPartitioner WorkItemComponent="@WorkItemComponent" Title="Historical Ingestor Pdf Partitioner" />
|
||||
break;
|
||||
case nameof(ActionType.NoticeProcessorExtractRequest):
|
||||
<NoticeProcessorExtract WorkItemComponent="@WorkItemComponent"/>
|
||||
break;
|
||||
case nameof(ActionType.NoticeProcessorSummaryEmailRequest):
|
||||
<NoticeProcessorSummaryEmail WorkItemComponent="@WorkItemComponent"/>
|
||||
break;
|
||||
case nameof(ActionType.DataCleanupNcoaUpdateRequest):
|
||||
<DataCleanupNcoaUpdate WorkItemComponent="@WorkItemComponent"/>
|
||||
break;
|
||||
case nameof(ActionType.IngestionFolderCleanUp):
|
||||
<IngestionFolderCleanUp WorkItemComponent="@WorkItemComponent"/>
|
||||
break;
|
||||
case nameof(ActionType.MomBotRequest):
|
||||
<MomBot WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.BlendDataRequest):
|
||||
<BlendImportRequest WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DialerUploadRequest):
|
||||
<DialerUpload WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.UploadDoNotCallRequest):
|
||||
<UploadDoNotCall WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DataCleanUpFannieMaeRequest):
|
||||
<DataCleanUpFannieMaeUpdate WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.CreateVoAppsCampaignsRequest):
|
||||
<CreateVoAppsCampaigns WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.UploadVoAppsCampaignResultsRequest):
|
||||
<UploadVoAppsCampaignResults WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ImportCreditCardSalesRequest):
|
||||
<ImportCreditCardSales WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DataCleanUpIndirectFundingRequest):
|
||||
<DataCleanUpIndirectFunding WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ImportIndirectVehicleSalesRequest):
|
||||
<ImportIndirectVehicleSales WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ExtractIndexFileData):
|
||||
<ExtractIndexFileData WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ValidateFileRequest):
|
||||
<FileValidation WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DealerAchNotificationRequest):
|
||||
<DealerAchNotification WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.IndexFieldMapperRequest):
|
||||
<FileUpdater WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.InitiateRealTimeAlertsRequest):
|
||||
<RealTimeAlertsInitiateTransactionAlerts WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.InitiateRealTimeAlertsErroredProcessingRequest):
|
||||
<RealTimeAlertsErroredTransactionCleanUp WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.IncentiveProcessRequest):
|
||||
<IncentiveProcessUpdate WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.NightlyIncentiveProcessRequest):
|
||||
<NightlyIncentiveProcessUpdate WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ActionCreditCardRequest):
|
||||
<ActionCreditCardProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ActionVehicleRequest):
|
||||
<ActionVehicleProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.AlliedGapMbpRequest):
|
||||
<AlliedGapMbpProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DayforceProcessRequest):
|
||||
<DayforceUpdateProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.GoalDispersalRequest):
|
||||
<GoalDispersalProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.PayoutIncentiveRequest):
|
||||
<PayoutIncentiveProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ReportingRequest):
|
||||
<ReportingIncentiveMgr WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.ValidateFileSizeInRange):
|
||||
<ValidateFileSizeIsInRange WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DeleteEmptyDirectoryRequest):
|
||||
<DeleteEmptyDirectory WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.UploadVoAppsCampaignResultsErrorRequest):
|
||||
<UploadVoAppsCampaignErrorProcess WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.RepoBatchProcessRequest):
|
||||
<RepoBatchProcessingRequest WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
case nameof(ActionType.DocumentIngestorProcessStatusEmail):
|
||||
<DocumentIngestorProcessStatusEmail WorkItemComponent="@WorkItemComponent" />
|
||||
break;
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
@inject IToastService toastService;
|
||||
@inject JobStateService JobStateService;
|
||||
|
||||
<div class="card card-block-addon">
|
||||
<div class="card-body">
|
||||
<div class="form-group form-row">
|
||||
<label for="ActionTitle" class="col-sm-7 col-form-label bold-title" style="font-weight:bold">
|
||||
@Title
|
||||
</label>
|
||||
<div class="col-md-1">
|
||||
<span class="order-display bold-title"># @GetOrder()</span>
|
||||
</div>
|
||||
<div class="col-md-1 icon-div-adjustment">
|
||||
@if (!WorkItemComponent.IsValid)
|
||||
{
|
||||
<span class="oi oi-wrench error-icon"></span>
|
||||
}
|
||||
</div>
|
||||
<div class="col-md-1 workitem-icon-container">
|
||||
<div class="btn-group" role="group" aria-label="Basic example">
|
||||
<button type="button" class="btn btn-primary" @onclick=Toggle>
|
||||
<span class="oi @CollapsedIcon()"></span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary">
|
||||
<span class="oi oi-move"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!WorkItemComponent.IsCollapsed)
|
||||
{
|
||||
<div draggable="true" ondragstart="event.preventDefault(); event.stopPropagation();">
|
||||
<WorkItemDetailsComponent WorkItemComponent="WorkItemComponent" />
|
||||
|
||||
<EditForm EditContext="@WorkItemComponent.EditContext">
|
||||
|
||||
@ChildContent
|
||||
<FluentValidationValidator />
|
||||
<DataAnnotationsValidator />
|
||||
<ValidationSummary />
|
||||
</EditForm>
|
||||
|
||||
<div class="max-width-container">
|
||||
<div class="button-group-inner-container">
|
||||
<button type="button" class="btn btn-danger button-addition" @onclick="@(() => RemoveRequest())"><span class="oi oi-x"></span> Remove</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; }
|
||||
[Parameter]
|
||||
public object Request { get; set; }
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
[Parameter]
|
||||
public string Title { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
WorkItemComponent.EditContext = new EditContext(Request);
|
||||
WorkItemComponent.WorkItemDetailsEditContext = new EditContext(WorkItemComponent.WorkItemDetails);
|
||||
WorkItemComponent.WorkItemDetails = WorkItemComponent.WorkItemDetails == null ? new WorkItemDetails() : WorkItemComponent.WorkItemDetails;
|
||||
WorkItemComponent.EditContext.OnFieldChanged += EditContext_OnFieldChanged;
|
||||
WorkItemComponent.WorkItemDetailsEditContext.OnFieldChanged += EditContext_OnFieldChanged;
|
||||
}
|
||||
|
||||
private void EditContext_OnFieldChanged(object sender, FieldChangedEventArgs e)
|
||||
{
|
||||
WorkItemComponent.IsValid = WorkItemComponent.EditContext.Validate() && WorkItemComponent.WorkItemDetailsEditContext.Validate();
|
||||
}
|
||||
|
||||
void Toggle()
|
||||
{
|
||||
WorkItemComponent.IsCollapsed = !WorkItemComponent.IsCollapsed;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
public string CollapsedIcon()
|
||||
{
|
||||
return WorkItemComponent.IsCollapsed ? "oi-caret-bottom" : "oi-caret-left";
|
||||
}
|
||||
|
||||
public void RemoveRequest()
|
||||
{
|
||||
JobStateService.Remove(WorkItemComponent);
|
||||
}
|
||||
|
||||
public int GetOrder()
|
||||
{
|
||||
return JobStateService.GetIndex(WorkItemComponent) + 1;
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic File Name")"
|
||||
Name="@Request.DynamicFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicName"
|
||||
NameSettingChanged="UpdateDynamicSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public LCU.Library.Internal.IncentiveApiModels.Requests.ActionCreditCardRequest Request { get; set; }
|
||||
private string Title = "Action Credit Card Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (LCU.Library.Internal.IncentiveApiModels.Requests.ActionCreditCardRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDynamicName(string fileName)
|
||||
{
|
||||
Request.DynamicFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicSettings(DynamicNameSetting dynamicSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicSetting;
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic File Name")"
|
||||
Name="@Request.DynamicFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicName"
|
||||
NameSettingChanged="UpdateDynamicSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public LCU.Library.Internal.IncentiveApiModels.Requests.ActionVehicleRequest Request { get; set; }
|
||||
private string Title = "Action Vehicle Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (LCU.Library.Internal.IncentiveApiModels.Requests.ActionVehicleRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDynamicName(string fileName)
|
||||
{
|
||||
Request.DynamicFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicSettings(DynamicNameSetting dynamicSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicSetting;
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic File Name")"
|
||||
Name="@Request.DynamicFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicName"
|
||||
NameSettingChanged="UpdateDynamicSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public LCU.Library.Internal.IncentiveApiModels.Requests.AlliedGapMbpRequest Request { get; set; }
|
||||
private string Title = "Allied Gap/Mbp Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (LCU.Library.Internal.IncentiveApiModels.Requests.AlliedGapMbpRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDynamicName(string fileName)
|
||||
{
|
||||
Request.DynamicFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicSettings(DynamicNameSetting dynamicSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicSetting;
|
||||
}
|
||||
}
|
||||
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="ArchiveDestinationBase" class="col-sm-6 col-form-label">Archive Destination Base</label>
|
||||
<InputText class="form-control" id="ArchiveDestinationBase" placeholder="Enter Subject" @bind-Value="Request.ArchiveDestinationBase" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="EffectiveDate" class="col-sm-10 col-form-label">Effective Date</label>
|
||||
<InputDate class="form-control" id="EffectiveDate" placeholder="Effective Date" @bind-Value="Request.EffectiveDate" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col-sm-10 col-form-label"> Days From Date </div>
|
||||
<div>
|
||||
<InputNumber class="form-control" id="DaysFromToday"@bind-Value="Request.DaysFromDate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TextBoxListComponent Id="ArchiveIdentifiers"
|
||||
Label="Archive Identifiers"
|
||||
Placeholder="Identifier"
|
||||
TextBoxInputList="Request.ArchiveIdentifiers" />
|
||||
<TextBoxListComponent Id="AllowedExensions"
|
||||
Label="Allowed Exensions"
|
||||
Placeholder="Exension"
|
||||
TextBoxInputList="Request.AllowedExensions" />
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedIfEmpty" class="col-sm-11 col-form-label">Succeed If Empty</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="SucceedIfEmpty">
|
||||
<button type="button" class="btn @(Request.SucceedIfEmpty ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSucceedIfEmpty())">No</button>
|
||||
<button type="button" class="btn @(Request.SucceedIfEmpty ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSucceedIfEmpty())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ArchiveRequest Request { get; set; }
|
||||
private string Title = "Core Archive Applications";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ArchiveRequest)WorkItemComponent.Item;
|
||||
|
||||
if (Request.ArchiveIdentifiers == null)
|
||||
{
|
||||
Request.ArchiveIdentifiers = new List<string>();
|
||||
}
|
||||
|
||||
if (Request.AllowedExensions == null)
|
||||
{
|
||||
Request.AllowedExensions = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeSucceedIfEmpty()
|
||||
{
|
||||
Request.SucceedIfEmpty = !Request.SucceedIfEmpty;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-sm-6 col-form-label">Reset Start Date (optional):</label>
|
||||
<InputDate id="ResetStartDate" class="form-control" TValue="DateTime?" @bind-Value="Request.ResetStartDate" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label class="col-sm-6 col-form-label">Reset End Date (optional):</label>
|
||||
<InputDate id="ResetEndDate" class="form-control" TValue="DateTime?" @bind-Value="Request.ResetEndDate" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="FetchSize" class="col-sm-6 col-form-label">Fetch Size (optional)</label>
|
||||
<InputNumber class="form-control" id="FetchSize" TValue="int?" placeholder="Enter Fetch Size" @bind-Value="Request.FetchSize" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public UpdatePersonForCheckHoldRequest Request { get; set; }
|
||||
private string Title = "Atm Person Check Holds";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (UpdatePersonForCheckHoldRequest)WorkItemComponent.Item;
|
||||
}
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
@using LCU.API.Internal.BlendApiWrapperModels.Enums;
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="ClearDataBeforeImport" class="col-sm-11 col-form-label">ClearDataBeforeImport</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="ClearDataBeforeImport">
|
||||
<button type="button" class="btn @(Request.ClearDataBeforeImport ? " btn-secondary" : "btn-dark" )" @onclick="(() => ChangeClearDataBeforeImport())">No</button>
|
||||
<button type="button" class="btn @(Request.ClearDataBeforeImport ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeClearDataBeforeImport())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="ImportData" class="col-sm-11 col-form-label">ImportData</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="ImportData">
|
||||
<button type="button" class="btn @(Request.ImportData ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeImportData())">No</button>
|
||||
<button type="button" class="btn @(Request.ImportData ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeImportData())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Import Process: </label>
|
||||
<InputSelect class="form-control" @bind-Value="Request.ApplicationProcess">
|
||||
<option value=""></option>
|
||||
@foreach (var process in Enum.GetValues(typeof(ApplicationProcess)))
|
||||
{
|
||||
<option value="@process">@process</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public SyncDataFromBlendRequest Request { get; set; }
|
||||
private string Title = "Sync Blend Data";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (SyncDataFromBlendRequest)WorkItemComponent.Item;
|
||||
}
|
||||
|
||||
private void ChangeClearDataBeforeImport()
|
||||
{
|
||||
Request.ClearDataBeforeImport = !Request.ClearDataBeforeImport;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void ChangeImportData()
|
||||
{
|
||||
Request.ImportData = !Request.ImportData;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationPath" class="col-sm-6 col-form-label">Destination Path</label>
|
||||
<InputText class="form-control" id="DestinationPath" placeholder="Enter Destination Path" @bind-Value="Request.DestinationPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Overwrite" class="col-sm-11 col-form-label">Overwrite</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeOverwrite())">No</button>
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeOverwrite())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedOnError" class="col-sm-11 col-form-label">Succeed On Error</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSucceedOnError())">No</button>
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSucceedOnError())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public CopyFileRequest Request { get; set; }
|
||||
private string Title = "Copy File";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (CopyFileRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void ChangeOverwrite()
|
||||
{
|
||||
Request.Overwrite = !Request.Overwrite;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void ChangeSucceedOnError()
|
||||
{
|
||||
Request.SucceedOnError = !Request.SucceedOnError;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<DynamicName InputLabel="@("New Directory Name")"
|
||||
Name="@Request.DirectoryName"
|
||||
DynamicNameSetting="Request.NameSetting"
|
||||
NameChanged="UpdateDirectoryName"
|
||||
NameSettingChanged="UpdateNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="DirectoryPath" class="col-sm-6 col-form-label">Directory Path</label>
|
||||
<InputText class="form-control" id="DirectoryPath" placeholder="Enter Directory Path" @bind-Value="Request.DirectoryPath" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public CreateDirectoryRequest Request { get; set; }
|
||||
public string Title = "Create Directory";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (CreateDirectoryRequest)WorkItemComponent.Item;
|
||||
Request.NameSetting = Request.NameSetting ?? new DynamicNameSetting();
|
||||
Request.NameSetting.DateFormatSettings = Request.NameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDirectoryName(string directoryName)
|
||||
{
|
||||
Request.DirectoryName = directoryName;
|
||||
}
|
||||
|
||||
private void UpdateNameSettings(DynamicNameSetting nameSetting)
|
||||
{
|
||||
Request.NameSetting = nameSetting;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Campaign Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="Request.CampaignType">
|
||||
<option value=""></option>
|
||||
@foreach (var campaignTypes in Enum.GetValues(typeof(VoAppsCampaignType)))
|
||||
{
|
||||
<option value="@campaignTypes">@campaignTypes</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="CampaignName" class="col-sm-6 col-form-label">Campaign Name</label>
|
||||
<InputText class="form-control" id="CampaignName" placeholder="Enter Campaign Name" @bind-Value="Request.CampaignName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="CampaignDate" class="col-sm-12 col-form-label">Campaign Date</label>
|
||||
<InputDate class="form-control" id="CampaignDate" placeholder="Campaign Date" @bind-Value="Request.CampaignDate" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="col-sm-10 col-form-label">Days From Date</div>
|
||||
<div>
|
||||
<InputNumber class="form-control" id="CampaignDateOffset" @bind-Value="Request.CampaignDateOffset" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Campaign Pace: </label>
|
||||
<InputSelect class="form-control" @bind-Value="Request.CampaignPace">
|
||||
<option value=""></option>
|
||||
@foreach (var campaignPaces in Enum.GetValues(typeof(VoAppsCampaignPace)))
|
||||
{
|
||||
<option value="@campaignPaces">@campaignPaces</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="FileName" class="col-sm-6 col-form-label">File Name</label>
|
||||
<InputText class="form-control" id="FileName" placeholder="Enter File Name" @bind-Value="Request.FileName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="CallSecondaryPhoneNumbers" class="col-sm-12 col-form-label">Call Secondary Phone Numbers</label>
|
||||
<div class="col-sm-1">
|
||||
<InputCheckbox class="form-control" id="CallSecondaryPhoneNumbers" @bind-Value="@Request.CallSecondaryPhoneNumbers">Yes</InputCheckbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="CampaignCallerNumber" class="col-sm-6 col-form-label">Campaign Caller Number</label>
|
||||
<InputText class="form-control" id="CampaignCallerNumber" placeholder="Enter Campaign Caller Number" @bind-Value="Request.CampaignCallerNumber" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleMonday" class="col-sm-6 col-form-label">Monday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleMonday" placeholder="Enter Monday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Monday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleTuesday" class="col-sm-6 col-form-label">Tuesday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleTuesday" placeholder="Enter Tuesday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Tuesday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleWednesday" class="col-sm-6 col-form-label">Wednesday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleWednesday" placeholder="Enter Wednesday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Wednesday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleThursday" class="col-sm-6 col-form-label">Thursday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleThursday" placeholder="Enter Thursday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Thursday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleFriday" class="col-sm-6 col-form-label">Friday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleFriday" placeholder="Enter Friday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Friday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleSaturday" class="col-sm-6 col-form-label">Saturday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleSaturday" placeholder="Enter Saturday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Saturday" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="VoAppsMessageIdScheduleSunday" class="col-sm-6 col-form-label">Sunday Message Id</label>
|
||||
<InputNumber class="form-control" id="VoAppsMessageIdScheduleSunday" placeholder="Enter Sunday Message Id" @bind-Value="Request.VoAppsMessageIdSchedule.Sunday" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public CreateVoAppsCampaignRequest Request { get; set; }
|
||||
private string Title = "Create VoApps Campaign";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (CreateVoAppsCampaignRequest) WorkItemComponent.Item;
|
||||
if(Request?.VoAppsMessageIdSchedule == null)
|
||||
{
|
||||
Request.VoAppsMessageIdSchedule = new VoAppsMessageIdSchedule();
|
||||
}
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Data CleanUp Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.CleanUpType">
|
||||
@foreach (var dataCleanUpType in Enum.GetValues(typeof(CleanUpTypes)))
|
||||
{
|
||||
<option value="@dataCleanUpType">@dataCleanUpType</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DataCleanUpRequest Request { get; set; }
|
||||
private string Title = "Data CleanUp Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DataCleanUpRequest)WorkItemComponent.Item;
|
||||
Request.DataCleanUpPayload = "";
|
||||
}
|
||||
|
||||
private void UpdateDataCleanUpRequestSettings(CleanUpTypes cleanUpTypesSetting)
|
||||
{
|
||||
Request.CleanUpType = cleanUpTypesSetting;
|
||||
Request.DataCleanUpPayload = "";
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source FileName")"
|
||||
Name="@Request.Filename"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="ErrorDestinationPath" class="col-sm-6 col-form-label">Error Destination Path</label>
|
||||
<InputText class="form-control" id="ErrorDestinationPath" placeholder="Enter Error Destination Path" @bind-Value="Request.ErrorDestinationPath" />
|
||||
</div>
|
||||
<TextBoxListComponent Id="EmailRecipients"
|
||||
Label="Email Recipients"
|
||||
Placeholder="EmailSummaryRecipients"
|
||||
TextBoxInputList="Request.EmailSummaryRecipients" />
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public FannieMaeMortgageRequest Request { get; set; }
|
||||
private string Title = "Data CleanUp Fannie Mae Update Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (FannieMaeMortgageRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
if (Request.EmailSummaryRecipients == null)
|
||||
{
|
||||
Request.EmailSummaryRecipients = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.Filename = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="Filename" class="col-sm-6 col-form-label">File Name</label>
|
||||
<InputText class="form-control" id="Filename" placeholder="Enter Source Path" @bind-Value="Request.Filename" />
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="SummaryFileDestinationPath" class="col-sm-6 col-form-label">Summary File Destination Path</label>
|
||||
<InputText class="form-control" id="SummaryFileDestinationPath" placeholder="Enter Summary File Destination Path" @bind-Value="Request.SummaryFileDestinationPath" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public IndirectFundingRequest Request { get; set; }
|
||||
private string Title = "Data CleanUp Indirect Funding Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (IndirectFundingRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source FileName")"
|
||||
Name="@Request.Filename"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="ErrorDestinationPath" class="col-sm-6 col-form-label">Error Destination Path</label>
|
||||
<InputText class="form-control" id="ErrorDestinationPath" placeholder="Enter Error Destination Path" @bind-Value="Request.ErrorDestinationPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="ExclusionFilePath" class="col-sm-6 col-form-label">Exclusion File Path</label>
|
||||
<InputText class="form-control" id="ExclusionFilePath" placeholder="Enter Exclusion File Path" @bind-Value="Request.ExclusionFilePath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="ExclusionDays" class="col-sm-11 col-form-label">Exclusion Days</label>
|
||||
<div class="col-md-6">
|
||||
<InputNumber class="form-control" id="ExclusionDays" min="-1000" max="0" @bind-Value="Request.ExclusionDays" />
|
||||
</div>
|
||||
</div>
|
||||
<TextBoxListComponent Id="EmailRecipients"
|
||||
Label="Email Recipients"
|
||||
Placeholder="EmailSummaryRecipients"
|
||||
TextBoxInputList="Request.EmailSummaryRecipients" />
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public NcoaUpdateRequest Request { get; set; }
|
||||
private string Title = "Data CleanUp NCOA Update Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (NcoaUpdateRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
if (Request.EmailSummaryRecipients == null)
|
||||
{
|
||||
Request.EmailSummaryRecipients = new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.Filename = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
@using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="col">
|
||||
<div class="form-group form-row">
|
||||
<TextBoxListComponent Id="MissingRoleNotification"
|
||||
Label="MissingRole Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.MissingRoleNotification" />
|
||||
<TextBoxListComponent Id="TerminatedEmployeeNotification"
|
||||
Label="Terminated Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.TerminatedEmployeeNotification" />
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DayforceProcessRequest Request { get; set; }
|
||||
private string Title = "Dayforce Process Request:";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DayforceProcessRequest)WorkItemComponent.Item;
|
||||
if (Request.MissingRoleNotification == null)
|
||||
{
|
||||
Request.MissingRoleNotification = new List<string>();
|
||||
}
|
||||
if (Request.TerminatedEmployeeNotification == null)
|
||||
{
|
||||
Request.TerminatedEmployeeNotification = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
@using LCU.Library.Internal.TemenosNotificationApiModels.Requests
|
||||
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<CardDisplay ShowCardShadow="false" AddedCss="form-group form-row my-3 w-100 d-inline-block">
|
||||
<div class="form-group form-row">
|
||||
|
||||
<div class="col-12">
|
||||
<DynamicName InputLabel="@("File Name")"
|
||||
Name="@Request.FileName"
|
||||
DynamicNameSetting="Request.DynamicFileNameSettings"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<DynamicName InputLabel="@("File Path")"
|
||||
Name="@Request.FilePath"
|
||||
DynamicNameSetting="Request.DynamicFilePathSettings"
|
||||
NameChanged="UpdateFilePath"
|
||||
NameSettingChanged="UpdateFilePathSettings">
|
||||
</DynamicName>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</CardDisplay>
|
||||
</ActionForm>
|
||||
|
||||
@code
|
||||
{
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DealerAchNotificationRequest Request { get; set; }
|
||||
private const string Title = "Dealer ACH Notification";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DealerAchNotificationRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileNameSettings = Request.DynamicFileNameSettings.AddDynamicNameSetting(true, true);
|
||||
Request.DynamicFilePathSettings = Request.DynamicFilePathSettings.AddDynamicNameSetting(true, false);
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
=> Request.FileName = fileName;
|
||||
|
||||
private void UpdateFilePath(string filePath)
|
||||
=> Request.FilePath = filePath;
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting indexFileNameSettings)
|
||||
=> Request.DynamicFileNameSettings = indexFileNameSettings;
|
||||
|
||||
private void UpdateFilePathSettings(DynamicNameSetting indexFilePathSettings)
|
||||
=> Request.DynamicFilePathSettings = indexFilePathSettings;
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="KeySourcePath" class="col-sm-6 col-form-label">Key Source Path</label>
|
||||
<InputText class="form-control" id="KeySourcePath" placeholder="Enter Key Source Path" @bind-Value="Request.KeySourcePath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="KeySourceFile" class="col-sm-6 col-form-label">Key Source File</label>
|
||||
<InputText class="form-control" id="KeySourceFile" placeholder="Enter Key Source File" @bind-Value="Request.KeySourceFile" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="PassPhrase" class="col-sm-6 col-form-label">Pass Phrase</label>
|
||||
<InputText class="form-control" id="PassPhrase" placeholder="Enter Pass Phrase" @bind-Value="Request.PassPhrase" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationPath" class="col-sm-6 col-form-label">Destination Path</label>
|
||||
<InputText class="form-control" id="DestinationPath" placeholder="Enter Destination Path" @bind-Value="Request.DestinationPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationFile" class="col-sm-6 col-form-label">Destination File</label>
|
||||
<InputText class="form-control" id="DestinationFile" placeholder="Enter Destination File" @bind-Value="Request.DestinationFile" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Overwrite" class="col-sm-11 col-form-label">Overwrite</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeOverwrite())">No</button>
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeOverwrite())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DecryptFileDataRequest Request { get; set; }
|
||||
private string Title = "Decrypt File Data";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DecryptFileDataRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void ChangeOverwrite()
|
||||
{
|
||||
Request.Overwrite = !Request.Overwrite;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<DynamicName InputLabel="@("Directory Name")"
|
||||
Name="@Request.DirectoryName"
|
||||
DynamicNameSetting="Request.DirectoryNameSettings"
|
||||
NameChanged="UpdateDirectoryName"
|
||||
NameSettingChanged="UpdateDirectoryNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="DirectoryRootPath" class="col-sm-6 col-form-label">Directory Root Path</label>
|
||||
<InputText class="form-control" id="DirectoryRootPath" placeholder="Enter Directory Root Path" @bind-Value="Request.DirectoryRootPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="MaxAmountOfDirectories" class="col-sm-6 col-form-label">MaxAmount Of Directories</label>
|
||||
<InputNumber class="form-control" id="MaxAmountOfDirectories" placeholder="Enter Max Amount Of Directories" @bind-Value="Request.MaxAmountOfDirectories" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Recursive" class="col-sm-11 col-form-label">Recursive</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Recursive">
|
||||
<button type="button" class="btn @(Request.Recursive ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeRecursive())">No</button>
|
||||
<button type="button" class="btn @(Request.Recursive ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeRecursive())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DeleteDirectoryRequest Request { get; set; }
|
||||
private string Title = "Delete Directory";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DeleteDirectoryRequest)WorkItemComponent.Item;
|
||||
Request.DirectoryNameSettings = Request.DirectoryNameSettings ?? new DynamicNameSetting();
|
||||
Request.DirectoryNameSettings.DateFormatSettings = Request.DirectoryNameSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DirectoryNameSettings.RegexSettings = Request.DirectoryNameSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDirectoryName(string directoryName)
|
||||
{
|
||||
Request.DirectoryName = directoryName;
|
||||
}
|
||||
|
||||
private void UpdateDirectoryNameSettings(DynamicNameSetting directoryNameSettings)
|
||||
{
|
||||
Request.DirectoryNameSettings = directoryNameSettings;
|
||||
}
|
||||
|
||||
private void ChangeRecursive()
|
||||
{
|
||||
Request.Recursive = !Request.Recursive;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SubDirectoryPath" class="col-sm-6 col-form-label">Sub Directory Path</label>
|
||||
<InputText class="form-control" id="SubDirectoryPath" placeholder="Enter Sub Directory Path" @bind-Value="Request.SubDirectoryPath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic Directory Name")"
|
||||
Name="@Request.DynamicDirectoryName"
|
||||
DynamicNameSetting="@Request.DirectoryNameSettings"
|
||||
NameChanged="UpdateDirectoryName"
|
||||
NameSettingChanged="UpdateDirectoryNameSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DeleteEmptyDirectoryRequest Request { get; set; }
|
||||
private const string Title = "Delete Empty Directory";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DeleteEmptyDirectoryRequest)WorkItemComponent.Item;
|
||||
Request.DirectoryNameSettings = Request.DirectoryNameSettings ?? new DynamicNameSetting();
|
||||
Request.DirectoryNameSettings.DateFormatSettings = Request.DirectoryNameSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DirectoryNameSettings.RegexSettings = Request.DirectoryNameSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDirectoryName(string directoryName)
|
||||
{
|
||||
Request.DynamicDirectoryName = directoryName;
|
||||
}
|
||||
|
||||
private void UpdateDirectoryNameSettings(DynamicNameSetting directoryNameSettings)
|
||||
{
|
||||
Request.DirectoryNameSettings = directoryNameSettings;
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedOnError" class="col-sm-11 col-form-label">Succeed On Error</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSucceedOnError())">No</button>
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSucceedOnError())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DeleteFileRequest Request { get; set; }
|
||||
private string Title = "Delete File";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DeleteFileRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void ChangeSucceedOnError()
|
||||
{
|
||||
Request.SucceedOnError = !Request.SucceedOnError;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="FileName" class="col-sm-6 col-form-label">File Name</label>
|
||||
<InputText class="form-control" id="FileName" placeholder="Enter File Name" @bind-Value="Request.FileName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="ConsumerRealEstate10To59ContactListId" class="col-sm-12 col-form-label">Consumer Real Estate 10 To 59</label>
|
||||
<InputText class="form-control" id="ConsumerRealEstate10To59ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.ConsumerRealEstate10To59ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="CreditCard11To59ContactListId" class="col-sm-12 col-form-label">Credit Card 11 To 59</label>
|
||||
<InputText class="form-control" id="CreditCard11To59ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.CreditCard11To59ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DirectAuto11To29ContactListId" class="col-sm-12 col-form-label">Direct Auto 11 To 29</label>
|
||||
<InputText class="form-control" id="DirectAuto11To29ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.DirectAuto11To29ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DirectAuto30To59ContactListId" class="col-sm-12 col-form-label">Direct Auto 30 To 59</label>
|
||||
<InputText class="form-control" id="DirectAuto30To59ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.DirectAuto30To59ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndirectAuto11To19ContactListId" class="col-sm-12 col-form-label">Indirect Auto 11 To 19</label>
|
||||
<InputText class="form-control" id="IndirectAuto11To19ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.IndirectAuto11To19ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndirectAuto20To29ContactListId" class="col-sm-12 col-form-label">Indirect Auto 20 To 29</label>
|
||||
<InputText class="form-control" id="IndirectAuto20To29ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.IndirectAuto20To29ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndirectAuto30To59ContactListId" class="col-sm-12 col-form-label">Indirect Auto 30 To 59</label>
|
||||
<InputText class="form-control" id="IndirectAuto30To59ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.IndirectAuto30To59ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="OtherConsumer11To59ContactListId" class="col-sm-12 col-form-label">Other Consumer 11 To 59</label>
|
||||
<InputText class="form-control" id="OtherConsumer11To59ContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.OtherConsumer11To59ContactListId" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Mortgage16PlusContactListId" class="col-sm-12 col-form-label">Mortgage 16 Plus</label>
|
||||
<InputText class="form-control" id="Mortgage16PlusContactListId" placeholder="Enter Contact List Id" @bind-Value="Request.Mortgage16PlusContactListId" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public DialerUploadRequest Request { get; set; }
|
||||
private string Title = "Dialer Upload";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DialerUploadRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Ingestor Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.IngestorType">
|
||||
@foreach (var ingestorTypes in Enum.GetValues(typeof(IngestorTypes)))
|
||||
{
|
||||
<option value="@ingestorTypes">@ingestorTypes</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="RootBasePath" class="col-sm-6 col-form-label">Root Base Path</label>
|
||||
<InputText class="form-control" id="RootBasePath" placeholder="Root Base Path" @bind-Value="Request.RootBasePath" />
|
||||
</div>
|
||||
<CardDisplay CenterCard="true" ShowCardShadow="false">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-8 col-form-label">Use Dynamic Ingestion Date?</label>
|
||||
<LCUToggle Toggle="@Request.UseDynamicIngestionDate"
|
||||
OnChange="UseDynamicIngestionDateChanged"/>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
@if (Request.UseDynamicIngestionDate)
|
||||
{
|
||||
<div class="col-12">
|
||||
<label for="DynamicIngestionDateMonth" class="col-form-label">Dynamic Ingestion Date</label>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateMonth" placeholder="Dynamic Ingestion Month" min="1" max="12" @bind-Value="Request.DynamicIngestionDate.Month" />
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateDay" placeholder="Dynamic Ingestion Day" min="1" max="31" @bind-Value="Request.DynamicIngestionDate.Day" />
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateYear" placeholder="Dynamic Ingestion Year" @bind-Value="Request.DynamicIngestionDate.Year" />
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-12">
|
||||
<label for="IngestionDate" class="col-form-label">Ingestion Date</label>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<InputDate class="form-control" id="IngestionDate" placeholder="Ingestor Date" @bind-Value="Request.IngestionDate" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (!Request.UseDynamicIngestionDate)
|
||||
{
|
||||
<div class="form-group form-row">
|
||||
<div class="col-12">
|
||||
<div class="col-form-label">Days From Date</div>
|
||||
<div>
|
||||
<InputNumber class="form-control" id="DaysIngestionDate" @bind-Value="Request.DaysIngestionDate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</CardDisplay>
|
||||
<DynamicName InputLabel="@("Parent Dynamic Directory")"
|
||||
Name="@Request.ParentDynamicDirectory"
|
||||
DynamicNameSetting="Request.ParentDynamicDirectorySettings"
|
||||
NameChanged="UpdateParentDynamicDirectory"
|
||||
NameSettingChanged="UpdateParentDynamicDirectorySettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="SubDirectoryPath" class="col-sm-6 col-form-label">Subdirectory Path</label>
|
||||
<InputText class="form-control" id="SubDirectoryPath" placeholder="Subdirectory Path" @bind-Value="Request.SubDirectoryPath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic Index FileName")"
|
||||
Name="@Request.DynamicIndexFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicIndexFileName"
|
||||
NameSettingChanged="UpdateDynamicFileSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
[Parameter]
|
||||
public string Title { get; set; }
|
||||
public BatchIngestionRequest Request { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (BatchIngestionRequest)WorkItemComponent.Item;
|
||||
Request.ParentDynamicDirectorySettings = Request.ParentDynamicDirectorySettings ?? new DynamicNameSetting();
|
||||
Request.ParentDynamicDirectorySettings.DateFormatSettings = Request.ParentDynamicDirectorySettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.ParentDynamicDirectorySettings.RegexSettings = Request.ParentDynamicDirectorySettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateParentDynamicDirectory(string directoryName)
|
||||
{
|
||||
Request.ParentDynamicDirectory = directoryName;
|
||||
}
|
||||
|
||||
private void UpdateParentDynamicDirectorySettings(DynamicNameSetting dynamicNameSetting)
|
||||
{
|
||||
Request.ParentDynamicDirectorySettings = dynamicNameSetting;
|
||||
}
|
||||
|
||||
private void UpdateDynamicIndexFileName(string fileName)
|
||||
{
|
||||
Request.DynamicIndexFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicFileSettings(DynamicNameSetting dynamicNameSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicNameSetting;
|
||||
}
|
||||
|
||||
private void UseDynamicIngestionDateChanged(bool value)
|
||||
{
|
||||
Request.UseDynamicIngestionDate = value;
|
||||
|
||||
if (Request.UseDynamicIngestionDate)
|
||||
{
|
||||
Request.DaysIngestionDate = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Ingestor Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.IngestorType">
|
||||
@foreach (var ingestorTypes in Enum.GetValues(typeof(IngestorTypes)))
|
||||
{
|
||||
<option value="@ingestorTypes">@ingestorTypes</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="RootPath" class="col-sm-6 col-form-label">Ingestor Root Path</label>
|
||||
<InputText class="form-control" id="RootPath" placeholder="Root Path" @bind-Value="Request.RootPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="RootPath" class="col-sm-6 col-form-label">Index Filename</label>
|
||||
<InputText class="form-control" id="IndexFileName" placeholder="Index Filename" @bind-Value="Request.IndexFileName" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
[Parameter]
|
||||
public string Title { get; set; } = "Document Ingestor";
|
||||
public IngestorRequest Request { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (IngestorRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
@using LCU.Library.Internal.DocumentIngestorModels.Requests
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row" style="padding: 4px;">
|
||||
<label class="col-lg-12 col-form-label">Select Process Status Type(s)</label>
|
||||
<BlazoredTypeahead SearchMethod="SelectProcessStatus"
|
||||
@bind-Values="_selectedProcessStatuses"
|
||||
Context="statusContext"
|
||||
EnableDropDown="true"
|
||||
placeholder="Select Status Type(s)"
|
||||
MaximumSuggestions="10">
|
||||
<SelectedTemplate>
|
||||
@statusContext
|
||||
</SelectedTemplate>
|
||||
<ResultTemplate>
|
||||
@statusContext
|
||||
</ResultTemplate>
|
||||
</BlazoredTypeahead>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="DocumentManagerUrl" class="col-lg-12 col-form-label">Document Manager Url</label>
|
||||
<InputText class="form-control" id="DocumentManagerUrl" placeholder="Enter Document Manager Url" @bind-Value="Request.ProcessStatusTypeEmailUrl" />
|
||||
</div>
|
||||
|
||||
<TextBoxListComponent Id="EmailRecipients"
|
||||
Label="Email Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.EmailAddresses" />
|
||||
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ProcessStatusTypeEmailRequest Request { get; set; }
|
||||
|
||||
private IList<ProcessStatusTypes> _selectedProcessStatuses = null;
|
||||
private string Title = "Document Ingestor Process Status Summary Email";
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Request = (ProcessStatusTypeEmailRequest)WorkItemComponent.Item;
|
||||
if (Request.EmailAddresses == null && Request.ProcessStatusTypes == null)
|
||||
{
|
||||
Request.EmailAddresses = new List<string>();
|
||||
_selectedProcessStatuses = new List<ProcessStatusTypes>().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (_selectedProcessStatuses != null && _selectedProcessStatuses.Any() && Request.ProcessStatusTypes == null)
|
||||
{
|
||||
Request.ProcessStatusTypes = _selectedProcessStatuses.ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedProcessStatuses = Request.ProcessStatusTypes;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<IEnumerable<ProcessStatusTypes>> SelectProcessStatus(string selectedValue)
|
||||
{
|
||||
var validProcessType = Enum.TryParse<ProcessStatusTypes>(selectedValue, out var value);
|
||||
if (validProcessType)
|
||||
{
|
||||
_selectedProcessStatuses.Add(value);
|
||||
Request.ProcessStatusTypes = _selectedProcessStatuses.ToList();
|
||||
return await Task.FromResult(Request.ProcessStatusTypes.Where(x => x.Equals(selectedValue.ToLower())).ToList());
|
||||
}
|
||||
else
|
||||
{
|
||||
return await Task.FromResult(GetAllowedProcessStatusTypes().ToList());
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<ProcessStatusTypes> GetAllowedProcessStatusTypes()
|
||||
{
|
||||
var request = new ProcessStatusTypeEmailRequest();
|
||||
|
||||
var processStatusList = Enum.GetValues(typeof(ProcessStatusTypes)).Cast<ProcessStatusTypes>().ToList();
|
||||
var notAllowedStatusList = new List<ProcessStatusTypes>();
|
||||
|
||||
foreach (var statusType in processStatusList)
|
||||
{
|
||||
request.ProcessStatusTypes = new List<ProcessStatusTypes>() { statusType };
|
||||
if (request.HasInvalidStatuses(out List<ProcessStatusTypes> isStatusValid))
|
||||
{
|
||||
notAllowedStatusList.Add(statusType);
|
||||
}
|
||||
}
|
||||
return processStatusList.Except(notAllowedStatusList).ToList();
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="Limit" class="col-sm-6 col-form-label">Limit</label>
|
||||
<InputNumber class="form-control" id="Limit" placeholder="Enter Limit" @bind-Value="Request.Limit" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public string Title { get; set; } = "Document Retention Cleanup";
|
||||
public DocumentRetentionLookupRequest Request { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (DocumentRetentionLookupRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="Subject" class="col-sm-6 col-form-label">Subject</label>
|
||||
<InputText class="form-control" id="Subject" placeholder="Enter Subject" @bind-Value="Request.Subject" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Body" class="col-sm-6 col-form-label">Body</label>
|
||||
<InputTextArea class="form-control" id="exampleFormControlTextarea1" rows="3" @bind-Value="Request.Body" placeholder="Enter Body"></InputTextArea>
|
||||
</div>
|
||||
<TextBoxListComponent Id="EmailRecipients"
|
||||
Label="Email Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.Recipient" />
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public EmailRequest Request { get; set; }
|
||||
private string Title = "Email";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (EmailRequest)WorkItemComponent.Item;
|
||||
|
||||
if (Request.Recipient == null)
|
||||
{
|
||||
Request.Recipient = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="KeySourcePath" class="col-sm-6 col-form-label">Key Source Path</label>
|
||||
<InputText class="form-control" id="KeySourcePath" placeholder="Enter Key Source Path" @bind-Value="Request.KeySourcePath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="KeySourceFile" class="col-sm-6 col-form-label">Key Source File</label>
|
||||
<InputText class="form-control" id="KeySourceFile" placeholder="Enter Key Source File" @bind-Value="Request.KeySourceFile" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationPath" class="col-sm-6 col-form-label">Destination Path</label>
|
||||
<InputText class="form-control" id="DestinationPath" placeholder="Enter Destination Path" @bind-Value="Request.DestinationPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Overwrite" class="col-sm-11 col-form-label">Overwrite</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeOverwrite())">No</button>
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeOverwrite())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public EncryptFileDataRequest Request { get; set; }
|
||||
private string Title = "Encrypt File Data";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (EncryptFileDataRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void ChangeOverwrite()
|
||||
{
|
||||
Request.Overwrite = !Request.Overwrite;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
@using LCU.Library.Internal.LcuEvaluationComponents.EvaluationBuilder
|
||||
@using LCU.Library.Internal.LcuEvaluationModels.Entities
|
||||
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
|
||||
<div class="my-3">
|
||||
<label for="DelimiterType" class="col-form-label font-weight-bold">Index File</label>
|
||||
<CardDisplay ShowCardShadow="false">
|
||||
<DynamicName InputLabel="@("Index File Name")"
|
||||
Name="@Request.IndexFileName"
|
||||
DynamicNameSetting="Request.IndexFileNameSetting"
|
||||
NameChanged="UpdateIndexFileName"
|
||||
NameSettingChanged="UpdateIndexFileNameSettings">
|
||||
</DynamicName>
|
||||
<DynamicName InputLabel="@("Index File Path")"
|
||||
Name="@Request.IndexFilePath"
|
||||
DynamicNameSetting="Request.IndexFilePathSetting"
|
||||
NameChanged="UpdateIndexFilePath"
|
||||
NameSettingChanged="UpdateIndexFilePathSettings">
|
||||
</DynamicName>
|
||||
</CardDisplay>
|
||||
</div>
|
||||
|
||||
<div class="my-3">
|
||||
<label for="DelimiterType" class="col-form-label font-weight-bold">Destination File</label>
|
||||
<CardDisplay ShowCardShadow="false">
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationFileName" class="col-sm-6 col-form-label">Destination File Name</label>
|
||||
<InputText class="form-control" id="DestinationFileName" placeholder="Enter Destination Index File Name" @bind-Value="Request.DestinationIndexFileName" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Destination File Path")"
|
||||
Name="@Request.DestinationFilePath"
|
||||
DynamicNameSetting="Request.DestinationFilePathSetting"
|
||||
NameChanged="UpdateDestinationFilePath"
|
||||
NameSettingChanged="UpdateDestinationFilePathSettings">
|
||||
</DynamicName>
|
||||
</CardDisplay>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<div class="col-12">
|
||||
<label for="AddEvaluationRule" class="col-form-label font-weight-bold col-12">Add Evaluation Rule</label>
|
||||
</div>
|
||||
<div class="py-1 col">
|
||||
<CardDisplay ShowCardShadow="false">
|
||||
@if (!string.IsNullOrWhiteSpace(Request.EvaluationRule?.EvaluationDescription))
|
||||
{
|
||||
<div class="py-2 my-2">
|
||||
@((MarkupString)Request.EvaluationRule.EvaluationDescription)
|
||||
</div>
|
||||
}
|
||||
<button class="btn btn-primary"
|
||||
onclick="@(() => ShowAddEvaluationModal())"
|
||||
disabled="@(_hasEvaluationRule)">
|
||||
Add Rule
|
||||
</button>
|
||||
<button class="btn btn-primary"
|
||||
onclick="@(() => ShowAddEvaluationModal())"
|
||||
disabled="@(!_hasEvaluationRule)">
|
||||
Edit Rule
|
||||
</button>
|
||||
<button class="btn btn-danger"
|
||||
onclick="@(() => DeleteEvaluationRule())"
|
||||
disabled="@(!_hasEvaluationRule)">
|
||||
Delete Rule
|
||||
</button>
|
||||
<LCUConfirm @ref="AddEvaluationRule"
|
||||
ConfirmationTitle="Add Evaluation Rule"
|
||||
ConfirmationMessage=" "
|
||||
CustomWidth="1150px"
|
||||
ConfirmButtonText="Save Evaluation"
|
||||
ConfirmDisabled="!_evaluationIsValid"
|
||||
ConfirmationChanged="AddRule">
|
||||
<AdditionalContent>
|
||||
<div style="max-height: 70vh; overflow-y: scroll;">
|
||||
<EvaluationBuilder Variables="@Variables"
|
||||
EvaluationDetail="@EvaluationDetail"
|
||||
IsValid="EvaluationIsValid"
|
||||
HideSave="true"
|
||||
EditEvaluationType="false"/>
|
||||
</div>
|
||||
</AdditionalContent>
|
||||
</LCUConfirm>
|
||||
</CardDisplay>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<div class="col-12 form-row">
|
||||
<label for="AppendToIndexFile" class="col-form-label col font-weight-bold">Indexes To Extract</label>
|
||||
</div>
|
||||
<div class="py-1 col">
|
||||
<CardDisplay ShowCardShadow="false" AddedCss="form-group form-row">
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="ExtractAll" class="col-form-label col-12">Extract all indexes?</label>
|
||||
<div class="col-12">
|
||||
<div class="btn-group" role="group" aria-label="ExtractAll">
|
||||
<button type="button" class="btn @(Request.ExtractAllIndexes ? "btn-secondary" : "btn-dark")" @onclick="ToggleExtractAll">No</button>
|
||||
<button type="button" class="btn @(Request.ExtractAllIndexes ? "btn-danger" : "btn-secondary")" @onclick="ToggleExtractAll">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!Request.ExtractAllIndexes)
|
||||
{
|
||||
<div class="col-12 form-row px-0">
|
||||
<label for="ExtractAll" class="col-form-label col">Indexes To Extract <i>(0 - 29)</i></label>
|
||||
<button class="btn btn-primary"
|
||||
onclick="@AddIndexToExtract"
|
||||
disabled="@(_indexesToExtract.Count(x => x is null) > 0)">
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
@foreach (var index in _indexesToExtract.Select((value, i) => new { Index = i, Value = value }))
|
||||
{
|
||||
<div class="d-flex flex-grow-1 py-1">
|
||||
<input type="number"
|
||||
class="form-control"
|
||||
value="@index.Value"
|
||||
max="29"
|
||||
@oninput="change => UpdateIndexesToExtract(index.Index, change.Value?.ToString())"/>
|
||||
@if (index.Index > 0)
|
||||
{
|
||||
<button class="btn btn-danger ml-3"
|
||||
style="width: 38px;"
|
||||
@onclick="(() => RemoveIndexToExtract(index.Index))">
|
||||
-
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</CardDisplay>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="DelimiterType" class="col-form-label font-weight-bold col-12">Delimiter Type</label>
|
||||
<BlazoredTypeahead SearchMethod="@FilterDelimiterTypes"
|
||||
id="DelimiterType"
|
||||
TValue="@string"
|
||||
TItem="@string"
|
||||
MaximumSuggestions="100"
|
||||
Value="@_selectedDelimiterType"
|
||||
ValueExpression="@(() => _selectedDelimiterType)"
|
||||
ValueChanged="@DelimiterTypeSelected"
|
||||
EnableDropDown="true"
|
||||
placeholder="Select Delimiter Type">
|
||||
<SelectedTemplate Context="context">
|
||||
@context
|
||||
</SelectedTemplate>
|
||||
<ResultTemplate Context="context">
|
||||
@context
|
||||
</ResultTemplate>
|
||||
</BlazoredTypeahead>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="AppendToIndexFile" class="col-form-label font-weight-bold col-12">Append To Destination Index File</label>
|
||||
<div class="col-12">
|
||||
<div class="btn-group" role="group" aria-label="AppendToIndexFile">
|
||||
<button type="button" class="btn @(Request.AppendToDestinationIndexFile ? "btn-secondary" : "btn-dark")" @onclick="ToggleAppendToIndexFile">No</button>
|
||||
<button type="button" class="btn @(Request.AppendToDestinationIndexFile ? "btn-danger" : "btn-secondary")" @onclick="ToggleAppendToIndexFile">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
<label for="IndexHasHeaders" class="col-form-label font-weight-bold col-12">Index Has Headers</label>
|
||||
<div class="col-12">
|
||||
<div class="btn-group" role="group" aria-label="IndexHasHeaders">
|
||||
<button type="button" class="btn @(Request.IndexHasHeaders ? "btn-secondary" : "btn-dark")" @onclick="ToggleIndexHasHeaders">No</button>
|
||||
<button type="button" class="btn @(Request.IndexHasHeaders ? "btn-danger" : "btn-secondary")" @onclick="ToggleIndexHasHeaders">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<FluentValidationValidator @ref="_fluentValidationValidator" Options="@(options => options.IncludeRuleSets(_ruleSets))"/>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
|
||||
public ExtractIndexFileDataRequest Request { get; set; }
|
||||
|
||||
private FluentValidationValidator? _fluentValidationValidator;
|
||||
private readonly string[] _ruleSets = { "ExtractIndexFileDataRequest" };
|
||||
|
||||
private EvaluationDetail EvaluationDetail { get; set; } = new();
|
||||
private List<string> Variables { get; set; } = new();
|
||||
private bool _hasEvaluationRule = false;
|
||||
private bool _evaluationIsValid;
|
||||
|
||||
private string Title = "Extract Index File Data";
|
||||
|
||||
private string _selectedDelimiterType = string.Empty;
|
||||
private List<int?> _indexesToExtract = new();
|
||||
|
||||
private LCUConfirm? AddEvaluationRule { get; set; }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
Variables = IndexEvaluationRequestVariablesConsts.IndexEvaluationRequestVariablesConstValues;
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ExtractIndexFileDataRequest)WorkItemComponent.Item;
|
||||
Request.IndexFileNameSetting = Request.IndexFileNameSetting.AddDynamicNameSetting(true, true);
|
||||
Request.IndexFilePathSetting = Request.IndexFilePathSetting.AddDynamicNameSetting(true, false);
|
||||
Request.DestinationFilePathSetting = Request.DestinationFilePathSetting.AddDynamicNameSetting(true, false);
|
||||
|
||||
_hasEvaluationRule = Request.EvaluationRule is not null &&
|
||||
Request.EvaluationRule.EvaluationParameters.Any() &&
|
||||
!string.IsNullOrWhiteSpace(Request.EvaluationRule?.EvaluationDescription);
|
||||
|
||||
if (Request.IndexesToExtract is null || !Request.IndexesToExtract.Any())
|
||||
{
|
||||
_indexesToExtract = new List<int?> { null };
|
||||
}
|
||||
else {
|
||||
_indexesToExtract = Request.IndexesToExtract.Select(x => (int?)x).ToList();
|
||||
}
|
||||
|
||||
if (Request?.DelimiterType is not null)
|
||||
{
|
||||
_selectedDelimiterType = Enum.GetName(typeof(Delimiters), Request?.DelimiterType);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateIndexFileName(string indexFileName)
|
||||
=> Request.IndexFileName = indexFileName;
|
||||
|
||||
private void UpdateIndexFileNameSettings(DynamicNameSetting indexFileNameSettings)
|
||||
=> Request.IndexFileNameSetting = indexFileNameSettings;
|
||||
|
||||
private void UpdateIndexFilePath(string indexFilePath)
|
||||
=> Request.IndexFilePath = indexFilePath;
|
||||
|
||||
private void UpdateIndexFilePathSettings(DynamicNameSetting indexFilePathSettings)
|
||||
=> Request.IndexFilePathSetting = indexFilePathSettings;
|
||||
|
||||
private void UpdateDestinationFilePath(string destinationFilePath)
|
||||
=> Request.DestinationFilePath = destinationFilePath;
|
||||
|
||||
private void UpdateDestinationFilePathSettings(DynamicNameSetting destinationFilePathSetting)
|
||||
=> Request.DestinationFilePathSetting = destinationFilePathSetting;
|
||||
|
||||
private void EvaluationIsValid(bool isValid) => _evaluationIsValid = isValid;
|
||||
|
||||
private void ToggleAppendToIndexFile()
|
||||
{
|
||||
Request.AppendToDestinationIndexFile = !Request.AppendToDestinationIndexFile;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void ToggleIndexHasHeaders()
|
||||
{
|
||||
Request.IndexHasHeaders = !Request.IndexHasHeaders;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task ToggleExtractAll()
|
||||
{
|
||||
Request.ExtractAllIndexes = !Request.ExtractAllIndexes;
|
||||
Request.IndexesToExtract = new();
|
||||
_indexesToExtract = new List<int?> { null };
|
||||
await _fluentValidationValidator!.ValidateAsync();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private Task<IEnumerable<string>> FilterDelimiterTypes(string search)
|
||||
=> Task.FromResult(Enum.GetNames(typeof(Delimiters)).ToList().Where(s => s.ToString().Contains(search, StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
private void DelimiterTypeSelected(string selectedType)
|
||||
{
|
||||
if (Enum.TryParse<Delimiters>(selectedType, out var value))
|
||||
{
|
||||
_selectedDelimiterType = selectedType;
|
||||
Request.DelimiterType = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedDelimiterType = Enum.GetName(typeof(Delimiters), Request.DelimiterType);
|
||||
}
|
||||
}
|
||||
|
||||
private void AddIndexToExtract()
|
||||
{
|
||||
_indexesToExtract.Add(null);
|
||||
}
|
||||
|
||||
private void ShowAddEvaluationModal()
|
||||
{
|
||||
EvaluationDetail = Request.EvaluationRule.DeepClone() ?? new EvaluationDetail();
|
||||
AddEvaluationRule?.Show();
|
||||
}
|
||||
|
||||
private async Task RemoveIndexToExtract(int index)
|
||||
{
|
||||
_indexesToExtract.RemoveAt(index);
|
||||
await UpdateRequestIndexesToExtract();
|
||||
}
|
||||
|
||||
private async Task UpdateIndexesToExtract(int index, string? value)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
_indexesToExtract[index] = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(value, out var number)) return;
|
||||
|
||||
_indexesToExtract[index] = number;
|
||||
await UpdateRequestIndexesToExtract();
|
||||
}
|
||||
|
||||
private async Task UpdateRequestIndexesToExtract()
|
||||
{
|
||||
Request.IndexesToExtract = _indexesToExtract.Where(x => x is not null).Select(x => (int)x).Distinct().ToList();
|
||||
await _fluentValidationValidator!.ValidateAsync();
|
||||
}
|
||||
|
||||
private void AddRule(bool confirm)
|
||||
{
|
||||
if (!confirm) return;
|
||||
|
||||
_hasEvaluationRule = true;
|
||||
Request.EvaluationRule = EvaluationDetail;
|
||||
EvaluationDetail = new EvaluationDetail();
|
||||
}
|
||||
|
||||
private void DeleteEvaluationRule()
|
||||
{
|
||||
_hasEvaluationRule = false;
|
||||
Request.EvaluationRule = null;
|
||||
EvaluationDetail = new EvaluationDetail();
|
||||
}
|
||||
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<DynamicName InputLabel="@("Index File Directory")"
|
||||
Name="@Request.IndexFileDirectory"
|
||||
DynamicNameSetting="Request.DynamicDirectorySetting"
|
||||
NameChanged="UpdateIndexFileDirectoy"
|
||||
NameSettingChanged="UpdateDynamicDirectorySetting">
|
||||
</DynamicName>
|
||||
<DynamicName InputLabel="@("Dynamic File Name")"
|
||||
Name="@Request.DynamicFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicName"
|
||||
NameSettingChanged="UpdateDynamicSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select File Delimiter Type</label>
|
||||
<InputSelect class="form-control" @bind-Value="Request.DelimiterType">
|
||||
<option value=""></option>
|
||||
@foreach (var delimiter in Enum.GetValues(typeof(Delimiters)))
|
||||
{
|
||||
<option value="@delimiter">@delimiter</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndexFieldIndexNumber" class="col-sm-6 col-form-label">Index Field Index Number</label>
|
||||
<InputNumber class="form-control" id="IndexFieldIndexNumber" placeholder="Enter Index Field Index Number" @bind-Value="Request.IndexFieldIndexNumber"></InputNumber>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndexFieldMappingHeadId" class="col-sm-6 col-form-label">Index Field Mapping Head Id</label>
|
||||
<InputNumber class="form-control" id="IndexFieldMappingHeadId" placeholder="Enter Index Field Mapping Head Id" @bind-Value="Request.IndexFieldMappingHeadId"></InputNumber>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="IndexFieldAddLocation" class="col-sm-6 col-form-label">Index Field Add Location</label>
|
||||
<InputNumber class="form-control" id="IndexFieldAddLocation" placeholder="Enter Index Field Add Location" @bind-Value="Request.IndexFieldAddLocation"></InputNumber>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="HasHeader" class="col-sm-11 col-form-label">Has Header</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="HasHeader">
|
||||
<button type="button" class="btn @(Request.IndexFileHasHeader ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeHasHeader())">No</button>
|
||||
<button type="button" class="btn @(Request.IndexFileHasHeader ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeHasHeader())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public IndexFieldMapperRequest Request { get; set; }
|
||||
private string Title = "Queue File Updater";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (IndexFieldMapperRequest)WorkItemComponent.Item;
|
||||
Request.IndexFileDirectory = Request.IndexFileDirectory;
|
||||
Request.DynamicDirectorySetting = Request.DynamicDirectorySetting ?? new DynamicNameSetting();
|
||||
Request.DynamicDirectorySetting.DateFormatSettings = Request.DynamicDirectorySetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
|
||||
Request.DynamicFileName = Request.DynamicFileName;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.DelimiterType = Request.DelimiterType;
|
||||
Request.IndexFieldIndexNumber = Request.IndexFieldIndexNumber;
|
||||
Request.IndexFieldMappingHeadId = Request.IndexFieldMappingHeadId;
|
||||
Request.IndexFieldAddLocation = Request.IndexFieldAddLocation;
|
||||
Request.IndexFileHasHeader = Request.IndexFileHasHeader;
|
||||
|
||||
}
|
||||
|
||||
private void ChangeHasHeader()
|
||||
{
|
||||
Request.IndexFileHasHeader = !Request.IndexFileHasHeader;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateDynamicName(string fileName)
|
||||
{
|
||||
Request.DynamicFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicSettings(DynamicNameSetting dynamicSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicSetting;
|
||||
}
|
||||
|
||||
private void UpdateIndexFileDirectoy(string indexFileDirectoy)
|
||||
{
|
||||
Request.IndexFileDirectory = indexFileDirectoy;
|
||||
}
|
||||
|
||||
private void UpdateDynamicDirectorySetting(DynamicNameSetting dynamicNameSetting)
|
||||
{
|
||||
Request.DynamicDirectorySetting = dynamicNameSetting;
|
||||
}
|
||||
}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
@using LCU.Library.Internal.FileOperationsModels.Models.Requests
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<DynamicName InputLabel="@("Source Path")"
|
||||
Name="@Request.FileSourceRequest.SourcePath"
|
||||
DynamicNameSetting="Request.FileSourceRequest.SourcePathSettings"
|
||||
NameChanged="UpdateSourcePath"
|
||||
NameSettingChanged="UpdateSourcePathSettings">
|
||||
</DynamicName>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.FileSourceRequest.SourceFile"
|
||||
DynamicNameSetting="Request.FileSourceRequest.SourceFileSettings"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedOnError" class="col-sm-11 col-form-label">Should File Exist?</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.FileDoesExist ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeFileValidationToggle())">No</button>
|
||||
<button type="button" class="btn @(Request.FileDoesExist ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeFileValidationToggle())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<CardDisplay CenterCard="true" ShowCardShadow="false">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-8 col-form-label">Check File Count?</label>
|
||||
<LCUToggle Toggle="@Request.CheckFileCount"
|
||||
OnChange="UseCheckFileCount" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
@if (Request.CheckFileCount)
|
||||
{
|
||||
<div class="col-12">
|
||||
<label for="FileCount" class="col-form-label">File Count Condition</label>
|
||||
<InputNumber class="form-control my-2" id="FileCount" placeholder="File Count" @bind-Value="Request.FileCount" />
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Operator Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.OperatorType">
|
||||
@foreach (var operatorTypes in Enum.GetValues(typeof(OperatorTypes)))
|
||||
{
|
||||
<option value="@operatorTypes">@operatorTypes</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</CardDisplay>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ValidateFileRequest Request { get; set; }
|
||||
private string Title = "Validate File";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ValidateFileRequest)WorkItemComponent.Item;
|
||||
Request.FileSourceRequest.SourceFileSettings = Request.FileSourceRequest.SourceFileSettings ?? new DynamicNameSetting();
|
||||
Request.FileSourceRequest.SourceFileSettings.DateFormatSettings = Request.FileSourceRequest.SourceFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileSourceRequest.SourceFileSettings.RegexSettings = Request.FileSourceRequest.SourceFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.FileSourceRequest.SourcePathSettings = Request.FileSourceRequest.SourcePathSettings ?? new DynamicNameSetting();
|
||||
Request.FileSourceRequest.SourcePathSettings.DateFormatSettings = Request.FileSourceRequest.SourcePathSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.FileSourceRequest.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void UpdateSourcePath(string sourcePath)
|
||||
{
|
||||
Request.FileSourceRequest.SourcePath = sourcePath;
|
||||
}
|
||||
|
||||
private void ChangeFileValidationToggle()
|
||||
{
|
||||
Request.FileDoesExist = !Request.FileDoesExist;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileSourceRequest.SourceFileSettings = fileNameSetting;
|
||||
}
|
||||
|
||||
private void UpdateSourcePathSettings(DynamicNameSetting sourcePathSetting)
|
||||
{
|
||||
Request.FileSourceRequest.SourcePathSettings = sourcePathSetting;
|
||||
}
|
||||
|
||||
private void UseCheckFileCount(bool value)
|
||||
{
|
||||
Request.CheckFileCount = value;
|
||||
|
||||
if (Request.CheckFileCount)
|
||||
{
|
||||
Request.FileCount = 0;
|
||||
Request.OperatorType = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row" style="padding-top: 4px;">
|
||||
<label class="col-sm-6 col-form-label" for="body">Months Back</label>
|
||||
<InputNumber class="form-control" id="MonthsBack" min="0" max="0" @bind-Value="Request.MonthsBack" />
|
||||
</div>
|
||||
<div class="form-group form-row" style="padding-top: 4px;">
|
||||
<TextBoxListComponent Id="GoalDispersalNotification"
|
||||
Label="Email Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.GoalDispersalNotification" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public GoalDispersalRequest Request { get; set; }
|
||||
private string Title = "Goal Dispersal Request:";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (GoalDispersalRequest)WorkItemComponent.Item;
|
||||
if (Request.GoalDispersalNotification == null)
|
||||
{
|
||||
Request.GoalDispersalNotification = new List<string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic File Name")"
|
||||
Name="@Request.DynamicFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicName"
|
||||
NameSettingChanged="UpdateDynamicSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ImportCreditCardSalesRequest Request { get; set; }
|
||||
private string Title = "Import Credit Card Sales";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ImportCreditCardSalesRequest)WorkItemComponent.Item;
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDynamicName(string fileName)
|
||||
{
|
||||
Request.DynamicFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicSettings(DynamicNameSetting dynamicSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicSetting;
|
||||
}
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="FilePath" class="col-sm-6 col-form-label">File Path</label>
|
||||
<InputText class="form-control" id="FilePath" placeholder="Enter File Path" @bind-Value="Request.FilePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Direct Dynamic File Name")"
|
||||
Name="@Request.DirectDynamicFileName"
|
||||
DynamicNameSetting="Request.DirectDynamicFileSettings"
|
||||
NameChanged="UpdateDirectDynamicName"
|
||||
NameSettingChanged="UpdateDirectDynamicSettings">
|
||||
</DynamicName>
|
||||
<DynamicName InputLabel="@("Indirect Dynamic File Name")"
|
||||
Name="@Request.IndirectDynamicFileName"
|
||||
DynamicNameSetting="Request.IndirectDynamicFileSettings"
|
||||
NameChanged="UpdateIndirectDynamicName"
|
||||
NameSettingChanged="UpdateIndirectDynamicSettings">
|
||||
</DynamicName>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ImportIndirectVehicleSalesRequest Request { get; set; }
|
||||
private string Title = "Import Indirect Vehicle Sales";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ImportIndirectVehicleSalesRequest)WorkItemComponent.Item;
|
||||
Request.DirectDynamicFileSettings = Request.DirectDynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DirectDynamicFileSettings.DateFormatSettings = Request.DirectDynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DirectDynamicFileSettings.RegexSettings = Request.DirectDynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.IndirectDynamicFileSettings = Request.IndirectDynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.IndirectDynamicFileSettings.DateFormatSettings = Request.IndirectDynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.IndirectDynamicFileSettings.RegexSettings = Request.IndirectDynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateDirectDynamicName(string directFileName)
|
||||
{
|
||||
Request.DirectDynamicFileName = directFileName;
|
||||
}
|
||||
|
||||
private void UpdateDirectDynamicSettings(DynamicNameSetting directDynamicSetting)
|
||||
{
|
||||
Request.DirectDynamicFileSettings = directDynamicSetting;
|
||||
}
|
||||
|
||||
private void UpdateIndirectDynamicName(string indirectFileName)
|
||||
{
|
||||
Request.IndirectDynamicFileName = indirectFileName;
|
||||
}
|
||||
|
||||
private void UpdateIndirectDynamicSettings(DynamicNameSetting indirectDynamicSetting)
|
||||
{
|
||||
Request.IndirectDynamicFileSettings = indirectDynamicSetting;
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
@using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Incentive Process Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.IncentiveProcessType">
|
||||
@foreach (var processType in Enum.GetValues(typeof(IncentiveProcessType)))
|
||||
{
|
||||
<option value="@processType">@processType</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public IncentiveProcessRequest Request { get; set; }
|
||||
private string Title = "Incentive Process Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (IncentiveProcessRequest)WorkItemComponent.Item;
|
||||
}
|
||||
|
||||
private void UpdateIncentiveProcessRequestSettings(IncentiveProcessType processTypeSetting)
|
||||
{
|
||||
Request.IncentiveProcessType = processTypeSetting;
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<div class="col">
|
||||
<label for="IngestionEndedDate" class="col-form-label">Ingestion Ended Date</label>
|
||||
<InputDate
|
||||
class="form-control"
|
||||
id="IngestionEndedDate"
|
||||
placeholder="Enter Ingestion Ended Date"
|
||||
@bind-Value="Request.IngestionEndedDate"/>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="DaysFromIngestionEndedDate" class="col-form-label">Days From Date</label>
|
||||
<InputNumber
|
||||
class="form-control"
|
||||
id="DaysFromIngestionEndedDate"
|
||||
type="number"
|
||||
placeholder="Enter Days From Ingestion Ended Date"
|
||||
@bind-Value="Request.DaysFromIngestionEndedDate" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<div class="col">
|
||||
<label for="ArchiveDate" class="col-form-label">Archive Date</label>
|
||||
<InputDate
|
||||
class="form-control"
|
||||
id="ArchiveDate"
|
||||
placeholder="Enter Archive Date"
|
||||
@bind-Value="Request.ArchiveDate" />
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="DaysFromArchiveDate" class="col-form-label">Days From Date</label>
|
||||
<InputNumber
|
||||
class="form-control"
|
||||
id="DaysFromArchiveDate"
|
||||
type="number"
|
||||
placeholder="Enter Days from Archive Date"
|
||||
@bind-Value="Request.DaysFromArchiveDate" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="ArchiveRootPath" class="col-form-label">Archive Root Path</label>
|
||||
<InputText
|
||||
class="form-control"
|
||||
id="ArchiveRootPath"
|
||||
placeholder="Enter Archive Root Path"
|
||||
@bind-Value="Request.ArchiveRootPath" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public IngestionFolderCleanUpRequest Request { get; set; }
|
||||
private string Title = "Ingestion Folder Clean Up Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (IngestionFolderCleanUpRequest)WorkItemComponent.Item;
|
||||
Request.ArchiveRootPath ??= "";
|
||||
}
|
||||
}
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Ingestor Pdf Parser Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.PdfParserType">
|
||||
@foreach (var pdfParserType in Enum.GetValues(typeof(PdfParserTypes)))
|
||||
{
|
||||
<option value="@pdfParserType">@pdfParserType</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="RootBasePath" class="col-sm-6 col-form-label">Root Base Path</label>
|
||||
<InputText class="form-control" id="RootBasePath" placeholder="Root Base Path" @bind-Value="Request.RootBasePath" />
|
||||
</div>
|
||||
<CardDisplay CenterCard="true" ShowCardShadow="false">
|
||||
<div class="form-group form-row">
|
||||
<label class="col-8 col-form-label">Use Dynamic Ingestion Date?</label>
|
||||
<LCUToggle Toggle="@Request.UseDynamicIngestionDate"
|
||||
OnChange="UseDynamicIngestionDateChanged"/>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
@if (Request.UseDynamicIngestionDate)
|
||||
{
|
||||
<div class="col-12">
|
||||
<label for="DynamicIngestionDateMonth" class="col-form-label">Dynamic Ingestion Date</label>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateMonth" placeholder="Dynamic Ingestion Month" min="1" max="12" @bind-Value="Request.DynamicIngestionDate.Month" />
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateDay" placeholder="Dynamic Ingestion Day" min="1" max="31" @bind-Value="Request.DynamicIngestionDate.Day" />
|
||||
<InputNumber class="form-control my-2" id="DynamicIngestionDateYear" placeholder="Dynamic Ingestion Year" @bind-Value="Request.DynamicIngestionDate.Year" />
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-12">
|
||||
<label for="IngestionDate" class="col-form-label">Ingestion Date</label>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<InputDate class="form-control" id="IngestionDate" placeholder="Ingestor Date" @bind-Value="Request.IngestionDate" />
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@if (!Request.UseDynamicIngestionDate)
|
||||
{
|
||||
<div class="form-group form-row">
|
||||
<div class="col-12">
|
||||
<div class="col-form-label">Days From Date</div>
|
||||
<div>
|
||||
<InputNumber class="form-control" id="DaysIngestionDate" @bind-Value="Request.DaysIngestionDate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</CardDisplay>
|
||||
<DynamicName InputLabel="@("Parent Dynamic Directory")"
|
||||
Name="@Request.ParentDynamicDirectory"
|
||||
DynamicNameSetting="Request.ParentDynamicDirectorySettings"
|
||||
NameChanged="UpdateParentDynamicDirectory"
|
||||
NameSettingChanged="UpdateParentDynamicDirectorySettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="SubDirectoryPath" class="col-sm-6 col-form-label">Subdirectory Path</label>
|
||||
<InputText class="form-control" id="SubDirectoryPath" placeholder="Subdirectory Path" @bind-Value="Request.SubDirectoryPath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Dynamic Index Filename")"
|
||||
Name="@Request.DynamicIndexFileName"
|
||||
DynamicNameSetting="Request.DynamicFileSettings"
|
||||
NameChanged="UpdateDynamicIndexFileName"
|
||||
NameSettingChanged="UpdateDynamicFileSettings">
|
||||
</DynamicName>
|
||||
<DynamicName InputLabel="@("Dynamic Pdf Name")"
|
||||
Name="@Request.DynamicPdfName"
|
||||
DynamicNameSetting="Request.DynamicPdfSettings"
|
||||
NameChanged="UpdateDynamicPdfName"
|
||||
NameSettingChanged="UpdateDynamicPdfSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="SkipParseIfCountsMatch" class="col-sm-11 col-form-label">Skip Parse If Counts Match</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="SkipParseIfCountsMatch">
|
||||
<button type="button" class="btn @(Request.SkipParseIfCountsMatch ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSkipParseIfCountsMatch())">No</button>
|
||||
<button type="button" class="btn @(Request.SkipParseIfCountsMatch ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSkipParseIfCountsMatch())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
[Parameter]
|
||||
public string Title { get; set; }
|
||||
public PdfPartitionerRequest Request { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (PdfPartitionerRequest)WorkItemComponent.Item;
|
||||
Request.ParentDynamicDirectorySettings = Request.ParentDynamicDirectorySettings ?? new DynamicNameSetting();
|
||||
Request.ParentDynamicDirectorySettings.DateFormatSettings = Request.ParentDynamicDirectorySettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.ParentDynamicDirectorySettings.RegexSettings = Request.ParentDynamicDirectorySettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.DynamicFileSettings = Request.DynamicFileSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicFileSettings.DateFormatSettings = Request.DynamicFileSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicFileSettings.RegexSettings = Request.DynamicFileSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
|
||||
Request.DynamicPdfSettings = Request.DynamicPdfSettings ?? new DynamicNameSetting();
|
||||
Request.DynamicPdfSettings.DateFormatSettings = Request.DynamicPdfSettings.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.DynamicPdfSettings.RegexSettings = Request.DynamicPdfSettings.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void UpdateParentDynamicDirectory(string directoryName)
|
||||
{
|
||||
Request.ParentDynamicDirectory = directoryName;
|
||||
}
|
||||
|
||||
private void UpdateParentDynamicDirectorySettings(DynamicNameSetting dynamicNameSetting)
|
||||
{
|
||||
Request.ParentDynamicDirectorySettings = dynamicNameSetting;
|
||||
}
|
||||
|
||||
private void UpdateDynamicIndexFileName(string fileName)
|
||||
{
|
||||
Request.DynamicIndexFileName = fileName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicFileSettings(DynamicNameSetting dynamicNameSetting)
|
||||
{
|
||||
Request.DynamicFileSettings = dynamicNameSetting;
|
||||
}
|
||||
|
||||
private void UpdateDynamicPdfName(string pdfName)
|
||||
{
|
||||
Request.DynamicPdfName = pdfName;
|
||||
}
|
||||
|
||||
private void UpdateDynamicPdfSettings(DynamicNameSetting dynamicPdfSetting)
|
||||
{
|
||||
Request.DynamicPdfSettings = dynamicPdfSetting;
|
||||
}
|
||||
|
||||
private void ChangeSkipParseIfCountsMatch()
|
||||
{
|
||||
Request.SkipParseIfCountsMatch = !Request.SkipParseIfCountsMatch;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UseDynamicIngestionDateChanged(bool value)
|
||||
{
|
||||
Request.UseDynamicIngestionDate = value;
|
||||
|
||||
if (Request.UseDynamicIngestionDate)
|
||||
{
|
||||
Request.DaysIngestionDate = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="RunCriticalFailureNotifications" class="col-sm-11 col-form-label">Run Critical Failure Notifications</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="RunCriticalFailureNotifications">
|
||||
<button type="button" class="btn @(Request.RunCriticalFailureNotifications ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeRunCriticalFailureNotifications())">No</button>
|
||||
<button type="button" class="btn @(Request.RunCriticalFailureNotifications ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeRunCriticalFailureNotifications())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public MemberDocumentNotificationRequest Request { get; set; }
|
||||
private string Title = "Member Document Notification";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (MemberDocumentNotificationRequest)WorkItemComponent.Item;
|
||||
}
|
||||
|
||||
private void ChangeRunCriticalFailureNotifications()
|
||||
{
|
||||
Request.RunCriticalFailureNotifications = !Request.RunCriticalFailureNotifications;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
+120
@@ -0,0 +1,120 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
HintLabel=" (To include a file extension enter in Source Extension field)"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
|
||||
<div class="form-group form-row">
|
||||
<label for="SourceExtension" class="col-sm-6 col-form-label">Source Extension</label>
|
||||
<InputText class="form-control" id="SourceExtension" placeholder="Enter Source Extension" Value="@Request.SourceExtension" ValueExpression="() => Request.SourceExtension" ValueChanged="UpdateExtension" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="PrependText" class="col-sm-6 col-form-label">Prepend Text</label>
|
||||
<InputText class="form-control" id="PrependText" placeholder="Enter Prepend Text" Value="@Request.PrependText" ValueExpression="() => Request.PrependText" ValueChanged="UpdatePrependText" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="AppendText" class="col-sm-6 col-form-label">Append Text</label>
|
||||
<InputText class="form-control" id="AppendText" placeholder="Enter Append Text" Value="@Request.AppendText" ValueExpression="() => Request.AppendText" ValueChanged="UpdateAppendText" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="NewExtension" class="col-sm-6 col-form-label">New Extension</label>
|
||||
<InputText class="form-control" id="New Extension" placeholder="Enter New Extension" Value="@Request.NewExtension" ValueExpression="() => Request.NewExtension" ValueChanged="UpdateNewExtension" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="MaxAmountOfFiles" class="col-sm-6 col-form-label">Max Amount of Files</label>
|
||||
<InputNumber class="form-control" id="MaxAmountOfFiles" placeholder="Enter Max Amount of Files" @bind-Value="@Request.MaxAmountOfFiles" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePreview" class="col-sm-6 col-form-label">Source File Preview</label>
|
||||
<input type="text" disabled="disabled" class="form-control" id="SourcePreview" Value="@SourceFilePreview" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedOnError" class="col-sm-11 col-form-label">Succeed On Error</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSucceedOnError())">No</button>
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSucceedOnError())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ModifyFileRequest Request { get; set; }
|
||||
private string Title = "Modify File";
|
||||
public string SourceFilePreview { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ModifyFileRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdateSourceFile(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void ChangeSucceedOnError()
|
||||
{
|
||||
Request.SucceedOnError = !Request.SucceedOnError;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdateExtension(string extension)
|
||||
{
|
||||
Request.SourceExtension = extension;
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdateNewExtension(string extension)
|
||||
{
|
||||
Request.NewExtension = extension;
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdatePrependText(string prependText)
|
||||
{
|
||||
Request.PrependText = prependText;
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdateAppendText(string appendText)
|
||||
{
|
||||
Request.AppendText = appendText;
|
||||
BuildSourcePreview();
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
|
||||
public void BuildSourcePreview()
|
||||
{
|
||||
string stringPreview = string.Empty;
|
||||
var extensionIndicator = !string.IsNullOrEmpty(Request.SourceExtension) ? "." : null;
|
||||
var extension = string.IsNullOrWhiteSpace(Request.NewExtension) ? Request.SourceExtension : Request.NewExtension;
|
||||
SourceFilePreview = $"{Request.PrependText}{Request.SourceFile}{Request.AppendText}{extensionIndicator}{extension}";
|
||||
}
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="Application" class="col-sm-6 col-form-label">Application</label>
|
||||
<InputText class="form-control" id="Application" placeholder="Enter Application Name" @bind-Value="@Request.Application" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Description" class="col-sm-6 col-form-label">Description</label>
|
||||
<InputText class="form-control" id="Description" placeholder="Enter Description" @bind-Value="@Request.Description" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Resource" class="col-sm-6 col-form-label">Resource</label>
|
||||
<InputText class="form-control" id="Resource" placeholder="Enter Resource" @bind-Value="@Request.Resource" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Environment" class="col-sm-6 col-form-label">Environment</label>
|
||||
<InputText class="form-control" id="Environment" placeholder="Enter Environment" @bind-Value="@Request.ConnectionInfo.Environment" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="URL" class="col-sm-6 col-form-label">URL</label>
|
||||
<InputText class="form-control" id="URL" placeholder="Enter New Extension" @bind-Value="@Request.ConnectionInfo.Url" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="isExternalUrl" class="col-sm-11 col-form-label">Is It An External URL?</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.IsExternalUrl ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeisExternalUrl())">No</button>
|
||||
<button type="button" class="btn @(Request.IsExternalUrl ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeisExternalUrl())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public MomBotRequest Request { get; set; }
|
||||
private string Title = "MomBot Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (MomBotRequest)WorkItemComponent.Item;
|
||||
if(Request.ConnectionInfo == null)
|
||||
{
|
||||
Request.ConnectionInfo = new ConnectionInfo();
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeisExternalUrl()
|
||||
{
|
||||
Request.IsExternalUrl = !Request.IsExternalUrl;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="SourcePath" class="col-sm-6 col-form-label">Source Path</label>
|
||||
<InputText class="form-control" id="SourcePath" placeholder="Enter Source Path" @bind-Value="Request.SourcePath" />
|
||||
</div>
|
||||
<DynamicName InputLabel="@("Source File")"
|
||||
Name="@Request.SourceFile"
|
||||
DynamicNameSetting="Request.FileNameSetting"
|
||||
NameChanged="UpdateFileName"
|
||||
NameSettingChanged="UpdateFileNameSettings">
|
||||
</DynamicName>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationPath" class="col-sm-6 col-form-label">Destination Path</label>
|
||||
<InputText class="form-control" id="DestinationPath" placeholder="Enter Destination Path" @bind-Value="Request.DestinationPath" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="DestinationName" class="col-sm-6 col-form-label">Destination Name</label>
|
||||
<InputText class="form-control" id="DestinationName" placeholder="Enter Destination Name" @bind-Value="Request.DestinationName" />
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="Overwrite" class="col-sm-11 col-form-label">Overwrite</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeOverwrite())">No</button>
|
||||
<button type="button" class="btn @(Request.Overwrite ? "btn-dark" : "btn-secondary")" @onclick="(() => ChangeOverwrite())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-row">
|
||||
<label for="SucceedOnError" class="col-sm-11 col-form-label">Succeed On Error</label>
|
||||
<div class="col-md-2">
|
||||
<div class="btn-group" role="group" aria-label="Overwrite">
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-secondary" : "btn-dark")" @onclick="(() => ChangeSucceedOnError())">No</button>
|
||||
<button type="button" class="btn @(Request.SucceedOnError ? "btn-danger" : "btn-secondary")" @onclick="(() => ChangeSucceedOnError())">Yes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public MoveFileRequest Request { get; set; }
|
||||
private string Title = "Move File";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (MoveFileRequest)WorkItemComponent.Item;
|
||||
Request.FileNameSetting = Request.FileNameSetting ?? new DynamicNameSetting();
|
||||
Request.FileNameSetting.DateFormatSettings = Request.FileNameSetting.DateFormatSettings ?? new List<DateFormatSetting>();
|
||||
Request.FileNameSetting.RegexSettings = Request.FileNameSetting.RegexSettings ?? new List<RegexSetting>();
|
||||
}
|
||||
|
||||
private void ChangeOverwrite()
|
||||
{
|
||||
Request.Overwrite = !Request.Overwrite;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void ChangeSucceedOnError()
|
||||
{
|
||||
Request.SucceedOnError = !Request.SucceedOnError;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void UpdateFileName(string fileName)
|
||||
{
|
||||
Request.SourceFile = fileName;
|
||||
}
|
||||
|
||||
private void UpdateFileNameSettings(DynamicNameSetting fileNameSetting)
|
||||
{
|
||||
Request.FileNameSetting = fileNameSetting;
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
@using LCU.Library.Internal.IncentiveApiModels.Enums;
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="body">Select Nightly Incentive Process Type: </label>
|
||||
<InputSelect class="form-control" @bind-Value="@Request.NightlyIncentiveProcessType">
|
||||
@foreach (var processType in Enum.GetValues(typeof(NightlyIncentiveProcessType)))
|
||||
{
|
||||
<option value="@processType">@processType</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public NightlyIncentiveProcessRequest Request { get; set; }
|
||||
private string Title = "Incentive Process Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (NightlyIncentiveProcessRequest)WorkItemComponent.Item;
|
||||
}
|
||||
|
||||
private void UpdateNightlyIncentiveProcessRequestSettings(NightlyIncentiveProcessType processTypeSetting)
|
||||
{
|
||||
Request.NightlyIncentiveProcessType = processTypeSetting;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="ExtractId" class="col-sm-6 col-form-label">ExtractId</label>
|
||||
<InputNumber class="form-control" id="ExtractId" @bind-Value="Request.ExtractId" />
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ExtractRequest Request { get; set; }
|
||||
private string Title = "Notice Processor Extract";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ExtractRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<label for="EffectiveDate" class="col-sm-10 col-form-label">Effective Date</label>
|
||||
<label class="col-sm-10 col-form-label">(Leave Field at minimum for Todays processing unless specifying a date in the past)</label>
|
||||
<InputDate HintLabel=" (Leave Field at minimum for Todays processing unless specifying a date in the past)" class="form-control" id="EffectiveDate" placeholder="Effective Date" @bind-Value="Request.ProcessedDate" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<TextBoxListComponent Id="EmailRecipients"
|
||||
Label="Email Recipients"
|
||||
Placeholder="Recipient"
|
||||
TextBoxInputList="Request.EmailAddresses" />
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public ProcessingEmailRequest Request { get; set; }
|
||||
private string Title = "Notice Processor Summary Email";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (ProcessingEmailRequest)WorkItemComponent.Item;
|
||||
|
||||
if (Request.EmailAddresses == null)
|
||||
{
|
||||
Request.EmailAddresses = new List<string>();
|
||||
}
|
||||
|
||||
if (Request.ProcessedDate == null)
|
||||
{
|
||||
Request.ProcessedDate = DateTime.MinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title">
|
||||
<div class="form-group form-row">
|
||||
<label for="MonthsBack" class="col-sm-11 col-form-label">Months Back</label>
|
||||
<div class="col-md-6">
|
||||
<InputNumber class="form-control" id="MonthsBack" min="0" max="0" @bind-Value="Request.MonthsBack" />
|
||||
</div>
|
||||
</div>
|
||||
</ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public PayoutIncentiveRequest Request { get; set; }
|
||||
private string Title = "Payout Incentive Request:";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (PayoutIncentiveRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
@using LCU.Library.Internal.RealTimeAlertsModels.Models.Requests
|
||||
<ActionForm Request="Request" WorkItemComponent="WorkItemComponent" Title="@Title"></ActionForm>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public WorkItemComponent WorkItemComponent { get; set; }
|
||||
public InitiateErroredTransactionCleanUpRequest Request { get; set; }
|
||||
private string Title = "Real Time Alerts Errored Transaction Cleanup Request";
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Request = (InitiateErroredTransactionCleanUpRequest)WorkItemComponent.Item;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user