diff --git a/Directory.Packages.props b/Directory.Packages.props index b4ab773d7..1c5331171 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,6 @@ false - 3.6.0-preview.1237 9.0.10 9.10.0 diff --git a/Elsa.sln b/Elsa.sln index 4af134dae..0b50488db 100644 --- a/Elsa.sln +++ b/Elsa.sln @@ -149,12 +149,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa", "src\modules\Elsa\El EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Server.LoadBalancer", "src\apps\Elsa.Server.LoadBalancer\Elsa.Server.LoadBalancer.csproj", "{65F2AD97-3ECF-4BA6-8AAA-1E5882FDCE68}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElsaStudioWebAssembly", "src\apps\ElsaStudioWebAssembly\ElsaStudioWebAssembly.csproj", "{690B0274-291F-4D9E-BA76-54EFF7D3E4BC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.ServerAndStudio.Web", "src\apps\Elsa.ServerAndStudio.Web\Elsa.ServerAndStudio.Web.csproj", "{060FD0BA-BD78-48E1-A8A7-4906A5AD5E39}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Studio.Web", "src\apps\Elsa.Studio.Web\Elsa.Studio.Web.csproj", "{169A82A5-2DB3-40EA-801E-14C08D743DF7}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k8s", "k8s", "{B32DB9B2-AD6C-48A5-8682-4373CB045185}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "elsa-server", "elsa-server", "{454652D5-E1BB-4D4B-9B21-9CEFC900C4FB}" @@ -437,18 +431,6 @@ Global {65F2AD97-3ECF-4BA6-8AAA-1E5882FDCE68}.Debug|Any CPU.Build.0 = Debug|Any CPU {65F2AD97-3ECF-4BA6-8AAA-1E5882FDCE68}.Release|Any CPU.ActiveCfg = Release|Any CPU {65F2AD97-3ECF-4BA6-8AAA-1E5882FDCE68}.Release|Any CPU.Build.0 = Release|Any CPU - {690B0274-291F-4D9E-BA76-54EFF7D3E4BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {690B0274-291F-4D9E-BA76-54EFF7D3E4BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {690B0274-291F-4D9E-BA76-54EFF7D3E4BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {690B0274-291F-4D9E-BA76-54EFF7D3E4BC}.Release|Any CPU.Build.0 = Release|Any CPU - {060FD0BA-BD78-48E1-A8A7-4906A5AD5E39}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {060FD0BA-BD78-48E1-A8A7-4906A5AD5E39}.Debug|Any CPU.Build.0 = Debug|Any CPU - {060FD0BA-BD78-48E1-A8A7-4906A5AD5E39}.Release|Any CPU.ActiveCfg = Release|Any CPU - {060FD0BA-BD78-48E1-A8A7-4906A5AD5E39}.Release|Any CPU.Build.0 = Release|Any CPU - {169A82A5-2DB3-40EA-801E-14C08D743DF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {169A82A5-2DB3-40EA-801E-14C08D743DF7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {169A82A5-2DB3-40EA-801E-14C08D743DF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {169A82A5-2DB3-40EA-801E-14C08D743DF7}.Release|Any CPU.Build.0 = Release|Any CPU {D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5720DBC-8C2B-42D5-9D9F-2FF6EAD4001C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -681,9 +663,6 @@ Global {5ADDDFB1-E59B-4097-97B7-8C24E2D60463} = {D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1} {97C7E531-9D5F-43FD-AA19-BF24DA13B612} = {5BA4A8FA-F7F4-45B3-AEC8-8886D35AAC79} {65F2AD97-3ECF-4BA6-8AAA-1E5882FDCE68} = {D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1} - {690B0274-291F-4D9E-BA76-54EFF7D3E4BC} = {D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1} - {060FD0BA-BD78-48E1-A8A7-4906A5AD5E39} = {D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1} - {169A82A5-2DB3-40EA-801E-14C08D743DF7} = {D92BEAB2-60D6-4BB4-885A-6BA681C6CCF1} {B32DB9B2-AD6C-48A5-8682-4373CB045185} = {C80C8231-D35C-4ACC-9ED6-9F3DB221535E} {454652D5-E1BB-4D4B-9B21-9CEFC900C4FB} = {B32DB9B2-AD6C-48A5-8682-4373CB045185} {31089E79-694B-4F45-97AF-86D34A7B231E} = {B32DB9B2-AD6C-48A5-8682-4373CB045185} diff --git a/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomEvent.cs b/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomEvent.cs deleted file mode 100644 index e8fe63899..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Elsa.Expressions.Models; -using Elsa.Workflows; -using Elsa.Workflows.Runtime.Activities; - -namespace Elsa.ServerAndStudio.Web.Activities; - -public class CustomEvent : EventBase -{ - protected override string GetEventName(ExpressionExecutionContext context) - { - return "MyEvent"; - } - - protected override void OnEventReceived(ActivityExecutionContext context, object? eventData) - { - Console.WriteLine("Event received with data: " + eventData); - } -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomHttpEndpoint.cs b/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomHttpEndpoint.cs deleted file mode 100644 index 5bf5d6433..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Activities/CustomHttpEndpoint.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Elsa.Http; -using Elsa.Workflows; - -namespace Elsa.ServerAndStudio.Web.Activities; - -public class CustomHttpEndpoint : HttpEndpointBase -{ - protected override HttpEndpointOptions GetOptions() - { - return new() - { - Path = "my-path", - Methods = [HttpMethods.Get], - }; - } - - protected override async ValueTask OnHttpRequestReceivedAsync(ActivityExecutionContext context, HttpContext httpContext) - { - httpContext.Response.StatusCode = 200; - await httpContext.Response.WriteAsync("Hello World", context.CancellationToken); - } -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj b/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj deleted file mode 100644 index ef462fe2c..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Enums/DistributedCachingTransport.cs b/src/apps/Elsa.ServerAndStudio.Web/Enums/DistributedCachingTransport.cs deleted file mode 100644 index fc8e2f381..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Enums/DistributedCachingTransport.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Elsa.ServerAndStudio.Web.Enums; - -/// -/// Represents the transport options for distributed caching. -/// -public enum DistributedCachingTransport -{ - None, - Memory, - MassTransit -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Enums/MassTransitBroker.cs b/src/apps/Elsa.ServerAndStudio.Web/Enums/MassTransitBroker.cs deleted file mode 100644 index 2ab461e3a..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Enums/MassTransitBroker.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Elsa.ServerAndStudio.Web.Enums; - -/// -/// Represents the type of messaging broker used in MassTransit. -/// -public enum MassTransitBroker -{ - Memory, - AzureServiceBus, - RabbitMq -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Enums/SqlDatabaseProvider.cs b/src/apps/Elsa.ServerAndStudio.Web/Enums/SqlDatabaseProvider.cs deleted file mode 100644 index ee524806a..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Enums/SqlDatabaseProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Elsa.ServerAndStudio.Web.Enums; - -public enum SqlDatabaseProvider -{ - SqlServer, - Sqlite, - MySql, - PostgreSql, - CockroachDb -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Extensions/CorsOptionsExtensions.cs b/src/apps/Elsa.ServerAndStudio.Web/Extensions/CorsOptionsExtensions.cs deleted file mode 100644 index d7ab5e203..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Extensions/CorsOptionsExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.AspNetCore.Cors.Infrastructure; - -namespace Elsa.ServerAndStudio.Web.Extensions; - -public static class CorsOptionsExtensions -{ - private static bool AllowAny(IList values) => values.Count == 0 || values[0] == "*"; - - public static void Configure(this CorsOptions options, IConfigurationSection section) - { - var corsPolicy = section.Get() ?? new CorsPolicy(); - options.AddDefaultPolicy(policy => { - var headers = corsPolicy.Headers; - var origins = corsPolicy.Origins; - var methods = corsPolicy.Methods; - - if (AllowAny(headers)) - policy.AllowAnyHeader(); - else - policy.WithHeaders(headers.ToArray()); - - if (AllowAny(origins)) - policy.AllowAnyOrigin(); - else - policy.WithOrigins(origins.ToArray()); - - if (AllowAny(methods)) - policy.AllowAnyMethod(); - else - policy.WithMethods(methods.ToArray()); - }); - } -} \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/FodyWeavers.xml b/src/apps/Elsa.ServerAndStudio.Web/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1c..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml b/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml deleted file mode 100644 index d1fbc2a92..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Pages/_Host.cshtml +++ /dev/null @@ -1,61 +0,0 @@ -@page "/" -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@inject IConfiguration Configuration; -@{ - var baseUrl = Configuration["Hosting:BaseUrl"] ?? Configuration["Http:BaseUrl"]!; // HttpBaseUrl is for backward compatibility. - var apiUrl = $"{baseUrl.TrimEnd('/')}/{(Configuration["Hosting:ApiPrefix"] ?? "elsa/api").TrimStart('/')}"; -} - - - - - - - - Elsa Studio 3.5 - - - - - - - - - - - - - - - - - - - - -
-
-
Loading...
-
-
- -
- An unhandled error has occurred. - Reload - 🗙 -
- - - - - - - - - - - \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Program.cs b/src/apps/Elsa.ServerAndStudio.Web/Program.cs deleted file mode 100644 index 9fc5e8ae3..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Program.cs +++ /dev/null @@ -1,97 +0,0 @@ -using Elsa.Extensions; -using Elsa.Persistence.EFCore.Extensions; -using Elsa.Persistence.EFCore.Modules.Management; -using Elsa.Persistence.EFCore.Modules.Runtime; -using Elsa.ServerAndStudio.Web.Enums; -using Elsa.ServerAndStudio.Web.Extensions; -using Medallion.Threading.FileSystem; -using Microsoft.AspNetCore.Mvc; - -var builder = WebApplication.CreateBuilder(args); -builder.WebHost.UseStaticWebAssets(); -var services = builder.Services; -var configuration = builder.Configuration; -var identitySection = configuration.GetSection("Identity"); -var identityTokenSection = identitySection.GetSection("Tokens"); - -// Add Elsa services. -services - .AddElsa(elsa => - { - elsa - .UseSasTokens() - .UseIdentity(identity => - { - identity.TokenOptions = options => identityTokenSection.Bind(options); - identity.UseConfigurationBasedUserProvider(options => identitySection.Bind(options)); - identity.UseConfigurationBasedApplicationProvider(options => identitySection.Bind(options)); - identity.UseConfigurationBasedRoleProvider(options => identitySection.Bind(options)); - }) - .UseDefaultAuthentication() - .UseWorkflowManagement(management => - { - management.UseEntityFrameworkCore(ef => ef.UseSqlite()); - management.UseCache(); - }) - .UseWorkflowRuntime(runtime => - { - runtime.UseEntityFrameworkCore(ef => ef.UseSqlite()); - runtime.UseCache(); - runtime.DistributedLockProvider = _ => new FileDistributedSynchronizationProvider(new(Path.Combine(Directory.GetCurrentDirectory(), "App_Data", "locks"))); - runtime.WorkflowDispatcherOptions = options => configuration.GetSection("Runtime:WorkflowDispatcher").Bind(options); - }) - .UseJavaScript(javaScriptFeature => javaScriptFeature.ConfigureJintOptions(jintOptions => jintOptions.AllowClrAccess = true)) - .UseLiquid() - .UseCSharp() - .UsePython(python => - { - python.PythonOptions += options => - { - // Make sure to configure the path to the python DLL. E.g. /opt/homebrew/Cellar/python@3.11/3.11.6_1/Frameworks/Python.framework/Versions/3.11/bin/python3.11 - // alternatively, you can set the PYTHONNET_PYDLL environment variable. - configuration.GetSection("Scripting:Python").Bind(options); - }; - }) - .UseHttp(http => - { - http.UseCache(); - http.ConfigureHttpOptions = options => - { - options.BaseUrl = new(configuration["Hosting:BaseUrl"] ?? configuration["Http:BaseUrl"]!); // HttpBaseUrl is for backward compatibility. - options.BasePath = configuration["Http:BasePath"]; - }; - }) - .UseWorkflowsApi() - .AddActivitiesFrom() - .AddWorkflowsFrom(); - }); - -services.AddHealthChecks(); -services.AddCors(cors => cors.Configure(configuration.GetSection("CorsPolicy"))); - -// Razor Pages. -services.AddRazorPages(options => options.Conventions.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute())); - -// Configure middleware pipeline. -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.UseBlazorFrameworkFiles(); -app.MapHealthChecks("/health"); -app.UseRouting(); -app.UseCors(); -app.UseStaticFiles(); -app.UseAuthentication(); -app.UseAuthorization(); -app.UseWorkflowsApi(); -app.UseWorkflows(); -app.MapFallbackToPage("/_Host"); -await app.RunAsync(); \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/Properties/launchSettings.json b/src/apps/Elsa.ServerAndStudio.Web/Properties/launchSettings.json deleted file mode 100644 index 633f4e6be..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/Properties/launchSettings.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:8080", - "sslPort": 44363 - } - }, - "profiles": { - "Elsa.AllInOne.Web": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "https://localhost:8080", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/src/apps/Elsa.ServerAndStudio.Web/README.md b/src/apps/Elsa.ServerAndStudio.Web/README.md deleted file mode 100644 index 4f753d91f..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Server - -This project represents an Elsa application that hosts workflows and exposes API endpoints to manage & execute workflows. -It also hosts the Elsa Studio Web Assembly project, which replaces the Stencil implementation. - -## Secrets -The following are the secrets stored in hashed form in appsettings.json: - -**API key**: `48587230567A646D394B435A6277734A-4802fa49-e91e-45e8-b00f-b5492377e20b` -**Admin user**: `admin` -**Admin password**: `password` \ No newline at end of file diff --git a/src/apps/Elsa.ServerAndStudio.Web/appsettings.json b/src/apps/Elsa.ServerAndStudio.Web/appsettings.json deleted file mode 100644 index 4a3ccd5db..000000000 --- a/src/apps/Elsa.ServerAndStudio.Web/appsettings.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Warning", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information", - "OpenTelemetry": "Debug" - } - }, - "AllowedHosts": "*", - "ConnectionStrings": { - "Sqlite": "Data Source=elsa.sqlite.db;Cache=Shared;", - "RabbitMq": "rabbitmq://guest:guest@localhost:5672", - "MySql": "Server=localhost;Database=elsa;Uid=user;Pwd=password;", - "SqlServer": "Server=localhost;Database=elsa;User Id=sa;Password=Password12!", - "PostgreSql": "Server=localhost;Username=elsa;Database=elsa;Port=5432;Password=elsa;SSLMode=Prefer;MaxPoolSize=2000;Timeout=60" - }, - "DatabaseProvider": "Sqlite", - "Hosting": { - "BaseUrl": "https://localhost:8080", - "ApiPrefix": "/elsa/api" - }, - "Identity": { - "Tokens": { - "SigningKey": "c7dc81876a782d502084763fa322429fca015941eac90ce8ca7ad95fc8752035", - "AccessTokenLifetime": "1:00:00:00", - "RefreshTokenLifetime": "1:00:10:00" - }, - "Roles": [ - { - "Id": "admin", - "Name": "Administrator", - "Permissions": [ - "*" - ] - } - ], - "Users": [ - { - "Id": "a2323f46-42db-4e15-af8b-94238717d817", - "Name": "admin", - "HashedPassword": "TfKzh9RLix6FPcCNeHLkGrysFu3bYxqzGqduNdi8v1U=", - "HashedPasswordSalt": "JEy9kBlhHCNsencitRHlGxmErmSgY+FVyMJulCH27Ds=", - "Roles": [ - "admin" - ] - } - ], - "Applications": [ - { - "id": "d57030226341448daff5a2935aba2d3f", - "name": "Postman", - "roles": [ - "admin" - ], - "clientId": "HXr0Vzdm9KCZbwsJ", - "clientSecret": "a<~QGGHTEA%u4;CU&'Wga5ED:_&Gd1C)", - "hashedApiKey": "Z5ClHs3mbzx8Pnw3+PxbMq8A/Y+VKMCCDTGYtax8JFM=", - "hashedApiKeySalt": "kBisa1X8FwBfN2zmyGMFRgIVVBleghhQAJ4WGyTkaD0=", - "hashedClientSecret": "jEv58d0SVbGQ3nBZM0lkzHghG4Y+lMKW80wipz+9vHk=", - "hashedClientSecretSalt": "xRKy14Ok1/tU3kLf/8V1fcbLIegy9vcM90Peu2tzohU=" - } - ] - }, - "Heartbeat": { - "Interval": "00:00:01:00", - "Timeout": "00:00:05:00" - }, - "MassTransit": { - "TemporaryQueueTtl": "00:00:05:00", - "ConcurrentMessageLimit": 4, - "PrefetchCount": 4, - "MaxAutoRenewDuration": "00:00:00:30", - "Dispatcher": { - "ConcurrentMessageLimit": 4 - } - }, - "Smtp": { - "Host": "localhost", - "Port": 2525, - "DefaultSender": "noreply@crmservices.com" - }, - "Http": { - "BasePath": "/api/workflows" - }, - "Webhooks": { - "Sinks": [] - }, - "CorsPolicy": { - "Origins": ["*"], - "Methods": ["*"], - "Headers": ["*"] - }, - "Runtime": { - "WorkflowInboxCleanup": { - "SweepInterval": "00:00:10:00", - "BatchSize": 1000 - }, - "WorkflowDispatcher": { - "Channels": [ - { - "Name": "Low" - }, - { - "Name": "Medium" - }, - { - "Name": "High" - } - ] - } - }, - "Scripting": { - "Python": { - "PythonDllPath": "", - "Scripts": [ - "def greet(name): return f'Hello {name}!'", - "def say_hello_world(): return greet('World')" - ] - } - }, - "AzureServiceBus": { - "ConnectionStringOrName": "AzureServiceBus", - "Queues": [ - { - "name": "order-created" - }, - { - "name": "order-completed" - } - ], - "Topics": [], - "Subscriptions": [] - } -} diff --git a/src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj b/src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj deleted file mode 100644 index 444499089..000000000 --- a/src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/apps/Elsa.Studio.Web/FodyWeavers.xml b/src/apps/Elsa.Studio.Web/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1c..000000000 --- a/src/apps/Elsa.Studio.Web/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/apps/Elsa.Studio.Web/Pages/_Host.cshtml b/src/apps/Elsa.Studio.Web/Pages/_Host.cshtml deleted file mode 100644 index 5a4f2d2c8..000000000 --- a/src/apps/Elsa.Studio.Web/Pages/_Host.cshtml +++ /dev/null @@ -1,67 +0,0 @@ -@page "/" -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers -@inject IConfiguration Configuration; -@{ - var baseUrl = Configuration["ElsaServer:Url"]!; - var basePath = Configuration["Hosting:BasePath"]!; - - if (string.IsNullOrWhiteSpace(baseUrl)) - { - baseUrl = "https://localhost:5001/elsa/api"; - } -} - - - - - - - - Elsa Studio 3.5 - - - - - - - - - - - - - - - - - - - - -
-
-
Loading...
-
-
- -
- An unhandled error has occurred. - Reload - 🗙 -
- - - - - - - - - - - \ No newline at end of file diff --git a/src/apps/Elsa.Studio.Web/Program.cs b/src/apps/Elsa.Studio.Web/Program.cs deleted file mode 100644 index 9b0045c20..000000000 --- a/src/apps/Elsa.Studio.Web/Program.cs +++ /dev/null @@ -1,26 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -var builder = WebApplication.CreateBuilder(args); -builder.WebHost.UseStaticWebAssets(); -var services = builder.Services; - -// Razor Pages. -services.AddRazorPages(options => options.Conventions.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute())); - -// Configure middleware pipeline. -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.UseBlazorFrameworkFiles(); -app.UseRouting(); -app.UseStaticFiles(); -app.MapFallbackToPage("/_Host"); -await app.RunAsync(); \ No newline at end of file diff --git a/src/apps/Elsa.Studio.Web/Properties/launchSettings.json b/src/apps/Elsa.Studio.Web/Properties/launchSettings.json deleted file mode 100644 index f2a3449d6..000000000 --- a/src/apps/Elsa.Studio.Web/Properties/launchSettings.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:64391", - "sslPort": 44336 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5161", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:7030;http://localhost:5161", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/src/apps/Elsa.Studio.Web/appsettings.json b/src/apps/Elsa.Studio.Web/appsettings.json deleted file mode 100644 index 7e26f0ec0..000000000 --- a/src/apps/Elsa.Studio.Web/appsettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - }, - "ElsaServer": { - "Url": "https://localhost:5001/elsa/api" - }, - "Hosting": { - "BasePath": "" - } -} \ No newline at end of file diff --git a/src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj b/src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj deleted file mode 100644 index f22d195d5..000000000 --- a/src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/apps/ElsaStudioWebAssembly/FodyWeavers.xml b/src/apps/ElsaStudioWebAssembly/FodyWeavers.xml deleted file mode 100644 index 00e1d9a1c..000000000 --- a/src/apps/ElsaStudioWebAssembly/FodyWeavers.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/apps/ElsaStudioWebAssembly/MainLayout.razor b/src/apps/ElsaStudioWebAssembly/MainLayout.razor deleted file mode 100644 index f5ddb2195..000000000 --- a/src/apps/ElsaStudioWebAssembly/MainLayout.razor +++ /dev/null @@ -1,5 +0,0 @@ -@inherits LayoutComponentBase - -
- @Body -
\ No newline at end of file diff --git a/src/apps/ElsaStudioWebAssembly/Program.cs b/src/apps/ElsaStudioWebAssembly/Program.cs deleted file mode 100644 index 1524e1cea..000000000 --- a/src/apps/ElsaStudioWebAssembly/Program.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Text.Json; -using Elsa.Studio.Dashboard.Extensions; -using Elsa.Studio.Shell; -using Elsa.Studio.Shell.Extensions; -using Elsa.Studio.Workflows.Extensions; -using Elsa.Studio.Contracts; -using Elsa.Studio.Core.BlazorWasm.Extensions; -using Elsa.Studio.Extensions; -using Elsa.Studio.Login.BlazorWasm.Extensions; -using Elsa.Studio.Login.Extensions; -using Elsa.Studio.Login.HttpMessageHandlers; -using Elsa.Studio.Models; -using Elsa.Studio.Options; -using Elsa.Studio.Workflows.Designer.Extensions; -using Microsoft.AspNetCore.Components.Web; -using Microsoft.AspNetCore.Components.WebAssembly.Hosting; -using Microsoft.Extensions.Options; -using Microsoft.JSInterop; - -// Build the host. -var builder = WebAssemblyHostBuilder.CreateDefault(args); - -// Register root components. -builder.RootComponents.Add("#app"); -builder.RootComponents.Add("head::after"); -builder.RootComponents.RegisterCustomElsaStudioElements(); - -// Register shell services and modules. -var backendApiConfig = new BackendApiConfig -{ - ConfigureBackendOptions = options => builder.Configuration.GetSection("Backend").Bind(options), - ConfigureHttpClientBuilder = options => options.AuthenticationHandler = typeof(AuthenticatingApiHttpMessageHandler) -}; - -builder.Services.AddCore(); -builder.Services.AddShell(); -builder.Services.AddRemoteBackend(backendApiConfig); -builder.Services.AddLoginModule(); -builder.Services.UseElsaIdentity(); -builder.Services.AddDashboardModule(); -builder.Services.AddWorkflowsModule(); - -// Build the application. -var app = builder.Build(); - -// Apply client config. -var js = app.Services.GetRequiredService(); -var clientConfig = await js.InvokeAsync("getClientConfig"); -var apiUrl = clientConfig.GetProperty("apiUrl").GetString()!; -app.Services.GetRequiredService>().Value.Url = new Uri(apiUrl); - -// Run each startup task. -var startupTaskRunner = app.Services.GetRequiredService(); -await startupTaskRunner.RunStartupTasksAsync(); - -// Run the application. -await app.RunAsync(); \ No newline at end of file diff --git a/src/apps/ElsaStudioWebAssembly/Properties/launchSettings.json b/src/apps/ElsaStudioWebAssembly/Properties/launchSettings.json deleted file mode 100644 index bd2e9a7ce..000000000 --- a/src/apps/ElsaStudioWebAssembly/Properties/launchSettings.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "iisSettings": { - "iisExpress": { - "applicationUrl": "http://localhost:18109", - "sslPort": 44371 - } - }, - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "http://localhost:5059", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "applicationUrl": "https://localhost:7020;http://localhost:5059", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/src/apps/ElsaStudioWebAssembly/README.md b/src/apps/ElsaStudioWebAssembly/README.md deleted file mode 100644 index 38c759367..000000000 --- a/src/apps/ElsaStudioWebAssembly/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Server - -This project represents the Elsa Studio Blazor web assembly application and is hosted by Elsa.AllInOne.Web. \ No newline at end of file diff --git a/src/apps/ElsaStudioWebAssembly/_Imports.razor b/src/apps/ElsaStudioWebAssembly/_Imports.razor deleted file mode 100644 index a2fe699b5..000000000 --- a/src/apps/ElsaStudioWebAssembly/_Imports.razor +++ /dev/null @@ -1,6 +0,0 @@ -@using System.Net.Http -@using System.Net.Http.Json -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Web -@using Microsoft.AspNetCore.Components.WebAssembly.Http -@using Microsoft.JSInterop \ No newline at end of file