Browse Source

Fix Studio files in VirtualFileExplorer module.

pull/22393/head
maliming 2 years ago
parent
commit
2f6b8c9c30
  1. 11
      modules/virtual-file-explorer/.abpstudio/state.json
  2. 4
      modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl
  3. 3
      modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln
  4. 2
      modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln
  5. 44
      modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs
  6. 52
      modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs
  7. 3
      modules/virtual-file-explorer/app/DemoApp.abppkg
  8. 0
      modules/virtual-file-explorer/app/DemoApp.csproj
  9. 268
      modules/virtual-file-explorer/app/DemoAppModule.cs
  10. 6
      modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs
  11. 2
      modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs
  12. 8
      modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs
  13. 2
      modules/virtual-file-explorer/app/Pages/Index.cshtml
  14. 2
      modules/virtual-file-explorer/app/Pages/Index.cshtml.cs
  15. 8
      modules/virtual-file-explorer/app/Program.cs
  16. 52
      modules/virtual-file-explorer/app/Properties/launchSettings.json
  17. 2
      modules/virtual-file-explorer/app/appsettings.json

11
modules/virtual-file-explorer/.abpstudio/state.json

@ -0,0 +1,11 @@
{
"selectedKubernetesProfile": null,
"solutionRunner": {
"selectedProfile": null,
"targetFrameworks": [],
"applicationsStartingWithoutBuild": [],
"applicationsWithoutAutoRefreshBrowserOnRestart": [],
"applicationBatchStartStates": [],
"folderBatchStartStates": []
}
}

4
modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpmdl

@ -7,10 +7,10 @@
}, },
"packages": { "packages": {
"Volo.Abp.VirtualFileExplorer.DemoApp": { "Volo.Abp.VirtualFileExplorer.DemoApp": {
"path": "app/DempApp.abppkg", "path": "app/DemoApp.abppkg",
"folder": "app" "folder": "app"
}, },
"Volo.Abp.VirtualFileExplorer.Web": { "Volo.Abp.VirtualFileExplorer.Contracts": {
"path": "src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg", "path": "src/Volo.Abp.VirtualFileExplorer.Contracts/Volo.Abp.VirtualFileExplorer.Contracts.abppkg",
"folder": "src" "folder": "src"
}, },

3
modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.abpsln

@ -3,5 +3,6 @@
"Volo.Abp.VirtualFileExplorer": { "Volo.Abp.VirtualFileExplorer": {
"path": "Volo.Abp.VirtualFileExplorer.abpmdl" "path": "Volo.Abp.VirtualFileExplorer.abpmdl"
} }
} },
"id": "d900c5b2-d907-4abb-bc38-b72f80006fe0"
} }

2
modules/virtual-file-explorer/Volo.Abp.VirtualFileExplorer.sln

