< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Studio2_Views_Shared__BsxGridShell
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/Shared/_BsxGridShell.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 37
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 16
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ExecuteAsync()0%272160%
<ExecuteAsync()100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/Shared/_BsxGridShell.cshtml

#LineLine coverage
 1@using System.Security.Claims
 2@using OzonOrdersWeb.WebServices.BitrixStock
 3@inject OzonOrdersWeb.WebServices.Orders.Grid.IOrdersGridUserSettingsService BsxUserSettings
 4@*
 5    Общая оболочка гридов AG Grid в Studio2 (BitrixStock, JobLogs, TransactionJobs…): стили гридов и слой токенов
 6    темы (.bsx-surface на корне страницы), ранняя установка темы (общий viewPrefs.theme со страницей заказов),
 7    настройки пользователя (bsx.*), antiforgery, локаль и BsxGrid. ag-grid-community подключён в _Layout.
 8    Страница дополняет window.bsxGridConfig своими URL до своих модулей. Правила — docs/frontend-ag-grid-migration.md.
 9*@
 10@{
 011    var bsxUserId = User.FindFirstValue(ClaimTypes.NameIdentifier);
 012    var bsxGridSettings = string.IsNullOrEmpty(bsxUserId)
 013        ? new Dictionary<string, string>()
 014        : (await BsxUserSettings.GetAllAsync(bsxUserId, Context.RequestAborted))
 015            .Where(kv => BitrixSyncGridSettings.IsAllowedKey(kv.Key))
 016            .ToDictionary(kv => kv.Key, kv => kv.Value);
 017    var bsxViewPrefsJson = bsxGridSettings.TryGetValue("viewPrefs", out var bsxViewPrefsRaw) && !string.IsNullOrWhiteSpa
 18}
 19<link rel="stylesheet" href="~/css/Studio2/OrdersGrid/orders-grid.css" asp-append-version="true"/>
 20<link rel="stylesheet" href="~/css/Studio2/Grid/bsx-grid.css" asp-append-version="true"/>
 21<script>
 22    (function () {
 23        var mode = 'light';
 024        try { mode = (@Html.Raw(bsxViewPrefsJson) || {}).theme || 'light'; } catch (e) { /* ignore */ }
 25        if (mode === 'auto') mode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'da
 26        if (mode !== 'dark') mode = 'light';
 27        document.documentElement.setAttribute('data-og-theme', mode);
 28        document.documentElement.setAttribute('data-ag-theme-mode', mode);
 29    })();
 30    window.bsxGridConfig = {
 031        userSettings: @Html.Raw(System.Text.Json.JsonSerializer.Serialize(bsxGridSettings)),
 032        saveSettingUrl: @Html.Raw(System.Text.Json.JsonSerializer.Serialize(Url.Action("Save", "GridSettings", new { are
 33    };
 34</script>
 035<form id="bsxAf" method="post" hidden>@Html.AntiForgeryToken()</form>
 36<script src="~/js/Studio2/OrdersGrid/orders-grid-locale.js" asp-append-version="true"></script>
 37<script src="~/js/Studio2/Grid/bsx-grid-core.js" asp-append-version="true"></script>

Methods/Properties

ExecuteAsync()
<ExecuteAsync()