Table of Contents

Class ModelsBuilderDashboardController

Namespace
Umbraco.Cms.Web.BackOffice.ModelsBuilder
Assembly
Umbraco.Web.BackOffice.dll

API controller for use in the Umbraco back office with Angular resources

[Authorize(Policy = "SectionAccessSettings")]
public class ModelsBuilderDashboardController : UmbracoAuthorizedJsonController
Inheritance
ModelsBuilderDashboardController
Inherited Members

Remarks

We've created a different controller for the backoffice/angular specifically this is to ensure that the correct CSRF security is adhered to for angular and it also ensures that this controller is not subseptipal to global WebApi formatters being changed since this is always forced to only return Angular JSON Specific formats.

Constructors

ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, IModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)

[ActivatorUtilitiesConstructor]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, IModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)

Parameters

config IOptions<ModelsBuilderSettings>
modelsGenerator IModelsGenerator
outOfDateModels OutOfDateModelsStatus
mbErrors ModelsGenerationError

ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, ModelsGenerator, IModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)

[Obsolete("This constructor is obsolete and will be removed in v13. Use the constructor with only IModelsGenerator instead.")]
[Browsable(false)]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, ModelsGenerator concreteModelGenerator, IModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)

Parameters

config IOptions<ModelsBuilderSettings>
concreteModelGenerator ModelsGenerator
modelsGenerator IModelsGenerator
outOfDateModels OutOfDateModelsStatus
mbErrors ModelsGenerationError

ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings>, ModelsGenerator, OutOfDateModelsStatus, ModelsGenerationError)

[Obsolete("This constructor is obsolete and will be removed in v13. Use the constructor with IModelsGenerator instead.")]
[Browsable(false)]
public ModelsBuilderDashboardController(IOptions<ModelsBuilderSettings> config, ModelsGenerator modelsGenerator, OutOfDateModelsStatus outOfDateModels, ModelsGenerationError mbErrors)

Parameters

config IOptions<ModelsBuilderSettings>
modelsGenerator ModelsGenerator
outOfDateModels OutOfDateModelsStatus
mbErrors ModelsGenerationError

Methods

BuildModels()

[HttpPost]
public IActionResult BuildModels()

Returns

IActionResult

GetDashboard()

[HttpGet]
public ActionResult<ModelsBuilderDashboardController.Dashboard> GetDashboard()

Returns

ActionResult<ModelsBuilderDashboardController.Dashboard>

GetModelsOutOfDateStatus()

[HttpGet]
public ActionResult<ModelsBuilderDashboardController.OutOfDateStatus> GetModelsOutOfDateStatus()

Returns

ActionResult<ModelsBuilderDashboardController.OutOfDateStatus>