├── angular
├── src
│ ├── assets
│ │ ├── .gitkeep
│ │ ├── images
│ │ │ └── user.png
│ │ ├── app-logo-small.png
│ │ ├── appconfig.json
│ │ └── fonts
│ │ │ └── roboto
│ │ │ ├── CWB0XYA8bzo0kSThX0UTuA.woff2
│ │ │ ├── -2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2
│ │ │ ├── 77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── 97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2
│ │ │ ├── NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2
│ │ │ ├── PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2
│ │ │ ├── ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2
│ │ │ ├── isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2
│ │ │ ├── mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2
│ │ │ └── u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2
│ ├── favicon.ico
│ ├── bsb-theme
│ │ ├── images
│ │ │ └── user-img-background.jpg
│ │ ├── js
│ │ │ └── helpers.js
│ │ └── css
│ │ │ └── themes
│ │ │ ├── theme-red.min.css
│ │ │ ├── theme-blue.min.css
│ │ │ ├── theme-cyan.min.css
│ │ │ ├── theme-grey.min.css
│ │ │ ├── theme-lime.min.css
│ │ │ ├── theme-pink.min.css
│ │ │ ├── theme-teal.min.css
│ │ │ ├── theme-black.min.css
│ │ │ ├── theme-amber.min.css
│ │ │ ├── theme-brown.min.css
│ │ │ ├── theme-green.min.css
│ │ │ ├── theme-indigo.min.css
│ │ │ ├── theme-orange.min.css
│ │ │ ├── theme-purple.min.css
│ │ │ ├── theme-yellow.min.css
│ │ │ ├── theme-blue-grey.min.css
│ │ │ ├── theme-light-blue.min.css
│ │ │ ├── theme-deep-orange.min.css
│ │ │ ├── theme-deep-purple.min.css
│ │ │ ├── theme-red.css
│ │ │ ├── theme-blue.css
│ │ │ ├── theme-cyan.css
│ │ │ └── theme-grey.css
│ ├── environments
│ │ ├── environment.prod.ts
│ │ ├── environment.hmr.ts
│ │ └── environment.ts
│ ├── app
│ │ ├── plugins
│ │ │ ├── plugin.component.html
│ │ │ ├── plugin.service.ts
│ │ │ └── plugin.component.ts
│ │ ├── layout
│ │ │ ├── sidebar-footer.component.html
│ │ │ ├── topbar.component.ts
│ │ │ ├── topbar-languageswitch.component.html
│ │ │ ├── sidebar-footer.component.ts
│ │ │ ├── sidebar-user-area.component.html
│ │ │ ├── sidebar-user-area.component.ts
│ │ │ ├── topbar-languageswitch.component.ts
│ │ │ └── topbar.component.html
│ │ ├── app.component.html
│ │ ├── about
│ │ │ └── about.component.ts
│ │ └── app.component.spec.ts
│ ├── root.component.ts
│ ├── account
│ │ ├── login
│ │ │ └── login.component.less
│ │ ├── layout
│ │ │ ├── account-languages.component.less
│ │ │ ├── account-languages.component.html
│ │ │ └── account-languages.component.ts
│ │ ├── account.component.less
│ │ ├── tenant
│ │ │ ├── tenant-change.component.html
│ │ │ └── tenant-change.component.ts
│ │ ├── account.component.html
│ │ ├── account-routing.module.ts
│ │ └── account.component.ts
│ ├── shared
│ │ ├── AppEnums.ts
│ │ ├── auth
│ │ │ └── app-auth.service.ts
│ │ ├── helpers
│ │ │ ├── UrlHelper.ts
│ │ │ └── SignalRHelper.ts
│ │ ├── AppConsts.ts
│ │ ├── directives
│ │ │ └── material-input.directive.ts
│ │ ├── layout
│ │ │ └── menu-item.ts
│ │ ├── core.less
│ │ ├── service-proxies
│ │ │ └── service-proxy.module.ts
│ │ ├── animations
│ │ │ └── routerTransition.ts
│ │ └── shared.module.ts
│ ├── hmr.ts
│ ├── index.html
│ ├── root-routing.module.ts
│ ├── tsconfig.json
│ ├── main.ts
│ ├── typings.d.ts
│ └── test.ts
├── nswag
│ ├── refresh.bat
│ └── service.extensions.ts
├── Dockerfile
├── hosting.json
├── app.config
├── e2e
│ ├── app.po.ts
│ ├── app.e2e-spec.ts
│ └── tsconfig.json
├── .editorconfig
├── .vscode
│ └── tasks.json
├── Todo.MainProject.AngularUI.csproj.user
├── Todo.MainProject.AngularUI.csproj
├── Web.config
├── .gitignore
├── Properties
│ └── launchSettings.json
├── protractor.conf.js
├── Startup.cs
├── README.md
├── Todo.MainProject.AngularUI.sln
└── karma.conf.js
├── aspnet-core
├── docker
│ ├── ng
│ │ ├── up.ps1
│ │ ├── down.ps1
│ │ └── docker-compose.yml
│ └── mvc
│ │ ├── up.ps1
│ │ ├── down.ps1
│ │ └── docker-compose.yml
├── Todo.DemoPlugin
│ ├── Todo.DemoPlugin.AngularUI
│ │ ├── src
│ │ │ ├── assets
│ │ │ │ └── .gitkeep
│ │ │ ├── app
│ │ │ │ ├── app.component.css
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.component.spec.ts
│ │ │ │ └── numberonly.directive.ts
│ │ │ ├── environments
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── styles.css
│ │ │ ├── typings.d.ts
│ │ │ ├── favicon.ico
│ │ │ ├── tsconfig.app.json
│ │ │ ├── index.html
│ │ │ ├── tsconfig.spec.json
│ │ │ ├── main.ts
│ │ │ └── test.ts
│ │ ├── e2e
│ │ │ ├── app.po.ts
│ │ │ ├── tsconfig.e2e.json
│ │ │ └── app.e2e-spec.ts
│ │ ├── .editorconfig
│ │ ├── tsconfig.json
│ │ ├── .gitignore
│ │ ├── Program.cs
│ │ ├── Properties
│ │ │ └── launchSettings.json
│ │ ├── Todo.DemoPlugin.AngularUI.csproj
│ │ ├── protractor.conf.js
│ │ ├── Startup.cs
│ │ ├── karma.conf.js
│ │ └── README.md
│ ├── Todo.DemoPlugin.Web.Host
│ │ ├── Dockerfile
│ │ ├── app.config
│ │ ├── appsettings.Staging.json
│ │ ├── Startup
│ │ │ ├── Program.cs
│ │ │ └── DemoPluginWebHostModule.cs
│ │ ├── appsettings.json
│ │ ├── web.config
│ │ ├── log4net.config
│ │ └── Properties
│ │ │ └── launchSettings.json
│ ├── Todo.DemoPlugin.Web.Core
│ │ ├── Todo.DemoPlugin.json
│ │ └── DemoPluginWebCoreModule.cs
│ ├── Todo.DemoPlugin.Application
│ │ ├── Calculation
│ │ │ ├── ICalculationService.cs
│ │ │ └── CalculationService.cs
│ │ ├── DemoPluginApplicationModule.cs
│ │ └── Todo.DemoPlugin.Application.csproj
│ └── Todo.DemoPluginDeploy.ps1
├── src
│ ├── Todo.MainProject.Web.Host
│ │ ├── Dockerfile
│ │ ├── demoplugin.zip
│ │ ├── app.config
│ │ ├── Services
│ │ │ ├── NullPluginService.cs
│ │ │ ├── IPluginService.cs
│ │ │ ├── IPluginFileService.cs
│ │ │ ├── PluginFileService.cs
│ │ │ └── PluginEmbeddedDirectoryContents.cs
│ │ ├── appsettings.Staging.json
│ │ ├── Startup
│ │ │ ├── Program.cs
│ │ │ └── MainProjectWebHostModule.cs
│ │ ├── appsettings.json
│ │ ├── Controllers
│ │ │ └── AntiForgeryController.cs
│ │ ├── web.config
│ │ ├── log4net.config
│ │ └── Properties
│ │ │ └── launchSettings.json
│ ├── Todo.MainProject.Migrator
│ │ ├── appsettings.json
│ │ ├── Log.cs
│ │ ├── DependencyInjection
│ │ │ └── ServiceCollectionRegistrar.cs
│ │ ├── log4net.config
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Todo.MainProject.Migrator.csproj
│ ├── Todo.MainProject.Core
│ │ ├── Configuration
│ │ │ ├── AppSettingNames.cs
│ │ │ └── AppSettingProvider.cs
│ │ ├── MainProjectConsts.cs
│ │ ├── Authorization
│ │ │ ├── PermissionNames.cs
│ │ │ ├── Roles
│ │ │ │ ├── StaticRoleNames.cs
│ │ │ │ ├── RoleStore.cs
│ │ │ │ ├── Role.cs
│ │ │ │ ├── AppRoleConfig.cs
│ │ │ │ └── RoleManager.cs
│ │ │ ├── PermissionChecker.cs
│ │ │ ├── Users
│ │ │ │ ├── UserClaimsPrincipalFactory.cs
│ │ │ │ ├── User.cs
│ │ │ │ └── UserStore.cs
│ │ │ └── MainProjectAuthorizationProvider.cs
│ │ ├── Timing
│ │ │ └── AppTimes.cs
│ │ ├── MultiTenancy
│ │ │ ├── Tenant.cs
│ │ │ └── TenantManager.cs
│ │ ├── Validation
│ │ │ └── ValidationHelper.cs
│ │ ├── Editions
│ │ │ └── EditionManager.cs
│ │ ├── Identity
│ │ │ ├── SecurityStampValidator.cs
│ │ │ ├── IdentityRegistrar.cs
│ │ │ └── SignInManager.cs
│ │ ├── AppVersionHelper.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Localization
│ │ │ ├── MainProjectLocalizationConfigurer.cs
│ │ │ └── SourceFiles
│ │ │ │ └── MainProject-zh-CN.xml
│ │ └── Features
│ │ │ └── FeatureValueStore.cs
│ ├── Todo.MainProject.Application
│ │ ├── Authorization
│ │ │ └── Accounts
│ │ │ │ ├── Dto
│ │ │ │ ├── RegisterOutput.cs
│ │ │ │ ├── TenantAvailabilityState.cs
│ │ │ │ ├── IsTenantAvailableInput.cs
│ │ │ │ └── IsTenantAvailableOutput.cs
│ │ │ │ └── IAccountAppService.cs
│ │ ├── Configuration
│ │ │ ├── Dto
│ │ │ │ └── ChangeUiThemeInput.cs
│ │ │ ├── IConfigurationAppService.cs
│ │ │ ├── Ui
│ │ │ │ └── UiThemeInfo.cs
│ │ │ └── ConfigurationAppService.cs
│ │ ├── AppConsts.cs
│ │ ├── Sessions
│ │ │ ├── Dto
│ │ │ │ ├── GetCurrentLoginInformationsOutput.cs
│ │ │ │ ├── ApplicationInfoDto.cs
│ │ │ │ ├── TenantLoginInfoDto.cs
│ │ │ │ └── UserLoginInfoDto.cs
│ │ │ └── ISessionAppService.cs
│ │ ├── MultiTenancy
│ │ │ ├── ITenantAppService.cs
│ │ │ └── Dto
│ │ │ │ ├── EditTenantDto.cs
│ │ │ │ ├── TenantDto.cs
│ │ │ │ └── CreateTenantDto.cs
│ │ ├── SignalR
│ │ │ └── SignalRFeature.cs
│ │ ├── Roles
│ │ │ ├── IRoleAppService.cs
│ │ │ └── Dto
│ │ │ │ ├── PermissionDto.cs
│ │ │ │ ├── RoleMapProfile.cs
│ │ │ │ ├── CreateRoleDto.cs
│ │ │ │ └── RoleDto.cs
│ │ ├── Users
│ │ │ ├── IUserAppService.cs
│ │ │ └── Dto
│ │ │ │ ├── UserMapProfile.cs
│ │ │ │ └── UserDto.cs
│ │ ├── Todo.MainProject.Application.csproj
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── MainProjectApplicationModule.cs
│ ├── Todo.MainProject.Communication
│ │ ├── Todo.MainProject.Communication.csproj
│ │ └── Dto
│ │ │ ├── PluginObject.cs
│ │ │ └── FileObject.cs
│ ├── Todo.MainProject.Web.Core
│ │ ├── Authentication
│ │ │ ├── External
│ │ │ │ ├── IExternalAuthConfiguration.cs
│ │ │ │ ├── IExternalAuthManager.cs
│ │ │ │ ├── ExternalAuthUserInfo.cs
│ │ │ │ ├── IExternalAuthProviderApi.cs
│ │ │ │ ├── ExternalAuthConfiguration.cs
│ │ │ │ ├── ExternalLoginProviderInfo.cs
│ │ │ │ └── ExternalAuthProviderApiBase.cs
│ │ │ └── JwtBearer
│ │ │ │ ├── TokenAuthConfiguration.cs
│ │ │ │ └── JwtTokenMiddleware.cs
│ │ ├── Models
│ │ │ └── TokenAuth
│ │ │ │ ├── AuthenticateResultModel.cs
│ │ │ │ ├── ExternalLoginProviderInfoModel.cs
│ │ │ │ ├── ExternalAuthenticateResultModel.cs
│ │ │ │ ├── ExternalAuthenticateModel.cs
│ │ │ │ └── AuthenticateModel.cs
│ │ ├── Configuration
│ │ │ └── HostingEnvironmentExtensions.cs
│ │ ├── Controllers
│ │ │ └── MainProjectControllerBase.cs
│ │ └── Owin
│ │ │ └── BuilderExtensions.cs
│ └── Todo.MainProject.EntityFrameworkCore
│ │ ├── EntityFrameworkCore
│ │ ├── MainProjectDbContextConfigurer.cs
│ │ ├── MainProjectDbContext.cs
│ │ ├── AbpZeroDbMigrator.cs
│ │ ├── Seed
│ │ │ └── Host
│ │ │ │ ├── InitialHostDbBuilder.cs
│ │ │ │ └── DefaultSettingsCreator.cs
│ │ └── MainProjectDbContextFactory.cs
│ │ ├── Migrations
│ │ ├── 20170703134115_Remove_IsActive_From_Role.cs
│ │ ├── 20170804083601_Upgraded_To_Abp_v2.2.2.cs
│ │ └── 20170621153937_Added_Description_And_IsActive_To_Role.cs
│ │ └── Todo.MainProject.EntityFrameworkCore.csproj
├── test
│ └── Todo.MainProject.Tests
│ │ ├── MultiTenantFactAttribute.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ └── DependencyInjection
│ │ └── ServiceCollectionRegistrar.cs
└── build
│ └── build-mvc.ps1
├── _screenshots
├── ui-home.png
├── ui-login.png
└── ui-user-create-modal.png
├── .gitignore
├── addPlugin.ps1
├── plugin-downloader
├── Todo.PluginDownloaderDeploy.ps1
└── Todo.PluginDownloader
│ ├── Program.cs
│ ├── Properties
│ └── PublishProfiles
│ │ └── FolderProfile.pubxml
│ └── Todo.PluginDownloader.csproj
├── LICENSE
└── Template_readme.md
/angular/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/aspnet-core/docker/ng/up.ps1:
--------------------------------------------------------------------------------
1 | docker-compose up -d
--------------------------------------------------------------------------------
/aspnet-core/docker/mvc/up.ps1:
--------------------------------------------------------------------------------
1 | docker-compose up -d
--------------------------------------------------------------------------------
/angular/nswag/refresh.bat:
--------------------------------------------------------------------------------
1 | "..\node_modules\.bin\nswag" run
--------------------------------------------------------------------------------
/angular/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM nginx
2 |
3 | COPY . /usr/share/nginx/html
--------------------------------------------------------------------------------
/angular/hosting.json:
--------------------------------------------------------------------------------
1 | {
2 | "urls": "http://localhost:4200"
3 | }
--------------------------------------------------------------------------------
/angular/nswag/service.extensions.ts:
--------------------------------------------------------------------------------
1 | import * as moment from 'moment';
--------------------------------------------------------------------------------
/aspnet-core/docker/mvc/down.ps1:
--------------------------------------------------------------------------------
1 | docker-compose down -v --rmi local
--------------------------------------------------------------------------------
/aspnet-core/docker/ng/down.ps1:
--------------------------------------------------------------------------------
1 | docker-compose down -v --rmi local
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/app.component.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/angular/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/favicon.ico
--------------------------------------------------------------------------------
/_screenshots/ui-home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/_screenshots/ui-home.png
--------------------------------------------------------------------------------
/_screenshots/ui-login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/_screenshots/ui-login.png
--------------------------------------------------------------------------------
/angular/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/angular/src/assets/images/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/images/user.png
--------------------------------------------------------------------------------
/_screenshots/ui-user-create-modal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/_screenshots/ui-user-create-modal.png
--------------------------------------------------------------------------------
/angular/src/assets/app-logo-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/app-logo-small.png
--------------------------------------------------------------------------------
/angular/src/assets/appconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "remoteServiceBaseUrl": "http://localhost:21021",
3 | "appBaseUrl": "http://localhost:4200"
4 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/images/user-img-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/bsb-theme/images/user-img-background.jpg
--------------------------------------------------------------------------------
/angular/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | // "Production" enabled environment
2 |
3 | export const environment = {
4 | production: true,
5 | hmr: false
6 | };
--------------------------------------------------------------------------------
/angular/src/environments/environment.hmr.ts:
--------------------------------------------------------------------------------
1 | // "Hot Module Replacement" enabled environment
2 |
3 | export const environment = {
4 | production: false,
5 | hmr: true
6 | };
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM microsoft/aspnetcore:1.1.2
2 |
3 | WORKDIR /app
4 | COPY . .
5 |
6 | ENTRYPOINT ["dotnet", "Todo.MainProject.Web.Host.dll"]
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/demoplugin.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/aspnet-core/src/Todo.MainProject.Web.Host/demoplugin.zip
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/CWB0XYA8bzo0kSThX0UTuA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/CWB0XYA8bzo0kSThX0UTuA.woff2
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM microsoft/aspnetcore:1.1.2
2 |
3 | WORKDIR /app
4 | COPY . .
5 |
6 | ENTRYPOINT ["dotnet", "Todo.DemoPlugin.Web.Host.dll"]
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | /* SystemJS module definition */
2 | declare var module: NodeModule;
3 | interface NodeModule {
4 | id: string;
5 | }
6 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Core/Todo.DemoPlugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "Title": "DemoPlugin",
3 | "Path": "/Todo.DemoPlugin",
4 | "Url": "/demoplugin",
5 | "Version": "1.0.0"
6 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "Default": "Server=localhost; Database=MainProjectDb; Trusted_Connection=True;"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/favicon.ico
--------------------------------------------------------------------------------
/angular/src/app/plugins/plugin.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/angular/src/root.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | template: ``
6 | })
7 | export class RootComponent {
8 |
9 | }
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/angular/src/assets/fonts/roboto/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chanjunweimy/abp_plugin_with_ui/HEAD/angular/src/assets/fonts/roboto/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Configuration/AppSettingNames.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Configuration
2 | {
3 | public static class AppSettingNames
4 | {
5 | public const string UiTheme = "App.UiTheme";
6 | }
7 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Authorization/Accounts/Dto/RegisterOutput.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authorization.Accounts.Dto
2 | {
3 | public class RegisterOutput
4 | {
5 | public bool CanLogin { get; set; }
6 | }
7 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/angular/src/account/login/login.component.less:
--------------------------------------------------------------------------------
1 | .social-icons {
2 | padding-left: 0px;
3 |
4 | li {
5 | display: inline-block;
6 | margin-right: 5px;
7 |
8 | a {
9 | width: 40px;
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/angular/src/account/layout/account-languages.component.less:
--------------------------------------------------------------------------------
1 | .account-language-switch-list {
2 | list-style: none;
3 | margin: 0px;
4 | padding: 10px;
5 |
6 | > li {
7 | display: inline;
8 | margin: 0px;
9 | padding: 0px;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Communication/Todo.MainProject.Communication.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 | AnyCPU;x64
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Authorization/Accounts/Dto/TenantAvailabilityState.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authorization.Accounts.Dto
2 | {
3 | public enum TenantAvailabilityState
4 | {
5 | Available = 1,
6 | InActive,
7 | NotFound
8 | }
9 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Services/NullPluginService.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Web.Host.Services
2 | {
3 | public class NullPluginService : PluginService
4 | {
5 | public NullPluginService() : base(null)
6 | {
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/angular/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class MainProjectTemplatePage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/angular/src/app/layout/sidebar-footer.component.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | Version {{versionText}}
7 |
8 |
--------------------------------------------------------------------------------
/angular/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
10 | [*.md]
11 | max_line_length = off
12 | trim_trailing_whitespace = false
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # IDEs and editors
4 | .vs/
5 | obj/
6 | bin/
7 | aspnet-core/src/Todo.MainProject.Web.Host/App_Data/Logs/
8 | aspnet-core/src/Todo.MainProject.Web.Mvc/App_Data/Logs/
9 | wwwroot/
10 | *.user
11 | *.zip
12 | downloader/
--------------------------------------------------------------------------------
/aspnet-core/docker/mvc/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 |
5 | abp_mvc:
6 | image: abp/mvc
7 | environment:
8 | - ASPNETCORE_ENVIRONMENT=Staging
9 | ports:
10 | - "9903:80"
11 | volumes:
12 | - "./Mvc-Logs:/app/App_Data/Logs"
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/appsettings.Staging.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "Default": "Server=10.0.75.1; Database=MainProjectDb; User=sa; Password=123qwe;"
4 | },
5 | "App": {
6 | "WebSiteRootAddress": "http://localhost:9902/",
7 | "CorsOrigins": "http://localhost:9902"
8 | }
9 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Application/Calculation/ICalculationService.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Services;
2 |
3 | namespace Todo.DemoPlugin.Calculation
4 | {
5 | public interface ICalculationService : IApplicationService
6 | {
7 | double Calculation_Add(double x, double y);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/appsettings.Staging.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "Default": "Server=10.0.75.1; Database=MainProjectDb; User=sa; Password=123qwe;"
4 | },
5 | "App": {
6 | "WebSiteRootAddress": "http://localhost:9902/",
7 | "CorsOrigins": "http://localhost:9902"
8 | }
9 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "baseUrl": "./",
6 | "module": "es2015",
7 | "types": []
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/IExternalAuthConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace Todo.MainProject.Authentication.External
4 | {
5 | public interface IExternalAuthConfiguration
6 | {
7 | List Providers { get; }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Configuration/Dto/ChangeUiThemeInput.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 |
3 | namespace Todo.MainProject.Configuration.Dto
4 | {
5 | public class ChangeUiThemeInput
6 | {
7 | [Required]
8 | [MaxLength(32)]
9 | public string Theme { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Configuration/IConfigurationAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Todo.MainProject.Configuration.Dto;
3 |
4 | namespace Todo.MainProject.Configuration
5 | {
6 | public interface IConfigurationAppService
7 | {
8 | Task ChangeUiTheme(ChangeUiThemeInput input);
9 | }
10 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/AppConsts.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject
2 | {
3 | public class AppConsts
4 | {
5 | ///
6 | /// Default pass phrase for SimpleStringCipher decrypt/encrypt operations
7 | ///
8 | public const string DefaultPassPhrase = "gsKxGZ012HLL3MI5";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/MainProjectConsts.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject
2 | {
3 | public class MainProjectConsts
4 | {
5 | public const string LocalizationSourceName = "MainProject";
6 |
7 | public const string ConnectionStringName = "Default";
8 |
9 | public const bool MultiTenancyEnabled = true;
10 | }
11 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Communication/Dto/PluginObject.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Communication.Dto
2 | {
3 | public class PluginObject
4 | {
5 | public string Title { get; set; }
6 | public string Path { get; set; }
7 | public string Url { get; set; }
8 | public string Version { get; set; }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/angular/src/shared/AppEnums.ts:
--------------------------------------------------------------------------------
1 | import { IsTenantAvailableOutputState } from '@shared/service-proxies/service-proxies';
2 |
3 |
4 | export class AppTenantAvailabilityState {
5 | static Available: number = IsTenantAvailableOutputState._1;
6 | static InActive: number = IsTenantAvailableOutputState._2;
7 | static NotFound: number = IsTenantAvailableOutputState._3;
8 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": [
9 | "jasmine",
10 | "jasminewd2",
11 | "node"
12 | ]
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/angular/src/account/layout/account-languages.component.html:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/addPlugin.ps1:
--------------------------------------------------------------------------------
1 | $currentPath = (Get-Item -Path "./" -Verbose).FullName
2 |
3 | $pluginPath = Join-Path $currentPath ".\aspnet-core\Todo.DemoPlugin"
4 | Set-Location $pluginPath
5 | .\Todo.DemoPluginDeploy.ps1
6 |
7 | $downloaderPath = Join-Path $currentPath ".\plugin-downloader"
8 | Set-Location $downloaderPath
9 | .\Todo.PluginDownloaderDeploy.ps1
10 |
11 | Set-Location $currentPath
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/PermissionNames.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authorization
2 | {
3 | public static class PermissionNames
4 | {
5 | public const string Pages_Tenants = "Pages.Tenants";
6 |
7 | public const string Pages_Users = "Pages.Users";
8 |
9 | public const string Pages_Roles = "Pages.Roles";
10 | }
11 | }
--------------------------------------------------------------------------------
/angular/src/shared/auth/app-auth.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { AppConsts } from '@shared/AppConsts';
3 |
4 | @Injectable()
5 | export class AppAuthService {
6 |
7 | logout(reload?: boolean): void {
8 | abp.auth.clearToken();
9 | if (reload !== false) {
10 | location.href = AppConsts.appBaseUrl;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Timing/AppTimes.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Abp.Dependency;
3 |
4 | namespace Todo.MainProject.Timing
5 | {
6 | public class AppTimes : ISingletonDependency
7 | {
8 | ///
9 | /// Gets the startup time of the application.
10 | ///
11 | public DateTime StartupTime { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Services/IPluginService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Todo.MainProject.Communication.Dto;
3 |
4 | namespace Todo.MainProject.Web.Host.Services
5 | {
6 | public interface IPluginService
7 | {
8 | List GetPluginObjects();
9 | bool IsNullService();
10 | string GetPluginPath();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Sessions/Dto/GetCurrentLoginInformationsOutput.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Sessions.Dto
2 | {
3 | public class GetCurrentLoginInformationsOutput
4 | {
5 | public ApplicationInfoDto Application { get; set; }
6 |
7 | public UserLoginInfoDto User { get; set; }
8 |
9 | public TenantLoginInfoDto Tenant { get; set; }
10 | }
11 | }
--------------------------------------------------------------------------------
/angular/src/shared/helpers/UrlHelper.ts:
--------------------------------------------------------------------------------
1 | export class UrlHelper {
2 | /**
3 | * The URL requested, before initial routing.
4 | */
5 | static readonly initialUrl = location.href;
6 |
7 | static getQueryParameters(): any {
8 | return document.location.search.replace(/(^\?)/, '').split("&").map(function (n) { return n = n.split("="), this[n[0]] = n[1], this }.bind({}))[0];
9 | }
10 | }
--------------------------------------------------------------------------------
/aspnet-core/docker/ng/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '2'
2 |
3 | services:
4 |
5 | abp_host:
6 | image: abp/host
7 | environment:
8 | - ASPNETCORE_ENVIRONMENT=Staging
9 | ports:
10 | - "9901:80"
11 | volumes:
12 | - "./Host-Logs:/app/App_Data/Logs"
13 |
14 | abp_ng:
15 | image: abp/ng
16 | ports:
17 | - "9902:80"
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/MultiTenancy/ITenantAppService.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Services;
2 | using Abp.Application.Services.Dto;
3 | using Todo.MainProject.MultiTenancy.Dto;
4 |
5 | namespace Todo.MainProject.MultiTenancy
6 | {
7 | public interface ITenantAppService : IAsyncCrudAppService
8 | {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Sessions/ISessionAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Application.Services;
3 | using Todo.MainProject.Sessions.Dto;
4 |
5 | namespace Todo.MainProject.Sessions
6 | {
7 | public interface ISessionAppService : IApplicationService
8 | {
9 | Task GetCurrentLoginInformations();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('calculatorplugin App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to app!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Calculatorplugin
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Configuration/Ui/UiThemeInfo.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Configuration.Ui
2 | {
3 | public class UiThemeInfo
4 | {
5 | public string Name { get; }
6 | public string CssClass { get; }
7 |
8 | public UiThemeInfo(string name, string cssClass)
9 | {
10 | Name = name;
11 | CssClass = cssClass;
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/SignalR/SignalRFeature.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.SignalR
2 | {
3 | public static class SignalRFeature
4 | {
5 | public static bool IsAvailable
6 | {
7 | get
8 | {
9 | #if FEATURE_SIGNALR
10 | return true;
11 | #else
12 | return false;
13 | #endif
14 | }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/angular/src/account/account.component.less:
--------------------------------------------------------------------------------
1 | .content.account-forms {
2 | margin-top: 10px;
3 | }
4 |
5 | .content.tenant-change-box {
6 | padding: 16px 16px 0px 16px;
7 | margin: 120px auto 0px auto;
8 | max-width: 400px;
9 |
10 | a {
11 | cursor: pointer;
12 | }
13 | }
14 |
15 | div#LoginArea {
16 | margin-top: 0px !important;
17 | max-width: 400px;
18 | margin: 120px auto 10px auto;
19 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Sessions/Dto/ApplicationInfoDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Todo.MainProject.Sessions.Dto
5 | {
6 | public class ApplicationInfoDto
7 | {
8 | public string Version { get; set; }
9 |
10 | public DateTime ReleaseDate { get; set; }
11 |
12 | public Dictionary Features { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Models/TokenAuth/AuthenticateResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Models.TokenAuth
2 | {
3 | public class AuthenticateResultModel
4 | {
5 | public string AccessToken { get; set; }
6 |
7 | public string EncryptedAccessToken { get; set; }
8 |
9 | public int ExpireInSeconds { get; set; }
10 |
11 | public long UserId { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/angular/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "dotnet",
4 | "isShellCommand": true,
5 | "args": [],
6 | "tasks": [
7 | {
8 | "taskName": "build",
9 | "args": [
10 | "${workspaceRoot}/Todo.MainProject.AngularUI.csproj"
11 | ],
12 | "isBuildCommand": true,
13 | "problemMatcher": "$msCompile"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Roles/StaticRoleNames.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authorization.Roles
2 | {
3 | public static class StaticRoleNames
4 | {
5 | public static class Host
6 | {
7 | public const string Admin = "Admin";
8 | }
9 |
10 | public static class Tenants
11 | {
12 | public const string Admin = "Admin";
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/angular/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { MainProjectTemplatePage } from './app.po';
2 |
3 | describe('abp-project-name-template App', function() {
4 | let page: MainProjectTemplatePage;
5 |
6 | beforeEach(() => {
7 | page = new MainProjectTemplatePage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Authorization/Accounts/Dto/IsTenantAvailableInput.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.MultiTenancy;
3 |
4 | namespace Todo.MainProject.Authorization.Accounts.Dto
5 | {
6 | public class IsTenantAvailableInput
7 | {
8 | [Required]
9 | [MaxLength(AbpTenantBase.MaxTenancyNameLength)]
10 | public string TenancyName { get; set; }
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Sessions/Dto/TenantLoginInfoDto.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Services.Dto;
2 | using Abp.AutoMapper;
3 | using Todo.MainProject.MultiTenancy;
4 |
5 | namespace Todo.MainProject.Sessions.Dto
6 | {
7 | [AutoMapFrom(typeof(Tenant))]
8 | public class TenantLoginInfoDto : EntityDto
9 | {
10 | public string TenancyName { get; set; }
11 |
12 | public string Name { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/IExternalAuthManager.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Todo.MainProject.Authentication.External
4 | {
5 | public interface IExternalAuthManager
6 | {
7 | Task IsValidUser(string provider, string providerKey, string providerAccessCode);
8 |
9 | Task GetUserInfo(string provider, string accessCode);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/aspnet-core/test/Todo.MainProject.Tests/MultiTenantFactAttribute.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 |
3 | namespace Todo.MainProject.Tests
4 | {
5 | public sealed class MultiTenantFactAttribute : FactAttribute
6 | {
7 | public MultiTenantFactAttribute()
8 | {
9 | if (!MainProjectConsts.MultiTenancyEnabled)
10 | {
11 | Skip = "MultiTenancy is disabled.";
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/plugin-downloader/Todo.PluginDownloaderDeploy.ps1:
--------------------------------------------------------------------------------
1 | $currentPath = (Get-Item -Path "./" -Verbose).FullName
2 | $releasePath = Join-Path $currentPath ".\Todo.PluginDownloader\bin\Release\netcoreapp2.0\*.*"
3 | $downloaderPath = Join-Path $currentPath "..\angular\downloader"
4 |
5 | dotnet restore
6 | dotnet build -c Release
7 |
8 | if (!(Test-Path $downloaderPath)) {
9 | mkdir $downloaderPath
10 | }
11 | Copy-Item $releasePath $downloaderPath -Force -Recurse
--------------------------------------------------------------------------------
/angular/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false,
8 | hmr: false
9 | };
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Models/TokenAuth/ExternalLoginProviderInfoModel.cs:
--------------------------------------------------------------------------------
1 | using Abp.AutoMapper;
2 | using Todo.MainProject.Authentication.External;
3 |
4 | namespace Todo.MainProject.Models.TokenAuth
5 | {
6 | [AutoMapFrom(typeof(ExternalLoginProviderInfo))]
7 | public class ExternalLoginProviderInfoModel
8 | {
9 | public string Name { get; set; }
10 |
11 | public string ClientId { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "baseUrl": "./",
6 | "module": "commonjs",
7 | "target": "es5",
8 | "types": [
9 | "jasmine",
10 | "node"
11 | ]
12 | },
13 | "files": [
14 | "test.ts"
15 | ],
16 | "include": [
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/MultiTenancy/Tenant.cs:
--------------------------------------------------------------------------------
1 | using Abp.MultiTenancy;
2 | using Todo.MainProject.Authorization.Users;
3 |
4 | namespace Todo.MainProject.MultiTenancy
5 | {
6 | public class Tenant : AbpTenant
7 | {
8 | public Tenant()
9 | {
10 |
11 | }
12 |
13 | public Tenant(string tenancyName, string name)
14 | : base(tenancyName, name)
15 | {
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Models/TokenAuth/ExternalAuthenticateResultModel.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Models.TokenAuth
2 | {
3 | public class ExternalAuthenticateResultModel
4 | {
5 | public string AccessToken { get; set; }
6 |
7 | public string EncryptedAccessToken { get; set; }
8 |
9 | public int ExpireInSeconds { get; set; }
10 |
11 | public bool WaitingForActivation { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/angular/src/shared/AppConsts.ts:
--------------------------------------------------------------------------------
1 | export class AppConsts {
2 |
3 | static remoteServiceBaseUrl: string;
4 | static appBaseUrl: string;
5 |
6 | static readonly userManagement = {
7 | defaultAdminUserName: 'admin'
8 | };
9 |
10 | static readonly localization = {
11 | defaultLocalizationSourceName: 'MainProject'
12 | };
13 |
14 | static readonly authorization = {
15 | encrptedAuthTokenName: 'enc_auth_token'
16 | };
17 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Roles/IRoleAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Application.Services;
3 | using Abp.Application.Services.Dto;
4 | using Todo.MainProject.Roles.Dto;
5 |
6 | namespace Todo.MainProject.Roles
7 | {
8 | public interface IRoleAppService : IAsyncCrudAppService
9 | {
10 | Task> GetAllPermissions();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/PermissionChecker.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Todo.MainProject.Authorization.Roles;
3 | using Todo.MainProject.Authorization.Users;
4 |
5 | namespace Todo.MainProject.Authorization
6 | {
7 | public class PermissionChecker : PermissionChecker
8 | {
9 | public PermissionChecker(UserManager userManager)
10 | : base(userManager)
11 | {
12 |
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/ExternalAuthUserInfo.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authentication.External
2 | {
3 | public class ExternalAuthUserInfo
4 | {
5 | public string ProviderKey { get; set; }
6 |
7 | public string Name { get; set; }
8 |
9 | public string EmailAddress { get; set; }
10 |
11 | public string Surname { get; set; }
12 |
13 | public string Provider { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/angular/src/shared/directives/material-input.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, Injectable, AfterViewInit } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[materialInput]'
5 | })
6 |
7 | @Injectable()
8 | export class MaterialInput implements AfterViewInit {
9 | constructor(private _element: ElementRef) {
10 | }
11 |
12 | ngAfterViewInit(): void {
13 | $.AdminBSB.input.activate($(this._element.nativeElement).parent());
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/angular/e2e/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "declaration": false,
5 | "emitDecoratorMetadata": true,
6 | "experimentalDecorators": true,
7 | "lib": [
8 | "es2016"
9 | ],
10 | "module": "commonjs",
11 | "moduleResolution": "node",
12 | "outDir": "../dist/out-tsc-e2e",
13 | "sourceMap": true,
14 | "target": "es6",
15 | "typeRoots": [
16 | "../node_modules/@types"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Roles/Dto/PermissionDto.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Services.Dto;
2 | using Abp.AutoMapper;
3 | using Abp.Authorization;
4 |
5 | namespace Todo.MainProject.Roles.Dto
6 | {
7 | [AutoMapFrom(typeof(Permission))]
8 | public class PermissionDto : EntityDto
9 | {
10 | public string Name { get; set; }
11 |
12 | public string DisplayName { get; set; }
13 |
14 | public string Description { get; set; }
15 | }
16 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome to {{title}}!
5 |
6 |
7 |
+
8 |
=
9 |
{{answer.values}}
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Users/IUserAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Application.Services;
3 | using Abp.Application.Services.Dto;
4 | using Todo.MainProject.Roles.Dto;
5 | using Todo.MainProject.Users.Dto;
6 |
7 | namespace Todo.MainProject.Users
8 | {
9 | public interface IUserAppService : IAsyncCrudAppService
10 | {
11 | Task> GetRoles();
12 | }
13 | }
--------------------------------------------------------------------------------
/angular/src/app/layout/topbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Injector, ViewEncapsulation } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 |
4 | @Component({
5 | templateUrl: './topbar.component.html',
6 | selector: 'top-bar',
7 | encapsulation: ViewEncapsulation.None
8 | })
9 | export class TopBarComponent extends AppComponentBase {
10 |
11 | constructor(
12 | injector: Injector
13 | ) {
14 | super(injector);
15 | }
16 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "sourceMap": true,
6 | "declaration": false,
7 | "moduleResolution": "node",
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es5",
11 | "typeRoots": [
12 | "node_modules/@types"
13 | ],
14 | "lib": [
15 | "es2017",
16 | "dom"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/angular/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
--------------------------------------------------------------------------------
/angular/src/shared/layout/menu-item.ts:
--------------------------------------------------------------------------------
1 | export class MenuItem {
2 | name: string = '';
3 | permissionName: string = '';
4 | icon: string = '';
5 | route: string = '';
6 | items: MenuItem[];
7 |
8 | constructor(name: string, permissionName: string, icon: string, route: string, childItems: MenuItem[] = null) {
9 | this.name = name;
10 | this.permissionName = permissionName;
11 | this.icon = icon;
12 | this.route = route;
13 | this.items = childItems;
14 | }
15 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Communication/Dto/FileObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace Todo.MainProject.Communication.Dto
6 | {
7 | public class FileObject
8 | {
9 | public byte[] FileContents { get; set; }
10 | public string ContentType { get; set; }
11 | public string FileDownloadName { get; set; }
12 | public string LastModified { get; set; }
13 | public string EntityTag { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/angular/Todo.MainProject.AngularUI.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectDebugger
5 |
6 |
7 | Todo.MainProject.AngularUI
8 | 0.0
9 |
10 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Application/DemoPluginApplicationModule.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Abp.Modules;
3 | using Abp.Reflection.Extensions;
4 |
5 | namespace Todo.DemoPlugin
6 | {
7 | public class DemoPluginApplicationModule : AbpModule
8 | {
9 | public override void Initialize()
10 | {
11 | var thisAssembly = typeof(DemoPluginApplicationModule).GetAssembly();
12 | IocManager.RegisterAssemblyByConvention(thisAssembly);
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Authorization/Accounts/IAccountAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Application.Services;
3 | using Todo.MainProject.Authorization.Accounts.Dto;
4 |
5 | namespace Todo.MainProject.Authorization.Accounts
6 | {
7 | public interface IAccountAppService : IApplicationService
8 | {
9 | Task IsTenantAvailable(IsTenantAvailableInput input);
10 |
11 | Task Register(RegisterInput input);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/plugin-downloader/Todo.PluginDownloader/Program.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.IO.Compression;
3 | using System.Threading.Tasks;
4 |
5 | namespace Todo.PluginDownloader
6 | {
7 | public static class Program
8 | {
9 | static void Main(string[] args)
10 | {
11 | Execute(args);
12 | }
13 |
14 | public static void Execute(string[] args)
15 | {
16 | var program = new PluginHandler();
17 | program.Execute(args);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Configuration/HostingEnvironmentExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Hosting;
2 | using Microsoft.Extensions.Configuration;
3 |
4 | namespace Todo.MainProject.Configuration
5 | {
6 | public static class HostingEnvironmentExtensions
7 | {
8 | public static IConfigurationRoot GetAppConfiguration(this IHostingEnvironment env)
9 | {
10 | return AppConfigurations.Get(env.ContentRootPath, env.EnvironmentName, env.IsDevelopment());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Services/IPluginFileService.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.FileProviders;
2 |
3 | namespace Todo.MainProject.Web.Host.Services
4 | {
5 | public interface IPluginFileService
6 | {
7 | ///
8 | /// Important to initialize the service.
9 | ///
10 | ///
11 | void InjectFileProvider(IFileProvider fileProvider);
12 |
13 | IDirectoryContents GetFilesFromProvider(string path);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/angular/src/app/about/about.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Injector, AfterViewInit } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 | import { appModuleAnimation } from '@shared/animations/routerTransition';
4 |
5 | @Component({
6 | templateUrl: './about.component.html',
7 | animations: [appModuleAnimation()]
8 | })
9 | export class AboutComponent extends AppComponentBase {
10 |
11 | constructor(
12 | injector: Injector
13 | ) {
14 | super(injector);
15 | }
16 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/IExternalAuthProviderApi.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 |
3 | namespace Todo.MainProject.Authentication.External
4 | {
5 | public interface IExternalAuthProviderApi
6 | {
7 | ExternalLoginProviderInfo ProviderInfo { get; }
8 |
9 | Task IsValidUser(string userId, string accessCode);
10 |
11 | Task GetUserInfo(string accessCode);
12 |
13 | void Initialize(ExternalLoginProviderInfo providerInfo);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/ExternalAuthConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abp.Dependency;
3 |
4 | namespace Todo.MainProject.Authentication.External
5 | {
6 | public class ExternalAuthConfiguration : IExternalAuthConfiguration, ISingletonDependency
7 | {
8 | public List Providers { get; }
9 |
10 | public ExternalAuthConfiguration()
11 | {
12 | Providers = new List();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/angular/Todo.MainProject.AngularUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 | true
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/angular/src/account/tenant/tenant-change.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{l("CurrentTenant")}}: {{tenancyName}} {{l("NotSelected")}} ({{l("Change")}})
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Application/Calculation/CalculationService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading.Tasks;
3 | using Abp.Application.Services;
4 | using Abp.Runtime.Session;
5 |
6 | namespace Todo.DemoPlugin.Calculation
7 | {
8 | ///
9 | /// Derive your application services from this class.
10 | ///
11 | public class CalculationService : ApplicationService, ICalculationService
12 | {
13 | public double Calculation_Add(double x, double y)
14 | {
15 | return x + y;
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/JwtBearer/TokenAuthConfiguration.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.IdentityModel.Tokens;
3 |
4 | namespace Todo.MainProject.Authentication.JwtBearer
5 | {
6 | public class TokenAuthConfiguration
7 | {
8 | public SymmetricSecurityKey SecurityKey { get; set; }
9 |
10 | public string Issuer { get; set; }
11 |
12 | public string Audience { get; set; }
13 |
14 | public SigningCredentials SigningCredentials { get; set; }
15 |
16 | public TimeSpan Expiration { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Startup/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore;
2 | using Microsoft.AspNetCore.Hosting;
3 |
4 | namespace Todo.MainProject.Web.Host.Startup
5 | {
6 | public class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | BuildWebHost(args).Run();
11 | }
12 |
13 | public static IWebHost BuildWebHost(string[] args)
14 | {
15 | return WebHost.CreateDefaultBuilder(args)
16 | .UseStartup()
17 | .Build();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/Startup/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore;
2 | using Microsoft.AspNetCore.Hosting;
3 |
4 | namespace Todo.DemoPlugin.Web.Host.Startup
5 | {
6 | public class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | BuildWebHost(args).Run();
11 | }
12 |
13 | public static IWebHost BuildWebHost(string[] args)
14 | {
15 | return WebHost.CreateDefaultBuilder(args)
16 | .UseStartup()
17 | .Build();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Sessions/Dto/UserLoginInfoDto.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Services.Dto;
2 | using Abp.AutoMapper;
3 | using Todo.MainProject.Authorization.Users;
4 | using Todo.MainProject.Users;
5 |
6 | namespace Todo.MainProject.Sessions.Dto
7 | {
8 | [AutoMapFrom(typeof(User))]
9 | public class UserLoginInfoDto : EntityDto
10 | {
11 | public string Name { get; set; }
12 |
13 | public string Surname { get; set; }
14 |
15 | public string UserName { get; set; }
16 |
17 | public string EmailAddress { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Users/Dto/UserMapProfile.cs:
--------------------------------------------------------------------------------
1 | using Todo.MainProject.Authorization.Users;
2 | using AutoMapper;
3 |
4 | namespace Todo.MainProject.Users.Dto
5 | {
6 | public class UserMapProfile : Profile
7 | {
8 | public UserMapProfile()
9 | {
10 | CreateMap();
11 | CreateMap().ForMember(x => x.Roles, opt => opt.Ignore());
12 |
13 | CreateMap();
14 | CreateMap().ForMember(x => x.Roles, opt => opt.Ignore());
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/angular/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Authorization/Accounts/Dto/IsTenantAvailableOutput.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.Authorization.Accounts.Dto
2 | {
3 | public class IsTenantAvailableOutput
4 | {
5 | public TenantAvailabilityState State { get; set; }
6 |
7 | public int? TenantId { get; set; }
8 |
9 | public IsTenantAvailableOutput()
10 | {
11 |
12 | }
13 |
14 | public IsTenantAvailableOutput(TenantAvailabilityState state, int? tenantId = null)
15 | {
16 | State = state;
17 | TenantId = tenantId;
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/Log.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Abp.Dependency;
3 | using Abp.Timing;
4 | using Castle.Core.Logging;
5 |
6 | namespace Todo.MainProject.Migrator
7 | {
8 | public class Log : ITransientDependency
9 | {
10 | public ILogger Logger { get; set; }
11 |
12 | public Log()
13 | {
14 | Logger = NullLogger.Instance;
15 | }
16 |
17 | public void Write(string text)
18 | {
19 | Console.WriteLine(Clock.Now.ToString("yyyy-MM-dd HH:mm:ss") + " | " + text);
20 | Logger.Info(text);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/angular/src/app/layout/topbar-languageswitch.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{currentLanguage.displayName}}
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { HttpClientModule } from '@angular/common/http';
4 |
5 | import { AppComponent } from './app.component';
6 | import { NumberOnlyDirective } from './numberonly.directive';
7 |
8 | @NgModule({
9 | declarations: [
10 | AppComponent,
11 | NumberOnlyDirective
12 | ],
13 | imports: [
14 | BrowserModule,
15 | HttpClientModule
16 | ],
17 | providers: [],
18 | bootstrap: [AppComponent]
19 | })
20 | export class AppModule { }
21 |
--------------------------------------------------------------------------------
/angular/src/app/plugins/plugin.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable, EventEmitter } from '@angular/core';
2 | import { PluginServiceProxy, PluginObject } from '@shared/service-proxies/service-proxies';
3 |
4 | @Injectable()
5 | export class PluginService {
6 | pluginChange: EventEmitter = new EventEmitter();
7 | redirectUrlPrefix = 'url_';
8 |
9 | constructor(pluginService: PluginServiceProxy) {
10 | pluginService.getPluginObjectsResult().subscribe((result: PluginObject[]) => {
11 | this.pluginChange.emit(result);
12 | });
13 | }
14 |
15 | loadPlugins() {
16 | return this.pluginChange;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "Default": "Server=localhost\\SQLEXPRESS;Integrated Security=True;Persist Security Info=True;Initial Catalog=TodoDatabase;"
4 | },
5 |
6 | "App": {
7 | "ServerRootAddress": "http://localhost:21021/",
8 | "ClientRootAddress": "http://localhost:4200/",
9 | "CorsOrigins": "http://localhost:4200"
10 | },
11 | "Authentication": {
12 | "JwtBearer": {
13 | "IsEnabled": "true",
14 | "SecurityKey": "MainProject_C421AAEE0D114E9C",
15 | "Issuer": "MainProject",
16 | "Audience": "MainProject"
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/angular/src/account/account.component.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | © {{currentYear}} MainProject. Version {{versionText}}
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/js/helpers.js:
--------------------------------------------------------------------------------
1 | function hexToRgb(hexCode) {
2 | var patt = /^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/;
3 | var matches = patt.exec(hexCode);
4 | var rgb = "rgb(" + parseInt(matches[1], 16) + "," + parseInt(matches[2], 16) + "," + parseInt(matches[3], 16) + ")";
5 | return rgb;
6 | }
7 |
8 | function hexToRgba(hexCode, opacity) {
9 | var patt = /^#([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/;
10 | var matches = patt.exec(hexCode);
11 | var rgb = "rgba(" + parseInt(matches[1], 16) + "," + parseInt(matches[2], 16) + "," + parseInt(matches[3], 16) + "," + opacity + ")";
12 | return rgb;
13 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Controllers/AntiForgeryController.cs:
--------------------------------------------------------------------------------
1 | using Todo.MainProject.Controllers;
2 | using Microsoft.AspNetCore.Antiforgery;
3 |
4 | namespace Todo.MainProject.Web.Host.Controllers
5 | {
6 | public class AntiForgeryController : MainProjectControllerBase
7 | {
8 | private readonly IAntiforgery _antiforgery;
9 |
10 | public AntiForgeryController(IAntiforgery antiforgery)
11 | {
12 | _antiforgery = antiforgery;
13 | }
14 |
15 | public void GetToken()
16 | {
17 | _antiforgery.SetCookieTokenAndHeader(HttpContext);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Configuration/ConfigurationAppService.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Authorization;
3 | using Abp.Runtime.Session;
4 | using Todo.MainProject.Configuration.Dto;
5 |
6 | namespace Todo.MainProject.Configuration
7 | {
8 | [AbpAuthorize]
9 | public class ConfigurationAppService : MainProjectAppServiceBase, IConfigurationAppService
10 | {
11 | public async Task ChangeUiTheme(ChangeUiThemeInput input)
12 | {
13 | await SettingManager.ChangeSettingForUserAsync(AbpSession.ToUserIdentifier(), AppSettingNames.UiTheme, input.Theme);
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Validation/ValidationHelper.cs:
--------------------------------------------------------------------------------
1 | using Abp.Extensions;
2 | using System.Text.RegularExpressions;
3 |
4 | namespace Todo.MainProject.Validation
5 | {
6 | public static class ValidationHelper
7 | {
8 | public const string EmailRegex = @"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$";
9 |
10 | public static bool IsEmail(string value)
11 | {
12 | if (value.IsNullOrEmpty())
13 | {
14 | return false;
15 | }
16 |
17 | var regex = new Regex(EmailRegex);
18 | return regex.IsMatch(value);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "Default": "Server=localhost\\SQLEXPRESS;Integrated Security=True;Persist Security Info=True;Initial Catalog=DemoPluginDatabase;"
4 | },
5 |
6 | "App": {
7 | "ServerRootAddress": "http://localhost:21021/",
8 | "ClientRootAddress": "http://localhost:4200/",
9 | "CorsOrigins": "http://localhost:4200"
10 | },
11 | "Authentication": {
12 | "JwtBearer": {
13 | "IsEnabled": "true",
14 | "SecurityKey": "DemoPlugin_C421AAEE0D114E9C",
15 | "Issuer": "DemoPlugin",
16 | "Audience": "DemoPlugin"
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Models/TokenAuth/ExternalAuthenticateModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.Authorization.Users;
3 |
4 | namespace Todo.MainProject.Models.TokenAuth
5 | {
6 | public class ExternalAuthenticateModel
7 | {
8 | [Required]
9 | [MaxLength(UserLogin.MaxLoginProviderLength)]
10 | public string AuthProvider { get; set; }
11 |
12 | [Required]
13 | [MaxLength(UserLogin.MaxProviderKeyLength)]
14 | public string ProviderKey { get; set; }
15 |
16 | [Required]
17 | public string ProviderAccessCode { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/Startup/DemoPluginWebHostModule.cs:
--------------------------------------------------------------------------------
1 | using Abp.Modules;
2 | using Abp.Reflection.Extensions;
3 | using Microsoft.AspNetCore.Hosting;
4 |
5 | namespace Todo.DemoPlugin.Web.Host.Startup
6 | {
7 | [DependsOn(
8 | typeof(DemoPluginWebCoreModule))]
9 | public class DemoPluginWebHostModule: AbpModule
10 | {
11 | public DemoPluginWebHostModule(IHostingEnvironment env)
12 | {
13 | }
14 |
15 | public override void Initialize()
16 | {
17 | IocManager.RegisterAssemblyByConvention(typeof(DemoPluginWebHostModule).GetAssembly());
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Controllers/MainProjectControllerBase.cs:
--------------------------------------------------------------------------------
1 | using Abp.AspNetCore.Mvc.Controllers;
2 | using Abp.IdentityFramework;
3 | using Microsoft.AspNetCore.Identity;
4 |
5 | namespace Todo.MainProject.Controllers
6 | {
7 | public abstract class MainProjectControllerBase: AbpController
8 | {
9 | protected MainProjectControllerBase()
10 | {
11 | LocalizationSourceName = MainProjectConsts.LocalizationSourceName;
12 | }
13 |
14 | protected void CheckErrors(IdentityResult identityResult)
15 | {
16 | identityResult.CheckErrors(LocalizationManager);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/angular/src/hmr.ts:
--------------------------------------------------------------------------------
1 | import { NgModuleRef, ApplicationRef } from '@angular/core';
2 | import { createNewHosts } from '@angularclass/hmr';
3 |
4 | export const hmrBootstrap = (module: any, bootstrap: () => Promise>) => {
5 | let ngModule: NgModuleRef;
6 | module.hot.accept();
7 | bootstrap().then(mod => ngModule = mod);
8 | module.hot.dispose(() => {
9 | let appRef: ApplicationRef = ngModule.injector.get(ApplicationRef);
10 | let elements = appRef.components.map(c => c.location.nativeElement);
11 | let makeVisible = createNewHosts(elements);
12 | ngModule.destroy();
13 | makeVisible();
14 | });
15 | };
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Configuration/AppSettingProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abp.Configuration;
3 |
4 | namespace Todo.MainProject.Configuration
5 | {
6 | public class AppSettingProvider : SettingProvider
7 | {
8 | public override IEnumerable GetSettingDefinitions(SettingDefinitionProviderContext context)
9 | {
10 | return new[]
11 | {
12 | new SettingDefinition(AppSettingNames.UiTheme, "red", scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User, isVisibleToClients: true),
13 | };
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Editions/EditionManager.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Editions;
2 | using Abp.Application.Features;
3 | using Abp.Domain.Repositories;
4 |
5 | namespace Todo.MainProject.Editions
6 | {
7 | public class EditionManager : AbpEditionManager
8 | {
9 | public const string DefaultEditionName = "Standard";
10 |
11 | public EditionManager(
12 | IRepository editionRepository,
13 | IAbpZeroFeatureValueStore featureValueStore)
14 | : base(
15 | editionRepository,
16 | featureValueStore
17 | )
18 | {
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Models/TokenAuth/AuthenticateModel.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.Authorization.Users;
3 | using Todo.MainProject.Authorization.Users;
4 |
5 | namespace Todo.MainProject.Models.TokenAuth
6 | {
7 | public class AuthenticateModel
8 | {
9 | [Required]
10 | [MaxLength(AbpUserBase.MaxEmailAddressLength)]
11 | public string UserNameOrEmailAddress { get; set; }
12 |
13 | [Required]
14 | [MaxLength(User.MaxPlainPasswordLength)]
15 | public string Password { get; set; }
16 |
17 | public bool RememberClient { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/angular/src/shared/core.less:
--------------------------------------------------------------------------------
1 | /* General */
2 |
3 | .clickable-item {
4 | cursor: pointer;
5 | }
6 |
7 | .text-bold {
8 | font-weight: bold;
9 | }
10 |
11 | /* Portlet */
12 | .portlet.light > .portlet-title .inputs.inputs-full-width {
13 | display: block;
14 | float: none;
15 | }
16 |
17 | .famfamfam-flags {
18 | display: inline-block;
19 | }
20 |
21 | topbar-languageswitch {
22 | float: left;
23 | margin-top: 25px;
24 | margin-left: 10px;
25 |
26 | a {
27 | text-decoration: none;
28 | color: #fff;
29 |
30 | &:hover {
31 | text-decoration: none;
32 | color: #fff;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/angular/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | MainProject
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/MultiTenancy/Dto/EditTenantDto.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.AutoMapper;
3 | using Abp.MultiTenancy;
4 |
5 | namespace Todo.MainProject.MultiTenancy.Dto
6 | {
7 | [AutoMapTo(typeof(Tenant))]
8 | public class EditTenantDto
9 | {
10 | [Required]
11 | [StringLength(AbpTenantBase.MaxTenancyNameLength)]
12 | [RegularExpression(Tenant.TenancyNameRegex)]
13 | public string TenancyName { get; set; }
14 |
15 | [Required]
16 | [StringLength(Tenant.MaxNameLength)]
17 | public string Name { get; set; }
18 |
19 | public bool IsActive { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/DependencyInjection/ServiceCollectionRegistrar.cs:
--------------------------------------------------------------------------------
1 | using Abp.Dependency;
2 | using Todo.MainProject.Identity;
3 | using Castle.Windsor.MsDependencyInjection;
4 | using Microsoft.Extensions.DependencyInjection;
5 |
6 | namespace Todo.MainProject.Migrator.DependencyInjection
7 | {
8 | public static class ServiceCollectionRegistrar
9 | {
10 | public static void Register(IIocManager iocManager)
11 | {
12 | var services = new ServiceCollection();
13 |
14 | IdentityRegistrar.Register(services);
15 |
16 | WindsorRegistrationHelper.CreateServiceProvider(iocManager.IocContainer, services);
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/angular/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 |
7 | # dependencies
8 | /node_modules
9 |
10 | # IDEs and editors
11 | /.idea
12 | .project
13 | .classpath
14 | .c9/
15 | *.launch
16 | .settings/
17 | .vs/
18 | [Oo]bj/
19 | bin/
20 |
21 | # IDE - VSCode
22 | .vscode/*
23 | !.vscode/settings.json
24 | !.vscode/tasks.json
25 | !.vscode/launch.json
26 | !.vscode/extensions.json
27 |
28 | # misc
29 | /.sass-cache
30 | /connect.lock
31 | /coverage/*
32 | /libpeerconnection.log
33 | npm-debug.log
34 | testem.log
35 | /typings
36 |
37 | # e2e
38 | /e2e/*.js
39 | /e2e/*.map
40 |
41 | #System Files
42 | .DS_Store
43 | Thumbs.db
44 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/MainProjectDbContextConfigurer.cs:
--------------------------------------------------------------------------------
1 | using System.Data.Common;
2 | using Microsoft.EntityFrameworkCore;
3 |
4 | namespace Todo.MainProject.EntityFrameworkCore
5 | {
6 | public static class MainProjectDbContextConfigurer
7 | {
8 | public static void Configure(DbContextOptionsBuilder builder, string connectionString)
9 | {
10 | builder.UseSqlServer(connectionString);
11 | }
12 |
13 | public static void Configure(DbContextOptionsBuilder builder, DbConnection connection)
14 | {
15 | builder.UseSqlServer(connection);
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/angular/src/shared/service-proxies/service-proxy.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 |
3 | import * as ApiServiceProxies from './service-proxies';
4 |
5 | @NgModule({
6 | providers: [
7 | ApiServiceProxies.RoleServiceProxy,
8 | ApiServiceProxies.SessionServiceProxy,
9 | ApiServiceProxies.TenantServiceProxy,
10 | ApiServiceProxies.UserServiceProxy,
11 | ApiServiceProxies.TokenAuthServiceProxy,
12 | ApiServiceProxies.AccountServiceProxy,
13 | ApiServiceProxies.ConfigurationServiceProxy,
14 | ApiServiceProxies.PluginServiceProxy,
15 | ApiServiceProxies.CalculationServiceServiceProxy
16 | ]
17 | })
18 | export class ServiceProxyModule { }
19 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/MainProjectDbContext.cs:
--------------------------------------------------------------------------------
1 | using Abp.Zero.EntityFrameworkCore;
2 | using Todo.MainProject.Authorization.Roles;
3 | using Todo.MainProject.Authorization.Users;
4 | using Todo.MainProject.MultiTenancy;
5 | using Microsoft.EntityFrameworkCore;
6 |
7 | namespace Todo.MainProject.EntityFrameworkCore
8 | {
9 | public class MainProjectDbContext : AbpZeroDbContext
10 | {
11 | /* Define an IDbSet for each entity of the application */
12 |
13 | public MainProjectDbContext(DbContextOptions options)
14 | : base(options)
15 | {
16 |
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/plugin-downloader/Todo.PluginDownloader/Properties/PublishProfiles/FolderProfile.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | FileSystem
9 | Release
10 | netcoreapp2.0
11 | bin\Release\PublishOutput
12 |
13 |
--------------------------------------------------------------------------------
/angular/src/root-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { Routes, RouterModule } from '@angular/router';
3 |
4 | const routes: Routes = [
5 | { path: '', redirectTo: '/app/home', pathMatch: 'full' },
6 | {
7 | path: 'account',
8 | loadChildren: 'account/account.module#AccountModule', //Lazy load account module
9 | data: { preload: true }
10 | },
11 | {
12 | path: 'app',
13 | loadChildren: 'app/app.module#AppModule', //Lazy load account module
14 | data: { preload: true }
15 | }
16 | ];
17 |
18 | @NgModule({
19 | imports: [RouterModule.forRoot(routes)],
20 | exports: [RouterModule],
21 | providers: []
22 | })
23 | export class RootRoutingModule { }
--------------------------------------------------------------------------------
/angular/src/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": false,
4 | "emitDecoratorMetadata": true,
5 | "experimentalDecorators": true,
6 | "lib": [ "es6", "dom" ],
7 | "mapRoot": "./",
8 | "module": "es6",
9 | "moduleResolution": "node",
10 | "outDir": "../dist/out-tsc",
11 | "sourceMap": true,
12 | "target": "es5",
13 | "typeRoots": [
14 | "../node_modules/@types"
15 | ],
16 | "baseUrl": ".",
17 | "paths": {
18 | "@abp/*": [ "../node_modules/abp-ng2-module/src/*" ],
19 | "@app/*": [ "./app/*" ],
20 | "@shared/*": [ "./shared/*" ],
21 | "@node_modules/*": [ "../node_modules/*" ]
22 | }
23 | },
24 | "exclude": [
25 | "node_modules"
26 | ]
27 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Roles/RoleStore.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization.Roles;
2 | using Abp.Domain.Repositories;
3 | using Abp.Domain.Uow;
4 | using Todo.MainProject.Authorization.Users;
5 |
6 | namespace Todo.MainProject.Authorization.Roles
7 | {
8 | public class RoleStore : AbpRoleStore
9 | {
10 | public RoleStore(
11 | IUnitOfWorkManager unitOfWorkManager,
12 | IRepository roleRepository,
13 | IRepository rolePermissionSettingRepository)
14 | : base(
15 | unitOfWorkManager,
16 | roleRepository,
17 | rolePermissionSettingRepository)
18 | {
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/log4net.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/plugin-downloader/Todo.PluginDownloader/Todo.PluginDownloader.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.0
6 | AnyCPU;x64
7 |
8 |
9 |
10 | x64
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/log4net.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Users/UserClaimsPrincipalFactory.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Todo.MainProject.Authorization.Roles;
3 | using Microsoft.AspNetCore.Identity;
4 | using Microsoft.Extensions.Options;
5 |
6 | namespace Todo.MainProject.Authorization.Users
7 | {
8 | public class UserClaimsPrincipalFactory : AbpUserClaimsPrincipalFactory
9 | {
10 | public UserClaimsPrincipalFactory(
11 | UserManager userManager,
12 | RoleManager roleManager,
13 | IOptions optionsAccessor)
14 | : base(
15 | userManager,
16 | roleManager,
17 | optionsAccessor)
18 | {
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/angular/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:49486/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Todo.MainProject.AngularUI": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:49487/"
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/angular/src/shared/helpers/SignalRHelper.ts:
--------------------------------------------------------------------------------
1 | import { AppConsts } from '@shared/AppConsts';
2 | import { UtilsService } from '@abp/utils/utils.service';
3 |
4 | export class SignalRHelper {
5 | static initSignalR(): void {
6 |
7 | jQuery.getScript(AppConsts.remoteServiceBaseUrl + '/signalr/hubs', () => {
8 |
9 | $.connection.hub.url = AppConsts.remoteServiceBaseUrl + "/signalr";
10 |
11 | var encryptedAuthToken = new UtilsService().getCookieValue(AppConsts.authorization.encrptedAuthTokenName);
12 | $.connection.hub.qs = AppConsts.authorization.encrptedAuthTokenName + "=" + encodeURIComponent(encryptedAuthToken);
13 |
14 | jQuery.getScript(AppConsts.appBaseUrl + '/assets/abp/abp.signalr.js');
15 | });
16 | }
17 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Todo.DemoPlugin.AngularUI
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | BuildWebHost(args).Run();
18 | }
19 |
20 | public static IWebHost BuildWebHost(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup()
23 | .Build();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/ExternalLoginProviderInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Todo.MainProject.Authentication.External
4 | {
5 | public class ExternalLoginProviderInfo
6 | {
7 | public string Name { get; set; }
8 |
9 | public string ClientId { get; set; }
10 |
11 | public string ClientSecret { get; set; }
12 |
13 | public Type ProviderApiType { get; set; }
14 |
15 | public ExternalLoginProviderInfo(string name, string clientId, string clientSecret, Type providerApiType)
16 | {
17 | Name = name;
18 | ClientId = clientId;
19 | ClientSecret = clientSecret;
20 | ProviderApiType = providerApiType;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/MultiTenancy/Dto/TenantDto.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.Application.Services.Dto;
3 | using Abp.AutoMapper;
4 | using Abp.MultiTenancy;
5 |
6 | namespace Todo.MainProject.MultiTenancy.Dto
7 | {
8 | [AutoMapTo(typeof(Tenant)), AutoMapFrom(typeof(Tenant))]
9 | public class TenantDto : EntityDto
10 | {
11 | [Required]
12 | [StringLength(AbpTenantBase.MaxTenancyNameLength)]
13 | [RegularExpression(Tenant.TenancyNameRegex)]
14 | public string TenancyName { get; set; }
15 |
16 | [Required]
17 | [StringLength(Tenant.MaxNameLength)]
18 | public string Name { get; set; }
19 |
20 | public bool IsActive {get; set;}
21 | }
22 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/log4net.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/AbpZeroDbMigrator.cs:
--------------------------------------------------------------------------------
1 | using Abp.Domain.Uow;
2 | using Abp.EntityFrameworkCore;
3 | using Abp.MultiTenancy;
4 | using Abp.Zero.EntityFrameworkCore;
5 |
6 | namespace Todo.MainProject.EntityFrameworkCore
7 | {
8 | public class AbpZeroDbMigrator : AbpZeroDbMigrator
9 | {
10 | public AbpZeroDbMigrator(
11 | IUnitOfWorkManager unitOfWorkManager,
12 | IDbPerTenantConnectionStringResolver connectionStringResolver,
13 | IDbContextResolver dbContextResolver) :
14 | base(
15 | unitOfWorkManager,
16 | connectionStringResolver,
17 | dbContextResolver)
18 | {
19 |
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/angular/src/app/layout/sidebar-footer.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Injector, ViewEncapsulation } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 |
4 | @Component({
5 | templateUrl: './sidebar-footer.component.html',
6 | selector: 'sidebar-footer',
7 | encapsulation: ViewEncapsulation.None
8 | })
9 | export class SideBarFooterComponent extends AppComponentBase {
10 |
11 | versionText: string;
12 | currentYear: number;
13 |
14 | constructor(
15 | injector: Injector
16 | ) {
17 | super(injector);
18 |
19 | this.currentYear = new Date().getFullYear();
20 | this.versionText = this.appSession.application.version + ' [' + this.appSession.application.releaseDate.format('YYYYDDMM') + ']';
21 | }
22 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/InitialHostDbBuilder.cs:
--------------------------------------------------------------------------------
1 | namespace Todo.MainProject.EntityFrameworkCore.Seed.Host
2 | {
3 | public class InitialHostDbBuilder
4 | {
5 | private readonly MainProjectDbContext _context;
6 |
7 | public InitialHostDbBuilder(MainProjectDbContext context)
8 | {
9 | _context = context;
10 | }
11 |
12 | public void Create()
13 | {
14 | new DefaultEditionCreator(_context).Create();
15 | new DefaultLanguagesCreator(_context).Create();
16 | new HostRoleAndUserCreator(_context).Create();
17 | new DefaultSettingsCreator(_context).Create();
18 |
19 | _context.SaveChanges();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:21021/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Todo.MainProject.Web.Host": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "launchUrl": "http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Identity/SecurityStampValidator.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Todo.MainProject.Authorization.Roles;
3 | using Todo.MainProject.Authorization.Users;
4 | using Todo.MainProject.MultiTenancy;
5 | using Microsoft.AspNetCore.Authentication;
6 | using Microsoft.AspNetCore.Identity;
7 | using Microsoft.Extensions.Options;
8 |
9 | namespace Todo.MainProject.Identity
10 | {
11 | public class SecurityStampValidator : AbpSecurityStampValidator
12 | {
13 | public SecurityStampValidator(
14 | IOptions options,
15 | SignInManager signInManager,
16 | ISystemClock systemClock)
17 | : base(options, signInManager, systemClock)
18 | {
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Host/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:21021/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Todo.MainProject.Web.Host": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "launchUrl": "http://localhost:5000",
22 | "environmentVariables": {
23 | "ASPNETCORE_ENVIRONMENT": "Development"
24 | }
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "iisSettings": {
3 | "windowsAuthentication": false,
4 | "anonymousAuthentication": true,
5 | "iisExpress": {
6 | "applicationUrl": "http://localhost:62758/",
7 | "sslPort": 0
8 | }
9 | },
10 | "profiles": {
11 | "IIS Express": {
12 | "commandName": "IISExpress",
13 | "launchBrowser": true,
14 | "environmentVariables": {
15 | "ASPNETCORE_ENVIRONMENT": "Development"
16 | }
17 | },
18 | "Todo.DemoPlugin.AngularUI": {
19 | "commandName": "Project",
20 | "launchBrowser": true,
21 | "environmentVariables": {
22 | "ASPNETCORE_ENVIRONMENT": "Development"
23 | },
24 | "applicationUrl": "http://localhost:62759/"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/angular/src/app/layout/sidebar-user-area.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |

4 |
5 |
6 |
{{shownLoginName}}
7 |
{{appSession.user.emailAddress}}
8 |
9 | keyboard_arrow_down
10 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Services/PluginFileService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abp.Resources.Embedded;
3 | using Microsoft.Extensions.FileProviders;
4 |
5 | namespace Todo.MainProject.Web.Host.Services
6 | {
7 | public class PluginFileService : IPluginFileService
8 | {
9 | private IFileProvider _fileReader;
10 |
11 | public PluginFileService()
12 | {
13 | _fileReader = null;
14 | }
15 |
16 | public IDirectoryContents GetFilesFromProvider(string path)
17 | {
18 | var contents = _fileReader.GetDirectoryContents(path);
19 | return contents;
20 | }
21 |
22 | public void InjectFileProvider(IFileProvider fileReader)
23 | {
24 | _fileReader = fileReader;
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/angular/src/account/account-routing.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 | import { LoginComponent } from './login/login.component';
4 | import { RegisterComponent } from './register/register.component';
5 | import { AccountComponent } from './account.component';
6 |
7 | @NgModule({
8 | imports: [
9 | RouterModule.forChild([
10 | {
11 | path: '',
12 | component: AccountComponent,
13 | children: [
14 | { path: 'login', component: LoginComponent },
15 | { path: 'register', component: RegisterComponent }
16 | ]
17 | }
18 | ])
19 | ],
20 | exports: [
21 | RouterModule
22 | ]
23 | })
24 | export class AccountRoutingModule { }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Roles/Role.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.Authorization.Roles;
3 | using Todo.MainProject.Authorization.Users;
4 |
5 | namespace Todo.MainProject.Authorization.Roles
6 | {
7 | public class Role : AbpRole
8 | {
9 | public const int MaxDescriptionLength = 5000;
10 |
11 | public Role()
12 | {
13 | }
14 |
15 | public Role(int? tenantId, string displayName)
16 | : base(tenantId, displayName)
17 | {
18 |
19 | }
20 |
21 | public Role(int? tenantId, string name, string displayName)
22 | : base(tenantId, name, displayName)
23 | {
24 |
25 | }
26 |
27 | [MaxLength(MaxDescriptionLength)]
28 | public string Description {get; set;}
29 | }
30 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Roles/Dto/RoleMapProfile.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Abp.Authorization.Roles;
3 | using Abp.Authorization.Users;
4 | using Abp.Dependency;
5 | using Abp.Domain.Repositories;
6 | using Todo.MainProject.Authorization.Roles;
7 | using AutoMapper;
8 |
9 | namespace Todo.MainProject.Roles.Dto
10 | {
11 | public class RoleMapProfile : Profile
12 | {
13 | public RoleMapProfile()
14 | {
15 | // Role and permission
16 | CreateMap().ConvertUsing(r => r.Name);
17 | CreateMap().ConvertUsing(r => r.Name);
18 |
19 | CreateMap().ForMember(x => x.Permissions, opt => opt.Ignore());
20 | CreateMap().ForMember(x => x.Permissions, opt => opt.Ignore());
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/Todo.DemoPlugin.AngularUI.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 | true
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/AppVersionHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using Abp.Reflection.Extensions;
4 |
5 | namespace Todo.MainProject
6 | {
7 | ///
8 | /// Central point for application version.
9 | ///
10 | public class AppVersionHelper
11 | {
12 | ///
13 | /// Gets current version of the application.
14 | /// It's also shown in the web page.
15 | ///
16 | public const string Version = "3.0.0.0";
17 |
18 | ///
19 | /// Gets release (last build) date of the application.
20 | /// It's shown in the web page.
21 | ///
22 | public static DateTime ReleaseDate
23 | {
24 | get { return new FileInfo(typeof(AppVersionHelper).GetAssembly().Location).LastWriteTime; }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/Migrations/20170703134115_Remove_IsActive_From_Role.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Microsoft.EntityFrameworkCore.Migrations;
4 |
5 | namespace Todo.MainProject.Migrations
6 | {
7 | public partial class Remove_IsActive_From_Role : Migration
8 | {
9 | protected override void Up(MigrationBuilder migrationBuilder)
10 | {
11 | migrationBuilder.DropColumn(
12 | name: "IsActive",
13 | table: "AbpRoles");
14 | }
15 |
16 | protected override void Down(MigrationBuilder migrationBuilder)
17 | {
18 | migrationBuilder.AddColumn(
19 | name: "IsActive",
20 | table: "AbpRoles",
21 | nullable: false,
22 | defaultValue: false);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/External/ExternalAuthProviderApiBase.cs:
--------------------------------------------------------------------------------
1 | using System.Threading.Tasks;
2 | using Abp.Dependency;
3 |
4 | namespace Todo.MainProject.Authentication.External
5 | {
6 | public abstract class ExternalAuthProviderApiBase : IExternalAuthProviderApi, ITransientDependency
7 | {
8 | public ExternalLoginProviderInfo ProviderInfo { get; set; }
9 |
10 | public void Initialize(ExternalLoginProviderInfo providerInfo)
11 | {
12 | ProviderInfo = providerInfo;
13 | }
14 |
15 | public async Task IsValidUser(string userId, string accessCode)
16 | {
17 | var userInfo = await GetUserInfo(accessCode);
18 | return userInfo.ProviderKey == userId;
19 | }
20 |
21 | public abstract Task GetUserInfo(string accessCode);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './e2e/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: 'e2e/tsconfig.e2e.json'
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/angular/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | /*global jasmine */
5 | var SpecReporter = require('jasmine-spec-reporter');
6 |
7 | exports.config = {
8 | allScriptsTimeout: 11000,
9 | specs: [
10 | './e2e/**/*.e2e-spec.ts'
11 | ],
12 | capabilities: {
13 | 'browserName': 'chrome'
14 | },
15 | directConnect: true,
16 | baseUrl: 'http://localhost:4200/',
17 | framework: 'jasmine',
18 | jasmineNodeOpts: {
19 | showColors: true,
20 | defaultTimeoutInterval: 30000,
21 | print: function() {}
22 | },
23 | useAllAngular2AppRoots: true,
24 | beforeLaunch: function() {
25 | require('ts-node').register({
26 | project: 'e2e'
27 | });
28 | },
29 | onPrepare: function() {
30 | jasmine.getEnv().addReporter(new SpecReporter());
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/angular/src/app/layout/sidebar-user-area.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Injector, ViewEncapsulation } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 | import { AppAuthService } from '@shared/auth/app-auth.service';
4 |
5 | @Component({
6 | templateUrl: './sidebar-user-area.component.html',
7 | selector: 'sidebar-user-area',
8 | encapsulation: ViewEncapsulation.None
9 | })
10 | export class SideBarUserAreaComponent extends AppComponentBase implements OnInit {
11 |
12 | shownLoginName: string = "";
13 |
14 | constructor(
15 | injector: Injector,
16 | private _authService: AppAuthService
17 | ) {
18 | super(injector);
19 | }
20 |
21 | ngOnInit() {
22 | this.shownLoginName = this.appSession.getShownLoginName();
23 | }
24 |
25 | logout(): void {
26 | this._authService.logout();
27 | }
28 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Roles/AppRoleConfig.cs:
--------------------------------------------------------------------------------
1 | using Abp.MultiTenancy;
2 | using Abp.Zero.Configuration;
3 |
4 | namespace Todo.MainProject.Authorization.Roles
5 | {
6 | public static class AppRoleConfig
7 | {
8 | public static void Configure(IRoleManagementConfig roleManagementConfig)
9 | {
10 | //Static host roles
11 |
12 | roleManagementConfig.StaticRoles.Add(
13 | new StaticRoleDefinition(
14 | StaticRoleNames.Host.Admin,
15 | MultiTenancySides.Host)
16 | );
17 |
18 | //Static tenant roles
19 |
20 | roleManagementConfig.StaticRoles.Add(
21 | new StaticRoleDefinition(
22 | StaticRoleNames.Tenants.Admin,
23 | MultiTenancySides.Tenant)
24 | );
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/MultiTenancy/TenantManager.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Features;
2 | using Abp.Domain.Repositories;
3 | using Abp.MultiTenancy;
4 | using Todo.MainProject.Authorization.Users;
5 | using Todo.MainProject.Editions;
6 |
7 | namespace Todo.MainProject.MultiTenancy
8 | {
9 | public class TenantManager : AbpTenantManager
10 | {
11 | public TenantManager(
12 | IRepository tenantRepository,
13 | IRepository tenantFeatureRepository,
14 | EditionManager editionManager,
15 | IAbpZeroFeatureValueStore featureValueStore
16 | )
17 | : base(
18 | tenantRepository,
19 | tenantFeatureRepository,
20 | editionManager,
21 | featureValueStore
22 | )
23 | {
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/MainProjectAuthorizationProvider.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Abp.Localization;
3 | using Abp.MultiTenancy;
4 |
5 | namespace Todo.MainProject.Authorization
6 | {
7 | public class MainProjectAuthorizationProvider : AuthorizationProvider
8 | {
9 | public override void SetPermissions(IPermissionDefinitionContext context)
10 | {
11 | context.CreatePermission(PermissionNames.Pages_Users, L("Users"));
12 | context.CreatePermission(PermissionNames.Pages_Roles, L("Roles"));
13 | context.CreatePermission(PermissionNames.Pages_Tenants, L("Tenants"), multiTenancySides: MultiTenancySides.Host);
14 | }
15 |
16 | private static ILocalizableString L(string name)
17 | {
18 | return new LocalizableString(name, MainProjectConsts.LocalizationSourceName);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/Migrations/20170804083601_Upgraded_To_Abp_v2.2.2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Microsoft.EntityFrameworkCore.Migrations;
4 |
5 | namespace Todo.MainProject.Migrations
6 | {
7 | public partial class Upgraded_To_Abp_v222 : Migration
8 | {
9 | protected override void Up(MigrationBuilder migrationBuilder)
10 | {
11 | migrationBuilder.AddColumn(
12 | name: "IsDeleted",
13 | table: "AbpUserOrganizationUnits",
14 | nullable: false,
15 | defaultValue: false);
16 | }
17 |
18 | protected override void Down(MigrationBuilder migrationBuilder)
19 | {
20 | migrationBuilder.DropColumn(
21 | name: "IsDeleted",
22 | table: "AbpUserOrganizationUnits");
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { HttpClient } from '@angular/common/http';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css']
8 | })
9 | export class AppComponent {
10 | title = 'DemoPlugin';
11 | x = 0;
12 | y = 0;
13 | answer = { values : 0 };
14 |
15 | constructor(private http: HttpClient) {}
16 |
17 | onKeyX(event: any) {
18 | this.x = Number(event.target.value);
19 | }
20 |
21 | onKeyY(event: any) {
22 | this.y = Number(event.target.value);
23 | }
24 |
25 | onClickAdd() {
26 | this.http.post('http://localhost:21021/api/services/app/CalculationService/Calculation_Add?x=' + this.x + '&y=' + this.y, {})
27 | .subscribe(data => {
28 | this.answer.values = data['result'];
29 | });
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Todo.MainProject.Application.csproj:
--------------------------------------------------------------------------------
1 | 1.0.0.0netcoreapp2.0$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;Todo.MainProject.ApplicationTodo.MainProject.ApplicationfalsefalsefalseTodo.MainProject
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Todo.MainProject.Core")]
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("0fa75a5b-ab83-4fd0-b545-279774c01e87")]
20 |
--------------------------------------------------------------------------------
/aspnet-core/test/Todo.MainProject.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Todo.MainProject.Tests")]
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("0d4c5d00-c144-4213-a007-4b8944113ab1")]
20 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Todo.MainProject.Migrator")]
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("880b3591-e057-46fe-b525-10bd83828b93")]
20 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyConfiguration("")]
9 | [assembly: AssemblyCompany("")]
10 | [assembly: AssemblyProduct("Todo.MainProject.Application")]
11 | [assembly: AssemblyTrademark("")]
12 |
13 | // Setting ComVisible to false makes the types in this assembly not visible
14 | // to COM components. If you need to access a type in this assembly from
15 | // COM, set the ComVisible attribute to true on that type.
16 | [assembly: ComVisible(false)]
17 |
18 | // The following GUID is for the ID of the typelib if this project is exposed to COM
19 | [assembly: Guid("3870c648-4aea-4b85-ba3f-f2f63b96136a")]
20 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Roles/Dto/CreateRoleDto.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel.DataAnnotations;
3 | using Abp.AutoMapper;
4 | using Todo.MainProject.Authorization.Roles;
5 |
6 | using Abp.Authorization.Roles;
7 |
8 | namespace Todo.MainProject.Roles.Dto
9 | {
10 | [AutoMapTo(typeof(Role))]
11 | public class CreateRoleDto
12 | {
13 | [Required]
14 | [StringLength(AbpRoleBase.MaxNameLength)]
15 | public string Name { get; set; }
16 |
17 | [Required]
18 | [StringLength(AbpRoleBase.MaxDisplayNameLength)]
19 | public string DisplayName { get; set; }
20 |
21 | public string NormalizedName { get; set; }
22 |
23 | [StringLength(Role.MaxDescriptionLength)]
24 | public string Description { get; set; }
25 |
26 | public bool IsStatic { get; set; }
27 |
28 | public List Permissions { get; set; }
29 | }
30 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Users/User.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Abp.Authorization.Users;
3 | using Abp.Extensions;
4 |
5 | namespace Todo.MainProject.Authorization.Users
6 | {
7 | public class User : AbpUser
8 | {
9 | public const string DefaultPassword = "123qwe";
10 |
11 | public static string CreateRandomPassword()
12 | {
13 | return Guid.NewGuid().ToString("N").Truncate(16);
14 | }
15 |
16 | public static User CreateTenantAdminUser(int tenantId, string emailAddress)
17 | {
18 | var user = new User
19 | {
20 | TenantId = tenantId,
21 | UserName = AdminUserName,
22 | Name = AdminUserName,
23 | Surname = AdminUserName,
24 | EmailAddress = emailAddress
25 | };
26 |
27 | user.SetNormalizedNames();
28 |
29 | return user;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Localization/MainProjectLocalizationConfigurer.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Abp.Configuration.Startup;
3 | using Abp.Localization.Dictionaries;
4 | using Abp.Localization.Dictionaries.Xml;
5 | using Abp.Reflection.Extensions;
6 |
7 | namespace Todo.MainProject.Localization
8 | {
9 | public static class MainProjectLocalizationConfigurer
10 | {
11 | public static void Configure(ILocalizationConfiguration localizationConfiguration)
12 | {
13 | localizationConfiguration.Sources.Add(
14 | new DictionaryBasedLocalizationSource(MainProjectConsts.LocalizationSourceName,
15 | new XmlEmbeddedFileLocalizationDictionaryProvider(
16 | typeof(MainProjectLocalizationConfigurer).GetAssembly(),
17 | "Todo.MainProject.Localization.SourceFiles"
18 | )
19 | )
20 | );
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Startup/MainProjectWebHostModule.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Abp.Modules;
3 | using Abp.Reflection.Extensions;
4 | using Todo.MainProject.Configuration;
5 | using Microsoft.AspNetCore.Hosting;
6 | using Microsoft.Extensions.Configuration;
7 |
8 | namespace Todo.MainProject.Web.Host.Startup
9 | {
10 | [DependsOn(
11 | typeof(MainProjectWebCoreModule))]
12 | public class MainProjectWebHostModule: AbpModule
13 | {
14 | private readonly IHostingEnvironment _env;
15 | private readonly IConfigurationRoot _appConfiguration;
16 |
17 | public MainProjectWebHostModule(IHostingEnvironment env)
18 | {
19 | _env = env;
20 | _appConfiguration = env.GetAppConfiguration();
21 | }
22 |
23 | public override void Initialize()
24 | {
25 | IocManager.RegisterAssemblyByConvention(typeof(MainProjectWebHostModule).GetAssembly());
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/MultiTenancy/Dto/CreateTenantDto.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using Abp.Authorization.Users;
3 | using Abp.AutoMapper;
4 | using Abp.MultiTenancy;
5 |
6 | namespace Todo.MainProject.MultiTenancy.Dto
7 | {
8 | [AutoMapTo(typeof(Tenant))]
9 | public class CreateTenantDto
10 | {
11 | [Required]
12 | [StringLength(AbpTenantBase.MaxTenancyNameLength)]
13 | [RegularExpression(Tenant.TenancyNameRegex)]
14 | public string TenancyName { get; set; }
15 |
16 | [Required]
17 | [StringLength(Tenant.MaxNameLength)]
18 | public string Name { get; set; }
19 |
20 | [Required]
21 | [StringLength(AbpUserBase.MaxEmailAddressLength)]
22 | public string AdminEmailAddress { get; set; }
23 |
24 | [MaxLength(AbpTenantBase.MaxConnectionStringLength)]
25 | public string ConnectionString { get; set; }
26 |
27 | public bool IsActive {get; set;}
28 | }
29 | }
--------------------------------------------------------------------------------
/angular/src/shared/animations/routerTransition.ts:
--------------------------------------------------------------------------------
1 | import { trigger, state, animate, style, transition } from '@angular/core';
2 |
3 | export function appModuleAnimation() {
4 | return slideFromBottom();
5 | }
6 |
7 | export function accountModuleAnimation() {
8 | return slideFromUp();
9 | }
10 |
11 | export function slideFromBottom() {
12 | return trigger('routerTransition', [
13 | state('void', style({ 'padding-top': '20px', opacity: '0' })),
14 | state('*', style({ 'padding-top': '0px', opacity: '1' })),
15 | transition(':enter', [
16 | animate('0.33s ease-out', style({ opacity: '1', 'padding-top': '0px' }))
17 | ])
18 | ]);
19 | }
20 |
21 | export function slideFromUp() {
22 | return trigger('routerTransition', [
23 | state('void', style({ 'margin-top': '10px', opacity: '0' })),
24 | state('*', style({ 'margin-top': '0px', opacity: '1' })),
25 | transition(':enter', [
26 | animate('0.3s ease-out', style({ opacity: '1', 'margin-top': '0px' }))
27 | ])
28 | ]);
29 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Authentication/JwtBearer/JwtTokenMiddleware.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Authentication;
2 | using Microsoft.AspNetCore.Authentication.JwtBearer;
3 | using Microsoft.AspNetCore.Builder;
4 |
5 | namespace Todo.MainProject.Authentication.JwtBearer
6 | {
7 | public static class JwtTokenMiddleware
8 | {
9 | public static IApplicationBuilder UseJwtTokenMiddleware(this IApplicationBuilder app)
10 | {
11 | return app.Use(async (ctx, next) =>
12 | {
13 | if (ctx.User.Identity?.IsAuthenticated != true)
14 | {
15 | var result = await ctx.AuthenticateAsync(JwtBearerDefaults.AuthenticationScheme);
16 | if (result.Succeeded && result.Principal != null)
17 | {
18 | ctx.User = result.Principal;
19 | }
20 | }
21 |
22 | await next();
23 | });
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/angular/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.AspNetCore.Http;
8 | using Microsoft.Extensions.DependencyInjection;
9 |
10 | namespace Todo.MainProject.AngularUI
11 | {
12 | public class Startup
13 | {
14 | // This method gets called by the runtime. Use this method to add services to the container.
15 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
16 | public void ConfigureServices(IServiceCollection services)
17 | {
18 | }
19 |
20 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
21 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
22 | {
23 | app.UseDefaultFiles();
24 | app.UseStaticFiles();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-red.min.css:
--------------------------------------------------------------------------------
1 | .theme-red .navbar{background-color:#f44336;}.theme-red .navbar-brand{color:#fff;}.theme-red .navbar-brand:hover{color:#fff;}.theme-red .navbar-brand:active{color:#fff;}.theme-red .navbar-brand:focus{color:#fff;}.theme-red .nav>li>a{color:#fff;}.theme-red .nav>li>a:hover{background-color:transparent;}.theme-red .nav>li>a:focus{background-color:transparent;}.theme-red .nav .open>a{background-color:transparent;}.theme-red .nav .open>a:hover{background-color:transparent;}.theme-red .nav .open>a:focus{background-color:transparent;}.theme-red .bars{color:#fff;}.theme-red .sidebar .menu .list li.active{background-color:transparent;}.theme-red .sidebar .menu .list li.active>:first-child i,.theme-red .sidebar .menu .list li.active>:first-child span{color:#f44336;}.theme-red .sidebar .menu .list .toggled{background-color:transparent;}.theme-red .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-red .sidebar .legal{background-color:#fff;}.theme-red .sidebar .legal .copyright a{color:#f44336 !important;}
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Roles/Dto/RoleDto.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel.DataAnnotations;
3 | using Abp.Application.Services.Dto;
4 | using Abp.AutoMapper;
5 | using Todo.MainProject.Authorization.Roles;
6 | using Abp.Authorization.Roles;
7 |
8 | namespace Todo.MainProject.Roles.Dto
9 | {
10 | [AutoMapFrom(typeof(Role)), AutoMapTo(typeof(Role))]
11 | public class RoleDto : EntityDto
12 | {
13 | [Required]
14 | [StringLength(AbpRoleBase.MaxNameLength)]
15 | public string Name { get; set; }
16 |
17 | [Required]
18 | [StringLength(AbpRoleBase.MaxDisplayNameLength)]
19 | public string DisplayName { get; set; }
20 |
21 | public string NormalizedName { get; set; }
22 |
23 | [StringLength(Role.MaxDescriptionLength)]
24 | public string Description { get; set; }
25 |
26 | public bool IsStatic { get; set; }
27 |
28 | public List Permissions { get; set; }
29 | }
30 | }
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-blue.min.css:
--------------------------------------------------------------------------------
1 | .theme-blue .navbar{background-color:#2196f3;}.theme-blue .navbar-brand{color:#fff;}.theme-blue .navbar-brand:hover{color:#fff;}.theme-blue .navbar-brand:active{color:#fff;}.theme-blue .navbar-brand:focus{color:#fff;}.theme-blue .nav>li>a{color:#fff;}.theme-blue .nav>li>a:hover{background-color:transparent;}.theme-blue .nav>li>a:focus{background-color:transparent;}.theme-blue .nav .open>a{background-color:transparent;}.theme-blue .nav .open>a:hover{background-color:transparent;}.theme-blue .nav .open>a:focus{background-color:transparent;}.theme-blue .bars{color:#fff;}.theme-blue .sidebar .menu .list li.active{background-color:transparent;}.theme-blue .sidebar .menu .list li.active>:first-child i,.theme-blue .sidebar .menu .list li.active>:first-child span{color:#2196f3;}.theme-blue .sidebar .menu .list .toggled{background-color:transparent;}.theme-blue .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-blue .sidebar .legal{background-color:#fff;}.theme-blue .sidebar .legal .copyright a{color:#2196f3 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-cyan.min.css:
--------------------------------------------------------------------------------
1 | .theme-cyan .navbar{background-color:#00bcd4;}.theme-cyan .navbar-brand{color:#fff;}.theme-cyan .navbar-brand:hover{color:#fff;}.theme-cyan .navbar-brand:active{color:#fff;}.theme-cyan .navbar-brand:focus{color:#fff;}.theme-cyan .nav>li>a{color:#fff;}.theme-cyan .nav>li>a:hover{background-color:transparent;}.theme-cyan .nav>li>a:focus{background-color:transparent;}.theme-cyan .nav .open>a{background-color:transparent;}.theme-cyan .nav .open>a:hover{background-color:transparent;}.theme-cyan .nav .open>a:focus{background-color:transparent;}.theme-cyan .bars{color:#fff;}.theme-cyan .sidebar .menu .list li.active{background-color:transparent;}.theme-cyan .sidebar .menu .list li.active>:first-child i,.theme-cyan .sidebar .menu .list li.active>:first-child span{color:#00bcd4;}.theme-cyan .sidebar .menu .list .toggled{background-color:transparent;}.theme-cyan .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-cyan .sidebar .legal{background-color:#fff;}.theme-cyan .sidebar .legal .copyright a{color:#00bcd4 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-grey.min.css:
--------------------------------------------------------------------------------
1 | .theme-grey .navbar{background-color:#9e9e9e;}.theme-grey .navbar-brand{color:#fff;}.theme-grey .navbar-brand:hover{color:#fff;}.theme-grey .navbar-brand:active{color:#fff;}.theme-grey .navbar-brand:focus{color:#fff;}.theme-grey .nav>li>a{color:#fff;}.theme-grey .nav>li>a:hover{background-color:transparent;}.theme-grey .nav>li>a:focus{background-color:transparent;}.theme-grey .nav .open>a{background-color:transparent;}.theme-grey .nav .open>a:hover{background-color:transparent;}.theme-grey .nav .open>a:focus{background-color:transparent;}.theme-grey .bars{color:#fff;}.theme-grey .sidebar .menu .list li.active{background-color:transparent;}.theme-grey .sidebar .menu .list li.active>:first-child i,.theme-grey .sidebar .menu .list li.active>:first-child span{color:#9e9e9e;}.theme-grey .sidebar .menu .list .toggled{background-color:transparent;}.theme-grey .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-grey .sidebar .legal{background-color:#fff;}.theme-grey .sidebar .legal .copyright a{color:#9e9e9e !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-lime.min.css:
--------------------------------------------------------------------------------
1 | .theme-lime .navbar{background-color:#cddc39;}.theme-lime .navbar-brand{color:#fff;}.theme-lime .navbar-brand:hover{color:#fff;}.theme-lime .navbar-brand:active{color:#fff;}.theme-lime .navbar-brand:focus{color:#fff;}.theme-lime .nav>li>a{color:#fff;}.theme-lime .nav>li>a:hover{background-color:transparent;}.theme-lime .nav>li>a:focus{background-color:transparent;}.theme-lime .nav .open>a{background-color:transparent;}.theme-lime .nav .open>a:hover{background-color:transparent;}.theme-lime .nav .open>a:focus{background-color:transparent;}.theme-lime .bars{color:#fff;}.theme-lime .sidebar .menu .list li.active{background-color:transparent;}.theme-lime .sidebar .menu .list li.active>:first-child i,.theme-lime .sidebar .menu .list li.active>:first-child span{color:#cddc39;}.theme-lime .sidebar .menu .list .toggled{background-color:transparent;}.theme-lime .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-lime .sidebar .legal{background-color:#fff;}.theme-lime .sidebar .legal .copyright a{color:#cddc39 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-pink.min.css:
--------------------------------------------------------------------------------
1 | .theme-pink .navbar{background-color:#e91e63;}.theme-pink .navbar-brand{color:#fff;}.theme-pink .navbar-brand:hover{color:#fff;}.theme-pink .navbar-brand:active{color:#fff;}.theme-pink .navbar-brand:focus{color:#fff;}.theme-pink .nav>li>a{color:#fff;}.theme-pink .nav>li>a:hover{background-color:transparent;}.theme-pink .nav>li>a:focus{background-color:transparent;}.theme-pink .nav .open>a{background-color:transparent;}.theme-pink .nav .open>a:hover{background-color:transparent;}.theme-pink .nav .open>a:focus{background-color:transparent;}.theme-pink .bars{color:#fff;}.theme-pink .sidebar .menu .list li.active{background-color:transparent;}.theme-pink .sidebar .menu .list li.active>:first-child i,.theme-pink .sidebar .menu .list li.active>:first-child span{color:#e91e63;}.theme-pink .sidebar .menu .list .toggled{background-color:transparent;}.theme-pink .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-pink .sidebar .legal{background-color:#fff;}.theme-pink .sidebar .legal .copyright a{color:#e91e63 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-teal.min.css:
--------------------------------------------------------------------------------
1 | .theme-teal .navbar{background-color:#009688;}.theme-teal .navbar-brand{color:#fff;}.theme-teal .navbar-brand:hover{color:#fff;}.theme-teal .navbar-brand:active{color:#fff;}.theme-teal .navbar-brand:focus{color:#fff;}.theme-teal .nav>li>a{color:#fff;}.theme-teal .nav>li>a:hover{background-color:transparent;}.theme-teal .nav>li>a:focus{background-color:transparent;}.theme-teal .nav .open>a{background-color:transparent;}.theme-teal .nav .open>a:hover{background-color:transparent;}.theme-teal .nav .open>a:focus{background-color:transparent;}.theme-teal .bars{color:#fff;}.theme-teal .sidebar .menu .list li.active{background-color:transparent;}.theme-teal .sidebar .menu .list li.active>:first-child i,.theme-teal .sidebar .menu .list li.active>:first-child span{color:#009688;}.theme-teal .sidebar .menu .list .toggled{background-color:transparent;}.theme-teal .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-teal .sidebar .legal{background-color:#fff;}.theme-teal .sidebar .legal .copyright a{color:#009688 !important;}
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Host/Services/PluginEmbeddedDirectoryContents.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using Microsoft.Extensions.FileProviders;
4 |
5 | namespace Todo.MainProject.Web.Host.Services
6 | {
7 | public class PluginEmbeddedDirectoryContents : IDirectoryContents
8 | {
9 | public bool Exists { get; }
10 | private readonly IEnumerator _fileInfos;
11 |
12 | public PluginEmbeddedDirectoryContents()
13 | {
14 | Exists = false;
15 | _fileInfos = null;
16 | }
17 |
18 | public PluginEmbeddedDirectoryContents(IEnumerator fileInfos)
19 | {
20 | Exists = true;
21 | _fileInfos = fileInfos;
22 | }
23 |
24 | public IEnumerator GetEnumerator()
25 | {
26 | return _fileInfos;
27 | }
28 |
29 | IEnumerator IEnumerable.GetEnumerator()
30 | {
31 | return GetEnumerator();
32 | }
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-black.min.css:
--------------------------------------------------------------------------------
1 | .theme-black .navbar{background-color:#000;}.theme-black .navbar-brand{color:#fff;}.theme-black .navbar-brand:hover{color:#fff;}.theme-black .navbar-brand:active{color:#fff;}.theme-black .navbar-brand:focus{color:#fff;}.theme-black .nav>li>a{color:#fff;}.theme-black .nav>li>a:hover{background-color:transparent;}.theme-black .nav>li>a:focus{background-color:transparent;}.theme-black .nav .open>a{background-color:transparent;}.theme-black .nav .open>a:hover{background-color:transparent;}.theme-black .nav .open>a:focus{background-color:transparent;}.theme-black .bars{color:#fff;}.theme-black .sidebar .menu .list li.active{background-color:transparent;}.theme-black .sidebar .menu .list li.active>:first-child i,.theme-black .sidebar .menu .list li.active>:first-child span{color:#000;}.theme-black .sidebar .menu .list .toggled{background-color:transparent;}.theme-black .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-black .sidebar .legal{background-color:#fff;}.theme-black .sidebar .legal .copyright a{color:#000 !important;}
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.AspNetCore.Http;
8 | using Microsoft.Extensions.DependencyInjection;
9 |
10 | namespace Todo.DemoPlugin.AngularUI
11 | {
12 | public class Startup
13 | {
14 | // This method gets called by the runtime. Use this method to add services to the container.
15 | // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
16 | public void ConfigureServices(IServiceCollection services)
17 | {
18 | }
19 |
20 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
21 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
22 | {
23 | app.UseDefaultFiles();
24 | app.UseStaticFiles();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-amber.min.css:
--------------------------------------------------------------------------------
1 | .theme-amber .navbar{background-color:#ffc107;}.theme-amber .navbar-brand{color:#fff;}.theme-amber .navbar-brand:hover{color:#fff;}.theme-amber .navbar-brand:active{color:#fff;}.theme-amber .navbar-brand:focus{color:#fff;}.theme-amber .nav>li>a{color:#fff;}.theme-amber .nav>li>a:hover{background-color:transparent;}.theme-amber .nav>li>a:focus{background-color:transparent;}.theme-amber .nav .open>a{background-color:transparent;}.theme-amber .nav .open>a:hover{background-color:transparent;}.theme-amber .nav .open>a:focus{background-color:transparent;}.theme-amber .bars{color:#fff;}.theme-amber .sidebar .menu .list li.active{background-color:transparent;}.theme-amber .sidebar .menu .list li.active>:first-child i,.theme-amber .sidebar .menu .list li.active>:first-child span{color:#ffc107;}.theme-amber .sidebar .menu .list .toggled{background-color:transparent;}.theme-amber .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-amber .sidebar .legal{background-color:#fff;}.theme-amber .sidebar .legal .copyright a{color:#ffc107 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-brown.min.css:
--------------------------------------------------------------------------------
1 | .theme-brown .navbar{background-color:#795548;}.theme-brown .navbar-brand{color:#fff;}.theme-brown .navbar-brand:hover{color:#fff;}.theme-brown .navbar-brand:active{color:#fff;}.theme-brown .navbar-brand:focus{color:#fff;}.theme-brown .nav>li>a{color:#fff;}.theme-brown .nav>li>a:hover{background-color:transparent;}.theme-brown .nav>li>a:focus{background-color:transparent;}.theme-brown .nav .open>a{background-color:transparent;}.theme-brown .nav .open>a:hover{background-color:transparent;}.theme-brown .nav .open>a:focus{background-color:transparent;}.theme-brown .bars{color:#fff;}.theme-brown .sidebar .menu .list li.active{background-color:transparent;}.theme-brown .sidebar .menu .list li.active>:first-child i,.theme-brown .sidebar .menu .list li.active>:first-child span{color:#795548;}.theme-brown .sidebar .menu .list .toggled{background-color:transparent;}.theme-brown .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-brown .sidebar .legal{background-color:#fff;}.theme-brown .sidebar .legal .copyright a{color:#795548 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-green.min.css:
--------------------------------------------------------------------------------
1 | .theme-green .navbar{background-color:#4caf50;}.theme-green .navbar-brand{color:#fff;}.theme-green .navbar-brand:hover{color:#fff;}.theme-green .navbar-brand:active{color:#fff;}.theme-green .navbar-brand:focus{color:#fff;}.theme-green .nav>li>a{color:#fff;}.theme-green .nav>li>a:hover{background-color:transparent;}.theme-green .nav>li>a:focus{background-color:transparent;}.theme-green .nav .open>a{background-color:transparent;}.theme-green .nav .open>a:hover{background-color:transparent;}.theme-green .nav .open>a:focus{background-color:transparent;}.theme-green .bars{color:#fff;}.theme-green .sidebar .menu .list li.active{background-color:transparent;}.theme-green .sidebar .menu .list li.active>:first-child i,.theme-green .sidebar .menu .list li.active>:first-child span{color:#4caf50;}.theme-green .sidebar .menu .list .toggled{background-color:transparent;}.theme-green .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-green .sidebar .legal{background-color:#fff;}.theme-green .sidebar .legal .copyright a{color:#4caf50 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-indigo.min.css:
--------------------------------------------------------------------------------
1 | .theme-indigo .navbar{background-color:#3f51b5;}.theme-indigo .navbar-brand{color:#fff;}.theme-indigo .navbar-brand:hover{color:#fff;}.theme-indigo .navbar-brand:active{color:#fff;}.theme-indigo .navbar-brand:focus{color:#fff;}.theme-indigo .nav>li>a{color:#fff;}.theme-indigo .nav>li>a:hover{background-color:transparent;}.theme-indigo .nav>li>a:focus{background-color:transparent;}.theme-indigo .nav .open>a{background-color:transparent;}.theme-indigo .nav .open>a:hover{background-color:transparent;}.theme-indigo .nav .open>a:focus{background-color:transparent;}.theme-indigo .bars{color:#fff;}.theme-indigo .sidebar .menu .list li.active{background-color:transparent;}.theme-indigo .sidebar .menu .list li.active>:first-child i,.theme-indigo .sidebar .menu .list li.active>:first-child span{color:#3f51b5;}.theme-indigo .sidebar .menu .list .toggled{background-color:transparent;}.theme-indigo .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-indigo .sidebar .legal{background-color:#fff;}.theme-indigo .sidebar .legal .copyright a{color:#3f51b5 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-orange.min.css:
--------------------------------------------------------------------------------
1 | .theme-orange .navbar{background-color:#ff9800;}.theme-orange .navbar-brand{color:#fff;}.theme-orange .navbar-brand:hover{color:#fff;}.theme-orange .navbar-brand:active{color:#fff;}.theme-orange .navbar-brand:focus{color:#fff;}.theme-orange .nav>li>a{color:#fff;}.theme-orange .nav>li>a:hover{background-color:transparent;}.theme-orange .nav>li>a:focus{background-color:transparent;}.theme-orange .nav .open>a{background-color:transparent;}.theme-orange .nav .open>a:hover{background-color:transparent;}.theme-orange .nav .open>a:focus{background-color:transparent;}.theme-orange .bars{color:#fff;}.theme-orange .sidebar .menu .list li.active{background-color:transparent;}.theme-orange .sidebar .menu .list li.active>:first-child i,.theme-orange .sidebar .menu .list li.active>:first-child span{color:#ff9800;}.theme-orange .sidebar .menu .list .toggled{background-color:transparent;}.theme-orange .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-orange .sidebar .legal{background-color:#fff;}.theme-orange .sidebar .legal .copyright a{color:#ff9800 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-purple.min.css:
--------------------------------------------------------------------------------
1 | .theme-purple .navbar{background-color:#9c27b0;}.theme-purple .navbar-brand{color:#fff;}.theme-purple .navbar-brand:hover{color:#fff;}.theme-purple .navbar-brand:active{color:#fff;}.theme-purple .navbar-brand:focus{color:#fff;}.theme-purple .nav>li>a{color:#fff;}.theme-purple .nav>li>a:hover{background-color:transparent;}.theme-purple .nav>li>a:focus{background-color:transparent;}.theme-purple .nav .open>a{background-color:transparent;}.theme-purple .nav .open>a:hover{background-color:transparent;}.theme-purple .nav .open>a:focus{background-color:transparent;}.theme-purple .bars{color:#fff;}.theme-purple .sidebar .menu .list li.active{background-color:transparent;}.theme-purple .sidebar .menu .list li.active>:first-child i,.theme-purple .sidebar .menu .list li.active>:first-child span{color:#9c27b0;}.theme-purple .sidebar .menu .list .toggled{background-color:transparent;}.theme-purple .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-purple .sidebar .legal{background-color:#fff;}.theme-purple .sidebar .legal .copyright a{color:#9c27b0 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-yellow.min.css:
--------------------------------------------------------------------------------
1 | .theme-yellow .navbar{background-color:#ffeb3b;}.theme-yellow .navbar-brand{color:#fff;}.theme-yellow .navbar-brand:hover{color:#fff;}.theme-yellow .navbar-brand:active{color:#fff;}.theme-yellow .navbar-brand:focus{color:#fff;}.theme-yellow .nav>li>a{color:#fff;}.theme-yellow .nav>li>a:hover{background-color:transparent;}.theme-yellow .nav>li>a:focus{background-color:transparent;}.theme-yellow .nav .open>a{background-color:transparent;}.theme-yellow .nav .open>a:hover{background-color:transparent;}.theme-yellow .nav .open>a:focus{background-color:transparent;}.theme-yellow .bars{color:#fff;}.theme-yellow .sidebar .menu .list li.active{background-color:transparent;}.theme-yellow .sidebar .menu .list li.active>:first-child i,.theme-yellow .sidebar .menu .list li.active>:first-child span{color:#ffeb3b;}.theme-yellow .sidebar .menu .list .toggled{background-color:transparent;}.theme-yellow .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-yellow .sidebar .legal{background-color:#fff;}.theme-yellow .sidebar .legal .copyright a{color:#ffeb3b !important;}
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Application/Todo.DemoPlugin.Application.csproj:
--------------------------------------------------------------------------------
1 | 1.0.0.0netcoreapp2.0$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;Todo.DemoPlugin.ApplicationTodo.DemoPlugin.ApplicationfalsefalsefalseTodo.DemoPluginApplication Layer of DemoPlugin
2 | x64
3 |
4 |
5 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular/cli/plugins/karma')
14 | ],
15 | client:{
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | reports: [ 'html', 'lcovonly' ],
20 | fixWebpackSourcePaths: true
21 | },
22 | angularCli: {
23 | environment: 'dev'
24 | },
25 | reporters: ['progress', 'kjhtml'],
26 | port: 9876,
27 | colors: true,
28 | logLevel: config.LOG_INFO,
29 | autoWatch: true,
30 | browsers: ['Chrome'],
31 | singleRun: false
32 | });
33 | };
34 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/MainProjectDbContextFactory.cs:
--------------------------------------------------------------------------------
1 | using Todo.MainProject.Configuration;
2 | using Todo.MainProject.Web;
3 | using Microsoft.EntityFrameworkCore;
4 | using Microsoft.EntityFrameworkCore.Design;
5 | using Microsoft.Extensions.Configuration;
6 |
7 | namespace Todo.MainProject.EntityFrameworkCore
8 | {
9 | /* This class is needed to run "dotnet ef ..." commands from command line on development. Not used anywhere else */
10 | public class MainProjectDbContextFactory : IDesignTimeDbContextFactory
11 | {
12 | public MainProjectDbContext CreateDbContext(string[] args)
13 | {
14 | var builder = new DbContextOptionsBuilder();
15 | var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());
16 |
17 | MainProjectDbContextConfigurer.Configure(builder, configuration.GetConnectionString(MainProjectConsts.ConnectionStringName));
18 |
19 | return new MainProjectDbContext(builder.Options);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/MainProjectApplicationModule.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Abp.AutoMapper;
3 | using Abp.Modules;
4 | using Abp.Reflection.Extensions;
5 | using Todo.MainProject.Authorization;
6 |
7 | namespace Todo.MainProject
8 | {
9 | [DependsOn(
10 | typeof(MainProjectCoreModule),
11 | typeof(AbpAutoMapperModule))]
12 | public class MainProjectApplicationModule : AbpModule
13 | {
14 | public override void PreInitialize()
15 | {
16 | Configuration.Authorization.Providers.Add();
17 | }
18 |
19 | public override void Initialize()
20 | {
21 | Assembly thisAssembly = typeof(MainProjectApplicationModule).GetAssembly();
22 | IocManager.RegisterAssemblyByConvention(thisAssembly);
23 |
24 | Configuration.Modules.AbpAutoMapper().Configurators.Add(cfg =>
25 | {
26 | //Scan the assembly for classes which inherit from AutoMapper.Profile
27 | cfg.AddProfiles(thisAssembly);
28 | });
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/angular/src/main.ts:
--------------------------------------------------------------------------------
1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
2 | import { enableProdMode, ChangeDetectorRef } from '@angular/core';
3 | import { environment } from './environments/environment';
4 | import { RootModule } from './root.module';
5 | import { hmrBootstrap } from './hmr';
6 |
7 | import * as moment from 'moment';
8 |
9 | import 'moment/min/locales.min';
10 | import 'moment-timezone';
11 |
12 | if (environment.production) {
13 | enableProdMode();
14 | }
15 |
16 | const bootstrap = () => {
17 | return platformBrowserDynamic().bootstrapModule(RootModule);
18 | };
19 |
20 | /* "Hot Module Replacement" is enabled as described on
21 | * https://medium.com/@beeman/tutorial-enable-hrm-in-angular-cli-apps-1b0d13b80130#.sa87zkloh
22 | */
23 |
24 | if (environment.hmr) {
25 | if (module['hot']) {
26 | hmrBootstrap(module, bootstrap); //HMR enabled bootstrap
27 | } else {
28 | console.error('HMR is not enabled for webpack-dev-server!');
29 | console.log('Are you using the --hmr flag for ng serve?');
30 | }
31 | } else {
32 | bootstrap(); //Regular bootstrap
33 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Features/FeatureValueStore.cs:
--------------------------------------------------------------------------------
1 | using Abp.Application.Features;
2 | using Abp.Domain.Repositories;
3 | using Abp.Domain.Uow;
4 | using Abp.MultiTenancy;
5 | using Abp.Runtime.Caching;
6 | using Todo.MainProject.Authorization.Users;
7 | using Todo.MainProject.MultiTenancy;
8 |
9 | namespace Todo.MainProject.Features
10 | {
11 | public class FeatureValueStore : AbpFeatureValueStore
12 | {
13 | public FeatureValueStore(
14 | ICacheManager cacheManager,
15 | IRepository tenantFeatureRepository,
16 | IRepository tenantRepository,
17 | IRepository editionFeatureRepository,
18 | IFeatureManager featureManager,
19 | IUnitOfWorkManager unitOfWorkManager)
20 | : base(cacheManager,
21 | tenantFeatureRepository,
22 | tenantRepository,
23 | editionFeatureRepository,
24 | featureManager,
25 | unitOfWorkManager)
26 | {
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 ASP.NET Boilerplate
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/Todo.MainProject.EntityFrameworkCore.csproj:
--------------------------------------------------------------------------------
1 | netcoreapp2.0$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;Todo.MainProjecttruetruetrue
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-blue-grey.min.css:
--------------------------------------------------------------------------------
1 | .theme-blue-grey .navbar{background-color:#607d8b;}.theme-blue-grey .navbar-brand{color:#fff;}.theme-blue-grey .navbar-brand:hover{color:#fff;}.theme-blue-grey .navbar-brand:active{color:#fff;}.theme-blue-grey .navbar-brand:focus{color:#fff;}.theme-blue-grey .nav>li>a{color:#fff;}.theme-blue-grey .nav>li>a:hover{background-color:transparent;}.theme-blue-grey .nav>li>a:focus{background-color:transparent;}.theme-blue-grey .nav .open>a{background-color:transparent;}.theme-blue-grey .nav .open>a:hover{background-color:transparent;}.theme-blue-grey .nav .open>a:focus{background-color:transparent;}.theme-blue-grey .bars{color:#fff;}.theme-blue-grey .sidebar .menu .list li.active{background-color:transparent;}.theme-blue-grey .sidebar .menu .list li.active>:first-child i,.theme-blue-grey .sidebar .menu .list li.active>:first-child span{color:#607d8b;}.theme-blue-grey .sidebar .menu .list .toggled{background-color:transparent;}.theme-blue-grey .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-blue-grey .sidebar .legal{background-color:#fff;}.theme-blue-grey .sidebar .legal .copyright a{color:#607d8b !important;}
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed, async } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 | describe('AppComponent', () => {
4 | beforeEach(async(() => {
5 | TestBed.configureTestingModule({
6 | declarations: [
7 | AppComponent
8 | ],
9 | }).compileComponents();
10 | }));
11 | it('should create the app', async(() => {
12 | const fixture = TestBed.createComponent(AppComponent);
13 | const app = fixture.debugElement.componentInstance;
14 | expect(app).toBeTruthy();
15 | }));
16 | it(`should have as title 'app'`, async(() => {
17 | const fixture = TestBed.createComponent(AppComponent);
18 | const app = fixture.debugElement.componentInstance;
19 | expect(app.title).toEqual('app');
20 | }));
21 | it('should render title in a h1 tag', async(() => {
22 | const fixture = TestBed.createComponent(AppComponent);
23 | fixture.detectChanges();
24 | const compiled = fixture.debugElement.nativeElement;
25 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
26 | }));
27 | });
28 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Localization/SourceFiles/MainProject-zh-CN.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-light-blue.min.css:
--------------------------------------------------------------------------------
1 | .theme-light-blue .navbar{background-color:#03a9f4;}.theme-light-blue .navbar-brand{color:#fff;}.theme-light-blue .navbar-brand:hover{color:#fff;}.theme-light-blue .navbar-brand:active{color:#fff;}.theme-light-blue .navbar-brand:focus{color:#fff;}.theme-light-blue .nav>li>a{color:#fff;}.theme-light-blue .nav>li>a:hover{background-color:transparent;}.theme-light-blue .nav>li>a:focus{background-color:transparent;}.theme-light-blue .nav .open>a{background-color:transparent;}.theme-light-blue .nav .open>a:hover{background-color:transparent;}.theme-light-blue .nav .open>a:focus{background-color:transparent;}.theme-light-blue .bars{color:#fff;}.theme-light-blue .sidebar .menu .list li.active{background-color:transparent;}.theme-light-blue .sidebar .menu .list li.active>:first-child i,.theme-light-blue .sidebar .menu .list li.active>:first-child span{color:#03a9f4;}.theme-light-blue .sidebar .menu .list .toggled{background-color:transparent;}.theme-light-blue .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-light-blue .sidebar .legal{background-color:#fff;}.theme-light-blue .sidebar .legal .copyright a{color:#03a9f4 !important;}
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/README.md:
--------------------------------------------------------------------------------
1 | # Calculatorplugin
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.4.4.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-deep-orange.min.css:
--------------------------------------------------------------------------------
1 | .theme-deep-orange .navbar{background-color:#ff5722;}.theme-deep-orange .navbar-brand{color:#fff;}.theme-deep-orange .navbar-brand:hover{color:#fff;}.theme-deep-orange .navbar-brand:active{color:#fff;}.theme-deep-orange .navbar-brand:focus{color:#fff;}.theme-deep-orange .nav>li>a{color:#fff;}.theme-deep-orange .nav>li>a:hover{background-color:transparent;}.theme-deep-orange .nav>li>a:focus{background-color:transparent;}.theme-deep-orange .nav .open>a{background-color:transparent;}.theme-deep-orange .nav .open>a:hover{background-color:transparent;}.theme-deep-orange .nav .open>a:focus{background-color:transparent;}.theme-deep-orange .bars{color:#fff;}.theme-deep-orange .sidebar .menu .list li.active{background-color:transparent;}.theme-deep-orange .sidebar .menu .list li.active>:first-child i,.theme-deep-orange .sidebar .menu .list li.active>:first-child span{color:#ff5722;}.theme-deep-orange .sidebar .menu .list .toggled{background-color:transparent;}.theme-deep-orange .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-deep-orange .sidebar .legal{background-color:#fff;}.theme-deep-orange .sidebar .legal .copyright a{color:#ff5722 !important;}
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-deep-purple.min.css:
--------------------------------------------------------------------------------
1 | .theme-deep-purple .navbar{background-color:#673ab7;}.theme-deep-purple .navbar-brand{color:#fff;}.theme-deep-purple .navbar-brand:hover{color:#fff;}.theme-deep-purple .navbar-brand:active{color:#fff;}.theme-deep-purple .navbar-brand:focus{color:#fff;}.theme-deep-purple .nav>li>a{color:#fff;}.theme-deep-purple .nav>li>a:hover{background-color:transparent;}.theme-deep-purple .nav>li>a:focus{background-color:transparent;}.theme-deep-purple .nav .open>a{background-color:transparent;}.theme-deep-purple .nav .open>a:hover{background-color:transparent;}.theme-deep-purple .nav .open>a:focus{background-color:transparent;}.theme-deep-purple .bars{color:#fff;}.theme-deep-purple .sidebar .menu .list li.active{background-color:transparent;}.theme-deep-purple .sidebar .menu .list li.active>:first-child i,.theme-deep-purple .sidebar .menu .list li.active>:first-child span{color:#673ab7;}.theme-deep-purple .sidebar .menu .list .toggled{background-color:transparent;}.theme-deep-purple .sidebar .menu .list .ml-menu{background-color:transparent;}.theme-deep-purple .sidebar .legal{background-color:#fff;}.theme-deep-purple .sidebar .legal .copyright a{color:#673ab7 !important;}
--------------------------------------------------------------------------------
/angular/src/app/layout/topbar-languageswitch.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Injector, ViewEncapsulation } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 |
4 | import * as _ from 'lodash';
5 |
6 | @Component({
7 | templateUrl: './topbar-languageswitch.component.html',
8 | selector: 'topbar-languageswitch',
9 | encapsulation: ViewEncapsulation.None
10 | })
11 | export class TopBarLanguageSwitchComponent extends AppComponentBase implements OnInit {
12 |
13 | languages: abp.localization.ILanguageInfo[];
14 | currentLanguage: abp.localization.ILanguageInfo;
15 |
16 | constructor(
17 | injector: Injector
18 | ) {
19 | super(injector);
20 | }
21 |
22 | ngOnInit() {
23 | this.languages = _.filter(this.localization.languages, l => !l.isDisabled);
24 | this.currentLanguage = this.localization.currentLanguage;
25 | }
26 |
27 | changeLanguage(languageName: string): void {
28 | abp.utils.setCookieValue(
29 | "Abp.Localization.CultureName",
30 | languageName,
31 | new Date(new Date().getTime() + 5 * 365 * 86400000), //5 year
32 | abp.appPath
33 | );
34 |
35 | location.reload();
36 | }
37 | }
--------------------------------------------------------------------------------
/angular/src/shared/shared.module.ts:
--------------------------------------------------------------------------------
1 | import { CommonModule } from '@angular/common';
2 | import { NgModule, ModuleWithProviders } from '@angular/core';
3 | import { AbpModule } from '@abp/abp.module';
4 | import { RouterModule } from '@angular/router';
5 |
6 | import { AppSessionService } from './session/app-session.service';
7 | import { AppUrlService } from './nav/app-url.service';
8 | import { AppAuthService } from './auth/app-auth.service';
9 | import { AppRouteGuard } from './auth/auth-route-guard';
10 | import { MaterialInput } from "shared/directives/material-input.directive";
11 |
12 | @NgModule({
13 | imports: [
14 | CommonModule,
15 | AbpModule,
16 | RouterModule
17 | ],
18 | declarations: [
19 | MaterialInput
20 | ],
21 | exports: [
22 | MaterialInput
23 | ]
24 | })
25 | export class SharedModule {
26 | static forRoot(): ModuleWithProviders {
27 | return {
28 | ngModule: SharedModule,
29 | providers: [
30 | AppSessionService,
31 | AppUrlService,
32 | AppAuthService,
33 | AppRouteGuard
34 | ]
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Migrator/Todo.MainProject.Migrator.csproj:
--------------------------------------------------------------------------------
1 | netcoreapp2.0$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;Todo.MainProject.MigratorExeTodo.MainProject.MigratorfalsefalsefalsePreserveNewest
--------------------------------------------------------------------------------
/angular/README.md:
--------------------------------------------------------------------------------
1 | # MainProjectTemplate
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0-beta.31.
4 |
5 | ## Development server
6 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
7 |
8 | ## Code scaffolding
9 |
10 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.
11 |
12 | ## Build
13 |
14 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
15 |
16 | ## Running unit tests
17 |
18 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
19 |
20 | ## Running end-to-end tests
21 |
22 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23 | Before running the tests make sure you are serving the app via `ng serve`.
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/angular/src/typings.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | ///
5 | ///
6 | ///
7 | ///
8 | ///
9 |
10 | // Typings reference file, see links for more information
11 | // https://github.com/typings/typings
12 | // https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
13 |
14 | declare var System: any;
15 |
16 | declare var App: any; //Related to Metronic
17 | declare var Layout: any; //Related to Metronic
18 |
19 | declare var Push: any;
20 |
21 | interface JQuery {
22 | countTo(...any): any;
23 | }
24 |
25 | interface JQuery {
26 | sparkline(...any): any;
27 | }
28 |
29 | interface JQueryStatic {
30 | AdminBSB: any;
31 | }
--------------------------------------------------------------------------------
/angular/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | /* tslint:disable:no-unused-variable */
2 |
3 | import { TestBed, async } from '@angular/core/testing';
4 | import { AppComponent } from './app.component';
5 |
6 | describe('AppComponent', () => {
7 | beforeEach(() => {
8 | TestBed.configureTestingModule({
9 | declarations: [
10 | AppComponent
11 | ],
12 | });
13 | TestBed.compileComponents();
14 | });
15 |
16 | it('should create the app', async(() => {
17 | const fixture = TestBed.createComponent(AppComponent);
18 | const app = fixture.debugElement.componentInstance;
19 | expect(app).toBeTruthy();
20 | }));
21 |
22 | it(`should have as title 'app works!'`, async(() => {
23 | const fixture = TestBed.createComponent(AppComponent);
24 | const app = fixture.debugElement.componentInstance;
25 | expect(app.title).toEqual('app works!');
26 | }));
27 |
28 | it('should render title in a h1 tag', async(() => {
29 | const fixture = TestBed.createComponent(AppComponent);
30 | fixture.detectChanges();
31 | const compiled = fixture.debugElement.nativeElement;
32 | expect(compiled.querySelector('h1').textContent).toContain('app works!');
33 | }));
34 | });
35 |
--------------------------------------------------------------------------------
/angular/src/account/account.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, ViewContainerRef, OnInit, ViewEncapsulation, Injector } from '@angular/core';
2 | import { LoginService } from './login/login.service';
3 | import { AppComponentBase } from '@shared/app-component-base';
4 |
5 | @Component({
6 | templateUrl: './account.component.html',
7 | styleUrls: [
8 | './account.component.less'
9 | ],
10 | encapsulation: ViewEncapsulation.None
11 | })
12 | export class AccountComponent extends AppComponentBase implements OnInit {
13 |
14 | private viewContainerRef: ViewContainerRef;
15 |
16 | versionText: string;
17 | currentYear: number;
18 |
19 | public constructor(
20 | injector: Injector,
21 | private _loginService: LoginService
22 | ) {
23 | super(injector);
24 |
25 | this.currentYear = new Date().getFullYear();
26 | this.versionText = this.appSession.application.version + ' [' + this.appSession.application.releaseDate.format('YYYYDDMM') + ']';
27 | }
28 |
29 | showTenantChange(): boolean {
30 | return abp.multiTenancy.isEnabled;
31 | }
32 |
33 | ngOnInit(): void {
34 | $('body').attr('class', 'login-page');
35 | }
36 | }
--------------------------------------------------------------------------------
/angular/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/long-stack-trace-zone';
4 | import 'zone.js/dist/proxy.js';
5 | import 'zone.js/dist/sync-test';
6 | import 'zone.js/dist/jasmine-patch';
7 | import 'zone.js/dist/async-test';
8 | import 'zone.js/dist/fake-async-test';
9 | import { getTestBed } from '@angular/core/testing';
10 | import {
11 | BrowserDynamicTestingModule,
12 | platformBrowserDynamicTesting
13 | } from '@angular/platform-browser-dynamic/testing';
14 |
15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
16 | declare var __karma__: any;
17 | declare var require: any;
18 |
19 | // Prevent Karma from running prematurely.
20 | __karma__.loaded = function () {};
21 |
22 | // First, initialize the Angular testing environment.
23 | getTestBed().initTestEnvironment(
24 | BrowserDynamicTestingModule,
25 | platformBrowserDynamicTesting()
26 | );
27 | // Then we find all the tests.
28 | const context = require.context('./', true, /\.spec\.ts$/);
29 | // And load the modules.
30 | context.keys().map(context);
31 | // Finally, start Karma to run the tests.
32 | __karma__.start();
33 |
--------------------------------------------------------------------------------
/angular/Todo.MainProject.AngularUI.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 12.00
2 | # Visual Studio 15
3 | VisualStudioVersion = 15.0.26730.16
4 | MinimumVisualStudioVersion = 10.0.40219.1
5 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Todo.MainProject.AngularUI", "Todo.MainProject.AngularUI.csproj", "{5F47C383-4C3A-486E-9D49-DA10CD1FAD23}"
6 | EndProject
7 | Global
8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
9 | Debug|Any CPU = Debug|Any CPU
10 | Release|Any CPU = Release|Any CPU
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {5F47C383-4C3A-486E-9D49-DA10CD1FAD23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14 | {5F47C383-4C3A-486E-9D49-DA10CD1FAD23}.Debug|Any CPU.Build.0 = Debug|Any CPU
15 | {5F47C383-4C3A-486E-9D49-DA10CD1FAD23}.Release|Any CPU.ActiveCfg = Release|Any CPU
16 | {5F47C383-4C3A-486E-9D49-DA10CD1FAD23}.Release|Any CPU.Build.0 = Release|Any CPU
17 | EndGlobalSection
18 | GlobalSection(SolutionProperties) = preSolution
19 | HideSolutionNode = FALSE
20 | EndGlobalSection
21 | GlobalSection(ExtensibilityGlobals) = postSolution
22 | SolutionGuid = {361D554B-E58A-4DB2-B9B4-B273B730FF8A}
23 | EndGlobalSection
24 | EndGlobal
25 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/Migrations/20170621153937_Added_Description_And_IsActive_To_Role.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Microsoft.EntityFrameworkCore.Migrations;
4 |
5 | namespace Todo.MainProject.Migrations
6 | {
7 | public partial class Added_Description_And_IsActive_To_Role : Migration
8 | {
9 | protected override void Up(MigrationBuilder migrationBuilder)
10 | {
11 | migrationBuilder.AddColumn(
12 | name: "Description",
13 | table: "AbpRoles",
14 | maxLength: 5000,
15 | nullable: true);
16 |
17 | migrationBuilder.AddColumn(
18 | name: "IsActive",
19 | table: "AbpRoles",
20 | nullable: false,
21 | defaultValue: false);
22 | }
23 |
24 | protected override void Down(MigrationBuilder migrationBuilder)
25 | {
26 | migrationBuilder.DropColumn(
27 | name: "Description",
28 | table: "AbpRoles");
29 |
30 | migrationBuilder.DropColumn(
31 | name: "IsActive",
32 | table: "AbpRoles");
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/long-stack-trace-zone';
4 | import 'zone.js/dist/proxy.js';
5 | import 'zone.js/dist/sync-test';
6 | import 'zone.js/dist/jasmine-patch';
7 | import 'zone.js/dist/async-test';
8 | import 'zone.js/dist/fake-async-test';
9 | import { getTestBed } from '@angular/core/testing';
10 | import {
11 | BrowserDynamicTestingModule,
12 | platformBrowserDynamicTesting
13 | } from '@angular/platform-browser-dynamic/testing';
14 |
15 | // Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
16 | declare const __karma__: any;
17 | declare const require: any;
18 |
19 | // Prevent Karma from running prematurely.
20 | __karma__.loaded = function () {};
21 |
22 | // First, initialize the Angular testing environment.
23 | getTestBed().initTestEnvironment(
24 | BrowserDynamicTestingModule,
25 | platformBrowserDynamicTesting()
26 | );
27 | // Then we find all the tests.
28 | const context = require.context('./', true, /\.spec\.ts$/);
29 | // And load the modules.
30 | context.keys().map(context);
31 | // Finally, start Karma to run the tests.
32 | __karma__.start();
33 |
--------------------------------------------------------------------------------
/angular/src/app/plugins/plugin.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Injector, Inject } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 | import { PluginService } from '@app/plugins/plugin.service';
4 | import { DOCUMENT, DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
5 |
6 | @Component({
7 | selector: 'app-plugin-component',
8 | templateUrl: './plugin.component.html'
9 | })
10 | export class PluginComponent extends AppComponentBase implements OnInit {
11 | item = {url : ''}
12 | url: SafeResourceUrl;
13 |
14 | // toggle iframe
15 | download = false;
16 | constructor(
17 | @Inject(DOCUMENT) private document,
18 | injector: Injector,
19 | public pluginService: PluginService,
20 | public sanitizer: DomSanitizer
21 | ) {
22 | super(injector);
23 | this.item.url = document.location.href.replace(this.pluginService.redirectUrlPrefix, '').replace('/app', '');
24 | //this.item.url = 'http://localhost:4201'
25 | }
26 | ngOnInit() {
27 | this.download = false; // hide iframe
28 | this.url = this.sanitizer.bypassSecurityTrustResourceUrl(this.item.url);
29 | this.download = true; // show iframe
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Application/Users/Dto/UserDto.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel.DataAnnotations;
3 | using Abp.Application.Services.Dto;
4 | using Abp.Authorization.Users;
5 | using Abp.AutoMapper;
6 | using Todo.MainProject.Authorization.Users;
7 |
8 | namespace Todo.MainProject.Users.Dto
9 | {
10 | [AutoMapFrom(typeof(User))]
11 | public class UserDto : EntityDto
12 | {
13 | [Required]
14 | [StringLength(AbpUserBase.MaxUserNameLength)]
15 | public string UserName { get; set; }
16 |
17 | [Required]
18 | [StringLength(AbpUserBase.MaxNameLength)]
19 | public string Name { get; set; }
20 |
21 | [Required]
22 | [StringLength(AbpUserBase.MaxSurnameLength)]
23 | public string Surname { get; set; }
24 |
25 | [Required]
26 | [EmailAddress]
27 | [StringLength(AbpUserBase.MaxEmailAddressLength)]
28 | public string EmailAddress { get; set; }
29 |
30 | public bool IsActive { get; set; }
31 |
32 | public string FullName { get; set; }
33 |
34 | public DateTime? LastLoginTime { get; set; }
35 |
36 | public DateTime CreationTime { get; set; }
37 |
38 | public string[] RoleNames { get; set; }
39 | }
40 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Web.Core/Owin/BuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | #if FEATURE_SIGNALR
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.Owin.Builder;
7 | using Owin;
8 |
9 | namespace Todo.MainProject.Owin
10 | {
11 | ///
12 | /// This class (UseAppBuilder method) integrates OWIN pipeline to ASP.NET Core pipeline and
13 | /// allows us to use Owin based middlewares in ASP.NET Core applications.
14 | ///
15 | public static class BuilderExtensions
16 | {
17 | public static IApplicationBuilder UseAppBuilder(
18 | this IApplicationBuilder app,
19 | Action configure)
20 | {
21 | app.UseOwin(addToPipeline =>
22 | {
23 | addToPipeline(next =>
24 | {
25 | var appBuilder = new AppBuilder();
26 | appBuilder.Properties["builder.DefaultApp"] = next;
27 |
28 | configure(appBuilder);
29 |
30 | return appBuilder.Build, Task>>();
31 | });
32 | });
33 |
34 | return app;
35 | }
36 | }
37 | }
38 | #endif
--------------------------------------------------------------------------------
/angular/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/0.13/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular/cli'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-coverage-istanbul-reporter'),
12 | require('@angular/cli/plugins/karma')
13 | ],
14 | files: [
15 | { pattern: './src/test.ts', watched: false }
16 | ],
17 | preprocessors: {
18 | './src/test.ts': ['@angular/cli']
19 | },
20 | mime: {
21 | 'text/x-typescript': ['ts','tsx']
22 | },
23 | coverageIstanbulReporter: {
24 | reports: [ 'html', 'lcovonly' ],
25 | fixWebpackSourcePaths: true
26 | },
27 | angularCli: {
28 | config: './.angular-cli.json',
29 | environment: 'dev'
30 | },
31 | reporters: config.angularCli && config.angularCli.codeCoverage
32 | ? ['progress', 'coverage-istanbul']
33 | : ['progress'],
34 | port: 9876,
35 | colors: true,
36 | logLevel: config.LOG_INFO,
37 | autoWatch: true,
38 | browsers: ['Chrome'],
39 | singleRun: false
40 | });
41 | };
42 |
--------------------------------------------------------------------------------
/aspnet-core/build/build-mvc.ps1:
--------------------------------------------------------------------------------
1 | # COMMON PATHS
2 |
3 | $buildFolder = (Get-Item -Path "./" -Verbose).FullName
4 | $slnFolder = Join-Path $buildFolder "../"
5 | $outputFolder = Join-Path $buildFolder "outputs"
6 | $webMvcFolder = Join-Path $slnFolder "src/Todo.MainProject.Web.Mvc"
7 |
8 | ## CLEAR ######################################################################
9 |
10 | Remove-Item $outputFolder -Force -Recurse -ErrorAction Ignore
11 | New-Item -Path $outputFolder -ItemType Directory
12 |
13 | ## RESTORE NUGET PACKAGES #####################################################
14 |
15 | Set-Location $slnFolder
16 | dotnet restore
17 |
18 | ## PUBLISH WEB MVC PROJECT ###################################################
19 |
20 | Set-Location $webMvcFolder
21 | dotnet publish --output (Join-Path $outputFolder "Mvc")
22 |
23 | ## CREATE DOCKER IMAGES #######################################################
24 |
25 | # Mvc
26 | Set-Location (Join-Path $outputFolder "Mvc")
27 |
28 | docker rmi abp/mvc -f
29 | docker build -t abp/mvc .
30 |
31 | ## DOCKER COMPOSE FILES #######################################################
32 |
33 | Copy-Item (Join-Path $slnFolder "docker/mvc/*.*") $outputFolder
34 |
35 | ## FINALIZE ###################################################################
36 |
37 | Set-Location $outputFolder
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Users/UserStore.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization.Users;
2 | using Abp.Domain.Repositories;
3 | using Abp.Domain.Uow;
4 | using Abp.Linq;
5 | using Todo.MainProject.Authorization.Roles;
6 |
7 | namespace Todo.MainProject.Authorization.Users
8 | {
9 | public class UserStore : AbpUserStore
10 | {
11 | public UserStore(
12 | IUnitOfWorkManager unitOfWorkManager,
13 | IRepository userRepository,
14 | IRepository roleRepository,
15 | IAsyncQueryableExecuter asyncQueryableExecuter,
16 | IRepository userRoleRepository,
17 | IRepository userLoginRepository,
18 | IRepository userClaimRepository,
19 | IRepository userPermissionSettingRepository)
20 | : base(
21 | unitOfWorkManager,
22 | userRepository,
23 | roleRepository,
24 | asyncQueryableExecuter,
25 | userRoleRepository,
26 | userLoginRepository,
27 | userClaimRepository,
28 | userPermissionSettingRepository)
29 | {
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/angular/src/account/layout/account-languages.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Injector } from '@angular/core';
2 | import { AppComponentBase } from '@shared/app-component-base';
3 |
4 | import * as _ from 'lodash';
5 |
6 | @Component({
7 | selector: 'account-languages',
8 | templateUrl: './account-languages.component.html',
9 | styleUrls: [
10 | './account-languages.component.less'
11 | ]
12 | })
13 | export class AccountLanguagesComponent extends AppComponentBase implements OnInit {
14 |
15 | languages: abp.localization.ILanguageInfo[];
16 | currentLanguage: abp.localization.ILanguageInfo;
17 |
18 | constructor(
19 | injector: Injector
20 | ) {
21 | super(injector);
22 | }
23 |
24 | ngOnInit() {
25 | this.languages = _.filter(this.localization.languages, l => !l.isDisabled);
26 | this.languages = this.localization.languages;
27 | this.currentLanguage = this.localization.currentLanguage;
28 | }
29 |
30 | changeLanguage(languageName: string): void {
31 | abp.utils.setCookieValue(
32 | "Abp.Localization.CultureName",
33 | languageName,
34 | new Date(new Date().getTime() + 5 * 365 * 86400000), //5 year
35 | abp.appPath
36 | );
37 |
38 | location.reload();
39 | }
40 | }
--------------------------------------------------------------------------------
/angular/src/account/tenant/tenant-change.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit, Injector, ViewChild } from '@angular/core';
2 | import { AccountServiceProxy } from '@shared/service-proxies/service-proxies'
3 | import { TenantChangeModalComponent } from './tenant-change-modal.component'
4 | import { AppComponentBase } from '@shared/app-component-base';
5 |
6 | @Component({
7 | selector: 'tenant-change',
8 | templateUrl: './tenant-change.component.html'
9 | })
10 | export class TenantChangeComponent extends AppComponentBase implements OnInit {
11 |
12 | @ViewChild('tenantChangeModal') tenantChangeModal: TenantChangeModalComponent;
13 |
14 | tenancyName: string;
15 | name: string;
16 |
17 | constructor(
18 | injector: Injector,
19 | private _accountService: AccountServiceProxy
20 | ) {
21 | super(injector);
22 | }
23 |
24 | ngOnInit() {
25 |
26 | if (this.appSession.tenant) {
27 | this.tenancyName = this.appSession.tenant.tenancyName;
28 | this.name = this.appSession.tenant.name;
29 | }
30 | }
31 |
32 | get isMultiTenancyEnabled(): boolean {
33 | return abp.multiTenancy.isEnabled;
34 | }
35 |
36 | showChangeModal(): void{
37 | this.tenantChangeModal.show(this.tenancyName);
38 | }
39 | }
--------------------------------------------------------------------------------
/Template_readme.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This is a template to create **ASP.NET Core MVC / Angular** based startup projects for [ASP.NET Boilerplate](https://aspnetboilerplate.com/Pages/Documents). It has 2 different versions:
4 |
5 | 1. [ASP.NET Core MVC & jQuery](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Core) (server rendered multi-page application).
6 | 2. [ASP.NET Core & Angular](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Angular) (single page application).
7 |
8 | User Interface is based on [BSB Admin theme](https://github.com/gurayyarar/AdminBSBMaterialDesign).
9 |
10 | # Download
11 |
12 | Create & download your project from https://aspnetboilerplate.com/Templates
13 |
14 | # Screenshots
15 |
16 | #### Sample Dashboard Page
17 | 
18 |
19 | #### User Creation Modal
20 | 
21 |
22 | #### Login Page
23 |
24 | 
25 |
26 | # Documentation
27 |
28 | * [ASP.NET Core MVC & jQuery version.](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Core)
29 | * [ASP.NET Core & Angular version.](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Angular)
30 |
31 | # License
32 |
33 | [MIT](LICENSE).
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.Web.Core/DemoPluginWebCoreModule.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using Abp.AspNetCore;
3 | using Abp.AspNetCore.Configuration;
4 | using Abp.Modules;
5 | using Abp.Reflection.Extensions;
6 | using Abp.Resources.Embedded;
7 | using Microsoft.AspNetCore.Hosting;
8 |
9 | namespace Todo.DemoPlugin
10 | {
11 | [DependsOn(
12 | typeof(DemoPluginApplicationModule),
13 | typeof(AbpAspNetCoreModule)
14 | )]
15 | public class DemoPluginWebCoreModule : AbpModule
16 | {
17 | public DemoPluginWebCoreModule(IHostingEnvironment env)
18 | {
19 | }
20 |
21 | public override void PreInitialize()
22 | {
23 | Configuration.Modules.AbpAspNetCore()
24 | .CreateControllersForAppServices(
25 | typeof(DemoPluginApplicationModule).GetAssembly()
26 | );
27 | Configuration.EmbeddedResources.Sources.Add(
28 | new EmbeddedResourceSet(
29 | "",
30 | Assembly.GetExecutingAssembly(),
31 | "Todo.DemoPlugin"
32 | )
33 | );
34 | }
35 |
36 | public override void Initialize()
37 | {
38 | IocManager.RegisterAssemblyByConvention(typeof(DemoPluginWebCoreModule).GetAssembly());
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Authorization/Roles/RoleManager.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Abp.Authorization;
3 | using Abp.Authorization.Roles;
4 | using Abp.Domain.Uow;
5 | using Abp.Runtime.Caching;
6 | using Abp.Zero.Configuration;
7 | using Todo.MainProject.Authorization.Users;
8 | using Microsoft.AspNetCore.Identity;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Todo.MainProject.Authorization.Roles
12 | {
13 | public class RoleManager : AbpRoleManager
14 | {
15 | public RoleManager(
16 | RoleStore store,
17 | IEnumerable> roleValidators,
18 | ILookupNormalizer keyNormalizer,
19 | IdentityErrorDescriber errors,
20 | ILogger> logger,
21 | IPermissionManager permissionManager,
22 | ICacheManager cacheManager,
23 | IUnitOfWorkManager unitOfWorkManager,
24 | IRoleManagementConfig roleManagementConfig)
25 | : base(
26 | store,
27 | roleValidators,
28 | keyNormalizer,
29 | errors, logger,
30 | permissionManager,
31 | cacheManager,
32 | unitOfWorkManager,
33 | roleManagementConfig)
34 | {
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Identity/IdentityRegistrar.cs:
--------------------------------------------------------------------------------
1 | using Todo.MainProject.Authorization;
2 | using Todo.MainProject.Authorization.Roles;
3 | using Todo.MainProject.Authorization.Users;
4 | using Todo.MainProject.Editions;
5 | using Todo.MainProject.MultiTenancy;
6 | using Microsoft.AspNetCore.Identity;
7 | using Microsoft.Extensions.DependencyInjection;
8 |
9 | namespace Todo.MainProject.Identity
10 | {
11 | public static class IdentityRegistrar
12 | {
13 | public static IdentityBuilder Register(IServiceCollection services)
14 | {
15 | services.AddLogging();
16 |
17 | return services.AddAbpIdentity()
18 | .AddAbpTenantManager()
19 | .AddAbpUserManager()
20 | .AddAbpRoleManager()
21 | .AddAbpEditionManager()
22 | .AddAbpUserStore()
23 | .AddAbpRoleStore()
24 | .AddAbpLogInManager()
25 | .AddAbpSignInManager()
26 | .AddAbpSecurityStampValidator()
27 | .AddAbpUserClaimsPrincipalFactory()
28 | .AddPermissionChecker()
29 | .AddDefaultTokenProviders();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/aspnet-core/test/Todo.MainProject.Tests/DependencyInjection/ServiceCollectionRegistrar.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Abp.Dependency;
3 | using Todo.MainProject.EntityFrameworkCore;
4 | using Todo.MainProject.Identity;
5 | using Castle.MicroKernel.Registration;
6 | using Castle.Windsor.MsDependencyInjection;
7 | using Microsoft.EntityFrameworkCore;
8 | using Microsoft.Extensions.DependencyInjection;
9 |
10 | namespace Todo.MainProject.Tests.DependencyInjection
11 | {
12 | public static class ServiceCollectionRegistrar
13 | {
14 | public static void Register(IIocManager iocManager)
15 | {
16 | var services = new ServiceCollection();
17 |
18 | IdentityRegistrar.Register(services);
19 |
20 | services.AddEntityFrameworkInMemoryDatabase();
21 |
22 | var serviceProvider = WindsorRegistrationHelper.CreateServiceProvider(iocManager.IocContainer, services);
23 |
24 | var builder = new DbContextOptionsBuilder();
25 | builder.UseInMemoryDatabase(Guid.NewGuid().ToString()).UseInternalServiceProvider(serviceProvider);
26 |
27 | iocManager.IocContainer.Register(
28 | Component
29 | .For>()
30 | .Instance(builder.Options)
31 | .LifestyleSingleton()
32 | );
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/angular/src/app/layout/topbar.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | search
5 |
6 |
7 |
8 | close
9 |
10 |
11 |
12 |
28 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.Core/Identity/SignInManager.cs:
--------------------------------------------------------------------------------
1 | using Abp.Authorization;
2 | using Abp.Configuration;
3 | using Abp.Domain.Uow;
4 | using Todo.MainProject.Authorization.Roles;
5 | using Todo.MainProject.Authorization.Users;
6 | using Todo.MainProject.MultiTenancy;
7 | using Microsoft.AspNetCore.Authentication;
8 | using Microsoft.AspNetCore.Http;
9 | using Microsoft.AspNetCore.Identity;
10 | using Microsoft.Extensions.Logging;
11 | using Microsoft.Extensions.Options;
12 |
13 | namespace Todo.MainProject.Identity
14 | {
15 | public class SignInManager : AbpSignInManager
16 | {
17 | public SignInManager(
18 | UserManager userManager,
19 | IHttpContextAccessor contextAccessor,
20 | UserClaimsPrincipalFactory claimsFactory,
21 | IOptions optionsAccessor,
22 | ILogger> logger,
23 | IUnitOfWorkManager unitOfWorkManager,
24 | ISettingManager settingManager,
25 | IAuthenticationSchemeProvider schemes
26 | ) : base(
27 | userManager,
28 | contextAccessor,
29 | claimsFactory,
30 | optionsAccessor,
31 | logger,
32 | unitOfWorkManager,
33 | settingManager,
34 | schemes)
35 | {
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPlugin.AngularUI/src/app/numberonly.directive.ts:
--------------------------------------------------------------------------------
1 | import { Directive, ElementRef, HostListener } from '@angular/core';
2 |
3 | @Directive({
4 | selector: '[appNumberOnly]'
5 | })
6 | export class NumberOnlyDirective {
7 | // Allow decimal numbers. The \. is only allowed once to occur
8 | private regex: RegExp = new RegExp(/^[0-9]+(\.[0-9]*){0,1}$/g);
9 |
10 | // Allow key codes for special events. Reflect :
11 | // Backspace, tab, end, home
12 | private specialKeys: Array = [ 'Backspace', 'Tab', 'End', 'Home' ];
13 |
14 | constructor(private el: ElementRef) {
15 | }
16 |
17 | @HostListener('keydown', [ '$event' ])
18 | onKeyDown(event: KeyboardEvent) {
19 | // Allow Backspace, tab, end, and home keys
20 | if (this.specialKeys.indexOf(event.key) !== -1) {
21 | return;
22 | }
23 |
24 | // Do not use event.keycode this is deprecated.
25 | // See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
26 | const current: string = this.el.nativeElement.value;
27 | // We need this because the current value on the DOM element
28 | // is not yet updated with the value from this event
29 | const next: string = current.concat(event.key);
30 | if (next && !String(next).match(this.regex)) {
31 | event.preventDefault();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/aspnet-core/Todo.DemoPlugin/Todo.DemoPluginDeploy.ps1:
--------------------------------------------------------------------------------
1 | dotnet restore
2 |
3 | $currentPath = (Get-Item -Path "./" -Verbose).FullName
4 | $uiProjectPath = Join-Path $currentPath ".\Todo.DemoPlugin.AngularUI"
5 | $wwwrootPath = Join-Path $uiProjectPath ".\wwwroot\demoplugin"
6 | $webcoreProjectPath = Join-Path $currentPath ".\Todo.DemoPlugin.Web.Core";
7 | $metadetaJson = Join-Path $webcoreProjectPath "Todo.DemoPlugin.json"
8 | $releasePath = Join-Path $webcoreProjectPath ".\bin\x64\Release\netcoreapp2.0"
9 | $hostPath = Join-Path $currentPath "..\src\Todo.MainProject.Web.Host"
10 | $pluginPath = Join-Path $hostPath "PlugIns"
11 | $pluginDllPath = Join-Path $pluginPath "Todo.DemoPlugin"
12 |
13 |
14 | Set-Location $uiProjectPath
15 | yarn
16 | ng build -bh /demoplugin/ -prod -aot
17 |
18 | Set-Location $webcoreProjectPath
19 | Compress-Archive -Path $wwwrootPath -DestinationPath demoplugin.zip -Force
20 | dotnet msbuild /t:clean
21 | dotnet msbuild /t:rebuild /p:Configuration=Release /p:Platform=x64
22 |
23 | if (! (Test-Path $pluginPath)) {
24 | New-Item -ItemType Directory -Force -Path $pluginPath
25 | }
26 |
27 | if (! (Test-Path $pluginDllPath)) {
28 | New-Item -ItemType Directory -Force -Path $pluginDllPath
29 | }
30 |
31 | Copy-Item $metadetaJson $pluginPath -Force
32 |
33 | $releaseItems = Join-Path $releasePath "Todo.DemoPlugin.*"
34 | Copy-Item $releaseItems $pluginDllPath -Force
35 |
36 | Set-Location $currentPath
37 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-red.css:
--------------------------------------------------------------------------------
1 | .theme-red .navbar {
2 | background-color: #F44336; }
3 |
4 | .theme-red .navbar-brand {
5 | color: #fff; }
6 | .theme-red .navbar-brand:hover {
7 | color: #fff; }
8 | .theme-red .navbar-brand:active {
9 | color: #fff; }
10 | .theme-red .navbar-brand:focus {
11 | color: #fff; }
12 |
13 | .theme-red .nav > li > a {
14 | color: #fff; }
15 | .theme-red .nav > li > a:hover {
16 | background-color: transparent; }
17 | .theme-red .nav > li > a:focus {
18 | background-color: transparent; }
19 |
20 | .theme-red .nav .open > a {
21 | background-color: transparent; }
22 | .theme-red .nav .open > a:hover {
23 | background-color: transparent; }
24 | .theme-red .nav .open > a:focus {
25 | background-color: transparent; }
26 |
27 | .theme-red .bars {
28 | color: #fff; }
29 |
30 | .theme-red .sidebar .menu .list li.active {
31 | background-color: transparent; }
32 | .theme-red .sidebar .menu .list li.active > :first-child i, .theme-red .sidebar .menu .list li.active > :first-child span {
33 | color: #F44336; }
34 |
35 | .theme-red .sidebar .menu .list .toggled {
36 | background-color: transparent; }
37 |
38 | .theme-red .sidebar .menu .list .ml-menu {
39 | background-color: transparent; }
40 |
41 | .theme-red .sidebar .legal {
42 | background-color: #fff; }
43 | .theme-red .sidebar .legal .copyright a {
44 | color: #F44336 !important; }
45 |
46 |
--------------------------------------------------------------------------------
/aspnet-core/src/Todo.MainProject.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/DefaultSettingsCreator.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using Abp.Configuration;
3 | using Abp.Localization;
4 | using Abp.Net.Mail;
5 | using Microsoft.EntityFrameworkCore;
6 |
7 | namespace Todo.MainProject.EntityFrameworkCore.Seed.Host
8 | {
9 | public class DefaultSettingsCreator
10 | {
11 | private readonly MainProjectDbContext _context;
12 |
13 | public DefaultSettingsCreator(MainProjectDbContext context)
14 | {
15 | _context = context;
16 | }
17 |
18 | public void Create()
19 | {
20 | //Emailing
21 | AddSettingIfNotExists(EmailSettingNames.DefaultFromAddress, "admin@mydomain.com");
22 | AddSettingIfNotExists(EmailSettingNames.DefaultFromDisplayName, "mydomain.com mailer");
23 |
24 | //Languages
25 | AddSettingIfNotExists(LocalizationSettingNames.DefaultLanguage, "en");
26 | }
27 |
28 | private void AddSettingIfNotExists(string name, string value, int? tenantId = null)
29 | {
30 | if (_context.Settings.IgnoreQueryFilters().Any(s => s.Name == name && s.TenantId == tenantId && s.UserId == null))
31 | {
32 | return;
33 | }
34 |
35 | _context.Settings.Add(new Setting(tenantId, null, name, value));
36 | _context.SaveChanges();
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-blue.css:
--------------------------------------------------------------------------------
1 | .theme-blue .navbar {
2 | background-color: #2196F3; }
3 |
4 | .theme-blue .navbar-brand {
5 | color: #fff; }
6 | .theme-blue .navbar-brand:hover {
7 | color: #fff; }
8 | .theme-blue .navbar-brand:active {
9 | color: #fff; }
10 | .theme-blue .navbar-brand:focus {
11 | color: #fff; }
12 |
13 | .theme-blue .nav > li > a {
14 | color: #fff; }
15 | .theme-blue .nav > li > a:hover {
16 | background-color: transparent; }
17 | .theme-blue .nav > li > a:focus {
18 | background-color: transparent; }
19 |
20 | .theme-blue .nav .open > a {
21 | background-color: transparent; }
22 | .theme-blue .nav .open > a:hover {
23 | background-color: transparent; }
24 | .theme-blue .nav .open > a:focus {
25 | background-color: transparent; }
26 |
27 | .theme-blue .bars {
28 | color: #fff; }
29 |
30 | .theme-blue .sidebar .menu .list li.active {
31 | background-color: transparent; }
32 | .theme-blue .sidebar .menu .list li.active > :first-child i, .theme-blue .sidebar .menu .list li.active > :first-child span {
33 | color: #2196F3; }
34 |
35 | .theme-blue .sidebar .menu .list .toggled {
36 | background-color: transparent; }
37 |
38 | .theme-blue .sidebar .menu .list .ml-menu {
39 | background-color: transparent; }
40 |
41 | .theme-blue .sidebar .legal {
42 | background-color: #fff; }
43 | .theme-blue .sidebar .legal .copyright a {
44 | color: #2196F3 !important; }
45 |
46 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-cyan.css:
--------------------------------------------------------------------------------
1 | .theme-cyan .navbar {
2 | background-color: #00BCD4; }
3 |
4 | .theme-cyan .navbar-brand {
5 | color: #fff; }
6 | .theme-cyan .navbar-brand:hover {
7 | color: #fff; }
8 | .theme-cyan .navbar-brand:active {
9 | color: #fff; }
10 | .theme-cyan .navbar-brand:focus {
11 | color: #fff; }
12 |
13 | .theme-cyan .nav > li > a {
14 | color: #fff; }
15 | .theme-cyan .nav > li > a:hover {
16 | background-color: transparent; }
17 | .theme-cyan .nav > li > a:focus {
18 | background-color: transparent; }
19 |
20 | .theme-cyan .nav .open > a {
21 | background-color: transparent; }
22 | .theme-cyan .nav .open > a:hover {
23 | background-color: transparent; }
24 | .theme-cyan .nav .open > a:focus {
25 | background-color: transparent; }
26 |
27 | .theme-cyan .bars {
28 | color: #fff; }
29 |
30 | .theme-cyan .sidebar .menu .list li.active {
31 | background-color: transparent; }
32 | .theme-cyan .sidebar .menu .list li.active > :first-child i, .theme-cyan .sidebar .menu .list li.active > :first-child span {
33 | color: #00BCD4; }
34 |
35 | .theme-cyan .sidebar .menu .list .toggled {
36 | background-color: transparent; }
37 |
38 | .theme-cyan .sidebar .menu .list .ml-menu {
39 | background-color: transparent; }
40 |
41 | .theme-cyan .sidebar .legal {
42 | background-color: #fff; }
43 | .theme-cyan .sidebar .legal .copyright a {
44 | color: #00BCD4 !important; }
45 |
46 |
--------------------------------------------------------------------------------
/angular/src/bsb-theme/css/themes/theme-grey.css:
--------------------------------------------------------------------------------
1 | .theme-grey .navbar {
2 | background-color: #9E9E9E; }
3 |
4 | .theme-grey .navbar-brand {
5 | color: #fff; }
6 | .theme-grey .navbar-brand:hover {
7 | color: #fff; }
8 | .theme-grey .navbar-brand:active {
9 | color: #fff; }
10 | .theme-grey .navbar-brand:focus {
11 | color: #fff; }
12 |
13 | .theme-grey .nav > li > a {
14 | color: #fff; }
15 | .theme-grey .nav > li > a:hover {
16 | background-color: transparent; }
17 | .theme-grey .nav > li > a:focus {
18 | background-color: transparent; }
19 |
20 | .theme-grey .nav .open > a {
21 | background-color: transparent; }
22 | .theme-grey .nav .open > a:hover {
23 | background-color: transparent; }
24 | .theme-grey .nav .open > a:focus {
25 | background-color: transparent; }
26 |
27 | .theme-grey .bars {
28 | color: #fff; }
29 |
30 | .theme-grey .sidebar .menu .list li.active {
31 | background-color: transparent; }
32 | .theme-grey .sidebar .menu .list li.active > :first-child i, .theme-grey .sidebar .menu .list li.active > :first-child span {
33 | color: #9E9E9E; }
34 |
35 | .theme-grey .sidebar .menu .list .toggled {
36 | background-color: transparent; }
37 |
38 | .theme-grey .sidebar .menu .list .ml-menu {
39 | background-color: transparent; }
40 |
41 | .theme-grey .sidebar .legal {
42 | background-color: #fff; }
43 | .theme-grey .sidebar .legal .copyright a {
44 | color: #9E9E9E !important; }
45 |
46 |
--------------------------------------------------------------------------------