Activities of "imranStem"

I have some pages which are not defined in routes. Lets say I have below routes which is defined in routes.

 routes.add([
      {
        path: '/wms',
        name: 'Wms',
        iconClass: 'fas fa-cubes',
        order: 5,
        layout: eLayoutType.application,
      },

      {
        path: '/wms/warehouses',
        name: 'Warehouse',
        parentName: WmsRouteNames.Wms,
        requiredPolicy: 'WmsService.Warehouses',
      },

I have a route with path '/wms/warehouses' of warehouse listing page but I have separate page to create or update the warehouse data with path '/wms/warehouses/create'. When I navigate to create page, the selection of 'Warehouse' nav item is removed and breadcrumbs is also reset to 'Home' only. I want to set active nav item and breadcrumbs also for all the pages which routes having the path which are not defined in route provider.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am using the Microservice template. I want to use external provider microsoft login.

I have checked the setting page and there is no account button to setup the external providers.

Auth Server login page with Microsoft Login Button

Angular Login Page, No Microsoft Login Button

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

That is the question, how can I get the Role id and organization id of user?

I am using the Microservice template. I want to get the current user's roles id and organization id in my product microservice.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Thanks

I can get the settings value by ISettingStore but how can I update the setting value from another microservice because ISettingManager is not available.

Any update on this?

I have already added classname in add method in administrator microservice.

I have microservice architecture. I have create new setting provider in administration microservice.

Custom Setting Definition Provider

public class CustomSettingDefinitionProvider : SettingDefinitionProvider, ITransientDependency
    {
        public override void Define(ISettingDefinitionContext context)
        {
            context.Add(new SettingDefinition("TotalRank", ""));
        }

    }

Custom Setting Management Provider

 public class CustomSettingManagementProvider : SettingManagementProvider, ITransientDependency
    {
        public override string Name => "W";
        public CustomSettingManagementProvider(ISettingManagementStore store)
        : base(store)
        {
        }
    }

Custom Setting Value Provider

public class CustomSettingValueProvider : SettingValueProvider
    {
        public override string Name => "W";

        public CustomSettingValueProvider(ISettingStore settingStore)
            : base(settingStore)
        {
        }

        public override Task<string> GetOrNullAsync(SettingDefinition setting)
        {
            return SettingStore.GetOrNullAsync(setting.Name, Name, null);
        }

        public override Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
        {
            return SettingStore.GetAllAsync(settings.Select(x => x.Name).ToArray(), Name, null);
        }
    }

I have registered custom setting definition and provider in AdministrationServiceApplicationModule

 Configure<AbpSettingOptions>(options =>
        {
            options.DefinitionProviders.Add<CustomSettingDefinitionProvider>();
        });
        Configure<SettingManagementOptions>(options =>
        {
            options.Providers.Add<CustomSettingManagementProvider>();
        });

I can add the settings by above configuration in database.

Now, I want to read the custom setting in another microservice so I have created custom setting value provider in my another microservice and I registered value provider in app module.

public class CustomSettingValueProvider : SettingValueProvider
    {
        public override string Name => "W";

        public CustomSettingValueProvider(ISettingStore settingStore)
            : base(settingStore)
        {
        }

        public override Task<string> GetOrNullAsync(SettingDefinition setting)
        {
            return SettingStore.GetOrNullAsync(setting.Name, Name, null);
        }

        public override Task<List<SettingValue>> GetAllAsync(SettingDefinition[] settings)
        {
            return SettingStore.GetAllAsync(settings.Select(v => v.Name).ToArray(), Name, null);
        }
    }
 Configure<AbpSettingOptions>(options =>
        {
            options.ValueProviders.Add<CustomSettingValueProvider>();
        });

When I read the custom setting, it giving the null value.

var setting = await _customSettingValueProvider.GetOrNullAsync(new SettingDefinition("TotalRank")) ;

I also check with provider key but it always return null value.

I have already read the setting provider document and its not giving any details for microservice architecture to read the custom setting provider from another application.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have implemented the custom http error handler as below and registered in app module class.

export function handleHttpErrors(injector: Injector, httpError: HttpErrorResponse) {
  const toaster = injector.get(ToasterService);
  if (httpError.status === 403 || httpError.status === 400) {
    toaster.error(httpError.error?.error?.message || 'Error');
    return;
  }
  return throwError(httpError);
}
 providers: [{ provide: HTTP_ERROR_HANDLER, useValue: handleHttpErrors },.............]

The toaster message is displaying but dialog is also appearing.

  • ABP Framework version: v7.4.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Showing 1 to 10 of 91 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11