Base solution for your next web application

Activities of "pumbinha"

Question

Hi all,

I'm trying to use Hangfire with ASPNET Zero and after activating it I can reach the control panel when I manually write the url: /hangfire.

Is it any way to integrate in the Menu System of the dashboard?

I've changed the AppNavigationProviced class to set the proper values but I suppose that I have to change the App.js file... but it's not rerouted... how should I do it?

If it helps, that's what I added in the AppNavigationProvider Class:

).AddItem(new MenuItemDefinition(
                            PageNames.App.Host.Hangfire,
                            L("Hangfire"),
                            url: "/hangfire",
                            icon: "icon-wrench",
                            target:"_blank",
                            requiredPermissionName: AppPermissions.Pages_Administration_HangfireDashboard
                        )

Hi,

I'm currently using version 1.

Hi all,

because a lot of traces are being recorded in the audit log I was wondering if it was possible to set some kind of level to save only the traces that generate an exception.

If this is not possible "out of the box", is it possible to extend the audit-log framework to achieve this?

Thank you in advance.

<cite>pumbinha: </cite> Hi all,

because a lot of traces are being recorded in the audit log I was wondering if it was possible to set some kind of level to save only the traces that generate an exception.

If this is not possible "out of the box", is it possible to extend the audit-log framework to achieve this?

Thank you in advance.

This means, that I can use my own AuditingStoreProvider or should I create a new class that inherits from AuditingStore and there I write my own business logic?

I can't find any place in code where the AuditingStoreProvider is set.

Well, I finally found a solution, I leave it here just in case it's useful for someone:

I've created my own AuditingStore class:

public class AuditingStoreExtended : AuditingStore
    {
        public AuditingStoreExtended(IRepository<AuditLog, long> auditLogRepository) : base(auditLogRepository)
        {
        }

        public override Task SaveAsync(AuditInfo auditInfo)
        {
            Task result = Task.FromResult(new AuditLog()); ;

            if (auditInfo.Exception != null)
            {
                result = base.SaveAsync(auditInfo);
            }

            return result;
        }        
    }

After this I injected this new class in XXXCoreModule.cs:

IocManager.Register<IAuditingStore, AuditingStoreExtended>();

And now it works perfectly :)

Is this what you meant?

Thanks!

Hi all,

I've been yesterday a couple of hours struggling my mind and I didn't get a solution yet.

First of all, this is an "usecase" that often occurs and maybe it wouldn't be a bad idea, if something like this is included in the base template of Aspnet Zero.

I'm using the SPA Version with Angular 1.x (4.0).

There are many occasions where after searching for an element in a Table, I would like to open it to view the details and the pop-up solution is not enough, I'm already a beginner in Angular, but it's quite simple: after clicking a link/button, I want to route the request to a new view including parameters in the url to load the content properly.

To achieve this I first registered the new view in app.js:

$stateProvider.state('tenant.product', {
                url: "/product",
                templateUrl: '~/App/tenant/views/products/view.cshtml',
        });

First question is: should the parameters somehow be included in this route?

In my index view, where all the products are listed I should have a link to redirect to the new view (view.cshtml) and this view should have a mechanism to read the parameters, and that's the point that I don't find in AspNet zero, because all SPA views open other views through popups.

Could you please give me a couple of clues to go on?

Thanks!

I found some examples like here: <a class="postlink" href="https://stackoverflow.com/questions/39811845/angularjs-routing-with-parameters">https://stackoverflow.com/questions/398 ... parameters</a>

but I don't know if this will work with Aspnet zero. In App.js there is no $routeProvider that I can reference :(

Question

Hi all,

I've tried to get info about this topic in the forum but I found nothing relevant...

I'd like to show in some specific navigation tree items a dynamic text (example: numer of unread messages or something that comes from the database / web service).

Is this with Aspnet Zero possible? I know the NavigationTree Class where all the Rights and Items are build but I don't find an easy way to achieve what I want...

Thank you in advance!

Answer

<cite>ismcagdas: </cite> Hi @pumbinha,

This is not possible by default but you can modify menu cshtml/html file to implement this. I can point you to correct file if you can share the template you are using (angular1, angular2, MVC 5.x & jQuery, ASP.NET Core & jQuery).

Thanks.

Hi, that would be great!

I'm currently using Angular 1.x + MVC5.

Thank you in advance!

Showing 1 to 10 of 12 entries