| | | 1 | | @using OzonOrdersWeb.Areas.Studio2.ViewModels.Grid |
| | | 2 | | @* |
| | | 3 | | Консоль API-поставщика на AG Grid. Вьюха консоли описывает методы прежними карточками (.ak-group > .ak-card > форма) |
| | | 4 | | они лежат скрытым описанием, а console-grid.js строит из них таблицу методов, панель запроса и грид результата. |
| | | 5 | | *@ |
| | | 6 | | @{ |
| | 0 | 7 | | Layout = "~/Views/Shared/_Layout.cshtml"; |
| | 0 | 8 | | var title = ViewData["ConsoleTitle"] as string ?? "API поставщика"; |
| | 0 | 9 | | var subtitle = ViewData["ConsoleSubtitle"] as string ?? string.Empty; |
| | 0 | 10 | | var note = ViewData["ConsoleNote"] as string ?? string.Empty; |
| | 0 | 11 | | var logUrl = ViewData["ConsoleLogUrl"] as string ?? string.Empty; |
| | | 12 | | } |
| | 0 | 13 | | @await Html.PartialAsync("_BsxGridShell") |
| | | 14 | | <link rel="stylesheet" href="~/css/Studio2/Armtek/armtek-index.css" asp-append-version="true"/> |
| | | 15 | | <div class="container-fluid bsx-surface py-3 ak-page"> |
| | 0 | 16 | | <div class="ak-hero app-section-hero app-section-hero--import d-flex flex-wrap justify-content-between align-items-c |
| | 0 | 17 | | <div class="ak-note"><i class="fas fa-info-circle"></i><span>@note</span></div> |
| | 0 | 18 | | <div id="akDefs" hidden aria-hidden="true">@RenderBody()</div> |
| | 0 | 19 | | @await Html.PartialAsync("_BsxDirectoryGrid", new BsxDirectoryGridViewModel("akMethods", "Методы API", "fa-plug", "П |
| | | 20 | | <div id="akRequest" class="ak-request" hidden></div> |
| | | 21 | | <div class="bsx-dir-card ak-result-card"> |
| | | 22 | | <div class="ak-result-head"><span class="bsx-dir-title"><i class="fas fa-table-list"></i>Результат</span><div id |
| | | 23 | | </div> |
| | 0 | 24 | | @await Html.PartialAsync("_BsxDirectoryGrid", new BsxDirectoryGridViewModel("akResult", "Данные ответа", "fa-table", |
| | 0 | 25 | | <div id="akLog" data-log-url="@logUrl"> |
| | 0 | 26 | | @await Html.PartialAsync("_BsxDirectoryGrid", new BsxDirectoryGridViewModel("akLog", "Логи запросов этой сессии" |
| | | 27 | | </div> |
| | | 28 | | </div> |
| | | 29 | | <div class="modal fade" id="akJsonModal" tabindex="-1" aria-hidden="true"> |
| | | 30 | | <div class="modal-dialog modal-xl modal-dialog-scrollable"> |
| | | 31 | | <div class="modal-content"> |
| | | 32 | | <div class="modal-header"><h5 class="modal-title" id="akJsonTitle">Ответ</h5><button type="button" class="bt |
| | | 33 | | <div class="modal-body"><pre class="ak-json ak-json-modal" id="akJsonBody"></pre></div> |
| | | 34 | | <div class="modal-footer"><button type="button" class="btn btn-sm btn-outline-secondary" id="akJsonCopy"><i |
| | | 35 | | </div> |
| | | 36 | | </div> |
| | | 37 | | </div> |
| | | 38 | | <script src="~/js/Studio2/Grid/bsx-directory.js" asp-append-version="true"></script> |
| | | 39 | | <script src="~/js/Studio2/ApiSupplierConsole/console-grid.js" asp-append-version="true"></script> |
| | 0 | 40 | | @await RenderSectionAsync("Scripts", required: false) |
| | | 41 | | <script> |
| | | 42 | | document.addEventListener('DOMContentLoaded', function () { |
| | 0 | 43 | | window.ApiConsoleGrid?.mount({ logUrl: @Json.Serialize(logUrl) }); |
| | | 44 | | }); |
| | | 45 | | </script> |