|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<listing |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> |
| 5 | + |
| 6 | + <!-- **************************************************** --> |
| 7 | + <!-- Configuration of the component's data provider. --> |
| 8 | + <!-- **************************************************** --> |
| 9 | + <argument name="data" xsi:type="array"> |
| 10 | + <item name="js_config" xsi:type="array"> |
| 11 | + <!-- First part (fl32csp_rule_grid.) should be the same as name of this XML file --> |
| 12 | + <item name="provider" xsi:type="string">fl32csp_rule_grid.ds_for_grid</item> |
| 13 | + <!-- Prevent JS error: "this.source is not a function at UiClass.exportSorting (column.js:187)" --> |
| 14 | + <item name="deps" xsi:type="string">fl32csp_rule_grid.ds_for_grid</item> |
| 15 | + </item> |
| 16 | + <!-- data loading indicator is bound to grid columns area (spinner will not disappear w/o it) --> |
| 17 | + <item name="spinner" xsi:type="string">columns_for_the_grid</item> |
| 18 | + </argument> |
| 19 | + |
| 20 | + <!-- **************************************************** --> |
| 21 | + <!-- Data Source (is used by data provider). --> |
| 22 | + <!-- **************************************************** --> |
| 23 | + <dataSource name="ds_for_grid" |
| 24 | + component="Magento_Ui/js/grid/provider"> |
| 25 | + <argument name="dataProvider" xsi:type="configurableObject"> |
| 26 | + <!--https://magento.stackexchange.com/questions/248611/magento-2-grid-data-source-definition-in-compact-form --> |
| 27 | + <argument name="class" xsi:type="string">Flancer32\Base\App\Ui\DataProvider\Admin\Grid</argument> |
| 28 | + <argument name="name" xsi:type="string">ds_for_grid</argument> |
| 29 | + <argument name="qGrid" xsi:type="object">Flancer32\Csp\Ui\DataProvider\Rule\Grid</argument> |
| 30 | + </argument> |
| 31 | + </dataSource> |
| 32 | + |
| 33 | + <listingToolbar name="listing_top"> |
| 34 | + <argument name="data" xsi:type="array"> |
| 35 | + <item name="config" xsi:type="array"> |
| 36 | + <item name="sticky" xsi:type="boolean">false</item> |
| 37 | + </item> |
| 38 | + </argument> |
| 39 | + <bookmark name="bookmarks"/> |
| 40 | + <columnsControls name="columns_controls"/> |
| 41 | + <filters name="listing_filters"/> |
| 42 | + <paging name="listing_paging"/> |
| 43 | + </listingToolbar> |
| 44 | + |
| 45 | + <columns name="columns_for_the_grid"> |
| 46 | + |
| 47 | + <column name="Id" |
| 48 | + component="Flancer32_Base/js/grid/column/integer"> |
| 49 | + <settings> |
| 50 | + <dataType>number</dataType> |
| 51 | + <filter>text</filter> |
| 52 | + <label translate="true">ID</label> |
| 53 | + <sortable>true</sortable> |
| 54 | + <sorting>desc</sorting> |
| 55 | + </settings> |
| 56 | + </column> |
| 57 | + |
| 58 | + <column name="Enabled" |
| 59 | + component="Magento_Ui/js/grid/columns/select"> |
| 60 | + <settings> |
| 61 | + <dataType>select</dataType> |
| 62 | + <filter>select</filter> |
| 63 | + <options class="Magento\Config\Model\Config\Source\Yesno"/> |
| 64 | + <sortable>true</sortable> |
| 65 | + <label translate="true">Enabled</label> |
| 66 | + </settings> |
| 67 | + </column> |
| 68 | + |
| 69 | + <column name="Area" |
| 70 | + component="Magento_Ui/js/grid/columns/select"> |
| 71 | + <settings> |
| 72 | + <dataType>select</dataType> |
| 73 | + <filter>select</filter> |
| 74 | + <options class="Flancer32\Csp\Model\Config\Source\Area"/> |
| 75 | + <sortable>true</sortable> |
| 76 | + <label translate="true">Area</label> |
| 77 | + </settings> |
| 78 | + </column> |
| 79 | + |
| 80 | + <column name="PolicyId" |
| 81 | + component="Magento_Ui/js/grid/columns/select"> |
| 82 | + <settings> |
| 83 | + <dataType>select</dataType> |
| 84 | + <filter>select</filter> |
| 85 | + <options class="Flancer32\Csp\Model\Config\Source\Policy"/> |
| 86 | + <sortable>true</sortable> |
| 87 | + <label translate="true">Policy</label> |
| 88 | + </settings> |
| 89 | + </column> |
| 90 | + |
| 91 | + <column name="Source"> |
| 92 | + <settings> |
| 93 | + <dataType>date</dataType> |
| 94 | + <filter>text</filter> |
| 95 | + <label translate="true">Source</label> |
| 96 | + </settings> |
| 97 | + </column> |
| 98 | + |
| 99 | + </columns> |
| 100 | + |
| 101 | +</listing> |
0 commit comments