Dear Support Team,
We have just extended the licensing subscription and wanted to download the invoice however tabs under the License Management do not work. Could you please fix it.
Kind Regards, Matt
Hi @ismcagdas,
No error logs from the server side. If I understand correctly, authentication happens on the front-end via angular-oauth2-oidc.js module.
I will provide auth0 client id and screenshots to your email.
Additional discovery I made was that cors module didn't exist in 10.0.0 (couldn't find it in package.json). If it is possible to disable "cors": "^2.8.5" maybe that would temporarily solve my problem.
Thank you! Matt
What is your product version? 10.3.0 What is your product type (Angular or MVC)? Angular What is product framework type (.net framework or .net core)? .net core
Dear Support Team,
We are facing a problem to make OpenID authentication work. We configured the OpenId authentication to connect to Auth0.
We face CORS mismatch between the request and response header when server tries to retrieve the .well-known/openid-configuration file.
Front end submits the pre-flight with the following headers: Access-Control-Request-Headers: abp.tenantid,cache-control,expires,pragma,x-requested-with
Auth0 returns the following: access-control-allow-headers: Origin, Content-Type, Accept, X-Requested-With, Authorization, Auth0-Client, X-Request-Language
Browser rejects the connection with the following message: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://edulab.au.auth0.com/.well-known/openid-configuration. (Reason: header ‘abp.tenantid’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response).
Our question is how to tweak the Access-Control-Request-Headers or disable them altogether?
We seek for your help urgently as we have one tenant's production down.
Kind Regards, Matt
Thank you for the tip! Wrapping the function in the setTimeout solved the problem! Also needed to move the refreshMenu function to the labViewModel.
Kind Regards, Matt
Hi @ismcagdas,
Let me try to provide the relavant code. I cut as much irrelevant stuff as possible
lab-details.component.html
<div [class]="containerClass">
<div class="row">
<div class="col-xl-6" *ngFor="let vm of labViewModel?.virtualMachinesViewModels">
<div class="card mb-7 edulab-vm">
<div class="card-footer text-end">
<div class="d-flex flex-stack">
<div>
<button type="button" class="btn btn-sm btn-active-light-primary me-2" data-kt-menu-trigger="click">
BBB2
</button>
<div class="menu menu-sub menu-sub-lg-down-accordion menu-sub-lg-dropdown menu-rounded-0 py-lg-4 w-lg-225px" data-kt-menu="true">
<div class="menu-item px-3">
<span class="menu-link py-3">
</span>
<span class="menu-title" data-link="#">Some menu title</span>
</div></div></div></div></div></div></div></div></div>
lab-details.component.ts
private refreshVirtualApplicationStatusTimer: Observable<number> = timer(0, this.refreshVirtualApplicationStatusIntervalSeconds * 1000);
ngOnInit(): void {
// Read Lab ID from URL parameter
this.getLabIdFromUrlParameter().then(labId => {
this.labId = labId;
this.loadLabDetails();
// Periodic VAPP refresh
this.refreshVirtualApplicationStatusSubscription = this.refreshVirtualApplicationStatusTimer.subscribe(async () => {
await this.refreshVirtualApplication();
});
});
}
loadLabDetails() {
this.loadVirtualApplicationAndInitializeUI(this.labId);
}
private async loadVirtualApplicationAndInitializeUI(labId: string): Promise<LabInstanceDto> {
return new Promise((resolve, reject) => {
this.loadVirtualApplication(labId)
.then(labDto => {
if (this.processLabModel(labDto)) {
if (this.labViewModel !== undefined) {
this._pageTitleService.setPageTitle(this.labViewModel.name);
}
} else {
reject();
}
})
.finally(() => {
});
});
}
private async loadVirtualApplication(vappId: string): Promise<LabInstanceDto> {
return this._labService.getLabDetails(vappId)
.toPromise()
.then((labDto) => {
return labDto;
})
.catch((error) => {
return null;
});
}
private async refreshVirtualApplication(): Promise<LabInstanceViewModel> {
return this.loadVirtualApplication(this.labId)
.then(labDto => {
this.processLabModel(labDto);
return this.labViewModel;
})
.catch(error => {
abp.log.error(error);
return null;
}).finally(() => {
});
}
I'm struggling to make the Metronic "kt-menu" dropdown menus to work on the dynamically loaded Cards in the footer sections. Reading the Metronic documentation I was pointed to re-initialize the MenuComponent after the dynamic content is loaded.
Tried with the following code in the mypage.component.ts:
refreshMenus(): void {
MenuComponent.reinitialization();
}
I noticed that MenuComponent.reinitialization()
actually calls MenuComponent.createInstances('[data-kt-menu="true"]');
I was able to make dropdown menus to work on all Cards only if I manully click on a button which calls the refreshMenus() function which gives me an indication that MenuComponent.reinitialization()
works however I cannot make it work with any combination of using the Angular life-cycle hooks (AfterViewInit, AfterContentInit, OnInit, etc) when the pages load.
Is there any other way to solve my challenge?
Any help will be hightly appreciated!
@ismcagdas
Yes, we will upgrade to Metronic 8 in the future but it is not in our short time plan. Metronic 8 is missing some features and many themes at the moment.
What does it is not in short term plan mean? 3months 6months, ...