@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplore
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.Contracts", "src\Volo.Abp.VirtualFileExplorer.Contracts\Volo.Abp.VirtualFileExplorer.Contracts.csproj", "{21FC5247-29FF-4D02-BB6A-8A739AC5640D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.VirtualFileExplorer.Contracts", "src\Volo.Abp.VirtualFileExplorer.Contracts\Volo.Abp.VirtualFileExplorer.Contracts.csproj", "{21FC5247-29FF-4D02-BB6A-8A739AC5640D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DempApp", "app\DempApp.csproj", "{C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DemoApp", "app\DemoApp.csproj", "{C447E4F2-7FCA-49B6-8249-7E04C9E26BAD}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

44
modules/virtual-file-explorer/app/Data/DempAppDbContext.cs → modules/virtual-file-explorer/app/Data/DemoAppDbContext.cs

@ -1,22 +1,22 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
namespace DempApp.Data; namespace DemoApp.Data;
public class DempAppDbContext : AbpDbContext<DempAppDbContext> public class DemoAppDbContext : AbpDbContext<DemoAppDbContext>
{ {
public DempAppDbContext(DbContextOptions<DempAppDbContext> options) public DemoAppDbContext(DbContextOptions<DemoAppDbContext> options)
: base(options) : base(options)
{ {
} }
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)
{ {
base.OnModelCreating(builder); base.OnModelCreating(builder);
builder.ConfigurePermissionManagement(); builder.ConfigurePermissionManagement();
builder.ConfigureIdentity(); builder.ConfigureIdentity();
} }
} }

52
modules/virtual-file-explorer/app/Data/DempAppDbContextFactory.cs → modules/virtual-file-explorer/app/Data/DemoAppDbContextFactory.cs

@ -1,26 +1,26 @@
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Design;
namespace DempApp.Data; namespace DemoApp.Data;
public class DempAppDbContextFactory : IDesignTimeDbContextFactory<DempAppDbContext> public class DemoAppDbContextFactory : IDesignTimeDbContextFactory<DemoAppDbContext>
{ {
public DempAppDbContext CreateDbContext(string[] args) public DemoAppDbContext CreateDbContext(string[] args)
{ {
var configuration = BuildConfiguration(); var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<DempAppDbContext>() var builder = new DbContextOptionsBuilder<DemoAppDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default")); .UseSqlServer(configuration.GetConnectionString("Default"));
return new DempAppDbContext(builder.Options); return new DemoAppDbContext(builder.Options);
} }
private static IConfigurationRoot BuildConfiguration() private static IConfigurationRoot BuildConfiguration()
{ {
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory()) .SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: false); .AddJsonFile("appsettings.json", optional: false);
return builder.Build(); return builder.Build();
} }
} }

3
modules/virtual-file-explorer/app/DemoApp.abppkg

@ -0,0 +1,3 @@
{
"role": "host.mvc"
}

0
modules/virtual-file-explorer/app/DempApp.csproj → modules/virtual-file-explorer/app/DemoApp.csproj

268
modules/virtual-file-explorer/app/DempAppModule.cs → modules/virtual-file-explorer/app/DemoAppModule.cs

