diff --git a/.gitignore b/.gitignore index 407241c7fc..3c5c4f89da 100644 --- a/.gitignore +++ b/.gitignore @@ -269,6 +269,7 @@ modules/blog/app/Volo.BlogTestApp/Logs/*.* modules/blogging/app/Volo.BloggingTestApp/Logs/*.* modules/blogging/app/Volo.BloggingTestApp/wwwroot/files/*.* modules/docs/app/VoloDocs.Web/Logs/*.* +modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/Logs/*.* templates/module/app/MyCompanyName.MyProjectName.DemoApp/Logs/*.* templates/mvc/src/MyCompanyName.MyProjectName.Web/Logs/*.* diff --git a/README.md b/README.md index a73e9ef3ed..a56f0c98b8 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,7 @@ ABP is a community-driven open source project. See [the contribution guide](http ## Support the ABP Framework Love ABP Framework? **Please give a star** to this repository :star: + +## ABP Commercial + +See also [ABP Commercial](https://commercial.abp.io/) if you are looking for pre-built application modules, professional themes, code generation tooling and premium support for the ABP Framework. diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index a292da5f9b..39589e06ca 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -35,6 +35,7 @@ "NameFilter": "Name", "CreationTime": "Creation time", "IsPro": "Is pro", + "IsFreeToActiveLicenseOwners": "Free to license owners", "ShowOnModuleList": "Show on module list", "EfCoreConfigureMethodName": "Configure method name", "IsProFilter": "Is pro", @@ -90,6 +91,7 @@ "UserNotFound": "User not found", "{0}WillBeRemovedFromDevelopers": "{0} Will be removed from developers, do you confirm?", "{0}WillBeRemovedFromOwners": "{0} Will be removed from owners, do you confirm?", + "{0}WillBeRemovedFromMembers": "{0} Will be removed from members, do you confirm?", "Computers": "Computers", "UniqueComputerId": "Unique computer id", "LastSeenDate": "Last seen date", @@ -212,7 +214,10 @@ "Currency": "Currency", "Gateway": "Gateway", "State": "State", - "FailReason": "Fail reason" - + "FailReason": "Fail reason", + "ReIndexAllPosts": "Reindex All Posts", + "ReIndexAllPostsConfirmationMessage": "Are you sure you want to reindex all posts?", + "SuccessfullyReIndexAllPosts": "All posts have been successfully reindexed.", + "Permission:FullSearch": "Full text search" } } diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json index 1884b0025f..34ee392140 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json @@ -163,6 +163,9 @@ "Enum:ContentSource:2": "Video İçerik", "DeleteCoverImage": "Kapak Fotoğrafını Sil", "DeleteCoverImageConfirmationMessage": "Kapak fotoğrafını \"{0}\" isimli makale için silmek istediğinize emin misiniz?", - "DeleteCoverImageSuccessMessage": "Kapak fotoğrafı başarılı bir şekilde silinmiştir" + "DeleteCoverImageSuccessMessage": "Kapak fotoğrafı başarılı bir şekilde silinmiştir", + "ReIndexAllPosts": "Yeniden indeksle", + "ReIndexAllPostsConfirmationMessage": "Tüm gönderileri yeniden indeksleyeceğinizden emin misiniz?", + "SuccessfullyReIndexAllPosts": "Tüm gönderiler başarıyla yeniden indekslendi" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json index f5cbeb0213..7351fde5cb 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json @@ -35,6 +35,7 @@ "NameFilter": "名称", "CreationTime": "创建时间", "IsPro": "是否为专业版", + "IsFreeToActiveLicenseOwners": "许可证所有者免费", "ShowOnModuleList": "展示模块列表", "EfCoreConfigureMethodName": "配置方法法", "IsProFilter": "是否为专业版", @@ -90,6 +91,7 @@ "UserNotFound": "用户不存在", "{0}WillBeRemovedFromDevelopers": "{0} 将从开发者中移除, 你确定吗?", "{0}WillBeRemovedFromOwners": "{0} 将从所有者中移除, 你确定吗?", + "{0}WillBeRemovedFromMembers": "{0} 将从成员中删除, 你确定吗?", "Computers": "计算机", "UniqueComputerId": "计算机唯一ID", "LastSeenDate": "上次查看日期", @@ -194,6 +196,27 @@ "CoverImage": "封面图片", "RemoveCacheConfirmationMessage": "你确定要删除\"{0}\" 文章缓存?", "SuccessfullyRemoved": "清除成功", - "RemoveCache": "删除缓存" + "RemoveCache": "删除缓存", + "Language": "语言", + "Optional": "可选的", + "CreateArticleLanguageInfo": "发帖所用的语言", + "Enum:ContentSource:2": "视频发布", + "VideoPreview": "视频预览", + "VideoPreviewErrorMessage": "无法从YouTube获取给定的视频网址. 可能是由于视频是私有视频,或者给定的URL不可用.", + "DeleteCoverImage": "删除封面图片", + "DeleteCoverImageConfirmationMessage": "你确定要删除封面图片吗", + "DeleteCoverImageSuccessMessage": "成功删除封面图片", + "PaymentsOf": "付款的", + "ShowPaymentsOfOrganization": "显示付款", + "Date": "日期", + "Products": "商品", + "TotalAmount": "总金额", + "Currency": "货币", + "Gateway": "网关", + "State": "状态", + "FailReason": "失败原因", + "ReIndexAllPosts": "重新索引所有帖子", + "ReIndexAllPostsConfirmationMessage": "你确定要重新索引所有的帖子吗", + "SuccessfullyReIndexAllPosts": "成功索引所有的帖子" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json index 71dc425dc6..eedfd4bccd 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json @@ -30,6 +30,8 @@ "Permission:License": "License", "Permission:UserInfo": "Usere info", "SeeDocuments": "See Documents", - "Samples": "Samples" + "Samples": "Samples", + "Framework": "Framework", + "Support": "Support" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json index f061408c98..01550612d4 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json @@ -30,6 +30,8 @@ "Permission:License": "许可", "Permission:UserInfo": "用户信息", "SeeDocuments": "查看文档", - "Samples": "示例" + "Samples": "示例", + "Framework": "框架", + "Support": "支持" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index 4de287778f..b03d57cee0 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -41,6 +41,250 @@ "Unsubscribe": "Unsubscribe", "NotOrganizationMember": "You are not member of any organization.", "UnsubscribeLicenseExpirationEmailSuccessTitle": "Successfully unsubscribed", - "UnsubscribeLicenseExpirationEmailSuccessMessage": "You will not receive license expiration date reminder emails anymore." - } + "UnsubscribeLicenseExpirationEmailSuccessMessage": "You will not receive license expiration date reminder emails anymore.", + "IndexPageHeroSection": "A complete web development platformbuilt-on framework", + "AbpCommercialShortDescription": "ABP Commercial provides pre-built application modules, rapid application development tooling, professional UI themes, premium support and more.", + "LiveDemo": "Live Demo", + "GetLicence" :"Get a Licence", + "Application": "Application", + "StartupTemplates": "Startup Templates", + "Startup": "Startup", + "Templates": "Templates", + "Developer": "Developer", + "Tools": "Tools", + "Premium": "Premium", + "PremiumSupport": "Premium Support", + "PremiumForumSupport": "Premium Forum Support", + "UI": "UI", + "Themes": "Themes", + "JoinOurNewsletter": "Join Our Newsletter", + "Send": "Send", + "Learn": "Learn", + "AdditionalServices": "Additional Services", + "WhatIsABPFramework": "WHAT IS THE ABP FRAMEWORK?", + "OpenSourceBaseFramework": "Open Source Base Framework", + "ABPFrameworkExplanation": "

ABP Commercial is based on the ABP Framework, an open source and community driven web application framework for ASP.NET Core.

ABP Framework provides an excellent infrastructure to write maintainable, extensible and testable code with best practices.

Built on and integrated to popular tools you already know. Low learning curve, easy adaptation, comfortable development.

", + "Modular": "Modular", + "MicroserviceCompatible": "Microservice compatible", + "DomainDrivenDesignInfrastructure": "Domain Driven Design Infrastructure", + "MultiTenancy": "Multi-Tenancy", + "DistributedMessaging": "Distributed Messaging", + "DynamicProxying": "Dynamic Proxying", + "BackgroundJobs": "Background Jobs", + "AuditLogging": "Audit Logging", + "BLOBStoring": "BLOB Storing", + "BundlingMinification": "Bundling & Minification", + "AdvancedLocalization": "Advanced Localization", + "ManyMore": "Many more", + "ExploreTheABPFramework": "Explore the ABP Framework", + "WhyUseTheABPCommercial": "Why Use The ABP Commercial?", + "WhyUseTheABPCommercialExplanation": "

Building enterprise-grade web applications can be complex and time-consuming.

ABP Commercial offers the perfect base infrastructure necessary for all modern enterprise-grade ASP.NET Core based solutions. Right from the design to deployment, the entire development cycle is empowered by ABP's built-in features & modules.

", + "StartupTemplatesShortDescription": "Startup templates make you jump-start to your project in a few seconds.", + "UIFrameworksOptions": "UI frameworks options;", + "DatabaseProviderOptions": "Database provider options;", + "PreBuiltApplicationModules": "Pre-Built Application Modules", + "PreBuiltApplicationModulesShortDescription": "Most common application requirements are already developed for you as reusable modules.", + "Account": "Account", + "Blogging": "Blogging", + "Identity": "Identity", + "IdentityServer": "Identity Server", + "Saas": "Saas", + "LanguageManagement": "Language Management", + "TextTemplateManagement": "Text Template Management", + "See All Modules": "SeeAllModules", + "ABPSuite": "ABP Suite", + "AbpSuiteShortDescription": "ABP Suite is a complementary tool to the ABP Commercial.", + "AbpSuiteExplanation": "It allows you to build web pages in a matter of minutes. It's a .NET Core Global tool which can be installed from the command line. It can create a new ABP solution, generate CRUD pages from the database to the front-end.", + "Details": "Details", + "LeptonTheme": "Lepton Theme", + "ProfessionalModernUIThemes": "Professional, modern UI themes", + "LeptonThemeExplanation": "Lepton provides a gamut of Bootstrap admin themes that serve as a solid foundation for any project requiring admin dashboard.", + "DefaultTheme": "Default Theme", + "MaterialTheme": "Material Theme", + "Default2Theme": "Default 2 Theme", + "DarkTheme": "Dark Theme", + "DarkBlueTheme": "Dark Blue Theme", + "LightTheme": "Light Theme", + "ProudToWorkWith": "Proud to Work With", + "OurConsumers": "Hundreds of enterprises and developers over 50 countries worldwide rely on ABP Commercial.", + "JoinOurConsumers": "Join them and build amazing products fast.", + "AdditionalServicesExplanation": "Do you need additional or custom services? We and our partners can provide;", + "CustomProjectDevelopment": "Custom Project Development", + "CustomProjectDevelopmentExplanation": "Dedicated developers for your custom projects.", + "PortingExistingProjects": "Porting Existing Projects", + "PortingExistingProjectsExplanation": "Migrating your legacy projects to the ABP platform.", + "LiveSupport": "Live Support", + "LiveSupportExplanation": "Live remote support option when you need it.", + "Training": "Training", + "TrainingExplanation": "Dedicated training for your developers.", + "OnBoarding": "Onboarding", + "OnBoardingExplanation": "Help to setup your development, CI & CD environments.", + "PrioritizedTechnicalSupport": "Prioritized Technical Support", + "PremiumSupportExplanation": "Beside the great community support of the ABP framework, our support team answers technical questions and problems of the commercial users with high priority.", + "SeeTheSupportOptions": "See the Support Options", + "Contact": "Contact", + "TellUsWhatYouNeed": "Tell us what you need.", + "YourMessage": "Your Message", + "YourFullName": "Your full name", + "EmailField": "E-mail Address", + "YourEmailAddress": "Your e-mail address", + "HowMayWeHelpYou": "How may we help you", + "SendMessage": "Send Message", + "Success": "Success", + "WeWillReplyYou.": "Your message is sent! We will reply you in a short time.", + "GoHome": "Go Home", + "CreateLiveDemo": "Create Live Demo", + "RegisterToTheNewsletter": "Register to the newsletter to get information on happenings about ABP.IO, like new releases.", + "EnterYourEmailOrLogin": "Enter your e-mail address to create your demo or Login using your existing account.", + "ApplicationTemplate": "Application Template", + "ApplicationTemplateExplanation": "Application startup template is used to create a new web application.", + "EfCoreProvider": "Entity Framework (Supports SQL Server, MySQL, PostgreSQL, Oracle and others)", + "AlreadyIncludedInTemplateModules": "Following modules are already included and configured in this template:", + "ApplicationTemplateArchitecture": "This application template also supports tiered architecture where UI layer, API layer and the authentication service are physically separated.", + "SeeTheGuideOrGoToTheLiveDemo": "See the developer guide for technical information about this template or go to the live demo.", + "DeveloperGuide": "Developer Guide", + "ModuleTemplate": "Module Template", + "ModuleTemplateExplanation1": "You want to create a module and reuse across different applications? This startup template prepares everything to start to create a reusable application module or a microservice.", + "ModuleTemplateExplanation2": "

You can support single or multiple UI frameworks, single or multiple database providers for a single module. The startup template is configured to run and test your module in a minimal application in addition to the unit and integration test infrastructure.

See the developer guide for technical information about this template.

", + "WithAllStyleOptions": "with all style options", + "Demo": "Demo", + "SeeAllModules": "See All Modules", + "ABPCLIExplanation": "ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions.", + "ABPSuiteEasilyCURD": "ABP Suite is a tool which allows you to easily create CRUD pages", + "WeAreHereToHelp": "We are Here to Help", + "BrowseOrAskQuestion": "You can browse our help topics or search in frequently asked questions, or you can ask us a question by using the contact form.", + "SearchQuestionPlaceholder": "Search in frequently asked questions", + "WhatIsTheABPCommercial": "What is the ABP Commercial?", + "WhatAreDifferencesThanAbpFramework": "What are the differences between the open source ABP Framework and the ABP Commercial?", + "ABPCommercialExplanation": "ABP Commercial is a set of premium modules, tools, themes and services built on top of the open source ABP framework. ABP Commercial is being developed and supported by the same team behind the ABP framework.", + "WhatAreDifferencesThanABPFrameworkExplanation": "

ABP framework is a modular, themeable, micro-service compatible application development framework for ASP.NET Core. It provides a complete architecture and a strong infrastructure to make you focusing on your own business code rather than repeating yourself for every new project. It is based on software development best practices and popular tools you already know.

ABP framework is completely free, open source and community-driven. It also provides a free theme and some pre-built modules (e.g. identity management and tenant management).

", + "VisitTheFrameworkVSCommercialDocument": "Visit the following link, for more information {1} ", + "ABPCommercialFollowingBenefits": "ABP Commercial adds the following benefits on top of the ABP framework;", + "Professional": "Professional", + "UIThemes": "UI themes", + "EnterpriseModules": "Enterprise ready, feature rich, pre-built application modules (e.g. Identity Server management, SaaS management, language management)", + "ToolingToSupport": "Tooling to support your development productivity (e.g. ABP Suite)", + "PremiumSupportLink": "Premium support", + "WhatDoIDownloadABPCommercial": "What do I download when I purchase the ABP Commercial?", + "CreateUnlimitedSolutions": "Once you purchase an ABP Commercial license, you will be able to create unlimited solutions like described in the Getting Started document.", + "ABPCommercialSolutionExplanation": "When you create a new application, you get a Visual Studio solution (a startup template) based on your preferences. The downloaded solution has commercial modules and themes already installed and configured for you. You can remove a pre-installed module or add another module if you like. All modules and themes are used a NuGet/NPM packages by default.", + "StartDevelopWithTutorials": "The downloaded solution is well architected and documented. You can start to develop your own business code based on it following the tutorials", + "TryTheCommercialDemo": "You can try the demo to see a sample application created using the ABP Commercial startup template.", + "HowManyProducts": "How many different products/solutions can I build using the ABP Commercial?", + "HowManyProductsExplanation": "There is no limit to create an ABP project. You can create as many project as you want, develop and upload them to different servers.", + "HowManyDevelopers": "How many developers can work on the ABP Commercial?", + "HowManyDevelopersExplanation": "ABP Commercial licenses are per developer. Different license types have different developer limits. However, you can add more developers to any license type whenever you need. See the prices page for license types, developer limits and additional developer costs.", + "ChangingLicenseType": "Can I change my license type in the future?", + "ChangingLicenseTypeExplanation": "You can always add new developers in your same license type. See also \"How many developers can work on the ABP Commercial?\". You can also upgrade to a higher license by paying the calculated price difference. When you upgrade to a higher license plan, you get the benefits of the new plan, but the license upgrade does not change the license expiry date.", + "LicenseExtendUpgradeDiff": "What is the difference between license extend and upgrade?", + "LicenseExtendUpgradeDiffExplanation": "Extending: By extending/renewing your license, you will continue to get premium support and get major updates for the modules and themes. Besides, you will be able to continue creating new projects. And you will still be able to use ABP Suite which speeds up your development.
Upgrading: By upgrading your license, you will promote to a higher license plan which will allow you to get additional benefits. See the license comparison table to check the differences between the license plans.On the other hand, when you upgrade, your license expiry date will not change!To extend your license end date, you need to extend your license.", + "LicenseRenewalCost": "What is the license renewal cost after 1 year?", + "LicenseRenewalCostExplanation": "You can renew (extend) your license by paying %80 of the current license price. For example; Standard ABP Team License is ${0} and renewal price of the Team License is ${1}.", + "IsSourceCodeIncluded": "Does my license include the source code of the commercial modules and themes?", + "IsSourceCodeIncludedExplanation1": "Depends on the license type you've purchased:", + "IsSourceCodeIncludedExplanation2": "Team: Your solution uses the modules and the themes as NuGet and NPM packages. It doesn't include their source code. In this way, you can easily upgrade these modules and themes whenever a new version is available. However, you can not get the source code of the modules and the themes.", + "IsSourceCodeIncludedExplanation3": "Business/Enterprise: In addition to the Team license, you are able to download the source code of any module or theme you need. You can even remove the NuGet/NPM package references for a particular module and add its source code directly to your solution to fully change it.", + "IsSourceCodeIncludedExplanation4": "

Including the source code of a module to your solution gives you the maximum freedom to customize that module. However, then it will not be possible to automatically upgrade the module when a new version is released.

None of the licenses include the ABP Suite source code, which is an external tool that generates code for you and assist to your development.

See the pricing page for other differences between the license types.

", + "ChangingDevelopers": "Can I change the registered developers of my organization in the future?", + "ChangingDevelopersExplanation": "In addition to add new developers to your license, you can also change the existing developers (you can remove a developer and add a new one to the same seat) without any additional cost.", + "WhatHappensWhenLicenseEnds": "What happens when my license period ends?", + "WhatHappensWhenLicenseEndsExplanation1": "ABP Commercial has perpetual license type.After your license expires, you can continue developing your project. And you are not obliged to renew your license. After your license expires;", + "WhatHappensWhenLicenseEndsExplanation2": "You can not create new solutions using the ABP Commercial, but you can continue to develop your existing applications forever.", + "WhatHappensWhenLicenseEndsExplanation3": "You will be able to get updates for the modules and themes within your MAJOR version. For example; if you are using v3.2.0 of a module, you can still get updates for v3.x.x (v3.3.0, v3.5.2... etc.) of that module. But you cannot get updates for the next major version (like v4.x, v5.x)", + "WhatHappensWhenLicenseEndsExplanation4": "You can not install new modules and themes added to the ABP Commercial platform after your license ends.", + "WhatHappensWhenLicenseEndsExplanation5": "You can not use the ABP Suite.", + "WhatHappensWhenLicenseEndsExplanation6": "You can not get the premium support anymore.", + "WhatHappensWhenLicenseEndsExplanation7": "You can renew your subscription if you want to continue to get these benefits. There is a 20% discount when you renew your subscription.", + "WhenShouldIRenewMyLicense": "When should I renew my license?", + "WhenShouldIRenewMyLicenseExplanation1": "If you renew your license within 1 month after your license expires, %20 discount will be applied to total license price.", + "WhenShouldIRenewMyLicenseExplanation2": "If you renew your license after 1 month from your license expire date, the renew price will be same as license purchase price and there will be no discount for your renewal.", + "TrialPlan": "Do you have a trial plan?", + "TrialPlanExplanation": "For now, ABP Commercial doesn't have a trial plan. For the Team licenses we provide 30 days money back guarantee. You can just request a refund in the first 30 days. For the Business and Enterprise licenses, we provide 60% refund in 30 days. This is because Business and Enterprise licenses include the full source code of all the modules and the themes.", + "DoYouAcceptBankWireTransfer": "Do you accept bank wire transfer?", + "DoYouAcceptBankWireTransferExplanation": "Yes, we accept bank wire transfer.
After sending the license amount via bank wire transfer, send us your receipt and the requested license type via e-mail.
Our international bank account information:", + "HowToUpgrade": "How to upgrade existing applications when a new version is available?", + "HowToUpgradeExplanation1": "When you create a new application using ABP Commercial, all the modules and the theme are used as NuGet and NPM packages. So, you can easily upgrade the packages when a new version is available.", + "HowToUpgradeExplanation2": "In addition to the standard NuGet/NPM upgrades, ABP CLI provides an update command that automatically finds and upgrades all ABP related packages in your solution.", + "DatabaseSupport": "Which database systems are supported?", + "DatabaseSupportExplanation": "ABP Framework itself is database agnostic and can work with any database provider by its nature. See the data access document for a list of currently implemented providers.", + "UISupport": "Which UI frameworks are supported?", + "Supported": "Supported", + "UISupportExplanation": "ABP Framework itself is UI framework agnostic and can work with any UI framework. However, startup templates, module UIs and themes were not implemented for all UI frameworks. See the getting started document for the up-to-date list of UI options.", + "MicroserviceSupport": "Does it support the micro-service architecture?", + "MicroserviceSupportExplanation1": "One of the major goals of the ABP framework is to provide a convenient infrastructure to create micro-service solutions. See the micro-service architecture document to understand how it helps to create micro-service systems.", + "MicroserviceSupportExplanation2": "All the ABP Commercial modules are designed to support micro-service deployment scenarios (with its own API and database) by following the module development best practices document.", + "MicroserviceSupportExplanation3": "We provide a sample micro-service demo solutionthat demonstrates a micro-service architecture implementation to help you to create your own solution.", + "MicroserviceSupportExplanation4": "So, the short answer is \"yes, it supports micro-service architecture\".", + "MicroserviceSupportExplanation5": "However, a micro-service system is a solution and every solution will have different requirements, network topology, communication scenarios, authentication possibilities, database separation/sharing decisions, runtime configurations, 3rd party system integrations and many more.", + "MicroserviceSupportExplanation6": "The ABP Framework and the ABP Commercial provides infrastructure for micro-service scenarios, micro-service compatible modules, samples and documentation to help you to build your own solution. But don't expect to directly download your dream solution pre-built for you. You will need to understand it and bring some parts together based on your requirements.", + "WhereCanIDownloadSourceCode": "Where can I download source-code?", + "WhereCanIDownloadSourceCodeExplanation": "You can download the source code of all ABP modules, Angular packages and themes via ABP Suite or ABP CLI. See How to download source-code?", + "ComputerLimitation": "How many computers can a developer login when developing ABP?", + "ComputerLimitationExplanation": "We specifically permit {0} computers per individual/licensed developer. Whenever there is a need for a developer to develop ABP Commercial products on a third machine, an e-mail should be sent to license@abp.io explaining the situation and we will then make the appropriate allocation in our system.", + "RefundPolicy": "Do you have a refund policy?", + "RefundPolicyExplanation": "You can request a refund within 30 days of your license purchase. The Business and Enterprise license types have source-code download option, therefore refunds are not available for the Business and Enterprise (and any licenses that include a right to receive source-code). In addition, no refunds are made for renewals and second license purchases.", + "HowCanIRefundVat": "How can I refund VAT?", + "HowCanIRefundVatExplanation1": "If you made the payment using 2Checkout, you can refund VAT via your 2Checkout account:", + "HowCanIRefundVatExplanation2": "Log in into your 2Checkout account", + "HowCanIRefundVatExplanation3": "Find the appropriate order and press \"Refund Belated VAT\" (enter your VAT ID)", + "HowCanIGetMyInvoice": "How can I get my invoice?", + "HowCanIGetMyInvoiceExplanation": "There are 2 payment gateways for purchasing a license: PayU and 2Checkout. If you purchase your license through 2Checkout gateway, it sends the PDF invoice to your email address, see 2Checkout invoicing. If you purchase through the PayU gateway or via bank wire transfer, we will prepare and send your invoice. You can request your invoice from the organization management page.", + "Forum": "Forum", + "SupportExplanation": "ABP Commercial licenses provides a premium forum support by a team consists of the ABP Framework experts.", + "PrivateTicket": "Private Ticket", + "PrivateTicketExplanation": "Enterprise License also includes a private support with e-mail and ticket system.", + "AbpSuiteExplanation1": "ABP Suite allows you to build web pages in a matter of minutes. It's a .NET Core Global tool that can be installed from the command line.", + "AbpSuiteExplanation2": "It can create a new ABP solution, generate CRUD pages from the database to the front-end. For technical overview see the document", + "FastEasy": "Fast & Easy", + "AbpSuiteExplanation3": "ABP Suite allows you to easily create CRUD pages. You just need to define your entity and its properties, let the rest to ABP Suite for you! ABP Suite generates all the necessary code for your CRUD page in a few seconds. It supports Angular, MVC and Blazor user interfaces.", + "RichOptions": "Rich Options", + "AbpSuiteExplanation4": "ABP Suite supports multiple UI options like Razor Pages and Angular.It also supports multiple databases like MongoDB and all databases supported by EntityFramework Core (MS SQL Server, Oracle, MySql, PostgreSQL and more).", + "AbpSuiteExplanation5": "Good thing is that, you don't have to worry about those options. ABP Suite understands your project type and generates the code for your project and places the generated code in correct place in your project.", + "SourceCode": "Source Code", + "AbpSuiteExplanation6": "ABP Suite generates the source code for you! It doesn't generate magic files to generate the web page. ABP Suite generates the source code for Entity, Repository, Application Service, Code First Migration, JavaScript/TypeScript and CSHTML/HTML and necessary Interfaces as well. ABP Suite also generates the code according to Best Practices of software development, so you don't have to worry about generated code's quality.", + "AbpSuiteExplanation7": "Since you have the source code of building blocks of the generated CRUD page in correct application layers, you can easily modify the source code and inject your custom/bussiness logic to the generated code.", + "CrossPlatform": "Cross Platform", + "AbpSuiteExplanation8": "ABP Suite is built with .NET Core and it is cross platform. It runs as a web application on your local computer. You can run it on Windows, Mac and Linux", + "OtherFeatures": "Other Features", + "OtherFeatures1": "Updates NuGet and NPM packages on your solution easily.", + "OtherFeatures2": "Regenerates already generated pages from scratch.", + "OtherFeatures3": "Creates new solutions", + "ThanksForCreatingProject": "Thanks for Creating Your Project!", + "HotToRunSolution": "How to run your solution?", + "HotToRunSolutionExplanation": "See getting started document to learn how to configure and run your solution.", + "GettingStarted": "Getting Started", + "WebAppDevTutorial": "Web App Dev Tutorial", + "WebAppDevTutorialExplanation": "See web application development tutorial document for a step by step development sample.", + "Document": "Document", + "UsingABPSuiteToCURD": "Using ABP Suite for CRUD Page Generation & Tooling", + "SeeABPSuiteDocument": "See ABP Suite document to learn the usage of ABP Suite.", + "AskQuestionsOnSupport": "You can ask questions on ABP Commercial Support.", + "Documentation": "Documentation", + "SeeModulesDocument": "See modules document for a list of all commercial (pro) modules and their documents.", + "Pricing": "Pricing", + "PricingExplanation": "Choose the features and functionality your business needs today. Easily upgrade as your business grows.", + "Team": "Team", + "Business": "Business", + "Enterprise": "Enterprise", + "Custom": "Custom", + "IncludedDeveloperLicenses": "Included developer licenses", + "CustomLicenceOrAdditionalServices": "Need custom licence or additional services?", + "CustomOrVolumeLicense": "Custom or volume license", + "LiveTrainingSupport": "Live training & support", + "AndMore": "and more", + "AdditionalDeveloperLicense": "Additional developer license", + "ProjectCount": "Project count", + "AllProModules": "All pro modules", + "AllProThemes": "All pro themes", + "AllProStartupTemplates": "All pro startup templates", + "SourceCodeOfAllModules": "Source code of all modules", + "SourceCodeOfAllThemes": "Source code of all themes", + "PerpetualLicense": "Perpetual license", + "UnlimitedServerDeployment": "Unlimited server deployment", + "YearUpgrade": "1 year upgrade", + "YearPremiumForumSupport": "1 year premium forum support", + "ForumSupportIncidentCountYear": "Forum support incident count/year", + "PrivateTicketEmailSupport": "Private ticket & email support", + "BuyNow": "Buy Now" + } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json index 82c23450a0..0e1e61dba8 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json @@ -16,7 +16,7 @@ "Name": "名称", "EmailAddress": "电子邮件地址", "Developers": "开发者", - "LicenseType": "许可证类型", + "LicenseType": "许可类型", "Manage": "管理", "StartDate": "开始日期", "EndDate": "结束日期", @@ -33,7 +33,258 @@ "EmailNotValid": "请输入有效的电子邮件地址", "JoinOurMarketingNewsletter": "加入我们的营销简讯", "WouldLikeToReceiveMarketingMaterials": "我想收到市场营销资料,例如产品交易和特别优惠.", - "StartUsingYourLicenseNow": "立即开始使用你的许可证", - "WelcomePage": "欢迎页面" + "StartUsingYourLicenseNow": "立即开始使用你的许可", + "WelcomePage": "欢迎页面", + "UnsubscriptionExpireEmail": "退订许可到期提醒邮件", + "UnsubscribeLicenseExpireEmailReminderMessage": "此电子邮件订阅仅提醒你许可的到期日期.", + "UnsubscribeFromLicenseExpireEmails": "如果你不想收到关于许可到期邮件,你可以在任何时间取消订阅.", + "Unsubscribe": "取消订阅", + "NotOrganizationMember": "你不是任何组织的成员.", + "UnsubscribeLicenseExpirationEmailSuccessTitle": "退订成功", + "UnsubscribeLicenseExpirationEmailSuccessMessage": "你不会再收到任何许可到期提醒邮件.", + "IndexPageHeroSection": "一个完整的web开发平台基于 框架", + "AbpCommercialShortDescription": "ABP商业版提供了预构建的应用程序模块, 快速的应用程序开发工具, 专业的UI主题, 高级支持等.", + "LiveDemo": "在线演示", + "GetLicence" :"获得许可", + "Application": "应用程序", + "StartupTemplates": "启动模板", + "Startup": "启动", + "Templates": "模板", + "Developer": "开发人员", + "Tools": "工具", + "Premium": "高级", + "PremiumSupport": "高级支持", + "PremiumForumSupport": "高级论坛支持", + "UI": "UI", + "Themes": "主题", + "JoinOurNewsletter": "加入我们的时事通讯", + "Send": "发送", + "Learn": "学习", + "AdditionalServices": "额外的服务", + "WhatIsABPFramework": "什么是ABP框架?", + "OpenSourceBaseFramework": "开源的框架", + "ABPFrameworkExplanation": "

ABP商业版基于ABP框架, 这是一个开源和社区驱动的ASP.NET Core web应用程序开发框架.

ABP框架提供了出色的基础设施, 使用最佳实践编写可维护,可扩展,可测试的代码.

基于你已经知道的流行工具. 低学习曲线,容易适应,舒适的开发体检.

", + "Modular": "模块化", + "MicroserviceCompatible": "微服务兼容", + "DomainDrivenDesignInfrastructure": "领域驱动设计基础设施", + "MultiTenancy": "多租户", + "DistributedMessaging": "分布式消息", + "DynamicProxying": "动态代理", + "BackgroundJobs": "后台作业", + "AuditLogging": "审计日志", + "BLOBStoring": "BLOB存储", + "BundlingMinification": "捆绑 & 压缩", + "AdvancedLocalization": "高级本地化", + "ManyMore": "以及更多", + "ExploreTheABPFramework": "探索ABP框架", + "WhyUseTheABPCommercial": "为什么使用ABP商业版?", + "WhyUseTheABPCommercialExplanation": "

构建企业级的web应用程序可能复杂和耗时.

ABP商业版提供所有现代企业级基于ASP.NET Core的解决方案所需要的基础设施. 从设计到部署,整个开发生命周期都由ABP的内置功能和模块提供支持.

", + "StartupTemplatesShortDescription": "启动模板使你在几秒内快速启动项目.", + "UIFrameworksOptions": "UI框架选项;", + "DatabaseProviderOptions": "数据库提供程序选项;", + "PreBuiltApplicationModules": "预构建的应用程序模块", + "PreBuiltApplicationModulesShortDescription": "大多数常见的应用程序需求已经做为可重用的模块为你开发了.", + "Account": "账户", + "Blogging": "博客", + "Identity": "Identity", + "IdentityServer": "Identity Server", + "Saas": "Saas", + "LanguageManagement": "语言管理", + "TextTemplateManagement": "文本模板管理", + "See All Modules": "查看所有的模块", + "ABPSuite": "ABP Suite", + "AbpSuiteShortDescription": "ABP Suite是ABP商业版的辅助工具.", + "AbpSuiteExplanation": "它让你在几分钟内构建web页面. 它是一个.Net Core全局工具,可以使用命令行安装. 它可以创建一个新的ABP解决方案,从数据库生成前端CURD页面.", + "Details": "详情", + "LeptonTheme": "Lepton主题", + "ProfessionalModernUIThemes": "专业, 现代化的UI主题", + "LeptonThemeExplanation": "Lepton提供了一系列的Bootstrap管理主题,为任何需要管理仪表盘的项目提供了坚实的基础.", + "DefaultTheme": "默认主题", + "MaterialTheme": "Material主题", + "Default2Theme": "默认主题2", + "DarkTheme": "深色主题", + "DarkBlueTheme": "深蓝主题", + "LightTheme": "浅色主题", + "ProudToWorkWith": "荣幸与你合作", + "OurConsumers": "全球50多个国家的数百家企业和开发商使用ABP商业版.", + "JoinOurConsumers": "加它他们并快速构建令人惊叹的产品.", + "AdditionalServicesExplanation": "你是否需要额外或自定义的服务? 我们和我们的合作伙伴可以提供;", + "CustomProjectDevelopment": "自定义项目开发", + "CustomProjectDevelopmentExplanation": "专为你的自定义的开发人员.", + "PortingExistingProjects": "移植现有项目", + "PortingExistingProjectsExplanation": "将你的迁移传统项目迁移到ABP平台.", + "LiveSupport": "实时支持", + "LiveSupportExplanation": "在你需要时,可以实时提供远程支持选项.", + "Training": "培训", + "TrainingExplanation": "为你的开发人员提供专门培训.", + "OnBoarding": "管理", + "OnBoardingExplanation": "帮助设置你的开发,CI和CD环境.", + "PrioritizedTechnicalSupport": "优先的技术支持", + "PremiumSupportExplanation": "除了社区对ABP框架出色支持外,我们的支持团队会优先回答商业用户的技术问题.", + "SeeTheSupportOptions": "查看支持选项", + "Contact": "联系", + "TellUsWhatYouNeed": "告诉我们你需要什么.", + "YourMessage": "你的消息", + "YourFullName": "你的全名", + "EmailField": "E-mail地址", + "YourEmailAddress": "你的e-mail地址", + "HowMayWeHelpYou": "我们如何帮助你", + "SendMessage": "发送消息", + "Success": "成功", + "WeWillReplyYou.": "你的消息已经发送! 我们会在短时间内给你答复.", + "GoHome": "回到主页面", + "CreateLiveDemo": "创建在线演示", + "RegisterToTheNewsletter": "注册到时事简报以获取有关ABP.IO的消息,比如新发布的内容.", + "EnterYourEmailOrLogin": "输入你的e-mail地址来创建你的演示或者使用你的已有账号登录.", + "ApplicationTemplate": "应用程序模板", + "ApplicationTemplateExplanation": "应用程序启动模板用于创建新的web应用程序.", + "EfCoreProvider": "Entity Framework (支持 SQL Server, MySQL, PostgreSQL, Oracle 和其它)", + "AlreadyIncludedInTemplateModules": "以下模块已经包含并配置在此模板中:", + "ApplicationTemplateArchitecture": "应用程序模板还支持UI,API,身份验证服务器物理分离的分层架构.", + "SeeTheGuideOrGoToTheLiveDemo": "查看开发人员指南或者查看在线演示了解更多关于模板的信息.", + "DeveloperGuide": "开发人员指南", + "ModuleTemplate": "模块模块", + "ModuleTemplateExplanation1": "你是否想要创建可在不同应用程序之间重用的模块? 这个启动模板准备好了一切来创建可重用的应用程序模块微服务.", + "ModuleTemplateExplanation2": "

你可以为一个模块支持单个或多个UI框架, 单个或多个数据库提供程序. 除了单元测试和集成测试基础架构外,启动模板被配置为在一个最小的应用程序中运行和测试你的模块.

查看开发人员指南了解有关此模板的技术信息.

", + "WithAllStyleOptions": "使用所有的样式选项", + "Demo": "演示", + "SeeAllModules": "查看所有的模块", + "ABPCLIExplanation": "ABP CLI(命令行页面)是一个执行基于ABP解决方案的一些常见操作的命令行工具.", + "ABPSuiteEasilyCURD": "ABP Suite是一个使你轻松创建CURD页面的工具", + "WeAreHereToHelp": "我们在这里为你提供帮助", + "BrowseOrAskQuestion": "你可以浏览我们的帮助主题或搜索常见的问题, 或者你可以使用联系表单向我们提问.", + "SearchQuestionPlaceholder": "搜索常见的问题", + "WhatIsTheABPCommercial": "什么是ABP商业版?", + "WhatAreDifferencesThanAbpFramework": "ABP框架与ABP商业版有什么不同?", + "ABPCommercialExplanation": "ABP商业版是一套基于开源ABP框架之上的高级模块,工具,主题和服务. ABP商业版由ABP框架背后的同一团队开发和支持.", + "WhatAreDifferencesThanABPFrameworkExplanation": "

ABP框架是模块化,主题化,微服务兼容的ASP.NET Core应用程序开发框架. 它提供了一个完整的架构和强大的基础设施,让你专注于自己的业务代码而不是重复自己的每一个项目. 它基于软件开发的最佳实践和你已经知道的流行工具

ABP框架是完全免费,开源和由社区驱动的. 它还提供了一个免费的主题和一些预构建的模块 (如 identity管理和租户管理).

", + "VisitTheFrameworkVSCommercialDocument": "访问以下链接,了解更多信息 {1} ", + "ABPCommercialFollowingBenefits": "ABP商业版在ABP框架之上添加了以下好处;", + "Professional": "专业的", + "UIThemes": "UI主题", + "EnterpriseModules": "企业就绪,功能丰富,预构建的应用程序模块 (如 Identity Server管理, SaaS管理, 语言管理)", + "ToolingToSupport": "支持你的生产力的工具(如. ABP Suite)", + "PremiumSupportLink": "高级支持", + "WhatDoIDownloadABPCommercial": "购买ABP商业版后我可以下载什么?", + "CreateUnlimitedSolutions": "一旦你购买了ABP商业许可, 你可以创建入门文档中描述的无限的解决方案.", + "ABPCommercialSolutionExplanation": "创建新应用程序时,将根据你的首选项获得Visual Studio解决方案(启动模板). 下载的解决方案已为你安装并配置了商业模块和主题. 你可以删除预装的模块,也可以根据需要添加其他模块. 默认情况下所有模块和主题都使用NuGet/NPM软件包.", + "StartDevelopWithTutorials": "下载的解决方案经过精心设计和记录, 你可以根据教程来开发自己的业务代码.", + "TryTheCommercialDemo": "你可以尝试示例来查看使用ABP商业模板创建的示例应用程序.", + "HowManyProducts": "使用ABP商业版,我可以构建多少不同的产品/解决方案?", + "HowManyProductsExplanation": "创建ABP项目没有限制. 你可以根据需要创建任意数量的项目,进行开发并将其部署到其他服务器.", + "HowManyDevelopers": "有多少开发者可以参与ABP商业版工作?", + "HowManyDevelopersExplanation": "ABP商业许可是针对每个开发人员的. 不同的许可类型具有不同的开发人员限制. 但是你可以在需要时将更多开发人员添加到任何许可类型. 查看许可类型,开发人员限制和额外的开发人员成本的价格页面.", + "ChangingLicenseType": "将来更改我的许可类型吗?", + "ChangingLicenseTypeExplanation": "你始终可以在同一许可中添加新的开发人员. 参阅 \"有多少开发者可以参与ABP商业版工作?\". 你还可以通过支付计算出的价格差来升级到更高的许可. 当你升级到更高的许可计划时,可以享受新计划的好处,但是许可升级不会更改许可的到期日期.", + "LicenseExtendUpgradeDiff": "许可扩展和升级有什么区别?", + "LicenseExtendUpgradeDiffExplanation": "扩展: 通过扩展/更新许可,你将继续获得高级支持,并获得有关模块和主题的重大更新. 此外你将能够继续创建新项目. 而且你仍然可以使用ABP Suite来加快开发速度.
升级: 通过升级许可,你将升级到更高的许可计划,这将使你获得更多好处. 查看 许可比较表来检查许可计划之间的差异. 另一方面,当你升级时你的许可到期日期不会改变!要延长你的许可终止日期,你需要延长你的许可.", + "LicenseRenewalCost": "一年后的许可续期费用是多少?", + "LicenseRenewalCostExplanation": "你可以通过支付当前许可价格的%80来续订(扩展)你的许可. 例如; 标准ABP团队许可为 ${0} 续订价格是 ${1}.", + "IsSourceCodeIncluded": "我的许可是否包括商业模块和主题的源代码?", + "IsSourceCodeIncludedExplanation1": "取决于你购买的许可类型:", + "IsSourceCodeIncludedExplanation2": "团队: 你的解决方案将这些模块和主题作为NuGet和NPM包使用. 它不包括其源代码. 这样,只要有新版本可用,你就可以轻松升级这些模块和主题. 但是,你无法获取模块和主题的源代码.", + "IsSourceCodeIncludedExplanation3": "商业/企业: 除了团队许可外,你还可以下载所需的任何模块或主题的源代码. 你甚至可以删除特定模块的NuGet/NPM软件包引用,并将其源代码直接添加到你的解决方案中以完全更改它.", + "IsSourceCodeIncludedExplanation4": "

将模块的源代码包含到解决方案中,可以最大程度地自定义该模块. 但是当新版本发布时,将无法自动升级模块.

这些许可均不包含ABP Suite源代码,该源代码是一个外部工具,可以为你生成代码并帮助你进行开发

有关许可类型之间的其它差异查看定价页面.

", + "ChangingDevelopers": "我将来可以更改我组织的注册开发人员吗?", + "ChangingDevelopersExplanation": "除了将新的开发人员添加到你的许可中之外,你还可以更改现有的开发人员(可以删除一个开发人员并将新的开发人员添加到同一位置),而无需任何额外费用.", + "WhatHappensWhenLicenseEnds": "我的许可期限结束后会怎样?", + "WhatHappensWhenLicenseEndsExplanation1": "ABP商业版具有永久许可类型.许可到期后, 你可以继续开发你的项目.并且你没有义务续订许可.许可到期后;", + "WhatHappensWhenLicenseEndsExplanation2": "你不能使用ABP商业版创建新的解决方案,但可以永远继续开发现有的应用程序.", + "WhatHappensWhenLicenseEndsExplanation3": "你能够在你的主版本中获得模块和主题的更新.例如;如果你使用的是模块的v3.2.0版本,你仍然可以获得v3.x.x版本的更新.(v3.3.0 v3.5.2…等等)的.但是你无法获得下一个主要版本(如v4.x,v5.x)的更新", + "WhatHappensWhenLicenseEndsExplanation4": "许可到期后,你无法安装添加到ABP商业平台的新模块和主题.", + "WhatHappensWhenLicenseEndsExplanation5": "你不能使用ABP Suite.", + "WhatHappensWhenLicenseEndsExplanation6": "你不再获得高级支持.", + "WhatHappensWhenLicenseEndsExplanation7": "如果你想继续获得这些好处,可以继续续订. 续订时有20%的折扣.", + "WhenShouldIRenewMyLicense": "我什么时候应该续订我的许可?", + "WhenShouldIRenewMyLicenseExplanation1": "如果你在许可到期后的 1个月内续订许可,则许可总价将享受%20的折扣.", + "WhenShouldIRenewMyLicenseExplanation2": "如果你在你的许可过期日期1个月后更新你的许可,更新价格将与许可购买价格相同,你的更新将没有折扣.", + "TrialPlan": "你们有试用计划吗?", + "TrialPlanExplanation": "目前,ABP商业版还没有试用计划.对于团队许可,我们提供30天的退款保证.你可以在30天内要求退款.对于企业营业执照,我们提供30天内60%的退款.这是因为商业和企业许可包含所有模块和主题的完整源代码.", + "DoYouAcceptBankWireTransfer": "你们接受银行电汇吗?", + "DoYouAcceptBankWireTransferExplanation": "是的,我们接受银行电汇.
通过银行电汇转账,通过电子邮件将收据和所要求的许可类型发送给我们.
我们的国际银行帐户信息:", + "HowToUpgrade": "可用新版本时如何升级现有应用程序?", + "HowToUpgradeExplanation1": "使用ABP商业版创建新应用程序时,所有模块和主题均用作NuGet和NPM软件包. 因此,当有新版本可用时,你可以轻松升级软件包.", + "HowToUpgradeExplanation2": "除了标准的NuGet/NPM升级之外, ABP CLI 还提供了一条更新命令,该命令可自动查找和升级解决方案中的所有与ABP相关的软件包.", + "DatabaseSupport": "支持哪些数据库系统?", + "DatabaseSupportExplanation": "ABP框架本身与数据库无关,并且就其性质而言,可以与任何数据库提供程序一起使用. 请参阅数据访问文档以获取当前实现的提供程序的列表.", + "UISupport": "支持哪些UI框架?", + "Supported": "支持的", + "UISupportExplanation": "ABP框架本身与UI框架无关,并且可以与任何UI框架一起使用. 但是,并非针对所有UI框架都实现了启动模板,模块UI和主题. 有关UI选项的最新列表,请参见入门文档.", + "MicroserviceSupport": "它是否支持微服务架构?", + "MicroserviceSupportExplanation1": "ABP框架的主要目标之一是为创建微服务解决方案提供便利的基础架构. 请参阅微服务体系结构文档,以了解它如何帮助创建微服务系统.", + "MicroserviceSupportExplanation2": "所有的ABP商业模块通过模块开发最佳实践文档被设计为支持微服务部署场景(使用自己的API和数据库).", + "MicroserviceSupportExplanation3": "我们提供了一个示例微服务演示解决方案,该示例演示了一种微服务架构实现,可帮助你创建自己的解决方案.", + "MicroserviceSupportExplanation4": "所以简短的答案是 \"是的, 它支持微服务体系结构\".", + "MicroserviceSupportExplanation5": "但是,微服务系统是一个解决方案,每个解决方案都有不同的要求,网络拓扑,通信场景,身份验证可能性,数据库分离/共享决策,运行时配置,第三方系统集成等等.", + "MicroserviceSupportExplanation6": "ABP框架和ABP商业版提供了微服务方案,微服务兼容模块,示例和文档的基础结构,以帮助你构建自己的解决方案. 但是不要期望直接下载为你预先构建的梦想解决方案. 你将需要了解它,并根据需要将某些部分组合在一起.", + "WhereCanIDownloadSourceCode": "在哪里可以下载源代码?", + "WhereCanIDownloadSourceCodeExplanation": "你可以通过ABP Suite或ABP CLI下载所有ABP模块,Angular软件包和主题的源代码. 请参见如何下载源代码?", + "ComputerLimitation": "开发人员在开发ABP时可以登录到多少台计算机?", + "ComputerLimitationExplanation": "我们特别允许每个个人/许可的开发人员使用 {0}台计算机. 每当需要开发人员在第三台计算机上开发ABP商业产品时,都应将电子邮件发送到license@abp.io,以说明情况,然后我们将在系统中进行适当分配.", + "RefundPolicy": "你们有退款政策吗?", + "RefundPolicyExplanation": "你可以在购买许可的30天内请求退款.商业和企业许可类型都有源代码下载选项,因此商业和企业(以及任何包含获得源代码的权利的许可)都不能退款.此外,续展和购买第二次许可也不退款.", + "HowCanIRefundVat": "我该如何退还增值税?", + "HowCanIRefundVatExplanation1": "如果你使用2Checkout付款,则可以通过2Checkout帐户退还增值税:", + "HowCanIRefundVatExplanation2": "登录到你的2Checkout账户", + "HowCanIRefundVatExplanation3": "找到适当的订单,然后按\"退还已延期的增值税\"(输入你的增值税ID", + "HowCanIGetMyInvoice": "我如何获得发票?", + "HowCanIGetMyInvoiceExplanation": "有两个用于购买许可的支付网关:PayU和2Checkout. 如果你通过2Checkout网关购买许可,则它将PDF发票发送到你的电子邮件地址,请参阅2Checkout发票.如果你是通过PayU网关或通过银行电汇购买的,我们将准备并发送你的发票. 你可以从组织管理页面索取发票.", + "Forum": "论坛", + "SupportExplanation": "ABP商业版许可包含由ABP框架专家组成的团队提供的高级论坛支持.", + "PrivateTicket": "私有票", + "PrivateTicketExplanation": "企业许可还包含带有电子邮件和票系统的私人支持.", + "AbpSuiteExplanation1": "ABP Suite使你在几分钟内构建web页面. 它是一个.NET Core Global工具,可以使用命令行安装.", + "AbpSuiteExplanation2": "它可以创建一个新的ABP解决方案, 从数据库生成前端CURD页面. 有关技术概述查看文档", + "FastEasy": "快速并且简单", + "AbpSuiteExplanation3": "ABP Suite允许你轻松的创建CURD页面. 你只需要定义你的实体和它的属性, 其它的让ABP Suite帮你完成! ABP Suite会在几秒内为你生成CURD页面和必要的代码. 它支持Angular, MVC和 Blazor用户界面.", + "RichOptions": "丰富的选项", + "AbpSuiteExplanation4": "ABP Suite支持多个UI选项,例如 Razor PagesAngular.它还支持多个数据库, 如 MongoDBEntityFramework Core支持的所有数据库(MS SQL Server, Oracle, MySql, PostgreSQL 和 更多).", + "AbpSuiteExplanation5": "好消息是, 你不必担心这些选项. ABP Suite了解你的项目类型并且将生成的代码放到项目中正确的位置.", + "SourceCode": "源码", + "AbpSuiteExplanation6": "ABP Suite为你生成源代码! 它不会生成魔法文件来生成web页面. ABP Suite为实体, 仓储, 应用程序, Code First迁移, JavaScript/TypeScript 和 CSHTML/HTML以及必要的页面生成源代码. ABP Suite根据软件开发的最佳实践来生成代码, 所以你不必担心生成的代码的质量.", + "AbpSuiteExplanation7": "由于你有应用程序层中生成的CURD页面的构建块的源代码, 因此你可以轻松修改源码并将自定义/业务逻辑注入到所生成的代码中.", + "CrossPlatform": "跨平台", + "AbpSuiteExplanation8": "ABP Suite使用.NET Core构建并且它是跨平台的. 它在你的本地电脑中运行为web应用程序. 你可以在Windows, MacLinux上运行它", + "OtherFeatures": "其他功能", + "OtherFeatures1": "轻松更新你的解决方案的NuGetNPM包.", + "OtherFeatures2": "重新生成已经生成的页面.", + "OtherFeatures3": "创建新的解决方案", + "ThanksForCreatingProject": "感谢你创建你的项目!", + "HotToRunSolution": "如何运行你的解决方案?", + "HotToRunSolutionExplanation": "查看入门文档来学习如何配置和运行你的解决方案.", + "GettingStarted": "入门", + "WebAppDevTutorial": "Web应用开发教程", + "WebAppDevTutorialExplanation": "查看web应用程序开发教程文档来一步一步的了解开发示例.", + "Document": "文档", + "UsingABPSuiteToCURD": "使用ABP Suite来生成CURD页面", + "SeeABPSuiteDocument": "查看ABP Suite文档学习如何使用ABP Suite.", + "AskQuestionsOnSupport": "你可以在ABP商业支持提出问题.", + "Documentation": "文档", + "SeeModulesDocument": "查看模块文档获取所有商业(专业)模块列表和它们的文档.", + "Pricing": "价格", + "PricingExplanation": "选择当前业务需要的特性和功能. 随着业务增长轻松升级.", + "Team": "团队", + "Business": "商业", + "Enterprise": "企业", + "Custom": "自定义", + "IncludedDeveloperLicenses": "包括开发人员许可", + "CustomLicenceOrAdditionalServices": "需要自定义许可与额外服务?", + "CustomOrVolumeLicense": "自定义或批量许可", + "LiveTrainingSupport": "现场培训和支持", + "AndMore": "和更多", + "AdditionalDeveloperLicense": "额外的开发人员许可", + "ProjectCount": "项目数量", + "AllProModules": "所有模块", + "AllProThemes": "所有主题", + "AllProStartupTemplates": "所有专业启动模板", + "SourceCodeOfAllModules": "所有模块的源码", + "SourceCodeOfAllThemes": "所有主题的源码", + "PerpetualLicense": "永久的许可", + "UnlimitedServerDeployment": "无限制的服务器部署", + "YearUpgrade": "1年升级", + "YearPremiumForumSupport": "1年高级论坛支持", + "ForumSupportIncidentCountYear": "论坛支持事件数量/年", + "PrivateTicketEmailSupport": "私有票和email支持", + "BuyNow": "现在购买" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json index 9c1e434ac1..82033e5849 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json @@ -136,6 +136,9 @@ "GitHubUserNameValidationMessage": "Your Github username can not include whitespace, please be sure your Github username is correct.", "PersonalSiteUrlValidationMessage": "Your personal site URL can not include whitespace, please be sure your personal site URL is correct.", "TwitterUserNameValidationMessage": "Your Twitter username can not include whitespace, please be sure your Twitter username is correct.", - "LinkedinUrlValidationMessage": "Your Linkedin URL can not include whitespace, please be sure your Linkedin URL is correct." + "LinkedinUrlValidationMessage": "Your Linkedin URL can not include whitespace, please be sure your Linkedin URL is correct.", + "NoPostsFound": "No posts found!", + "SearchInPosts": "Search in posts...", + "MinimumSearchContent": "You must enter at least 3 characters!" } } diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json index 49b819227f..9d7b56f0f3 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json @@ -110,7 +110,34 @@ "VideoContentForm": "视频内容来源", "GithubPostForm": "Github文章来源", "ExternalPostForm": "外部文章来源", - "PostSourceTypeChooses": "我们接受文章的三种来源类型;", - "Posts": "文章" + "HowToPost": "如何发布", + "Posts": "文章", + "VideoUrl": "视频Url", + "GithubArticleUrl": "Github文章Url", + "ExternalArticleUrl": "外部文章Url", + "CreatePostCoverInfo": "要创建一个有效的帖子,需要添加封面图片. 上传16:9的图片获取最佳视觉效果. 文件最大支持: 1MB", + "ThankYouForContribution": "感谢你对ABP社区的贡献", + "GithubArticle": "Github文章", + "GithubArticleSubmitStepOne": "1. 用Markdown格式在GitHub的任何公共存储库上写一篇文章. 示例", + "GithubArticleSubmitStepTwo": "2. 使用表单提交你的文章URL.", + "GithubArticleSubmitStepThree": "3. 你的文章将在这个网站中呈现.", + "YoutubeVideo": "Youtube视频", + "YoutubeVideoSubmitStepOne": "1. 在YouTube上发布你的视频.", + "YoutubeVideoSubmitStepTwo": "2. 使用表单提交视频URL.", + "YoutubeVideoSubmitStepThree": "3. 访客将能够在这个网站上直接观看你的视频内容.", + "ExternalContent": "外部内容", + "ExternalContentSubmitStepOne": "1. 在任何公开的平台创建内容(medium, 你自己的博客或者任何你喜欢的).", + "ExternalContentSubmitStepTwo": "2. 使用表单提交内容URL.", + "ExternalContentSubmitStepThree": "3. 访客被重定向到原网站的内容.", + "ChooseYourContentType": "请选择你想要添加内容的方式", + "PostContentViaGithub": "我想要使用 GitHub提交markdown格式的文章", + "PostContentViaYoutube": "我想要分享我在 Youtube的可用视频", + "PostContentViaExternalSource": "我想要添加我在其他平台发布的内容", + "GitHubUserNameValidationMessage": "您的Github用户名不能包含空格, 请确认你的Github用户名是正确的.", + "PersonalSiteUrlValidationMessage": "你的个人网站URL不能包含空格, 请确定你的个人网站URL是正确的.", + "TwitterUserNameValidationMessage": "你的Twitter用户名不能包含空格, 请确认你的Twitter用户名是正确的.", + "LinkedinUrlValidationMessage": "你的领英URL不能包含空格, 请确认你的领英URL是正确的", + "NoPostsFound": "没有发现帖子", + "SearchInPosts": "搜索帖子…" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de-DE.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de-DE.json index 523247a7b6..052b3235eb 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de-DE.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/de-DE.json @@ -185,6 +185,8 @@ "SeeCliDocumentForMoreInformation": "Weitere Optionen finden Sie im ABP CLI-Dokument oder wählen Sie oben die Registerkarte \"Direkter Download\".", "Optional": "Optional", "LocalFrameworkRef": "Behalten Sie die lokale Projektreferenz für die Framework-Pakete bei.", - "SelectLanguage": "Sprache auswählen" + "SelectLanguage": "Sprache auswählen", + "LatestArticleOnCommunity": "Neuester Artikel zur ABP Community", + "Register": "Registrieren" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json index cd0592524d..c0a168a6c2 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en-GB.json @@ -193,6 +193,7 @@ "MultipleDBOptions": "Multiple Database Providers", "MultipleUIOptionsExplanation": "The core framework is designed as UI independent and can work with any type of UI system, while there are multiple pre-built and integrated options are provided out of the box.", "MultipleDBOptionsExplanation": "The framework can work with any data source, while the following providers are officially developed and supported:", - "SelectLanguage": "Select language" + "SelectLanguage": "Select language", + "LatestArticleOnCommunity": "Latest Article on ABP Community" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index bdc7364788..fff1876a67 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -8,6 +8,7 @@ "ProjectName": "Project name", "ProjectType": "Project type", "DatabaseProvider": "Database provider", + "DatabaseManagementSystem": "Database management system", "NTier": "N-Tier", "IncludeUserInterface": "Include user interface", "CreateNow": "Create now", @@ -193,6 +194,8 @@ "MultipleDBOptions": "Multiple Database Providers", "MultipleUIOptionsExplanation": "The core framework is designed as UI independent and can work with any type of UI system, while there are multiple pre-built and integrated options are provided out of the box.", "MultipleDBOptionsExplanation": "The framework can work with any data source, while the following providers are officially developed and supported;", - "SelectLanguage": "Select language" + "SelectLanguage": "Select language", + "LatestArticleOnCommunity": "Latest Article on ABP Community", + "Register": "Register" } } diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/es.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/es.json index 06d197d82e..4911144609 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/es.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/es.json @@ -185,6 +185,8 @@ "SeeCliDocumentForMoreInformation": "Ver el documento ABP CLI para más opciones o selecciona la \"Direct Download\" pestaña de arriba.", "Optional": "Opcional", "LocalFrameworkRef": "Mantén la referencia al proyecto local para los paquetes del framework.", - "SelectLanguage": "Vali keel" + "SelectLanguage": "Vali keel", + "LatestArticleOnCommunity": "Último artículo sobre la comunidad ABP", + "Register": "Registrarse" } } \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json index d01d847716..8185ead8cd 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json @@ -8,6 +8,7 @@ "ProjectName": "项目名称", "ProjectType": "项目类型", "DatabaseProvider": "数据库提供者", + "DatabaseManagementSystem": "数据库管理系统", "NTier": "N层", "IncludeUserInterface": "包含用户界面", "CreateNow": "现在创建", @@ -193,6 +194,8 @@ "MultipleDBOptions": "多个数据库提供程序", "MultipleUIOptionsExplanation": "核心框架设计为独立与UI,可以和任何类型的UI系统一起使用. 同时提供了多个开箱即用的预构建集成选项.", "MultipleDBOptionsExplanation": "该框架可以使用任何数据源,并且以下提供程序已得到正式开发和支持;", - "SelectLanguage": "选择语言" + "SelectLanguage": "选择语言", + "LatestArticleOnCommunity": "关于ABP社区的最新文章", + "Register": "寄存器" } -} +} \ No newline at end of file diff --git a/docs/en/Background-Jobs-RabbitMq.md b/docs/en/Background-Jobs-RabbitMq.md index 2ee478ed17..16b8b0981a 100644 --- a/docs/en/Background-Jobs-RabbitMq.md +++ b/docs/en/Background-Jobs-RabbitMq.md @@ -66,6 +66,26 @@ Defining multiple connections is allowed. In this case, you can use different co } ```` +If you need to connect to the RabbitMQ cluster, you can use the `;` character to separate the host names. + +**Example: Connect to the RabbitMQ cluster** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123;234.234.234.234" + } + }, + "EventBus": { + "ClientName": "MyClientName", + "ExchangeName": "MyExchangeName" + } + } +} +``` + #### AbpRabbitMqOptions `AbpRabbitMqOptions` class can be used to configure the connection strings for the RabbitMQ. You can configure this options inside the `ConfigureServices` of your [module](Module-Development-Basics.md). diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index 04ddeaeba4..4db6518201 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -16,11 +16,13 @@ [ConnectionStringName("AbpIdentity")] public interface IIdentityDbContext : IEfCoreDbContext { - DbSet Users { get; set; } - DbSet Roles { get; set; } + DbSet Users { get; } + DbSet Roles { get; } } ```` +* **Do not** define `set;` for the properties in this interface. + ### DbContext class * **Do** inherit the `DbContext` from the `AbpDbContext` class. diff --git a/docs/en/Blob-Storing-Aliyun.md b/docs/en/Blob-Storing-Aliyun.md index 6cdebb3acc..4060e5ba26 100644 --- a/docs/en/Blob-Storing-Aliyun.md +++ b/docs/en/Blob-Storing-Aliyun.md @@ -36,7 +36,7 @@ Configure(options => aliyun.Policy = "policy"; aliyun.DurationSeconds = "expiration date"; aliyun.ContainerName = "your aliyun container name"; - aliyun.CreateContainerIfNotExists = false; + aliyun.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/en/Blob-Storing-Aws.md b/docs/en/Blob-Storing-Aws.md index 05e3caa183..aa7707e5d3 100644 --- a/docs/en/Blob-Storing-Aws.md +++ b/docs/en/Blob-Storing-Aws.md @@ -39,7 +39,7 @@ Configure(options => Aws.Policy = "policy"; Aws.DurationSeconds = "expiration date"; Aws.ContainerName = "your Aws container name"; - Aws.CreateContainerIfNotExists = false; + Aws.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/en/Blob-Storing-Azure.md b/docs/en/Blob-Storing-Azure.md index de6ed63152..99833e71c0 100644 --- a/docs/en/Blob-Storing-Azure.md +++ b/docs/en/Blob-Storing-Azure.md @@ -29,7 +29,7 @@ Configure(options => { azure.ConnectionString = "your azure connection string"; azure.ContainerName = "your azure container name"; - azure.CreateContainerIfNotExists = false; + azure.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/en/CLI.md b/docs/en/CLI.md index fc76aa997b..d4a33a2a12 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -31,6 +31,7 @@ Here, the list of all available commands before explaining their details: * **`update`**: Automatically updates all ABP related NuGet and NPM packages in a solution. * **`add-package`**: Adds an ABP package to a project. * **`add-module`**: Adds a [multi-package application module](https://docs.abp.io/en/abp/latest/Modules/Index) to a solution. +* **`list-modules`**: Lists names of open-source application modules. * **`get-source`**: Downloads the source code of a module. * **`generate-proxy`**: Generates client side proxies to use HTTP API endpoints. * **`remove-proxy`**: Removes previously generated client side proxies. @@ -202,6 +203,26 @@ abp add-module ProductManagement --new --add-to-solution-file * `--with-source-code`: Downloads the source code of the module to your solution folder and uses local project references instead of NuGet/NPM packages. This options is always `True` if `--new` is used. * `--add-to-solution-file`: Adds the downloaded/created module to your solution file, so you will also see the projects of the module when you open the solution on a IDE. (only available when `--with-source-code` is `True`.) +### list-modules + +Lists names of open-source application modules. + +Usage + +````bash +abp list-modules [options] +```` + +Example: + +```bash +abp list-modules +``` + +#### Options + +* `--include-pro-modules`: Includes commercial (pro) modules in the output. + ### get-source Downloads the source code of a module to your computer. diff --git a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md index 3e8a3e9da2..86f9774c7f 100644 --- a/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md +++ b/docs/en/Community-Articles/2020-10-08-How-To-Add-Custom-Property-To-The-User-Entity/How-To-Add-Custom-Property-To-The-User-Entity.md @@ -78,7 +78,7 @@ public static class CustomizeUserDemoEfCoreEntityExtensionMappings nameof(AppUser.Title), (entityBuilder, propertyBuilder) => { - propertyBuilder.IsRequired(); + propertyBuilder.HasDefaultValue(); propertyBuilder.HasMaxLength(UserConsts.MaxTitleLength); } ).MapEfCoreProperty( diff --git a/docs/en/Customizing-Application-Modules-Overriding-Services.md b/docs/en/Customizing-Application-Modules-Overriding-Services.md index ab6f29816b..081b142ad7 100644 --- a/docs/en/Customizing-Application-Modules-Overriding-Services.md +++ b/docs/en/Customizing-Application-Modules-Overriding-Services.md @@ -196,12 +196,16 @@ This example replaces the `AccountController` (An API Controller defined in the **`[ExposeServices(typeof(AccountController))]` is essential** here since it registers this controller for the `AccountController` in the dependency injection system. `[Dependency(ReplaceServices = true)]` is also recommended to clear the old registration (even the ASP.NET Core DI system selects the last registered one). -In addition, The `AccountController` will be removed from [`ApplicationModel`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.applicationmodels.applicationmodel.controllers) because it defines `ExposeServicesAttribute`. If you don't want to remove it, you can configure `AbpAspNetCoreMvcOptions`: +In addition, the `MyAccountController` will be removed from [`ApplicationModel`](https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.applicationmodels.applicationmodel.controllers) because it defines `ExposeServicesAttribute`. + +If `IncludeSelf = true` is specified, i.e. `[ExposeServices(typeof(AccountController), IncludeSelf = true)]`, then `AccountController` will be removed instead. This is useful for **extending** a controller. + +If you don't want to remove either controller, you can configure `AbpAspNetCoreMvcOptions`: ```csharp Configure(options => { - options.IgnoredControllersOnModelExclusion.AddIfNotContains(typeof(AccountController)); + options.IgnoredControllersOnModelExclusion.AddIfNotContains(typeof(MyAccountController)); }); ``` diff --git a/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md b/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md index 9587a111bf..3d99e1e3cf 100644 --- a/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md +++ b/docs/en/Distributed-Event-Bus-RabbitMQ-Integration.md @@ -90,7 +90,7 @@ You can use any of the [ConnectionFactry](http://rabbitmq.github.io/rabbitmq-dot **Example: Specify the connection port** -````csharp +````json { "RabbitMQ": { "Connections": { @@ -103,6 +103,26 @@ You can use any of the [ConnectionFactry](http://rabbitmq.github.io/rabbitmq-dot } ```` +If you need to connect to the RabbitMQ cluster, you can use the `;` character to separate the host names. + +**Example: Connect to the RabbitMQ cluster** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123;234.234.234.234" + } + }, + "EventBus": { + "ClientName": "MyClientName", + "ExchangeName": "MyExchangeName" + } + } +} +``` + ### The Options Classes `AbpRabbitMqOptions` and `AbpRabbitMqEventBusOptions` classes can be used to configure the connection strings and event bus options for the RabbitMQ. diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 7bc42b1fc9..627b55a476 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -103,7 +103,7 @@ Before starting to the UI development, we first want to prepare the localization Localization texts are located under the `Localization/BookStore` folder of the `Acme.BookStore.Domain.Shared` project: -![bookstore-localization-files](./images/bookstore-localization-files-v2.png) +![bookstore-localization-files](images/bookstore-localization-files-v2.png) Open the `en.json` (*the English translations*) file and change the content as below: @@ -157,7 +157,7 @@ It's time to create something visible and usable! Instead of classic MVC, we wil Create `Books` folder under the `Pages` folder of the `Acme.BookStore.Web` project. Add a new Razor Page by right clicking the Books folder then selecting **Add > Razor Page** menu item. Name it as `Index`: -![bookstore-add-index-page](./images/bookstore-add-index-page-v2.png) +![bookstore-add-index-page](images/bookstore-add-index-page-v2.png) Open the `Index.cshtml` and change the whole content as shown below: @@ -208,7 +208,7 @@ context.Menu.AddItem( Run the project, login to the application with the username `admin` and the password `1q2w3E*` and see the new menu item has been added to the main menu: -![bookstore-menu-items](./images/bookstore-new-menu-item.png) +![bookstore-menu-items](images/bookstore-new-menu-item.png) When you click to the Books menu item under the Book Store parent, you are being redirected to the new empty Books Page. @@ -250,7 +250,7 @@ Change the `Pages/Books/Index.cshtml` as following: Create an `Index.js` file under the `Pages/Books` folder: -![bookstore-index-js-file](./images/bookstore-index-js-file-v3.png) +![bookstore-index-js-file](images/bookstore-index-js-file-v3.png) The content of the file is shown below: @@ -344,8 +344,6 @@ It's time to create something visible and usable! There are some tools that we w - [Ng Bootstrap](https://ng-bootstrap.github.io/#/home) will be used as the UI component library. - [Ngx-Datatable](https://swimlane.gitbook.io/ngx-datatable/) will be used as the datatable library. -### BookModule - Run the following command line to create a new module, named `BookModule` in the root folder of the angular application: ```bash @@ -457,7 +455,7 @@ abp generate-proxy This command will create the following files under the `/src/app/proxy/books` folder: -![Generated files](./images/generated-proxies-3.png) +![Generated files](images/generated-proxies-3.png) ### BookComponent @@ -490,7 +488,7 @@ export class BookComponent implements OnInit { ``` * We imported and injected the generated `BookService`. -* We are using the [ListService](https://docs.abp.io/en/abp/latest/UI/Angular/List-Service), a utility service of the ABP Framework which provides easy pagination, sorting and searching. +* We are using the [ListService](../UI/Angular/List-Service.md), a utility service of the ABP Framework which provides easy pagination, sorting and searching. Open the `/src/app/book/book.component.html` and replace the content as below: @@ -531,7 +529,7 @@ Open the `/src/app/book/book.component.html` and replace the content as below: Now you can see the final result on your browser: -![Book list final result](./images/bookstore-book-list.png) +![Book list final result](images/bookstore-book-list.png) {{else if UI == "Blazor"}} diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index e58857ec89..ec326ddb65 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -48,13 +48,13 @@ This part is also recorded as a video tutorial and ** Localization key names are arbitrary and no forcing rule. But we prefer the convention used above. +> Localization key names are arbitrary and there is no forcing rule. But we prefer the convention used above. ### Permission Management UI diff --git a/docs/en/Tutorials/Part-6.md b/docs/en/Tutorials/Part-6.md index 69c6574520..d5df8133b7 100644 --- a/docs/en/Tutorials/Part-6.md +++ b/docs/en/Tutorials/Part-6.md @@ -124,7 +124,7 @@ Created this class inside the `Acme.BookStore.Domain.Shared` project since we wi ## AuthorManager: The Domain Service -`Author` constructor and `ChangeName` method is `internal`, so they can be usable only in the domain layer. Create an `AuthorManager` class in the `Authors` folder (namespace) of the `Acme.BookStore.Domain` project: +`Author` constructor and `ChangeName` methods are `internal`, so they can be used only in the domain layer. Create an `AuthorManager` class in the `Authors` folder (namespace) of the `Acme.BookStore.Domain` project: ````csharp using System; @@ -186,7 +186,7 @@ namespace Acme.BookStore.Authors * `AuthorManager` forces to create an author and change name of an author in a controlled way. The application layer (will be introduced later) will use these methods. -> **DDD tip**: Do not introduce domain service methods unless they are really needed and perform some core business rules. For this case, we needed to this service to be able to force the unique name constraint. +> **DDD tip**: Do not introduce domain service methods unless they are really needed and perform some core business rules. For this case, we needed this service to be able to force the unique name constraint. Both methods checks if there is already an author with the given name and throws a special business exception, `AuthorAlreadyExistsException`, defined in the `Acme.BookStore.Domain` project (in the `Authors` folder) as shown below: @@ -226,7 +226,7 @@ This is a unique string represents the error code thrown by your application and "BookStore:00001": "There is already an author with the same name: {name}" ```` -Whenever you throw an `AuthorAlreadyExistsException`, the end use will see a this message on the UI. +Whenever you throw an `AuthorAlreadyExistsException`, the end user will see a nice error message on the UI. ## IAuthorRepository diff --git a/docs/en/Tutorials/Part-9.md b/docs/en/Tutorials/Part-9.md index a1b4b03e21..c623cfcf46 100644 --- a/docs/en/Tutorials/Part-9.md +++ b/docs/en/Tutorials/Part-9.md @@ -843,8 +843,10 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the `Acme.BookStor ````xml @page "/authors" @using Acme.BookStore.Authors +@using Acme.BookStore.Localization @inherits BookStoreComponentBase @inject IAuthorAppService AuthorAppService +@inject AbpBlazorMessageLocalizerHelper LH @@ -917,68 +919,104 @@ Create a new Razor Component Page, `/Pages/Authors.razor`, in the `Acme.BookStor - - @L["NewAuthor"] - - - - - @L["Name"] - - - - @L["BirthDate"] - - - - @L["ShortBio"] - - - - - - - +
+ + @L["NewAuthor"] + + + + + + + @L["Name"] + + + + + + + + + @L["BirthDate"] + + + + + @L["ShortBio"] + + + + + + + + + + + + + +
- - @EditingAuthor.Name - - - - - @L["Name"] - - - - @L["BirthDate"] - - - - @L["ShortBio"] - - - - - - - +
+ + @EditingAuthor.Name + + + + + + + @L["Name"] + + + + + + + + + @L["BirthDate"] + + + + + @L["ShortBio"] + + + + + + + + + + + + + +
```` @@ -1025,6 +1063,10 @@ namespace Acme.BookStore.Blazor.Pages private Modal CreateAuthorModal { get; set; } private Modal EditAuthorModal { get; set; } + private Validations CreateValidationsRef; + + private Validations EditValidationsRef; + public Authors() { NewAuthor = new CreateAuthorDto(); @@ -1079,6 +1121,8 @@ namespace Acme.BookStore.Blazor.Pages private void OpenCreateAuthorModal() { + CreateValidationsRef.ClearAll(); + NewAuthor = new CreateAuthorDto(); CreateAuthorModal.Show(); } @@ -1090,6 +1134,8 @@ namespace Acme.BookStore.Blazor.Pages private void OpenEditAuthorModal(AuthorDto author) { + EditValidationsRef.ClearAll(); + EditingAuthorId = author.Id; EditingAuthor = ObjectMapper.Map(author); EditAuthorModal.Show(); @@ -1114,16 +1160,22 @@ namespace Acme.BookStore.Blazor.Pages private async Task CreateAuthorAsync() { - await AuthorAppService.CreateAsync(NewAuthor); - await GetAuthorsAsync(); - CreateAuthorModal.Hide(); + if (CreateValidationsRef.ValidateAll()) + { + await AuthorAppService.CreateAsync(NewAuthor); + await GetAuthorsAsync(); + CreateAuthorModal.Hide(); + } } private async Task UpdateAuthorAsync() { - await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); - await GetAuthorsAsync(); - EditAuthorModal.Hide(); + if (EditValidationsRef.ValidateAll()) + { + await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); + await GetAuthorsAsync(); + EditAuthorModal.Hide(); + } } } } diff --git a/docs/en/UI/Angular/Component-Replacement.md b/docs/en/UI/Angular/Component-Replacement.md index 54a1869c0e..0010a30a2f 100644 --- a/docs/en/UI/Angular/Component-Replacement.md +++ b/docs/en/UI/Angular/Component-Replacement.md @@ -546,4 +546,5 @@ The final UI looks like below: ## See Also +- [How Replaceable Components Work with Extensions](./How-Replaceable-Components-Work-with-Extensions.md) - [How to Replace PermissionManagementComponent](./Permission-Management-Component-Replacement.md) diff --git a/docs/en/UI/Angular/HTTP-Requests.md b/docs/en/UI/Angular/HTTP-Requests.md index ab1ac04097..aeb55578b8 100644 --- a/docs/en/UI/Angular/HTTP-Requests.md +++ b/docs/en/UI/Angular/HTTP-Requests.md @@ -27,13 +27,13 @@ An `HttpInterceptor` is able to catch `HttpErrorResponse`  and can be used for ## RestService -ABP core module has a utility service for HTTP requests: `RestService`. Unless explicitly configured otherwise, it catches HTTP errors and dispatches a `RestOccurError` action. This action is then captured by the `ErrorHandler` introduced by the `ThemeSharedModule`. Since you should already import this module in your app, when the `RestService` is used, all HTTP errors get automatically handled by deafult. +ABP core module has a utility service for HTTP requests: `RestService`. Unless explicitly configured otherwise, it catches HTTP errors and dispatches a `RestOccurError` action. This action is then captured by the `ErrorHandler` introduced by the `ThemeSharedModule`. Since you should already import this module in your app, when the `RestService` is used, all HTTP errors get automatically handled by default. ### Getting Started with RestService -In order to use the `RestService`, you must inject it in your class as a dependency. +In order to use the `RestService`, you must inject it in your class as a dependency. ```js import { RestService } from '@abp/ng.core'; @@ -200,6 +200,101 @@ getSomeCustomHeaderValue() { } ``` +You may find `Rest.Observe` enum [here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L10). -You may find `Rest.Observe` enum [here](https://github.com/abpframework/abp/blob/dev/npm/ng-packs/packages/core/src/lib/models/rest.ts#L10). +## HTTP Error Handling + +When the `RestService` is used, all HTTP errors are automatically handled by `ErrorHandler` which is a service that exposed by the `@abp/ng.theme.shared` package. + +### Custom HTTP Error Handler + +A custom HTTP error handler can be registered to an injection token named `HTTP_ERROR_HANDLER`. If a custom handler function is registered, the `ErrorHandler` executes that function. + +See an example: + +```js +// http-error-handler.ts +import { ContentProjectionService, PROJECTION_STRATEGY } from '@abp/ng.core'; +import { ToasterService } from '@abp/ng.theme.shared'; +import { HttpErrorResponse } from '@angular/common/http'; +import { Injector } from '@angular/core'; +import { throwError } from 'rxjs'; +import { Error404Component } from './error404/error404.component'; + +export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) { + if (httpError.status === 400) { + const toaster = injector.get(ToasterService); + toaster.error(httpError.error?.error?.message || 'Bad request!', '400'); + return; + } + + if (httpError.status === 404) { + const contentProjection = injector.get(ContentProjectionService); + contentProjection.projectContent(PROJECTION_STRATEGY.AppendComponentToBody(Error404Component)); + return; + } + + return throwError(httpError); +} + +// app.module.ts +import { Error404Component } from './error404/error404.component'; +import { handleHttpErrors } from './http-error-handling'; +import { HTTP_ERROR_HANDLER, ... } from '@abp/ng.theme.shared'; + +@NgModule({ + // ... + providers: [ + // ... + { provide: HTTP_ERROR_HANDLER, useValue: handleHttpErrors } + ], + declarations: [ + //... + Error404Component], +}) +export class AppModule {} +``` + +In the example above: + + - Created a function named `handleHttpErrors` and defined as value of the `HTTP_ERROR_HANDLER` provider in app.module. After this, the function executes when an HTTP error occurs. + - 400 bad request errors is handled. When a 400 error occurs, backend error message will be displayed as shown below: + + ![custom-error-handler-toaster-message](images/custom-error-handler-toaster-message.jpg) + + - 404 not found errors is handled. When a 404 error occurs, `Error404Component` will be appended to the `` as shown below: + +![custom-error-handler-404-component](images/custom-error-handler-404-component.jpg) + + - Since `throwError(httpError)` is returned at bottom of the `handleHttpErrors`, the `ErrorHandler` will handle the HTTP errors except 400 and 404 errors. + + +**Note 1:** If you put `return` to next line of handling an error, default error handling will not work for that error. + +```js +export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) { + if (httpError.status === 403) { + // handle 403 errors here + return; // put return to skip default error handling + } +} +``` + +**Note 2:** If you put `return throwError(httpError)`, default error handling will work. + - `throwError` is a function. It can be imported from `rxjs`. + - `httpError` is the second parameter of the error handler function which is registered to the `HTTP_ERROR_HANDLER` provider. Type of the `httpError` is `HttpErrorResponse`. + +```js +import { throwError } from 'rxjs'; + +export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) { + if (httpError.status === 500) { + // handle 500 errors here + return; + } + + // you can return the throwError(httpError) at bottom of the function to run the default handler of ABP for HTTP errors that you didn't handle above. + return throwError(httpError) +} +``` diff --git a/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md new file mode 100644 index 0000000000..d942975646 --- /dev/null +++ b/docs/en/UI/Angular/How-Replaceable-Components-Work-with-Extensions.md @@ -0,0 +1,288 @@ +# How Replaceable Components Work with Extensions + +Additional UI extensibility points ([Entity action extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Entity-Action-Extensions), [data table column extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Data-Table-Column-Extensions), [page toolbar extensions](https://docs.abp.io/en/abp/latest/UI/Angular/Page-Toolbar-Extensions) and others) are used in ABP pages to allow to control entity actions, table columns and page toolbar of a page. If you replace a page, you need to apply some configurations to be able to work extension components in your component. Let's see how to do this by replacing the roles page. + +Create a new module called `MyRolesModule`: + +```bash +yarn ng generate module my-roles --module app +``` + +Create a new component called `MyRolesComponent`: + +```bash +yarn ng generate component my-roles/my-roles --flat --export +``` + +Open the generated `src/app/my-roles/my-roles.component.ts` file and replace its content with the following: + +```js +import { ListService, PagedAndSortedResultRequestDto } from '@abp/ng.core'; +import { + CreateRole, + DeleteRole, + eIdentityComponents, + GetRoleById, + GetRoles, + IdentityRoleDto, + IdentityState, + RolesComponent, + UpdateRole, +} from '@abp/ng.identity'; +import { ePermissionManagementComponents } from '@abp/ng.permission-management'; +import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared'; +import { + EXTENSIONS_IDENTIFIER, + FormPropData, + generateFormFromProps, +} from '@abp/ng.theme.shared/extensions'; +import { Component, Injector, OnInit } from '@angular/core'; +import { FormGroup } from '@angular/forms'; +import { Select, Store } from '@ngxs/store'; +import { Observable } from 'rxjs'; +import { finalize, pluck } from 'rxjs/operators'; + +@Component({ + selector: 'app-my-roles', + templateUrl: './my-roles.component.html', + providers: [ + ListService, + { + provide: EXTENSIONS_IDENTIFIER, + useValue: eIdentityComponents.Roles, + }, + { provide: RolesComponent, useExisting: MyRolesComponent }, + ], +}) +export class MyRolesComponent implements OnInit { + @Select(IdentityState.getRoles) + data$: Observable; + + @Select(IdentityState.getRolesTotalCount) + totalCount$: Observable; + + form: FormGroup; + + selected: IdentityRoleDto; + + isModalVisible: boolean; + + visiblePermissions = false; + + providerKey: string; + + modalBusy = false; + + permissionManagementKey = ePermissionManagementComponents.PermissionManagement; + + onVisiblePermissionChange = event => { + this.visiblePermissions = event; + }; + + constructor( + public readonly list: ListService, + protected confirmationService: ConfirmationService, + protected store: Store, + protected injector: Injector + ) {} + + ngOnInit() { + this.hookToQuery(); + } + + buildForm() { + const data = new FormPropData(this.injector, this.selected); + this.form = generateFormFromProps(data); + } + + openModal() { + this.buildForm(); + this.isModalVisible = true; + } + + add() { + this.selected = {} as IdentityRoleDto; + this.openModal(); + } + + edit(id: string) { + this.store + .dispatch(new GetRoleById(id)) + .pipe(pluck('IdentityState', 'selectedRole')) + .subscribe(selectedRole => { + this.selected = selectedRole; + this.openModal(); + }); + } + + save() { + if (!this.form.valid) return; + this.modalBusy = true; + + this.store + .dispatch( + this.selected.id + ? new UpdateRole({ ...this.selected, ...this.form.value, id: this.selected.id }) + : new CreateRole(this.form.value) + ) + .pipe(finalize(() => (this.modalBusy = false))) + .subscribe(() => { + this.isModalVisible = false; + this.list.get(); + }); + } + + delete(id: string, name: string) { + this.confirmationService + .warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', { + messageLocalizationParams: [name], + }) + .subscribe((status: Confirmation.Status) => { + if (status === Confirmation.Status.confirm) { + this.store.dispatch(new DeleteRole(id)).subscribe(() => this.list.get()); + } + }); + } + + private hookToQuery() { + this.list.hookToQuery(query => this.store.dispatch(new GetRoles(query))).subscribe(); + } + + openPermissionsModal(providerKey: string) { + this.providerKey = providerKey; + setTimeout(() => { + this.visiblePermissions = true; + }, 0); + } + + sort(data) { + const { prop, dir } = data.sorts[0]; + this.list.sortKey = prop; + this.list.sortOrder = dir; + } +} +``` + +```js + { + provide: EXTENSIONS_IDENTIFIER, + useValue: eIdentityComponents.Roles, + }, + { + provide: RolesComponent, + useExisting: MyRolesComponent + } +``` + +The two providers we have defined in `MyRolesComponent` are required for the extension components to work correctly. + +* With the first provider, we defined the extension identifier for using `RolesComponent`'s extension actions in the `MyRolesComponent`. +* With the second provider, we have replaced the `RolesComponent` injection with the `MyRolesComponent`. Default extension actions of the `RolesComponent` try to get `RolesComponent` instance. However, the actions can get the `MyRolesComponent` instance after defining the second provider. + +Open the generated `src/app/my-role/my-role.component.html` file and replace its content with the following: + +```html +
+
+
+
+
My Roles
+
+
+ +
+
+
+ +
+ +
+
+ + + +

{%{{{ (selected?.id ? 'AbpIdentity::Edit' : 'AbpIdentity::NewRole') | abpLocalization }}}%}

+
+ + +
+ +
+
+ + + + {%{{{ + 'AbpIdentity::Save' | abpLocalization + }}}%} + +
+ + + +``` + +We have added the `abp-page-toolbar`, `abp-extensible-table`, and `abp-extensible-form` extension components to template of the `MyRolesComponent`. + +You should import the required modules for the `MyRolesComponent` to `MyRolesModule`. Open the `src/my-roles/my-roles.module.ts` file and replace the content with the following: + +```js +import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions'; +import { NgModule } from '@angular/core'; +import { SharedModule } from '../shared/shared.module'; +import { MyRolesComponent } from './my-roles.component'; +import { PermissionManagementModule } from '@abp/ng.permission-management'; + +@NgModule({ + declarations: [MyRolesComponent], + imports: [SharedModule, UiExtensionsModule, PermissionManagementModule], + exports: [MyRolesComponent], +}) +export class MyRolesModule {} +``` + +- `UiExtensionsModule` imported to be able to use the extension components in your component. +- `PermissionManagementModule` imported to be able to use the `abp-permission-*management` in your component. + +As the last step, it is needs to be replaced the `RolesComponent` with the `MyRolesComponent`. Open the `app.component.ts` and modify its content as shown below: + +```js +import { ReplaceableComponentsService } from '@abp/ng.core'; +import { eIdentityComponents } from '@abp/ng.identity'; +import { MyRolesComponent } from './my-roles/my-roles.component'; + +@Component(/* component metadata */) +export class AppComponent { + constructor(private replaceableComponents: ReplaceableComponentsService) { + this.replaceableComponents.add({ component: MyRolesComponent, key: eIdentityComponents.Roles }); + } +} +``` + +After the steps above, the `RolesComponent` has been successfully replaced with the `MyRolesComponent`. When you navigate to the `/identity/roles` URL, you will see the `MyRolesComponent`'s template and see the extension components working correctly. + +![my-roles-component-with-extensions](./images/my-roles-component-with-extensions.jpg) + +![my-roles-component-form-extensions](./images/my-roles-component-form-extensions.jpg) diff --git a/docs/en/UI/Angular/Multi-Tenancy.md b/docs/en/UI/Angular/Multi-Tenancy.md index 7622db6de0..cded16e7d4 100644 --- a/docs/en/UI/Angular/Multi-Tenancy.md +++ b/docs/en/UI/Angular/Multi-Tenancy.md @@ -91,10 +91,10 @@ export const environment = { > **Important Note:** The `application.baseUrl` and the `{0}` placeholder in the value of the `baseUrl` property are required to be able to get tenant from running URL. Other placeholders in API URLs are optional. -After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `ConfigState` on app initialization as follows: +After the configuration above, if your app runs on the `mytenant1.mydomain.com`, the app will get tenant name as **mytenant1** and replace the environment object in `EnvironmentService` on app initialization as follows: ```js -// environment object in ConfigState +// environment object in EnvironmentService { //... diff --git a/docs/en/UI/Angular/Router-Events.md b/docs/en/UI/Angular/Router-Events.md index 011d405b22..1d36c3a211 100644 --- a/docs/en/UI/Angular/Router-Events.md +++ b/docs/en/UI/Angular/Router-Events.md @@ -1,6 +1,6 @@ # Router Events Simplified -`RouterEvents` is a utility service to provide an easy implementation for one of the most frequent needs in Angular templates: `TrackByFunction`. Please see [this page in Angular docs](https://angular.io/guide/template-syntax#ngfor-with-trackby) for its purpose. +`RouterEvents` is a utility service for filtering specific router events and reacting to them. Please see [this page in Angular docs](https://angular.io/api/router/Event) for available router events. diff --git a/docs/en/UI/Angular/Service-Proxies.md b/docs/en/UI/Angular/Service-Proxies.md index 8f6b1c4d60..3a10f1b6e8 100644 --- a/docs/en/UI/Angular/Service-Proxies.md +++ b/docs/en/UI/Angular/Service-Proxies.md @@ -137,3 +137,7 @@ export class BookComponent implements OnInit { ``` > Please [see this article](https://github.com/abpframework/abp/blob/dev/docs/en/Blog-Posts/2020-09-07%20Angular-Service-Proxies/POST.md) to learn more about service proxies. + +### Known Limitations + +When you run a project on Visual Studio using IIS Express as the web server, there will be no remote access to your endpoints. This is the default behavior of IIS Express since it explicitly protects you from the security risks of running over the network. However, that will cause the proxy generator to fail because it needs a response from the `/api/abp/api-definition` endpoint. You may serve your endpoints via Kestrel to avoid this. Running `dotnet run` in your command line (at your project folder) will do that for you. diff --git a/docs/en/UI/Angular/images/custom-error-handler-404-component.jpg b/docs/en/UI/Angular/images/custom-error-handler-404-component.jpg new file mode 100644 index 0000000000..e4b2f15c50 Binary files /dev/null and b/docs/en/UI/Angular/images/custom-error-handler-404-component.jpg differ diff --git a/docs/en/UI/Angular/images/custom-error-handler-toaster-message.jpg b/docs/en/UI/Angular/images/custom-error-handler-toaster-message.jpg new file mode 100644 index 0000000000..c1cced8237 Binary files /dev/null and b/docs/en/UI/Angular/images/custom-error-handler-toaster-message.jpg differ diff --git a/docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg b/docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg new file mode 100644 index 0000000000..a686d26edc Binary files /dev/null and b/docs/en/UI/Angular/images/my-roles-component-form-extensions.jpg differ diff --git a/docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg b/docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg new file mode 100644 index 0000000000..1ac82c40b7 Binary files /dev/null and b/docs/en/UI/Angular/images/my-roles-component-with-extensions.jpg differ diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 7fd7762ad4..efca73a484 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -859,6 +859,27 @@ { "text": "Custom Setting Page", "path": "UI/Angular/Custom-Setting-Page.md" + }, + { + "text": "Extensions", + "items": [ + { + "text": "Entity Action Extensions", + "path": "UI/Angular/Entity-Action-Extensions.md" + }, + { + "text": "Data Table Column Extensions", + "path": "UI/Angular/Data-Table-Column-Extensions.md" + }, + { + "text": "Page Toolbar Extensions", + "path": "UI/Angular/Page-Toolbar-Extensions.md" + }, + { + "text": "Dynamic Form Extensions", + "path": "UI/Angular/Dynamic-Form-Extensions.md" + } + ] } ] } diff --git a/docs/zh-Hans/Background-Jobs-RabbitMq.md b/docs/zh-Hans/Background-Jobs-RabbitMq.md index 979beec872..0f9fb21d8a 100644 --- a/docs/zh-Hans/Background-Jobs-RabbitMq.md +++ b/docs/zh-Hans/Background-Jobs-RabbitMq.md @@ -1,3 +1,153 @@ -# RabbitMQ Background Job Manager +# RabbitMQ 后台作业管理 -待添加 \ No newline at end of file +RabbitMQ 是一个标准的消息队列中间件,虽然它常用于消息传递/分布式事件,但也非常适合存储 FIFO(先进先出) 顺序的后台作业. + +ABP Framework 提供了 [Volo.Abp.BackgroundJobs.RabbitMQ](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.RabbitMQ) 包,将使用 RabbitMQ 来执行后台作业. + +> 参阅 [后台作业文档](Background-Jobs.md) 学习如何使用后台作业系统,本文只介绍了如何安装和配置 RabbitMQ 集成. + +## 安装 + +使用 ABP CLI 将 [Volo.Abp.BackgroundJobs.RabbitMQ](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.RabbitMQ) 包添加到你的项目: + +- 如果之前没有安装过 [ABP CLI](https://docs.abp.io/en/abp/latest/CLI),请先安装它. +- 跳转到待安装后台作业管理的项目目录中(包含 `.csproj` 文件的目录),打开终端管理器. +- 执行 `abp add-package Volo.Abp.BackgroundJobs.RabbitMQ` 命令. + +如果你想要手动安装,请先用 NuGet 包管理器安装 [Volo.Abp.BackgroundJobs.RabbitMQ](https://www.nuget.org/packages/Volo.Abp.BackgroundJobs.RabbitMQ) 包到指定项目,之后使在你的 [模块](Module-Development-Basics.md) 上面添加 `[DependsOn(typeof(AbpBackgroundJobsRabbitMqModule))]` 配置依赖. + +## 配置 + +### 默认配置 + +默认配置将会使用标准端口和主机名(localhost)连接到 RabbitMQ 服务,**你不需要进行额外配置**. + +### RabbitMQ 连接 + +你可以使用 ASP.NET Core 的 [标准配置系统](Configuration.md) 对 RabbitMQ 进行详细配置,比如 `appsettings.json` 或者是 [选项类](Options.md). + +#### 通过 `appsettings.json` 文件配置 + +这种方式是配置 RabbitMQ 连接最简单的方式,你可以使用其他的配置源(例如环境变量).这些强大的功能都是由 [ASP.NET Core](https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/configuration/) 提供的支持. + +**示例: 配置默认的 RabbitMQ 连接** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123", + "Port": "5672" + } + } + } +} +``` + +你可以在配置文件使用所有 [ConnectionFactry](http://rabbitmq.github.io/rabbitmq-dotnet-client/api/RabbitMQ.Client.ConnectionFactory.html#properties) 的属性,关于这些属性的具体含义,可以查看 RabbitMQ 的 [官方文档](https://www.rabbitmq.com/dotnet-api-guide.html#exchanges-and-queues). + +目前我们允许定义多个连接,多连接的情况适用于不同的后台作业,具体配置信息可以参考下面的 RabbitMQ 后台作业配置说明. + +**示例: 定义两个 RabbitMQ 连接** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123" + }, + "SecondConnection": { + "HostName": "321.321.321.321" + } + } + } +} +``` + +如果需要连接到 RabbitMQ 集群,你可以指定多个 HostName. + +**示例: 连接到 RabbitMQ 集群** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123;234.234.234.234" + } + }, + "EventBus": { + "ClientName": "MyClientName", + "ExchangeName": "MyExchangeName" + } + } +} +``` + +#### 使用选项类 + +`AbpRabbitMqOptions` 类型用于配置 RabbitMQ 的连接字符串,你可以在 [模块](Module-Development-Basics.md) 的 `ConfigureService` 方法中进行配置. + +**示例: 配置 RabbitMQ 连接** + +```csharp +Configure(options => +{ + options.Connections.Default.UserName = "user"; + options.Connections.Default.Password = "pass"; + options.Connections.Default.HostName = "123.123.123.123"; + options.Connections.Default.Port = 5672; +}); +``` + +关于选项类,可以结合 `appsettings.json` 文件一起使用.针对同一个属性,在选项类里面对该值进行了设定,会覆盖掉 `appsettings.json` 的值. + +### RabbitMQ 后台作业配置说明 + +#### 后台作业队列的名称 + +默认情况下,每个后台作业都会使用一个单独的队列,结合标准前缀和作业名称来构造一个完整的队列名称.默认的前缀为 `AbpBackgroundJobs`,所以有一个作业的名称是 `EmailSending` 的话,在 RabbitMQ 的队列名称就是 `AbpBackgroundJobs.EmailSending`. + +> 在后台作业的参数类上,可以使用 `BackgroundJobName` 特性指定后台作业的名称.否则的话,后台作业的名称将会是后台作业类的全名(也包含命名空间). + +#### 后台作业使用的连接 + +默认情况下,后台作业都会使用 `Default` 作为默认连接. + +#### 自定义 + +`AbpRabbitMqBackgroundJobOptions` 可以自定义队列名和作业使用的 RabbitMQ 连接. + +**示例: ** + +```csharp +Configure(options => +{ + options.DefaultQueueNamePrefix = "my_app_jobs."; + options.JobQueues[typeof(EmailSendingArgs)] = + new JobQueueConfiguration( + typeof(EmailSendingArgs), + queueName: "my_app_jobs.emails", + connectionName: "SecondConnection" + ); +}); +``` + +- 这个示例将默认的队列名前缀设置为 `my_app_jobs.`,如果多个项目都使用的同一个 RabbitMQ 服务,设置不同的前缀可以避免执行其他项目的后台作业. +- 这里还设置了 `EmailSendingArgs` 绑定的 RabbitMQ 连接. + +`JobQueueConfiguration` 类的构造函数中,还有一些其他的可选参数. + +- `queueName`: 指定后台作业对应的队列名称(全名). +- `connectionName`: 后台作业对应的 RabbitMQ 连接名称,默认是 `Default`. +- `durable`: 可选参数,默认为 `true`. +- `exclusive`: 可选参数,默认为 `false`. +- `autoDelete`: 可选参数,默认为 `false`. + +如果你想要更多地了解 `durable`,`exclusive`,`autoDelete` 的用法,请阅读 RabbitMQ 提供的文档. + +## 另请参阅 + +- [后台作业](Background-Jobs.md) diff --git a/docs/zh-Hans/Blob-Storing-Aliyun.md b/docs/zh-Hans/Blob-Storing-Aliyun.md index c8a1e68bc7..eb67fdbab5 100644 --- a/docs/zh-Hans/Blob-Storing-Aliyun.md +++ b/docs/zh-Hans/Blob-Storing-Aliyun.md @@ -36,7 +36,7 @@ Configure(options => aliyun.Policy = "policy"; aliyun.DurationSeconds = "expiration date"; aliyun.ContainerName = "your aliyun container name"; - aliyun.CreateContainerIfNotExists = false; + aliyun.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/zh-Hans/Blob-Storing-Aws.md b/docs/zh-Hans/Blob-Storing-Aws.md index 7bfb998297..fc98c5a948 100644 --- a/docs/zh-Hans/Blob-Storing-Aws.md +++ b/docs/zh-Hans/Blob-Storing-Aws.md @@ -39,7 +39,7 @@ Configure(options => Aws.Policy = "policy"; Aws.DurationSeconds = "expiration date"; Aws.ContainerName = "your Aws container name"; - Aws.CreateContainerIfNotExists = false; + Aws.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/zh-Hans/Blob-Storing-Azure.md b/docs/zh-Hans/Blob-Storing-Azure.md index 8eecc1fde3..e1ed3a6d4e 100644 --- a/docs/zh-Hans/Blob-Storing-Azure.md +++ b/docs/zh-Hans/Blob-Storing-Azure.md @@ -29,7 +29,7 @@ Configure(options => { azure.ConnectionString = "your azure connection string"; azure.ContainerName = "your azure container name"; - azure.CreateContainerIfNotExists = false; + azure.CreateContainerIfNotExists = true; }); }); }); diff --git a/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md b/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md index 2a1810e309..ab7cb68bd7 100644 --- a/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md +++ b/docs/zh-Hans/Distributed-Event-Bus-RabbitMQ-Integration.md @@ -103,6 +103,26 @@ } ```` +如果需要连接到 RabbitMQ 集群,你可以指定多个 HostName。 + +**示例: 连接到 RabbitMQ 集群** + +```json +{ + "RabbitMQ": { + "Connections": { + "Default": { + "HostName": "123.123.123.123;234.234.234.234" + } + }, + "EventBus": { + "ClientName": "MyClientName", + "ExchangeName": "MyExchangeName" + } + } +} +``` + ### 选项类 `AbpRabbitMqOptions` 和 `AbpRabbitMqEventBusOptions` 类用于配置RabbitMQ的连接字符串和事件总线选项. diff --git a/docs/zh-Hans/Repositories.md b/docs/zh-Hans/Repositories.md index 79186b79da..857df51439 100644 --- a/docs/zh-Hans/Repositories.md +++ b/docs/zh-Hans/Repositories.md @@ -150,7 +150,7 @@ var people = _personRepository * 这里异步方法**不是标准LINQ方法**,它们定义在[Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore)Nuget包中. * 标准模板应用层与领域层**不引用**EF Core 包以实现数据库提供程序独立. -根据你的需求和开发模式,你可以根据以下选项使用异步方法.s +根据你的需求和开发模式,你可以根据以下选项使用异步方法. > 强烈建议使用异步方法! 在执行数据库查询时不要使用同步LINQ方法,以便能够开发可伸缩的应用程序. diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 619d090595..fcbf653545 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -375,6 +375,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Compone EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server", "src\Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server\Volo.Abp.AspNetCore.Components.UI.BasicTheme.Server.csproj", "{F35E5CFC-569F-4D7D-A30F-DD8AE97FEC5A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.Aliyun", "src\Volo.Abp.Sms.Aliyun\Volo.Abp.Sms.Aliyun.csproj", "{ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Sms.Aliyun.Tests", "test\Volo.Abp.Sms.Aliyun.Tests\Volo.Abp.Sms.Aliyun.Tests.csproj", "{DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -1117,6 +1121,14 @@ Global {F35E5CFC-569F-4D7D-A30F-DD8AE97FEC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU {F35E5CFC-569F-4D7D-A30F-DD8AE97FEC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU {F35E5CFC-569F-4D7D-A30F-DD8AE97FEC5A}.Release|Any CPU.Build.0 = Release|Any CPU + {ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30}.Release|Any CPU.Build.0 = Release|Any CPU + {DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1306,6 +1318,8 @@ Global {8FDB3BF7-AD89-43F6-8DEB-C3E29B8801FE} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {41743609-6CDC-46F7-8C83-BCFBA5555AC0} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {F35E5CFC-569F-4D7D-A30F-DD8AE97FEC5A} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {ACFBA3FB-18CE-4655-9D14-1F1F5C3DFC30} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {DADEA538-3CA1-4ADE-A7E6-EF77A0CE4401} = {447C8A77-E5F0-4538-8687-7383196D04EA} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5} diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor index 18ebfbd4ba..eebfb501a5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor @@ -1,11 +1,14 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Authentication +@using Microsoft.Extensions.Localization @using Volo.Abp.Users @using Volo.Abp.MultiTenancy +@using global::Localization.Resources.AbpUi @inject ICurrentUser CurrentUser @inject ICurrentTenant CurrentTenant @inject IJSRuntime JsRuntime @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager +@inject IStringLocalizer UiLocalizer @@ -28,12 +31,12 @@ } } - Logout + @UiLocalizer["Logout"] -
Log in + @UiLocalizer["Login"] @code{ diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor index f9e47c4c27..d6067021ab 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor @@ -10,14 +10,12 @@ if (MenuItem.Url != null) { - @if (MenuItem.Icon != null) - { - if (MenuItem.Icon.StartsWith("fa")) - { - - } - } - @MenuItem.DisplayName + + + + + @MenuItem.DisplayName + } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs index e788c612cf..e2e826445f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo/Abp/AspNetCore/Mvc/UI/Packages/TuiEditor/TuiEditorScriptContributor.cs @@ -16,6 +16,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Packages.TuiEditor { public override void ConfigureBundle(BundleConfigurationContext context) { + context.Files.AddIfNotContains("/libs/tui-editor/tui-editor-jquery-patch.js"); context.Files.AddIfNotContains("/libs/to-mark/to-mark.min.js"); if (context.FileProvider.GetFileInfo("/libs/tui-code-snippet/tui-code-snippet.min.js").Exists) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarItem.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarItem.cs index 9b6ef4becb..4676202c24 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarItem.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarItem.cs @@ -14,10 +14,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars public int Order { get; set; } - public ToolbarItem([NotNull] Type componentType, int order = 0) + [CanBeNull] + public string RequiredPermissionName { get; set; } + + public ToolbarItem([NotNull] Type componentType, int order = 0, string requiredPermissionName = null) { Order = order; ComponentType = Check.NotNull(componentType, nameof(componentType)); + RequiredPermissionName = requiredPermissionName; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs index f1ac30779a..2e97cebecb 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Toolbars/ToolbarManager.cs @@ -1,8 +1,11 @@ using System; +using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Volo.Abp.AspNetCore.Mvc.UI.Theming; +using Volo.Abp.Authorization.Permissions; using Volo.Abp.DependencyInjection; namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars @@ -14,7 +17,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars protected IServiceProvider ServiceProvider { get; } public ToolbarManager( - IOptions options, + IOptions options, IServiceProvider serviceProvider, IThemeManager themeManager) { @@ -35,9 +38,33 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Toolbars { await contributor.ConfigureToolbarAsync(context); } + + await CheckPermissionsAsync(scope.ServiceProvider, toolbar); } return toolbar; } + + protected virtual async Task CheckPermissionsAsync(IServiceProvider serviceProvider, Toolbar toolbar) + { + var requiredPermissionItems = toolbar.Items.Where(x => !x.RequiredPermissionName.IsNullOrWhiteSpace()).ToList(); + + if (requiredPermissionItems.Any()) + { + var permissionChecker = serviceProvider.GetRequiredService(); + var grantResult = await permissionChecker.IsGrantedAsync(requiredPermissionItems.Select(x => x.RequiredPermissionName).Distinct().ToArray()); + + var toBeDeleted = new HashSet(); + foreach (var item in requiredPermissionItems) + { + if (grantResult.Result[item.RequiredPermissionName!] != PermissionGrantResult.Granted) + { + toBeDeleted.Add(item); + } + } + + toolbar.Items.RemoveAll(toBeDeleted.Contains); + } + } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj index ad0066db55..a379c8057d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj @@ -15,7 +15,7 @@ - + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs index ae09573d60..1a017e9925 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpRemoteServiceApiDescriptionProvider.cs @@ -3,6 +3,7 @@ using System.Linq; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Abstractions; using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.AspNetCore.Mvc.ModelBinding; using Microsoft.Extensions.Options; @@ -19,7 +20,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring public AbpRemoteServiceApiDescriptionProvider( IModelMetadataProvider modelMetadataProvider, - IOptions mvcOptionsAccessor, + IOptions mvcOptionsAccessor, IOptions optionsAccessor) { _modelMetadataProvider = modelMetadataProvider; @@ -41,7 +42,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring { foreach (var apiResponseType in GetApiResponseTypes()) { - foreach (var result in context.Results.Where(x => IsRemoteService(x.ActionDescriptor))) + foreach (var result in context.Results.Where(IsRemoteService)) { var actionProducesResponseTypeAttributes = ReflectionHelper.GetAttributesOfMemberOrDeclaringType( @@ -62,7 +63,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring foreach (var apiResponse in _options.SupportedResponseTypes) { apiResponse.ModelMetadata = _modelMetadataProvider.GetMetadataForType(apiResponse.Type); - + foreach (var responseTypeMetadataProvider in _mvcOptions.OutputFormatters.OfType()) { var formatterSupportedContentTypes = responseTypeMetadataProvider.GetSupportedContentTypes(null, apiResponse.Type); @@ -85,10 +86,29 @@ namespace Volo.Abp.AspNetCore.Mvc.ApiExploring return _options.SupportedResponseTypes; } - protected virtual bool IsRemoteService(ActionDescriptor actionDescriptor) + protected virtual bool IsRemoteService(ApiDescription actionDescriptor) { - var remoteServiceAttr = ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(actionDescriptor.GetMethodInfo()); - return remoteServiceAttr != null && remoteServiceAttr.IsEnabled; + if (actionDescriptor.ActionDescriptor is ControllerActionDescriptor controllerActionDescriptor) + { + var remoteServiceAttr = ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(controllerActionDescriptor.MethodInfo); + if (remoteServiceAttr != null && remoteServiceAttr.IsEnabled) + { + return true; + } + + remoteServiceAttr = ReflectionHelper.GetSingleAttributeOfMemberOrDeclaringTypeOrDefault(controllerActionDescriptor.ControllerTypeInfo); + if (remoteServiceAttr != null && remoteServiceAttr.IsEnabled) + { + return true; + } + + if (typeof(IRemoteService).IsAssignableFrom(controllerActionDescriptor.ControllerTypeInfo)) + { + return true; + } + } + + return false; } } -} \ No newline at end of file +} diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs index 135b506e69..ff7f4913a8 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProvider.cs @@ -84,7 +84,6 @@ namespace Volo.Abp.AspNetCore.Mvc ); var controllerModel = moduleModel.GetOrAddController( - controllerType.FullName, _options.ControllerNameGenerator(controllerType, setting), controllerType, _modelOptions.IgnoredInterfaces @@ -272,6 +271,7 @@ namespace Volo.Abp.AspNetCore.Mvc actionModel.AddParameter(ParameterApiDescriptionModel.Create( parameterDescription.Name, + _options.ApiParameterNameGenerator?.Invoke(parameterDescription), matchedMethodParamName, parameterDescription.Type, parameterDescription.RouteInfo?.IsOptional ?? false, diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProviderOptions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProviderOptions.cs index 4cd607e07a..f807efcfdf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProviderOptions.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AspNetCoreApiDescriptionModelProviderOptions.cs @@ -2,6 +2,9 @@ using System.Linq; using System.Reflection; using System.Text; +using System.Text.Json.Serialization; +using Microsoft.AspNetCore.Mvc.ApiExplorer; +using Microsoft.AspNetCore.Mvc.ModelBinding.Metadata; using Volo.Abp.Application.Services; using Volo.Abp.AspNetCore.Mvc.Conventions; @@ -13,6 +16,8 @@ namespace Volo.Abp.AspNetCore.Mvc public Func ActionNameGenerator { get; set; } + public Func ApiParameterNameGenerator { get; set; } + public AspNetCoreApiDescriptionModelProviderOptions() { ControllerNameGenerator = (controllerType, setting) => @@ -52,6 +57,28 @@ namespace Volo.Abp.AspNetCore.Mvc return methodNameBuilder.ToString(); }; + + ApiParameterNameGenerator = (apiParameterDescription) => + { + if (apiParameterDescription.ModelMetadata is DefaultModelMetadata defaultModelMetadata) + { + var jsonPropertyNameAttribute = (System.Text.Json.Serialization.JsonPropertyNameAttribute) + defaultModelMetadata?.Attributes?.PropertyAttributes?.FirstOrDefault(x => x is System.Text.Json.Serialization.JsonPropertyNameAttribute); + if (jsonPropertyNameAttribute != null) + { + return jsonPropertyNameAttribute.Name; + } + + var jsonPropertyAttribute = (Newtonsoft.Json.JsonPropertyAttribute) + defaultModelMetadata?.Attributes?.PropertyAttributes?.FirstOrDefault(x => x is Newtonsoft.Json.JsonPropertyAttribute); + if (jsonPropertyAttribute != null) + { + return jsonPropertyAttribute.PropertyName; + } + } + + return null; + }; } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs index 4d1490ec40..996e495588 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs @@ -73,7 +73,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions protected virtual void RemoveDuplicateControllers(ApplicationModel application) { - var derivedControllerModels = new List(); + var controllerModelsToRemove = new List(); foreach (var controllerModel in application.Controllers) { @@ -87,19 +87,42 @@ namespace Volo.Abp.AspNetCore.Mvc.Conventions continue; } + var exposeServicesAttr = ReflectionHelper.GetSingleAttributeOrDefault(controllerModel.ControllerType); + if (exposeServicesAttr.IncludeSelf) + { + var exposedControllerModels = application.Controllers + .Where(cm => exposeServicesAttr.ServiceTypes.Contains(cm.ControllerType)) + .ToArray(); + + controllerModelsToRemove.AddRange(exposedControllerModels); + Logger.LogInformation($"Removing the controller{(exposedControllerModels.Length > 1 ? "s" : "")} {exposeServicesAttr.ServiceTypes.Select(c => c.AssemblyQualifiedName).JoinAsString(", ")} from the application model since {(exposedControllerModels.Length > 1 ? "they are" : "it is")} replaced by the controller: {controllerModel.ControllerType.AssemblyQualifiedName}"); + continue; + } + var baseControllerTypes = controllerModel.ControllerType .GetBaseClasses(typeof(Controller), includeObject: false) .Where(t => !t.IsAbstract) .ToArray(); - if (baseControllerTypes.Length > 0) + if (baseControllerTypes.Length == 0) { - derivedControllerModels.Add(controllerModel); - Logger.LogInformation($"Removing the controller {controllerModel.ControllerType.AssemblyQualifiedName} from the application model since it replaces the controller(s): {baseControllerTypes.Select(c => c.AssemblyQualifiedName).JoinAsString(", ")}"); + continue; } + + var baseControllerModels = application.Controllers + .Where(cm => baseControllerTypes.Contains(cm.ControllerType)) + .ToArray(); + + if (baseControllerModels.Length == 0) + { + continue; + } + + controllerModelsToRemove.Add(controllerModel); + Logger.LogInformation($"Removing the controller {controllerModel.ControllerType.AssemblyQualifiedName} from the application model since it replaces the controller(s): {baseControllerTypes.Select(c => c.AssemblyQualifiedName).JoinAsString(", ")}"); } - application.Controllers.RemoveAll(derivedControllerModels); + application.Controllers.RemoveAll(controllerModelsToRemove); } protected virtual void ConfigureRemoteService(ControllerModel controller, [CanBeNull] ConventionalControllerSetting configuration) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs index 95a961b814..0512e28f7a 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs @@ -50,7 +50,6 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow return; } - //Begin a new, independent unit of work using (var uow = unitOfWorkManager.Begin(options)) { var result = await next(); @@ -58,6 +57,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow { await uow.CompleteAsync(context.HttpContext.RequestAborted); } + else + { + await uow.RollbackAsync(context.HttpContext.RequestAborted); + } } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs index 30c713940f..d808053592 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs @@ -55,7 +55,6 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow return; } - //Begin a new, independent unit of work using (var uow = unitOfWorkManager.Begin(options)) { var result = await next(); @@ -63,6 +62,10 @@ namespace Volo.Abp.AspNetCore.Mvc.Uow { await uow.CompleteAsync(context.HttpContext.RequestAborted); } + else + { + await uow.RollbackAsync(context.HttpContext.RequestAborted); + } } } diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs index 568ecfef7b..a409355ef0 100644 --- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs +++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Hosting; using Volo.Abp; using Volo.Abp.AspNetCore.Auditing; using Volo.Abp.AspNetCore.ExceptionHandling; +using Volo.Abp.AspNetCore.Security; using Volo.Abp.AspNetCore.Security.Claims; using Volo.Abp.AspNetCore.Tracing; using Volo.Abp.AspNetCore.Uow; @@ -82,5 +83,10 @@ namespace Microsoft.AspNetCore.Builder { return app.UseMiddleware(); } + + public static IApplicationBuilder UseAbpSecurityHeaders(this IApplicationBuilder app) + { + return app.UseMiddleware(); + } } } diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs new file mode 100644 index 0000000000..28b0f3a48e --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Primitives; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.AspNetCore.Security +{ + public class AbpSecurityHeadersMiddleware : IMiddleware, ITransientDependency + { + public async Task InvokeAsync(HttpContext context, RequestDelegate next) + { + /*X-Content-Type-Options header tells the browser to not try and “guess” what a mimetype of a resource might be, and to just take what mimetype the server has returned as fact.*/ + AddHeaderIfNotExists(context, "X-Content-Type-Options", "nosniff"); + + /*X-XSS-Protection is a feature of Internet Explorer, Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks*/ + AddHeaderIfNotExists(context, "X-XSS-Protection", "1; mode=block"); + + /*The X-Frame-Options HTTP response header can be used to indicate whether or not a browser should be allowed to render a page in a ,