Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "astrea"

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

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(() => {
        });
}

@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, ...

Showing 1 to 4 of 4 entries