Project: Core with Angular (12.4)
Hi,
Please see below the issue that we are having.
Host
I have enabled Two Factor login on the host, see screenshot below.
When I login to the host, it asks for two factor authentication, which is fine.
Tenant
I then login to the Tenant, and go to the security tab, it does not show the options for Enabling email or SMS.
Our requirement is that some tenant may want to use SMS for two factor, others may want to use email or authenticator app.
When we check the code, the options are not appearing because multi tenancy is enabled and due to below condition. Can you advice?
Abp and Asp.net Zero - Latest Version Angular and Aspnet Core - Latest Version
Hi, I am trying to establish if it is easy to add new fields into your models and existing angular pages. For example, lets say, I want to add a new field called Agency. What is the best approach so that I minimize the future version upgrades that I may download from you. Should I extend a new class from AbpUser and application service and add new properties there? Also regarding New User dialog, instead of changing your create new user dialog, can I extend it somehow to add new field so that when new future versions are downloaded, there are not any conflicts?
Angular Project • "name": "abp-zero-template", • "version": "10.0.0", • "abp-ng2-module": "^6.2.0", • "abp-web-resources": "^5.3.0", • Nebula Core version 10.0.0. • Abp (6.0.0)
I need to send a couple of values in querystring for all my create and update methods. I cannot change below method in service-proxies.ts
because it will get overwritten all the time.
/**
* @param body (optional)
* @return Success
*/
updateWizard(body: MyWizardDataInputDto | undefined): Observable<ResponseOutputDto> {
let url_ = this.baseUrl + "/api/services/app/MyEntity/UpdateWizard";
url_ = url_.replace(/[?&]$/, "");
const content_ = JSON.stringify(body);
let options_ : any = {
body: content_,
observe: "response",
responseType: "blob",
headers: new HttpHeaders({
"Content-Type": "application/json-patch+json",
"Accept": "text/plain"
})
};
return this.http.request("put", url_, options_).pipe(_observableMergeMap((response_ : any) => {
return this.processUpdateWizard(response_);
})).pipe(_observableCatch((response_: any) => {
if (response_ instanceof HttpResponseBase) {
try {
return this.processUpdateWizard(<any>response_);
} catch (e) {
return <Observable<ResponseOutputDto>><any>_observableThrow(e);
}
} else
return <Observable<ResponseOutputDto>><any>_observableThrow(response_);
}));
}
Above function is called by my ts component shown below.
this._myEntity.updateWizard(this.wizardData).subscribe(result => {
this.wizardFormInitialisation(true);
}, error => {
});
We have hundreds of updateWizard/InsertWizard functions for all entities so we are looking for a dynamic solution for appending two paramters as query string, so that our ExtendedAuditStore
can get these values for auditing purposes.
Thanks
Angular Project
"name": "abp-zero-template",
"version": "10.0.0",
"abp-ng2-module": "^6.2.0",
"abp-web-resources": "^5.3.0",
Nebula Core version 10.0.0.
Abp (6.0.0)
I am getting below error when I run npm run publish command.
The error always appears at 92% when it is processing Terser.
ERROR in scripts.ef3fafcd5c3608cf8cf5.js from Terser
Invalid assignment [scripts.ef3fafcd5c3608cf8cf5.js:22301,33]
at ee (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:19541)
at c (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28244)
at ze (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:50572)
at qe (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:50653)
at T (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:34140)
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:30509
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28976
at N (C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:38503)
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:30588
at C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\terser\dist\bundle.min.js:1:28976
Full screenshot of the error is given below.
The Error log shows below detail.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'publish'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prepublish', 'publish', 'postpublish' ]
5 info lifecycle [email protected]~prepublish: [email protected]
6 info lifecycle [email protected]~publish: [email protected]
7 verbose lifecycle [email protected]~publish: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~publish: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\graphite.rack\source\repos\NebulaAngular\node_modules\.bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\nodejs\;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Users\graphite.rack\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Azure Data Studio\bin;C:\Users\graphite.rack\.dotnet\tools;C:\Users\graphite.rack\AppData\Local\Yarn\bin;C:\Users\graphite.rack\AppData\Roaming\npm;
9 verbose lifecycle [email protected]~publish: CWD: C:\Users\graphite.rack\source\repos\NebulaAngular
10 silly lifecycle [email protected]~publish: Args: [
10 silly lifecycle '/d /s /c',
10 silly lifecycle 'gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod'
10 silly lifecycle ]
11 silly lifecycle [email protected]~publish: Returned: code: 1 signal: null
12 info lifecycle [email protected]~publish: Failed to exec publish script
13 verbose stack Error: [email protected] publish: `gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\graphite.rack\source\repos\NebulaAngular
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "publish"
18 verbose node v14.16.0
19 verbose npm v6.14.11
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] publish: `gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod`
22 error Exit status 1
23 error Failed at the [email protected] publish script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
My Package.json file is shown below.
{
"name": "abp-zero-template",
"version": "10.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"ng": "ng",
"ng-high-memory": "node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng",
"publish": "gulp build && node --max_old_space_size=40240 ./node_modules/@angular/cli/bin/ng build --prod",
"start": "gulp buildDev && ng serve --host 0.0.0.0 --port 4201",
"hmr": "node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --port 4201 --hmr",
"test": "gulp buildDev && ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "gulp buildDev && protractor",
"create-dynamic-bundles": "gulp buildDev",
"nswag": "cd nswag/ && refresh.bat"
},
"private": false,
"dependencies": {
"@angular/animations": "^10.0.2",
"@angular/cdk": "^10.0.1",
"@angular/common": "^10.0.2",
"@angular/compiler": "^10.0.2",
"@angular/core": "^10.0.2",
"@angular/elements": "^11.0.3",
"@angular/forms": "^10.0.2",
"@angular/localize": "^11.0.3",
"@angular/platform-browser": "^10.0.2",
"@angular/platform-browser-dynamic": "^10.0.2",
"@angular/platform-server": "^10.0.2",
"@angular/router": "^10.0.2",
"@formio/angular": "5.2.3-rc.1",
"@fullcalendar/core": "^5.1.0",
"@microsoft/signalr": "^3.1.3",
"@progress/kendo-angular-buttons": "6.1.0",
"@progress/kendo-angular-charts": "^5.1.0",
"@progress/kendo-angular-common": "2.0.0",
"@progress/kendo-angular-dateinputs": "5.1.0",
"@progress/kendo-angular-dialog": "^5.0.0",
"@progress/kendo-angular-dropdowns": "5.1.0",
"@progress/kendo-angular-excel-export": "4.0.0",
"@progress/kendo-angular-grid": "5.0.1",
"@progress/kendo-angular-icons": "^0.4.3",
"@progress/kendo-angular-inputs": "7.1.0",
"@progress/kendo-angular-intl": "3.1.0",
"@progress/kendo-angular-l10n": "3.0.0",
"@progress/kendo-angular-label": "^3.0.0",
"@progress/kendo-angular-layout": "^6.1.5",
"@progress/kendo-angular-navigation": "^1.1.0",
"@progress/kendo-angular-pdf-export": "3.0.0",
"@progress/kendo-angular-popup": "4.0.0",
"@progress/kendo-angular-progressbar": "^2.0.1",
"@progress/kendo-angular-scheduler": "^2.1.1",
"@progress/kendo-angular-treeview": "^5.1.0",
"@progress/kendo-data-query": "1.5.4",
"@progress/kendo-date-math": "^1.5.3",
"@progress/kendo-drawing": "1.13.7",
"@progress/kendo-licensing": "^1.1.3",
"@progress/kendo-recurrence": "^1.0.1",
"@progress/kendo-svg-icons": "^0.1.2",
"@progress/kendo-theme-default": "4.32.0",
"@swimlane/ngx-charts": "^16.0.0",
"abp-ng2-module": "^6.2.0",
"abp-web-resources": "^5.3.0",
"adal-angular": "^1.0.17",
"add": "^2.0.6",
"angular-gridster2": "^10.0.1",
"angular-http-deserializer": "^1.0.13",
"angular-oauth2-oidc": "^10.0.2",
"angular2-counto": "^1.2.5",
"angular2-text-mask": "^9.0.0",
"animate.css": "^4.1.0",
"chart.js": "^2.9.3",
"cookieconsent": "^3.1.1",
"core-js": "^3.6.4",
"famfamfam-flags": "^1.0.0",
"flatpickr": "^4.6.9",
"formiojs": "4.15.0-rc.13",
"js-cookie": "^2.2.1",
"just-compare": "^1.3.0",
"localforage": "^1.7.3",
"lodash-es": "^4.17.0",
"luxon": "^1.25.0",
"msal": "^1.2.2",
"ng2-file-upload": "^1.4.0",
"ngx-bootstrap": "^5.6.1",
"ngx-captcha": "^8.0.1",
"ngx-doc-viewer2": "^1.5.3",
"ngx-image-cropper": "^3.1.4",
"ngx-perfect-scrollbar": "^9.0.0",
"ngx-spinner": "^9.0.1",
"object-path": "^0.11.4",
"primeicons": "^4.0.0",
"primeng": "^9.1.2",
"push.js": "^1.0.12",
"quill": "^1.3.7",
"rtl-detect": "^1.0.2",
"rxjs": "^6.5.4",
"simple-line-icons": "^2.4.1",
"splitter": "^0.1.2",
"sweetalert2": "^9.10.7",
"text-mask-addons": "^3.8.0",
"tslib": "^2.0.0",
"webdriver-manager": "^12.1.7",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1000.0",
"@angular/cli": "^10.0.0",
"@angular/compiler-cli": "^10.0.2",
"@angularclass/hmr": "^2.1.3",
"@angularclass/hmr-loader": "^3.0.4",
"@types/jasmine": "~3.5.10",
"@types/jasminewd2": "^2.0.8",
"@types/lodash-es": "^4.17.0",
"@types/luxon": "^1.25.0",
"@types/node": "^14.0.14",
"codelyzer": "^6.0.0",
"globby": "^11.0.1",
"gulp": "^4.0.1",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-less": "^4.0.1",
"gulp-postcss": "^8.0.0",
"gulp-uglify": "^3.0.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.1.0",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"merge-stream": "^2.0.0",
"nswag": "^13.7.4",
"postcss-url": "^9.0.0",
"prettier": "2.1.2",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"tslint": "~6.1.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "3.9.6"
},
"config": {
"max_old_space_size": 40240
}
}
I have tried below changes but of no use.
"angularCompilerOptions": {
**"fullTemplateTypeCheck": false,**
**"strictTemplates": false,**
"strictInputTypes": false,
"strictAttributeTypes": false,
"strictOutputEventTypes": false,
"strictDomEventTypes": false,
"strictLiteralTypes": false,
"strictInjectionParameters": false
}
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": false,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
npm run publish
npm run ng-high-memory --build --prod
Can someone please help, it is preventing us publish the app?
Thank you
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
I am receiving toJson function. I have emailed the code regarding this issue, please have a look.
I am using kendo grid in my project. I have added custom styles such as colours into styles.css file and it is working fine, so no matter what theme I select the colour will remain as I defined them in styles.css. I want to use different colours for my grid based on the selection of theme. For example, if user selects default theme then I want to set colours of the grid to blue, if they select themeX then I want to change the colours of the grid to green. I don't want to create new theme, just customising the colour of the grid based on theme.
The current file 'styles.css' is global so colours defined here are applicable to every theme. Can you please proivde step by step instructions for doing the above?
Thanks
What is your product version? 10 Latest
What is your product type (Angular or MVC)? ASP.net Core and Angular
What is product framework type (.net framework or .net core)? .NET5
What is ABP Framework version? The one that comes up with ASP.NET and Angular v10.
I am trying to use dynamic menu on the left hand side. I have searched your support side and tried to utilise what other people have done but I am struggling to implement it. This is what I have done so far:
Declared a global variable in app-navigation-service.ts
.
myAppMenu: AppMenu = new AppMenu('MainMenu', 'MainMenu', []);
I am calling my web api to get the menu from the server in getMenu()
function of app-navigation-service.ts
getMenu(): AppMenu {
this._myMenuService.getAllGrantedMenus(1, 1, 2)
.subscribe(result => {
console.log(result);
this.myAppMenu = result;
abp.event.trigger('myMenuLoaded', this.myAppMenu);
});
return this.myAppMenu;
}
In side-bar-menu.component.ts
I am registering the event and your code is being used to call getMenu()
function. The code is shown below.
ngOnInit() {
this.menuLoaded();
this.menu = this._appNavigationService.getMenu();
this.currentRouteUrl = this.router.url.split(/[?#]/)[0];
this.router.events
.pipe(filter((event) => event instanceof NavigationEnd))
.subscribe(
(event) =>
(this.currentRouteUrl = this.router.url.split(/[?#]/)[0])
);
}
menuLoaded(): void {
abp.event.on('myMenuLoaded', function (menu) {
console.log("EVENT IS FIRED");
console.log(menu);
this.menu = menu;
});
}
The above event is fired, but the menu is blank. I guess it is because the html and angular templates are executed before the menu data is returned. I am struggling to re-render the menu as it should be re-rendered when event is fired. Can you please help?
What is your product version? 10 Latest
What is your product type (Angular or MVC)? ASP.net Core and Angular
What is product framework type (.net framework or .net core)? .NET5
What is ABP Framework version? The one that comes up with ASP.NET and Angular v10.
Our application has a home page, where we display a list of records. When user selects a record, and move to another link (via the left hand menu), the system gets and shows the data for that particular record. There are many menus and each menu opens up a form which shows the data for the selected record. In our MVC/jquery version, we use session to store the Id of the selected record, and when user moves between the pages we track that Id and return the data for the selected record only.
What is the best way to achieve the above behaviour in AspNetCore and Angular version? Is there a way that we store the RecordId on the client side and it gets send automatically to the server side App Service? Do you have a example code to help?
Thanks
What is your product version? 10 Latest What is your product type (Angular or MVC)? ASP.net Core and Angular What is product framework type (.net framework or .net core)? .NET5 What is ABP Framework version? The one that comes up with ASP.NET and Angular v10.
What is the best way for changing ports for ASPNET Core Server project and Angular Project in the development environment? The ports 44301 (Server project) and 4200 (Angular Project) appears in multiple places. I tried to change them in all locations but I receive the errors displayed in the image below.
Can you help?
I am upgrading from version 8.0.0.0 to version 10.0.0.0. The code mentioned in the image below works fine on version 8, however I am getting compile time error on version 10. Has something changed on cache retrieval mechanism? I am passing a dto.
The code is the same, as I have copied and pasted the complete file.
I see from change logs on GitHub that methods belonging to CacheExtensions had been removed in March. What should be the alternative in my case, as I need to pass dto to my function?
Please see below the code which works fine on version 8, I need to convert this so that it works fine on version 10, please provide guidance or example code.
public async Task<List<AccommodationTypesListDto>> GetAll(GetFilteredAccommodationTypeInputDto getFilteredAccommodationTypeInputDto)
{
var cacheName = _nebulaCacheManager.GetTenantCacheName(_accommodationTypeCache.CacheName);
var accommodationType = await _cacheManager
.GetCache(cacheName)
.Get(getFilteredAccommodationTypeInputDto, () => GetAllFromDB(getFilteredAccommodationTypeInputDto));
return ObjectMapper.Map<List<AccommodationTypesListDto>>(accommodationType.OrderBy(getFilteredAccommodationTypeInputDto.Sorting));
}
private async Task<List<AccommodationTypesListDto>> GetAllFromDB(GetFilteredAccommodationTypeInputDto getFilteredAccommodationTypeInputDto)
{
var accommodationTypes = await (from accommodationType in _accommodationTypeRepository.GetAll()
.Where(a => a.MyField1 = getFilteredAccommodationTypeInputDto.MyField1 &&
a.MyField2 = getFilteredAccommodationTypeInputDto.MyField2)
select new AccommodationTypesListDto
{
Id = accommodationType.Id,
Text = accommodationType.Text,
DisplayOrder = accommodationType.DisplayOrder,
TenantId = accommodationType.TenantId
}).ToListAsync();
return accommodationTypes;
}
Can you help with example code please?