Base solution for your next web application

Activities of "pumbinha"

Question

Hi all,

I would like to integrate Google Analytics with my website. I found that a couple of Google settings can be set in the web.config file, but I guess these are for the external authentication.

Is this currently implemented or should I paste the Google script in some specific file? In case I want to do this, which file would be the best to track all the pages? (probable some layout file or something shared across all the pages).

Thank you in advance,

Greetings.

I made the same question some weeks ago. Now I'm only saving the logs that contain an exception. More info here: [https://forum.aspnetboilerplate.com/viewtopic.php?f=5&t=9467&p=20804&hilit=audit#p20804])

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!

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!

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 :(

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!

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!

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

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.

Hi,

I'm currently using version 1.

Showing 1 to 10 of 12 entries