Base solution for your next web application

Activities of "daniela.buttner"

Answer

Hallo

there are any news to this problem?

Regards

Answer

Hi

thats from the last exapmle

public static class AbpZeroHealthCheck { public static IHealthChecksBuilder AddAbpZeroHealthCheck(this IServiceCollection services) { var builder = services.AddHealthChecks(); // builder.AddCheck<BadgerMetaDbContextHealthCheck>("Meta Database Connection"); // builder.AddCheck<BadgerMetaDbContextUsersHealthCheck>("Database Connection with user check"); builder.AddCheck<CacheHealthCheck>("Cache");

        //Und ACHTUNG the Name is unique!!!
        
        // add your custom health checks here
        // builder.AddCheck&lt;MyCustomHealthCheck&gt;("my health check");
        // builder.AddCheck&lt;BadgerAppDataDbContextHealthCheck&gt;("App Database Connection");
        // builder.AddCheck&lt;BadgerMongoDbContextHealthCheck&gt;("Mongo Database Connection");
        
        return builder;
    }
}

and this is a custom healtcheck class

namespace Badger.HealthChecks { public class BadgerAppDataDbContextHealthCheck : IHealthCheck { private readonly DatabaseCheckHelper _checkHelper;

    public BadgerAppDataDbContextHealthCheck(DatabaseCheckHelper checkHelper)
    {
        _checkHelper = checkHelper;
    }

    public Task&lt;HealthCheckResult&gt; CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = new CancellationToken())
    {
        if (_checkHelper.Exist(BadgerConsts.AppDataConnectionStringName))
        {
            return Task.FromResult(HealthCheckResult.Healthy("BadgerAppDataDbContext connected to database."));
        }

        return Task.FromResult(HealthCheckResult.Unhealthy("BadgerAppDataDbContext could not connect to database"));
    }
}

}

namespace Badger.HealthChecks { public class BadgerMongoDbContextHealthCheck : IHealthCheck { private readonly DatabaseCheckHelper _checkHelper;

    public BadgerMongoDbContextHealthCheck(DatabaseCheckHelper checkHelper)
    {
        _checkHelper = checkHelper;
    }

    public Task&lt;HealthCheckResult&gt; CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = new CancellationToken())
    {
        if (_checkHelper.Exist(BadgerConsts.MongoDbConnectionStringName))
        {
            return Task.FromResult(HealthCheckResult.Healthy("BadgerMetaDbContext connected to database."));
        }

        return Task.FromResult(HealthCheckResult.Unhealthy("BadgerMetaDbContext could not connect to database"));
    }
}

}

Regards

Answer

Hi

no in this screen shot you can see, I activate the cache health only. The Prod und Staging Server running without allow anonymous and the Dev Server we activate the IIS Configuration allow anonymous.

Regards

Answer

Hi

I upgrade the NuGet packages but the same problem.

In my initial request I push a screen from an Insomia post request, and on this I get a Unauthorized error. Why that or how can I fix this problem?

We test it with 2 Server, on the Test Server it works on the Prod Server doesn't work. The reason is on Test Server, the IIS Authentication -> Anonymous Authentication is enabled and on the other Server not. But we not allow Anonymous Authentication.

You have a solution for this problem?

Regards

Answer

HI

we use the 12.1.0 / Core MVC & JQuery

Regards

Yes thanks

Hi

that's nice your links but we don't use angular, we are using MVC. And in MVC is the structure others. And when I read right, then is the problem in your links not the same. In my project works the menu fine when is expand, it doesn't work when the menu is collapse and then I while click on a item whit sub items. And you can replicate this bug, on your own demo project (I wrote this info in my first statement).

Regards

Hi

I would like to take up this topic again. I read your comment in your last statment "//Take action when user clicks to live toastr notification" My intension is the link in the notification list not on the toast. I can link to a side but not open a modal popup.

Can you look please again. Regards

Hi my "show" code is orginal.

var show = function (userNotification) {                
                //Application notification
                abp.notifications.showUiNotifyForUserNotification(userNotification, {
                    'onclick': function () {
                        //Take action when user clicks to live toastr notification
                        var url = getUrl(userNotification);                        
                        if (url) {
                            location.href = url;
                        }
                    }
                });

                //Desktop notification
                Push.create("Badger", {
                    body: format(userNotification).text,
                    //icon: abp.appPath + 'Common/Images/app-logo-small.svg',
                    icon: abp.appPath + 'Common/Images/inSight_Logo_Side_With_N3.png',
                    timeout: 6000,
                    onClick: function () {
                        window.focus();
                        this.close();
                    }
                });
            };

Hi

Yes for existing notification types the click works fine, with the notifictions like open a modal service it work the open only when is build the notifications, then open the modal window. This is my getURL code, the last case is only the example to work normal (App.WelcomeToTheApplication)

function getUrl(userNotification) {
                switch (userNotification.notification.notificationName) {
                    case 'App.NewUserRegistered':
                        return '/App/users?filterText=' + userNotification.notification.data.properties.emailAddress;
                    case 'App.NewTenantRegistered':
                        return '/App/tenants?filterText=' + userNotification.notification.data.properties.tenancyName;
                    case 'App.GdprDataPrepared':
                        return '/File/DownloadBinaryFile?id=' + userNotification.notification.data.properties.binaryObjectId + '&contentType=application/zip&fileName=collectedData.zip';
                    case 'App.DownloadInvalidImportUsers':
                        return '/File/DownloadTempFile?fileToken=' + userNotification.notification.data.properties.fileToken + '&fileType=' + userNotification.notification.data.properties.fileType + '&fileName=' + userNotification.notification.data.properties.fileName;
                        //Add your custom notification names to navigate to a URL when user clicks to a notification.
                    case 'App.NewVersionAvailable':                        
                        return openReleaseNotesModal;
                    case 'App.WelcomeToTheApplication':
                        return '/App/users?filterText=' + userNotification.notification.data.properties.emailAddress;
                }

                //No url for this notification
                return '#';
            };

The 'App.NewVersionAvailable' case is my request for open a Modal Window the code for this is:

var openReleaseNotesModal = function () {
                new app.ModalManager({
                    viewUrl: abp.appPath + 'App/Profile/ReleaseNotesModal',
                    scriptUrl: abp.appPath + 'view-resources/Areas/App/Views/Profile/_ReleaseNotesModal.js',
                    modalClass: 'ReleaseNotesModal'
                });
            };

and when I add '.open()' then will open this initially.

Thanks Regards

Showing 1 to 10 of 11 entries