Update All In One bundle
This commit is contained in:
parent
272d6f03a7
commit
29a35e1cb1
|
|
@ -13,8 +13,11 @@
|
|||
<ProjectReference Include="..\..\modules\Elsa.ActivityDefinitions\Elsa.ActivityDefinitions.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Hangfire\Elsa.Hangfire.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Http\Elsa.Http.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Identity\Elsa.Identity.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Jobs\Elsa.Jobs.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Liquid\Elsa.Liquid.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Persistence.EntityFrameworkCore.Sqlite\Elsa.Persistence.EntityFrameworkCore.Sqlite.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Persistence.EntityFrameworkCore\Elsa.Persistence.EntityFrameworkCore.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Quartz\Elsa.Quartz.csproj" />
|
||||
<ProjectReference Include="..\..\modules\Elsa.Workflows.Api\Elsa.Workflows.Api.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@page
|
||||
<!--Use the studio shell component to handle automatic interaction with the Elsa Server API-->
|
||||
<elsa-studio server="/elsa/api" monaco-lib-path="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.31.1/min">
|
||||
<elsa-workflow-toolbar></elsa-workflow-toolbar>
|
||||
<div class="absolute inset-0" style="top: 64px;">
|
||||
<elsa-workflow-editor></elsa-workflow-editor>
|
||||
</div>
|
||||
</elsa-studio>
|
||||
<elsa-workflow-toolbar></elsa-workflow-toolbar>
|
||||
<div class="absolute inset-0" style="top: 64px;">
|
||||
<elsa-studio server="/elsa/api" monaco-lib-path="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.31.1/min"></elsa-studio>
|
||||
</div>
|
||||
<elsa-custom-activities-manager></elsa-custom-activities-manager>
|
||||
<elsa-notifications-manager></elsa-notifications-manager>
|
||||
|
|
@ -5,13 +5,13 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Elsa Workflows 3.0</title>
|
||||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@@elsa-workflows/elsa-workflows-designer@3.0.1/dist/elsa-workflows-designer/elsa-workflows-designer.css">
|
||||
<link rel="stylesheet" href="https://unpkg.com/@@elsa-workflows/elsa-workflows-designer@3.0.2-preview.2/dist/elsa-workflows-designer/elsa-workflows-designer.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.31.1/min/vs/loader.min.js"></script>
|
||||
<script type="module" src="https://unpkg.com/@@elsa-workflows/elsa-workflows-designer@3.0.1/dist/elsa-workflows-designer/elsa-workflows-designer.esm.js"></script>
|
||||
<script type="module" src="https://unpkg.com/@@elsa-workflows/elsa-workflows-designer@3.0.2-preview.2/dist/elsa-workflows-designer/elsa-workflows-designer.esm.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
for details on configuring this project to bundle and minify static web assets. */
|
||||
|
||||
a.navbar-brand {
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0077cc;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
|
||||
color: #fff;
|
||||
background-color: #1b6ec2;
|
||||
border-color: #1861ac;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.box-shadow {
|
||||
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
button.accept-policy {
|
||||
font-size: 1rem;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
|
@ -2,22 +2,40 @@ using Elsa.Extensions;
|
|||
using Elsa.Jobs.Extensions;
|
||||
using Elsa.Http;
|
||||
using Elsa.Http.Extensions;
|
||||
using Elsa.Identity;
|
||||
using Elsa.Identity.Extensions;
|
||||
using Elsa.Identity.Features;
|
||||
using Elsa.Identity.Options;
|
||||
using Elsa.JavaScript.Activities;
|
||||
using Elsa.JavaScript.Extensions;
|
||||
using Elsa.Labels.Extensions;
|
||||
using Elsa.Scheduling.Activities;
|
||||
using Elsa.Liquid.Extensions;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Modules.ActivityDefinitions;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Modules.Labels;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Modules.Runtime;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.ActivityDefinitions;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.Labels;
|
||||
using Elsa.Persistence.EntityFrameworkCore.Sqlite.Modules.Runtime;
|
||||
using Elsa.Requirements;
|
||||
using Elsa.Scheduling.Extensions;
|
||||
using Elsa.Workflows.Api.Endpoints.WorkflowDefinitions.Post;
|
||||
using Elsa.Workflows.Api.Features;
|
||||
using Elsa.Workflows.Core;
|
||||
using Elsa.Workflows.Core.Activities;
|
||||
using Elsa.Workflows.Core.Activities.Flowchart.Activities;
|
||||
using Elsa.Workflows.Core.Serialization;
|
||||
using Elsa.Workflows.Core.Services;
|
||||
using Elsa.Workflows.Management.Extensions;
|
||||
using Elsa.Workflows.Management.Serialization;
|
||||
using Elsa.Workflows.Runtime.Extensions;
|
||||
using FastEndpoints;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
var services = builder.Services;
|
||||
var configuration = builder.Configuration;
|
||||
var sqliteConnectionString = configuration.GetConnectionString("Sqlite");
|
||||
var identityOptions = new IdentityOptions();
|
||||
var identitySection = configuration.GetSection("Identity");
|
||||
identitySection.Bind(identityOptions);
|
||||
|
||||
// Add Elsa services.
|
||||
services
|
||||
|
|
@ -25,29 +43,40 @@ services
|
|||
.UseWorkflows()
|
||||
.UseWorkflowRuntime()
|
||||
.UseWorkflowManagement(management => management
|
||||
.AddActivity<Sequence>()
|
||||
.AddActivity<WriteLine>()
|
||||
.AddActivity<ReadLine>()
|
||||
.AddActivity<If>()
|
||||
.AddActivity<HttpEndpoint>()
|
||||
.AddActivity<Flowchart>()
|
||||
.AddActivity<Delay>()
|
||||
.AddActivity<Elsa.Scheduling.Activities.Timer>()
|
||||
.AddActivity<ForEach>()
|
||||
.AddActivity<Switch>()
|
||||
.AddActivity<RunJavaScript>()
|
||||
.AddActivitiesFrom<WriteLine>()
|
||||
.AddActivitiesFrom<HttpEndpoint>()
|
||||
.AddActivitiesFrom<Delay>()
|
||||
.AddActivitiesFrom<RunJavaScript>()
|
||||
)
|
||||
.UseWorkflowApiEndpoints()
|
||||
.UseIdentity(identity =>
|
||||
{
|
||||
identity.CreateDefaultUser = true;
|
||||
identity.IdentityOptions = options => identitySection.Bind(options);
|
||||
})
|
||||
.UseWorkflowRuntime(runtime => { runtime.UseEntityFrameworkCore(ef => ef.UseSqlite(sqliteConnectionString)); })
|
||||
.UseLabels(labels => labels.UseEntityFrameworkCore(ef => ef.UseSqlite(sqliteConnectionString)))
|
||||
.UseActivityDefinitions(feature => feature.UseEntityFrameworkCore(ef => ef.UseSqlite(sqliteConnectionString)))
|
||||
.UseJobs()
|
||||
.UseScheduling()
|
||||
.UseJavaScript()
|
||||
.UseLiquid()
|
||||
.UseHttp()
|
||||
.UseActivityDefinitions()
|
||||
);
|
||||
)
|
||||
// Register FastEndpoints using collected assemblies from features.
|
||||
.AddFastEndpointsFromModule();
|
||||
|
||||
// Register serialization configurator for configuring what types to allow to be serialized.
|
||||
services.AddSingleton<ISerializationOptionsConfigurator, CustomSerializationOptionConfigurator>();
|
||||
services.AddSingleton<ISerializationOptionsConfigurator, SerializationOptionsConfigurator>();
|
||||
services.AddHealthChecks();
|
||||
|
||||
// Authentication & Authorization.
|
||||
services
|
||||
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
.AddJwtBearer(JwtBearerDefaults.AuthenticationScheme, identityOptions.ConfigureJwtBearerOptions);
|
||||
|
||||
services.AddHttpContextAccessor();
|
||||
services.AddSingleton<IAuthorizationHandler, LocalHostRequirementHandler>();
|
||||
services.AddAuthorization(options => options.AddPolicy(IdentityPolicyNames.SecurityRoot, policy => policy.AddRequirements(new LocalHostRequirement())));
|
||||
|
||||
// Razor Pages.
|
||||
services.AddRazorPages();
|
||||
|
|
@ -66,6 +95,7 @@ if (!app.Environment.IsDevelopment())
|
|||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
app.UseRouting();
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
app.UseElsaFastEndpoints();
|
||||
app.UseHttpActivities();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
"Default": "Debug",
|
||||
"Microsoft.EntityFrameworkCore": "Warning",
|
||||
"Microsoft.AspNetCore": "Debug"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Sqlite": "Data Source=elsa.sqlite.db;Cache=Shared;"
|
||||
},
|
||||
"Identity": {
|
||||
"SigningKey": "secret-signing-key"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue