Yes sure, Here is my file
` import { Component, Injector, OnInit, ViewChild, AfterViewInit } from '@angular/core'; import { AppConsts } from '@shared/AppConsts'; import { UrlHelper } from '@shared/helpers/UrlHelper'; import { SubscriptionStartType } from '@shared/service-proxies/service-proxies'; import { ChatSignalrService } from 'app/shared/layout/chat/chat-signalr.service'; import { AppComponentBase } from 'shared/common/app-component-base'; import { SignalRHelper } from 'shared/helpers/SignalRHelper'; import { LinkedAccountsModalComponent } from '@app/shared/layout/linked-accounts-modal.component'; import { UserDelegationsModalComponent } from '@app/shared/layout/user-delegations-modal.component'; import { ChangePasswordModalComponent } from '@app/shared/layout/profile/change-password-modal.component'; import { ChangeProfilePictureModalComponent } from '@app/shared/layout/profile/change-profile-picture-modal.component'; import { MySettingsModalComponent } from '@app/shared/layout/profile/my-settings-modal.component'; import { NotificationSettingsModalComponent } from '@app/shared/layout/notifications/notification-settings-modal.component'; import { UserNotificationHelper } from '@app/shared/layout/notifications/UserNotificationHelper'; import { Router, NavigationEnd } from '@angular/router'; import { UrlService } from './shared/url.service'; import { filter } from 'rxjs/operators'; import { DateTimeService } from './shared/common/timing/date-time.service';
import { ToggleComponent, ScrollTopComponent, DrawerComponent, StickyComponent, MenuComponent, ScrollComponent } from '@metronic/app/kt/components';
@Component({ templateUrl: './app.component.html', styleUrls: ['./app.component.less'], }) export class AppComponent extends AppComponentBase implements OnInit , AfterViewInit{
previousUrl: string = null;
currentUrl: string = null;
subscriptionStartType = SubscriptionStartType;
theme: string;
installationMode = true;
@ViewChild('linkedAccountsModal') linkedAccountsModal: LinkedAccountsModalComponent;
@ViewChild('userDelegationsModal', { static: true }) userDelegationsModal: UserDelegationsModalComponent;
@ViewChild('changePasswordModal', { static: true }) changePasswordModal: ChangePasswordModalComponent;
@ViewChild('changeProfilePictureModal', { static: true })
changeProfilePictureModal: ChangeProfilePictureModalComponent;
@ViewChild('mySettingsModal', { static: true }) mySettingsModal: MySettingsModalComponent;
@ViewChild('notificationSettingsModal', { static: true })
notificationSettingsModal: NotificationSettingsModalComponent;
@ViewChild('chatBarComponent') chatBarComponent;
isQuickThemeSelectEnabled: boolean = this.setting.getBoolean('App.UserManagement.IsQuickThemeSelectEnabled');
IsSessionTimeOutEnabled: boolean =
this.setting.getBoolean('App.UserManagement.SessionTimeOut.IsEnabled') && this.appSession.userId != null;
public constructor(
injector: Injector,
private router: Router,
private urlService: UrlService,
private _chatSignalrService: ChatSignalrService,
private _userNotificationHelper: UserNotificationHelper,
private _dateTimeService: DateTimeService
) {
super(injector);
}
ngOnInit(): void {
this._userNotificationHelper.settingsModal = this.notificationSettingsModal;
this.theme = abp.setting.get('App.UiManagement.Theme').toLocaleLowerCase();
this.installationMode = UrlHelper.isInstallUrl(location.href);
this.registerModalOpenEvents();
if (this.appSession.application) {
SignalRHelper.initSignalR(() => {
this._chatSignalrService.init();
});
}
this.pluginsInitialization();
this.router.events.pipe(
filter((event) => event instanceof NavigationEnd)
).subscribe((event: NavigationEnd) => {
this.previousUrl = this.currentUrl;
this.currentUrl = event.url;
this.urlService.setPreviousUrl(this.previousUrl);
});
}
ngAfterViewInit(): void {
abp.signalr.autoConnect = false;
}
pluginsInitialization() {
setTimeout(() => {
ToggleComponent.bootstrap();
ScrollTopComponent.bootstrap();
DrawerComponent.bootstrap();
StickyComponent.bootstrap();
MenuComponent.bootstrap();
ScrollComponent.bootstrap();
}, 200);
}
subscriptionStatusBarVisible(): boolean {
return (
this.appSession.tenantId > 0 &&
(this.appSession.tenant.isInTrialPeriod || this.subscriptionIsExpiringSoon())
);
}
subscriptionIsExpiringSoon(): boolean {
if (this.appSession.tenant?.subscriptionEndDateUtc) {
let today = this._dateTimeService.getUTCDate();
let daysFromNow = this._dateTimeService.plusDays(today, AppConsts.subscriptionExpireNootifyDayCount);
return daysFromNow >= this.appSession.tenant.subscriptionEndDateUtc;
}
return false;
}
registerModalOpenEvents(): void {
this.subscribeToEvent('app.show.linkedAccountsModal', () => {
this.linkedAccountsModal.show();
});
this.subscribeToEvent('app.show.userDelegationsModal', () => {
this.userDelegationsModal.show();
});
this.subscribeToEvent('app.show.changePasswordModal', () => {
this.changePasswordModal.show();
});
this.subscribeToEvent('app.show.changeProfilePictureModal', () => {
this.changeProfilePictureModal.show();
});
this.subscribeToEvent('app.show.mySettingsModal', () => {
this.mySettingsModal.show();
});
}
getRecentlyLinkedUsers(): void {
abp.event.trigger('app.getRecentlyLinkedUsers');
}
onMySettingsModalSaved(): void {
abp.event.trigger('app.onMySettingsModalSaved');
}
} `
Hello Team,
Thanks you so much for really valued ans. This really help us to get started to implement Serilog. Now we have one requirment where on each log we want to write current TenantId and UserId in seperate columns which help us to analyze log for each tenant.
Angular project
Any update, as we are near to release our product and we are highly waiting for this solution.
ERROR 2022-03-08 10:47:25,460 [orker] Mvc.ExceptionHandling.AbpExceptionFilter - The type initializer for 'Gdip' threw an exception.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
at System.Drawing.Image.InitializeFromStream(Stream stream)
at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.FromStream(Stream stream)
at project.Web.Helpers.ImageFormatHelper.GetRawImageFormat(Byte[] fileBytes) in /home/devopsadmin/devopsagent/_work/3/s/aspnet-core/src/project.Web.Core/Helpers/ImageFormatHelper.cs:line 13
at project.Web.Controllers.ProfileControllerBase.UploadProfilePicture(FileDto input) in /home/devopsadmin/devopsagent/_work/3/s/aspnet-core/src/project.Web.Core/Controllers/ProfileControllerBase.cs:line 60
at lambda_method52801(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
ERROR 2022-03-08 10:53:44,830 [orker] Mvc.ExceptionHandling.AbpExceptionFilter - The type initializer for 'Gdip' threw an exception.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
at System.Drawing.Image.InitializeFromStream(Stream stream)
at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.FromStream(Stream stream)
at project.Web.Helpers.ImageFormatHelper.GetRawImageFormat(Byte[] fileBytes) in /home/devopsadmin/devopsagent/_work/3/s/aspnet-core/src/project.Web.Core/Helpers/ImageFormatHelper.cs:line 13
at project.Web.Controllers.ProfileControllerBase.UploadProfilePicture(FileDto input) in /home/devopsadmin/devopsagent/_work/3/s/aspnet-core/src/project.Web.Core/Controllers/ProfileControllerBase.cs:line 60
at lambda_method52801(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Hello Team,
Any update, as we are near to release our product and we are highly waiting for this solution.
I have share project below link
!!LINK REMOVED!!
open below link after run angular project http://localhost:4200/account/login
The problem is that when choosing a date for the first time (the control is empty and the value null) nothing happens. the second time you choose a date I got the error "TypeError: t.getFullYear is not a function". I've attached a screenshot.
I have share project below link
!!LINK REMOVED!!