Base solution for your next web application

Activities of "klir"

We are trying to run the storybook in aspnet zero, the installation goes well but when we run the storybook we get an invalid string length error when it starts generating the documentation.

I was wondering if anyone had a good solution to this issue. Our aspnet zero version is 8.1, with angular 9.1.

We have tried running it on a fresh new application with same framework versions and the error persists, but if we run it on a standard angular (without aspnet zero) applicaiton it goes well.

Here is a screenshot of the error

Question

Hi,

Is it possible to get a roadmap for the rest of 2019, we have viewed the version here but additional info would be appreciated. We understand that it is subject to change based on priorities but it would be good to understand the current order of upcoming features.

Thanks

Are you able to share some more information regarding this new feature you are working on? Also expected release date?

Hi,

We are using ASP.NET CORE & Angular .NET Core 2.1 v5.6.2, and I need to find which are the browsers supported and versions. Is there any documentation where you have this details?

Regards

Hi all,

I've added in our core module the following settings in order to support UTC time and multitimezone

//Adding setting providers
Configuration.Settings.Providers.Add<AppSettingProvider>();
Configuration.Settings.Providers.Add<TimingSettingProvider>();
Clock.Provider = ClockProviders.Utc;

And then in our appsettings the default TimeZone

"Abp": {
  "Timing": {
    "TimeZone": "GMT Standard Time"
  }
},

However when I run the project it always displays UTC as the default timezone. As a workaround I've removed TimingSettingProvider and added it manuallly in my shared settings the following that will read that property from appsettings. Did I missed something here?

new SettingDefinition(TimingSettingNames.TimeZone, 
                                        GetFromSettings("Abp:Timing:Timezone", "UTC"), null, //TODO: Can we use here localization?
                                        scopes: SettingScopes.Application | SettingScopes.Tenant | SettingScopes.User, 
                                        clientVisibilityProvider: new VisibleSettingClientVisibilityProvider())

Regards

Hi,

I'm adding some tests for a global notification process. Basically I've registered an EntityCreatedEventData in the evenbus and every time a record is created a notification is published. All works ok while debugging the app. But now I want to lock this behaviour by adding some unit test that replicate this logic. However I couldn't figure out how to make this work. In the unit test below, a new notification is publised, current users is subscribed, Created Event is raised, but notificationSubscriptionManager returns always 0. Can you help me with this one?

public NotificationAppService_Tests()
{
    _notificationAppService = Resolve<INotificationAppService>();
    _userNotificationManager = Resolve<IUserNotificationManager>();
    _notificationSubscriptionManager = Resolve<INotificationSubscriptionManager>();
    _taskRepository = Resolve<IRepository<TaskEntity, long>>();
}


...


[Fact]
public async Task User_Receives_NewTaskCreated_Notification()
{
    //Subscribe current user to NewTaskCreated 
    var user = await GetCurrentUserAsync();
    await _notificationSubscriptionManager.SubscribeAsync(user.ToUserIdentifier(), AppNotificationNames.NewTaskCreated);

    //Create a new task:
    long taskId = 0;
    Action action = () =>
    {
        using (var uow = Resolve<IUnitOfWorkManager>().Begin())
        {
            taskId = _taskRepository.InsertAndGetId(new TaskEntity
            {
                Name = "New task for subscribers!!",
                CreatorUserId = AbpSession.UserId,
                LastModifierUserId = AbpSession.UserId,
                TenantId = AbpSession.TenantId,
                Code = "01",
                Description = "New task for subscribers!!",
                OwnerUserId = AbpSession.UserId,
                PermitId = 1, //Should be present in
            });


            var newTaskCreated = _taskRepository.FirstOrDefault(taskId);
            newTaskCreated.ShouldNotBeNull();

            //// Notify subscribers <== this happen in the EntityCreatedEventData once uow.Complerted()
            //// await _appNotifier.NewTaskCreatedAsync(newTaskCreated);

            uow.Complete();

        }
    };
    action
        .ShouldNotThrow();

    var userSubscriptions = _notificationSubscriptionManager
        .GetSubscribedNotifications(user.ToUserIdentifier());
    userSubscriptions
        .Count
        .ShouldBeGreaterThan(0);

    //User should receive notification
    var notifications = _userNotificationManager.GetUserNotifications(
        user.ToUserIdentifier()
    );

    //Asserts
    notifications
        .Count
        .ShouldBeGreaterThan(0); // <== **FAILS HERE retrieves 0 notifications!!!**


    var item = notifications.First();
    item.Notification
        .NotificationName
        .ShouldBe(AppNotificationNames.NewTaskCreated);

}

Hi, According to documentation "ing" events are atomic, but when running the following test entity is actually updated. Issue 751

[Fact]
        public void Should_Rollback_UOW_In_Updating_Event()
        {
            //Arrange
            var updatingTriggerCount = 0;
            var updatedTriggerCount = 0;
            Resolve<IEventBus>().Register<EntityUpdatingEventData<Permit>>(
               eventData =>
               {
                   eventData.Entity.Name.Should().Be("Permit 2");
                   updatingTriggerCount++;
                   throw new ApplicationException("A sample exception to rollback the UOW.");
               });
            Resolve<IEventBus>().Register<EntityUpdatedEventData<Permit>>(
               eventData =>
               {
                   //Should not come here, since UOW is failed
                   updatedTriggerCount++;
               });

            //Act
            try
            {
                using (var uow = Resolve<IUnitOfWorkManager>().Begin())
                {
                    var person = _permitRepository.Single(p => p.Name == "Permit");
                    person.Name = "Permit 2";
                    _permitRepository.Update(person);
                    uow.Complete();
                }
                Assert.True(false, "Should not come here since ApplicationException is thrown!");
            }
            catch (ApplicationException)
            {
                //hiding exception
            }
            //Assert
            updatingTriggerCount.Should().Be(1);
            updatedTriggerCount.Should().Be(0);
            _permitRepository
               .FirstOrDefault(p => p.Name == "Permit")
               .Should()
                .NotBeNull(); //should not be changed since we throw exception to rollback the transaction
        }

It fails in the last validation where the Permit name should be the original name. Any ideas why this happen?

Regards

Question

Hi, according to the documentation flaticons used are https://keenthemes.com/metronic/preview/?page=components/icons/flaticon&demo=default However the version I can download from my account it contains a different sets of icons, and seems to be just demo ones, a limited version of them.

Am I doing something wrong? Where can I get the right version of flaticons?

Regards

Hi,

I'm using .NetCore + Angular6 template, when I create lookups to the same entity in different tables, the Rad Tool generate the same files with the same Component name in angular under each entity folder. As components have the same name it only adds the first one to the NGModules main.module.ts. This is causing errors when I try to build for production, so to solve fix this I had to rename all duplicates components and manually add them to the MainModule.

Now, I've customized all the lookup template files in the rad tool. So instead of the name of the foreign entity I've added the plural name of the entity, I can use something like that:

{{entity_Name_Plural_Here}}-{{nP_Foreign_Entity_Name_Here}}

So 3 questions regarding to this topic: 1 Where can I find documentation of the RadTool for customizing templates? Which placeholders can I use?

2 Is anyone else having the same issue with lookup fields? Did you come up with another fancy solution for this?

3 Not related with the RadTool now, and apologize as I'm new in Angular. But just looking at the lookup components they are "All" the same thing and the only thing that changes is the entity service proxy and the DTO. Has anyone refactored the lookups so it can be reused? The problem would be to inject the right object, I've tried using typescript interfaces and use generics with no luck. Any suggestion here would it be more than welcome.

Regards

Showing 1 to 9 of 9 entries