@ -1,134 +1,134 @@
using DempApp.Data; using DemoApp.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Volo.Abp; using Volo.Abp;
using Volo.Abp.Account; using Volo.Abp.Account;
using Volo.Abp.Account.Web; using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared; using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog; using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac; using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper; using Volo.Abp.AutoMapper;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer; using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore; using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Identity.Web; using Volo.Abp.Identity.Web;
using Volo.Abp.Localization; using Volo.Abp.Localization;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement; using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.EntityFrameworkCore; using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.HttpApi; using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.PermissionManagement.Identity; using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.PermissionManagement.Web; using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.Swashbuckle; using Volo.Abp.Swashbuckle;
using Volo.Abp.VirtualFileExplorer.Web; using Volo.Abp.VirtualFileExplorer.Web;
namespace DempApp; namespace DemoApp;
[DependsOn( [DependsOn(
// ABP Framework packages // ABP Framework packages
typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMvcModule),
typeof(AbpAutofacModule), typeof(AbpAutofacModule),
typeof(AbpAutoMapperModule), typeof(AbpAutoMapperModule),
typeof(AbpSwashbuckleModule), typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreSerilogModule), typeof(AbpAspNetCoreSerilogModule),
// basic-theme // basic-theme
typeof(AbpAspNetCoreMvcUiBasicThemeModule), typeof(AbpAspNetCoreMvcUiBasicThemeModule),
// VirtualFileExplorer module packages // VirtualFileExplorer module packages
typeof(AbpVirtualFileExplorerWebModule), typeof(AbpVirtualFileExplorerWebModule),
// Account module packages // Account module packages
typeof(AbpAccountWebModule), typeof(AbpAccountWebModule),
typeof(AbpAccountHttpApiModule), typeof(AbpAccountHttpApiModule),
typeof(AbpAccountApplicationModule), typeof(AbpAccountApplicationModule),
// Identity module packages // Identity module packages
typeof(AbpPermissionManagementDomainIdentityModule), typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpIdentityWebModule), typeof(AbpIdentityWebModule),
typeof(AbpIdentityHttpApiModule), typeof(AbpIdentityHttpApiModule),
typeof(AbpIdentityApplicationModule), typeof(AbpIdentityApplicationModule),
typeof(AbpIdentityEntityFrameworkCoreModule), typeof(AbpIdentityEntityFrameworkCoreModule),
// Permission Management module packages // Permission Management module packages
typeof(AbpPermissionManagementWebModule), typeof(AbpPermissionManagementWebModule),
typeof(AbpPermissionManagementApplicationModule), typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule), typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule), typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule) typeof(AbpEntityFrameworkCoreSqlServerModule)
)] )]
public class DempAppModule : AbpModule public class DemoAppModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
Configure<PermissionManagementOptions>(options => Configure<PermissionManagementOptions>(options =>
{ {
options.SaveStaticPermissionsToDatabase = false; options.SaveStaticPermissionsToDatabase = false;
}); });
Configure<AbpMultiTenancyOptions>(options => Configure<AbpMultiTenancyOptions>(options =>
{ {
options.IsEnabled = true; options.IsEnabled = true;
}); });
Configure<AbpLocalizationOptions>(options => Configure<AbpLocalizationOptions>(options =>
{ {
options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
}); });
context.Services.AddAbpDbContext<DempAppDbContext>(options => context.Services.AddAbpDbContext<DemoAppDbContext>(options =>
{ {
options.AddDefaultRepositories(includeAllEntities: true); options.AddDefaultRepositories(includeAllEntities: true);
}); });
Configure<AbpDbContextOptions>(options => Configure<AbpDbContextOptions>(options =>
{ {
options.Configure(configurationContext => options.Configure(configurationContext =>
{ {
configurationContext.UseSqlServer(); configurationContext.UseSqlServer();
}); });
}); });
} }
public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
{ {
await context.ServiceProvider await context.ServiceProvider
.GetRequiredService<DempAppDbContext>() .GetRequiredService<DemoAppDbContext>()
.Database .Database
.MigrateAsync(); .MigrateAsync();
await context.ServiceProvider await context.ServiceProvider
.GetRequiredService<IDataSeeder>() .GetRequiredService<IDataSeeder>()
.SeedAsync(); .SeedAsync();
var app = context.GetApplicationBuilder(); var app = context.GetApplicationBuilder();
var env = context.GetEnvironment(); var env = context.GetEnvironment();
if (env.IsDevelopment()) if (env.IsDevelopment())
{ {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
} }
app.UseAbpRequestLocalization(); app.UseAbpRequestLocalization();
if (!env.IsDevelopment()) if (!env.IsDevelopment())
{ {
app.UseErrorPage(); app.UseErrorPage();
} }
app.MapAbpStaticAssets(); app.MapAbpStaticAssets();
app.UseRouting(); app.UseRouting();
app.UseUnitOfWork(); app.UseUnitOfWork();
app.UseAuthentication(); app.UseAuthentication();
app.UseMultiTenancy(); app.UseMultiTenancy();
app.UseAuthorization(); app.UseAuthorization();
app.UseConfiguredEndpoints(); app.UseConfiguredEndpoints();
} }
} }

