Browse Source
Merge pull request #1384 from colinin/fix-elsa
fix(elsa): Fix elsa module
pull/1387/head
yx lin
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with
17 additions and
19 deletions
-
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Designer/Bundling/AbpElsaScriptBundleContributor.cs
-
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Designer/Bundling/AbpElsaStyleBundleContributor.cs
-
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Designer/Pages/Elsa/Index.cshtml
-
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Server/LINGYUN/Abp/Elsa/AbpElsaServerModule.cs
-
aspnet-core/services/LY.MicroService.Applications.Single/Program.cs
-
aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/WorkflowManagementHttpApiHostModule.cs
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|
|
|
|
|
|
|
@ -9,9 +8,6 @@ public class AbpElsaScriptBundleContributor : BundleContributor |
|
|
|
{ |
|
|
|
public override void ConfigureBundle(BundleConfigurationContext context) |
|
|
|
{ |
|
|
|
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>(); |
|
|
|
var basePath = configuration["Hosting:BasePath"] ?? ""; |
|
|
|
|
|
|
|
context.Files.AddIfNotContains($"{basePath}/_content/Elsa.Designer.Components.Web/monaco-editor/min/vs/loader.js"); |
|
|
|
context.Files.AddIfNotContains("/_content/Elsa.Designer.Components.Web/monaco-editor/min/vs/loader.js"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System.Collections.Generic; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; |
|
|
|
|
|
|
|
@ -9,10 +8,7 @@ public class AbpElsaStyleBundleContributor : BundleContributor |
|
|
|
{ |
|
|
|
public override void ConfigureBundle(BundleConfigurationContext context) |
|
|
|
{ |
|
|
|
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>(); |
|
|
|
var basePath = configuration["Hosting:BasePath"] ?? ""; |
|
|
|
|
|
|
|
context.Files.AddIfNotContains($"{basePath}/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/assets/fonts/inter/inter.css"); |
|
|
|
context.Files.AddIfNotContains($"{basePath}/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/elsa-workflows-studio.css"); |
|
|
|
context.Files.AddIfNotContains("/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/assets/fonts/inter/inter.css"); |
|
|
|
context.Files.AddIfNotContains("/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/elsa-workflows-studio.css"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ |
|
|
|
@inject IHtmlLocalizer<ElsaResource> L |
|
|
|
@{ |
|
|
|
var serverUrl = Configuration["Elsa:Server:BaseUrl"]; |
|
|
|
var basePath = Configuration["Hosting:BasePath"] ?? ""; |
|
|
|
var basePath = Request.PathBase.Value; |
|
|
|
|
|
|
|
PageLayout.Content.Title = L["Elsa:Designer"].Value; |
|
|
|
PageLayout.Content.BreadCrumb.Add(L["Elsa:Designer"].Value); |
|
|
|
@ -25,9 +25,9 @@ |
|
|
|
<abp-script-bundle name="@AbpElsaBundles.Scripts.Global" /> |
|
|
|
} |
|
|
|
|
|
|
|
<script type="module" src="@basePath/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/elsa-workflows-studio.esm.js"></script> |
|
|
|
<script type="module" src="/_content/Elsa.Designer.Components.Web/elsa-workflows-studio/elsa-workflows-studio.esm.js"></script> |
|
|
|
|
|
|
|
<elsa-studio-root server-url="@serverUrl" base-path="@basePath" monaco-lib-path="@basePath.TrimStart('/')/_content/Elsa.Designer.Components.Web/monaco-editor/min"> |
|
|
|
<elsa-studio-root server-url="@serverUrl" monaco-lib-path="_content/Elsa.Designer.Components.Web/monaco-editor/min"> |
|
|
|
<elsa-studio-dashboard></elsa-studio-dashboard> |
|
|
|
</elsa-studio-root> |
|
|
|
|
|
|
|
@ -43,4 +43,9 @@ |
|
|
|
const elsa = e.detail; |
|
|
|
elsa.pluginManager.registerPlugin(WebhooksPlugin); |
|
|
|
}); |
|
|
|
|
|
|
|
// Some components publish DOM events that we can handle directly: |
|
|
|
elsaStudioRoot.addEventListener('workflow-changed', e => { |
|
|
|
console.log('Workflow model changed! New model: ${e.detail}'); |
|
|
|
}) |
|
|
|
</script> |
|
|
|
@ -21,6 +21,7 @@ public class AbpElsaServerModule : AbpModule |
|
|
|
.AddSingleton<ActivityBlueprintConverter>() |
|
|
|
.AddScoped<IWorkflowBlueprintMapper, WorkflowBlueprintMapper>() |
|
|
|
.AddSingleton<IEndpointContentSerializerSettingsProvider, EndpointContentSerializerSettingsProvider>() |
|
|
|
.AddElsaApiEndpoints() |
|
|
|
.AddSignalR(); |
|
|
|
|
|
|
|
PreConfigure<IMvcBuilder>(mvcBuilder => |
|
|
|
|
|
|
|
@ -72,5 +72,6 @@ app.UseAbpSwaggerUI(options => |
|
|
|
app.UseAuditing(); |
|
|
|
app.UseAbpSerilogEnrichers(); |
|
|
|
app.UseConfiguredEndpoints(); |
|
|
|
app.UseHttpActivities(); |
|
|
|
|
|
|
|
await app.RunAsync(); |
|
|
|
|
|
|
|
@ -1,5 +1,4 @@ |
|
|
|
using Elsa; |
|
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
|
using LINGYUN.Abp.AspNetCore.Mvc.Localization; |
|
|
|
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper; |
|
|
|
using LINGYUN.Abp.AuditLogging.Elasticsearch; |
|
|
|
@ -146,7 +145,6 @@ public partial class WorkflowManagementHttpApiHostModule : AbpModule |
|
|
|
app.MapAbpStaticAssets(); |
|
|
|
app.UseRouting(); |
|
|
|
app.UseCors(); |
|
|
|
app.UseElsaFeatures(); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseJwtTokenMiddleware(); |
|
|
|
app.UseMultiTenancy(); |
|
|
|
@ -165,5 +163,6 @@ public partial class WorkflowManagementHttpApiHostModule : AbpModule |
|
|
|
app.UseAuditing(); |
|
|
|
app.UseAbpSerilogEnrichers(); |
|
|
|
app.UseConfiguredEndpoints(); |
|
|
|
app.UseHttpActivities(); |
|
|
|
} |
|
|
|
} |
|
|
|
|