File tree Expand file tree Collapse file tree 6 files changed +52
-4
lines changed
app/code/Magento/AsynchronousOperations
Ui/Component/DataProvider
view/adminhtml/ui_component
dev/tests/integration/testsuite/Magento/AsynchronousOperations
Ui/Component/DataProvider Expand file tree Collapse file tree 6 files changed +52
-4
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright © Magento, Inc. All rights reserved.
4+ * See COPYING.txt for license details.
5+ */
6+ namespace Magento \AsynchronousOperations \Model \BulkUserType ;
7+
8+ use Magento \Authorization \Model \UserContextInterface ;
9+ use Magento \Framework \Data \OptionSourceInterface ;
10+
11+ class Options implements OptionSourceInterface
12+ {
13+ /**
14+ * @inheritDoc
15+ */
16+ public function toOptionArray (): array
17+ {
18+ return [
19+ [
20+ 'value ' => UserContextInterface::USER_TYPE_ADMIN ,
21+ 'label ' => 'Admin user '
22+ ],
23+ [
24+ 'value ' => UserContextInterface::USER_TYPE_INTEGRATION ,
25+ 'label ' => 'Integration '
26+ ]
27+ ];
28+ }
29+ }
Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ protected function _initSelect()
9393 )->where (
9494 'user_id=? ' ,
9595 $ this ->userContext ->getUserId ()
96+ )->where (
97+ 'user_type=? ' ,
98+ UserContextInterface::USER_TYPE_ADMIN
99+ )->orWhere (
100+ 'user_type=? ' ,
101+ UserContextInterface::USER_TYPE_INTEGRATION
96102 );
97103 return $ this ;
98104 }
Original file line number Diff line number Diff line change @@ -33,3 +33,4 @@ Error,Error
3333"Dismiss All Completed Tasks","Dismiss All Completed Tasks"
3434"Action Details - #","Action Details - #"
3535"Number of Records Affected","Number of Records Affected"
36+ "User Type","User Type"
Original file line number Diff line number Diff line change 8181 <label translate =" true" >Description of Operation</label >
8282 </settings >
8383 </column >
84+ <column name =" user_type" component =" Magento_Ui/js/grid/columns/select" sortOrder =" 55" >
85+ <settings >
86+ <filter >select</filter >
87+ <options class =" \Magento\AsynchronousOperations\Model\BulkUserType\Options" />
88+ <dataType >select</dataType >
89+ <label translate =" true" >User Type</label >
90+ </settings >
91+ </column >
8492 <column name =" status" component =" Magento_Ui/js/grid/columns/select" sortOrder =" 60" >
8593 <settings >
8694 <filter >select</filter >
Original file line number Diff line number Diff line change 77
88use Magento \TestFramework \Helper \Bootstrap ;
99
10- /**
11- * Class SearchResultTest
12- */
1310class SearchResultTest extends \PHPUnit \Framework \TestCase
1411{
1512 /**
@@ -29,6 +26,6 @@ public function testGetAllIds()
2926 $ searchResult = $ objectManager ->create (
3027 \Magento \AsynchronousOperations \Ui \Component \DataProvider \SearchResult::class
3128 );
32- $ this ->assertEquals (5 , $ searchResult ->getTotalCount ());
29+ $ this ->assertEquals (6 , $ searchResult ->getTotalCount ());
3330 }
3431}
Original file line number Diff line number Diff line change 2929 'description ' => 'Bulk Description ' ,
3030 'operation_count ' => 3 ,
3131 ],
32+ 'in_progress_integration ' => [
33+ 'uuid ' => 'bulk-uuid-2.1 ' ,
34+ 'user_id ' => 100 ,
35+ 'user_type ' => \Magento \Authorization \Model \UserContextInterface::USER_TYPE_INTEGRATION ,
36+ 'description ' => 'Bulk Description ' ,
37+ 'operation_count ' => 3 ,
38+ ],
3239 'in_progress_failed ' => [
3340 'uuid ' => 'bulk-uuid-3 ' ,
3441 'user_id ' => 1 ,
You can’t perform that action at this time.
0 commit comments