6
modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.Designer.cs

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using DempApp.Data; using DemoApp.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@ -10,9 +10,9 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable #nullable disable
namespace DempApp.Migrations namespace DemoApp.Migrations
{ {
[DbContext(typeof(DempAppDbContext))] [DbContext(typeof(DemoAppDbContext))]
[Migration("20250315060727_Initial")] [Migration("20250315060727_Initial")]
partial class Initial partial class Initial
{ {

2
modules/virtual-file-explorer/app/Migrations/20250315060727_Initial.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable #nullable disable
namespace DempApp.Migrations namespace DemoApp.Migrations
{ {
/// <inheritdoc /> /// <inheritdoc />
public partial class Initial : Migration public partial class Initial : Migration

8
modules/virtual-file-explorer/app/Migrations/DempAppDbContextModelSnapshot.cs → modules/virtual-file-explorer/app/Migrations/DemoAppDbContextModelSnapshot.cs

@ -1,6 +1,6 @@
// <auto-generated /> // <auto-generated />
using System; using System;
using DempApp.Data; using DemoApp.Data;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
@ -9,10 +9,10 @@ using Volo.Abp.EntityFrameworkCore;
#nullable disable #nullable disable
namespace DempApp.Migrations namespace DemoApp.Migrations
{ {
[DbContext(typeof(DempAppDbContext))] [DbContext(typeof(DemoAppDbContext))]
partial class DempAppDbContextModelSnapshot : ModelSnapshot partial class DemoAppDbContextModelSnapshot : ModelSnapshot
{ {
protected override void BuildModel(ModelBuilder modelBuilder) protected override void BuildModel(ModelBuilder modelBuilder)
{ {

2
modules/virtual-file-explorer/app/Pages/Index.cshtml

@ -1,4 +1,4 @@
@page @page
@using Volo.Abp.Users @using Volo.Abp.Users
@model DempApp.Pages.IndexModel @model DemoApp.Pages.IndexModel
@inject ICurrentUser CurrentUser @inject ICurrentUser CurrentUser

2
modules/virtual-file-explorer/app/Pages/Index.cshtml.cs

@ -1,6 +1,6 @@
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace DempApp.Pages; namespace DemoApp.Pages;
public class IndexModel : AbpPageModel public class IndexModel : AbpPageModel
{ {

8
modules/virtual-file-explorer/app/Program.cs

@ -1,7 +1,7 @@
using Serilog; using Serilog;
using Serilog.Events; using Serilog.Events;
namespace DempApp; namespace DemoApp;
public class Program public class Program
{ {
@ -21,10 +21,10 @@ public class Program
.UseAutofac() .UseAutofac()
.UseSerilog(); .UseSerilog();
await builder.AddApplicationAsync<DempAppModule>(); await builder.AddApplicationAsync<DemoAppModule>();
var app = builder.Build(); var app = builder.Build();
await app.InitializeApplicationAsync(); await app.InitializeApplicationAsync();
Log.Information("Starting DempApp."); Log.Information("Starting DemoApp.");
await app.RunAsync(); await app.RunAsync();
return 0; return 0;
} }
@ -35,7 +35,7 @@ public class Program
throw; throw;
} }
Log.Fatal(ex, "DempApp terminated unexpectedly!"); Log.Fatal(ex, "DemoApp terminated unexpectedly!");
return 1; return 1;
} }
finally finally

52
modules/virtual-file-explorer/app/Properties/launchSettings.json

@ -1,27 +1,27 @@
{ {
"iisSettings": { "iisSettings": {
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "https://localhost:44391/", "applicationUrl": "https://localhost:44391/",
"sslPort": 44391 "sslPort": 44391
} }
}, },
"profiles": { "profiles": {
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"DempApp": { "DemoApp": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "https://localhost:44391/" "applicationUrl": "https://localhost:44391/"
} }
} }
} }

2
modules/virtual-file-explorer/app/appsettings.json

@ -1,6 +1,6 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=localhost;Database=VirtualFileExplorerDempApp;Trusted_Connection=True;TrustServerCertificate=True" "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=VirtualFileExplorerDemoApp;Trusted_Connection=True;TrustServerCertificate=True"
}, },
"Settings": { "Settings": {
"Abp.Identity.Password.RequireNonAlphanumeric": "false", "Abp.Identity.Password.RequireNonAlphanumeric": "false",

Loading…
Cancel
Save