mirror of https://github.com/abpframework/abp.git
19 changed files with 301 additions and 39 deletions
@ -1,10 +1,8 @@ |
|||
import { NgModule, APP_INITIALIZER } from '@angular/core'; |
|||
import { noop, CoreModule } from '@abp/ng.core'; |
|||
import { noop } from '@abp/ng.core'; |
|||
import { APP_INITIALIZER, NgModule } from '@angular/core'; |
|||
import { IdentityConfigService } from './services/identity-config.service'; |
|||
import { ThemeSharedModule } from '@abp/ng.theme.shared'; |
|||
|
|||
@NgModule({ |
|||
imports: [CoreModule, ThemeSharedModule], |
|||
providers: [{ provide: APP_INITIALIZER, deps: [IdentityConfigService], useFactory: noop, multi: true }], |
|||
}) |
|||
export class IdentityConfigModule {} |
|||
|
|||
@ -0,0 +1 @@ |
|||
# @abp/ng.tenant-management.config |
|||
@ -0,0 +1,32 @@ |
|||
// Karma configuration file, see link for more information
|
|||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
|||
|
|||
module.exports = function (config) { |
|||
config.set({ |
|||
basePath: '', |
|||
frameworks: ['jasmine', '@angular-devkit/build-angular'], |
|||
plugins: [ |
|||
require('karma-jasmine'), |
|||
require('karma-chrome-launcher'), |
|||
require('karma-jasmine-html-reporter'), |
|||
require('karma-coverage-istanbul-reporter'), |
|||
require('@angular-devkit/build-angular/plugins/karma') |
|||
], |
|||
client: { |
|||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
|||
}, |
|||
coverageIstanbulReporter: { |
|||
dir: require('path').join(__dirname, '../../coverage/tenant-management-config'), |
|||
reports: ['html', 'lcovonly', 'text-summary'], |
|||
fixWebpackSourcePaths: true |
|||
}, |
|||
reporters: ['progress', 'kjhtml'], |
|||
port: 9876, |
|||
colors: true, |
|||
logLevel: config.LOG_INFO, |
|||
autoWatch: true, |
|||
browsers: ['Chrome'], |
|||
singleRun: false, |
|||
restartOnFileChange: true |
|||
}); |
|||
}; |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", |
|||
"dest": "../../dist/tenant-management-config", |
|||
"lib": { |
|||
"entryFile": "src/public-api.ts" |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"name": "@abp/ng.tenant-management.config", |
|||
"version": "0.0.1", |
|||
"publishConfig": { |
|||
"access": "public" |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
import { Injectable } from '@angular/core'; |
|||
import { ABP_ROUTES, eLayoutType } from '@abp/ng.core'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class TenantManagementConfigService { |
|||
constructor() { |
|||
ABP_ROUTES.push({ |
|||
name: 'AbpTenantManagement::Menu:TenantManagement', |
|||
path: 'tenant-management', |
|||
parentName: 'AbpUiNavigation::Menu:Administration', |
|||
layout: eLayoutType.application, |
|||
iconClass: 'fa fa-users', |
|||
children: [ |
|||
{ |
|||
path: 'tenants', |
|||
name: 'AbpTenantManagement::Tenants', |
|||
order: 1, |
|||
requiredPolicy: 'AbpTenantManagement.Tenants', |
|||
}, |
|||
], |
|||
}); |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
import { NgModule, APP_INITIALIZER } from '@angular/core'; |
|||
import { TenantManagementConfigService } from './services/tenant-management-config.service'; |
|||
import { noop } from '@abp/ng.core'; |
|||
|
|||
@NgModule({ |
|||
providers: [{ provide: APP_INITIALIZER, deps: [TenantManagementConfigService], useFactory: noop, multi: true }], |
|||
}) |
|||
export class TenantManagementConfigModule {} |
|||
@ -0,0 +1,7 @@ |
|||
/* |
|||
* Public API Surface of tenant-management-config |
|||
*/ |
|||
|
|||
export * from './lib/services/tenant-management-config.service'; |
|||
export * from './lib/tenant-management-config.component'; |
|||
export * from './lib/tenant-management-config.module'; |
|||
@ -0,0 +1,21 @@ |
|||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
|||
|
|||
import 'zone.js/dist/zone'; |
|||
import 'zone.js/dist/zone-testing'; |
|||
import { getTestBed } from '@angular/core/testing'; |
|||
import { |
|||
BrowserDynamicTestingModule, |
|||
platformBrowserDynamicTesting |
|||
} from '@angular/platform-browser-dynamic/testing'; |
|||
|
|||
declare const require: any; |
|||
|
|||
// First, initialize the Angular testing environment.
|
|||
getTestBed().initTestEnvironment( |
|||
BrowserDynamicTestingModule, |
|||
platformBrowserDynamicTesting() |
|||
); |
|||
// Then we find all the tests.
|
|||
const context = require.context('./', true, /\.spec\.ts$/); |
|||
// And load the modules.
|
|||
context.keys().map(context); |
|||
@ -0,0 +1,26 @@ |
|||
{ |
|||
"extends": "../../tsconfig.json", |
|||
"compilerOptions": { |
|||
"outDir": "../../out-tsc/lib", |
|||
"target": "es2015", |
|||
"declaration": true, |
|||
"inlineSources": true, |
|||
"types": [], |
|||
"lib": [ |
|||
"dom", |
|||
"es2018" |
|||
] |
|||
}, |
|||
"angularCompilerOptions": { |
|||
"annotateForClosureCompiler": true, |
|||
"skipTemplateCodegen": true, |
|||
"strictMetadataEmit": true, |
|||
"fullTemplateTypeCheck": true, |
|||
"strictInjectionParameters": true, |
|||
"enableResourceInlining": true |
|||
}, |
|||
"exclude": [ |
|||
"src/test.ts", |
|||
"**/*.spec.ts" |
|||
] |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
{ |
|||
"extends": "../../tsconfig.json", |
|||
"compilerOptions": { |
|||
"outDir": "../../out-tsc/spec", |
|||
"types": [ |
|||
"jasmine", |
|||
"node" |
|||
] |
|||
}, |
|||
"files": [ |
|||
"src/test.ts" |
|||
], |
|||
"include": [ |
|||
"**/*.spec.ts", |
|||
"**/*.d.ts" |
|||
] |
|||
} |
|||
@ -0,0 +1,17 @@ |
|||
{ |
|||
"extends": "../../tslint.json", |
|||
"rules": { |
|||
"directive-selector": [ |
|||
true, |
|||
"attribute", |
|||
"abp", |
|||
"camelCase" |
|||
], |
|||
"component-selector": [ |
|||
true, |
|||
"element", |
|||
"abp", |
|||
"kebab-case" |
|||
] |
|||
} |
|||
} |
|||
Loading…
Reference in new issue