Developer Kits Dynamic Services düzeltildi
This commit is contained in:
parent
7c4bfd4b41
commit
ce84b3baac
9 changed files with 392 additions and 395 deletions
|
|
@ -685,6 +685,18 @@
|
|||
"en": "Custom Components",
|
||||
"tr": "Özel Bileşenler"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.DeveloperKit.DynamicServices",
|
||||
"en": "Dynamic Services",
|
||||
"tr": "Dinamik Servisler"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.DeveloperKit.DynamicServices.Description",
|
||||
"en": "Create and publish dynamic AppServices by writing C# code",
|
||||
"tr": "C# kod yazarak dinamik AppService'ler oluşturun ve yayınlayın"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Forum",
|
||||
|
|
@ -9913,12 +9925,6 @@
|
|||
"en": "fields",
|
||||
"tr": "alan"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.DeveloperKit.DynamicServices",
|
||||
"en": "Dynamic Services",
|
||||
"tr": "Dinamik Hizmetler"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.DeveloperKit.Migration.Generating",
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ public static class TableNameResolver
|
|||
_map = new(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
// 🔹 MODULE TABLOLARI
|
||||
{ nameof(TableNameEnum.DynamicService), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.LogEntry), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.Language), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
{ nameof(TableNameEnum.LanguageKey), (TablePrefix.PlatformByName, MenuPrefix.Platform) },
|
||||
|
|
@ -57,6 +56,7 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.CrudEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomEndpoint), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.CustomComponent), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.DynamicService), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ReportCategory), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ReportTemplate), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
{ nameof(TableNameEnum.ReportParameter), (TablePrefix.TenantByName, MenuPrefix.Saas) },
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251105082644_Initial")]
|
||||
[Migration("20251105111749_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -3648,7 +3648,7 @@ namespace Kurs.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Plat_H_DynamicService", (string)null);
|
||||
b.ToTable("Sas_T_DynamicService", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b =>
|
||||
|
|
@ -1477,37 +1477,6 @@ namespace Kurs.Platform.Migrations
|
|||
table.UniqueConstraint("AK_Plat_H_BackgroundWorker_MailQueueTableFormat_TableName", x => x.TableName);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Plat_H_DynamicService",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
DisplayName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
|
||||
Code = table.Column<string>(type: "text", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CompilationStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
LastCompilationError = table.Column<string>(type: "text", nullable: true),
|
||||
LastSuccessfulCompilation = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Version = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
||||
CodeHash = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
PrimaryEntityType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
ControllerName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Plat_H_DynamicService", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Plat_H_Language",
|
||||
columns: table => new
|
||||
|
|
@ -2186,6 +2155,37 @@ namespace Kurs.Platform.Migrations
|
|||
table.PrimaryKey("PK_Sas_T_CustomEntity", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_DynamicService",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
DisplayName = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
|
||||
Code = table.Column<string>(type: "text", nullable: false),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CompilationStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
LastCompilationError = table.Column<string>(type: "text", nullable: true),
|
||||
LastSuccessfulCompilation = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Version = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
||||
CodeHash = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
PrimaryEntityType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
ControllerName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Sas_T_DynamicService", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Sas_T_GlobalSearch",
|
||||
columns: table => new
|
||||
|
|
@ -6370,9 +6370,6 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_BackgroundWorker_MailQueueEvents");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_DynamicService");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Plat_H_LanguageText");
|
||||
|
||||
|
|
@ -6454,6 +6451,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_CustomEntityField");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_DynamicService");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Sas_T_GlobalSearch");
|
||||
|
||||
|
|
@ -3645,7 +3645,7 @@ namespace Kurs.Platform.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Plat_H_DynamicService", (string)null);
|
||||
b.ToTable("Sas_T_DynamicService", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EducationStatus", b =>
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ const ComponentManager: React.FC = () => {
|
|||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-slate-900">
|
||||
{translate('::App.DeveloperKit.Component')}
|
||||
{translate('::App.DeveloperKit.Components')}
|
||||
</h1>
|
||||
<p className="text-slate-600">{translate('::App.DeveloperKit.Component.Description')}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import {
|
|||
type PublishResult,
|
||||
type DynamicServiceDto,
|
||||
postTestCompile,
|
||||
TestCompileRequestDto,
|
||||
TestCompileDto,
|
||||
} from '@/services/dynamicService.service'
|
||||
|
||||
const DynamicAppServiceEditor: React.FC = () => {
|
||||
|
|
@ -131,10 +131,9 @@ namespace DynamicServices
|
|||
setIsCompiling(true)
|
||||
setCompileResult(null)
|
||||
console.log('Test compile code:', code)
|
||||
const input = { code: code } as TestCompileRequestDto
|
||||
const input = { code: code } as TestCompileDto
|
||||
const result = await postTestCompile(input)
|
||||
setCompileResult(result.data)
|
||||
|
||||
} catch (error: any) {
|
||||
console.error('Test compile error:', error)
|
||||
console.error('Error response:', error.response?.data)
|
||||
|
|
@ -256,15 +255,15 @@ namespace DynamicServices
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 p-4">
|
||||
<div className="mx-auto">
|
||||
<div className="space-y-4">
|
||||
{/* Header */}
|
||||
<div className="bg-white rounded-lg shadow-sm border p-6 mb-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold text-gray-900 mb-2">Dynamic AppService Editor</h1>
|
||||
<p className="text-gray-600">
|
||||
C# kod yazarak dinamik AppService'ler oluşturun ve yayınlayın
|
||||
<h1 className="text-2xl font-bold text-slate-900">
|
||||
{translate('::App.DeveloperKit.DynamicServices')}
|
||||
</h1>
|
||||
<p className="text-slate-600">
|
||||
{translate('::App.DeveloperKit.DynamicServices.Description')}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-3">
|
||||
|
|
@ -284,7 +283,6 @@ namespace DynamicServices
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-6">
|
||||
{/* Service List */}
|
||||
|
|
@ -376,9 +374,7 @@ namespace DynamicServices
|
|||
<div className="bg-white rounded-lg shadow-sm border p-4 mb-4">
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">
|
||||
Servis Adı *
|
||||
</label>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-1">Servis Adı *</label>
|
||||
<input
|
||||
type="text"
|
||||
value={serviceName}
|
||||
|
|
@ -621,7 +617,6 @@ namespace DynamicServices
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ const MigrationManager: React.FC = () => {
|
|||
|
||||
<div className="flex items-center justify-between mb-4">
|
||||
<div>
|
||||
<h1 className="text-xl font-bold text-slate-900 mb-2">
|
||||
{translate('::App.DeveloperKit.Migration')}
|
||||
<h1 className="text-2xl font-bold text-slate-900">
|
||||
{translate('::App.DeveloperKit.Migrations')}
|
||||
</h1>
|
||||
<p className="text-slate-600">{translate('::App.DeveloperKit.Migration.Description')}</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@ export interface TestCompileDto {
|
|||
code: string
|
||||
}
|
||||
|
||||
export interface TestCompileRequestDto {
|
||||
Code: string
|
||||
}
|
||||
|
||||
export interface PublishDto {
|
||||
name: string
|
||||
code: string
|
||||
|
|
@ -65,7 +61,7 @@ export interface DynamicAppServiceListResult {
|
|||
totalCount: number
|
||||
}
|
||||
|
||||
export const postTestCompile = (input: TestCompileRequestDto) =>
|
||||
export const postTestCompile = (input: TestCompileDto) =>
|
||||
apiService.fetchData<CompileResult>({
|
||||
method: 'POST',
|
||||
url: `/api/app/dynamic-app-service/test-compile`,
|
||||
|
|
|
|||
Loading…
Reference in a new issue